GNU bug report logs - #12989
24.3.50; buffer-file-type is not buffer-local

Previous Next

Package: emacs;

Reported by: Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>

Date: Sun, 25 Nov 2012 04:01:02 UTC

Severity: normal

Found in version 24.3.50

Fixed in version 24.4

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; buffer-file-type is not buffer-local
Date: Sun, 25 Nov 2012 12:58:01 +0900
When I evaluate below code, Emacs-23 and trunk on Windows return the
different results.

(list
 (setq buffer-file-type nil)
 (progn
   (let ((coding-system-for-read 'no-conversion))
     ;; Specify non-existing file.
     (kill-buffer (find-file-noselect "c:/zzzzzzz")))
   buffer-file-type))

-> (nil nil) (Emacs 23)
-> (nil t) (trunk)

And, if buffer-file-type is set to t, many file coding system
detections fail.  Docstring says that buffer-file-type autmatically
becomes buffer-local, but that is not true on trunk.

> buffer-file-type is a variable defined in `subr.el'.
> Its value is nil
> 
> Documentation:
> Non-nil if the visited file is a binary file.
> This variable is meaningful on MS-DOG and Windows NT.
> On those systems, it is automatically local in every buffer.
> On other systems, this variable is normally always nil.


Additionally, there is typo in docsstring of buffer-file-type.

> This variable is meaningful on MS-DOG and Windows NT.
                                 ~~~~~~

-- 
Kazuhiro Ito




This bug report was last modified 12 years and 149 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.