]> code.delx.au - gnu-emacs/commitdiff
Remove compat code from gnus-srvr, start and sum
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 13 Feb 2016 06:24:26 +0000 (17:24 +1100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 13 Feb 2016 06:24:26 +0000 (17:24 +1100)
* lisp/gnus/gnus-srvr.el (gnus-browse-foreign-server): Remove
compat code.

* lisp/gnus/gnus-start.el (gnus-check-reasonable-setup):
Remove compat code.

* lisp/gnus/gnus-sum.el (gnus-summary-display-arrow)
(gnus-summary-make-menu-bar, gnus-summary-make-tool-bar)
(gnus-recenter)
(gnus-summary-limit-strange-charsets-predicate)
(gnus-summary-show-thread): Remove compat code.

lisp/gnus/gnus-srvr.el
lisp/gnus/gnus-start.el
lisp/gnus/gnus-sum.el

index bb807da25adb3ce336399afcae2d711689966e31..35785992373c1e0290611f127f8b92980e65938f 100644 (file)
@@ -880,8 +880,7 @@ claim them."
                           (t ?K)))
                        (max 0 (- (1+ (cddr group)) (cadr group)))
                        ;; Don't decode if name is ASCII
-                       (if (and (fboundp 'detect-coding-string)
-                                (eq (detect-coding-string name t) 'undecided))
+                       (if (eq (detect-coding-string name t) 'undecided)
                            name
                          (decode-coding-string
                           name
index 18b868640cc8209e8e9245166b4efbaca5632ec8..f2965bad6d5e7dfeeb3bfda8c45a59387f8a3b16 100644 (file)
@@ -3198,26 +3198,7 @@ If this variable is nil, don't do anything."
 
 (defun gnus-check-reasonable-setup ()
   ;; Check whether nnml and nnfolder share a directory.
-  (let ((display-warn
-        (if (fboundp 'display-warning)
-            'display-warning
-          (lambda (type message)
-            (if noninteractive
-                (message "Warning (%s): %s" type message)
-              (let (window)
-                (with-current-buffer (get-buffer-create "*Warnings*")
-                  (goto-char (point-max))
-                  (unless (bolp)
-                    (insert "\n"))
-                  (insert (format "Warning (%s): %s\n" type message))
-                  (setq window (display-buffer (current-buffer)))
-                  (set-window-start
-                   window
-                   (prog2
-                       (forward-line (- 1 (window-height window)))
-                       (point)
-                     (goto-char (point-max))))))))))
-       method active actives match)
+  (let (method active actives match)
     (dolist (server gnus-server-alist)
       (setq method (gnus-server-to-method server)
            active (intern (format "%s-active-file" (car method))))
@@ -3225,11 +3206,11 @@ If this variable is nil, don't do anything."
                 (gnus-server-opened method)
                 (boundp active))
        (when (setq match (assoc (symbol-value active) actives))
-         (funcall display-warn 'gnus-server
-                  (format "%s and %s share the same active file %s"
-                          (car method)
-                          (cadr match)
-                          (car match))))
+         (display-warning 'gnus-server
+                          (format "%s and %s share the same active file %s"
+                                  (car method)
+                                  (cadr match)
+                                  (car match))))
        (push (list (symbol-value active) method) actives)))))
 
 (provide 'gnus-start)
index 688646f3e82c2d0240dae4edf304316ed7508fd8..89a5ca2af729fd97bde52850cd9cb379e9eaed07 100644 (file)
@@ -1061,9 +1061,7 @@ automatically when it is selected."
   :group 'gnus-summary
   :type 'hook)
 
-(defcustom gnus-summary-display-arrow
-  (and (fboundp 'display-graphic-p)
-       (display-graphic-p))
+(defcustom gnus-summary-display-arrow (display-graphic-p)
   "*If non-nil, display an arrow highlighting the current article."
   :version "22.1"
   :group 'gnus-summary
@@ -2442,10 +2440,7 @@ gnus-summary-show-article-from-menu-as-charset-%s" cs))))
                                       '((1 . ,cs))))
                                  (gnus-summary-show-article 1))))
                       `[,(symbol-name cs) ,command t]))
-                  (sort (if (fboundp 'coding-system-list)
-                            (coding-system-list)
-                          (mapcar 'car mm-mime-mule-charset-alist))
-                        'string<)))))
+                  (sort (coding-system-list) 'string<)))))
             ("Washing"
              ("Remove Blanks"
               ["Leading" gnus-article-strip-leading-blank-lines t]
@@ -2946,9 +2941,7 @@ When FORCE, rebuild the tool bar."
            (gmm-image-load-path-for-library "gnus"
                                             "mail/save.xpm"
                                             nil t))
-           (image-load-path (cons (car load-path)
-                                  (when (boundp 'image-load-path)
-                                    image-load-path)))
+           (image-load-path (cons (car load-path) image-load-path))
           (map (gmm-tool-bar-from-list gnus-summary-tool-bar
                                        gnus-summary-tool-bar-zap-list
                                        'gnus-summary-mode-map)))
@@ -6822,9 +6815,7 @@ Also do horizontal recentering."
   (when (and gnus-auto-center-summary
             (not (eq gnus-auto-center-summary 'vertical)))
     (gnus-horizontal-recenter))
-  (if (fboundp 'recenter-top-bottom)
-      (recenter-top-bottom n)
-    (recenter n)))
+  (recenter-top-bottom n))
 
 (put 'gnus-recenter 'isearch-scroll t)
 
@@ -8321,15 +8312,14 @@ in `nnmail-extra-headers'."
       (gnus-summary-position-point))))
 
 (defun gnus-summary-limit-strange-charsets-predicate (header)
-  (when (fboundp 'char-charset)
-    (let ((string (concat (mail-header-subject header)
-                         (mail-header-from header)))
-         charset found)
-      (dotimes (i (1- (length string)))
-       (setq charset (format "%s" (char-charset (aref string (1+ i)))))
-       (when (string-match "unicode\\|big\\|japanese" charset)
-         (setq found t)))
-      found)))
+  (let ((string (concat (mail-header-subject header)
+                       (mail-header-from header)))
+       charset found)
+    (dotimes (i (1- (length string)))
+      (setq charset (format "%s" (char-charset (aref string (1+ i)))))
+      (when (string-match "unicode\\|big\\|japanese" charset)
+       (setq found t)))
+    found))
 
 (defun gnus-summary-limit-to-predicate (predicate)
   "Limit to articles where PREDICATE returns non-nil.
@@ -11667,15 +11657,7 @@ Returns nil if no thread was there to be shown."
          (end (or (gnus-summary--inv end) (gnus-summary--inv (1- end))))
         ;; Leave point at bol
         (beg (progn (beginning-of-line) (if (bobp) (point) (1- (point)))))
-        (eoi (when end
-               (if (fboundp 'next-single-char-property-change)
-                   (next-single-char-property-change end 'invisible)
-                 (while (progn
-                          (end-of-line 2)
-                          (and (not (eobp))
-                               (eq (get-char-property (point) 'invisible)
-                                   'gnus-sum))))
-                 (point)))))
+        (eoi (and end (next-single-char-property-change end 'invisible))))
     (when eoi
       (remove-overlays beg eoi 'invisible 'gnus-sum)
       (goto-char orig)