1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-26 07:33:47 +00:00
Commit Graph

157494 Commits

Author SHA1 Message Date
Lars Ingebrigtsen
1883e532d1 Untabify doc strings before displaying in Customize
* lisp/cus-edit.el (custom-variable-documentation): Untabify the
doc string since we'll be indenting it when displaying it (which
makes the tabs not align properly).
2022-06-21 19:08:25 +02:00
Manuel Giraud
0008003c3e Two typos captured on OpenBSD/clang
; * src/kqueue.c (kqueue_compare_dir_list): Indent typo.
; * src/sysdep.c (system_process_attributes): Unused variable on OpenBSD.
2022-06-21 18:46:53 +03:00
Po Lu
a4dcc8b9a9 Fix recent change to xlwmenu.c
* lwlib/xlwmenu.c (ungrab_all): Ungrab keyboard if it was
grabbed.  This handles `lucid--menu-grab-keyboard' changing
while the menu is open.

(XlwMenuDestroy):
(pop_up_menu): Record if the keyboard was grabbed.
2022-06-21 22:14:49 +08:00
Po Lu
be35c92c90 Rewrite PGTK selection code from scratch
* src/frame.c (delete_frame): Clear selections and swallow
special events.

* src/keyboard.c (kbd_buffer_get_event, process_special_events):
Also handle selection events on PGTK.

* src/keyboard.h (union buffered_input_event): Include selection
events on PGTK.

* src/pgtkselect.c (symbol_to_gtk_clipboard, LOCAL_SELECTION):
New functions and macros.
(selection_type_to_quarks, get_func, clear_func): Delete
functions.
(pgtk_selection_init, pgtk_selection_lost):
(pgtk_selection_usable): New functions.
(Fpgtk_own_selection_internal, Fpgtk_disown_selection_internal)
(Fpgtk_selection_exists_p, Fpgtk_selection_owner_p)
(Fpgtk_get_selection_internal): Complete rewrite.
(syms_of_pgtkselect): Update defsyms and add more hooks.

* src/pgtkselect.h: Delete file.

* src/pgtkterm.c (evq_enqueue): Set last user time based on the
event.
(pgtk_any_window_to_frame, button_event): Fix coding style.
(pgtk_set_event_handler): Add selection events.
(pgtk_find_selection_owner, pgtk_selection_event): New
functions.
(pgtk_term_init): Remove call to `pgtk_selection_init'.

