emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unicode branch version updates


From: Kenichi Handa
Subject: Re: Unicode branch version updates
Date: Mon, 14 Feb 2005 11:26:33 +0900 (JST)
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.3.50 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI)

In article <address@hidden>, Miles Bader <address@hidden> 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
address@hidden

To: Kenichi Handa <address@hidden>
Subject: Re: ChangeLog filenames
From: Miles Bader <address@hidden>
Reply-To: Miles Bader <address@hidden>
System-Type: i686-pc-linux-gnu
Blat: Foop
Date: Thu, 08 Jul 2004 15:41:44 +0900
In-Reply-To: <address@hidden> (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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]