[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Erc-commit] [commit][emacs22] Search in ~/.emacs.d/ first for .ercrc.el
From: |
mwolson |
Subject: |
[Erc-commit] [commit][emacs22] Search in ~/.emacs.d/ first for .ercrc.el and handle MS-DOS names. |
Date: |
Sun, 14 Oct 2007 00:48:22 -0400 |
commit 0c41be753141b033de8f4343eeeb0e4a6eed0c42
Author: Michael Olson <address@hidden>
Date: Sat Aug 5 23:37:47 2006 +0000
Search in ~/.emacs.d/ first for .ercrc.el and handle MS-DOS names.
* erc.el (erc-startup-file-list): Search in ~/.emacs.d first, since that
is a fairly standard directory.
(erc-select-startup-file): Re-write to use convert-standard-filename,
which will ensure that MS-DOS systems look for the _ercrc.el file.
git-archimport-id: address@hidden/erc--main--0--patch-30
diff --git a/ChangeLog b/ChangeLog
index fb704aa..67d944d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-08-05 Michael Olson <address@hidden>
+
+ * erc.el (erc-startup-file-list): Search in ~/.emacs.d first,
+ since that is a fairly standard directory.
+ (erc-select-startup-file): Re-write to use
+ convert-standard-filename, which will ensure that MS-DOS systems
+ look for the _ercrc.el file.
+
2006-08-02 Michael Olson <address@hidden>
* erc.el (erc-version-string): Release ERC 5.1.4.
diff --git a/erc.el b/erc.el
index fd9ca09..4d28ce5 100644
--- a/erc.el
+++ b/erc.el
@@ -822,7 +822,8 @@ See `erc-server-flood-margin' for other flood-related
parameters.")
;; Script parameters
(defcustom erc-startup-file-list
- '("~/.ercrc.el" "~/.ercrc" ".ercrc.el" ".ercrc")
+ '("~/.emacs.d/.ercrc.el" "~/.emacs.d/.ercrc"
+ "~/.ercrc.el" "~/.ercrc" ".ercrc.el" ".ercrc")
"List of files to try for a startup script.
The first existent and readable one will get executed.
@@ -5247,13 +5248,11 @@ If FILE is found, return the path to it."
(defun erc-select-startup-file ()
"Select an ERC startup file.
See also `erc-startup-file-list'."
- (let ((l erc-startup-file-list)
- (f nil))
- (while (and (not f) l)
- (if (file-readable-p (car l))
- (setq f (car l)))
- (setq l (cdr l)))
- f))
+ (catch 'found
+ (dolist (f erc-startup-file-list)
+ (setq f (convert-standard-file-name f))
+ (when (file-readable-p f)
+ (throw 'found f)))))
(defun erc-find-script-file (file)
"Search for FILE in `default-directory', and any in `erc-script-path'."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Erc-commit] [commit][emacs22] Search in ~/.emacs.d/ first for .ercrc.el and handle MS-DOS names.,
mwolson <=