diff options
| author | Richard M. Stallman | 2005-01-03 02:42:25 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-01-03 02:42:25 +0000 |
| commit | 969be0336eeddc706fef1ca758a22e48a5facf23 (patch) | |
| tree | dbca061cf38f7f2475e0243abcea9c1b8fa684e0 | |
| parent | 19996af44a96f16399730a49a38c85a274bd5981 (diff) | |
| download | emacs-969be0336eeddc706fef1ca758a22e48a5facf23.tar.gz emacs-969be0336eeddc706fef1ca758a22e48a5facf23.zip | |
(basic-save-buffer-1): Fix previous change.
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/files.el | 29 |
2 files changed, 22 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fbaa3b10e50..adf99fcfc7d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2005-01-02 Richard M. Stallman <rms@gnu.org> | 1 | 2005-01-02 Richard M. Stallman <rms@gnu.org> |
| 2 | 2 | ||
| 3 | * files.el (basic-save-buffer-1): Fix previous change. | ||
| 4 | |||
| 3 | * loadhist.el (file-loadhist-lookup): New function. | 5 | * loadhist.el (file-loadhist-lookup): New function. |
| 4 | (file-provides, file-requires): Use it. | 6 | (file-provides, file-requires): Use it. |
| 5 | 7 | ||
diff --git a/lisp/files.el b/lisp/files.el index 227bb781744..a4a102c9586 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -1856,8 +1856,14 @@ mode function to use. FUNCTION will be called, unless it is nil. | |||
| 1856 | 1856 | ||
| 1857 | If the element has the form (REGEXP FUNCTION NON-NIL), then after | 1857 | 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 | 1858 | calling FUNCTION (if it's not nil), we delete the suffix that matched |
| 1859 | REGEXP and search the list again for another match.") | 1859 | REGEXP and search the list again for another match. |
| 1860 | 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.") | ||
| 1861 | 1867 | ||
| 1862 | (defvar interpreter-mode-alist | 1868 | (defvar interpreter-mode-alist |
| 1863 | ;; Note: The entries for the modes defined in cc-mode.el (awk-mode | 1869 | ;; Note: The entries for the modes defined in cc-mode.el (awk-mode |
| @@ -1902,11 +1908,13 @@ REGEXP and search the list again for another match.") | |||
| 1902 | ("guile" . scheme-mode) | 1908 | ("guile" . scheme-mode) |
| 1903 | ("clisp" . lisp-mode))) | 1909 | ("clisp" . lisp-mode))) |
| 1904 | "Alist mapping interpreter names to major modes. | 1910 | "Alist mapping interpreter names to major modes. |
| 1905 | This alist applies to files whose first line starts with `#!'. | 1911 | This is used for files whose first lines match `auto-mode-interpreter-regexp'. |
| 1906 | Each element looks like (INTERPRETER . MODE). | 1912 | Each element looks like (INTERPRETER . MODE). |
| 1907 | The car of each element is compared with | 1913 | The car of each element is compared with |
| 1908 | the name of the interpreter specified in the first line. | 1914 | the name of the interpreter specified in the first line. |
| 1909 | If it matches, mode MODE is selected.") | 1915 | If it matches, mode MODE is selected. |
| 1916 | |||
| 1917 | See also `auto-mode-alist'.") | ||
| 1910 | 1918 | ||
| 1911 | (defvar inhibit-first-line-modes-regexps '("\\.tar\\'" "\\.tgz\\'") | 1919 | (defvar inhibit-first-line-modes-regexps '("\\.tar\\'" "\\.tgz\\'") |
| 1912 | "List of regexps; if one matches a file name, don't look for `-*-'.") | 1920 | "List of regexps; if one matches a file name, don't look for `-*-'.") |
| @@ -1935,12 +1943,14 @@ with that interpreter in `interpreter-mode-alist'.") | |||
| 1935 | (concat "\\(?:<\\?xml\\s +[^>]*>\\)?\\s *<" | 1943 | (concat "\\(?:<\\?xml\\s +[^>]*>\\)?\\s *<" |
| 1936 | comment-re "*" | 1944 | comment-re "*" |
| 1937 | "\\(?:!DOCTYPE\\s +[^>]*>\\s *<\\s *" comment-re "*\\)?" | 1945 | "\\(?:!DOCTYPE\\s +[^>]*>\\s *<\\s *" comment-re "*\\)?" |
| 1938 | "[Hh][Tt][Mm][Ll]")) . html-mode) | 1946 | "[Hh][Tt][Mm][Ll]")) |
| 1947 | . html-mode) | ||
| 1939 | ;; These two must come after html, because they are more general: | 1948 | ;; These two must come after html, because they are more general: |
| 1940 | ("<\\?xml " . xml-mode) | 1949 | ("<\\?xml " . xml-mode) |
| 1941 | (,(let* ((incomment-re "\\(?:[^-]\\|-[^-]\\)") | 1950 | (,(let* ((incomment-re "\\(?:[^-]\\|-[^-]\\)") |
| 1942 | (comment-re (concat "\\(?:!--" incomment-re "*-->\\s *<\\)"))) | 1951 | (comment-re (concat "\\(?:!--" incomment-re "*-->\\s *<\\)"))) |
| 1943 | (concat "\\s *<" comment-re "*!DOCTYPE ")) . sgml-mode) | 1952 | (concat "\\s *<" comment-re "*!DOCTYPE ")) |
| 1953 | . sgml-mode) | ||
| 1944 | ("%![^V]" . ps-mode) | 1954 | ("%![^V]" . ps-mode) |
| 1945 | ("# xmcd " . conf-unix-mode)) | 1955 | ("# xmcd " . conf-unix-mode)) |
| 1946 | "Alist of buffer beginnings vs. corresponding major mode functions. | 1956 | "Alist of buffer beginnings vs. corresponding major mode functions. |
| @@ -3264,11 +3274,12 @@ Before and after saving the buffer, this function runs | |||
| 3264 | ;; but inhibited if one of write-file-functions returns non-nil. | 3274 | ;; but inhibited if one of write-file-functions returns non-nil. |
| 3265 | ;; It returns a value (MODES . BACKUPNAME), like backup-buffer. | 3275 | ;; It returns a value (MODES . BACKUPNAME), like backup-buffer. |
| 3266 | (defun basic-save-buffer-1 () | 3276 | (defun basic-save-buffer-1 () |
| 3267 | (if save-buffer-coding-system | 3277 | (prog1 |
| 3268 | (let ((coding-system-for-write save-buffer-coding-system)) | 3278 | (if save-buffer-coding-system |
| 3279 | (let ((coding-system-for-write save-buffer-coding-system)) | ||
| 3280 | (basic-save-buffer-2)) | ||
| 3269 | (basic-save-buffer-2)) | 3281 | (basic-save-buffer-2)) |
| 3270 | (basic-save-buffer-2)) | 3282 | (setq buffer-file-coding-system-explicit last-coding-system-used))) |
| 3271 | (setq buffer-file-coding-system-explicit last-coding-system-used)) | ||
| 3272 | 3283 | ||
| 3273 | ;; This returns a value (MODES . BACKUPNAME), like backup-buffer. | 3284 | ;; This returns a value (MODES . BACKUPNAME), like backup-buffer. |
| 3274 | (defun basic-save-buffer-2 () | 3285 | (defun basic-save-buffer-2 () |