* src/pgtkterm.h (struct pgtk_display_info): New field
`display'.
(enum selection_input_event): New struct.  New macros for
accessing its fields.
2022-06-21 22:05:21 +08:00
Eli Zaretskii
b1af8c2c00 ; * doc/lispref/os.texi (Batch Mode): Fix typo and wording. 2022-06-21 16:21:53 +03:00
Lars Ingebrigtsen
49137311a4 Fix previous -batch change for gc-cons-percentage
* src/emacs.c (main): Reset the default for gc-cons-percentage in
interactive Emacs.
2022-06-21 15:11:28 +02:00
Lars Ingebrigtsen
73a384a986 Increase gc-cons-percentage in -batch Emacs
* doc/lispref/os.texi (Batch Mode): Document it.

* src/emacs.c (main): Use a gc-cons-percentage of 1.0 in
noninteractive Emacsen.
2022-06-21 15:04:38 +02:00
Michael Albinus
0939465300 Tramp code cleanup
* lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process):
Improve handling of "process-name" and "process-buffer" connection
properties.
2022-06-21 14:59:46 +02:00
Stefan Kangas
32906819ad Allow shortening filenames in recentf-mode menu
* lisp/recentf.el (recentf-show-abbreviated): New function.
(recentf--filter-names): New helper function.
(recentf-show-basenames): Use above new helper function.
(recentf-menu-filter): Allow setting user option to new value
'recentf-show-abbreviated'.
2022-06-21 14:38:45 +02:00
Eli Zaretskii
3518ab51d1 ; * lwlib/xlwmenu.c (ungrab_all): Fix typo. 2022-06-21 15:35:22 +03:00
kobarity
3491c7a322 Fix nested defuns handling in `python-nav-beginning-of-defun'
* lisp/progmodes/python.el (python-nav--beginning-of-defun): Fix
handling of nested defuns (bug#56105).
2022-06-21 13:37:08 +02:00
Lars Ingebrigtsen
a5387dec4e Fix previous describe-key change
* lisp/help.el (describe-function-orig-buffer): Ensure we bind
dynamically.
2022-06-21 13:34:54 +02:00
Lars Ingebrigtsen
ef03c8852d Make describe-key do doc string command key substitution again
* lisp/help.el (describe-key): Do doc string command key
substitution (bug#56106).
2022-06-21 13:33:02 +02:00
Lars Ingebrigtsen
7934bad23b Fix fontification in describe-key
* lisp/help.el (describe-key): Use insert instead of princ so that
text properties on the key descriptions survive.
2022-06-21 13:25:19 +02:00
Kevin Brubeck Unhammer
97950f2bc4 Speed up mail-extr in some configurations
* lisp/mail/mail-extr.el (mail-extract-address-components):
(mail-extract-address-components): The buffer is already in
fundamental-mode, so don't re-enable it (bug#56113).
2022-06-21 13:02:05 +02:00
Lars Ingebrigtsen
3d4b389f32 Rename recently-introduced dired-omit-line-regexp user option
* lisp/dired-x.el (dired-omit-lines, dired-omit-mode): Rename
dired-omit-line-regexp to dired-omit-lines for consistency.
2022-06-21 12:44:00 +02:00
Lars Ingebrigtsen
649b43d20c Make Lucid menus work from the keyboard also when uninstalled
* lwlib/xlwmenu.c (ungrab_all, pop_up_menu): Use it.

* src/keyboard.c (syms_of_keyboard): New variable (bug#46990).
2022-06-21 12:15:11 +02:00
Po Lu
8cf3c3203b Allow toggling antialiasing inside the Haiku font dialog
* src/haiku_support.cc (struct font_selection_dialog_message):
New field `disable_antialias'.
(MessageReceived): Handle new message SET_DISABLE_ANTIALIASING.
(class DualLayoutView): Rename to `TripleLayoutView'.
(class TripleLayoutView): Rename from `DualLayoutView'.
(MinSize): Update computations for three views.

(class EmacsFontSelectionDialog, UpdatePreview)
(EmacsFontSelectionDialog): Add an antialiasing checkbox to
control antialiasing.
(be_select_font): New arguments `initial_antialias' and
`disable_antialias'.

* src/haiku_support.h: Update prototypes.

* src/haikufont.c (haikufont_pattern_from_object): Set
FSPEC_ANTIALIAS.
(Fx_select_font): Update accordingly.
2022-06-21 05:04:47 +00:00
Stefan Kangas
c175984e2c Merge from origin/emacs-28
2eb738f2b8 Support builds configured with a separate --bindir
cf4c204df8 * doc/misc/eww.texi (Overview, Basics): Fix typos.
2022-06-21 06:30:25 +02:00
Po Lu
1d681a5700 Add test for bug#56078 fix
* test/lisp/dnd-tests.el (dnd-tests-open-remote-url): New test.
2022-06-21 10:12:00 +08:00
Po Lu
01834ba0c9 Remove selection requests on the keyboard buffer when closing display
* src/xterm.c (X_NEXT_KBD_EVENT): New macro.
(x_defer_selection_requests): Set input_pending if the kbd
buffer was modified.
(x_delete_selection_requests): New function.
(x_delete_display): Call that.  Bug found when a display died
while the clipboard manager was sending an unreasonably high
number of requests.
2022-06-21 09:53:14 +08:00
Po Lu
32a6d52d43 Move selection delayed message to a better location
* lisp/term/x-win.el (gui-backend-get-selection): Remove
`with-delayed-message' here.
* src/xselect.c (x_display_selection_waiting_message)
(x_cancel_atimer): New functions.
(x_get_foreign_selection): Add an atimer that displays the
message after a while.
2022-06-21 09:35:07 +08:00
Sean Whitton
256fac4886 * lisp/edmacro.el: Add missing (require 'seq). 2022-06-20 17:43:27 -07:00
Sean Whitton
25e69968b0 term-set-escape-char: Remove old binding from term-raw-escape-map
* lisp/term.el (term-set-escape-char): When replacing the escape char,
remove the binding of the old escape char in term-raw-escape-map.
2022-06-20 17:34:46 -07:00
Alan Mackenzie
4ae315f7c3 Fix potential (goto-char nil) in byte-compile-warning-prefix
* lisp/emacs-lisp/bytecomp.el (byte-compile-warning-prefix): Replace a wrong
'or' form involving OFFSET with simply OFFSET.  This prevents OFFSET from
possibly being nil in the first branch of the containing `if' form.
2022-06-20 18:31:05 +00:00
Eli Zaretskii
2eb738f2b8 Support builds configured with a separate --bindir
* src/emacs.c (load_pdump): Don't overwrite the leading
directories of the Emacs executable just because the pdumper file
was not found in the expected directory relative to the binary.
This is needed to support builds with a separate --bindir
configure-time option and native-compilation.  (Bug#55741)
2022-06-20 19:04:06 +03:00
Lars Ingebrigtsen
54e3509771 Issue a message if getting a selection takes a long time
* lisp/term/x-win.el (gui-backend-get-selection): If getting the
selection takes a long time, issue a message after one second
(bug#46935).
2022-06-20 17:34:33 +02:00
Michael Albinus
c6ff592663 Adapt url-tramp-tests
* test/lisp/url/url-tramp-tests.el (url-tramp-test-convert-url-to-tramp)
(url-tramp-test-convert-tramp-to-url): Adapt tests.
2022-06-20 15:45:46 +02:00
Eli Zaretskii
5e7a0873c5 ; * src/process.c (wait_reading_process_output): Fix typo. 2022-06-20 16:08:46 +03:00
Eli Zaretskii
0c8bc8e6d9 ; Fix recent change of documentation of face-remap
* lisp/face-remap.el (text-scale-adjust):
* doc/emacs/display.texi (Text Scale): Fix wording of recent
changes to documentation.
2022-06-20 16:05:05 +03:00
Po Lu
4cc2f820b5 Fix x-selection-timeout if some keyboard input arrives while waiting
* src/process.c (wait_reading_process_output): Don't allow
skipping calls to select if detect_input_pending when just
waiting for a cell.  (bug#46935)

* src/xselect.c (x_get_foreign_selection): Add more debugging
code.
2022-06-20 20:59:38 +08:00
Eli Zaretskii
a7aeef934b ; * lisp/help-mode.el (help-xref-button): Doc fix. 2022-06-20 15:49:11 +03:00
Eli Zaretskii
3642f37872 ; * lisp/image.el (find-image): Fix typos. 2022-06-20 15:42:48 +03:00
Stefan Kangas
e2ec4b8443 Prefer defvar-keymap in hi-lock.el
* lisp/hi-lock.el: Prefer keymap-set in documentation.
(hi-lock-map): Prefer defvar-keymap.
2022-06-20 13:23:24 +02:00
Po Lu
45dc99dcb9 Fix ns-reg-to-script definition
* src/nsfont.m (syms_of_nsfont): Fix definition.
2022-06-20 19:11:38 +08:00
Po Lu
f120db63a3 Fix running temacs on Haiku
* src/emacs.c (main): Run init_haiku_select at the right place.
2022-06-20 11:02:14 +00:00
Po Lu
b5dd337ada Fix initialization of Haiku font driver
* src/font.c (register_font_driver): Fix comment.

* src/haikufont.c (haikufont_booleans): New list.
(haikufont_filter_properties): New function.
(haikufont_driver): Register new hook.
(syms_of_haikufont_for_pdumper): Register font driver globally.
(syms_of_haikufont): Call it in a pdumper hook.
2022-06-20 10:58:45 +00:00
Michael Albinus
8400c59358 Fix problems with Tramp FTP and URL handler mode
* lisp/net/tramp-archive.el (tramp-archive-run-real-handler):
Add ;;;###tramp-autoload cookie.

* lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler): Prevent invocation
of `tramp-archive-file-name-handler'.  (Bug#56078)

* lisp/url/url-tramp.el (url-tramp-convert-url-to-tramp)
(url-tramp-convert-tramp-to-url): Make them more robust.
2022-06-20 12:47:27 +02:00
Po Lu
854714efb4 Ignore pinch events from the wrong window
* src/xterm.c (handle_one_xevent): Use x_window_to_frame to find
frames for pinch events.
2022-06-20 18:13:51 +08:00
David Ponce
c1453cd6f6 Make images found through find-image' be handled like create-image'
* lisp/image.el (find-image): Use `create-image' so that we get
auto-scaling of images (bug#40978).
2022-06-20 11:39:56 +02:00
Lars Ingebrigtsen
bd0b96d252 Allow using :width/:height as normal with xbm images
* doc/lispref/display.texi (XBM Images): Adjust the documentation.
* src/image.c (enum xbm_keyword_index): Add :data-width and
:data-height.
(xbm_format): Ditto.
(xbm_image_p): Allow passing in :width/:height for display.
(xbm_load): Use :data-width/:data-height.
2022-06-20 11:18:31 +02:00
Stefan Kangas
cf4c204df8 * doc/misc/eww.texi (Overview, Basics): Fix typos. 2022-06-20 11:09:18 +02:00
Richard Hansen
1172c7303d whitespace: Redraw if indentation or line length changes
* lisp/whitespace.el (whitespace-color-on): Convert the indentation
matcher from a static regular expression to a function so that changes
to `indent-tabs-mode' and `tab-width' are picked up the next time
`font-lock-flush' runs.
(whitespace--indentation-matcher): The new function matcher.
(whitespace--variable-watcher): New variable watcher that calls
`font-lock-flush' if `whitespace-mode' is enabled for the buffer.
(whitespace--watched-vars): List of variables to watch.
(whitespace-unload-function): Un-watch the variables. (bug#56103).
2022-06-20 09:41:15 +02:00
Po Lu
382f7920ab Respect `:antialias' on Haiku
* src/haiku_font_support.cc (BFont_find): Pass through
FSPEC_ANTIALIAS.
(be_set_font_antialiasing): New function.

* src/haiku_support.h (enum haiku_font_specification): New enum
FSPEC_ANTIALIAS.
(struct haiku_font_pattern): New field `use_antialiasing'.

* src/haikufont.c (haikufont_pattern_to_entity)
(haikufont_spec_or_entity_to_pattern, haikufont_open): Respect
antialiasing.
(syms_of_haikufont): New defsym `:indices'.
2022-06-20 02:16:34 +00:00
Po Lu
9a6b6b1887 Don't generate superfluous wheel events during drag and drop
* src/xterm.c (handle_one_xevent): Only set user time and don't
create wheel events if DND is in progress.
2022-06-20 09:17:21 +08:00
Po Lu
772c0e6f20 Fix earlier change in xfaces.c for antialiasing in the mode line
* src/xfaces.c (realize_gui_face): Don't put QCantialias in
empty spec if it doesn't exist in the original.
2022-06-20 09:16:41 +08:00
Miha Rihtaršič
9c359b0cec xref-goto-xref: Set input focus in addition to selecting window
* lisp/progmodes/xref.el (xref--show-location): Set input focus in
addition to selecting displayed window (Bug#55983).
2022-06-20 03:44:14 +03:00
Lars Ingebrigtsen
28bfd4db69 Allow removing quotes around links in *Help* buffers
* doc/emacs/help.texi (Help Mode): Document it.
* lisp/help-mode.el (help-clean-buttons): New user option
(help-xref-button): Use it.
2022-06-20 02:27:00 +02:00
Lars Ingebrigtsen
ac39c327b5 Tweak quoting in help-fns--compiler-macro
* lisp/help-fns.el (help-fns--compiler-macro): Fix quotes in help
text.
2022-06-20 02:12:06 +02:00
Pip Cet
3947037a33 Fix bytecompiler infloop compiling infloops
* lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode): Don't apply
optimization if we can't change anything (bug#46906).
2022-06-20 01:59:49 +02:00