Commit b5bc193f authored by Miles Bader's avatar Miles Bader
Browse files

Update from erc--emacs--22

Creator:  Michael Olson <>
parent 2f057fa7
2006-08-06 Michael Olson <>
* erc.el (erc-arrange-session-in-multiple-windows): Fix bug with
multi-tty Emacs.
2006-08-05 Michael Olson <>
* erc-log.el (erc-log-standardize-name): New function that returns
a filename that is safe for use for a log file.
(erc-current-logfile): Use it.
* 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 <>
* erc.el (erc-version-string): Release ERC 5.1.4.
......@@ -71,8 +71,6 @@
;; markers.
;;; TODO:
;; * Erc needs a generalised make-safe-file-name function, so that
;; generated file names don't contain any invalid file characters.
;; * Really, we need to lock the logfiles somehow, so that if a user
;; 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
(funcall erc-enable-logging (or buffer (current-buffer)))
(defun erc-log-standardize-name (filename)
"Make FILENAME safe to use as the name of an ERC log.
This will not work with full paths, only names.
Any unsafe characters in the name are replaced with \"!\". The
filename is downcased."
(downcase (erc-replace-regexp-in-string
"[/\\]" "!" (convert-standard-filename filename))))
(defun erc-current-logfile (&optional buffer)
"Return the logfile to use for BUFFER.
If BUFFER is nil, the value of `current-buffer' is used.
This is determined by `erc-generate-log-file-name-function'.
The result is converted to lowercase, as IRC is case-insensitive"
(downcase (funcall erc-generate-log-file-name-function
(or buffer (current-buffer))
(or (erc-default-target) (buffer-name buffer))
erc-session-server erc-session-port))
(funcall erc-generate-log-file-name-function
(or buffer (current-buffer))
(or (erc-default-target) (buffer-name buffer))
erc-session-server erc-session-port))
(defun erc-generate-log-file-name-with-date (buffer &rest ignore)
......@@ -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.
......@@ -5241,13 +5242,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)))
(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'."
......@@ -5894,7 +5893,8 @@ All windows are opened in the current frame."
(setq bufs (cdr bufs))
(while bufs
(switch-to-buffer-other-window (car bufs))
(other-window 1)
(switch-to-buffer (car bufs))
(setq bufs (cdr bufs))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment