* test/lisp/filenotify-tests.el (file-notify-test03-events)
(file-notify-test09-watched-file-in-watched-dir): Mark as unstable
on EMBA, because they seem to fail regularly.
* lisp/paren.el (show-paren-predicate):
* lisp/outline.el (outline-minor-mode-use-buttons): Use it.
* lisp/wid-edit.el (buffer-predicate): New widget type.
Po Lu [Sun, 4 Sep 2022 13:03:31 +0000 (21:03 +0800)]
Fix earlier change to xterm.c
* src/xterm.c (x_detect_focus_change): Finally figure out what
the call to x_new_focus_frame does with the core focus, and do
the equivalent with the XInput 2 focus.
Augusto Stoffel [Sun, 4 Sep 2022 11:14:58 +0000 (13:14 +0200)]
Add Python import management commands
* lisp/progmodes/python.el (python-interpreter): New variable
(python-mode-map): Keybindings and menu entries for new commands
(python--list-imports, python-import-history, python--query-import)
(python--do-isort): New variables and helper functions.
(python-add-import, python-import-symbol-at-point)
(python-remove-import, python-sort-imports, python-fix-imports): New
interactive commands (bug#57574).
Augusto Stoffel [Sun, 4 Sep 2022 11:13:57 +0000 (13:13 +0200)]
Python shells dedicated to a project
* lisp/progmodes/python.el: Require 'seq' and (optionally) 'compat'
and 'project' libraries.
(python-shell-dedicated): New user option
(python-shell-get-process-name): Adapt to project-dedicated shells.
(run-python): Offer possibility to create a project-dedicated shell,
or use 'python-shell-dedicated' as the default behavior.
(python-shell-get-buffer): Adapt to project-dedicated shells
(bug#56997).
Improve documentation of several functions in seq.el
* doc/lispref/sequences.texi (Sequence Functions):
* lisp/emacs-lisp/seq.el (seq-contains):
(seq-contains-p):
(seq-set-equal-p):
(seq-position):
(seq-union):
(seq-intersection):
(seq-difference): Use more standard wording in the docstrings
(bug#57561).
Stefan Monnier [Sun, 4 Sep 2022 02:38:28 +0000 (22:38 -0400)]
gv.el and cl-macs.el: Fix bug#57397
* lisp/emacs-lisp/gv.el (gv-get): Obey symbol macros.
* lisp/emacs-lisp/cl-macs.el (cl--letf): Remove workaround placed to
try and handle symbol macros.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-test--symbol-macrolet):
Add new testcase.
Look up keybindings in correct buffer in describe-function.
* lisp/help-fns.el (help-fns--key-bindings): New parameter.
Use it when looking up keybindings.
(describe-function-1): Add the buffer in which the command
was invoked as argument to 'help-fns--key-bindings'.
Fixes bug#57568.
* lisp/emacs-lisp/seq.el (seq-take, seq--activate-font-lock-keywords):
Simplify unnecessarily guarded code, as this file will only ever be
used with the same version of Emacs.
Po Lu [Sat, 3 Sep 2022 13:39:30 +0000 (21:39 +0800)]
Work around another X server bug in crossing event dispatch
* src/xterm.c (xi_focus_handle_for_device): Clear implicit focus
along with FocusOut. (bug#57468)
(x_mouse_leave): Avoid invalid reads of
dpyinfo->x_focus_event_frame on input extension builds.
Po Lu [Sat, 3 Sep 2022 11:55:31 +0000 (19:55 +0800)]
Work around potential X server bug
* src/xterm.c (handle_one_xevent): Ignore core crossing events
on input extension builds. The X server is not actually
supposed to deliver them to us, and it messes up MPX focus
tracking. (bug#57468)
Stefan Kangas [Wed, 31 Aug 2022 03:59:35 +0000 (05:59 +0200)]
Add new defgroup image-dired-dired
* lisp/image/image-dired-dired.el
(image-dired-dired-append-when-browsing): Rename from
'image-dired-append-when-browsing'. Update all uses.
(image-dired-dired): New defgroup.
(image-dired-dired-append-when-browsing)
(image-dired-dired-disp-props): Use above new defgroup.
Stefan Kangas [Wed, 31 Aug 2022 03:52:11 +0000 (05:52 +0200)]
image-dired: Minor cleanups
* lisp/image/image-dired-dired.el
(image-dired-dired-after-readin-hook, image-dired-minor-mode):
Minor doc fixes.
(image-dired-dired-display-image): Don't accept ineffectual prefix
argument.
* lisp/image/image-dired-util.el
(image-dired-file-name-at-point): Use when-let.
(image-dired-display-thumb-properties): Redefine as obsolete function
alias for 'image-dired-update-header-line'.
* lisp/image/image-dired-util.el
(image-dired-window-width-pixels): Make obsolete in favor of
window-body-width.
* lisp/image/image-dired.el (image-dired-line-up-dynamic)
(image-dired-display-window-width): Don't use above obsolete function.
Stefan Kangas [Fri, 19 Aug 2022 19:14:13 +0000 (21:14 +0200)]
Split image-dired.el into several files (part 2/2)
Use a git trick to split a file while preserving line history (for
"git blame", "git log --follow", etc.):
1) Make exact copies of the original file, in the same commit as
moving it.
2) Next, trim down the extra copies to contain only the relevant
parts. [this commit]
* lisp/image-dired.el:
* lisp/image/image-dired-dired.el:
* lisp/image/image-dired-external.el:
* lisp/image/image-dired-tags.el:
* lisp/image/image-dired-util.el:
* lisp/image/image-dired.el: Trim files down to keep only one copy of
each definition.
Stefan Kangas [Thu, 1 Sep 2022 09:04:21 +0000 (11:04 +0200)]
Make some versions in docs match package version
* doc/emacs/misc.texi (Interactive Shell): Bump Emacs version.
* doc/misc/ediff.texi:
* doc/misc/flymake.texi:
* doc/misc/viper.texi: Fix version to match package.
* lisp/emulation/viper.el: Make version match variable.
Display a warning for some uses of nil in face attributes.
* src/xfaces.c (HANDLE_INVALID_NIL_VALUE): New macro, which displays
a warning for invalid uses of nil as a face attribute value.
(Finternal_set_lisp_face_attribute): Use the macro for the attributes
:foreground, :distant-foreground and :background.
Stefan Monnier [Fri, 2 Sep 2022 13:54:13 +0000 (09:54 -0400)]
* lisp/help-fns.el: Minor fixes
(describe-mode--minor-modes): Don't burp on minor modes that lack a docstring.
(describe-mode--minor-modes): Simplify eta-redex.
(find-lisp-object-file-name): Use `autoload-file`.
(help-fns--describe-function-or-command-prompt): Allow the user to
insist on choosing a function even if it appears not to exist.
* lisp/textmodes/ispell.el (ispell-look-p): Make obsolete.
(ispell-lookup-words): Look up the look command at run time
instead (bug#50852).
(ispell-have-new-look): Make obsolete.
(ispell-look-options): Adjust. Apparently the version of "look"
that had a "-r" (regexp interface) never took off -- it's not
present in GNU/Linux or Macos, at least, as far as we can tell.
Robert Pluim [Fri, 2 Sep 2022 09:15:43 +0000 (11:15 +0200)]
Use frame-monitor-attributes in gamegrid
* lisp/play/gamegrid.el (gamegrid-calculate-glyph-size): Use
`frame-monitor-attributes' to get the frame attributes directly
instead of iterating over `display-monitor-attributes-list'.
Po Lu [Fri, 2 Sep 2022 09:19:29 +0000 (17:19 +0800)]
Prevent crashes when embedding Emacs in a nonexistent parent
* src/xfns.c (x_window, Fx_create_frame): Handle X errors while
trying to reparent the frame onto an explicitly specified
parent.
* src/xterm.c (handle_one_xevent): Handle unparenting embedded
windows correctly. This only works if the embedder is aware of
the fixes extension and has put the window into the right save
set.
(x_embed_frame): New function.
* src/xterm.h (FRAME_X_EMBEDDED_P): Fix coding style.
Robert Pluim [Thu, 1 Sep 2022 16:10:58 +0000 (18:10 +0200)]
Make single char entry easier for `describe-char-fold-equivalences'
* lisp/char-fold.el (describe-char-fold-equivalences): Improve
docstring. Pass t for 'allow-single' arg in call to
`read-char-by-name' so that single characters can be entered directly.
Stefan Kangas [Thu, 1 Sep 2022 09:04:21 +0000 (11:04 +0200)]
Make some versions in docs match package version
* doc/emacs/misc.texi (Interactive Shell): Bump Emacs version.
* doc/misc/ediff.texi:
* doc/misc/flymake.texi:
* doc/misc/viper.texi: Fix version to match package.
* lisp/emulation/viper.el: Make version match variable.
Stefan Kangas [Thu, 1 Sep 2022 04:17:37 +0000 (06:17 +0200)]
Merge from origin/emacs-28
8807a4f532 Enable 256 colors in fbterm. bbc23ca8ab One more fix for find-file.el 0cbcaf5119 ; Yet another doc fix for 'ff-other-file-alist' (bug#57325) 2d9a391727 Recommend using fbterm in the Linux console. a5a92e577c ; * src/window.c (syms_of_window) <window-point-insertion-... 4d52fe6b96 * lisp/find-file.el (ff-other-file-alist): Doc fix. (Bug#... d111b5b651 * lisp/info.el (Info-mode): Support the Linux console better. cc945ec0ed ; Fix doc strings in latin1-disp.el 195fcc932e Improve the documentation of glyphless-character display 72ae02377e ; * lisp/jit-lock.el (jit-lock-chunk-size): Doc fix. 3fb69fad49 Fix documentation of 'glyphless-char-display'
Jim Porter [Wed, 31 Aug 2022 16:47:43 +0000 (09:47 -0700)]
Don't fail Eshell ERT tests when an internal signal gets raised
* test/lisp/eshell/esh-proc-tests.el
(esh-proc-test/pipeline-connection-type/middle)
(esh-proc-test/pipeline-connection-type/last): Set 'debug-on-error' to
nil.
Alan Mackenzie [Wed, 31 Aug 2022 18:46:06 +0000 (18:46 +0000)]
C++ Mode: Fontify functions correctly with commas in template expressions
This fixes bug #57318.
Also apply an optimization which marks generic expressions as already
analyzed, thus avoiding repeating this analysis when not needed. This
optimization prevents the fix slowing down scrolling when the C++ source has
lots of template structures.
* lisp/progmodes/cc-engine.el (top-level) Near the beginning of the file, add
a comment describing the new text property c-<>-c-types-set.
(c-update-brace-stack): Bind c-restricted-<>-arglists to nil rather than t
around the call to c-forward-<>-arglist.
(c-forward-<>-arglist-recur): Allow the abbreviated analysis of a generic
expression also when the opening < is marked with a c-<>-c-types-set text
property. Set this property at the same time as the c-type properties are set
on the commas inside the template structure.
* lisp/progmodes/cc-fonts.el (c-font-lock-complex-decl-prepare): Clear the
c-<>-c-types-set text property, along with c-type, from the region being
fontified.