1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-17 16:41:17 -08:00
Commit graph

158349 commits

Author SHA1 Message Date
Gregory Heytings
874e252503 Improve font locking in buffers with long lines (bug#56682).
* src/dispextern.h (struct it): New 'narrowed_zv' field.

* src/xdisp.c (init_iterator): Set the field.
(get_narrowed_zv): New function to set the field.
(handle_fontified_prop): Use the field, together with 'narrowed_begv',
to narrow the portion of the buffer that 'Vfontification_functions'
will see.  Also bind 'inhibit-widen'.
(get_narrowed_len): New function, factored out of 'get_narrowed_begv'.
(unwind_narrowed_zv): New function.

* src/editfns.c (syms_of_editfns): New variable and symbol 'inhibit-widen'.
(Fwiden): Do nothing when 'inhibit-widen' is non-nil.
2022-07-22 12:06:31 +02:00
Gregory Heytings
616da8fa8e Merge branch 'feature/fix-the-long-lines-display-bug' 2022-07-21 12:37:45 +02:00
Eli Zaretskii
51f8e86374 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.
2022-07-21 12:40:28 +03:00
Po Lu
a29a3ad55d 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.
2022-07-21 16:26:50 +08:00
Stefan Kangas
5f1023a2ff Minor doc fix in search-forward-help-for-help
* lisp/help.el (search-forward-help-for-help): Use command
substitution.
2022-07-21 09:23:27 +02:00
Stefan Kangas
8e71e9b103 Make bs-help obsolete in favor of describe-mode
* lisp/bs.el (bs-help): Make obsolete in favor of describe-mode.
Update uses.
2022-07-21 09:23:20 +02:00
Stefan Kangas
204d9f976d Make dictionary-help obsolete in favor of describe-mode
* lisp/net/dictionary.el (dictionary-help): Make obsolete in favor
of describe-mode.  Update uses.
2022-07-21 09:23:20 +02:00
Stefan Kangas
c8a586c1db Don't list obsolete in "other commands" help section
* lisp/help-fns.el (help-fns--list-local-commands): Don't list
obsolete commands.
2022-07-21 09:23:20 +02:00
Eli Zaretskii
46052d1dcb 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)
2022-07-21 10:12:03 +03:00
Po Lu
50ff15bb8a 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.
2022-07-21 14:55:19 +08:00
Stefan Kangas
6940cebe03 Make bubbles-quit obsolete in favor of quit-window
* lisp/play/bubbles.el (bubbles-quit): Make obsolete in favor of
quit-window.  Update uses.
2022-07-21 08:45:18 +02:00
Stefan Kangas
a4c0ea395b 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.
2022-07-21 08:45:17 +02:00
Stefan Kangas
5ebd15f2da Merge from origin/emacs-28
ea44d7ddfc ; * lisp/mail/smtpmail.el (smtpmail-via-smtp): Explain wit...
2022-07-21 06:30:38 +02:00
Po Lu
a641f55559 Improve handling screen resizes when built without RandR
* src/xterm.c (handle_one_xevent): Update DND tooltip position
upon ConfigureNotify for root window.
2022-07-21 09:39:24 +08:00
Po Lu
500a4286ca Revert "Prefer defvar-keymap in xwidget.el"
This reverts commit daf2c3e23a.
2022-07-21 09:19:14 +08:00
Stefan Kangas
329ec11b0f ; Normalize some "Author" headers 2022-07-20 22:38:01 +02:00
Stefan Kangas
daf2c3e23a Prefer defvar-keymap in xwidget.el
* lisp/xwidget.el (xwidget-webkit-mode-map)
(xwidget-webkit-edit-mode-map): Prefer defvar-keymap.
2022-07-20 22:38:01 +02:00
Gregory Heytings
e09c056a44 * src/xdisp.c (redisplay_window): Small optimization. 2022-07-20 21:54:39 +02:00
Eli Zaretskii
cec248ec31 ; * src/data.c (Fash): Improve wording of the doc string. 2022-07-20 22:03:45 +03:00
Eli Zaretskii
ea44d7ddfc ; * lisp/mail/smtpmail.el (smtpmail-via-smtp): Explain with-case-table. 2022-07-20 21:27:15 +03:00
Gregory Heytings
c7eef61eee 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.
2022-07-20 19:14:41 +02:00
Po Lu
41b30d9958 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.
2022-07-20 12:16:36 +00:00
Eli Zaretskii
4582e356d1 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)
2022-07-20 14:57:15 +03:00
Mattias Engdegård
b70a00d9bf 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.
2022-07-20 13:51:55 +02:00
Mattias Engdegård
563bf2fae5 ; * lisp/org/ol.el (org-link--decode-compound): lsh -> ash 2022-07-20 13:51:55 +02:00
Po Lu
05a022c36e 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>.
2022-07-20 19:06:27 +08:00
Stefan Kangas
e0b6f87fd7 ; Merge from origin/emacs-28
The following commit was skipped:

