Remove compat code in Gnus backends
* 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.
This commit is contained in:
parent
f3cdf9c23b
commit
2366c7036d
5 changed files with 10 additions and 33 deletions
|
@ -88,16 +88,6 @@
|
|||
(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))
|
||||
))
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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."
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue