emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/progmodes/cc-langs.el


From: Alan Mackenzie
Subject: [Emacs-diffs] Changes to emacs/lisp/progmodes/cc-langs.el
Date: Fri, 24 Feb 2006 15:33:06 +0000

Index: emacs/lisp/progmodes/cc-langs.el
diff -u emacs/lisp/progmodes/cc-langs.el:1.36 
emacs/lisp/progmodes/cc-langs.el:1.37
--- emacs/lisp/progmodes/cc-langs.el:1.36       Fri Feb 10 09:00:31 2006
+++ emacs/lisp/progmodes/cc-langs.el    Fri Feb 24 15:33:02 2006
@@ -1,7 +1,7 @@
 ;;; cc-langs.el --- language specific settings for CC Mode
 
-;; Copyright (C) 1985,1987,1992-2003, 2004, 2005, 2006
-;; Free Software Foundation, Inc.
+;; Copyright (C) 1985,1987,1992-2003, 2004, 2005, 2006 Free Software
+;; Foundation, Inc.
 
 ;; Authors:    1998- Martin Stjernholm
 ;;             1992-1999 Barry A. Warsaw
@@ -177,7 +177,7 @@
   '(def-edebug-spec c-lang-defvar
      (&define name def-form &optional stringp)))
 
-(eval-when-compile
+(eval-and-compile
   ;; Some helper functions used when building the language constants.
 
   (defun c-filter-ops (ops opgroup-filter op-filter &optional xlate)
@@ -260,10 +260,14 @@
       ("Toggle..."
        ["Syntactic indentation" c-toggle-syntactic-indentation
        :style toggle :selected c-syntactic-indentation]
-       ["Auto newline" c-toggle-auto-newline
+       ["Electric mode"         c-toggle-electric-state
+       :style toggle :selected c-electric-flag]
+       ["Auto newline"          c-toggle-auto-newline
        :style toggle :selected c-auto-newline]
-       ["Hungry delete" c-toggle-hungry-state
-       :style toggle :selected c-hungry-delete-key])))
+       ["Hungry delete"         c-toggle-hungry-state
+       :style toggle :selected c-hungry-delete-key]
+       ["Subword mode"          c-subword-mode
+       :style toggle :selected c-subword-mode])))
 
 
 ;;; Syntax tables.
@@ -2826,7 +2830,7 @@
         ;; This let sets up the context for `c-mode-var' and similar
         ;; that could be in the result from `cl-macroexpand-all'.
         (let ((c-buffer-is-cc-mode ',mode)
-              current-var)
+              current-var source-eval)
           (condition-case err
 
               (if (eq c-version-sym ',c-version-sym)
@@ -2852,6 +2856,7 @@
                 ;;  (put ',mode 'c-has-warned-lang-consts t))
 
                 (require 'cc-langs)
+                (setq source-eval t)
                 (let ((init (cdr c-lang-variable-inits)))
                   (while init
                     (setq current-var (caar init))
@@ -2860,8 +2865,14 @@
 
             (error
              (if current-var
-                 (message "Eval error in the `c-lang-defvar' for `%s': %S"
-                          current-var err)
+                 (message "Eval error in the `c-lang-defvar' for `%s'%s: %S"
+                          current-var
+                          (if source-eval
+                              (format "\
+ (fallback source eval - %s compiled with CC Mode %s but loaded with %s)"
+                                      ',mode ,c-version c-version)
+                            "")
+                          err)
                (signal (car err) (cdr err)))))))
 
     ;; Being evaluated from source.  Always use the dynamic method to
@@ -2881,8 +2892,9 @@
 
           (error
            (if current-var
-               (message "Eval error in the `c-lang-defvar' for `%s': %S"
-                        current-var err)
+               (message
+                "Eval error in the `c-lang-defvar' for `%s' (source eval): %S"
+                current-var err)
              (signal (car err) (cdr err)))))))
     ))
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]