diff options
| author | Po Lu | 2023-05-13 08:53:57 +0800 |
|---|---|---|
| committer | Po Lu | 2023-05-13 08:53:57 +0800 |
| commit | 67db3bfdc27a5db27ffbe346387f604cf21182b7 (patch) | |
| tree | 6fc25b97be0d2d900ccb7bee1ccf86f6a7d15735 | |
| parent | 7ac8bcaacc1f3dbbda3febe09dde6d18a2d69729 (diff) | |
| parent | 3e132b972e30c5b0cb75ed29d8ca5a845434d6fe (diff) | |
| download | emacs-67db3bfdc27a5db27ffbe346387f604cf21182b7.tar.gz emacs-67db3bfdc27a5db27ffbe346387f604cf21182b7.zip | |
Merge remote-tracking branch 'origin/master' into feature/android
| -rw-r--r-- | doc/emacs/custom.texi | 7 | ||||
| -rw-r--r-- | doc/lispref/minibuf.texi | 6 | ||||
| -rw-r--r-- | doc/lispref/variables.texi | 8 | ||||
| -rw-r--r-- | lisp/files.el | 5 | ||||
| -rw-r--r-- | lisp/net/soap-client.el | 11 | ||||
| -rw-r--r-- | lisp/progmodes/cc-engine.el | 21 | ||||
| -rw-r--r-- | lisp/progmodes/cc-mode.el | 2 | ||||
| -rw-r--r-- | lisp/subr.el | 4 | ||||
| -rw-r--r-- | src/fns.c | 11 | ||||
| -rw-r--r-- | src/haikufont.c | 1 | ||||
| -rw-r--r-- | 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 | |||
| 1359 | variables are loaded from those directories, even if the variables are | 1359 | variables are loaded from those directories, even if the variables are |
| 1360 | risky. The variable @code{safe-local-variable-directories} holds the | 1360 | risky. The variable @code{safe-local-variable-directories} holds the |
| 1361 | list of such directories. The names of the directories in this list | 1361 | list of such directories. The names of the directories in this list |
| 1362 | must be full absolute file names, and should end in a slash. If the | 1362 | must be full absolute file names. If the variable |
| 1363 | variable @code{enable-remote-dir-locals} has a non-@code{nil} value, | 1363 | @code{enable-remote-dir-locals} has a non-@code{nil} value, the list |
| 1364 | the list can include remote directories as well (@pxref{Remote | 1364 | can include remote directories as well (@pxref{Remote Files}). |
| 1365 | Files}). | ||
| 1366 | 1365 | ||
| 1367 | @vindex enable-local-variables | 1366 | @vindex enable-local-variables |
| 1368 | The variable @code{enable-local-variables} allows you to change the | 1367 | 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}}, | |||
| 2200 | @kbd{@key{DEL}}, or something that quits), the function responds | 2200 | @kbd{@key{DEL}}, or something that quits), the function responds |
| 2201 | @samp{Please answer y or n.}, and repeats the request. | 2201 | @samp{Please answer y or n.}, and repeats the request. |
| 2202 | 2202 | ||
| 2203 | If @var{prompt} is a non-empty string, and it ends with a non-space | ||
| 2204 | character, a @samp{SPC} character will be appended to it. | ||
| 2205 | |||
| 2203 | This function actually uses the minibuffer, but does not allow editing | 2206 | This function actually uses the minibuffer, but does not allow editing |
| 2204 | of the answer. The cursor moves to the minibuffer while the question | 2207 | of the answer. The cursor moves to the minibuffer while the question |
| 2205 | is being asked. | 2208 | is being asked. |
| @@ -2240,6 +2243,9 @@ minibuffer, followed by the value of @code{yes-or-no-prompt} @w{(default | |||
| 2240 | responses; otherwise, the function responds @w{@samp{Please answer yes or | 2243 | responses; otherwise, the function responds @w{@samp{Please answer yes or |
| 2241 | no.}}, waits about two seconds and repeats the request. | 2244 | no.}}, waits about two seconds and repeats the request. |
| 2242 | 2245 | ||
| 2246 | If @var{prompt} is a non-empty string, and it ends with a non-space | ||
| 2247 | character, a @samp{SPC} character will be appended to it. | ||
| 2248 | |||
| 2243 | @code{yes-or-no-p} requires more work from the user than | 2249 | @code{yes-or-no-p} requires more work from the user than |
| 2244 | @code{y-or-n-p} and is appropriate for more crucial decisions. | 2250 | @code{y-or-n-p} and is appropriate for more crucial decisions. |
| 2245 | 2251 | ||
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 | |||
| 1982 | enabled. Directory-local variables loaded from these directories, | 1982 | enabled. Directory-local variables loaded from these directories, |
| 1983 | such as the variables in @file{.dir-locals.el}, will be enabled even | 1983 | such as the variables in @file{.dir-locals.el}, will be enabled even |
| 1984 | if they are risky. The directories in this list must be | 1984 | if they are risky. The directories in this list must be |
| 1985 | fully-expanded absolute file names that end in a directory separator | 1985 | fully-expanded absolute file names. They may also be remote |
| 1986 | character. They may also be remote directories if the variable | 1986 | directories if the variable @code{enable-remote-dir-locals} is set |
| 1987 | @code{enable-remote-dir-locals} is set non-@code{nil}. Directories in | 1987 | non-@code{nil}. |
| 1988 | this list are matched case-sensitively, even if the filesystem is | ||
| 1989 | case-sensitive. | ||
| 1990 | @end defvar | 1988 | @end defvar |
| 1991 | 1989 | ||
| 1992 | @defun hack-local-variables &optional handle-mode | 1990 | @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." | |||
| 3934 | (null unsafe-vars) | 3934 | (null unsafe-vars) |
| 3935 | (null risky-vars)) | 3935 | (null risky-vars)) |
| 3936 | (memq enable-local-variables '(:all :safe)) | 3936 | (memq enable-local-variables '(:all :safe)) |
| 3937 | (member dir-name safe-local-variable-directories) | 3937 | (delq nil (mapcar (lambda (dir) |
| 3938 | (and dir-name dir | ||
| 3939 | (file-equal-p dir dir-name))) | ||
| 3940 | safe-local-variable-directories)) | ||
| 3938 | (hack-local-variables-confirm all-vars unsafe-vars | 3941 | (hack-local-variables-confirm all-vars unsafe-vars |
| 3939 | risky-vars dir-name)) | 3942 | risky-vars dir-name)) |
| 3940 | (dolist (elt all-vars) | 3943 | (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 @@ | |||
| 5 | ;; Author: Alexandru Harsanyi <AlexHarsanyi@gmail.com> | 5 | ;; Author: Alexandru Harsanyi <AlexHarsanyi@gmail.com> |
| 6 | ;; Author: Thomas Fitzsimmons <fitzsim@fitzsim.org> | 6 | ;; Author: Thomas Fitzsimmons <fitzsim@fitzsim.org> |
| 7 | ;; Created: December, 2009 | 7 | ;; Created: December, 2009 |
| 8 | ;; Version: 3.2.2 | 8 | ;; Version: 3.2.3 |
| 9 | ;; Keywords: soap, web-services, comm, hypermedia | 9 | ;; Keywords: soap, web-services, comm, hypermedia |
| 10 | ;; Package: soap-client | 10 | ;; Package: soap-client |
| 11 | ;; URL: https://github.com/alex-hhh/emacs-soap-client | 11 | ;; URL: https://github.com/alex-hhh/emacs-soap-client |
| @@ -717,12 +717,9 @@ representing leap seconds." | |||
| 717 | second) | 717 | second) |
| 718 | minute hour day month year second-fraction datatype time-zone) | 718 | minute hour day month year second-fraction datatype time-zone) |
| 719 | (let ((time | 719 | (let ((time |
| 720 | ;; Continue calling encode-time the old way, for backward | 720 | ;; Call encode-time the old way, for Emacs<27. |
| 721 | ;; compatibility in GNU ELPA. | 721 | (encode-time (if new-decode-time new-decode-time-second second) |
| 722 | (apply | 722 | minute hour day month year time-zone))) |
| 723 | #'encode-time (list | ||
| 724 | (if new-decode-time new-decode-time-second second) | ||
| 725 | minute hour day month year nil nil time-zone)))) | ||
| 726 | (if new-decode-time | 723 | (if new-decode-time |
| 727 | (with-no-warnings (decode-time time nil t)) | 724 | (with-no-warnings (decode-time time nil t)) |
| 728 | (decode-time time)))))) | 725 | (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." | |||
| 6244 | ;; prefix". The declaration prefix is the earlier of `cfd-prop-match' and | 6244 | ;; prefix". The declaration prefix is the earlier of `cfd-prop-match' and |
| 6245 | ;; `cfd-re-match'. `cfd-match-pos' is set to the decl prefix. | 6245 | ;; `cfd-re-match'. `cfd-match-pos' is set to the decl prefix. |
| 6246 | ;; | 6246 | ;; |
| 6247 | ;; The variables which this macro should set for `c-find-decl-spots' are | ||
| 6248 | ;; `cfd-match-pos' and `cfd-continue-pos'. | ||
| 6249 | ;; | ||
| 6247 | ;; This macro might do hidden buffer changes. | 6250 | ;; This macro might do hidden buffer changes. |
| 6248 | 6251 | ||
| 6249 | '(progn | 6252 | '(progn |
| @@ -6586,11 +6589,17 @@ comment at the start of cc-engine.el for more info." | |||
| 6586 | ;; and so we can continue the search from this point. If we | 6589 | ;; and so we can continue the search from this point. If we |
| 6587 | ;; didn't hit `c-find-decl-syntactic-pos' then we're now in | 6590 | ;; didn't hit `c-find-decl-syntactic-pos' then we're now in |
| 6588 | ;; the right spot to begin searching anyway. | 6591 | ;; the right spot to begin searching anyway. |
| 6589 | (if (and (eq (point) c-find-decl-syntactic-pos) | 6592 | (cond |
| 6590 | c-find-decl-match-pos) | 6593 | ((and (eq (point) c-find-decl-syntactic-pos) |
| 6591 | (setq cfd-match-pos c-find-decl-match-pos | 6594 | c-find-decl-match-pos) |
| 6592 | cfd-continue-pos syntactic-pos) | 6595 | (setq cfd-match-pos c-find-decl-match-pos |
| 6593 | 6596 | cfd-continue-pos syntactic-pos)) | |
| 6597 | ((save-excursion (c-beginning-of-macro)) | ||
| 6598 | ;; The `c-backward-syntactic-ws' ~40 lines up failed to find non | ||
| 6599 | ;; syntactic-ws and hit its limit, leaving us in a macro. | ||
| 6600 | (setq cfd-match-pos cfd-start-pos | ||
| 6601 | cfd-continue-pos cfd-start-pos)) | ||
| 6602 | (t | ||
| 6594 | (setq c-find-decl-syntactic-pos syntactic-pos) | 6603 | (setq c-find-decl-syntactic-pos syntactic-pos) |
| 6595 | 6604 | ||
| 6596 | (when (if (bobp) | 6605 | (when (if (bobp) |
| @@ -6608,7 +6617,7 @@ comment at the start of cc-engine.el for more info." | |||
| 6608 | (c-find-decl-prefix-search)) ; sets cfd-continue-pos | 6617 | (c-find-decl-prefix-search)) ; sets cfd-continue-pos |
| 6609 | 6618 | ||
| 6610 | (setq c-find-decl-match-pos (and (< cfd-match-pos cfd-start-pos) | 6619 | (setq c-find-decl-match-pos (and (< cfd-match-pos cfd-start-pos) |
| 6611 | cfd-match-pos))))) ; end of `cond' | 6620 | cfd-match-pos)))))) ; end of `cond' |
| 6612 | 6621 | ||
| 6613 | ;; Advance `cfd-continue-pos' if it's before the start position. | 6622 | ;; Advance `cfd-continue-pos' if it's before the start position. |
| 6614 | ;; The closest continue position that might have effect at or | 6623 | ;; 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." | |||
| 2444 | (setq pseudo (c-cheap-inside-bracelist-p (c-parse-state))))))) | 2444 | (setq pseudo (c-cheap-inside-bracelist-p (c-parse-state))))))) |
| 2445 | (goto-char pseudo)) | 2445 | (goto-char pseudo)) |
| 2446 | t) | 2446 | t) |
| 2447 | (or (> (point) bod-lim) | ||
| 2448 | (eq bod-lim (point-min))) | ||
| 2449 | ;; Move forward to the start of the next declaration. | 2447 | ;; Move forward to the start of the next declaration. |
| 2450 | (progn (c-forward-syntactic-ws) | 2448 | (progn (c-forward-syntactic-ws) |
| 2451 | ;; Have we got stuck in a comment at EOB? | 2449 | ;; 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.") | |||
| 3616 | Return t if answer is \"y\" and nil if it is \"n\". | 3616 | Return t if answer is \"y\" and nil if it is \"n\". |
| 3617 | 3617 | ||
| 3618 | PROMPT is the string to display to ask the question; `y-or-n-p' | 3618 | PROMPT is the string to display to ask the question; `y-or-n-p' |
| 3619 | adds \"(y or n) \" to it. | 3619 | adds \"(y or n) \" to it. If PROMPT is a non-empty string, and |
| 3620 | it ends with a non-space character, a space character will be | ||
| 3621 | appended to it. | ||
| 3620 | 3622 | ||
| 3621 | If you bind the variable `help-form' to a non-nil value | 3623 | If you bind the variable `help-form' to a non-nil value |
| 3622 | while calling this function, then pressing `help-char' | 3624 | while calling this function, then pressing `help-char' |
| @@ -26,6 +26,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 26 | #include <intprops.h> | 26 | #include <intprops.h> |
| 27 | #include <vla.h> | 27 | #include <vla.h> |
| 28 | #include <errno.h> | 28 | #include <errno.h> |
| 29 | #include <ctype.h> | ||
| 29 | 30 | ||
| 30 | #include "lisp.h" | 31 | #include "lisp.h" |
| 31 | #include "bignum.h" | 32 | #include "bignum.h" |
| @@ -3202,7 +3203,9 @@ DEFUN ("yes-or-no-p", Fyes_or_no_p, Syes_or_no_p, 1, 1, 0, | |||
| 3202 | Return t if answer is yes, and nil if the answer is no. | 3203 | Return t if answer is yes, and nil if the answer is no. |
| 3203 | 3204 | ||
| 3204 | PROMPT is the string to display to ask the question; `yes-or-no-p' | 3205 | PROMPT is the string to display to ask the question; `yes-or-no-p' |
| 3205 | appends `yes-or-no-prompt' (default \"(yes or no) \") to it. | 3206 | appends `yes-or-no-prompt' (default \"(yes or no) \") to it. If |
| 3207 | PROMPT is a non-empty string, and it ends with a non-space character, | ||
| 3208 | a space character will be appended to it. | ||
| 3206 | 3209 | ||
| 3207 | The user must confirm the answer with RET, and can edit it until it | 3210 | The user must confirm the answer with RET, and can edit it until it |
| 3208 | has been confirmed. | 3211 | has been confirmed. |
| @@ -3234,6 +3237,12 @@ if `last-nonmenu-event' is nil, and `use-dialog-box' is non-nil. */) | |||
| 3234 | if (use_short_answers) | 3237 | if (use_short_answers) |
| 3235 | return call1 (intern ("y-or-n-p"), prompt); | 3238 | return call1 (intern ("y-or-n-p"), prompt); |
| 3236 | 3239 | ||
| 3240 | { | ||
| 3241 | char *s = SSDATA (prompt); | ||
| 3242 | ptrdiff_t len = strlen (s); | ||
| 3243 | if ((len > 0) && !isspace (s[len - 1])) | ||
| 3244 | prompt = CALLN (Fconcat, prompt, build_string (" ")); | ||
| 3245 | } | ||
| 3237 | prompt = CALLN (Fconcat, prompt, Vyes_or_no_prompt); | 3246 | prompt = CALLN (Fconcat, prompt, Vyes_or_no_prompt); |
| 3238 | 3247 | ||
| 3239 | specpdl_ref count = SPECPDL_INDEX (); | 3248 | 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, | |||
| 1127 | 1127 | ||
| 1128 | haiku_draw_background_rect (s, s->face, x, y - ascent, | 1128 | haiku_draw_background_rect (s, s->face, x, y - ascent, |
| 1129 | s->width, height); | 1129 | s->width, height); |
| 1130 | s->background_filled_p = 1; | ||
| 1131 | } | 1130 | } |
| 1132 | 1131 | ||
| 1133 | BView_SetHighColor (view, foreground); | 1132 | 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.") | |||
| 170 | ;; safe-local-variable-directories should be risky, | 170 | ;; safe-local-variable-directories should be risky, |
| 171 | ;; so use it as an arbitrary risky variable. | 171 | ;; so use it as an arbitrary risky variable. |
| 172 | (let ((test-alist '((safe-local-variable-directories . "some_val"))) | 172 | (let ((test-alist '((safe-local-variable-directories . "some_val"))) |
| 173 | (fakedir "/test1/test2/") | 173 | (fakedir default-directory) |
| 174 | (enable-local-eval t)) | 174 | (enable-local-eval t)) |
| 175 | (with-temp-buffer | 175 | (with-temp-buffer |
| 176 | (setq safe-local-variable-directories (list fakedir)) | 176 | (setq safe-local-variable-directories (list fakedir)) |