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-mode.el


From: Martin Stjernholm
Subject: [Emacs-diffs] Changes to emacs/lisp/progmodes/cc-mode.el
Date: Sat, 05 Jul 2003 15:53:34 -0400

Index: emacs/lisp/progmodes/cc-mode.el
diff -c emacs/lisp/progmodes/cc-mode.el:1.27 
emacs/lisp/progmodes/cc-mode.el:1.28
*** emacs/lisp/progmodes/cc-mode.el:1.27        Thu Jul  3 08:30:59 2003
--- emacs/lisp/progmodes/cc-mode.el     Sat Jul  5 15:53:33 2003
***************
*** 596,601 ****
--- 596,612 ----
  ;; doing this on load.  That since `add-to-list' prepends the value
  ;; which could cause it to clobber user settings.  Later emacsen have
  ;; an append option, but it's not safe to use.
+ 
+ ;; The the extension ".C" is associated to C++ while the lowercase
+ ;; variant goes to C.  On case insensitive file systems, this means
+ ;; that ".c" files also might open C++ mode if the C++ entry comes
+ ;; first on `auto-mode-alist'.  Thus we try to ensure that ".C" comes
+ ;; after ".c", and since `add-to-list' adds the entry first we have to
+ ;; add the ".C" entry first.
+ ;;;###autoload (add-to-list 'auto-mode-alist '("\\.\\(cc\\|hh\\)\\'" . 
c++-mode))
+ ;;;###autoload (add-to-list 'auto-mode-alist 
'("\\.[ch]\\(pp\\|xx\\|\\+\\+\\)\\'" . c++-mode))
+ ;;;###autoload (add-to-list 'auto-mode-alist '("\\.\\(CC?\\|HH?\\)\\'" . 
c++-mode))
+ 
  ;;;###autoload (add-to-list 'auto-mode-alist '("\\.[ch]\\'" . c-mode))
  
  ;; NB: The following two associate yacc and lex files to C Mode, which
***************
*** 613,619 ****
  To submit a problem report, enter `\\[c-submit-bug-report]' from a
  c-mode buffer.  This automatically sets up a mail buffer with version
  information already added.  You just need to add a description of the
! problem, including a reproducible test case and send the message.
  
  To see what version of CC Mode you are running, enter `\\[c-version]'.
  
--- 624,630 ----
  To submit a problem report, enter `\\[c-submit-bug-report]' from a
  c-mode buffer.  This automatically sets up a mail buffer with version
  information already added.  You just need to add a description of the
! problem, including a reproducible test case, and send the message.
  
  To see what version of CC Mode you are running, enter `\\[c-version]'.
  
***************
*** 670,679 ****
  (easy-menu-define c-c++-menu c++-mode-map "C++ Mode Commands"
                  (cons "C++" (c-lang-const c-mode-menu c++)))
  
- ;;;###autoload (add-to-list 'auto-mode-alist '("\\.\\(cc\\|hh\\)\\'" . 
c++-mode))
- ;;;###autoload (add-to-list 'auto-mode-alist 
'("\\.[ch]\\(pp\\|xx\\|\\+\\+\\)\\'" . c++-mode))
- ;;;###autoload (add-to-list 'auto-mode-alist '("\\.\\(CC?\\|HH?\\)\\'" . 
c++-mode))
- 
  ;;;###autoload
  (defun c++-mode ()
    "Major mode for editing C++ code.
--- 681,686 ----
***************
*** 816,822 ****
  To submit a problem report, enter `\\[c-submit-bug-report]' from a
  java-mode buffer.  This automatically sets up a mail buffer with
  version information already added.  You just need to add a description
! of the problem, including a reproducible test case and send the
  message.
  
  To see what version of CC Mode you are running, enter `\\[c-version]'.
--- 823,829 ----
  To submit a problem report, enter `\\[c-submit-bug-report]' from a
  java-mode buffer.  This automatically sets up a mail buffer with
  version information already added.  You just need to add a description
