]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoFix off-by-one error in string-truncate-left
Lars Ingebrigtsen [Sat, 23 Jul 2022 06:55:20 +0000 (08:55 +0200)]
Fix off-by-one error in string-truncate-left

* lisp/emacs-lisp/subr-x.el (string-truncate-left): Fix off-by-one
error (bug#56685).

2 years agoHandle text scale and global text scale during DND wheel movement
Po Lu [Sat, 23 Jul 2022 06:18:18 +0000 (14:18 +0800)]
Handle text scale and global text scale during DND wheel movement

* lisp/x-dnd.el (x-dnd-mwheel-scroll): Handle `text-scale' and
`global-text-scale' mwheel actions.

2 years agoFix mode line mouse-1 binding when showing only column numbers
Miha Rihtaršič [Sat, 23 Jul 2022 06:02:48 +0000 (08:02 +0200)]
Fix mode line mouse-1 binding when showing only column numbers

* lisp/bindings.el (mode-line-position): Fix the mouse-1 binding
when showing only column numbers (bug#56694).

2 years agoDon't bug out in src when there's no srcset
Lars Ingebrigtsen [Sat, 23 Jul 2022 05:46:52 +0000 (07:46 +0200)]
Don't bug out in src when there's no srcset

* lisp/net/shr.el (shr--preferred-image): Don't bug out when
there's no srcset.

2 years agoFix srcset parsing in shr
Lars Ingebrigtsen [Sat, 23 Jul 2022 05:43:45 +0000 (07:43 +0200)]
Fix srcset parsing in shr

* lisp/net/shr.el (shr--preferred-image): Factor out srcset
parsing for easier testing.
(shr--parse-srcset): Don't misparse URLs with commas in them.

2 years agoImprove efficiency of DND tooltip movement
Po Lu [Sat, 23 Jul 2022 01:35:20 +0000 (09:35 +0800)]
Improve efficiency of DND tooltip movement

* src/xterm.c (x_dnd_begin_drag_and_drop): Clear new flag.
(x_dnd_update_tooltip_position): Save last tooltip X and Y
somewhere, so we don't move it upon client lists being updated.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Fri, 22 Jul 2022 23:37:59 +0000 (01:37 +0200)]
Merge from origin/emacs-28

ae1ace1cf4 Adjust help-fns.el tests for recent change
04bdcf4aaa * src/terminal.c (Fframe_terminal): Use active voice
7fa491a9e9 Improve 'terminal-live-p' docstring some more
b9ac8c29ae Improve terminal-live-p docstring
0b4c81a152 * lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-event-vector): F...
8f8373170f * lisp/progmodes/cperl-mode.el: Don't mention obsolete arc...
25bc330a6d Make 'describe-function' say "byte-compiled" when appropriate
2b31e667be ;Improve documentation of locale-specific string comparison

2 years agoAdjust help-fns.el tests for recent change
Stefan Kangas [Fri, 22 Jul 2022 22:06:38 +0000 (00:06 +0200)]
Adjust help-fns.el tests for recent change

* test/lisp/help-fns-tests.el (help-fns-test-lisp-defun)
(help-fns-test-lisp-defsubst): Adjust tests for recent change.

2 years agoFix typo in error message in native-compile-prune-cache
Lars Ingebrigtsen [Fri, 22 Jul 2022 22:01:00 +0000 (00:01 +0200)]
Fix typo in error message in native-compile-prune-cache

* lisp/emacs-lisp/comp.el (native-compile-prune-cache): Fix typo
(bug#56713).

2 years agoFix spacing in *Help* buttons
Lars Ingebrigtsen [Fri, 22 Jul 2022 20:43:38 +0000 (22:43 +0200)]
Fix spacing in *Help* buttons

* lisp/help-mode.el (help-xref--navigation-buttons): Fix spacing
before single [forward] button.

2 years agoGive a better error message in native-compile-prune-cache
Lars Ingebrigtsen [Fri, 22 Jul 2022 19:55:23 +0000 (21:55 +0200)]
Give a better error message in native-compile-prune-cache

* lisp/emacs-lisp/comp.el (native-compile-prune-cache): Give a
better error message in non-nativecomp builds.

2 years ago; * src/xdisp.c (set_vertical_scroll_bar): Fix typo
Robert Pluim [Fri, 22 Jul 2022 14:20:36 +0000 (16:20 +0200)]
; * src/xdisp.c (set_vertical_scroll_bar): Fix typo

2 years agoFix display of scroll-bar in mini-windows
Eli Zaretskii [Fri, 22 Jul 2022 13:15:38 +0000 (16:15 +0300)]
Fix display of scroll-bar in mini-windows

* src/xdisp.c (set_vertical_scroll_bar): Ensure current_buffer is
set correctly when displaying scroll bar of a mini-window.
(Bug#56692)

2 years ago* src/terminal.c (Fframe_terminal): Use active voice
Robert Pluim [Fri, 22 Jul 2022 12:19:04 +0000 (14:19 +0200)]
* src/terminal.c (Fframe_terminal): Use active voice

2 years agoImprove 'terminal-live-p' docstring some more
Robert Pluim [Fri, 22 Jul 2022 12:03:01 +0000 (14:03 +0200)]
Improve 'terminal-live-p' docstring some more

* terminal.c (Fterminal_live_p): Improve description of arguments and
return value.

2 years agoFix bug#56692 questionably
Po Lu [Fri, 22 Jul 2022 11:51:56 +0000 (19:51 +0800)]
Fix bug#56692 questionably

* src/xdisp.c (set_vertical_scroll_bar): Don't recompute window
end of a mini window.  (bug#56692)

2 years ago; * etc/NEWS: Fix typos.
Michael Albinus [Fri, 22 Jul 2022 11:31:38 +0000 (13:31 +0200)]
; * etc/NEWS: Fix typos.

2 years agoExplain how to override Author with VC
Robert Pluim [Fri, 22 Jul 2022 08:18:41 +0000 (10:18 +0200)]
Explain how to override Author with VC

* CONTRIBUTE: Describe how to use Author header line and
'log-edit-setup-add-author'.

2 years agoImprove terminal-live-p docstring
Robert Pluim [Fri, 22 Jul 2022 08:14:45 +0000 (10:14 +0200)]
Improve terminal-live-p docstring

* src/terminal.c (Fterminal_live_p): Explain what happens when the
argument is nil.

2 years ago* lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-event-vector): Fix grammar
Robert Pluim [Fri, 22 Jul 2022 08:10:36 +0000 (10:10 +0200)]
* lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-event-vector): Fix grammar

2 years ago; Improve doc strings of 2 outline-minor-mode options
Eli Zaretskii [Fri, 22 Jul 2022 07:58:59 +0000 (10:58 +0300)]
; Improve doc strings of 2 outline-minor-mode options

* lisp/outline.el (outline-minor-mode-use-buttons)
(outline-minor-mode-buttons): Improve the doc strings.  (Bug#56691)

2 years agoFix handling hscroll during drag-and-drop
Po Lu [Fri, 22 Jul 2022 07:37:28 +0000 (15:37 +0800)]
Fix handling hscroll during drag-and-drop

* lisp/x-dnd.el (x-dnd-hscroll-flags): Delete function.
(x-dnd-get-modifiers, x-dnd-wheel-modifier-type): New functions.
(x-dnd-mwheel-scroll): Use that to determine hscroll instead.
* src/window.c (set_window_hscroll): Mark window as needing
redisplay if the hscroll really changed.

2 years agoFix posn-timestamp of scroll bar events on GTK
Po Lu [Fri, 22 Jul 2022 01:38:32 +0000 (09:38 +0800)]
Fix posn-timestamp of scroll bar events on GTK

* src/xterm.c (x_get_last_toolkit_time): New function.
(x_scroll_bar_to_input_event)
(x_horizontal_scroll_bar_to_input_event): Use it to retrieve
toolkit time.
(xg_scroll_callback, xg_end_scroll_callback): Set last user time
if possible.

2 years ago* lisp/help-mode.el (help-news): Use `view-file`
Stefan Monnier [Fri, 22 Jul 2022 00:01:36 +0000 (20:01 -0400)]
* lisp/help-mode.el (help-news): Use `view-file`

2 years ago* lisp/vc/vc-dispatcher.el (vc-log-edit): Un-quote the lambda
Stefan Monnier [Thu, 21 Jul 2022 23:50:23 +0000 (19:50 -0400)]
* lisp/vc/vc-dispatcher.el (vc-log-edit): Un-quote the lambda

2 years ago* lisp/progmodes/verilog-mode.el (verilog-surelint-off): Silence warning
Stefan Monnier [Thu, 21 Jul 2022 23:50:05 +0000 (19:50 -0400)]
* lisp/progmodes/verilog-mode.el (verilog-surelint-off): Silence warning

2 years ago(compilation-parse-errors-function): Remove obsolete var
Stefan Monnier [Thu, 21 Jul 2022 22:39:11 +0000 (18:39 -0400)]
(compilation-parse-errors-function): Remove obsolete var

* lisp/progmodes/compile.el (compilation-parse-errors-function): Remove.
(compilation--parse-region): Simplify accordingly.
(compilation--compat-parse-errors): Remove function, not used any more.
(compilation-error-list, compilation-parsing-end)
(compilation-old-error-list): Remove vars, not used any more.
(compilation-last-buffer): Mark as obsolete (sadly, forgot to do that
back in Emacs-22).

* lisp/textmodes/tex-mode.el: Remove old code that was needed for
Emacs<24.

* lisp/progmodes/prolog.el (prolog-consult-compile): Remove long-dead code.
(compilation-parse-errors-function): Remove declaration, not used any more.
(prolog-parse-sicstus-compilation-errors): Remove function, not used any more.

2 years agoimage-dired: Don't end messages with "."
Stefan Kangas [Thu, 21 Jul 2022 19:07:54 +0000 (21:07 +0200)]
image-dired: Don't end messages with "."

* lisp/image-dired.el (image-dired-toggle-dired-display-properties)
(image-dired--on-file-in-dired-buffer)
(image-dired-thumbnail-set-image-description)
(image-dired-mark-tagged-files)
(image-dired-dired-edit-comment-and-tags)
(image-dired-modify-mark-on-thumb-original-file): Don't end messages
with "." to better comply with '(elisp) Programming Tips'.

2 years ago; * lisp/wid-browse.el (widget-browse): Delete commented out code.
Stefan Kangas [Thu, 21 Jul 2022 19:00:41 +0000 (21:00 +0200)]
; * lisp/wid-browse.el (widget-browse): Delete commented out code.

This has been commented out since 1997.

2 years agoFix reference to 'x-max-tooltip-size' in complete.el
Eli Zaretskii [Thu, 21 Jul 2022 16:22:16 +0000 (19:22 +0300)]
Fix reference to 'x-max-tooltip-size' in complete.el

* lisp/cedet/semantic/complete.el: Don't assume that
x-max-tooltip-size is a cons cell.

2 years ago; * etc/NEWS: use the right outline level
Mattias Engdegård [Thu, 21 Jul 2022 14:22:23 +0000 (16:22 +0200)]
; * etc/NEWS: use the right outline level

2 years ago; * lisp/emacs-lisp/byte-opt.el (byte-optimize--fixnump): Optimise.
Mattias Engdegård [Thu, 21 Jul 2022 10:18:59 +0000 (12:18 +0200)]
; * lisp/emacs-lisp/byte-opt.el (byte-optimize--fixnump): Optimise.

2 years ago; Clarify doc string of 'long-line-threshold'
Eli Zaretskii [Thu, 21 Jul 2022 12:59:50 +0000 (15:59 +0300)]
; Clarify doc string of 'long-line-threshold'

* src/buffer.c (syms_of_buffer) <long-line-threshold>: Clarify the
doc string.

2 years agoMerge branch 'feature/fix-the-long-lines-display-bug'
Gregory Heytings [Thu, 21 Jul 2022 10:37:45 +0000 (12:37 +0200)]
Merge branch 'feature/fix-the-long-lines-display-bug'

2 years agoUpdate buffer's chars-modified tick when inserting from gap
Eli Zaretskii [Thu, 21 Jul 2022 09:40:28 +0000 (12:40 +0300)]
Update buffer's chars-modified tick when inserting from gap

* src/insdel.c (insert_from_gap): Update buffer's chars-modified
tick.  (Bug#56393)

* test/src/buffer-tests.el (test-buffer-chars-modified-ticks): New
test.

2 years ago* lisp/progmodes/cperl-mode.el: Don't mention obsolete archive.
Stefan Kangas [Thu, 21 Jul 2022 08:42:24 +0000 (10:42 +0200)]
* lisp/progmodes/cperl-mode.el: Don't mention obsolete archive.

2 years agoApply tooltip assertions to all instances of x-show-tip
Po Lu [Thu, 21 Jul 2022 08:26:34 +0000 (16:26 +0800)]
Apply tooltip assertions to all instances of x-show-tip

* src/haikufns.c (Fx_show_tip):
(syms_of_haikufns):
* src/nsfns.m (Fx_show_tip):
(syms_of_nsfns):
* src/pgtkfns.c (Fx_show_tip):
(syms_of_pgtkfns):
* src/xfns.c (Fx_show_tip):
(syms_of_xfns): Add assertion and adjust default values.

2 years agoMinor doc fix in search-forward-help-for-help
Stefan Kangas [Thu, 21 Jul 2022 07:23:27 +0000 (09:23 +0200)]
Minor doc fix in search-forward-help-for-help

* lisp/help.el (search-forward-help-for-help): Use command
substitution.

2 years agoMake bs-help obsolete in favor of describe-mode
Stefan Kangas [Thu, 21 Jul 2022 07:04:12 +0000 (09:04 +0200)]
Make bs-help obsolete in favor of describe-mode

* lisp/bs.el (bs-help): Make obsolete in favor of describe-mode.
Update uses.

2 years agoMake dictionary-help obsolete in favor of describe-mode
Stefan Kangas [Thu, 21 Jul 2022 06:56:59 +0000 (08:56 +0200)]
Make dictionary-help obsolete in favor of describe-mode

* lisp/net/dictionary.el (dictionary-help): Make obsolete in favor
of describe-mode.  Update uses.

2 years agoDon't list obsolete in "other commands" help section
Stefan Kangas [Thu, 21 Jul 2022 06:55:28 +0000 (08:55 +0200)]
Don't list obsolete in "other commands" help section

* lisp/help-fns.el (help-fns--list-local-commands): Don't list
obsolete commands.

2 years agoMake 'describe-function' say "byte-compiled" when appropriate
Eli Zaretskii [Thu, 21 Jul 2022 07:18:30 +0000 (10:18 +0300)]
Make 'describe-function' say "byte-compiled" when appropriate

* lisp/help-fns.el (help-fns-function-description-header): Say
"byte-compiled" when describing byte-compiled functions.

2 years agoMake sure we don't unknowingly truncate tooltip text
Eli Zaretskii [Thu, 21 Jul 2022 07:12:03 +0000 (10:12 +0300)]
Make sure we don't unknowingly truncate tooltip text

* src/w32fns.c (Fx_show_tip): Add assertion when the default
tooltip dimension limits are insufficient.  (Bug#56561)

2 years agoAvoid wasting bandwidth to set user time
Po Lu [Thu, 21 Jul 2022 06:55:05 +0000 (14:55 +0800)]
Avoid wasting bandwidth to set user time

* src/xterm.c (x_display_set_last_user_time): Don't change the
user time property if nothing actually changed.

2 years ago;Improve documentation of locale-specific string comparison
Eli Zaretskii [Thu, 21 Jul 2022 06:53:45 +0000 (09:53 +0300)]
;Improve documentation of locale-specific string comparison

* doc/lispref/strings.texi (Text Comparison): Mention the Unicode
collation rules and buffer-local case-tables.

2 years agoMake bubbles-quit obsolete in favor of quit-window
Stefan Kangas [Thu, 21 Jul 2022 06:21:16 +0000 (08:21 +0200)]
Make bubbles-quit obsolete in favor of quit-window

* lisp/play/bubbles.el (bubbles-quit): Make obsolete in favor of
quit-window.  Update uses.

2 years agoRemove superfluous installation instructions
Stefan Kangas [Thu, 21 Jul 2022 06:11:41 +0000 (08:11 +0200)]
Remove superfluous installation instructions

These functions are already autoloaded.
* lisp/mail/mspools.el:
* lisp/progmodes/opascal.el:
* lisp/textmodes/remember.el:
* lisp/woman.el: Remove superfluous installation instructions.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Thu, 21 Jul 2022 04:30:38 +0000 (06:30 +0200)]
Merge from origin/emacs-28

ea44d7ddfc ; * lisp/mail/smtpmail.el (smtpmail-via-smtp): Explain wit...

2 years agoImprove handling screen resizes when built without RandR
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.

2 years agoRevert "Prefer defvar-keymap in xwidget.el"
Po Lu [Thu, 21 Jul 2022 01:19:14 +0000 (09:19 +0800)]
Revert "Prefer defvar-keymap in xwidget.el"

This reverts commit daf2c3e23a45bff14f9d444d2d07455376d4b6da.

2 years ago; Normalize some "Author" headers
Stefan Kangas [Wed, 20 Jul 2022 20:34:34 +0000 (22:34 +0200)]
; Normalize some "Author" headers

2 years agoPrefer defvar-keymap in xwidget.el
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.

2 years ago* src/xdisp.c (redisplay_window): Small optimization.
Gregory Heytings [Wed, 20 Jul 2022 19:53:36 +0000 (19:53 +0000)]
* src/xdisp.c (redisplay_window): Small optimization.

2 years ago; * src/data.c (Fash): Improve wording of the doc string.
Eli Zaretskii [Wed, 20 Jul 2022 19:03:45 +0000 (22:03 +0300)]
; * src/data.c (Fash): Improve wording of the doc string.

2 years ago; * lisp/mail/smtpmail.el (smtpmail-via-smtp): Explain with-case-table.
Eli Zaretskii [Wed, 20 Jul 2022 18:27:15 +0000 (21:27 +0300)]
; * lisp/mail/smtpmail.el (smtpmail-via-smtp): Explain with-case-table.

2 years agoFurther tweaks to long lines handling.
Gregory Heytings [Wed, 20 Jul 2022 17:12:23 +0000 (17:12 +0000)]
Further tweaks to long lines handling.

* src/xdisp.c (redisplay_window): Increase the threshold above which
long lines detection is performed in the buffer.  This should avoid
triggering that detection for most simple editing operations.

* src/lisp.h (modiff_incr): Explain why the counter is incremented
logarithmically.

* src/buffer.h (struct buffer_text): Adapt the comment about the
'modiff' field accordingly.

* src/buffer.c (modify_overlay): Increase the counter by 1 instead of
the size of the buffer section on which the overlay is placed.

* etc/NEWS: Small improvement.

2 years agoFix mouse wheel DND scroll direction on Haiku
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.

2 years agoFix error during startup in -nw sessions
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)

2 years agoGently discourage use of `lsh` (bug#56641)
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.

2 years ago; * lisp/org/ol.el (org-link--decode-compound): `lsh` -> `ash`
Mattias Engdegård [Wed, 20 Jul 2022 09:17:51 +0000 (11:17 +0200)]
; * lisp/org/ol.el (org-link--decode-compound): `lsh` -> `ash`

2 years agoFix calculation of default highlightForeground in the lucid menu bar
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>.

2 years ago; Merge from origin/emacs-28
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

2 years agoMerge from origin/emacs-28
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

2 years agoImplement wheel movement during DND on Haiku
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.

2 years agoPrefer defvar-keymap in some trivial cases
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.

2 years agoFix setting user time upon scrolling self during DND
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.

2 years agoMake eldoc-echo-area-prefer-doc-buffer consider all frames
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.

2 years agoEnsure Eldoc buffer displays on interactive M-x eldoc
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.

2 years agoSimplified and improved heuristic for long lines detection.
Gregory Heytings [Tue, 19 Jul 2022 21:21:40 +0000 (21:21 +0000)]
Simplified and improved heuristic for long lines detection.

* src/lisp.h (modiff_incr): Add a parameter to 'modiff_incr' to record
the extent of the modification.

* src/insdel.c (insert_1_both, insert_from_string_1, insert_from_gap,
insert_from_buffer_1, adjust_after_replace, replace_range,
replace_range_2, del_range_2, modify_text): Add an argument to each
call to 'modiff_incr'.

* src/textprop.c (modify_text_properties): Add an argument to the call
to 'modiff_incr'.

* src/buffer.c (Frestore_buffer_modified_p, Fbuffer_swap_text,
modify_overlay): Add an argument to each call to 'modiff_incr'.

* src/xdisp.c (redisplay_window): Use the improved version of 'MODIFF'
for the heuristic.

2 years agoRevert commits 1ff69cc744 and 9a894206f6.
Gregory Heytings [Tue, 19 Jul 2022 21:30:17 +0000 (23:30 +0200)]
Revert commits 1ff69cc744 and 9a894206f6.

2 years ago* eudc.texi: Unquote setopt option names
Philip Kaludercic [Mon, 18 Jul 2022 20:44:52 +0000 (22:44 +0200)]
* eudc.texi: Unquote setopt option names

2 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Tue, 19 Jul 2022 13:43:37 +0000 (16:43 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

2 years ago; Fix punctuation in recently changed EUDC documentation
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.

2 years agoImprove the heuristic for long lines detection again.
Gregory Heytings [Tue, 19 Jul 2022 13:33:38 +0000 (13:33 +0000)]
Improve the heuristic for long lines detection again.

* src/xdisp.c (redisplay_window): Improve the heuristic again.

2 years agoUse `ash` instead of `lsh`
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.

2 years ago; * src/data.c (Fash): More precise doc string
Mattias Engdegård [Tue, 19 Jul 2022 11:56:08 +0000 (13:56 +0200)]
; * src/data.c (Fash): More precise doc string

2 years agoPrevent GC of window referenced from EmacsScroller
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)

2 years ago; Fix typos
Stefan Kangas [Tue, 19 Jul 2022 11:57:20 +0000 (13:57 +0200)]
; Fix typos

2 years ago; * lisp/bindings.el: Remove conflicting commented out bindings.
Stefan Kangas [Tue, 19 Jul 2022 11:52:12 +0000 (13:52 +0200)]
; * lisp/bindings.el: Remove conflicting commented out bindings.

2 years agoPrefer defvar-keymap in bindings.el
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.

2 years agoSpeed up `butlast`
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.

2 years agoMerge from origin/emacs-28
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)

2 years agoDocument workaround for bug#56627
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)

2 years ago(help-fns--first-release): Try and avoid false positives
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.

2 years agoFix timestamp specified in wheel movement XDND events
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.

2 years agoMake drag-and-drop wheel movement work locally too on X
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'.

2 years ago* src/xdisp.c (set_vertical_scroll_bar): Remove stale comment.
Eli Zaretskii [Fri, 8 Jul 2022 06:48:44 +0000 (09:48 +0300)]
* src/xdisp.c (set_vertical_scroll_bar): Remove stale comment.

2 years agoFix calculation of the vertical scroll bar's thumb
Eli Zaretskii [Fri, 8 Jul 2022 06:42:02 +0000 (09:42 +0300)]
Fix calculation of the vertical scroll bar's thumb

* src/xdisp.c (set_vertical_scroll_bar): Compute window's end
position "by hand" if w->window_end_pos cannot be relied upon.

2 years ago* etc/PROBLEMS: Remove the entry which is no longer relevant.
Gregory Heytings [Mon, 18 Jul 2022 18:49:58 +0000 (20:49 +0200)]
* etc/PROBLEMS: Remove the entry which is no longer relevant.

2 years agoUse ntake also in tramp-adb.el
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'.

2 years agoAdditional query and results attributes in eudcb-macos-contacts.el
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

2 years agoImprove the heuristic for long lines detection.
Gregory Heytings [Mon, 18 Jul 2022 15:50:57 +0000 (15:50 +0000)]
Improve the heuristic for long lines detection.

* src/buffer.h (struct buffer_text): New 'unchanged_size' field.
(BUF_UNCHANGED_SIZE): New macro to access the field.

* src/buffer.c (Fget_buffer_create): Initialize the field.
(Fbuffer_swap_text): Handle it.

* src/xdisp.c (mark_window_display_accurate_1): Set the field.
(redisplay_window): Use the field for long lines detection.

2 years ago; Fix typo missed in previous change
Robert Pluim [Mon, 18 Jul 2022 14:54:16 +0000 (16:54 +0200)]
; Fix typo missed in previous change

2 years agoShorter and safer fix for the segfault.
Gregory Heytings [Mon, 18 Jul 2022 14:04:04 +0000 (14:04 +0000)]
Shorter and safer fix for the segfault.

* src/xdisp.c (get_visually_first_element): Shorter and safer fix for
the segfault.  Improves the fix introduced in cc7f37b2a4.

2 years agoAdapt Tramp new test macros
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.

2 years agoUse ntake in Tramp
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.

2 years ago* lisp/rect.el (rectangle-mark-mode-map): Prefer defvar-keymap.
Stefan Kangas [Mon, 18 Jul 2022 13:21:15 +0000 (15:21 +0200)]
* lisp/rect.el (rectangle-mark-mode-map): Prefer defvar-keymap.

2 years ago; * doc/lispref/lists.texi (List Elements): No passive tense!
Eli Zaretskii [Mon, 18 Jul 2022 12:46:18 +0000 (15:46 +0300)]
; * doc/lispref/lists.texi (List Elements): No passive tense!

2 years ago; * lisp/net/tramp-crypt.el: Improve commentary
Robert Pluim [Mon, 18 Jul 2022 12:37:15 +0000 (14:37 +0200)]
; * lisp/net/tramp-crypt.el: Improve commentary

2 years agoMerge branch 'emacs-28' of git.savannah.gnu.org:/srv/git/emacs into emacs-28
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