]> code.delx.au - gnu-emacs/commitdiff
Remove compat code in Gnus backends
authorLars Ingebrigtsen <larsi@gnus.org>
Sun, 14 Feb 2016 03:50:03 +0000 (14:50 +1100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 14 Feb 2016 03:50:03 +0000 (14:50 +1100)
* lisp/gnus/nndiary.el (nndiary-error): Remove.

* lisp/gnus/nndraft.el (nndraft-request-associate-buffer): Ditto.

* lisp/gnus/nnfolder.el (nnfolder-read-folder): Ditto.

* lisp/gnus/nnheader.el (nnheader-find-file-noselect): Ditto.

* lisp/gnus/nnimap.el (nnimap-log-buffer): Remove compat code.

lisp/gnus/nndiary.el
lisp/gnus/nndraft.el
lisp/gnus/nnfolder.el
lisp/gnus/nnheader.el
lisp/gnus/nnimap.el

index 9245396149a3d25a1ef6835b6cf6cf5e1a8a5594..71229dd9394da70599844d7fae0c5b0f09c3c1c8 100644 (file)
 (require 'gnus-start)
 (require 'gnus-sum)
 
-;; Compatibility Functions  =================================================
-
-(eval-and-compile
-  (if (fboundp 'signal-error)
-      (defun nndiary-error (&rest args)
-       (apply #'signal-error 'nndiary args))
-    (defun nndiary-error (&rest args)
-      (apply #'error args))))
-
-
 ;; Back End behavior customization ===========================================
 
 (defgroup nndiary nil
@@ -1157,12 +1147,12 @@ all.  This may very well take some time.")
   ;; within the specified bounds.
   ;; Signals are caught by `nndiary-schedule'.
   (if (not (string-match "^[ \t]*[0-9]+[ \t]*$" str))
-      (nndiary-error "not an integer value")
+      (error "Not an integer value")
     ;; else
     (let ((val (string-to-number str)))
       (and (or (< val min)
               (and max (> val max)))
-          (nndiary-error "value out of range"))
+          (error "Value out of range"))
       val)))
 
 (defun nndiary-parse-schedule-value (str min-or-values max)
@@ -1179,7 +1169,7 @@ all.  This may very well take some time.")
                        (match-string 1 str))))
          (if (and val (setq val (assoc val min-or-values)))
              (list (cadr val))
-           (nndiary-error "invalid syntax")))
+           (error "Invalid syntax")))
       ;; min-or-values is min
       (mapcar
        (lambda (val)
@@ -1199,7 +1189,7 @@ all.  This may very well take some time.")
                     (t
                      (cons end beg)))))
            (t
-            (nndiary-error "invalid syntax")))
+            (error "Invalid syntax")))
           ))
        (split-string str ",")))
     ))
@@ -1214,7 +1204,7 @@ all.  This may very well take some time.")
   (let ((header (format "^X-Diary-%s: \\(.*\\)$" head)))
     (goto-char (point-min))
     (if (not (re-search-forward header nil t))
-       (nndiary-error "header missing")
+       (error "Header missing")
       ;; else
       (nndiary-parse-schedule-value (match-string 1) min-or-values max))
     ))
index f6c62c8a1521acb5704df8e896067916cf0ce419..f10b6fa3df8d4e0b4f5086c7920dc03b8608f2cd 100644 (file)
@@ -203,10 +203,7 @@ are generated if and only if they are also in `message-draft-headers'.")
     (setq buffer-file-name (expand-file-name file)
          buffer-auto-save-file-name (make-auto-save-file-name))
     (clear-visited-file-modtime)
-    (let ((hook (if (boundp 'write-contents-functions)
-                   'write-contents-functions
-                 'write-contents-hooks)))
-      (add-hook hook 'nndraft-generate-headers nil t))
+    (add-hook 'write-contents-functions 'nndraft-generate-headers nil t)
     (add-hook 'after-save-hook 'nndraft-update-unread-articles nil t)
     (message-add-action '(nndraft-update-unread-articles)
                        'exit 'postpone 'kill)
index ff0205574944d76468db17d25b4a7817c6437f7f..402ffba8c6e29310525aff9c657cc4e8c680f25d 100644 (file)
@@ -884,9 +884,7 @@ deleted.  Point is left where the deleted region was."
              (active (or (cadr (assoc group nnfolder-group-alist))
                          (cons 1 0)))
              (scantime (assoc group nnfolder-scantime-alist))
-             (minid (or (and (boundp 'most-positive-fixnum)
-                             most-positive-fixnum)
-                        (lsh -1 -1)))
+             (minid most-positive-fixnum)
              maxid start end newscantime
              novbuf articles newnum
              buffer-read-only)
index 42dfcb300067c3548b8129b5e939f62262c9ae0f..9f4d1b9334c25652631a640dfd4434c98d8957d2 100644 (file)
@@ -980,14 +980,8 @@ See `find-file-noselect' for the arguments."
           (enable-local-eval nil)
           (coding-system-for-read nnheader-file-coding-system)
           (version-control 'never)
-          (ffh (if (boundp 'find-file-hook)
-                   'find-file-hook
-                 'find-file-hooks))
-          (val (symbol-value ffh)))
-    (set ffh nil)
-    (unwind-protect
-       (apply 'find-file-noselect args)
-      (set ffh val))))
+         (find-file-hook nil))
+    (apply 'find-file-noselect args)))
 
 (defun nnheader-directory-regular-files (dir)
   "Return a list of all regular files in DIR."
index a53d6cd11c0fe161c1eb7718bf171ffe6dc7bb5e..0e8fb6690828404809f4c1b3a08c43d6e0596072 100644 (file)
@@ -1885,9 +1885,7 @@ Return the server's response to the SELECT or EXAMINE command."
   (let ((name "*imap log*"))
     (or (get-buffer name)
         (with-current-buffer (get-buffer-create name)
-          (when (boundp 'window-point-insertion-type)
-            (make-local-variable 'window-point-insertion-type)
-            (setq window-point-insertion-type t))
+         (setq-local window-point-insertion-type t)
           (current-buffer)))))
 
 (defun nnimap-log-command (command)