diff options
Diffstat (limited to 'lisp/erc/erc-goodies.el')
-rw-r--r-- | lisp/erc/erc-goodies.el | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/lisp/erc/erc-goodies.el b/lisp/erc/erc-goodies.el index dc443b9b615..9612b001156 100644 --- a/lisp/erc/erc-goodies.el +++ b/lisp/erc/erc-goodies.el @@ -77,15 +77,14 @@ You can control which line is recentered to by customizing the variable `erc-input-line-position'. DISPLAY-START is ignored." - (if (and window (window-live-p window)) + (if (window-live-p window) ;; Temporarily bind resize-mini-windows to nil so that users who have it ;; set to a non-nil value will not suffer from premature minibuffer ;; shrinkage due to the below recenter call. I have no idea why this ;; works, but it solves the problem, and has no negative side effects. ;; (Fran Litterio, 2003/01/07) (let ((resize-mini-windows nil)) - (save-selected-window - (select-window window) + (erc-with-selected-window window (save-restriction (widen) (when (and erc-insert-marker @@ -282,10 +281,8 @@ The value `erc-interpret-controls-p' must also be t for this to work." "Fetches the right face for background color N (0-15)." (if (stringp n) (setq n (string-to-number n))) (if (not (numberp n)) - (progn - (message "erc-get-bg-color-face: n is NaN: %S" n) - (beep) - 'default) + (prog1 'default + (erc-error "erc-get-bg-color-face: n is NaN: %S" n)) (when (> n 16) (erc-log (format " Wrong color: %s" n)) (setq n (mod n 16))) @@ -298,10 +295,8 @@ The value `erc-interpret-controls-p' must also be t for this to work." "Fetches the right face for foreground color N (0-15)." (if (stringp n) (setq n (string-to-number n))) (if (not (numberp n)) - (progn - (message "erc-get-fg-color-face: n is NaN: %S" n) - (beep) - 'default) + (prog1 'default + (erc-error "erc-get-fg-color-face: n is NaN: %S" n)) (when (> n 16) (erc-log (format " Wrong color: %s" n)) (setq n (mod n 16))) |