[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Deprecate _emacs on Windows
From: |
Juanma Barranquero |
Subject: |
Deprecate _emacs on Windows |
Date: |
Sat, 12 Mar 2011 22:54:38 +0100 |
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)