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.
This commit is contained in:
parent
502071919d
commit
33a488e4e6
3 changed files with 14 additions and 6 deletions
|
|
@ -1,3 +1,10 @@
|
||||||
|
2012-11-26 Eli Zaretskii <eliz@gnu.org>
|
||||||
|
|
||||||
|
* subr.el (buffer-file-type): Declare with defvar-local. Doc fix.
|
||||||
|
|
||||||
|
* dos-w32.el (find-file-not-found-set-buffer-file-coding-system):
|
||||||
|
Don't set buffer-file-type. (Bug#12989)
|
||||||
|
|
||||||
2012-11-26 Glenn Morris <rgm@gnu.org>
|
2012-11-26 Glenn Morris <rgm@gnu.org>
|
||||||
|
|
||||||
* hippie-exp.el (hippie-expand-try-functions-list):
|
* hippie-exp.el (hippie-expand-try-functions-list):
|
||||||
|
|
|
||||||
|
|
@ -210,7 +210,7 @@ set to the appropriate coding system, and the value of
|
||||||
(untranslated-file-p (buffer-file-name))))
|
(untranslated-file-p (buffer-file-name))))
|
||||||
(setq coding (coding-system-change-eol-conversion coding 0))
|
(setq coding (coding-system-change-eol-conversion coding 0))
|
||||||
(setq buffer-file-coding-system coding))
|
(setq buffer-file-coding-system coding))
|
||||||
(setq buffer-file-type (eq buffer-file-coding-system 'no-conversion)))))
|
nil)))
|
||||||
|
|
||||||
;;; To set the default coding system on new files.
|
;;; To set the default coding system on new files.
|
||||||
(add-hook 'find-file-not-found-functions
|
(add-hook 'find-file-not-found-functions
|
||||||
|
|
|
||||||
11
lisp/subr.el
11
lisp/subr.el
|
|
@ -2632,13 +2632,14 @@ When the hook runs, the temporary buffer is current.
|
||||||
This hook is normally set up with a function to put the buffer in Help
|
This hook is normally set up with a function to put the buffer in Help
|
||||||
mode.")
|
mode.")
|
||||||
|
|
||||||
;; Avoid compiler warnings about this variable,
|
(defvar-local buffer-file-type nil
|
||||||
;; which has a special meaning on certain system types.
|
|
||||||
(defvar buffer-file-type nil
|
|
||||||
"Non-nil if the visited file is a binary file.
|
"Non-nil if the visited file is a binary file.
|
||||||
This variable is meaningful on MS-DOG and Windows NT.
|
This variable is meaningful on MS-DOG and MS-Windows.
|
||||||
On those systems, it is automatically local in every buffer.
|
On those systems, it is automatically local in every buffer.
|
||||||
On other systems, this variable is normally always nil.")
|
On other systems, this variable is normally always nil.
|
||||||
|
|
||||||
|
WARNING: This variable is obsolete and will disapper Real Soon Now.
|
||||||
|
Don't use it!")
|
||||||
|
|
||||||
;; The `assert' macro from the cl package signals
|
;; The `assert' macro from the cl package signals
|
||||||
;; `cl-assertion-failed' at runtime so always define it.
|
;; `cl-assertion-failed' at runtime so always define it.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue