From f962e3cde2710f1514020f1ef35f214f7aa87967 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Wed, 10 Feb 2016 14:34:22 +1100 Subject: [PATCH] Drop Gnus compat functions * lisp/gnus/gnus-ems.el (gnus-mule-max-width-function): Remove. * lisp/gnus/gnus-util.el (gnus-kill-all-overlays): Move here. * lisp/gnus/gnus.el (gnus-mode-line-modified): Remove. --- lisp/gnus/gnus-ems.el | 30 ------------------------------ lisp/gnus/gnus-group.el | 5 ++--- lisp/gnus/gnus-spec.el | 2 +- lisp/gnus/gnus-util.el | 8 ++++++++ lisp/gnus/gnus.el | 2 +- 5 files changed, 12 insertions(+), 35 deletions(-) diff --git a/lisp/gnus/gnus-ems.el b/lisp/gnus/gnus-ems.el index 7c3a2cc02a1..90687e150fd 100644 --- a/lisp/gnus/gnus-ems.el +++ b/lisp/gnus/gnus-ems.el @@ -34,36 +34,6 @@ (defvar gnus-down-mouse-3 [down-mouse-3]) (defvar gnus-down-mouse-2 [down-mouse-2]) (defvar gnus-widget-button-keymap nil) -(defvar gnus-mode-line-modified - (if (featurep 'xemacs) - '("--**-" . "-----") - '("**" "--"))) - -(eval-and-compile - (autoload 'gnus-xmas-define "gnus-xmas") - (autoload 'gnus-xmas-redefine "gnus-xmas")) - -(autoload 'gnus-get-buffer-create "gnus") -(autoload 'nnheader-find-etc-directory "nnheader") -(autoload 'smiley-region "smiley") - -(defun gnus-kill-all-overlays () - "Delete all overlays in the current buffer." - (let* ((overlayss (overlay-lists)) - (buffer-read-only nil) - (overlays (delq nil (nconc (car overlayss) (cdr overlayss))))) - (while overlays - (delete-overlay (pop overlays))))) - -;;; Mule functions. - -(defun gnus-mule-max-width-function (el max-width) - `(let* ((val (eval (, el))) - (valstr (if (numberp val) - (int-to-string val) val))) - (if (> (length valstr) ,max-width) - (truncate-string-to-width valstr ,max-width) - valstr))) (provide 'gnus-ems) diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 8b81c877bda..63125ef14ee 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -633,7 +633,7 @@ simple manner.") "\M-e" gnus-group-edit-group-method "^" gnus-group-enter-server-mode gnus-mouse-2 gnus-mouse-pick-group - [follow-link] mouse-face + [follow-link] 'mouse-face "<" beginning-of-buffer ">" end-of-buffer "\C-c\C-b" gnus-bug @@ -1800,8 +1800,7 @@ already. If INFO-UNCHANGED is non-nil, dribble buffer is not updated." (mode-string (eval gformat))) ;; Say whether the dribble buffer has been modified. (setq mode-line-modified - (if modified (car gnus-mode-line-modified) - (cdr gnus-mode-line-modified))) + (if modified "**" "--")) ;; If the line is too long, we chop it off. (when (> (length mode-string) max-len) (setq mode-string (substring mode-string 0 (- max-len 4)))) diff --git a/lisp/gnus/gnus-spec.el b/lisp/gnus/gnus-spec.el index 380474d925b..8e8b5d4e240 100644 --- a/lisp/gnus/gnus-spec.el +++ b/lisp/gnus/gnus-spec.el @@ -227,7 +227,7 @@ Return a list of updated types." (defun gnus-mouse-face-function (form type) `(gnus-put-text-property (point) (progn ,@form (point)) - mouse-face + 'mouse-face ,(if (equal type 0) 'gnus-mouse-face `(quote ,(symbol-value (intern (format "gnus-mouse-face-%d" type))))))) diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 33d96bd20eb..99565a27496 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -2069,6 +2069,14 @@ lists of strings." (setq start end end nil)))))) +(defun gnus-kill-all-overlays () + "Delete all overlays in the current buffer." + (let* ((overlayss (overlay-lists)) + (buffer-read-only nil) + (overlays (delq nil (nconc (car overlayss) (cdr overlayss))))) + (while overlays + (delete-overlay (pop overlays))))) + (provide 'gnus-util) ;;; gnus-util.el ends here diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index 2690e5eb930..a9a7726c1fb 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el @@ -3448,7 +3448,7 @@ that that variable is buffer-local to the summary buffers." (defun gnus-simplify-mode-line () "Make mode lines a bit simpler." - (setq mode-line-modified (cdr gnus-mode-line-modified)) + (setq mode-line-modified "--") (when (listp mode-line-format) (make-local-variable 'mode-line-format) (setq mode-line-format (copy-sequence mode-line-format))