aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2006-08-07 07:43:25 +0000
committerMiles Bader2006-08-07 07:43:25 +0000
commitb5bc193f309eadf04e02e5b1c9596fb07a456baf (patch)
treefadca838d7187a2617b73c7a78c6fc2657f58caa
parent2f057fa7c1f20a1206b234cbfd30be5ce5917468 (diff)
downloademacs-b5bc193f309eadf04e02e5b1c9596fb07a456baf.tar.gz
emacs-b5bc193f309eadf04e02e5b1c9596fb07a456baf.zip
Update from erc--emacs--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-386 Creator: Michael Olson <mwolson@gnu.org>
-rw-r--r--lisp/erc/ChangeLog17
-rw-r--r--lisp/erc/erc-log.el22
-rw-r--r--lisp/erc/erc.el18
3 files changed, 41 insertions, 16 deletions
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog
index 0129bd43976..cd5b825b71e 100644
--- a/lisp/erc/ChangeLog
+++ b/lisp/erc/ChangeLog
@@ -1,3 +1,20 @@
12006-08-06 Michael Olson <mwolson@gnu.org>
2
3 * erc.el (erc-arrange-session-in-multiple-windows): Fix bug with
4 multi-tty Emacs.
5
62006-08-05 Michael Olson <mwolson@gnu.org>
7
8 * erc-log.el (erc-log-standardize-name): New function that returns
9 a filename that is safe for use for a log file.
10 (erc-current-logfile): Use it.
11
12 * erc.el (erc-startup-file-list): Search in ~/.emacs.d first,
13 since that is a fairly standard directory.
14 (erc-select-startup-file): Re-write to use
15 convert-standard-filename, which will ensure that MS-DOS systems
16 look for the _ercrc.el file.
17
12006-08-02 Michael Olson <mwolson@gnu.org> 182006-08-02 Michael Olson <mwolson@gnu.org>
2 19
3 * erc.el (erc-version-string): Release ERC 5.1.4. 20 * erc.el (erc-version-string): Release ERC 5.1.4.
diff --git a/lisp/erc/erc-log.el b/lisp/erc/erc-log.el
index 418e45060bd..2fe29e82fe5 100644
--- a/lisp/erc/erc-log.el
+++ b/lisp/erc/erc-log.el
@@ -71,8 +71,6 @@
71;; markers. 71;; markers.
72 72
73;;; TODO: 73;;; TODO:
74;; * Erc needs a generalised make-safe-file-name function, so that
75;; generated file names don't contain any invalid file characters.
76;; 74;;
77;; * Really, we need to lock the logfiles somehow, so that if a user 75;; * Really, we need to lock the logfiles somehow, so that if a user
78;; is running multiple emacsen and/or on the same channel as more 76;; is running multiple emacsen and/or on the same channel as more
@@ -293,17 +291,27 @@ is writeable (it will be created as necessary) and
293 (funcall erc-enable-logging (or buffer (current-buffer))) 291 (funcall erc-enable-logging (or buffer (current-buffer)))
294 erc-enable-logging))) 292 erc-enable-logging)))
295 293
294(defun erc-log-standardize-name (filename)
295 "Make FILENAME safe to use as the name of an ERC log.
296This will not work with full paths, only names.
297
298Any unsafe characters in the name are replaced with \"!\". The
299filename is downcased."
300 (downcase (erc-replace-regexp-in-string
301 "[/\\]" "!" (convert-standard-filename filename))))
302
296(defun erc-current-logfile (&optional buffer) 303(defun erc-current-logfile (&optional buffer)
297 "Return the logfile to use for BUFFER. 304 "Return the logfile to use for BUFFER.
298If BUFFER is nil, the value of `current-buffer' is used. 305If BUFFER is nil, the value of `current-buffer' is used.
299This is determined by `erc-generate-log-file-name-function'. 306This is determined by `erc-generate-log-file-name-function'.
300The result is converted to lowercase, as IRC is case-insensitive" 307The result is converted to lowercase, as IRC is case-insensitive"
301 (expand-file-name 308 (expand-file-name
302 (downcase (funcall erc-generate-log-file-name-function 309 (erc-log-standardize-name
303 (or buffer (current-buffer)) 310 (funcall erc-generate-log-file-name-function
304 (or (erc-default-target) (buffer-name buffer)) 311 (or buffer (current-buffer))
305 (erc-current-nick) 312 (or (erc-default-target) (buffer-name buffer))
306 erc-session-server erc-session-port)) 313 (erc-current-nick)
314 erc-session-server erc-session-port))
307 erc-log-channels-directory)) 315 erc-log-channels-directory))
308 316
309(defun erc-generate-log-file-name-with-date (buffer &rest ignore) 317(defun erc-generate-log-file-name-with-date (buffer &rest ignore)
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 4317b831d56..bd31ee3d3b7 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -822,7 +822,8 @@ See `erc-server-flood-margin' for other flood-related parameters.")
822;; Script parameters 822;; Script parameters
823 823
824(defcustom erc-startup-file-list 824(defcustom erc-startup-file-list
825 '("~/.ercrc.el" "~/.ercrc" ".ercrc.el" ".ercrc") 825 '("~/.emacs.d/.ercrc.el" "~/.emacs.d/.ercrc"
826 "~/.ercrc.el" "~/.ercrc" ".ercrc.el" ".ercrc")
826 "List of files to try for a startup script. 827 "List of files to try for a startup script.
827The first existent and readable one will get executed. 828The first existent and readable one will get executed.
828 829
@@ -5241,13 +5242,11 @@ If FILE is found, return the path to it."
5241(defun erc-select-startup-file () 5242(defun erc-select-startup-file ()
5242 "Select an ERC startup file. 5243 "Select an ERC startup file.
5243See also `erc-startup-file-list'." 5244See also `erc-startup-file-list'."
5244 (let ((l erc-startup-file-list) 5245 (catch 'found
5245 (f nil)) 5246 (dolist (f erc-startup-file-list)
5246 (while (and (not f) l) 5247 (setq f (convert-standard-file-name f))
5247 (if (file-readable-p (car l)) 5248 (when (file-readable-p f)
5248 (setq f (car l))) 5249 (throw 'found f)))))
5249 (setq l (cdr l)))
5250 f))
5251 5250
5252(defun erc-find-script-file (file) 5251(defun erc-find-script-file (file)
5253 "Search for FILE in `default-directory', and any in `erc-script-path'." 5252 "Search for FILE in `default-directory', and any in `erc-script-path'."
@@ -5894,7 +5893,8 @@ All windows are opened in the current frame."
5894 (setq bufs (cdr bufs)) 5893 (setq bufs (cdr bufs))
5895 (while bufs 5894 (while bufs
5896 (split-window) 5895 (split-window)
5897 (switch-to-buffer-other-window (car bufs)) 5896 (other-window 1)
5897 (switch-to-buffer (car bufs))
5898 (setq bufs (cdr bufs)) 5898 (setq bufs (cdr bufs))
5899 (balance-windows))))) 5899 (balance-windows)))))
5900 5900