1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-29 19:48:19 +00:00
Commit Graph

156069 Commits

Author SHA1 Message Date
Stefan Kangas
2fba71cf1f Fix handling double-click-time nil or t
* lisp/mouse.el (mouse-double-click-time): New function to always
return a number for `double-click-time'.
* lisp/emulation/viper-mous.el (viper-multiclick-timeout):
* lisp/foldout.el (foldout-mouse-swallow-events):
* lisp/help.el (help--read-key-sequence):
* lisp/org/org-mouse.el (org-mouse-show-context-menu): Use
'mouse-double-click-time' instead of 'double-click-time'.
* src/keyboard.c (syms_of_keyboard): Mention
'mouse-double-click-time' in doc string of 'double-click-time'.
* test/lisp/mouse-tests.el (mouse-test-mouse-double-click-time):
New test.
2022-05-02 12:03:08 +02:00
Lars Ingebrigtsen
f7a6dd4fcc Re-fix Gcc header tokenization in Gnus
* lisp/gnus/gnus-msg.el (gnus-inews-do-gcc): Split the Gcc header
on commas, but allow group names to contain spaces (bug#55217).
2022-05-02 11:37:35 +02:00
Lars Ingebrigtsen
97badaab79 Allow reusing the *Help* window with i'/s/ commands
* doc/emacs/help.texi (Help): Document it.

* lisp/help-mode.el (help-function-def--button-function): Use it.
* lisp/help-mode.el (help-goto-info): Use it.

* lisp/help.el (help-window-select): Mention it.
(help-window-keep-selected): New user option (bug#9054).

* lisp/info-look.el (info-lookup-symbol):
(info-lookup): Allow keeping the same window.
2022-05-02 11:30:52 +02:00
Po Lu
3894522559 Fix inconsistencies in Haiku font selection dialog
* src/haiku_font_support.cc (font_family_style_matches_p): Fix
coding style.
* src/haikufont.c (haikufont_pattern_from_object): Set slant and
width using correct object.
2022-05-02 09:05:40 +00:00
Lars Ingebrigtsen
95507dd403 Allow show-paren to show matching parentheses inside comments
* lisp/paren.el (show-paren--default): Improve blinking when
inside a comment (bug#5410).
2022-05-02 11:02:54 +02:00
Po Lu
f70dfb74cc Fix handling of some weights in the Haiku font driver
* src/haiku_font_support.cc (font_style_to_flags):
* src/haiku_support.h (enum haiku_font_weight):
* src/haikufont.c (haikufont_weight_to_lisp)
(haikufont_lisp_to_weight): Make `ultralight' and `extralight'
mean the same thing.
2022-05-02 08:46:23 +00:00
Lars Ingebrigtsen
44243af8f2 Use xref-goto-xref as the xref mouse binding
* lisp/progmodes/xref.el (xref--button-map): Keep the
xref-goto-xref binding instead of select-and-show to be more
similar to grep buffers.
2022-05-02 10:01:55 +02:00
Lars Ingebrigtsen
e280df0e34 Fix the OMIT-NULLS + "" case in string-lines
* lisp/subr.el (string-lines): Respect OMIT-NULLS when given an
empty string.
2022-05-02 09:56:58 +02:00
Po Lu
a6a4f1d6d1 Improve font dialog on macOS
* src/nsterm.m ([EmacsView changeFont:]): Don't exit loop here
on macOS.
([EmacsView noteUserSelectedFont]): New function.
([EmacsView showFontPanel]): Add explicit "OK" button on macOS.
2022-05-02 15:06:58 +08:00
Po Lu
3ea1a6672b Default to currently selected font in Haiku font dialogs
* src/haiku_font_support.cc (be_find_font_indices): New
function.
* src/haiku_support.cc (class EmacsFontSelectionDialog)
(UpdateStylesForIndex, EmacsFontSelectionDialog): Allow
specifying an initial font family and style.
(be_select_font): New parameters `initial_family' and
`initial_style'.
* src/haiku_support.h: Update prototypes.

