[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 2366c70 05/12: Remove compat code in Gnus backends
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master 2366c70 05/12: Remove compat code in Gnus backends |
Date: |
Sun, 14 Feb 2016 04:17:38 +0000 |
branch: master
commit 2366c7036d0e784592904e94c1c5bfac37760659
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
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.
---
lisp/gnus/nndiary.el | 20 +++++---------------
lisp/gnus/nndraft.el | 5 +----
lisp/gnus/nnfolder.el | 4 +---
lisp/gnus/nnheader.el | 10 ++--------
lisp/gnus/nnimap.el | 4 +---
5 files changed, 10 insertions(+), 33 deletions(-)
diff --git a/lisp/gnus/nndiary.el b/lisp/gnus/nndiary.el
index 9245396..71229dd 100644
--- a/lisp/gnus/nndiary.el
+++ b/lisp/gnus/nndiary.el
@@ -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))
))
diff --git a/lisp/gnus/nndraft.el b/lisp/gnus/nndraft.el
index f6c62c8..f10b6fa 100644
--- a/lisp/gnus/nndraft.el
+++ b/lisp/gnus/nndraft.el
@@ -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)
diff --git a/lisp/gnus/nnfolder.el b/lisp/gnus/nnfolder.el
index ff02055..402ffba 100644
--- a/lisp/gnus/nnfolder.el
+++ b/lisp/gnus/nnfolder.el
@@ -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)
diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el
index 42dfcb3..9f4d1b9 100644
--- a/lisp/gnus/nnheader.el
+++ b/lisp/gnus/nnheader.el
@@ -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."
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index a53d6cd..0e8fb66 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -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)
- [Emacs-diffs] master updated (8e14ce4 -> 598ff23), Lars Ingebrigtsen, 2016/02/13
- [Emacs-diffs] master b9baa80 01/12: Remove compat code and functions from message.el, Lars Ingebrigtsen, 2016/02/13
- [Emacs-diffs] master 014e0d1 02/12: Remove some compat code from mm-*.el, Lars Ingebrigtsen, 2016/02/13
- [Emacs-diffs] master 8f597e9 03/12: Remove compat code and compat functions from mm-util.el, Lars Ingebrigtsen, 2016/02/13
- [Emacs-diffs] master f3cdf9c 04/12: Remove compat code from some mml files, Lars Ingebrigtsen, 2016/02/13
- [Emacs-diffs] master 2366c70 05/12: Remove compat code in Gnus backends,
Lars Ingebrigtsen <=
- [Emacs-diffs] master 374c21d 06/12: Remove compat function from pop3, Lars Ingebrigtsen, 2016/02/13
- [Emacs-diffs] master c311723 07/12: Remove compat code from rfc2047, Lars Ingebrigtsen, 2016/02/13
- [Emacs-diffs] master f322abc 08/12: Remove compat code from smiley, Lars Ingebrigtsen, 2016/02/13
- [Emacs-diffs] master 928bb3f 09/12: Remove compat functions from smime.el, Lars Ingebrigtsen, 2016/02/13
- [Emacs-diffs] master 19d298f 10/12: Remove compat functions from starttls.el, Lars Ingebrigtsen, 2016/02/13
- [Emacs-diffs] master 920414f 11/12: Remove compat code that relies on (featurep 'mule), Lars Ingebrigtsen, 2016/02/13
- [Emacs-diffs] master 598ff23 12/12: Use open-network-stream instead of open-protocol-stream, Lars Ingebrigtsen, 2016/02/13