[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] lisp/files.el and lisp/buf-menu.el
From: |
Stefan Monnier |
Subject: |
Re: [PATCH] lisp/files.el and lisp/buf-menu.el |
Date: |
Fri, 17 Jul 2009 11:46:41 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux) |
> I did initially solve this problem with
> (let ((buffer-file-name yaddayadda)) (normal-mode))
> I wasn't happy with that because I assume
> that the binding of buffer-file-name should
> be one of: nil, a local file, a remote file.
> I don't know what code distributed with
> Emacs or what third party Emacs code would
> break under other conditions. That is
> why my patch adds buffer-automode-file-name.
As shown in the code I sent a few days ago, PCL-CVS does use such
a let-binding (and uses after-find-file rather than normal-mode), so
I wouldn't worry too much about it.
> LIST-BUFFERS-DESCRIPTION differs from ...-DIRECTORY
> by being better named (so people won't
> assume it necessarily refers to a "directory")
> and with a doc string. I don't know
> to what extent third party code assumes that
> LIST-BUFFERS-DIRECTORY is, well, a directory
> and so I didn't want to overload it.
So the better thing to do would be to suggest renaming
list-buffers-directory to list-buffers-description and adding
a docstring.
> I'm not clear on what you suggest I do about
> coding systems.
I'm just pointing out you may want to reuse more of the code used to
open files, so it also obeys things like the -*- coding -*- tags as well
as file-coding-system-alist.
Stefan