* src/haikufont.c (haikufont_lisp_to_weight)
(haikufont_lisp_to_slant, haikufont_lisp_to_width): Handle
`regular'.
(haikufont_pattern_from_object): New function.
(haikufont_spec_or_entity_to_pattern): Fix coding style.
(Fx_select_font): Compute indices based on currently selected
font.
(syms_of_haikufont): New defsyms.
2022-05-02 05:49:42 +00:00
Stefan Monnier
2fa11123e5 * lisp/gnus/gnus-util.el (gnus-byte-compile): Use lexical-binding 2022-05-02 01:14:42 -04:00
Po Lu
be3267eb34 Fix race conditions with async input in some Haiku dialogs
* src/haikufns.c (Fhaiku_save_session_reply):
* src/haikufont.c (Fx_select_font): Block sigio around system
calls.
2022-05-02 01:59:52 +00:00
Po Lu
48ea81af97 Fix the macOS build
* src/nsterm.m (ns_font_desc_to_font_spec, syms_of_nsterm):
Define missing symbols that are only on GNUstep.
2022-05-02 09:38:36 +08:00
Po Lu
7b05f351f2 Make the NS font dialog return more correct values
* src/nsfns.m (Fx_select_font): Update doc string.
* src/nsterm.m (ns_font_desc_to_font_spec): New
function.
([EmacsView showFontPanel]): Return selected font as a
font spec instead.
2022-05-02 09:32:54 +08:00
Po Lu
4fac694669 Fix devices staying disabled in some cases
* src/xterm.c (handle_one_xevent): Process queued disables
before handling an XIDeviceEnabled situation.
2022-05-02 08:49:40 +08:00
Lars Ingebrigtsen
51186ed69c Fix string-lines return for ""
* lisp/subr.el (string-lines): Return the correct result on ""
(bug#55213).
2022-05-01 23:05:06 +02:00
Lars Ingebrigtsen
4f395efa06 Change string-lines semantics slightly
* lisp/subr.el (string-lines): Change the semantics slightly --
don't return an empty string for a trailing newline.
2022-05-01 20:54:11 +02:00
Jim Porter
32ab756d82 Handle escaped characters in Eshell special references (e.g. buffers)
* lisp/eshell/esh-arg.el (eshell-parse-special-reference): Unescape
escaped characters.

* test/lisp/eshell/eshell-tests-helpers.el (with-temp-eshell): Restore
current buffer after evaluating BODY.

* test/lisp/eshell/eshell-tests.el (eshell-test/redirect-buffer)
(eshell-test/redirect-buffer-escaped): New tests (bug#55204).
2022-05-01 20:41:23 +02:00
Jim Porter
bb40507fed Handle escaped characters in Eshell argument predicates/modifiers
* lisp/eshell/em-pred.el (eshell-get-delimited-modifier-argument):
Unescape escaped characters.

* test/lisp/eshell/em-pred-tests.el (em-pred-test/predicate-escaping):
New test (bug#55204).
2022-05-01 20:41:21 +02:00
Jim Porter
ade1424a97 Use a common set of string delimiters for all Eshell predicates/modifiers
* lisp/eshell/em-pred.el (eshell-pred-delimiter-pairs): New variable.
(eshell-get-comparison-modifier-argument)
(eshell-get-numeric-modifier-argument)
(eshell-get-delimited-modifier-argument): New functions...
(eshell-pred-user-or-group, eshell-pred-file-time)
(eshell-pred-file-links, eshell-pred-file-size)
(eshell-pred-substitute, eshell-join-memebers, eshell-split-members):
... and use them here.
(eshell-include-members): Pass 'mod-char' and use
'eshell-get-delimited-modifier-argument'.
(eshell-pred-file-type, eshell-pred-file-mode): Use 'when-let'.
(eshell-modifier-alist): Pass modifier char to
'eshell-include-members'.

* test/lisp/eshell/em-pred-tests.el
(em-pred-test/predicate-delimiters): New test.
(em-pred-test/predicate-uid, em-pred-test/predicate-gid,
em-pred-test/modifier-include, em-pred-test/modifier-exclude): Remove
cases covered by 'em-pred-test/predicate-delimiters'.
(em-pred-test/modifier-substitute): Add test cases for new delimiter
styles.

* doc/misc/eshell.texi (Argument Predication and Modification):
Explain how string parameters are delimited.
(Argument Modifiers): Document some special delimiter behavior with
the 's/PATTERN/REPLACE/' modifier (bug#55204).

* etc/NEWS: Announce this change, and move the
'eshell-eval-using-options' entry to the Eshell section.
2022-05-01 20:41:18 +02:00
Stefan Monnier
788694d026 * lisp/minibuffer.el (completion--replace): Fix bug#55205 2022-05-01 13:04:44 -04:00
Po Lu
9370a4763a Replace NS code that implemented font panels in a different way
* doc/emacs/macos.texi (Mac / GNUstep Events): Document removal
of `ns-change-font' event.  The font panels are now implemented
normally, via `x-select-font'.

* lisp/term/common-win.el (x-setup-function-keys): Likewise.

* lisp/term/ns-win.el (global-map, ns-popup-font-panel): Remove.
(x-select-font, mouse-set-font, ns-input-font):
(ns-input-fontsize): Remove.
(ns-respond-to-change-font): Delete function.

* src/nsfns.m (Fns_popup_font_panel): Delete function.
(Fx_select_font): New function.
(syms_of_nsfns): Update subrs.
* src/nsterm.h (@interface EmacsView):
* src/nsterm.m (ns_select_1): New function.
(ns_select): Wrap around that instead.
([EmacsView changeFont:]): Exit nested event loop
([EmacsView showFontPanel:]): New function.
2022-05-01 21:39:54 +08:00
Lars Ingebrigtsen
7c8bec9e1f Don't enter the debugger from *Backtrace* or edebug on eval errors
* doc/lispref/debugging.texi (Error Debugging): Document it.

* doc/lispref/edebug.texi (Edebug Eval): Mention it.
* lisp/emacs-lisp/debug.el (debug-allow-recursive-debug): New user
option (bug#36145).
(debugger-eval-expression): Use it.

* lisp/emacs-lisp/edebug.el (edebug-eval-expression): Ditto.

This patch is based on a patch by Noam Postavsky.
2022-05-01 13:40:13 +02:00
Lars Ingebrigtsen
81ce4b0e4e Correct Using Debugger lispref node
* doc/lispref/debugging.texi (Using Debugger): Make documentation
reflect reality (bug#36145).
2022-05-01 13:07:14 +02:00
Lars Ingebrigtsen
730ad4a373 Make scroll-other-window respect target window remappings
* lisp/window.el (scroll-other-window, scroll-other-window-down):
Moved from window.c and change implementation so that they respect
command remappings in the target window (bug#20236).
2022-05-01 12:47:41 +02:00
Eli Zaretskii
8734d60b05 Improve documentation of 'malloc-trim'
* src/alloc.c (Fmalloc_trim): Fix the doc string.

* etc/NEWS: Document which systems support 'malloc-trim'.
2022-05-01 13:06:33 +03:00
Lars Ingebrigtsen
29f3d4d2c6 Add new function `malloc-trim'
* configure.ac (PGTK_LIBS): Check for malloc_trim.

* src/alloc.c (Fmalloc_trim): Add new function (bug#45200).
2022-05-01 11:51:43 +02:00
Po Lu
6984f325bd Fix specifying zero as a size for fonts on Haiku
* src/haiku_support.cc (MessageReceived): Set `size_specified'
correctly.
2022-05-01 09:08:33 +00:00
Po Lu
7c50fb248d Improve display of Haiku font dialog
* src/haiku_support.cc (EmacsFontSelectionDialog)
(class EmacsFontSelectionDialog, FrameResized): Set minimum size
based on individual view dimensions and add label to size
control.
(BWindow_set_min_size): Delete function.
* src/haiku_support.h: Update prototypes.
* src/haikuterm.c (haiku_update_size_hints): Stop setting min
size, since that doesn't work correctly on Haiku.
2022-05-01 08:54:26 +00:00
Lars Ingebrigtsen
159d8f7a0a Fix the mm-decode-content-transfer-encoding overflow better
* lisp/gnus/mm-bodies.el (mm-decode-content-transfer-encoding):
Use it.
(mm-base64-line-p): New function.
2022-05-01 10:20:07 +02:00
Po Lu
2fcbc74c33 * lisp/menu-bar.el (menu-bar-search-menu): Remove extra separator. 2022-05-01 07:23:50 +00:00
Eli Zaretskii
a3024ab4fb Document 'help-window-select'
* etc/NEWS:
* doc/emacs/help.texi (Apropos, Help): Document
'help-window-select'; improve indexing.  (Bug#46034)
2022-05-01 10:01:28 +03:00
Po Lu
d17d9c50c5 Allow specifying font size in the Haiku font selection dialog
* src/haiku_support.cc (struct font_selection_dialog_message):
New fields `size' and `size_specified'.
(class EmacsFontSelectionDialog): New `size_entry' control.
(MessageReceived): Set size from that control if available.
(EmacsFontSelectionDialog): Initialize that control.
(FrameResized): Handle layout for that control.
(be_select_font): New field `size'.
* src/haiku_support.h: Update prototypes.
* src/haikufont.c (Fx_select_font): Populate font spec with
size.
2022-05-01 05:42:32 +00:00
Stefan Kangas
5f220d9555 Update publicsuffix.txt from upstream
* etc/publicsuffix.txt: Update from
https://publicsuffix.org/list/public_suffix_list.dat
dated 2022-04-30 19:52:14 UTC.
2022-05-01 06:01:28 +02:00
Po Lu
ece2ee965f Allow quitting inside font selection dialogs on Haiku
* src/haiku_support.cc (WaitForChoice): Accept new function for
checking quit flag.
(be_select_font): Pass that function.
* src/haiku_support.h: Update prototypes.
* src/haikufont.c (haikufont_should_quit_popup): New function.
(Fx_select_font): Give said function to `be_select_font'.
2022-05-01 03:20:58 +00:00
Po Lu
ed0de6200d Allow invoking fonts in the Haiku font dialog
* src/haiku_support.cc (MessageReceived): Handle invocations.
(EmacsFontSelectionDialog): Set style panel invocation message.
2022-05-01 02:43:18 +00:00
Po Lu
7dda9835c6 Improvements to the Haiku font dialog
* src/haiku_support.cc (class EmacsFontSelectionDialog)
(EmacsFontSelectionDialog, FrameResized): Fix colors and respect
monospace only.
(be_select_font): New parameter `allow_monospace_only'.
* src/haiku_support.h: Update prototype.
* src/haikufont.c (Fx_select_font): Respect
`exclude-proportional'.
2022-05-01 02:17:04 +00:00
Po Lu
07ae30d8f2 Also fix some compiler warnings in xterm.c that didn't show up
* src/xterm.c (x_dnd_begin_drag_and_drop): Don't define unused
variable on GTK builds.
2022-05-01 09:45:20 +08:00
Po Lu
4e6eb023e0 Fix the GTK build
* src/xterm.c (x_dnd_begin_drag_and_drop): Let GTK handle events
again.
2022-05-01 09:43:08 +08:00
Po Lu
905fabe590 * src/xterm.c (x_dnd_begin_drag_and_drop): Fix typo. 2022-05-01 09:41:16 +08:00
Po Lu
ba0264e191 Fix processing events from multiple displays during DND
* src/xterm.c (x_next_event_from_any_display): New function.
Only used on no-toolkit builds.
(x_dnd_begin_drag_and_drop): Compute correct dpyinfo for
handle_one_xevent.
2022-05-01 09:37:12 +08:00
Po Lu
61d6d43fe5 Clean up X Windows tooltip code
* src/xfns.c (x_hide_tip): Remove "bloodcurdling hack".
* src/xterm.c (handle_one_xevent): Add a better version here
instead.  The code is unlikely to be hit as well, since tooltip
frames are typically deleted, not just hidden.
2022-05-01 09:15:52 +08:00
Po Lu
b2fdf78fd9 Implement font selection dialog on Haiku
* src/haiku_font_support.cc (font_style_to_flags): Handle style
allocation failures.
(be_font_style_to_flags): New function.

* src/haiku_support.cc (struct font_selection_dialog_message):
New struct.
(class EmacsFontSelectionDialog): New class.
(be_select_font): New function.

* src/haiku_support.h: Update prototypes.
* src/haikufont.c (Fx_select_font): New function.
(syms_of_haikufont): Define new subr.
2022-05-01 01:00:15 +00:00
Basil L. Contovounesios
02bf6650b0 Fix failing image test on nox builds
* test/lisp/image-tests.el (image-supported-file-p/built-in): Skip
test in --without-x builds.
2022-05-01 01:19:51 +03:00
Lars Ingebrigtsen
4ea8ab77e2 Make `M-x apropos' respect help-window-select
* lisp/apropos.el (apropos-print): Respect help-window-select.
(apropos): Mention it (bug#46034).
2022-04-30 21:34:18 +02:00
Lars Ingebrigtsen
95dbe4b6ae Make load-path-shadows-mode a special mode
* lisp/emacs-lisp/shadow.el (load-path-shadows-mode): Make the
mode inherit from special-mode so that the `q' command works.
2022-04-30 20:34:35 +02:00
Lars Ingebrigtsen
0ea217d646 Fix compilation-max-output-line-length type
* lisp/progmodes/compile.el (compilation-max-output-line-length):
Fix the type.
2022-04-30 19:42:42 +02:00
Lars Ingebrigtsen
d90f54db22 Avoid regexp overflow in mm-decode-content-transfer-encoding
* lisp/gnus/mm-bodies.el (mm-decode-content-transfer-encoding):
The base64 may be huge, so avoid backtracking (bug#55195).
2022-04-30 19:14:35 +02:00
Lars Ingebrigtsen
0ea0aa255c Fix Vx_show_tooltip_timeout in ns build, too
* src/nsfns.m (Fx_show_tip): Respect Vx_show_tooltip_timeout here,
too.
2022-04-30 18:21:51 +02:00
Lars Ingebrigtsen
52e6352b81 Fix compilation after recent x-show-tooltip-timeout changes
* src/dispnew.c (syms_of_display): Move x-show-tooltip-timeout to
a common file to avoid breaking other systems.
2022-04-30 18:20:19 +02:00