! of the problem, including a reproducible test case, and send the
  message.
  
  To see what version of CC Mode you are running, enter `\\[c-version]'.
***************
*** 929,936 ****
  (easy-menu-define c-pike-menu pike-mode-map "Pike Mode Commands"
                  (cons "Pike" (c-lang-const c-mode-menu pike)))
  
! ;;;###autoload (add-to-list 'auto-mode-alist 
'("\\.\\(pike\\|pmod\\(.in\\)?\\)\\'" . pike-mode))
! ;;;###autoload (add-to-list 'interpreter-mode-alist '(("pike" . pike-mode)))
  
  ;;;###autoload
  (defun pike-mode ()
--- 936,943 ----
  (easy-menu-define c-pike-menu pike-mode-map "Pike Mode Commands"
                  (cons "Pike" (c-lang-const c-mode-menu pike)))
  
! ;;;###autoload (add-to-list 'auto-mode-alist 
'("\\.\\(u?lpc\\|pike\\|pmod\\(.in\\)?\\)\\'" . pike-mode))
! ;;;###autoload (add-to-list 'interpreter-mode-alist '("pike" . pike-mode))
  
  ;;;###autoload
  (defun pike-mode ()
***************
*** 969,986 ****
  ;; Support for awk.  This is purposely disabled for older (X)Emacsen which
  ;; don't support syntax-table properties.
  
! (if (not (memq 'syntax-properties c-emacs-features))
!     (autoload 'awk-mode "awk-mode.el" "Major mode for editing AWK code.
! To submit a problem report, enter `\\[c-submit-bug-report]' from an
! awk-mode buffer.  This automatically sets up a mail buffer with version
! information already added.  You just need to add a description of the
! problem, including a reproducible test case and send the message.
  
! To see what version of CC Mode you are running, enter `\\[c-version]'.
  
- The hook `c-mode-common-hook' is run with no args at mode
- initialization, then `awk-mode-hook'.
- "  t)
    (defvar awk-mode-abbrev-table nil
      "Abbreviation table used in awk-mode buffers.")
    (c-define-abbrev-table 'awk-mode-abbrev-table
--- 976,994 ----
  ;; Support for awk.  This is purposely disabled for older (X)Emacsen which
  ;; don't support syntax-table properties.
  
! ;;;###autoload (add-to-list 'auto-mode-alist '("\\.awk\\'" . awk-mode))
! ;;;###autoload (add-to-list 'interpreter-mode-alist '("awk" . awk-mode))
! ;;;###autoload (add-to-list 'interpreter-mode-alist '("mawk" . awk-mode))
! ;;;###autoload (add-to-list 'interpreter-mode-alist '("nawk" . awk-mode))
! ;;;###autoload (add-to-list 'interpreter-mode-alist '("gawk" . awk-mode))
! 
! ;;; Autoload directives must be on the top level, so we construct an
! ;;; autoload form instead.
! ;;;###autoload (autoload 'awk-mode "cc-mode" "Major mode for editing AWK 
code.")
  
! (if (not (memq 'syntax-properties c-emacs-features))
!     (autoload 'awk-mode "awk-mode" "Major mode for editing AWK code."  t)
  
    (defvar awk-mode-abbrev-table nil
      "Abbreviation table used in awk-mode buffers.")
    (c-define-abbrev-table 'awk-mode-abbrev-table
***************
*** 1007,1024 ****
    (easy-menu-define c-awk-menu awk-mode-map "AWK Mode Commands"
      (cons "AWK" (c-lang-const c-mode-menu awk)))
  
- ;; In XEmacs >= 21.5 modes should add their own entries to
- ;; `auto-mode-alist' and `interpreter-mode-alist'.
- ;;;###autoload (add-to-list 'auto-mode-alist '("\\.awk\\'" . awk-mode))
- ;;;###autoload (add-to-list 'interpreter-mode-alist '(("awk" . awk-mode) 
("mawk" . awk-mode) ("nawk" . awk-mode) ("gawk" . awk-mode)))
- 
- ;;;###autoload
    (defun awk-mode ()
      "Major mode for editing AWK code.
  To submit a problem report, enter `\\[c-submit-bug-report]' from an
  awk-mode buffer.  This automatically sets up a mail buffer with version
  information already added.  You just need to add a description of the
! problem, including a reproducible test case and send the message.
  
  To see what version of CC Mode you are running, enter `\\[c-version]'.
  
--- 1015,1026 ----
    (easy-menu-define c-awk-menu awk-mode-map "AWK Mode Commands"
      (cons "AWK" (c-lang-const c-mode-menu awk)))
  
    (defun awk-mode ()
      "Major mode for editing AWK code.
  To submit a problem report, enter `\\[c-submit-bug-report]' from an
  awk-mode buffer.  This automatically sets up a mail buffer with version
  information already added.  You just need to add a description of the
! problem, including a reproducible test case, and send the message.
  
  To see what version of CC Mode you are running, enter `\\[c-version]'.
  




reply via email to

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