/[emacs]/emacs/lisp/files.el
ViewVC logotype

Diff of /emacs/lisp/files.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.740 by monnier, Sun Jan 2 18:08:12 2005 UTC revision 1.741 by rms, Mon Jan 3 02:40:56 2005 UTC
# Line 1856  mode function to use.  FUNCTION will be Line 1856  mode function to use.  FUNCTION will be
1856    
1857  If the element has the form (REGEXP FUNCTION NON-NIL), then after  If the element has the form (REGEXP FUNCTION NON-NIL), then after
1858  calling FUNCTION (if it's not nil), we delete the suffix that matched  calling FUNCTION (if it's not nil), we delete the suffix that matched
1859  REGEXP and search the list again for another match.")  REGEXP and search the list again for another match.
1860    
1861    If the file name matches `inhibit-first-line-modes-regexps',
1862    then `auto-mode-alist' is not processed.
1863    
1864    See also `interpreter-mode-alist', which detects executable script modes
1865    based on the interpreters they specify to run,
1866    and `magic-mode-alist', which determines modes based on file contents.")
1867    
1868  (defvar interpreter-mode-alist  (defvar interpreter-mode-alist
1869    ;; Note: The entries for the modes defined in cc-mode.el (awk-mode    ;; Note: The entries for the modes defined in cc-mode.el (awk-mode
# Line 1902  REGEXP and search the list again for ano Line 1908  REGEXP and search the list again for ano
1908       ("guile" . scheme-mode)       ("guile" . scheme-mode)
1909       ("clisp" . lisp-mode)))       ("clisp" . lisp-mode)))
1910    "Alist mapping interpreter names to major modes.    "Alist mapping interpreter names to major modes.
1911  This alist applies to files whose first line starts with `#!'.  This is used for files whose first lines match `auto-mode-interpreter-regexp'.
1912  Each element looks like (INTERPRETER . MODE).  Each element looks like (INTERPRETER . MODE).
1913  The car of each element is compared with  The car of each element is compared with
1914  the name of the interpreter specified in the first line.  the name of the interpreter specified in the first line.
1915  If it matches, mode MODE is selected.")  If it matches, mode MODE is selected.
1916    
1917    See also `auto-mode-alist'.")
1918    
1919  (defvar inhibit-first-line-modes-regexps '("\\.tar\\'" "\\.tgz\\'")  (defvar inhibit-first-line-modes-regexps '("\\.tar\\'" "\\.tgz\\'")
1920    "List of regexps; if one matches a file name, don't look for `-*-'.")    "List of regexps; if one matches a file name, don't look for `-*-'.")
# Line 1935  with that interpreter in `interpreter-mo Line 1943  with that interpreter in `interpreter-mo
1943          (concat "\\(?:<\\?xml\\s +[^>]*>\\)?\\s *<"          (concat "\\(?:<\\?xml\\s +[^>]*>\\)?\\s *<"
1944                  comment-re "*"                  comment-re "*"
1945                  "\\(?:!DOCTYPE\\s +[^>]*>\\s *<\\s *" comment-re "*\\)?"                  "\\(?:!DOCTYPE\\s +[^>]*>\\s *<\\s *" comment-re "*\\)?"
1946                  "[Hh][Tt][Mm][Ll]")) . html-mode)                  "[Hh][Tt][Mm][Ll]"))
1947         . html-mode)
1948      ;; These two must come after html, because they are more general:      ;; These two must come after html, because they are more general:
1949      ("<\\?xml " . xml-mode)      ("<\\?xml " . xml-mode)
1950      (,(let* ((incomment-re "\\(?:[^-]\\|-[^-]\\)")      (,(let* ((incomment-re "\\(?:[^-]\\|-[^-]\\)")
1951               (comment-re (concat "\\(?:!--" incomment-re "*-->\\s *<\\)")))               (comment-re (concat "\\(?:!--" incomment-re "*-->\\s *<\\)")))
1952          (concat "\\s *<" comment-re "*!DOCTYPE ")) . sgml-mode)          (concat "\\s *<" comment-re "*!DOCTYPE "))
1953         . sgml-mode)
1954      ("%![^V]" . ps-mode)      ("%![^V]" . ps-mode)
1955      ("# xmcd " . conf-unix-mode))      ("# xmcd " . conf-unix-mode))
1956    "Alist of buffer beginnings vs. corresponding major mode functions.    "Alist of buffer beginnings vs. corresponding major mode functions.
# Line 3264  Before and after saving the buffer, this Line 3274  Before and after saving the buffer, this
3274  ;; but inhibited if one of write-file-functions returns non-nil.  ;; but inhibited if one of write-file-functions returns non-nil.
3275  ;; It returns a value (MODES . BACKUPNAME), like backup-buffer.  ;; It returns a value (MODES . BACKUPNAME), like backup-buffer.
3276  (defun basic-save-buffer-1 ()  (defun basic-save-buffer-1 ()
3277    (if save-buffer-coding-system    (prog1
3278        (let ((coding-system-for-write save-buffer-coding-system))        (if save-buffer-coding-system
3279              (let ((coding-system-for-write save-buffer-coding-system))
3280                (basic-save-buffer-2))
3281          (basic-save-buffer-2))          (basic-save-buffer-2))
3282      (basic-save-buffer-2))      (setq buffer-file-coding-system-explicit last-coding-system-used)))
   (setq buffer-file-coding-system-explicit last-coding-system-used))  
3283    
3284  ;; This returns a value (MODES . BACKUPNAME), like backup-buffer.  ;; This returns a value (MODES . BACKUPNAME), like backup-buffer.
3285  (defun basic-save-buffer-2 ()  (defun basic-save-buffer-2 ()

Legend:
Removed from v.1.740  
changed lines
  Added in v.1.741

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26