all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Deprecate _emacs on Windows
@ 2011-03-12 21:54 Juanma Barranquero
  2011-03-12 22:02 ` Lennart Borgman
  2011-03-13 22:49 ` Chong Yidong
  0 siblings, 2 replies; 32+ messages in thread
From: Juanma Barranquero @ 2011-03-12 21:54 UTC (permalink / raw)
  To: Emacs developers

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)



^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2011-03-24 23:39 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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.