aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2016-02-13 14:00:06 +1100
committerLars Ingebrigtsen2016-02-13 14:00:40 +1100
commit1279f93176495759bfecf4070d0e3593e30baa50 (patch)
tree52b1db380edd57eecf0dc1b3809d6fadd708105a
parentc68b6c05d56a0eb0af9f52e4017464a7243a2619 (diff)
downloademacs-1279f93176495759bfecf4070d0e3593e30baa50.tar.gz
emacs-1279f93176495759bfecf4070d0e3593e30baa50.zip
Revert "Avoid defvarring prefix-less variables"
This reverts commit 303390bda34f98b400798d5383cf0d722e35ba19. The defvars are needed if we're doing lexical-binding
-rw-r--r--lisp/gnus/gnus-group.el25
1 files changed, 23 insertions, 2 deletions
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index b702e2f42ca..3b37f3c27ca 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -1612,6 +1612,8 @@ if it is a string, only list groups matching REGEXP."
1612(defun gnus-group-update-eval-form (group list) 1612(defun gnus-group-update-eval-form (group list)
1613 "Eval `car' of each element of LIST, and return the first that return t. 1613 "Eval `car' of each element of LIST, and return the first that return t.
1614Some value are bound so the form can use them." 1614Some value are bound so the form can use them."
1615 (defvar group-age) (defvar ticked) (defvar score) (defvar level)
1616 (defvar mailp) (defvar total) (defvar unread)
1615 (when list 1617 (when list
1616 (let* ((entry (gnus-group-entry group)) 1618 (let* ((entry (gnus-group-entry group))
1617 (unread (if (numberp (car entry)) (car entry) 0)) 1619 (unread (if (numberp (car entry)) (car entry) 0))
@@ -1631,6 +1633,25 @@ Some value are bound so the form can use them."
1631 (score (or (gnus-info-score info) 0)) 1633 (score (or (gnus-info-score info) 0))
1632 (ticked (gnus-range-length (cdr (assq 'tick marked)))) 1634 (ticked (gnus-range-length (cdr (assq 'tick marked))))
1633 (group-age (gnus-group-timestamp-delta group))) 1635 (group-age (gnus-group-timestamp-delta group)))
1636 ;; FIXME: http://thread.gmane.org/gmane.emacs.gnus.general/65451/focus=65465
1637 ;; ======================================================================
1638 ;; From: Richard Stallman
1639 ;; Subject: Re: Rewriting gnus-group-highlight-line (was: [...])
1640 ;; Cc: ding@gnus.org
1641 ;; Date: Sat, 27 Oct 2007 19:41:20 -0400
1642 ;; Message-ID: <E1IlvHM-0006TS-7t@fencepost.gnu.org>
1643 ;;
1644 ;; [...]
1645 ;; The kludge is that the alist elements contain expressions that refer
1646 ;; to local variables with short names. Perhaps write your own tiny
1647 ;; evaluator that handles just `and', `or', and numeric comparisons
1648 ;; and just a few specific variables.
1649 ;; ======================================================================
1650 ;;
1651 ;; Similar for other evaluated variables. Grep for risky-local-variable
1652 ;; to find them! -- rsteib
1653 ;;
1654 ;; Eval the cars of the lists until we find a match.
1634 (while (and list 1655 (while (and list
1635 (not (eval (caar list)))) 1656 (not (eval (caar list))))
1636 (setq list (cdr list))) 1657 (setq list (cdr list)))
@@ -1641,8 +1662,8 @@ Some value are bound so the form can use them."
1641GROUP is current group, and the line to highlight starts at BEG 1662GROUP is current group, and the line to highlight starts at BEG
1642and ends at END." 1663and ends at END."
1643 (let ((face (cdar (gnus-group-update-eval-form 1664 (let ((face (cdar (gnus-group-update-eval-form
1644 group 1665 group
1645 gnus-group-highlight)))) 1666 gnus-group-highlight))))
1646 (unless (eq face (gnus-get-text-property-excluding-characters-with-faces beg 'face)) 1667 (unless (eq face (gnus-get-text-property-excluding-characters-with-faces beg 'face))
1647 (let ((inhibit-read-only t)) 1668 (let ((inhibit-read-only t))
1648 (gnus-put-text-property-excluding-characters-with-faces 1669 (gnus-put-text-property-excluding-characters-with-faces