[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 303390b 01/12: Avoid defvarring prefix-less variabl
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master 303390b 01/12: Avoid defvarring prefix-less variables |
Date: |
Fri, 12 Feb 2016 06:14:23 +0000 |
branch: master
commit 303390bda34f98b400798d5383cf0d722e35ba19
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
Avoid defvarring prefix-less variables
* lisp/gnus/gnus-group.el (gnus-group-update-eval-form): We
don't need to `defvar' the short variables to allow `eval' to
use them.
---
lisp/gnus/gnus-group.el | 25 ++-----------------------
1 files changed, 2 insertions(+), 23 deletions(-)
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 18dd281..18e899b 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -1612,8 +1612,6 @@ if it is a string, only list groups matching REGEXP."
(defun gnus-group-update-eval-form (group list)
"Eval `car' of each element of LIST, and return the first that return t.
Some value are bound so the form can use them."
- (defvar group-age) (defvar ticked) (defvar score) (defvar level)
- (defvar mailp) (defvar total) (defvar unread)
(when list
(let* ((entry (gnus-group-entry group))
(unread (if (numberp (car entry)) (car entry) 0))
@@ -1633,25 +1631,6 @@ Some value are bound so the form can use them."
(score (or (gnus-info-score info) 0))
(ticked (gnus-range-length (cdr (assq 'tick marked))))
(group-age (gnus-group-timestamp-delta group)))
- ;; FIXME:
http://thread.gmane.org/gmane.emacs.gnus.general/65451/focus=65465
- ;; ======================================================================
- ;; From: Richard Stallman
- ;; Subject: Re: Rewriting gnus-group-highlight-line (was: [...])
- ;; Cc: address@hidden
- ;; Date: Sat, 27 Oct 2007 19:41:20 -0400
- ;; Message-ID: <address@hidden>
- ;;
- ;; [...]
- ;; The kludge is that the alist elements contain expressions that refer
- ;; to local variables with short names. Perhaps write your own tiny
- ;; evaluator that handles just `and', `or', and numeric comparisons
- ;; and just a few specific variables.
- ;; ======================================================================
- ;;
- ;; Similar for other evaluated variables. Grep for risky-local-variable
- ;; to find them! -- rsteib
- ;;
- ;; Eval the cars of the lists until we find a match.
(while (and list
(not (eval (caar list))))
(setq list (cdr list)))
@@ -1662,8 +1641,8 @@ Some value are bound so the form can use them."
GROUP is current group, and the line to highlight starts at BEG
and ends at END."
(let ((face (cdar (gnus-group-update-eval-form
- group
- gnus-group-highlight))))
+ group
+ gnus-group-highlight))))
(unless (eq face (gnus-get-text-property-excluding-characters-with-faces
beg 'face))
(let ((inhibit-read-only t))
(gnus-put-text-property-excluding-characters-with-faces
- [Emacs-diffs] master updated (ec9bd24 -> 0ff58f6), Lars Ingebrigtsen, 2016/02/12
- [Emacs-diffs] master 303390b 01/12: Avoid defvarring prefix-less variables,
Lars Ingebrigtsen <=
- [Emacs-diffs] master a8480fb 02/12: Avoid the obsoleted defmethod, Lars Ingebrigtsen, 2016/02/12
- [Emacs-diffs] master 050f14e 03/12: Fix compilation warning in gnus-start, Lars Ingebrigtsen, 2016/02/12
- [Emacs-diffs] master ae6ad47 04/12: Avoid using mm-make-temp-file, Lars Ingebrigtsen, 2016/02/12
- [Emacs-diffs] master eefef28 05/12: Fix missed translation in a previous commit, Lars Ingebrigtsen, 2016/02/12
- [Emacs-diffs] master 7c162e7 06/12: Don't use the obsolete char-valid-p function, Lars Ingebrigtsen, 2016/02/12
- [Emacs-diffs] master 6da2540 07/12: * lisp/gnus/mailcap.el: Remove usage of mailcap-delete-duplicates., Lars Ingebrigtsen, 2016/02/12
- [Emacs-diffs] master b721d0a 08/12: Avoid defvarring prefix-less variable, Lars Ingebrigtsen, 2016/02/12
- [Emacs-diffs] master b78a759 09/12: Make sieve-manage require sasl, Lars Ingebrigtsen, 2016/02/12
- [Emacs-diffs] master ba9c534 10/12: Use cl-defmethod in registry.el, Lars Ingebrigtsen, 2016/02/12
- [Emacs-diffs] master 210a895 11/12: Avoid obsolete function in plstore, Lars Ingebrigtsen, 2016/02/12