unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juanma Barranquero <lekktu@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Lennart Borgman <lennart.borgman@gmail.com>,
	Emacs developers <emacs-devel@gnu.org>
Subject: Re: Deprecate _emacs on Windows
Date: Sun, 13 Mar 2011 05:14:19 +0100	[thread overview]
Message-ID: <AANLkTikRSUJ3mOvKu22aEn1htA9xkA_t8zfHogvBHFLM@mail.gmail.com> (raw)
In-Reply-To: <jwvei6boejg.fsf-monnier+emacs@gnu.org>

On Sun, Mar 13, 2011 at 05:01, Stefan Monnier <monnier@iro.umontreal.ca> 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	other threads:[~2011-03-13  4:14 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-12 21:54 Deprecate _emacs on Windows Juanma Barranquero
2011-03-12 22:02 ` Lennart Borgman
2011-03-12 22:48   ` Drew Adams
2011-03-12 22:53     ` Lennart Borgman
2011-03-12 23:03       ` Drew Adams
2011-03-12 23:20         ` Lennart Borgman
2011-03-13  4:01   ` Stefan Monnier
2011-03-13  4:14     ` Juanma Barranquero [this message]
2011-03-22 20:38     ` Drew Adams
2011-03-22 20:50       ` Juanma Barranquero
2011-03-23  0:12         ` Drew Adams
2011-03-23  0:26           ` Juanma Barranquero
2011-03-23  0:58             ` Drew Adams
2011-03-23  1:34               ` Juanma Barranquero
2011-03-23  1:42                 ` Juanma Barranquero
2011-03-24 23:33                   ` Stephen J. Turnbull
2011-03-24 23:39                     ` Juanma Barranquero
2011-03-23  2:42                 ` Drew Adams
2011-03-23  3:00                   ` Juanma Barranquero
2011-03-23  3:20               ` Stephen J. Turnbull
2011-03-23  3:34                 ` Juanma Barranquero
2011-03-23  5:01                   ` Óscar Fuentes
2011-03-23 12:07                     ` Juanma Barranquero
2011-03-23 12:23                       ` Fabian Ezequiel Gallina
2011-03-23 12:30                         ` Juanma Barranquero
2011-03-23 13:36                           ` Fabian Ezequiel Gallina
2011-03-23 13:42                           ` Drew Adams
2011-03-23 14:30                             ` Juanma Barranquero
2011-03-23 17:40                             ` Stefan Monnier
2011-03-23 14:09                 ` Drew Adams
2011-03-23 16:23                   ` Stephen J. Turnbull
2011-03-13 22:49 ` Chong Yidong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTikRSUJ3mOvKu22aEn1htA9xkA_t8zfHogvBHFLM@mail.gmail.com \
    --to=lekktu@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=lennart.borgman@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).