emacs-diffs
[Top][All Lists]
Advanced

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

master 14b62b1ae0e 1/4: Merge from origin/emacs-29


From: Eli Zaretskii
Subject: master 14b62b1ae0e 1/4: Merge from origin/emacs-29
Date: Sat, 2 Dec 2023 10:09:44 -0500 (EST)

branch: master
commit 14b62b1ae0ee8f1564496212b2c32c4a8ceb548e
Merge: b26852ef974 cd477bf07d8
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Merge from origin/emacs-29
    
    cd477bf07d8 Fix behavior of 'split-root-window-*' with 'C-u'
    2e5d47f578a ; * doc/lispintro/emacs-lisp-intro.texi (copy-to-buffer):...
    c46700deb0a Add more text to clarify the behavior of 'with-current-bu...
    687c416ce9b Fix example in Emacs user manual
    835902179cd ; Fix recent change in 'c-ts-mode'
    169a5ff7524 ; Fix typo in Gnus manual (bug#67469).
    30841c71a5d Mention Titankey in Tramp, which has passed the tests
    dab7cc241f4 Fix c-ts-mode indentation after if/else (bug#67417)
    f8d9dc26c78 Fix indentation for else clause in c-ts-mode (bug#67417)
    bf0b0c9c73d Ensure that directory is expanded in package-vc-checkout
    e551dd72f79 * etc/PROBLEMS: Add entry about pinentry with gpgsm.  (Bu...
---
 doc/emacs/custom.texi                               |  4 ++--
 doc/lispintro/emacs-lisp-intro.texi                 |  6 +++++-
 doc/misc/gnus.texi                                  |  2 +-
 doc/misc/tramp.texi                                 |  2 +-
 etc/PROBLEMS                                        | 10 ++++++++++
 lisp/emacs-lisp/package-vc.el                       |  1 +
 lisp/net/tramp.el                                   |  5 +++--
 lisp/progmodes/c-ts-mode.el                         | 17 +++++++++++++++++
 lisp/window.el                                      | 14 ++++++++------
 test/lisp/progmodes/c-ts-mode-resources/indent.erts | 20 ++++++++++++++++++++
 10 files changed, 68 insertions(+), 13 deletions(-)

diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index e2d35863bd0..3be332e087f 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -2007,8 +2007,8 @@ the one for @kbd{C-c C-x x} in Texinfo mode:
             (keymap-set texinfo-mode-map "C-c p"
                         'backward-paragraph)
             (keymap-set texinfo-mode-map "C-c n"
-                        'forward-paragraph)))
-            (keymap-set texinfo-mode-map "C-c C-x x" nil)
+                        'forward-paragraph)
+            (keymap-set texinfo-mode-map "C-c C-x x" nil)))
 @end example
 
 @node Modifier Keys
diff --git a/doc/lispintro/emacs-lisp-intro.texi 
b/doc/lispintro/emacs-lisp-intro.texi
index e4a0f585f69..7563d66bad1 100644
--- a/doc/lispintro/emacs-lisp-intro.texi
+++ b/doc/lispintro/emacs-lisp-intro.texi
@@ -5445,7 +5445,11 @@ That expression starts with @code{get-buffer-create 
buffer}.  The
 function tells the computer to use the buffer with the name specified
 as the one to which you are copying, or if such a buffer does not
 exist, to create it.  Then, the @code{with-current-buffer} function
-evaluates its body with that buffer temporarily current.
+evaluates its body with that buffer temporarily current, after which
+it will switch back to the buffer we are at now@footnote{It is like
+calling @w{@code{(save-excursion (set-buffer @dots{}) @dots{})}} in
+one go, though it is defined slightly differently which interested
+reader can find out using @code{describe-function}.}.
 
 (This demonstrates another way to shift the computer's attention but
 not the user's.  The @code{append-to-buffer} function showed how to do
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index 582038d973f..586e4b94ba1 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -21596,7 +21596,7 @@ Search Groups}).
 Search queries can be specified one of two ways: either using the
 syntax of the engine responsible for the group you're searching, or
 using Gnus' generalized search syntax.  Set the option
-@code{gnus-search-use-parsed-queries} to a non-@code{nil} value to used the
+@code{gnus-search-use-parsed-queries} to a non-@code{nil} value to use the
 generalized syntax.  The advantage of this syntax is that, if you have
 multiple backends indexed by different engines, you don't need to
 remember which one you're searching---it's also possible to issue the
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index 801e4b931e2..c21426a32f7 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -5240,7 +5240,7 @@ Yes.  @command{OpenSSH} has added support for 
@acronym{FIDO} hardware
 devices via special key types @option{*-sk}.  @value{tramp} supports
 the additional handshaking messages for them.  This requires at least
 @command{OpenSSH} 8.2, and a @acronym{FIDO} @acronym{U2F} compatible
-security key, like yubikey, solokey, or nitrokey.
+security key, like yubikey, solokey, nitrokey, or titankey.
 
 
 @item
diff --git a/etc/PROBLEMS b/etc/PROBLEMS
index 72a6639c978..fdce1bc81ba 100644
--- a/etc/PROBLEMS
+++ b/etc/PROBLEMS
@@ -534,6 +534,16 @@ is to downgrade to a version of GnuPG older than 2.4.1 
(or, in the
 future, upgrade to a newer version which solves the problem, when such
 a fixed version becomes available).
 
+*** EasyPG loopback pinentry does not work with gpgsm.
+
+This happens with the 'gpgsm' command from all versions of GnuPG.
+EasyPG relies on the machine-parseable interface that is provided by
+'gpg2' with option '--status-fd', but gpgsm does not support this.
+
+As a workaround, input the passphrase with a GUI-capable pinentry
+program like 'pinentry-gnome' or 'pinentry-qt5'.  Alternatively, you
+can use the 'pinentry' package from Emacs 25.
+
 *** Emacs running on WSL receives stray characters as input.
 
 For example, you could see Emacs inserting 'z' characters even though
diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
index 9780e4d53de..77f156f20ef 100644
--- a/lisp/emacs-lisp/package-vc.el
+++ b/lisp/emacs-lisp/package-vc.el
@@ -941,6 +941,7 @@ for the last released version of the package."
                            (lambda (dir) (or (not (file-exists-p dir))
                                              (directory-empty-p dir))))
            (and current-prefix-arg :last-release))))
+  (setf directory (expand-file-name directory))
   (package-vc--archives-initialize)
   (let ((pkg-spec (or (package-vc--desc->spec pkg-desc)
                       (and-let* ((extras (package-desc-extras pkg-desc))
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 854af3e0455..3baad82dda1 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -750,8 +750,9 @@ The regexp should match at end of buffer."
 
 ;; A security key requires the user physically to touch the device
 ;; with their finger.  We must tell it to the user.
-;; Added in OpenSSH 8.2.  I've tested it with yubikey.  Nitrokey,
-;; which has also passed the tests, does not show such a message.
+;; Added in OpenSSH 8.2.  I've tested it with yubikey.  Nitrokey and
+;; Titankey, which have also passed the tests, do not show such a
+;; message.
 (defcustom tramp-security-key-confirm-regexp
   (rx bol (* "\r") "Confirm user presence for key " (* nonl) (* (any "\r\n")))
   "Regular expression matching security key confirmation message.
diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el
index a56ce26fc79..51f60f70131 100644
--- a/lisp/progmodes/c-ts-mode.el
+++ b/lisp/progmodes/c-ts-mode.el
@@ -356,11 +356,27 @@ PARENT, BOL, ARGS are the same as other anchor functions."
   (apply (alist-get 'standalone-parent treesit-simple-indent-presets)
          parent (treesit-node-parent parent) bol args))
 
+(defun c-ts-mode--prev-line-match (regexp)
+  "An indentation matcher that matches if previous line matches REGEXP."
+  (lambda (_n _p bol &rest _)
+    (save-excursion
+      (goto-char bol)
+      (forward-line -1)
+      (back-to-indentation)
+      (looking-at-p regexp))))
+
 (defun c-ts-mode--indent-styles (mode)
   "Indent rules supported by `c-ts-mode'.
 MODE is either `c' or `cpp'."
   (let ((common
          `((c-ts-mode--for-each-tail-body-matcher prev-line 
c-ts-mode-indent-offset)
+           ;; If the user types "if (...)" and hits RET, they expect
+           ;; point on the empty line to be indented; this rule
+           ;; does that.
+           ((and no-node
+                 (c-ts-mode--prev-line-match
+                  ,(rx (or "if" "else" "while" "do" "for"))))
+            prev-line c-ts-mode-indent-offset)
 
            ((parent-is "translation_unit") column-0 0)
            ((query "(ERROR (ERROR)) @indent") column-0 0)
@@ -453,6 +469,7 @@ MODE is either `c' or `cpp'."
            ;; These rules are for cases where the body is bracketless.
            ;; Tested by the "Bracketless Simple Statement" test.
            ((parent-is "if_statement") standalone-parent 
c-ts-mode-indent-offset)
+           ((parent-is "else_clause") standalone-parent 
c-ts-mode-indent-offset)
            ((parent-is "for_statement") standalone-parent 
c-ts-mode-indent-offset)
            ((parent-is "while_statement") standalone-parent 
c-ts-mode-indent-offset)
            ((parent-is "do_statement") standalone-parent 
c-ts-mode-indent-offset)
diff --git a/lisp/window.el b/lisp/window.el
index 0c5ccf167dc..fbdcd611068 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -5682,7 +5682,8 @@ Return the new window.
 If optional argument SIZE is omitted or nil, both windows get the
 same height, or close to it.  If SIZE is positive, the upper
 \(selected) window gets SIZE lines.  If SIZE is negative, the
-lower (new) window gets -SIZE lines.
+lower (new) window gets -SIZE lines.  Interactively, SIZE is
+the prefix numeric argument.
 
 If the variable `split-window-keep-point' is non-nil, both
 windows get the same value of point as the WINDOW-TO-SPLIT.
@@ -5734,8 +5735,9 @@ amount of redisplay; this is convenient on slow 
terminals."
   "Split root window of current frame in two.
 The current window configuration is retained in the top window,
 the lower window takes up the whole width of the frame.  SIZE is
-handled as in `split-window-below'."
-  (interactive "P")
+handled as in `split-window-below', and interactively is the
+prefix numeric argument."
+  (interactive "p")
   (split-window-below size (frame-root-window)))
 
 (defun split-window-right (&optional size window-to-split)
@@ -5752,7 +5754,7 @@ same width, or close to it.  If SIZE is positive, the 
left-hand
 right-hand (new) window gets -SIZE columns.  Here, SIZE includes
 the width of the window's scroll bar; if there are no scroll
 bars, it includes the width of the divider column to the window's
-right, if any."
+right, if any.  Interactively, SIZE is the prefix numeric argument."
   (interactive `(,(when current-prefix-arg
                     (prefix-numeric-value current-prefix-arg))
                  ,(selected-window)))
@@ -5774,8 +5776,8 @@ right, if any."
 The current window configuration is retained within the left
 window, and a new window is created on the right, taking up the
 whole height of the frame.  SIZE is treated as by
-`split-window-right'."
-  (interactive "P")
+`split-window-right' and interactively, is the prefix numeric argument."
+  (interactive "p")
   (split-window-right size (frame-root-window)))
 
 ;;; Balancing windows.
diff --git a/test/lisp/progmodes/c-ts-mode-resources/indent.erts 
b/test/lisp/progmodes/c-ts-mode-resources/indent.erts
index 221b3d809af..bac76fb7378 100644
--- a/test/lisp/progmodes/c-ts-mode-resources/indent.erts
+++ b/test/lisp/progmodes/c-ts-mode-resources/indent.erts
@@ -149,6 +149,21 @@ for (int i = 0;
 
 Name: Bracketless Simple Statement
 
+=-=
+for (int i = 0; i < 5; i++)
+continue;
+
+while (true)
+return 1;
+
+do
+i++;
+while (true)
+
+if (true)
+break;
+else
+break;
 =-=
 for (int i = 0; i < 5; i++)
   continue;
@@ -159,6 +174,11 @@ while (true)
 do
   i++;
 while (true)
+
+if (true)
+  break;
+else
+  break;
 =-=-=
 
 Name: Nested If-Else



reply via email to

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