all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juanma Barranquero <lekktu@gmail.com>
To: Emacs developers <emacs-devel@gnu.org>
Subject: Deprecate _emacs on Windows
Date: Sat, 12 Mar 2011 22:54:38 +0100	[thread overview]
Message-ID: <AANLkTinQzBk6z61jTOjSF5K+rCdn1H3E4PqrD+ddseLL@mail.gmail.com> (raw)

As part of the discussion of bug#8220, I'd like to propose to add

  (warn "`_emacs' init file is deprecated, please use `.emacs'")

at the appropriate place in `command-line', as a first past to
eventually make _emacs obsolete and remove its support (on Windows, of
course, not MS-DOS).

Opinions?

    Juanma



(The patch also changes  cond + if/elsif/else into a simple cond,
which seems clearer).


=== modified file 'lisp/startup.el'
--- lisp/startup.el	2011-01-25 04:08:28 +0000
+++ lisp/startup.el	2011-03-12 21:39:52 +0000
@@ -1008,17 +1008,18 @@
 			   (cond
 			    ((eq system-type 'ms-dos)
 			     (concat "~" init-file-user "/_emacs"))
-			    ((eq system-type 'windows-nt)
+			     ((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.
-			     (if (directory-files "~" nil "^\\.emacs\\(\\.elc?\\)?$")
-				 "~/.emacs"
-			       ;; Also support _emacs for compatibility.
-			       (if (directory-files "~" nil "^_emacs\\(\\.elc?\\)?$")
-				   "~/_emacs"
-				 ;; But default to .emacs if _emacs does not exist.
-				 "~/.emacs")))
-			    (t
-			     (concat "~" init-file-user "/.emacs")))))
+			      "~/.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"))))
 		      ;; This tells `load' to store the file name found
 		      ;; into user-init-file.
 		      (setq user-init-file t)



             reply	other threads:[~2011-03-12 21:54 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-12 21:54 Juanma Barranquero [this message]
2011-03-12 22:02 ` Deprecate _emacs on Windows 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
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

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

  git send-email \
    --in-reply-to=AANLkTinQzBk6z61jTOjSF5K+rCdn1H3E4PqrD+ddseLL@mail.gmail.com \
    --to=lekktu@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.