In article <[EMAIL PROTECTED]>, Miles Bader <[EMAIL PROTECTED]> writes: > I'd like to commit the following patch to the Emacs unicode branch. > It changes unicode-branch version references from "22" to "23", and renames > the unicode-branch-specific ChangeLog files to "ChangeLog.unicode" (from > "ChangeLog.22").
Thank you for taking care of this matter. But, I vaguely remember that the reason I changed ChangeLog.unicode (I was using it when I was working on it locally) to ChangeLog.22 was that if the extention of ChangeLog file is not digits, something wrong happened. I'm not sure now. Could you please commit the changes after you confirm that your or Dave's method for automatically selecting a correct ChangeLog file name still works? --- Ken'ichi HANDA [EMAIL PROTECTED] To: Kenichi Handa <[EMAIL PROTECTED]> Subject: Re: ChangeLog filenames From: Miles Bader <[EMAIL PROTECTED]> Reply-To: Miles Bader <[EMAIL PROTECTED]> System-Type: i686-pc-linux-gnu Blat: Foop Date: Thu, 08 Jul 2004 15:41:44 +0900 In-Reply-To: <[EMAIL PROTECTED]> (Kenichi Handa's message of "Thu, 8 Jul 2004 15:14:54 +0900 (JST)") > Dave suggested this; it seems better. > > (add-hook 'find-file-hooks > (lambda () > (if (and (buffer-file-name) > (string-match "emacs-unicode-2" (buffer-file-name))) > (set (make-local-variable 'change-log-default-name) > "ChangeLog.22")))) Hmmm, that looks good; I often edit one branch of emacs using an emacs executable from a different branch, so switching on the file name seems best. Based on the above, I wrote this: (defvar change-log-default-name-alist nil "Alist used to set `change-log-default-name' locally, based on the buffer filename. Each element's car is a regexp; if the regexp matches the buffer's filename, the cdr of the element is used as the value of `change-log-default-name'.") (defun change-log-set-local-default-name () "Maybe set `change-log-default-name', based `change-log-default-name-alist'." (let ((clauses change-log-default-name-alist)) (when (stringp (buffer-file-name)) (while clauses (let ((clause (pop clauses))) (when (string-match (car clause) (buffer-file-name)) (set (make-local-variable 'change-log-default-name) (cdr clause)) (setq clauses nil))))))) (add-hook 'find-file-hook 'change-log-set-local-default-name) Then I can add something like: (setq change-log-default-name-alist '(("emacs[-/]unicode[-/]" . "ChangeLog.22") ("emacs[-/]lexbind[-/]" . "ChangeLog.lexbind") ("emacs[-/]tiling[-/]" . "ChangeLog.tiling"))) [Following my personal directory-naming conventions.] Thanks, -Miles -- [|nurgle|] ddt- demonic? so quake will have an evil kinda setting? one that will make every christian in the world foamm at the mouth? [iddt] nurg, that's the goal _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel