emacs-diffs
[Top][All Lists]
Advanced

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

feature/android 67db3bfdc27: Merge remote-tracking branch 'origin/master


From: Po Lu
Subject: feature/android 67db3bfdc27: Merge remote-tracking branch 'origin/master' into feature/android
Date: Fri, 12 May 2023 20:54:50 -0400 (EDT)

branch: feature/android
commit 67db3bfdc27a5db27ffbe346387f604cf21182b7
Merge: 7ac8bcaacc1 3e132b972e3
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Merge remote-tracking branch 'origin/master' into feature/android
---
 doc/emacs/custom.texi       |  7 +++----
 doc/lispref/minibuf.texi    |  6 ++++++
 doc/lispref/variables.texi  |  8 +++-----
 lisp/files.el               |  5 ++++-
 lisp/net/soap-client.el     | 11 ++++-------
 lisp/progmodes/cc-engine.el | 21 +++++++++++++++------
 lisp/progmodes/cc-mode.el   |  2 --
 lisp/subr.el                |  4 +++-
 src/fns.c                   | 11 ++++++++++-
 src/haikufont.c             |  1 -
 test/lisp/files-tests.el    |  2 +-
 11 files changed, 49 insertions(+), 29 deletions(-)

diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index d8abf81c75f..d8221f51425 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -1359,10 +1359,9 @@ certain directories, and skip the confirmation prompt 
when local
 variables are loaded from those directories, even if the variables are
 risky.  The variable @code{safe-local-variable-directories} holds the
 list of such directories.  The names of the directories in this list
-must be full absolute file names, and should end in a slash.  If the
-variable @code{enable-remote-dir-locals} has a non-@code{nil} value,
-the list can include remote directories as well (@pxref{Remote
-Files}).
+must be full absolute file names.  If the variable
+@code{enable-remote-dir-locals} has a non-@code{nil} value, the list
+can include remote directories as well (@pxref{Remote Files}).
 
 @vindex enable-local-variables
   The variable @code{enable-local-variables} allows you to change the
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi
index 5d59387fb1f..ff12808762f 100644
--- a/doc/lispref/minibuf.texi
+++ b/doc/lispref/minibuf.texi
@@ -2200,6 +2200,9 @@ the expected answers (@kbd{y}, @kbd{n}, @kbd{@key{SPC}},
 @kbd{@key{DEL}}, or something that quits), the function responds
 @samp{Please answer y or n.}, and repeats the request.
 
+If @var{prompt} is a non-empty string, and it ends with a non-space
+character, a @samp{SPC} character will be appended to it.
+
 This function actually uses the minibuffer, but does not allow editing
 of the answer.  The cursor moves to the minibuffer while the question
 is being asked.
@@ -2240,6 +2243,9 @@ minibuffer, followed by the value of 
@code{yes-or-no-prompt} @w{(default
 responses; otherwise, the function responds @w{@samp{Please answer yes or
 no.}}, waits about two seconds and repeats the request.
 
+If @var{prompt} is a non-empty string, and it ends with a non-space
+character, a @samp{SPC} character will be appended to it.
+
 @code{yes-or-no-p} requires more work from the user than
 @code{y-or-n-p} and is appropriate for more crucial decisions.
 
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index b3a8cd8110c..4eda035473e 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -1982,11 +1982,9 @@ This is a list of directories where local variables are 
always
 enabled.  Directory-local variables loaded from these directories,
 such as the variables in @file{.dir-locals.el}, will be enabled even
 if they are risky.  The directories in this list must be
-fully-expanded absolute file names that end in a directory separator
-character.  They may also be remote directories if the variable
-@code{enable-remote-dir-locals} is set non-@code{nil}.  Directories in
-this list are matched case-sensitively, even if the filesystem is
-case-sensitive.
+fully-expanded absolute file names.  They may also be remote
+directories if the variable @code{enable-remote-dir-locals} is set
+non-@code{nil}.
 @end defvar
 
 @defun hack-local-variables &optional handle-mode
diff --git a/lisp/files.el b/lisp/files.el
index 9fdae107068..e93181499b7 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -3934,7 +3934,10 @@ DIR-NAME is the name of the associated directory.  
Otherwise it is nil."
                  (null unsafe-vars)
                  (null risky-vars))
             (memq enable-local-variables '(:all :safe))
-             (member dir-name safe-local-variable-directories)
+             (delq nil (mapcar (lambda (dir)
+                                 (and dir-name dir
+                                      (file-equal-p dir dir-name)))
+                               safe-local-variable-directories))
             (hack-local-variables-confirm all-vars unsafe-vars
                                           risky-vars dir-name))
         (dolist (elt all-vars)
diff --git a/lisp/net/soap-client.el b/lisp/net/soap-client.el
index 866b33decc6..010e86354b6 100644
--- a/lisp/net/soap-client.el
+++ b/lisp/net/soap-client.el
@@ -5,7 +5,7 @@
 ;; Author: Alexandru Harsanyi <AlexHarsanyi@gmail.com>
 ;; Author: Thomas Fitzsimmons <fitzsim@fitzsim.org>
 ;; Created: December, 2009
-;; Version: 3.2.2
+;; Version: 3.2.3
 ;; Keywords: soap, web-services, comm, hypermedia
 ;; Package: soap-client
 ;; URL: https://github.com/alex-hhh/emacs-soap-client
@@ -717,12 +717,9 @@ representing leap seconds."
                 second)
               minute hour day month year second-fraction datatype time-zone)
       (let ((time
-             ;; Continue calling encode-time the old way, for backward
-             ;; compatibility in GNU ELPA.
-             (apply
-              #'encode-time (list
-                             (if new-decode-time new-decode-time-second second)
-                             minute hour day month year nil nil time-zone))))
+             ;; Call encode-time the old way, for Emacs<27.
+             (encode-time (if new-decode-time new-decode-time-second second)
+                          minute hour day month year time-zone)))
         (if new-decode-time
             (with-no-warnings (decode-time time nil t))
           (decode-time time))))))
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 8b34daf03c2..d21e082d0b6 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -6244,6 +6244,9 @@ comment at the start of cc-engine.el for more info."
   ;; prefix".  The declaration prefix is the earlier of `cfd-prop-match' and
   ;; `cfd-re-match'.  `cfd-match-pos' is set to the decl prefix.
   ;;
+  ;; The variables which this macro should set for `c-find-decl-spots' are
+  ;; `cfd-match-pos' and `cfd-continue-pos'.
+  ;;
   ;; This macro might do hidden buffer changes.
 
   '(progn
@@ -6586,11 +6589,17 @@ comment at the start of cc-engine.el for more info."
        ;; and so we can continue the search from this point.  If we
        ;; didn't hit `c-find-decl-syntactic-pos' then we're now in
        ;; the right spot to begin searching anyway.
-       (if (and (eq (point) c-find-decl-syntactic-pos)
-                c-find-decl-match-pos)
-           (setq cfd-match-pos c-find-decl-match-pos
-                 cfd-continue-pos syntactic-pos)
-
+       (cond
+        ((and (eq (point) c-find-decl-syntactic-pos)
+              c-find-decl-match-pos)
+         (setq cfd-match-pos c-find-decl-match-pos
+               cfd-continue-pos syntactic-pos))
+        ((save-excursion (c-beginning-of-macro))
+         ;; The `c-backward-syntactic-ws' ~40 lines up failed to find non
+         ;; syntactic-ws and hit its limit, leaving us in a macro.
+         (setq cfd-match-pos cfd-start-pos
+               cfd-continue-pos cfd-start-pos))
+        (t
          (setq c-find-decl-syntactic-pos syntactic-pos)
 
          (when (if (bobp)
@@ -6608,7 +6617,7 @@ comment at the start of cc-engine.el for more info."
            (c-find-decl-prefix-search)) ; sets cfd-continue-pos
 
          (setq c-find-decl-match-pos (and (< cfd-match-pos cfd-start-pos)
-                                          cfd-match-pos))))) ; end of `cond'
+                                          cfd-match-pos)))))) ; end of `cond'
 
       ;; Advance `cfd-continue-pos' if it's before the start position.
       ;; The closest continue position that might have effect at or
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 330202bb5f9..11a1d3fe6c2 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -2444,8 +2444,6 @@ with // and /*, not more generic line and block comments."
                           (setq pseudo (c-cheap-inside-bracelist-p 
(c-parse-state)))))))
               (goto-char pseudo))
             t)
-          (or (> (point) bod-lim)
-              (eq bod-lim (point-min)))
           ;; Move forward to the start of the next declaration.
           (progn (c-forward-syntactic-ws)
                  ;; Have we got stuck in a comment at EOB?
diff --git a/lisp/subr.el b/lisp/subr.el
index 66674786330..7866f95c709 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -3616,7 +3616,9 @@ confusing to some users.")
 Return t if answer is \"y\" and nil if it is \"n\".
 
 PROMPT is the string to display to ask the question; `y-or-n-p'
-adds \"(y or n) \" to it.
+adds \"(y or n) \" to it.  If PROMPT is a non-empty string, and
+it ends with a non-space character, a space character will be
+appended to it.
 
 If you bind the variable `help-form' to a non-nil value
 while calling this function, then pressing `help-char'
diff --git a/src/fns.c b/src/fns.c
index 8891d381993..7cb73f8375f 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -26,6 +26,7 @@ along with GNU Emacs.  If not, see 
<https://www.gnu.org/licenses/>.  */
 #include <intprops.h>
 #include <vla.h>
 #include <errno.h>
+#include <ctype.h>
 
 #include "lisp.h"
 #include "bignum.h"
@@ -3202,7 +3203,9 @@ DEFUN ("yes-or-no-p", Fyes_or_no_p, Syes_or_no_p, 1, 1, 0,
 Return t if answer is yes, and nil if the answer is no.
 
 PROMPT is the string to display to ask the question; `yes-or-no-p'
-appends `yes-or-no-prompt' (default \"(yes or no) \") to it.
+appends `yes-or-no-prompt' (default \"(yes or no) \") to it.  If
+PROMPT is a non-empty string, and it ends with a non-space character,
+a space character will be appended to it.
 
 The user must confirm the answer with RET, and can edit it until it
 has been confirmed.
@@ -3234,6 +3237,12 @@ if `last-nonmenu-event' is nil, and `use-dialog-box' is 
non-nil.  */)
   if (use_short_answers)
     return call1 (intern ("y-or-n-p"), prompt);
 
+  {
+    char *s = SSDATA (prompt);
+    ptrdiff_t len = strlen (s);
+    if ((len > 0) && !isspace (s[len - 1]))
+      prompt = CALLN (Fconcat, prompt, build_string (" "));
+  }
   prompt = CALLN (Fconcat, prompt, Vyes_or_no_prompt);
 
   specpdl_ref count = SPECPDL_INDEX ();
diff --git a/src/haikufont.c b/src/haikufont.c
index b4c2e547247..b6a9cb34c4d 100644
--- a/src/haikufont.c
+++ b/src/haikufont.c
@@ -1127,7 +1127,6 @@ haikufont_draw (struct glyph_string *s, int from, int to,
 
       haiku_draw_background_rect (s, s->face, x, y - ascent,
                                  s->width, height);
-      s->background_filled_p = 1;
     }
 
   BView_SetHighColor (view, foreground);
diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el
index e87bb3cfa0a..f6c7be88b05 100644
--- a/test/lisp/files-tests.el
+++ b/test/lisp/files-tests.el
@@ -170,7 +170,7 @@ form.")
   ;; safe-local-variable-directories should be risky,
   ;; so use it as an arbitrary risky variable.
   (let ((test-alist '((safe-local-variable-directories . "some_val")))
-        (fakedir "/test1/test2/")
+        (fakedir default-directory)
         (enable-local-eval t))
     (with-temp-buffer
       (setq safe-local-variable-directories (list fakedir))



reply via email to

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