diff options
Diffstat (limited to 'lisp/erc/erc-speedbar.el')
-rw-r--r-- | lisp/erc/erc-speedbar.el | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/lisp/erc/erc-speedbar.el b/lisp/erc/erc-speedbar.el index ead0d374b18..11979a01301 100644 --- a/lisp/erc/erc-speedbar.el +++ b/lisp/erc/erc-speedbar.el @@ -4,7 +4,7 @@ ;; Author: Mario Lang <mlang@delysid.org> ;; Contributor: Eric M. Ludlam <zappo@gnu.org> -;; Maintainer: Amin Bandali <bandali@gnu.org> +;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me> ;; URL: https://www.emacswiki.org/emacs/ErcSpeedbar ;; This file is part of GNU Emacs. @@ -31,8 +31,7 @@ ;; * Write intelligent update function: ;; update-channel, update-nick, remove-nick-from-channel, ... ;; * Use indicator-strings for op/voice -;; * Extract/convert face notes field from bbdb if available and show -;; it using sb-image.el +;; * Extract/convert face notes field from bbdb if available ;; ;;; Code: @@ -139,9 +138,7 @@ This will add a speedbar major display mode." t)))) (defun erc-speedbar-expand-server (text server indent) - (cond ((if (>= emacs-major-version 28) - (string-search "+" text) - (string-match "\\+" text)) + (cond ((string-search "+" text) (speedbar-change-expand-button-char ?-) (if (speedbar-with-writable (save-excursion @@ -150,9 +147,7 @@ This will add a speedbar major display mode." (speedbar-change-expand-button-char ?-) (speedbar-change-expand-button-char ??))) (;; we have to contract this node - (if (>= emacs-major-version 28) - (string-search "-" text) - (string-match "-" text)) + (string-search "-" text) (speedbar-change-expand-button-char ?+) (speedbar-delete-subblock indent)) (t (error "Ooops... not sure what to do"))) @@ -189,9 +184,7 @@ This will add a speedbar major display mode." "For the line matching TEXT, in CHANNEL, expand or contract a line. INDENT is the current indentation level." (cond - ((if (>= emacs-major-version 28) - (string-search "+" text) - (string-match "\\+" text)) + ((string-search "+" text) (speedbar-change-expand-button-char ?-) (speedbar-with-writable (save-excursion @@ -240,9 +233,7 @@ INDENT is the current indentation level." (speedbar-with-writable (dolist (entry names) (erc-speedbar-insert-user entry ?+ (1+ indent)))))))))) - ((if (>= emacs-major-version 28) - (string-search "-" text) - (string-match "-" text)) + ((string-search "-" text) (speedbar-change-expand-button-char ?+) (speedbar-delete-subblock indent)) (t (error "Ooops... not sure what to do"))) @@ -293,9 +284,7 @@ The update is only done when the channel is actually expanded already." (erc-speedbar-expand-channel "+" buffer 1))))) (defun erc-speedbar-expand-user (text token indent) - (cond ((if (>= emacs-major-version 28) - (string-search "+" text) - (string-match "\\+" text)) + (cond ((string-search "+" text) (speedbar-change-expand-button-char ?-) (speedbar-with-writable (save-excursion @@ -318,9 +307,7 @@ The update is only done when the channel is actually expanded already." nil nil nil nil info nil nil nil (1+ indent))))))) - ((if (>= emacs-major-version 28) - (string-search "-" text) - (string-match "-" text)) + ((string-search "-" text) (speedbar-change-expand-button-char ?+) (speedbar-delete-subblock indent)) (t (error "Ooops... not sure what to do"))) |