Po Lu [Thu, 21 Jul 2022 01:39:24 +0000 (09:39 +0800)]
Improve handling screen resizes when built without RandR
* src/xterm.c (handle_one_xevent): Update DND tooltip position
upon ConfigureNotify for root window.
Po Lu [Thu, 21 Jul 2022 01:19:14 +0000 (09:19 +0800)]
Revert "Prefer defvar-keymap in xwidget.el"
This reverts commit
daf2c3e23a45bff14f9d444d2d07455376d4b6da.
Stefan Kangas [Wed, 20 Jul 2022 20:34:34 +0000 (22:34 +0200)]
; Normalize some "Author" headers
Stefan Kangas [Wed, 20 Jul 2022 20:26:44 +0000 (22:26 +0200)]
Prefer defvar-keymap in xwidget.el
* lisp/xwidget.el (xwidget-webkit-mode-map)
(xwidget-webkit-edit-mode-map): Prefer defvar-keymap.
Eli Zaretskii [Wed, 20 Jul 2022 19:03:45 +0000 (22:03 +0300)]
; * src/data.c (Fash): Improve wording of the doc string.
Po Lu [Wed, 20 Jul 2022 12:16:06 +0000 (12:16 +0000)]
Fix mouse wheel DND scroll direction on Haiku
* lisp/term/haiku-win.el (haiku-handle-drag-wheel): Record the
last wheel direction. If it differs, clear the click counter.
Eli Zaretskii [Wed, 20 Jul 2022 11:57:15 +0000 (14:57 +0300)]
Fix error during startup in -nw sessions
* lisp/startup.el (normal-top-level, command-line-1): Don't mess
with fonts in a text-mode session. (Bug#56660)
Mattias Engdegård [Wed, 20 Jul 2022 09:24:49 +0000 (11:24 +0200)]
Gently discourage use of `lsh` (bug#56641)
* lisp/subr.el (lsh): Note the general preference for `ash`.
* lisp/emacs-lisp/shortdoc.el (number): Remove entry for `lsh`.
It was identical to that for `ash` which is misleading.
Shortdoc is very helpful for finding the right function to use,
and `lsh` is just for compatibility at this point.
Mattias Engdegård [Wed, 20 Jul 2022 09:17:51 +0000 (11:17 +0200)]
; * lisp/org/ol.el (org-link--decode-compound): `lsh` -> `ash`
Po Lu [Wed, 20 Jul 2022 11:05:58 +0000 (19:05 +0800)]
Fix calculation of default highlightForeground in the lucid menu bar
* lwlib/xlwmenu.c (xlwMenuResources, display_menu_item)
(make_drawing_gcs, make_shadow_gcs, openXftFont, XlwMenuRealize)
(XlwMenuSetValues): Use -1 as the default for
highlight_foreground. Replace that with the normal foreground
when creating GCs. Reported by Colin Baxter
<m43cap@yandex.com>.
Stefan Kangas [Wed, 20 Jul 2022 08:30:41 +0000 (10:30 +0200)]
; Merge from origin/emacs-28
The following commit was skipped:
f02944f5a1 Prevent GC of window referenced from EmacsScroller
Stefan Kangas [Wed, 20 Jul 2022 08:30:41 +0000 (10:30 +0200)]
Merge from origin/emacs-28
cb911febc6 ; Fix typos
# Conflicts:
# test/lisp/net/tramp-tests.el
Po Lu [Wed, 20 Jul 2022 07:37:24 +0000 (07:37 +0000)]
Implement wheel movement during DND on Haiku
* lisp/term/haiku-win.el (haiku-dnd-wheel-count): New defvar.
(haiku-note-wheel-click, haiku-handle-drag-wheel): New
functions.
* src/haiku_support.cc (EmacsWindow): Get rid of window ID
logic.
(MessageReceived, MouseMoved, be_drag_message): Use thread ID to
identify windows instead of window ID.
* src/haikuselect.c (Fhaiku_drag_message): Record whether or not
the DND frame is a valid drop target.
(haiku_note_drag_wheel): New function.
(syms_of_haikuselect): New defvar.
* src/haikuterm.c (haiku_read_socket): Call
`haiku_note_drag_wheel' when appropriate.
* src/haikuterm.h: Update prototypes.
Stefan Kangas [Wed, 20 Jul 2022 07:27:10 +0000 (09:27 +0200)]
Prefer defvar-keymap in some trivial cases
* lisp/calendar/diary-lib.el (diary-fancy-overriding-map):
* lisp/emacs-lisp/chart.el (chart-mode-map):
* lisp/emulation/cua-base.el (cua-global-keymap)
(cua--cua-keys-keymap, cua--prefix-override-keymap)
(cua--prefix-repeat-keymap, cua--global-mark-keymap)
(cua--rectangle-keymap, cua--region-keymap):
* lisp/emulation/viper-keym.el (viper-vi-intercept-map)
(viper-insert-intercept-map, viper-emacs-intercept-map)
(viper-vi-global-user-map, viper-vi-basic-map, viper-vi-kbd-map)
(viper-vi-diehard-map, viper-insert-global-user-map)
(viper-insert-basic-map, viper-insert-diehard-map)
(viper-insert-kbd-map, viper-replace-map)
(viper-emacs-global-user-map, viper-emacs-kbd-map)
(viper-empty-keymap, viper-mode-map, viper-minibuffer-map)
(viper-ex-cmd-map, ex-read-filename-map)
(viper-slash-and-colon-map, viper-comint-mode-modifier-map)
(viper-dired-modifier-map, viper-gnus-modifier-map):
* lisp/gnus/gnus-sum.el (gnus-summary-generic-mark-map):
* lisp/menu-bar.el (global-buffers-menu-map)
(menu-bar-preferences-menu):
* lisp/mh-e/mh-e.el (mh-folder-mode-map, mh-inc-spool-map)
(mh-search-mode-map, mh-show-mode-map):
* lisp/play/dunnet.el (dungeon-batch-map):
* lisp/progmodes/autoconf.el (autoconf-mode-map):
* lisp/tool-bar.el (tool-bar-map):
* lisp/vc/ediff-help.el (ediff-help-region-map):
* lisp/vc/ediff-hook.el (menu-bar-epatch-menu)
(menu-bar-ediff-merge-menu, menu-bar-ediff-menu):
* lisp/windmove.el (windmove-mode-map):
* lisp/xwidget.el (xwidget-webkit-isearch-mode-map)
(xwidget-webkit-edit-mode-map): Prefer defvar-keymap.
Po Lu [Wed, 20 Jul 2022 01:41:43 +0000 (09:41 +0800)]
Fix setting user time upon scrolling self during DND
* src/xterm.c (handle_one_xevent): Set user time for emulated
scroll wheel events if Emacs ends up scrolled during DND.
João Távora [Tue, 19 Jul 2022 23:35:08 +0000 (00:35 +0100)]
Make eldoc-echo-area-prefer-doc-buffer consider all frames
Previously, it considered only windows on 'visible' frames (according
to get-buffer-window). This seemed correct at first, but it's not
much use for multiple TTY frames and not particularly reliable on GUI
frames either. There's no reliable way to tell what is actually
visible, so it's best to assume that users setup frames that are
indeed visible when using this parameter.
* lisp/emacs-lisp/eldoc.el (eldoc--echo-area-prefer-doc-buffer-p):
Consider all frames.
João Távora [Tue, 19 Jul 2022 23:24:44 +0000 (00:24 +0100)]
Ensure Eldoc buffer displays on interactive M-x eldoc
* lisp/emacs-lisp/eldoc.el (eldoc-display-in-buffer): Call
eldoc-doc-buffer with interactive set to t.
(Version): Bump to 1.13.0.
Philip Kaludercic [Mon, 18 Jul 2022 20:44:52 +0000 (22:44 +0200)]
* eudc.texi: Unquote setopt option names
Eli Zaretskii [Tue, 19 Jul 2022 13:43:37 +0000 (16:43 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Tue, 19 Jul 2022 13:42:43 +0000 (16:42 +0300)]
; Fix punctuation in recently changed EUDC documentation
* lisp/net/eudcb-macos-contacts.el (eudc-macos-contacts-search-helper):
* lisp/net/eudc-vars.el (eudc-inline-expansion-format):
* etc/NEWS: Fix punctuation in recent EUDC changes.
Mattias Engdegård [Tue, 19 Jul 2022 11:57:47 +0000 (13:57 +0200)]
Use `ash` instead of `lsh`
* lisp/files.el (file-modes-number-to-symbolic):
* lisp/image/exif.el (exif--direct-ascii-value):
* lisp/term/haiku-win.el (defun):
* lisp/x-dnd.el (x-dnd-handle-xdnd, x-dnd-handle-motif):
`lsh` is slower and has confusing semantics; avoid.
Mattias Engdegård [Tue, 19 Jul 2022 11:56:08 +0000 (13:56 +0200)]
; * src/data.c (Fash): More precise doc string
Gerd Moellmann [Tue, 21 Jun 2022 13:49:44 +0000 (15:49 +0200)]
Prevent GC of window referenced from EmacsScroller
* src/nsterm.m (EmacsScroller.mark, mark_nsterm): New functions.
* src/nsterm.h (EmacsScroller.mark, mark_nsterm): Declare.
* src/alloc.c (garbage_collect) [MAVE_NS]: Call mark_nsterm.
(Bug#56095)
(cherry picked from commit
5f1bd872478927ad4bc635502e74628d39885286)
Stefan Kangas [Tue, 19 Jul 2022 11:57:20 +0000 (13:57 +0200)]
; Fix typos
Stefan Kangas [Tue, 19 Jul 2022 11:52:12 +0000 (13:52 +0200)]
; * lisp/bindings.el: Remove conflicting commented out bindings.
Stefan Kangas [Mon, 18 Jul 2022 15:32:10 +0000 (17:32 +0200)]
Prefer defvar-keymap in bindings.el
* lisp/bindings.el (narrow-map, undo-repeat-map)
(next-error-repeat-map, goto-map, search-map, ctl-x-r-map)
(page-navigation-repeat-map, abbrev-map, ctl-x-x-map): Prefer
defvar-keymap.
(mode-specific-map): Minor doc fix.
Mattias Engdegård [Tue, 19 Jul 2022 09:59:37 +0000 (11:59 +0200)]
Speed up `butlast`
* lisp/subr.el (butlast): Don't duplicate the removed part.
* test/lisp/subr-tests.el (subr-tests--butlast-ref, subr-butlast):
Add test.
Stefan Kangas [Tue, 19 Jul 2022 04:30:56 +0000 (06:30 +0200)]
Merge from origin/emacs-28
282dde887d ; Fix typo missed in previous change
62c47ffd5f ; * lisp/net/tramp-crypt.el: Improve commentary
cba30431ff Merge branch 'emacs-28' of git.savannah.gnu.org:/srv/git/e...
8f9993bb3f ; * src/buffer.c (syms_of_buffer) <mode-line-format>: Doc ...
fec4bb89f9 ; Fix typos (Bug#56550)
Po Lu [Tue, 19 Jul 2022 03:29:34 +0000 (11:29 +0800)]
Document workaround for bug#56627
* etc/PROBLEMS: Document problems with GTK tool bar icons on
some icon themes. (bug#56627)
Stefan Monnier [Mon, 18 Jul 2022 21:39:55 +0000 (17:39 -0400)]
(help-fns--first-release): Try and avoid false positives
We used to use a very "optimistic" regexp which worked well for
longish symbol names but suffered from too many false positives on
short names. Use a more restrictive regexp, which should make the
recent "weed out" change unnecessary.
This in turn requires the use of '...' more consistently in etc/NEWS* files.
* lisp/help-fns.el (help-fns--first-release-regexp): New function.
(help-fns--first-release): Use it. Fix minor issue with the Emacs
version regexp.
(help-fns--mention-first-release): Undo last change.
* etc/NEWS*: Replace `...' with '...'. Indent code examples by at
least 2 spaces. Add previously missing '...' quotes around many of
the variables and functions described.
Po Lu [Tue, 19 Jul 2022 01:41:36 +0000 (09:41 +0800)]
Fix timestamp specified in wheel movement XDND events
* src/xterm.c (handle_one_xevent): Use the time of the wheel
event in XDND events sent in response to wheel movement.
Po Lu [Tue, 19 Jul 2022 01:33:09 +0000 (09:33 +0800)]
Make drag-and-drop wheel movement work locally too on X
This is provided by the XDND protocol, so it isn't fair for it
to not work with local drag-and-drop.
* lisp/x-dnd.el (x-dnd-note-wheel-movement): New function. Set
it as the `x-dnd-wheel-function'.
* src/xterm.c (x_dnd_cleanup_drag_and_drop): Clear new flags.
(x_dnd_note_self_wheel): New function. Set some flags.
(x_dnd_process_quit, x_dnd_begin_drag_and_drop, handle_one_xevent)
(x_connection_closed, x_delete_terminal, mark_xterm): Handle and
set new wheel movement flags
(syms_of_xterm): New variable `x-dnd-wheel-function'.
Michael Albinus [Mon, 18 Jul 2022 17:33:50 +0000 (19:33 +0200)]
Use ntake also in tramp-adb.el
* lisp/net/tramp-adb.el (tramp-adb-handle-directory-files-and-attributes):
Use `tramp-compat-ntake'.
Alexander Adolf [Wed, 13 Jul 2022 21:52:46 +0000 (23:52 +0200)]
Additional query and results attributes in eudcb-macos-contacts.el
* lisp/net/eudcb-macos-contacts.el: wider set of attributes for
queries, and in query results
* lisp/net/eudc-vars.el (eudc-inline-expansion-format): update
docstring to explain how to use the function eudc-translate-query to
translate to generic attribute names in the user supplied formatting
function
* etc/NEWS: announce wider query/result attribute set
* doc/misc/eudc.texi: more details on eudcb-mab.el's limitations
Robert Pluim [Mon, 18 Jul 2022 14:54:16 +0000 (16:54 +0200)]
; Fix typo missed in previous change
Michael Albinus [Mon, 18 Jul 2022 13:48:14 +0000 (15:48 +0200)]
Adapt Tramp new test macros
* test/lisp/net/tramp-tests.el (tramp--test-deftest-with-stat)
(tramp--test-deftest-with-perl, tramp--test-deftest-with-ls):
Skip for all methods but those from tramp-sh.el.
Michael Albinus [Mon, 18 Jul 2022 13:47:28 +0000 (15:47 +0200)]
Use ntake in Tramp
* lisp/net/tramp-compat.el (tramp-compat-ntake): New defalias.
* lisp/net/tramp.el (tramp-handle-directory-files):
* lisp/net/tramp-crypt.el (tramp-crypt-handle-directory-files):
* lisp/net/tramp-sh.el (tramp-sh-handle-directory-files-and-attributes):
* lisp/net/tramp-smb.el (tramp-smb-handle-directory-files): Use it.
Stefan Kangas [Mon, 18 Jul 2022 13:21:15 +0000 (15:21 +0200)]
* lisp/rect.el (rectangle-mark-mode-map): Prefer defvar-keymap.
Eli Zaretskii [Mon, 18 Jul 2022 12:46:18 +0000 (15:46 +0300)]
; * doc/lispref/lists.texi (List Elements): No passive tense!
Robert Pluim [Mon, 18 Jul 2022 12:37:15 +0000 (14:37 +0200)]
; * lisp/net/tramp-crypt.el: Improve commentary
Eli Zaretskii [Mon, 18 Jul 2022 12:32:10 +0000 (15:32 +0300)]
Merge branch 'emacs-28' of git.savannah.gnu.org:/srv/git/emacs into emacs-28
Eli Zaretskii [Mon, 18 Jul 2022 12:31:26 +0000 (15:31 +0300)]
; * src/buffer.c (syms_of_buffer) <mode-line-format>: Doc fix.
Stefan Kangas [Mon, 18 Jul 2022 12:22:33 +0000 (14:22 +0200)]
; Fix typos (Bug#56550)
Mattias Engdegård [Mon, 18 Jul 2022 10:19:38 +0000 (12:19 +0200)]
Clarify `take` and `ntake` documentation (bug#56521)
* doc/lispref/lists.texi (List Elements): Describe `ntake` better.
* src/fns.c (Ftake, Fntake): Rephrase doc strings.
Mattias Engdegård [Mon, 18 Jul 2022 09:32:22 +0000 (11:32 +0200)]
Speed up `seq-subseq` for lists (bug#56521)
* lisp/emacs-lisp/seq.el (seq-subseq):
Make faster by using `take` instead of a lisp loop,
and more importantly by not front-loading the error text formatting.
* test/lisp/emacs-lisp/seq-tests.el (seq-tests--list-subseq-ref)
(test-seq-subseq): Test `seq-subseq` for lists more thoroughly.
Mattias Engdegård [Sun, 17 Jul 2022 17:05:03 +0000 (19:05 +0200)]
Use `take` where clearly safe to do so (bug#56521)
* lisp/emacs-lisp/seq.el (seq-take):
* lisp/auth-source.el (auth-source-secrets-search)
(auth-source-plstore-search):
* lisp/gnus/message.el (message-insert-formatted-citation-line):
* lisp/net/dbus.el (dbus-unregister-object):
* lisp/replace.el (occur-context-lines):
* test/src/print-tests.el (print-circular): Replace hand-written loop
or `butlast` call with `take` for clarity, performance and validation.
We have the equivalence
(take N LIST) = (butlast LIST (- (length LIST) N)).
Juri Linkov [Mon, 18 Jul 2022 07:23:41 +0000 (10:23 +0300)]
* lisp/minibuffer.el (minibuffer-complete-history): Define sorting by metadata
(minibuffer-complete-history, minibuffer-complete-defaults):
Use completion metadata to disable sorting of the completion table
(bug#56613)
Po Lu [Mon, 18 Jul 2022 04:49:46 +0000 (04:49 +0000)]
Implement last change on Haiku as well
* lisp/term/haiku-win.el (haiku-dnd-drag-handler): Stop
redisplaying here.
* src/haikuselect.c (haiku_note_drag_motion): Use
redisplay_preserve_echo_area.
Po Lu [Mon, 18 Jul 2022 04:42:23 +0000 (12:42 +0800)]
Preserve echo area message when running DND mouse movement function
* lisp/term/x-win.el (x-dnd-movement): Stop redisplaying here.
* src/xterm.c (x_dnd_begin_drag_and_drop): Redisplay with the
echo area preserved.
Richard Hansen [Sun, 17 Jul 2022 04:56:10 +0000 (00:56 -0400)]
Derive `Info-mode' from `special-mode'
* lisp/info.el (Info-mode): Derive `Info-mode' from `special-mode'.
This makes it easier to exclude it from globalized minor modes that
don't apply to special modes (such as `global-whitespace-mode' and
`global-display-fill-column-indicator-mode').
Richard Hansen [Sun, 17 Jul 2022 18:32:42 +0000 (14:32 -0400)]
info-edit: Delay `ibuffer' var change until after `ibuffer' loads
* lisp/obsolete/info-edit.el: Delay the addition of `Info-edit-mode'
to the `ibuffer-help-buffer-modes' list until after `ibuffer' is
loaded. This fixes a "(void-variable ibuffer-help-buffer-modes)"
error when `info-edit' is loaded before `ibuffer'.
Po Lu [Mon, 18 Jul 2022 01:20:05 +0000 (09:20 +0800)]
Handle virtual modifiers in the DND scrolling code
* lisp/x-dnd.el (x-dnd-modifier-mask): Handle virtual modifiers.
* src/xfns.c (Fx_get_modifier_masks): New function.
(syms_of_xfns): Define new subr.
* src/xterm.c (x_get_keyboard_modifiers): New function.
* src/xterm.h: Update prototypes.
Stefan Monnier [Sun, 17 Jul 2022 18:30:43 +0000 (14:30 -0400)]
* lisp/minibuffer.el (minibuffer-complete-history): Ensure a list of strings
Juri Linkov [Sun, 17 Jul 2022 18:06:31 +0000 (21:06 +0300)]
* lisp/subr.el (read-char-from-minibuffer, y-or-n-p): Simplify to use HIST=t.
Juri Linkov [Sun, 17 Jul 2022 18:04:29 +0000 (21:04 +0300)]
* lisp/minibuffer.el (minibuffer-complete-history): Check for history=t.
Signal a user error when the history is not a list (bug#56613).
Mattias Engdegård [Wed, 13 Jul 2022 11:46:52 +0000 (13:46 +0200)]
Add `take` and `ntake` (bug#56521)
These are useful list primitives, complementary to `nthcdr`.
* src/fns.c (Ftake, Fntake): New.
(syms_of_fns): Defsubr them.
* doc/lispref/lists.texi (List Elements):
* lisp/emacs-lisp/shortdoc.el (list): Document.
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns, pure-fns):
Declare `take` pure and side-effect-free.
* test/src/fns-tests.el (fns-tests--take-ref, fns--take-ntake):
New test.
* etc/NEWS: Announce.
Eli Zaretskii [Sun, 17 Jul 2022 12:44:50 +0000 (15:44 +0300)]
Fix leaking of file descriptors due to pipe processes on MS-Windows
* src/w32proc.c (reader_thread): Wait for 'sys_close' to finish
processing the pipe read descriptor, before trying to close it.
* src/w32.c (sys_close): Attempt to detect when the reader thread
already exited, so that it would be possible to close descriptors
open by pipe processes for reading from the pipe. (Bug#56606)
Po Lu [Sun, 17 Jul 2022 12:14:02 +0000 (20:14 +0800)]
Improve handling of tilt scroll and flip options during DND
* lisp/x-dnd.el (x-dnd-mwheel-scroll): New function.
(x-dnd-handle-xdnd): Use that instead of abusing mwheel.el.
Stefan Kangas [Sun, 17 Jul 2022 10:56:38 +0000 (12:56 +0200)]
Prefer defvar-keymap in mpc.el
* lisp/mpc.el (mpc-mode-map, mpc-tagbrowser-dir-mode-map)
(mpc-volume-map, mpc-songs-mode-map): Prefer defvar-keymap.
Lars Ingebrigtsen [Sun, 17 Jul 2022 10:12:24 +0000 (12:12 +0200)]
Make `C' in over tramp work in archive mode
* lisp/arc-mode.el (archive-copy-file): Make `C' in over tramp
work (bug#56574).
Eli Zaretskii [Sun, 17 Jul 2022 10:12:03 +0000 (13:12 +0300)]
; * src/xdisp.c (redisplay_tool_bar): Fix a possible typo.
Eli Zaretskii [Sun, 17 Jul 2022 09:33:34 +0000 (12:33 +0300)]
Fix tab-bar resizing under 'auto-resize-tab-bars' = 'grow-only'
* src/xdisp.c (redisplay_tab_bar): Compute the desired height of
the tab-bar before iterating over the tab-bar string, to detect
the required resizing earlier. Default 'change_p' to 'false'.
* lisp/tab-bar.el (tab-bar--update-tab-bar-lines): Support
'auto-resize-tab-bars' set to 'grow-only'.
Visuwesh [Sun, 17 Jul 2022 09:22:32 +0000 (11:22 +0200)]
Ensure that directories exist when copying files from archive
* lisp/arc-mode.el (archive-copy-file): If the directory the file is
being extracted to does not exist, then create it (bug#56603).
Lars Ingebrigtsen [Sun, 17 Jul 2022 09:16:26 +0000 (11:16 +0200)]
Improve error messaging when parent archive buffers are missing
* lisp/arc-mode.el (archive-write-file-member):
* lisp/tar-mode.el (tar-subfile-save-buffer): Give a better error
message when the parent buffer is dead (bug#56605).
Stefan Kangas [Sun, 17 Jul 2022 04:30:41 +0000 (06:30 +0200)]
Merge from origin/emacs-28
f5218385c0 Fix obsoletion of nntp-authinfo-file
10b6919870 ; Fix typos
Po Lu [Sun, 17 Jul 2022 03:06:14 +0000 (11:06 +0800)]
Handle scrolling during XDND drag-and-drop
* lisp/x-dnd.el (x-dnd-get-object-rectangle): Handle cases where
`posn-x-y' is nil.
(x-dnd-modifier-mask, x-dnd-hscroll-flags, x-dnd-note-click):
New functions.
(x-dnd-click-count): New defvar.
(x-dnd-handle-xdnd): Handle button press events.
* src/xterm.c (x_dnd_send_position): Fix handling of mouse
rects.
Po Lu [Sun, 17 Jul 2022 01:13:28 +0000 (09:13 +0800)]
Fix drag-and-drop button button flags
* src/xterm.c (x_dnd_send_position): Always send buttons
regardless of version. Fix bit indices.
(handle_one_xevent): Likewise.
kobarity [Sat, 16 Jul 2022 16:14:15 +0000 (18:14 +0200)]
Fix python navigation problem with an empty line in nested defun
* lisp/progmodes/python.el (python-nav--beginning-of-defun): Fix
bug when point is on an empty line (bug#56600).
Lars Ingebrigtsen [Sat, 16 Jul 2022 12:57:58 +0000 (14:57 +0200)]
Fix xref links in `C-h o'
* lisp/help-fns.el (describe-symbol): Make xref links happen in
all sections (bug#49587).
* lisp/help-fns.el (describe-symbol): Add back/forward links.
* lisp/help-mode.el (help-make-xrefs): Factor out links from
here...
(help-xref--navigation-buttons): To here.
Stefan Kangas [Sat, 16 Jul 2022 16:13:56 +0000 (18:13 +0200)]
New test for make_symbol_constant
* test/src/data-tests.el (data-tests-make_symbol_constant): New
test.
Eli Zaretskii [Sat, 16 Jul 2022 13:29:24 +0000 (16:29 +0300)]
* src/composite.c (find_automatic_composition): Fix off-by-one error.
Po Lu [Sat, 16 Jul 2022 13:02:47 +0000 (21:02 +0800)]
Improve documentation of `posn-timestamp'
* doc/lispref/commands.texi (Accessing Mouse): Improve
documentation of `posn-timestamp' by actually describing the
timestamp it returns.
Mattias Engdegård [Sat, 16 Jul 2022 12:03:43 +0000 (14:03 +0200)]
Update `eshell-variable-aliases-list` defcustom type
* lisp/eshell/esh-var.el (eshell-variable-aliases-list):
Add type for SIMPLE-FUNCTION value.
Michael Albinus [Sat, 16 Jul 2022 12:05:06 +0000 (14:05 +0200)]
Comment docstrings in tramp-test macros
* test/lisp/net/tramp-tests.el (tramp--test-deftest-with-stat)
(tramp--test-deftest-with-perl, tramp--test-deftest-with-ls)
(tramp--test-deftest-direct-async-process): Comment docstring,
it doesn't work this way. Use `tramp-test-vec' if appropriate.
Lars Ingebrigtsen [Sat, 16 Jul 2022 11:52:20 +0000 (13:52 +0200)]
Weed out some false positives in help-fns--mention-first-release
* lisp/help-fns.el (help-fns--mention-first-release): Weed out
things that give too many false positives (bug#49062).
Manuel Giraud [Mon, 11 Jul 2022 09:14:08 +0000 (11:14 +0200)]
Colored menu highlight in Lucid backend
* lwlib/xlwmenuP.h:
* lwlib/xlwmenu.h:
* lwlib/xlwmenu.c: Introduce resources to handle colored highlighting
of menu entries.
* doc/emacs/xresources.texi (Lucid Resources): Documentation.
Po Lu [Sat, 16 Jul 2022 10:55:49 +0000 (18:55 +0800)]
Decrease network traffic with some XDND programs
* lisp/x-dnd.el (x-dnd-get-drop-width-height):
(x-dnd-get-drop-x-y): Remove functions.
(x-dnd-get-window-rectangle, x-dnd-intersect-rectangles)
(x-dnd-get-object-rectangle, x-dnd-get-drop-rectangle): New
functions.
(x-dnd-handle-xdnd): Generate mouse rectangles consisting of the
object (glyph) under point.
Lars Ingebrigtsen [Fri, 15 Jul 2022 11:06:22 +0000 (13:06 +0200)]
Allow ;;;###autoloading transient-define-prefix
* lisp/emacs-lisp/loaddefs-gen.el
(loaddefs-generate--make-autoload): Allow ;;;###autoloading
transient-define-prefix (bug#48694).
* lisp/transient.el (transient-define-prefix): Autoload.
Mattias Engdegård [Fri, 15 Jul 2022 16:55:30 +0000 (18:55 +0200)]
Optimise `append` calls
Add the transforms
(append) -> nil
(append X) -> X
(append '(X) Y) -> (cons 'X Y)
(append (list X) Y) -> (cons X Y)
(append (list X...) nil) -> (list X...)
and the argument transforms:
(list X...) (list Y...) -> (list X... Y...)
nil -> ;nothing
CONST1 CONST2 -> CONST1++CONST2
(list CONSTANTS...) -> '(CONSTANTS...)
(the last three for non-tail arguments only)
* lisp/emacs-lisp/byte-opt.el: New.
Mattias Engdegård [Fri, 15 Jul 2022 21:42:45 +0000 (23:42 +0200)]
Improved cons optimisation
* lisp/emacs-lisp/byte-opt.el (byte-optimize-cons):
Add the transform
(cons X (list Y...)) -> (list X Y...)
Mattias Engdegård [Fri, 15 Jul 2022 19:28:30 +0000 (21:28 +0200)]
Transform (list) -> nil in source optimiser
This optimisation is already done in the code generator but performing
it at this earlier stage is a useful normalising step that uncovers
more opportunities.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-list): New.
Stefan Kangas [Sat, 16 Jul 2022 08:57:26 +0000 (10:57 +0200)]
Delete obsolete variable gnus-secondary-servers
* lisp/gnus/gnus.el (gnus-secondary-servers): Delete variable
obsolete since 24.1.
* lisp/gnus/gnus-group.el (gnus-group-browse-foreign-server):
* lisp/gnus/gnus-int.el (gnus-start-news-server): Don't use above
deleted variable.
Eli Zaretskii [Sat, 16 Jul 2022 08:21:05 +0000 (11:21 +0300)]
; * src/xdisp.c (try_window): Expand the commentary. (Bug#56561)
Stefan Kangas [Sat, 16 Jul 2022 07:59:51 +0000 (09:59 +0200)]
Fix obsoletion of nntp-authinfo-file
* lisp/gnus/nntp.el (nntp-authinfo-file): Fix obsoletion.
Stefan Kangas [Thu, 14 Jul 2022 15:33:46 +0000 (17:33 +0200)]
; Fix typos
Stefan Kangas [Sat, 16 Jul 2022 04:30:39 +0000 (06:30 +0200)]
Merge from origin/emacs-28
db259d8fd3 Build Seccomp filter only if we have a 64-bit userspace (B...
Po Lu [Sat, 16 Jul 2022 03:53:42 +0000 (11:53 +0800)]
Handle XDND mouse rects synchronously
* src/xterm.c (x_dnd_send_position): Record event X and Y for
consumption by the XdndStatus handler. Ignore mouse rects if
waiting for status.
(x_dnd_send_leave): Clear pending DND event.
(handle_one_xevent): When handling XdndStatus, check if the
pending event is contained in the new mouse rect.
Stefan Monnier [Fri, 15 Jul 2022 19:59:12 +0000 (15:59 -0400)]
* lisp/url/url-vars.el (url-mime-separator-chars): Fix last cosmetic change
Michael Albinus [Fri, 15 Jul 2022 17:52:10 +0000 (19:52 +0200)]
Extend tramp-tests
* test/lisp/net/tramp-tests.el (tramp--test-deftest-with-stat)
(tramp--test-deftest-with-perl, tramp--test-deftest-with-ls):
New defmacros.
(tramp-test18-file-attributes-with-stat)
(tramp-test18-file-attributes-with-perl)
(tramp-test18-file-attributes-with-ls)
(tramp-test19-directory-files-and-attributes-with-stat)
(tramp-test19-directory-files-and-attributes-with-perl)
(tramp-test19-directory-files-and-attributes-with-ls): New tests.
(tramp-test21-file-links): Delete also `tmp-name2'.
(tramp--test-deftest-direct-async-process): Rename from
`tramp--test--deftest-direct-async-process'. Remove DOCSTRING.
Adapt callees.
(tramp--test-special-characters): Remove. Move body to ...
(tramp-test41-special-characters): ... here.
(tramp--test-utf8): Remove. Move body to ...
(tramp-test42-utf8): ... here.
(tramp-test41-special-characters-with-stat)
(tramp-test41-special-characters-with-perl)
(tramp-test41-special-characters-with-ls)
(tramp-test42-utf8-with-stat)
(tramp-test42-utf8-with-perl)
(tramp-test42-utf8-with-ls): Rewrite, using the new macros.
Stefan Kangas [Fri, 15 Jul 2022 15:38:05 +0000 (17:38 +0200)]
* lisp/tar-mode.el (tar-mode-map): Prefer defvar-keymap.
Philipp Stephani [Fri, 15 Jul 2022 15:56:02 +0000 (17:56 +0200)]
Build Seccomp filter only if we have a 64-bit userspace (Bug#56549)
* configure.ac (SIZEOF_LONG): New variable.
* lib-src/Makefile.in (SIZEOF_LONG): New variable; added conditional.
Andreas Schwab [Fri, 15 Jul 2022 15:24:19 +0000 (17:24 +0200)]
Fix ASAN error with fringe bitmap on NS
* src/nsterm.m (ns_define_fringe_bitmap): Correctly access fringe
bitmap data. (Bug#56553)
Po Lu [Fri, 15 Jul 2022 14:04:52 +0000 (22:04 +0800)]
; * src/nsterm.m (ns_draw_window_cursor): Fix last change.
Po Lu [Fri, 15 Jul 2022 14:00:57 +0000 (22:00 +0800)]
Fix double unfocus during NS cursor display
* src/nsterm.m (ns_draw_window_cursor): Unfocus around calls to
draw_phys_cursor_glyph, then focus again later. (bug#56559)
Po Lu [Fri, 15 Jul 2022 13:46:55 +0000 (21:46 +0800)]
Only preserve PRIMARY and CLIPBOARD selection ownership by default
* lisp/cus-start.el (standard): Update defcustom type.
* src/xselect.c (x_should_preserve_selection): New function.
(x_clear_frame_selections): Use it to determine whether or not
to preserve a selection.
* src/xterm.c (x_preserve_selections): Fix tail initialization.
(syms_of_xterm): Update doc string of
`x-auto-preserve-selections'.
Eli Zaretskii [Fri, 15 Jul 2022 10:49:56 +0000 (13:49 +0300)]
Avoid infloop in redisplay when displaying a tooltip
* src/xdisp.c (try_window): Ensure we fail if 'display_line'
indicates that the dimensions of the glyph matrix are
insufficient. (Bug#56561)
Lars Ingebrigtsen [Fri, 15 Jul 2022 10:36:33 +0000 (12:36 +0200)]
Tweak how dired-copy-filename-as-kill handles file names with spaces
* lisp/dired.el (dired-copy-filename-as-kill): Quote files
containing spaces (bug#48657).
Lars Ingebrigtsen [Fri, 15 Jul 2022 10:15:26 +0000 (12:15 +0200)]
Adjust whitespace tests
Lars Ingebrigtsen [Fri, 15 Jul 2022 10:07:19 +0000 (12:07 +0200)]
Fix whitespace-mode display table restoration logic
* lisp/whitespace.el (whitespace-display-char-on): Fix the saving
logic -- `whitespace-mode' is on by this point (bug#48583).
Visuwesh [Fri, 15 Jul 2022 09:50:03 +0000 (11:50 +0200)]
Fix mailcap-user-mime-data doc string
* lisp/net/mailcap.el (mailcap-user-mime-data): Make the doc
string reflect the actual structure (bug#56568).