f02944f5a1 Prevent GC of window referenced from EmacsScroller
2022-07-20 10:30:41 +02:00
Stefan Kangas
bbac84ac9b Merge from origin/emacs-28
cb911febc6 ; Fix typos

# Conflicts:
#	test/lisp/net/tramp-tests.el
2022-07-20 10:30:41 +02:00
Po Lu
83753d05eb 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.
2022-07-20 07:37:41 +00:00
Stefan Kangas
32db168290 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.
2022-07-20 09:27:30 +02:00
Po Lu
ffd38a9911 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.
2022-07-20 09:41:43 +08:00
João Távora
3c539cb5b3 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.
2022-07-20 00:35:18 +01:00
João Távora
5f64ba0efb 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.
2022-07-20 00:27:56 +01:00
Gregory Heytings
7c0fc85364 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.
2022-07-19 23:34:09 +02:00
Gregory Heytings
c6bee17075 Revert commits 1ff69cc744 and 9a894206f6. 2022-07-19 23:30:17 +02:00
Philip Kaludercic
9a68ee440b * eudc.texi: Unquote setopt option names 2022-07-19 11:05:52 -04:00
Eli Zaretskii
406509434d Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2022-07-19 16:43:37 +03:00
Eli Zaretskii
29bf19df09 ; 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.
2022-07-19 16:42:43 +03:00
Gregory Heytings
9a894206f6 Improve the heuristic for long lines detection again.
* src/xdisp.c (redisplay_window): Improve the heuristic again.
2022-07-19 15:35:14 +02:00
Mattias Engdegård
e536fb0851 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.
2022-07-19 15:21:56 +02:00
Mattias Engdegård
ac1d15e95c ; * src/data.c (Fash): More precise doc string 2022-07-19 15:21:56 +02:00
Gerd Moellmann
f02944f5a1 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 5f1bd87247)
2022-07-19 16:04:13 +03:00
Stefan Kangas
cb911febc6 ; Fix typos 2022-07-19 14:13:25 +02:00
Stefan Kangas
653503573c ; * lisp/bindings.el: Remove conflicting commented out bindings. 2022-07-19 13:52:12 +02:00
Stefan Kangas
1d0937c90d 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.
2022-07-19 13:52:03 +02:00
Mattias Engdegård
c80adde1d9 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.
2022-07-19 12:09:33 +02:00
Stefan Kangas
4b807380cf 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)
2022-07-19 06:30:56 +02:00
Po Lu
393a3eef26 Document workaround for bug#56627
* etc/PROBLEMS: Document problems with GTK tool bar icons on
some icon themes.  (bug#56627)
2022-07-19 11:29:34 +08:00
Stefan Monnier
c32212bf96 (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.
2022-07-18 22:22:34 -04:00
Po Lu
6692df0279 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.
2022-07-19 09:41:36 +08:00