Merge from origin/emacs-29
aa5158630e
Use 'font-lock-extend-region-functions' in python-modeb7b82ecb2b
Fix python-info-docstring-pf42de74ebe
; * src/lread.c (read0, skip_lazy_string): Fix commentary...b6b384023a
Fix cancellation of Wdired916c2a19bd
Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/...f535c0e49d
Handle #@00 in new reader in a compatible way (bug#63722)40a758f5ce
; Minor fixes in documentation of recently-changed VC com...c0d7447e9d
; * etc/NEWS: Describe the Cairo XCB option. (Bug#63589)4205268675
Don't mark selection request events9f5249d5c8
Disable cairo-xcb support by defaulte5f42706ce
* lisp/progmodes/project.el: Move :safe from defcustom to...3afe4a42e9
* lisp/vc/vc-annotate.el (vc-annotate-mode-menu): Quote v...b62a2b08b8
Add vc-create/switch/print-branch to menu and update docu...d292d28229
Fix rare crashes in 'try_window_reusing_current_matrix'709d902002
Make last Tramp change less invasivea72a1f24fc
; Fix last change.5c6517a115
; * lisp/menu-bar.el (popup-menu): Doc fix.212884f2bf
; Fix last change.1b9812af80
; * etc/PROBLEMS: Document problem with GnuPG 2.4.1. (Bu...765edc204d
; Support SQLite3 extensions on macOS5aadb87d6f
Fix 'use-dialog-box-p' and friends # Conflicts: # etc/NEWS
This commit is contained in:
commit
e78318ad2e
22 changed files with 255 additions and 115 deletions
6
INSTALL
6
INSTALL
|
@ -394,6 +394,12 @@ typical 32-bit host, Emacs integers have 62 bits instead of 30.
|
|||
|
||||
Use --with-cairo to compile Emacs with Cairo drawing.
|
||||
|
||||
Use --with-cairo-xcb to also utilize the Cairo XCB backend on systems
|
||||
where it is available. While such a configuration is moderately
|
||||
faster when running over X connections with high latency, it is likely
|
||||
to crash when a new frame is created on a display connection opened
|
||||
after a display connection is closed.
|
||||
|
||||
Use --with-modules to build Emacs with support for dynamic modules.
|
||||
This needs a C compiler that supports '__attribute__ ((cleanup (...)))',
|
||||
as in GCC 3.4 and later.
|
||||
|
|
17
configure.ac
17
configure.ac
|
@ -459,6 +459,7 @@ OPTION_DEFAULT_ON([sqlite3],[don't compile with sqlite3 support])
|
|||
OPTION_DEFAULT_ON([lcms2],[don't compile with Little CMS support])
|
||||
OPTION_DEFAULT_ON([libsystemd],[don't compile with libsystemd support])
|
||||
OPTION_DEFAULT_ON([cairo],[don't compile with Cairo drawing])
|
||||
OPTION_DEFAULT_OFF([cairo-xcb], [use XCB surfaces for Cairo support])
|
||||
OPTION_DEFAULT_ON([xml2],[don't compile with XML parsing support])
|
||||
OPTION_DEFAULT_OFF([imagemagick],[compile with ImageMagick image support])
|
||||
OPTION_DEFAULT_ON([native-image-api], [don't use native image APIs (GDI+ on Windows)])
|
||||
|
@ -3571,14 +3572,14 @@ if test "${HAVE_X11}" = "yes"; then
|
|||
CAIRO_MODULE="cairo >= $CAIRO_REQUIRED"
|
||||
EMACS_CHECK_MODULES([CAIRO], [$CAIRO_MODULE])
|
||||
if test $HAVE_CAIRO = yes; then
|
||||
CAIRO_XCB_MODULE="cairo-xcb >= $CAIRO_REQUIRED"
|
||||
EMACS_CHECK_MODULES([CAIRO_XCB], [$CAIRO_XCB_MODULE])
|
||||
if test $HAVE_CAIRO_XCB = yes; then
|
||||
CAIRO_CFLAGS="$CAIRO_CFLAGS $CAIRO_XCB_CFLAGS"
|
||||
CAIRO_LIBS="$CAIRO_LIBS $CAIRO_XCB_LIBS"
|
||||
AC_DEFINE([USE_CAIRO_XCB], [1],
|
||||
[Define to 1 if cairo XCB surfaces are available.])
|
||||
fi
|
||||
AS_IF([test "x$with_cairo_xcb" = "xyes"], [
|
||||
CAIRO_XCB_MODULE="cairo-xcb >= $CAIRO_REQUIRED"
|
||||
EMACS_CHECK_MODULES([CAIRO_XCB], [$CAIRO_XCB_MODULE])
|
||||
AS_IF([test "x$HAVE_CAIRO_XCB" = "xyes"], [
|
||||
CAIRO_CFLAGS="$CAIRO_CFLAGS $CAIRO_XCB_CFLAGS"
|
||||
CAIRO_LIBS="$CAIRO_LIBS $CAIRO_XCB_LIBS"
|
||||
AC_DEFINE([USE_CAIRO_XCB], [1],
|
||||
[Define to 1 if cairo XCB surfaces are available.])])])
|
||||
AC_DEFINE([USE_CAIRO], [1], [Define to 1 if using cairo.])
|
||||
CFLAGS="$CFLAGS $CAIRO_CFLAGS"
|
||||
LIBS="$LIBS $CAIRO_LIBS"
|
||||
|
|
|
@ -999,6 +999,10 @@ Display the change history for the current fileset
|
|||
Display the change history for the current repository
|
||||
(@code{vc-print-root-log}).
|
||||
|
||||
@item C-x v b l
|
||||
Display the change history for another branch
|
||||
(@code{vc-print-branch-log}).
|
||||
|
||||
@item C-x v I
|
||||
Display the changes that a ``pull'' operation will retrieve
|
||||
(@code{vc-log-incoming}).
|
||||
|
@ -1063,6 +1067,14 @@ showing only the first line of each log entry. However, you can type
|
|||
@file{*vc-change-log*} buffer to reveal the entire log entry for the
|
||||
revision at point. A second @key{RET} hides it again.
|
||||
|
||||
@kindex C-x v b l
|
||||
@findex vc-print-branch-log
|
||||
@kbd{C-x v b l @var{branch-name} @key{RET}} (@code{vc-print-branch-log})
|
||||
displays a @file{*vc-change-log*} buffer showing the history of the
|
||||
version-controlled directory tree, like @code{vc-print-root-log} does,
|
||||
but it shows the history of a branch other than the current one; it
|
||||
prompts for the branch whose history to display.
|
||||
|
||||
@kindex C-x v I
|
||||
@kindex C-x v O
|
||||
@findex vc-log-incoming
|
||||
|
@ -1523,6 +1535,8 @@ switch to another branch using the @kbd{svn switch} command. With
|
|||
Mercurial, command @kbd{hg update} is used to switch to another
|
||||
branch.
|
||||
|
||||
@kindex C-x v b s
|
||||
@findex vc-switch-branch
|
||||
The VC command to switch to another branch in the current directory
|
||||
is @kbd{C-x v b s @var{branch-name} @key{RET}} (@code{vc-switch-branch}).
|
||||
|
||||
|
@ -1673,9 +1687,12 @@ branch ID for a branch starting at the current revision. For example,
|
|||
if the current revision is 2.5, the branch ID should be 2.5.1, 2.5.2,
|
||||
and so on, depending on the number of existing branches at that point.
|
||||
|
||||
@kindex C-x v b c
|
||||
@findex vc-create-branch
|
||||
This procedure will not work for distributed version control systems
|
||||
like git or Mercurial. For those systems you should use the command
|
||||
@code{vc-create-branch} (@kbd{C-x v b c}) instead.
|
||||
@code{vc-create-branch} (@w{@kbd{C-x v b c @var{branch-name} @key{RET}}})
|
||||
instead.
|
||||
|
||||
To create a new branch at an older revision (one that is no longer
|
||||
the head of a branch), first select that revision (@pxref{Switching
|
||||
|
|
|
@ -2174,13 +2174,14 @@ will not have serious consequences. @code{yes-or-no-p} is suitable for
|
|||
more momentous questions, since it requires three or four characters to
|
||||
answer.
|
||||
|
||||
If either of these functions is called in a command that was invoked
|
||||
using the mouse---more precisely, if @code{last-nonmenu-event}
|
||||
(@pxref{Command Loop Info}) is either @code{nil} or a list---then it
|
||||
uses a dialog box or pop-up menu to ask the question. Otherwise, it
|
||||
uses keyboard input. You can force use either of the mouse or of keyboard
|
||||
input by binding @code{last-nonmenu-event} to a suitable value around
|
||||
the call.
|
||||
If either of these functions is called in a command that was
|
||||
invoked using the mouse or some other window-system gesture, or in a
|
||||
command invoked via a menu, then they use a dialog box or pop-up menu
|
||||
to ask the question if dialog boxes are supported. Otherwise, they
|
||||
use keyboard input. You can force use either of the mouse or of
|
||||
keyboard input by binding @code{last-nonmenu-event} to a suitable
|
||||
value around the call---bind it to @code{t} to force keyboard
|
||||
interaction, and to a list to force dialog boxes.
|
||||
|
||||
Both @code{yes-or-no-p} and @code{y-or-n-p} use the minibuffer.
|
||||
|
||||
|
@ -2386,13 +2387,14 @@ Normally, @code{map-y-or-n-p} binds @code{cursor-in-echo-area} while
|
|||
prompting. But if @var{no-cursor-in-echo-area} is non-@code{nil}, it
|
||||
does not do that.
|
||||
|
||||
If @code{map-y-or-n-p} is called in a command that was invoked using the
|
||||
mouse---more precisely, if @code{last-nonmenu-event} (@pxref{Command
|
||||
Loop Info}) is either @code{nil} or a list---then it uses a dialog box
|
||||
or pop-up menu to ask the question. In this case, it does not use
|
||||
keyboard input or the echo area. You can force use either of the mouse or
|
||||
of keyboard input by binding @code{last-nonmenu-event} to a suitable
|
||||
value around the call.
|
||||
If @code{map-y-or-n-p} is called in a command that was invoked using
|
||||
the mouse or some other window-system gesture, or a command invoked
|
||||
via a menu, then it uses a dialog box or pop-up menu to ask the
|
||||
question if dialog boxes are supported. In this case, it does not use
|
||||
keyboard input or the echo area. You can force use either of the
|
||||
mouse or of keyboard input by binding @code{last-nonmenu-event} to a
|
||||
suitable value around the call---bind it to @code{t} to force keyboard
|
||||
interaction, and to a list to force dialog boxes.
|
||||
|
||||
The return value of @code{map-y-or-n-p} is the number of objects acted on.
|
||||
@end defun
|
||||
|
|
46
etc/NEWS.29
46
etc/NEWS.29
|
@ -91,24 +91,6 @@ available, and includes support for animated WebP images. To disable
|
|||
WebP support, use the '--without-webp' configure flag. Image
|
||||
specifiers can now use ':type webp'.
|
||||
|
||||
+++
|
||||
** Emacs has been ported to the Haiku operating system.
|
||||
The configuration process should automatically detect and build for
|
||||
Haiku. There is also an optional window-system port to Haiku, which
|
||||
can be enabled by configuring Emacs with the option '--with-be-app',
|
||||
which will require the Haiku Application Kit development headers and a
|
||||
C++ compiler to be present on your system. If Emacs is not built with
|
||||
the option '--with-be-app', the resulting Emacs will only run in
|
||||
text-mode terminals.
|
||||
|
||||
To enable Cairo support, ensure that the Cairo and FreeType
|
||||
development files are present on your system, and configure Emacs with
|
||||
'--with-be-cairo'.
|
||||
|
||||
Unlike X, there is no compile-time option to enable or disable
|
||||
double-buffering; it is always enabled. To disable it, change the
|
||||
frame parameter 'inhibit-double-buffering' instead.
|
||||
|
||||
---
|
||||
** Emacs now installs the ".pdmp" file using a unique fingerprint in the name.
|
||||
The file is typically installed using a file name akin to
|
||||
|
@ -126,6 +108,16 @@ option '--without-xinput2' to disable this support.
|
|||
'(featurep 'xinput2)' can be used to test for the presence of XInput 2
|
||||
support from Lisp programs.
|
||||
|
||||
---
|
||||
** Emacs can now be optionally built with the Cairo XCB backend.
|
||||
Configure Emacs with the '--with-cairo-xcb' option to use the Cairo
|
||||
XCB backend; the default is not to use it. This backend makes Emacs
|
||||
moderately faster when running over X connections with high latency,
|
||||
but is currently known to crash when Emacs repeatedly closes and opens
|
||||
a display connection to the same terminal; this could happen, for
|
||||
example, if you repeatedly visit files via emacsclient in a single
|
||||
client frame, each time deleting the frame with 'C-x C-c'.
|
||||
|
||||
+++
|
||||
** Emacs now supports being built with pure GTK.
|
||||
To use this option, make sure the GTK 3 (version 3.22.23 or later) and
|
||||
|
@ -144,6 +136,24 @@ automatically switch to text-mode interface (thus emulating '-nw') if
|
|||
it cannot determine the default display; it will instead complain and
|
||||
ask you to invoke it with the explicit '-nw' option.
|
||||
|
||||
+++
|
||||
** Emacs has been ported to the Haiku operating system.
|
||||
The configuration process should automatically detect and build for
|
||||
Haiku. There is also an optional window-system port to Haiku, which
|
||||
can be enabled by configuring Emacs with the option '--with-be-app',
|
||||
which will require the Haiku Application Kit development headers and a
|
||||
C++ compiler to be present on your system. If Emacs is not built with
|
||||
the option '--with-be-app', the resulting Emacs will only run in
|
||||
text-mode terminals.
|
||||
|
||||
To enable Cairo support, ensure that the Cairo and FreeType
|
||||
development files are present on your system, and configure Emacs with
|
||||
'--with-be-cairo'.
|
||||
|
||||
Unlike X, there is no compile-time option to enable or disable
|
||||
double-buffering; it is always enabled. To disable it, change the
|
||||
frame parameter 'inhibit-double-buffering' instead.
|
||||
|
||||
---
|
||||
** Emacs no longer reduces the size of the Japanese dictionary.
|
||||
Building Emacs includes generation of a Japanese dictionary, which is
|
||||
|
|
|
@ -516,6 +516,13 @@ directory copy is ineffective.
|
|||
This is due to an arbitrary limit in certain versions of awk.
|
||||
The solution is to use gawk (GNU awk).
|
||||
|
||||
*** Saving, via EasyPG, a file encrypted with GnuPG hangs
|
||||
|
||||
This is known to happen with GnuPG v2.4.1. The only known workaround
|
||||
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).
|
||||
|
||||
** Problems with hostname resolution
|
||||
|
||||
*** Emacs does not know your host's fully-qualified domain name.
|
||||
|
|
|
@ -2567,10 +2567,11 @@ See `menu-bar-mode' for more information."
|
|||
binding)))
|
||||
|
||||
(defun popup-menu (menu &optional position prefix from-menu-bar)
|
||||
"Popup the given menu and call the selected option.
|
||||
"Popup MENU and call the selected option.
|
||||
MENU can be a keymap, an easymenu-style menu or a list of keymaps as for
|
||||
`x-popup-menu'.
|
||||
The menu is shown at the place where POSITION specifies.
|
||||
The menu is shown at the location specified by POSITION, which
|
||||
defaults to the place of the mouse click that popped the menu.
|
||||
For the form of POSITION, see `popup-menu-normalize-position'.
|
||||
PREFIX is the prefix argument (if any) to pass to the command.
|
||||
FROM-MENU-BAR, if non-nil, means we are dropping one of menu-bar's menus."
|
||||
|
|
|
@ -1670,9 +1670,8 @@ The structure consists of method, user, domain, host, port,
|
|||
localname (file name on remote host), and hop.
|
||||
|
||||
Unless NODEFAULT is non-nil, method, user and host are expanded
|
||||
to their default values. Hop is set to nil if NODEFAULT is non-nil.
|
||||
|
||||
For the other file name parts, no default values are used."
|
||||
to their default values. For the other file name parts, no
|
||||
default values are used."
|
||||
(save-match-data
|
||||
(unless (tramp-tramp-file-p name)
|
||||
(tramp-user-error nil "Not a Tramp file name: \"%s\"" name))
|
||||
|
@ -1698,8 +1697,7 @@ For the other file name parts, no default values are used."
|
|||
(when (string-match tramp-postfix-ipv6-regexp host)
|
||||
(setq host (replace-match "" nil t host))))
|
||||
|
||||
(if nodefault
|
||||
(setq hop nil)
|
||||
(unless nodefault
|
||||
(when hop
|
||||
(setq v (tramp-dissect-hop-name hop)
|
||||
hop (and hop (tramp-make-tramp-hop-name v))))
|
||||
|
@ -4137,8 +4135,10 @@ Let-bind it when necessary.")
|
|||
(defun tramp-handle-file-name-as-directory (file)
|
||||
"Like `file-name-as-directory' for Tramp files."
|
||||
;; `file-name-as-directory' would be sufficient except localname is
|
||||
;; the empty string.
|
||||
(let ((v (tramp-dissect-file-name file t)))
|
||||
;; the empty string. Suppress adding a hop to
|
||||
;; `tramp-default-proxies-alist' due to non-expanded default values.
|
||||
(let ((v (tramp-dissect-file-name file t))
|
||||
tramp-default-proxies-alist)
|
||||
;; Run the command on the localname portion only unless we are in
|
||||
;; completion mode.
|
||||
(tramp-make-tramp-file-name
|
||||
|
@ -4227,8 +4227,10 @@ Let-bind it when necessary.")
|
|||
"Like `file-name-directory' for Tramp files."
|
||||
;; Everything except the last filename thing is the directory. We
|
||||
;; cannot apply `with-parsed-tramp-file-name', because this expands
|
||||
;; the remote file name parts.
|
||||
(let ((v (tramp-dissect-file-name file t)))
|
||||
;; the remote file name parts. Suppress adding a hop to
|
||||
;; `tramp-default-proxies-alist' due to non-expanded default values.
|
||||
(let ((v (tramp-dissect-file-name file t))
|
||||
tramp-default-proxies-alist)
|
||||
;; Run the command on the localname portion only. If this returns
|
||||
;; nil, mark also the localname part of `v' as nil.
|
||||
(tramp-make-tramp-file-name
|
||||
|
|
|
@ -412,8 +412,8 @@ the buffer's value of `default-directory'."
|
|||
|
||||
(defcustom project-vc-ignores nil
|
||||
"List of patterns to add to `project-ignores'."
|
||||
:type '(repeat string)
|
||||
:safe #'listp)
|
||||
:type '(repeat string))
|
||||
;;;###autoload(put 'project-vc-ignores 'safe-local-variable #'listp)
|
||||
|
||||
(defcustom project-vc-merge-submodules t
|
||||
"Non-nil to consider submodules part of the parent project.
|
||||
|
@ -422,14 +422,14 @@ After changing this variable (using Customize or .dir-locals.el)
|
|||
you might have to restart Emacs to see the effect."
|
||||
:type 'boolean
|
||||
:version "28.1"
|
||||
:package-version '(project . "0.2.0")
|
||||
:safe #'booleanp)
|
||||
:package-version '(project . "0.2.0"))
|
||||
;;;###autoload(put 'project-vc-merge-submodules 'safe-local-variable #'booleanp)
|
||||
|
||||
(defcustom project-vc-include-untracked t
|
||||
"When non-nil, the VC-aware project backend includes untracked files."
|
||||
:type 'boolean
|
||||
:version "29.1"
|
||||
:safe #'booleanp)
|
||||
:version "29.1")
|
||||
;;;###autoload(put 'project-vc-include-untracked 'safe-local-variable #'booleanp)
|
||||
|
||||
(defcustom project-vc-name nil
|
||||
"When non-nil, the name of the current VC-aware project.
|
||||
|
@ -439,8 +439,8 @@ its name, is by setting this in .dir-locals.el."
|
|||
:type '(choice (const :tag "Default to the base name" nil)
|
||||
(string :tag "Custom name"))
|
||||
:version "29.1"
|
||||
:package-version '(project . "0.9.0")
|
||||
:safe #'stringp)
|
||||
:package-version '(project . "0.9.0"))
|
||||
;;;###autoload(put 'project-vc-name 'safe-local-variable #'stringp)
|
||||
|
||||
;; Not using regexps because these wouldn't work in Git pathspecs, in
|
||||
;; case we decide we need to be able to list nested projects.
|
||||
|
@ -467,8 +467,8 @@ In either case, their behavior will still obey the relevant
|
|||
variables, such as `project-vc-ignores' or `project-vc-name'."
|
||||
:type '(repeat string)
|
||||
:version "29.1"
|
||||
:package-version '(project . "0.9.0")
|
||||
:safe (lambda (val) (and (listp val) (cl-every #'stringp val))))
|
||||
:package-version '(project . "0.9.0"))
|
||||
;;;###autoload(put 'project-vc-extra-root-markers 'safe-local-variable (lambda (val) (and (listp val) (cl-every #'stringp val))))
|
||||
|
||||
;; FIXME: Using the current approach, major modes are supposed to set
|
||||
;; this variable to a buffer-local value. So we don't have access to
|
||||
|
@ -1476,8 +1476,8 @@ Used by `project-kill-buffers'."
|
|||
:type 'boolean
|
||||
:version "29.1"
|
||||
:group 'project
|
||||
:package-version '(project . "0.8.2")
|
||||
:safe #'booleanp)
|
||||
:package-version '(project . "0.8.2"))
|
||||
;;;###autoload(put 'project-kill-buffers-display-buffer-list 'safe-local-variable #'booleanp)
|
||||
|
||||
(defun project--buffer-check (buf conditions)
|
||||
"Check if buffer BUF matches any element of the list CONDITIONS.
|
||||
|
|
|
@ -869,18 +869,22 @@ decorators, exceptions, and assignments.")
|
|||
Which one will be chosen depends on the value of
|
||||
`font-lock-maximum-decoration'.")
|
||||
|
||||
(defun python-font-lock-extend-region (beg end _old-len)
|
||||
"Extend font-lock region given by BEG and END to statement boundaries."
|
||||
(save-excursion
|
||||
(save-match-data
|
||||
(goto-char beg)
|
||||
(python-nav-beginning-of-statement)
|
||||
(setq beg (point))
|
||||
(goto-char end)
|
||||
(python-nav-end-of-statement)
|
||||
(setq end (point))
|
||||
(cons beg end))))
|
||||
|
||||
(defvar font-lock-beg)
|
||||
(defvar font-lock-end)
|
||||
(defun python-font-lock-extend-region ()
|
||||
"Extend font-lock region to statement boundaries."
|
||||
(let ((beg font-lock-beg)
|
||||
(end font-lock-end))
|
||||
(goto-char beg)
|
||||
(python-nav-beginning-of-statement)
|
||||
(beginning-of-line)
|
||||
(when (< (point) beg)
|
||||
(setq font-lock-beg (point)))
|
||||
(goto-char end)
|
||||
(python-nav-end-of-statement)
|
||||
(when (< end (point))
|
||||
(setq font-lock-end (point)))
|
||||
(or (/= beg font-lock-beg) (/= end font-lock-end))))
|
||||
|
||||
(defconst python-syntax-propertize-function
|
||||
(syntax-propertize-rules
|
||||
|
@ -6078,8 +6082,7 @@ point's current `syntax-ppss'."
|
|||
(let ((counter 1)
|
||||
(indentation (current-indentation))
|
||||
(backward-sexp-point)
|
||||
(re (concat "[uU]?[rR]?"
|
||||
(python-rx string-delimiter))))
|
||||
(re "[uU]?[rR]?[\"']"))
|
||||
(when (and
|
||||
(not (python-info-assignment-statement-p))
|
||||
(looking-at-p re)
|
||||
|
@ -6100,9 +6103,7 @@ point's current `syntax-ppss'."
|
|||
backward-sexp-point))
|
||||
(setq last-backward-sexp-point
|
||||
backward-sexp-point))
|
||||
(looking-at-p
|
||||
(concat "[uU]?[rR]?"
|
||||
(python-rx string-delimiter))))))
|
||||
(looking-at-p re))))
|
||||
;; Previous sexp was a string, restore point.
|
||||
(goto-char backward-sexp-point)
|
||||
(cl-incf counter))
|
||||
|
@ -6767,9 +6768,9 @@ implementations: `python-mode' and `python-ts-mode'."
|
|||
`(,python-font-lock-keywords
|
||||
nil nil nil nil
|
||||
(font-lock-syntactic-face-function
|
||||
. python-font-lock-syntactic-face-function)
|
||||
(font-lock-extend-after-change-region-function
|
||||
. python-font-lock-extend-region)))
|
||||
. python-font-lock-syntactic-face-function)))
|
||||
(add-hook 'font-lock-extend-region-functions
|
||||
#'python-font-lock-extend-region nil t)
|
||||
(setq-local syntax-propertize-function
|
||||
python-syntax-propertize-function)
|
||||
(setq-local imenu-create-index-function
|
||||
|
|
|
@ -3591,6 +3591,8 @@ confusing to some users.")
|
|||
"Return non-nil if the current command should prompt the user via a dialog box."
|
||||
(and last-input-event ; not during startup
|
||||
(or (consp last-nonmenu-event) ; invoked by a mouse event
|
||||
(and (null last-nonmenu-event)
|
||||
(consp last-input-event))
|
||||
from--tty-menu-p) ; invoked via TTY menu
|
||||
use-dialog-box))
|
||||
|
||||
|
@ -3623,8 +3625,9 @@ If the user enters `recenter', `scroll-up', or `scroll-down'
|
|||
responses, perform the requested window recentering or scrolling
|
||||
and ask again.
|
||||
|
||||
Under a windowing system a dialog box will be used if `last-nonmenu-event'
|
||||
is nil and `use-dialog-box' is non-nil.
|
||||
If dialog boxes are supported, this function will use a dialog box
|
||||
if `use-dialog-box' is non-nil and the last input event was produced
|
||||
by a mouse, or by some window-system gesture, or via a menu.
|
||||
|
||||
By default, this function uses the minibuffer to read the key.
|
||||
If `y-or-n-p-use-read-key' is non-nil, `read-key' is used
|
||||
|
|
|
@ -330,7 +330,7 @@ cover the range from the oldest annotation to the newest."
|
|||
["Show changeset diff of revision at line"
|
||||
vc-annotate-show-changeset-diff-revision-at-line
|
||||
:enable
|
||||
(eq 'repository (vc-call-backend ,vc-annotate-backend 'revision-granularity))
|
||||
(eq 'repository (vc-call-backend vc-annotate-backend 'revision-granularity))
|
||||
:help "Visit the diff of the revision at line from its previous revision"]
|
||||
["Visit revision at line" vc-annotate-find-revision-at-line
|
||||
:help "Visit the revision identified in the current line"]))
|
||||
|
|
|
@ -897,6 +897,15 @@ In the latter case, VC mode is deactivated for this buffer."
|
|||
(bindings--define-key map [vc-create-tag]
|
||||
'(menu-item "Create Tag" vc-create-tag
|
||||
:help "Create version tag"))
|
||||
(bindings--define-key map [vc-print-branch-log]
|
||||
'(menu-item "Show Branch History..." vc-print-branch-log
|
||||
:help "List the change log for another branch"))
|
||||
(bindings--define-key map [vc-switch-branch]
|
||||
'(menu-item "Switch Branch..." vc-switch-branch
|
||||
:help "Switch to another branch"))
|
||||
(bindings--define-key map [vc-create-branch]
|
||||
'(menu-item "Create Branch..." vc-create-branch
|
||||
:help "Make a new branch"))
|
||||
(bindings--define-key map [separator1] menu-bar-separator)
|
||||
(bindings--define-key map [vc-annotate]
|
||||
'(menu-item "Annotate" vc-annotate
|
||||
|
|
|
@ -2504,9 +2504,13 @@ Otherwise, return nil."
|
|||
(defun vc-create-tag (dir name branchp)
|
||||
"Descending recursively from DIR, make a tag called NAME.
|
||||
For each registered file, the working revision becomes part of
|
||||
the named configuration. If the prefix argument BRANCHP is
|
||||
given, the tag is made as a new branch and the files are
|
||||
checked out in that new branch."
|
||||
the configuration identified by the tag.
|
||||
If BRANCHP is non-nil (interactively, the prefix argument), the
|
||||
tag NAME is a new branch, and the files are checked out and
|
||||
updated to reflect their revisions on that branch.
|
||||
In interactive use, DIR is `default-directory' for repository-granular
|
||||
VCSes (all the modern decentralized VCSes belong to this group),
|
||||
otherwise the command will prompt for DIR."
|
||||
(interactive
|
||||
(let ((granularity
|
||||
(vc-call-backend (vc-responsible-backend default-directory)
|
||||
|
@ -2529,9 +2533,23 @@ checked out in that new branch."
|
|||
|
||||
;;;###autoload
|
||||
(defun vc-create-branch (dir name)
|
||||
"Descending recursively from DIR, make a branch called NAME.
|
||||
After a new branch is made, the files are checked out in that new branch.
|
||||
Uses `vc-create-tag' with the non-nil arg `branchp'."
|
||||
"Make a branch called NAME in directory DIR.
|
||||
After making the new branch, check out the branch, i.e. update the
|
||||
files in the tree to their revisions on the branch.
|
||||
|
||||
Interactively, prompt for the NAME of the branch.
|
||||
|
||||
With VCSes that maintain version information per file, this command also
|
||||
prompts for the directory DIR whose files, recursively, will be tagged
|
||||
with the NAME of new branch. For VCSes that maintain version
|
||||
information for the entire repository (all the modern decentralized
|
||||
VCSes belong to this group), DIR is always the `default-directory'.
|
||||
|
||||
Finally, this command might prompt for the branch or tag from which to
|
||||
start (\"fork\") the new branch, with completion candidates including
|
||||
all the known branches and tags in the repository.
|
||||
|
||||
This command invokes `vc-create-tag' with the non-nil BRANCHP argument."
|
||||
(interactive
|
||||
(let ((granularity
|
||||
(vc-call-backend (vc-responsible-backend default-directory)
|
||||
|
@ -2545,17 +2563,17 @@ Uses `vc-create-tag' with the non-nil arg `branchp'."
|
|||
|
||||
;;;###autoload
|
||||
(defun vc-retrieve-tag (dir name &optional branchp)
|
||||
"For each file in or below DIR, retrieve their tagged version NAME.
|
||||
"For each file in or below DIR, retrieve their version identified by tag NAME.
|
||||
NAME can name a branch, in which case this command will switch to the
|
||||
named branch in the directory DIR.
|
||||
Interactively, prompt for DIR only for VCS that works at file level;
|
||||
otherwise use the repository root of the current buffer.
|
||||
otherwise use the root directory of the current buffer's VC tree.
|
||||
If NAME is empty, it refers to the latest revisions of the current branch.
|
||||
If locking is used for the files in DIR, then there must not be any
|
||||
locked files at or below DIR (but if NAME is empty, locked files are
|
||||
allowed and simply skipped).
|
||||
If the prefix argument BRANCHP is given, switch the branch
|
||||
and check out the files in that branch.
|
||||
If BRANCHP is non-nil (interactively, the prefix argument), switch to the
|
||||
branch and check out and update the files to their version on that branch.
|
||||
This function runs the hook `vc-retrieve-tag-hook' when finished."
|
||||
(interactive
|
||||
(let* ((granularity
|
||||
|
@ -2596,7 +2614,12 @@ This function runs the hook `vc-retrieve-tag-hook' when finished."
|
|||
;;;###autoload
|
||||
(defun vc-switch-branch (dir name)
|
||||
"Switch to the branch NAME in the directory DIR.
|
||||
If NAME is empty, it refers to the latest revisions of the current branch.
|
||||
If NAME is empty, it refers to the latest revision of the current branch.
|
||||
Interactively, prompt for DIR only for VCS that works at file level;
|
||||
otherwise use the root directory of the current buffer's VC tree.
|
||||
Interactively, prompt for the NAME of the branch.
|
||||
After switching to the branch, check out and update the files to their
|
||||
version on that branch.
|
||||
Uses `vc-retrieve-tag' with the non-nil arg `branchp'."
|
||||
(interactive
|
||||
(let* ((granularity
|
||||
|
@ -2851,7 +2874,8 @@ with its diffs (if the underlying VCS backend supports that)."
|
|||
|
||||
;;;###autoload
|
||||
(defun vc-print-branch-log (branch)
|
||||
"Show the change log for BRANCH root in a window."
|
||||
"Show the change log for BRANCH in another window.
|
||||
The command prompts for the branch whose change log to show."
|
||||
(interactive
|
||||
(let* ((backend (vc-responsible-backend default-directory))
|
||||
(rootdir (vc-call-backend backend 'root default-directory)))
|
||||
|
|
|
@ -470,6 +470,9 @@ non-nil means return old filename."
|
|||
(insert wdired--old-content)
|
||||
(goto-char wdired--old-point))
|
||||
(wdired-change-to-dired-mode)
|
||||
;; Make sure the display is in synch, and all the variables are set
|
||||
;; correctly.
|
||||
(dired-revert)
|
||||
(set-buffer-modified-p nil)
|
||||
(setq buffer-undo-list nil)
|
||||
(message "Changes aborted"))
|
||||
|
|
16
src/fns.c
16
src/fns.c
|
@ -3213,16 +3213,21 @@ If the `use-short-answers' variable is non-nil, instead of asking for
|
|||
\"yes\" or \"no\", this function will ask for \"y\" or \"n\" (and
|
||||
ignore the value of `yes-or-no-prompt').
|
||||
|
||||
If dialog boxes are supported, a dialog box will be used
|
||||
if `last-nonmenu-event' is nil, and `use-dialog-box' is non-nil. */)
|
||||
If dialog boxes are supported, this function will use a dialog box
|
||||
if `use-dialog-box' is non-nil and the last input event was produced
|
||||
by a mouse, or by some window-system gesture, or via a menu. */)
|
||||
(Lisp_Object prompt)
|
||||
{
|
||||
Lisp_Object ans;
|
||||
Lisp_Object ans, val;
|
||||
|
||||
CHECK_STRING (prompt);
|
||||
|
||||
if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event))
|
||||
&& use_dialog_box && ! NILP (last_input_event))
|
||||
if (!NILP (last_input_event)
|
||||
&& (CONSP (last_nonmenu_event)
|
||||
|| (NILP (last_nonmenu_event) && CONSP (last_input_event))
|
||||
|| (val = find_symbol_value (Qfrom__tty_menu_p),
|
||||
(!NILP (val) && !EQ (val, Qunbound))))
|
||||
&& use_dialog_box)
|
||||
{
|
||||
Lisp_Object pane, menu, obj;
|
||||
redisplay_preserve_echo_area (4);
|
||||
|
@ -6397,4 +6402,5 @@ For best results this should end in a space. */);
|
|||
defsubr (&Sbuffer_line_statistics);
|
||||
|
||||
DEFSYM (Qreal_this_command, "real-this-command");
|
||||
DEFSYM (Qfrom__tty_menu_p, "from--tty-menu-p");
|
||||
}
|
||||
|
|
17
src/lread.c
17
src/lread.c
|
@ -3402,8 +3402,9 @@ read_bool_vector (Lisp_Object readcharfun)
|
|||
}
|
||||
|
||||
/* Skip (and optionally remember) a lazily-loaded string
|
||||
preceded by "#@". */
|
||||
static void
|
||||
preceded by "#@". Return true if this was a normal skip,
|
||||
false if we read #@00 (which skips to EOB). */
|
||||
static bool
|
||||
skip_lazy_string (Lisp_Object readcharfun)
|
||||
{
|
||||
ptrdiff_t nskip = 0;
|
||||
|
@ -3429,9 +3430,9 @@ skip_lazy_string (Lisp_Object readcharfun)
|
|||
digits++;
|
||||
if (digits == 2 && nskip == 0)
|
||||
{
|
||||
/* #@00 means "skip to end" */
|
||||
/* #@00 means "read nil and skip to end" */
|
||||
skip_dyn_eof (readcharfun);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3478,6 +3479,8 @@ skip_lazy_string (Lisp_Object readcharfun)
|
|||
else
|
||||
/* Skip that many bytes. */
|
||||
skip_dyn_bytes (readcharfun, nskip);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Given a lazy-loaded string designator VAL, return the actual string.
|
||||
|
@ -3935,8 +3938,10 @@ read0 (Lisp_Object readcharfun, bool locate_syms)
|
|||
/* #@NUMBER is used to skip NUMBER following bytes.
|
||||
That's used in .elc files to skip over doc strings
|
||||
and function definitions that can be loaded lazily. */
|
||||
skip_lazy_string (readcharfun);
|
||||
goto read_obj;
|
||||
if (skip_lazy_string (readcharfun))
|
||||
goto read_obj;
|
||||
obj = Qnil; /* #@00 skips to EOB and yields nil. */
|
||||
break;
|
||||
|
||||
case '$':
|
||||
/* #$ -- reference to lazy-loaded string */
|
||||
|
|
|
@ -376,6 +376,13 @@ mark_pgtkterm (void)
|
|||
for (i = 0; i < n; i++)
|
||||
{
|
||||
union buffered_input_event *ev = &evq->q[i];
|
||||
|
||||
/* Selection requests don't have Lisp object members. */
|
||||
|
||||
if (ev->ie.kind == SELECTION_REQUEST_EVENT
|
||||
|| ev->ie.kind == SELECTION_CLEAR_EVENT)
|
||||
continue;
|
||||
|
||||
mark_object (ev->ie.x);
|
||||
mark_object (ev->ie.y);
|
||||
mark_object (ev->ie.frame_or_window);
|
||||
|
|
10
src/sqlite.c
10
src/sqlite.c
|
@ -730,10 +730,12 @@ Only modules on Emacs' list of allowed modules can be loaded. */)
|
|||
bool do_allow = false;
|
||||
for (const char **allow = allowlist; *allow; allow++)
|
||||
{
|
||||
if (strlen (*allow) < strlen (name)
|
||||
&& !strncmp (*allow, name, strlen (*allow))
|
||||
&& (!strcmp (name + strlen (*allow), ".so")
|
||||
|| !strcasecmp (name + strlen (*allow), ".dll")))
|
||||
ptrdiff_t allow_len = strlen (*allow);
|
||||
if (allow_len < strlen (name)
|
||||
&& !strncmp (*allow, name, allow_len)
|
||||
&& (!strcmp (name + allow_len, ".so")
|
||||
||!strcmp (name + allow_len, ".dylib")
|
||||
|| !strcasecmp (name + allow_len, ".dll")))
|
||||
{
|
||||
do_allow = true;
|
||||
break;
|
||||
|
|
|
@ -21096,8 +21096,10 @@ try_window_reusing_current_matrix (struct window *w)
|
|||
pt_row = first_row_to_display;
|
||||
}
|
||||
|
||||
if (first_row_to_display->y >= yb)
|
||||
return false;
|
||||
|
||||
/* Start displaying at the start of first_row_to_display. */
|
||||
eassert (first_row_to_display->y < yb);
|
||||
init_to_row_start (&it, w, first_row_to_display);
|
||||
|
||||
nrows_scrolled = (MATRIX_ROW_VPOS (first_reusable_row, w->current_matrix)
|
||||
|
|
|
@ -729,6 +729,7 @@ u\"\\n\""
|
|||
(845 . font-lock-string-face) (886))))
|
||||
|
||||
(ert-deftest python-font-lock-escape-sequence-bytes-newline ()
|
||||
:expected-result :failed
|
||||
(python-tests-assert-faces
|
||||
"b'\\n'
|
||||
b\"\\n\""
|
||||
|
@ -741,6 +742,7 @@ b\"\\n\""
|
|||
(11 . font-lock-doc-face))))
|
||||
|
||||
(ert-deftest python-font-lock-escape-sequence-hex-octal ()
|
||||
:expected-result :failed
|
||||
(python-tests-assert-faces
|
||||
"b'\\x12 \\777 \\1\\23'
|
||||
'\\x12 \\777 \\1\\23'"
|
||||
|
@ -761,6 +763,7 @@ b\"\\n\""
|
|||
(36 . font-lock-doc-face))))
|
||||
|
||||
(ert-deftest python-font-lock-escape-sequence-unicode ()
|
||||
:expected-result :failed
|
||||
(python-tests-assert-faces
|
||||
"b'\\u1234 \\U00010348 \\N{Plus-Minus Sign}'
|
||||
'\\u1234 \\U00010348 \\N{Plus-Minus Sign}'"
|
||||
|
@ -775,6 +778,7 @@ b\"\\n\""
|
|||
(80 . font-lock-doc-face))))
|
||||
|
||||
(ert-deftest python-font-lock-raw-escape-sequence ()
|
||||
:expected-result :failed
|
||||
(python-tests-assert-faces
|
||||
"rb'\\x12 \123 \\n'
|
||||
r'\\x12 \123 \\n \\u1234 \\U00010348 \\N{Plus-Minus Sign}'"
|
||||
|
@ -6710,6 +6714,18 @@ class Class:
|
|||
(python-tests-look-at "'''Not a method docstring.'''")
|
||||
(should (not (python-info-docstring-p)))))
|
||||
|
||||
(ert-deftest python-info-docstring-p-7 ()
|
||||
"Test string in a dictionary."
|
||||
(python-tests-with-temp-buffer
|
||||
"
|
||||
{'Not a docstring': 1}
|
||||
'Also not a docstring'
|
||||
"
|
||||
(python-tests-look-at "Not a docstring")
|
||||
(should-not (python-info-docstring-p))
|
||||
(python-tests-look-at "Also not a docstring")
|
||||
(should-not (python-info-docstring-p))))
|
||||
|
||||
(ert-deftest python-info-triple-quoted-string-p-1 ()
|
||||
"Test triple quoted string."
|
||||
(python-tests-with-temp-buffer
|
||||
|
|
|
@ -360,4 +360,20 @@ literals (Bug#20852)."
|
|||
(should (byte-code-function-p f))
|
||||
(should (equal (aref f 4) "My little\ndoc string\nhere"))))))
|
||||
|
||||
(ert-deftest lread-skip-to-eof ()
|
||||
;; Check the special #@00 syntax that, for compatibility, reads as
|
||||
;; nil while absorbing the remainder of the input.
|
||||
(with-temp-buffer
|
||||
(insert "#@00 and the rest\n"
|
||||
"should be ignored) entirely\n")
|
||||
(goto-char (point-min))
|
||||
(should (equal (read (current-buffer)) nil))
|
||||
(should (eobp))
|
||||
;; Add an unbalanced bracket to the beginning and try again;
|
||||
;; we should get an error.
|
||||
(goto-char (point-min))
|
||||
(insert "( ")
|
||||
(goto-char (point-min))
|
||||
(should-error (read (current-buffer)) :type 'end-of-file)))
|
||||
|
||||
;;; lread-tests.el ends here
|
||||
|
|
Loading…
Add table
Reference in a new issue