diff options
| author | Eli Zaretskii | 2012-11-26 19:09:04 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2012-11-26 19:09:04 +0200 |
| commit | 33a488e4e6869d24d2b3d518d012f9218be6c76c (patch) | |
| tree | 93f6e5300f451472eee0a831e627ae54c47edf61 | |
| parent | 502071919d6b29e90123ec4adc73f26b31bc1b14 (diff) | |
| download | emacs-33a488e4e6869d24d2b3d518d012f9218be6c76c.tar.gz emacs-33a488e4e6869d24d2b3d518d012f9218be6c76c.zip | |
Partial fix for bug #12989 with buffer-file-type annoyances.
lisp/subr.el (buffer-file-type): Declare with defvar-local. Doc fix.
lisp/dos-w32.el (find-file-not-found-set-buffer-file-coding-system):
Don't set buffer-file-type. Return nil.
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/dos-w32.el | 2 | ||||
| -rw-r--r-- | lisp/subr.el | 11 |
3 files changed, 14 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 54997776eff..e264746c691 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2012-11-26 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * subr.el (buffer-file-type): Declare with defvar-local. Doc fix. | ||
| 4 | |||
| 5 | * dos-w32.el (find-file-not-found-set-buffer-file-coding-system): | ||
| 6 | Don't set buffer-file-type. (Bug#12989) | ||
| 7 | |||
| 1 | 2012-11-26 Glenn Morris <rgm@gnu.org> | 8 | 2012-11-26 Glenn Morris <rgm@gnu.org> |
| 2 | 9 | ||
| 3 | * hippie-exp.el (hippie-expand-try-functions-list): | 10 | * hippie-exp.el (hippie-expand-try-functions-list): |
diff --git a/lisp/dos-w32.el b/lisp/dos-w32.el index 4839d6b9239..cb043ce8559 100644 --- a/lisp/dos-w32.el +++ b/lisp/dos-w32.el | |||
| @@ -210,7 +210,7 @@ set to the appropriate coding system, and the value of | |||
| 210 | (untranslated-file-p (buffer-file-name)))) | 210 | (untranslated-file-p (buffer-file-name)))) |
| 211 | (setq coding (coding-system-change-eol-conversion coding 0)) | 211 | (setq coding (coding-system-change-eol-conversion coding 0)) |
| 212 | (setq buffer-file-coding-system coding)) | 212 | (setq buffer-file-coding-system coding)) |
| 213 | (setq buffer-file-type (eq buffer-file-coding-system 'no-conversion))))) | 213 | nil))) |
| 214 | 214 | ||
| 215 | ;;; To set the default coding system on new files. | 215 | ;;; To set the default coding system on new files. |
| 216 | (add-hook 'find-file-not-found-functions | 216 | (add-hook 'find-file-not-found-functions |
diff --git a/lisp/subr.el b/lisp/subr.el index 2088c7887b3..aeaab20bd47 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -2632,13 +2632,14 @@ When the hook runs, the temporary buffer is current. | |||
| 2632 | This hook is normally set up with a function to put the buffer in Help | 2632 | This hook is normally set up with a function to put the buffer in Help |
| 2633 | mode.") | 2633 | mode.") |
| 2634 | 2634 | ||
| 2635 | ;; Avoid compiler warnings about this variable, | 2635 | (defvar-local buffer-file-type nil |
| 2636 | ;; which has a special meaning on certain system types. | ||
| 2637 | (defvar buffer-file-type nil | ||
| 2638 | "Non-nil if the visited file is a binary file. | 2636 | "Non-nil if the visited file is a binary file. |
| 2639 | This variable is meaningful on MS-DOG and Windows NT. | 2637 | This variable is meaningful on MS-DOG and MS-Windows. |
| 2640 | On those systems, it is automatically local in every buffer. | 2638 | On those systems, it is automatically local in every buffer. |
| 2641 | On other systems, this variable is normally always nil.") | 2639 | On other systems, this variable is normally always nil. |
| 2640 | |||
| 2641 | WARNING: This variable is obsolete and will disapper Real Soon Now. | ||
| 2642 | Don't use it!") | ||
| 2642 | 2643 | ||
| 2643 | ;; The `assert' macro from the cl package signals | 2644 | ;; The `assert' macro from the cl package signals |
| 2644 | ;; `cl-assertion-failed' at runtime so always define it. | 2645 | ;; `cl-assertion-failed' at runtime so always define it. |