emacs-devel
[Top][All Lists]
Advanced

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

Re: Deprecate _emacs on Windows


From: Juanma Barranquero
Subject: Re: Deprecate _emacs on Windows
Date: Sun, 13 Mar 2011 05:14:19 +0100

On Sun, Mar 13, 2011 at 05:01, Stefan Monnier <address@hidden> wrote:

> The patch doesn't show it to be a simplification

It's one line and a bit of reordering, because I find much clearer this

                           (cond
                             ((eq system-type 'ms-dos)
                              (concat "~" init-file-user "/_emacs"))
                             ((not (eq system-type 'windows-nt))
                              (concat "~" init-file-user "/.emacs"))
                             ;; Else deal with the Windows situation
                             ((directory-files "~" nil 
"^\\.emacs\\(\\.elc?\\)?$")
                              ;; Prefer .emacs on Windows.
                              "~/.emacs")
                             ((directory-files "~" nil "^_emacs\\(\\.elc?\\)?$")
                              ;; Also support _emacs for compatibility, but 
warn about it.
                              (warn "`_emacs' init file is deprecated, please 
use `.emacs'")
                              "~/_emacs")
                             (t ;; But default to .emacs if _emacs does not 
exist.
                              "~/.emacs"))))

rather than

                           (cond
                             ((eq system-type 'ms-dos)
                              (concat "~" init-file-user "/_emacs"))
                             ((eq system-type 'windows-nt)
                              ;; Prefer .emacs on Windows.
                              (if (directory-files "~" nil
"^\\.emacs\\(\\.elc?\\)?$")
                                  "~/.emacs"
                                ;; Also support _emacs for
compatibility, but warn about it
                                (if (directory-files "~" nil
"^_emacs\\(\\.elc?\\)?$")
                                    (progn
                                      (warn "`_emacs' init file is
deprecated, please use `.emacs'")
                                      "~/_emacs")
                                  ;; But default to .emacs if _emacs
does not exist.
                                  "~/.emacs")))
                             (t
                              (concat "~" init-file-user "/.emacs")))))

with the nested if / else if / else thingy, but I can install this
change instead if people dislikes the other.

> but I think it's a good idea.

That's great to hear.

    Juanma



reply via email to

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