emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master c0a0eb5 2/4: Merge branch 'master' of git.savannah.gnu.org:/srv/g


From: Eli Zaretskii
Subject: master c0a0eb5 2/4: Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Date: Mon, 6 Sep 2021 06:13:55 -0400 (EDT)

branch: master
commit c0a0eb5460320c1e297d5246884fa5db28181c0b
Merge: fb061cd 9309dc9
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
---
 etc/NEWS                | 20 ++++++++++++--------
 lisp/gnus/gnus-group.el | 28 +++++++++++++++++-----------
 lisp/gnus/gnus-start.el |  3 +++
 3 files changed, 32 insertions(+), 19 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index 8a6b632..b7dc8f4 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -685,13 +685,6 @@ box if the point is on an image larger than SIZE pixels in 
any
 dimension.
 
 +++
-*** New user option 'lazy-highlight-no-delay-length'.
-Lazy highlighting of matches in Isearch now starts immediately if the
-search string is at least this long.  'lazy-highlight-initial-delay'
-still applies for shorter search strings, which avoids flicker in the
-search buffer due to too many matches being highlighted.
-
-+++
 *** The user can now customize how "default" values are prompted for.
 The new utility function 'format-prompt' has been added which uses the
 new 'minibuffer-default-prompt-format' user option to format "default"
@@ -973,7 +966,7 @@ in text mode.  The cursor still only actually blinks in GUI 
frames.
 
 * Changes in Specialized Modes and Packages in Emacs 28.1
 
-** Isearch
+** Isearch and Replace
 
 +++
 *** Interactive regular expression search now uses faces for sub-groups.
@@ -1011,6 +1004,13 @@ a list of symbols to try to get the "thing" at point.  
By default,
 the first element of the list is 'region' that tries to yank
 the currently active region to the search string.
 
++++
+*** New user option 'lazy-highlight-no-delay-length'.
+Lazy highlighting of matches in Isearch now starts immediately if the
+search string is at least this long.  'lazy-highlight-initial-delay'
+still applies for shorter search strings, which avoids flicker in the
+search buffer due to too many matches being highlighted.
+
 ** Dired
 
 +++
@@ -3321,6 +3321,10 @@ It is written as '(:success BODY...)' where BODY is 
executed
 whenever the protected form terminates without error, with the
 specified variable bound to the the value of the protected form.
 
+** New function 'benchmark-call' to measure the execution time of a function.
+Additionally, the number of repetitions can be expressed as a minimal duration
+in seconds.
+
 +++
 ** The value thrown to the 'exit' label can now be a function.
 This is in addition to values t or nil.  If the value is a function,
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index b1134397..4eea2df 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -1176,11 +1176,11 @@ The following commands are available:
 (defun gnus-group-default-level (&optional level number-or-nil)
   (cond
    (gnus-group-use-permanent-levels
-    (or (setq gnus-group-use-permanent-levels
-             (or level (if (numberp gnus-group-use-permanent-levels)
-                           gnus-group-use-permanent-levels
-                         (or (gnus-group-default-list-level)
-                             gnus-level-subscribed))))
+    (or level
+        (if (numberp gnus-group-use-permanent-levels)
+           gnus-group-use-permanent-levels
+         (or (gnus-group-default-list-level)
+             gnus-level-subscribed))
        (gnus-group-default-list-level) gnus-level-subscribed))
    (number-or-nil
     level)
@@ -1228,20 +1228,23 @@ The following commands are available:
   (let ((charset (gnus-group-name-charset nil string)))
     (gnus-group-name-decode string charset)))
 
-(defun gnus-group-list-groups (&optional level unread lowest)
+(defun gnus-group-list-groups (&optional level unread lowest update-level)
   "List newsgroups with level LEVEL or lower that have unread articles.
 Default is all subscribed groups.
 If argument UNREAD is non-nil, groups with no unread articles are also
 listed.
 
-Also see the `gnus-group-use-permanent-levels' variable."
+Also see the `gnus-group-use-permanent-levels' variable.  If this
+variable is non-nil, and UPDATE-LEVEL is non-nil (which is the
+case interactively), the level will be updated by this command."
   (interactive
    (list (if current-prefix-arg
             (prefix-numeric-value current-prefix-arg)
           (or
            (gnus-group-default-level nil t)
            (gnus-group-default-list-level)
-           gnus-level-subscribed)))
+           gnus-level-subscribed))
+         nil nil t)
    gnus-group-mode)
   (unless level
     (setq level (car gnus-group-list-mode)
@@ -1288,7 +1291,9 @@ Also see the `gnus-group-use-permanent-levels' variable."
              (goto-char (point-max))
              (forward-line -1)))))))
     ;; Adjust cursor point.
-    (gnus-group-position-point)))
+    (gnus-group-position-point)
+    (when (and update-level gnus-group-use-permanent-levels)
+      (setq gnus-group-use-permanent-levels level))))
 
 (defun gnus-group-list-level (level &optional all)
   "List groups on LEVEL.
@@ -4205,8 +4210,9 @@ otherwise all levels below ARG will be scanned too."
 
     (gnus-check-reasonable-setup)
     (gnus-run-hooks 'gnus-after-getting-new-news-hook)
-    (gnus-group-list-groups (and (numberp arg)
-                                (max (car gnus-group-list-mode) arg)))))
+    (gnus-group-list-groups (and (numberp arg) arg))
+    (when gnus-group-use-permanent-levels
+      (setq gnus-group-use-permanent-levels (gnus-group-default-level arg)))))
 
 (defun gnus-group-get-new-news-this-group (&optional n dont-scan)
   "Check for newly arrived news in the current group (and the N-1 next groups).
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el
index 02bbe19..4bbeb24 100644
--- a/lisp/gnus/gnus-start.el
+++ b/lisp/gnus/gnus-start.el
@@ -715,6 +715,9 @@ the first newsgroup."
        (kill-buffer (get-file-buffer gnus-current-startup-file)))
   ;; Clear the dribble buffer.
   (gnus-dribble-clear)
+  ;; Reset the level when Gnus is restarted.
+  (when (numberp gnus-group-use-permanent-levels)
+    (setq gnus-group-use-permanent-levels t))
   ;; Kill global KILL file buffer.
   (when (get-file-buffer (gnus-newsgroup-kill-file nil))
     (kill-buffer (get-file-buffer (gnus-newsgroup-kill-file nil))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]