]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoAvoid regexp overflow in mm-decode-content-transfer-encoding
Lars Ingebrigtsen [Sat, 30 Apr 2022 17:14:35 +0000 (19:14 +0200)]
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).

2 years agoFix Vx_show_tooltip_timeout in ns build, too
Lars Ingebrigtsen [Sat, 30 Apr 2022 16:21:51 +0000 (18:21 +0200)]
Fix Vx_show_tooltip_timeout in ns build, too

* src/nsfns.m (Fx_show_tip): Respect Vx_show_tooltip_timeout here,
too.

2 years agoFix compilation after recent x-show-tooltip-timeout changes
Lars Ingebrigtsen [Sat, 30 Apr 2022 16:20:19 +0000 (18:20 +0200)]
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.

2 years agoRemove the "retro" Gnus/Message tool bars
Lars Ingebrigtsen [Sat, 30 Apr 2022 16:17:47 +0000 (18:17 +0200)]
Remove the "retro" Gnus/Message tool bars

* doc/misc/gnus.texi (Gravatars): Remove documentation.
* lisp/gnus/gmm-utils.el (gmm-tool-bar-style): Obsoleted.

* lisp/gnus/gnus-group.el (gnus-group-tool-bar): Use the "Gnome"
definition.
(gnus-group-tool-bar-gnome, gnus-group-tool-bar-retro)
(gnus-group-tool-bar-zap-list): Obsolete.

* lisp/gnus/gnus-sum.el (gnus-summary-tool-bar): Use the "Gnome"
definition.
(gnus-summary-tool-bar-gnome, gnus-summary-tool-bar-retro)
(gnus-summary-tool-bar-zap-list): Obsolete.

* lisp/gnus/message.el (message-tool-bar): Use the "Gnome"
definition.
(message-tool-bar-gnome, message-tool-bar-retro)
(message-tool-bar-zap-list): Obsolete.

2 years ago* lisp/gnus/deuglify.el (gnus-article-outlook-rearrange-citation): Add autoload cookie.
Andreas Schwab [Sat, 30 Apr 2022 12:46:28 +0000 (14:46 +0200)]
* lisp/gnus/deuglify.el (gnus-article-outlook-rearrange-citation): Add autoload cookie.

2 years agoUse x-show-tooltip-timeout in all the implementations
Lars Ingebrigtsen [Sat, 30 Apr 2022 15:38:34 +0000 (17:38 +0200)]
Use x-show-tooltip-timeout in all the implementations

* src/haikufns.c (Fx_show_tip): Use the timeout variable.
* src/pgtkfns.c (Fx_show_tip): Ditto.

* src/w32fns.c (Fx_show_tip): Ditto.

* src/xfns.c (Fx_show_tip): Doc fix.

2 years agoDon't hard code the default x-show-tip timeout
Lars Ingebrigtsen [Sat, 30 Apr 2022 15:09:02 +0000 (17:09 +0200)]
Don't hard code the default x-show-tip timeout

* src/xfns.c (Fx_show_tip): Use it.
(syms_of_xfns): Add a new x-show-tooltip-timeout variable
(bug#23341).

2 years agoMove the when-let family of macros to subr.el
Lars Ingebrigtsen [Sat, 30 Apr 2022 14:42:44 +0000 (16:42 +0200)]
Move the when-let family of macros to subr.el

* lisp/subr.el (internal--build-binding)
(internal--build-bindings): Moved from subr-x.el and rewritten to
not use the threading macro.
(if-let*, when-let*, and-let*, if-let, when-let): Moved from
subr-x.el.  This avoids breaking the build every time somebody
uses these macros in functions that end up being called during
bootstrap.

2 years agoAvoid using if-let in subr.el
Lars Ingebrigtsen [Sat, 30 Apr 2022 14:24:55 +0000 (16:24 +0200)]
Avoid using if-let in subr.el

* lisp/subr.el (string-lines): Avoid using if-let (from subr-x) in
subr (bug#55194).

2 years ago; * doc/lispref/strings.texi (Creating Strings): Fix a typo.
Eli Zaretskii [Sat, 30 Apr 2022 11:54:35 +0000 (14:54 +0300)]
; * doc/lispref/strings.texi (Creating Strings): Fix a typo.

2 years agoMake the xref--button-map more regular
Lars Ingebrigtsen [Sat, 30 Apr 2022 11:38:04 +0000 (13:38 +0200)]
Make the xref--button-map more regular

* lisp/progmodes/xref.el (xref--button-map): Remove the mouse-1
binding (bug#35353).

2 years agoMake Python evaluation work more reliably
Jin Choi [Sat, 30 Apr 2022 11:34:57 +0000 (13:34 +0200)]
Make Python evaluation work more reliably

* lisp/progmodes/python.el (python-shell-buffer-substring): Make
more regions valid Python code (bug#55174).

Copyright-paperwork-exempt: yes

2 years agoFix some cases of flicker on MS Windows
Po Lu [Sat, 30 Apr 2022 11:02:56 +0000 (19:02 +0800)]
Fix some cases of flicker on MS Windows

* src/w32term.c (w32_read_socket): Fix typo in check before
flipping buffers.

2 years agoTruncate output from grep
Lars Ingebrigtsen [Sat, 30 Apr 2022 10:56:18 +0000 (12:56 +0200)]
Truncate output from grep

* doc/emacs/building.texi (Compilation): Document it.
* lisp/progmodes/compile.el (compilation-max-output-line-length):
New user option (bug#44983).
(compilation-filter): Use it.
(compilation--insert-abbreviated-line): New function.

2 years agoMake grep-mode-font-lock-keywords more efficient
Lars Ingebrigtsen [Sat, 30 Apr 2022 10:47:50 +0000 (12:47 +0200)]
Make grep-mode-font-lock-keywords more efficient

* lisp/progmodes/grep.el (grep-mode-font-lock-keywords): Make the
regexp less greedy so that long lines don't take forever to
font-lock (bug#44983).

2 years agoAdd a KEEP-NEWLINES argument to string-lines
Lars Ingebrigtsen [Sat, 30 Apr 2022 10:46:40 +0000 (12:46 +0200)]
Add a KEEP-NEWLINES argument to string-lines

* doc/lispref/strings.texi (Creating Strings): Document it.

* lisp/subr.el (string-lines): Add a KEEP-NEWLINES argument.

2 years agoFix display updating inside the minibuffer on MS Windows
Po Lu [Sat, 30 Apr 2022 10:54:34 +0000 (18:54 +0800)]
Fix display updating inside the minibuffer on MS Windows

* src/minibuf.c (read_minibuf): Call `w32_flip_buffers_if_dirty'
after changing the cursor position and redisplaying instead of
`flush_frame'.  (bug#55193)

* src/w32term.c (w32_flip_buffers_if_dirty): New function.
* src/w32term.h: Update prototypes.

2 years agoAvoid server roundtrip on wheel events from scroll bars on XI2
Po Lu [Sat, 30 Apr 2022 10:05:44 +0000 (18:05 +0800)]
Avoid server roundtrip on wheel events from scroll bars on XI2

* src/xterm.c (handle_one_xevent): Translate coordinates for
scroll bars correctly when handling XI2 wheel events.

2 years ago; * src/w32term.c (w32_read_socket): Add comment for recent change.
Eli Zaretskii [Sat, 30 Apr 2022 09:35:48 +0000 (12:35 +0300)]
; * src/w32term.c (w32_read_socket): Add comment for recent change.

2 years ago; Minor fixes of documentation of double-buffering on MS-Windows
Eli Zaretskii [Sat, 30 Apr 2022 09:00:33 +0000 (12:00 +0300)]
; Minor fixes of documentation of double-buffering on MS-Windows

* etc/NEWS: Improve and expand wording of the entry about
double-buffering on MS-Windows.

* src/w32fns.c (w32_set_inhibit_double_buffering): Fix commentary.

2 years ago* admin/CPP-DEFINES: Update for new features.
Po Lu [Sat, 30 Apr 2022 08:46:33 +0000 (16:46 +0800)]
* admin/CPP-DEFINES: Update for new features.

2 years agoProcess editres events not for frames correctly
Po Lu [Sat, 30 Apr 2022 07:57:11 +0000 (15:57 +0800)]
Process editres events not for frames correctly

* src/xterm.c (handle_one_xevent): Dispatch Editres events to
interested widgets.

2 years agoAdjustments to double buffering on MS Windows
Po Lu [Sat, 30 Apr 2022 07:49:06 +0000 (15:49 +0800)]
Adjustments to double buffering on MS Windows

* src/w32fns.c (w32_set_inhibit_double_buffering): Add comment
describing double buffering.
(w32_wnd_proc): Respect `w32-disable-double-buffering'.
(globals_of_w32fns): New variable
`w32-disable-double-buffering'.

* src/w32term.c (w32_show_back_buffer): Return immediately if
double buffering is disabled on the frame.
(w32_scroll_run): Use old scrolling code if
`w32-disable-double-buffering' is enabled.
(w32_scroll_bar_clear): Document why we don't clear scroll bars
when double buffering is enabled.
(w32_read_socket): Respect `w32-disable-double-buffering' and
clean up some code.

* src/w32xfns.c (get_frame_dc): Respect
`w32-disable-double-buffering'.

2 years agoFix use of kp-decimal in 'vhdl-stutter-mode'
Eli Zaretskii [Sat, 30 Apr 2022 07:10:07 +0000 (10:10 +0300)]
Fix use of kp-decimal in 'vhdl-stutter-mode'

* lisp/progmodes/vhdl-mode.el (vhdl-electric-period): Avoid
signaling an error when the user presses the kp-decimal key on the
numeric pad in 'vhdl-stutter-mode'.  (Bug#55079)

2 years agoHandle exposure in the widget's expose proc on X
Po Lu [Sat, 30 Apr 2022 06:29:33 +0000 (14:29 +0800)]
Handle exposure in the widget's expose proc on X

* src/widget.c (emacsFrameClassRec): Don't inherit expose proc.
(get_default_char_pixel_size):
(pixel_to_char_size):
(char_to_pixel_size):
(round_size_to_char):
(EmacsFrameInitialize):
(EmacsFrameRealize):
(EmacsFrameResize): Clean up coding style.
(EmacsFrameExpose): New function.  Expose the frame here to
satisfy the toolkit when it calls the expose proc by hand.

* src/xterm.c (handle_one_xevent): Handle exposure through the
widget instead.

2 years agoFix releasing the mouse on top of the tool bar on MS Windows
Po Lu [Sat, 30 Apr 2022 05:26:40 +0000 (13:26 +0800)]
Fix releasing the mouse on top of the tool bar on MS Windows

* src/w32term.c (w32_read_socket): Don't handle tool bar clicks
specially for button up events if no tool bar item was
previously pressed.

2 years agoFix palette freeing on MS Windows with double buffering
Po Lu [Sat, 30 Apr 2022 03:33:38 +0000 (11:33 +0800)]
Fix palette freeing on MS Windows with double buffering

* src/w32term.c (w32_release_paint_buffer): Also release target
DC palette.

2 years agoImplement double buffering on MS Windows
Po Lu [Fri, 29 Apr 2022 03:33:41 +0000 (11:33 +0800)]
Implement double buffering on MS Windows

* etc/NEWS: Announce changes.
* src/w32fns.c (w32_set_inhibit_double_buffering): New function.
(w32_wnd_proc):
(Fx_create_frame):
(w32_create_tip_frame): Set `inhibit-double-buffering' parameter.
(w32_frame_parm_handlers): Add new handler.

* src/w32term.c (w32_show_back_buffer):
(w32_release_paint_buffer): New functions.
(w32_frame_up_to_date): Show back buffer if applicable.
(w32_buffer_flipping_unblocked_hook): New hook.
(w32_scroll_run): Use BitBlt to scroll instead of window
scrolling functions.
(w32_scroll_bar_clear): Don't clear scroll bars when double
buffered.
(w32_read_socket): Flip buffers after reading input events in
some cases.
(w32_free_frame_resources): Free back buffer.
(w32_create_terminal): Add new hook.

* src/w32term.h (struct w32_output): New fields for handling
back buffers.
* src/w32xfns.c (select_palette): Fix indentation.
(get_frame_dc, release_frame_dc): Return back buffer when
appropriate and set dirty flag.

2 years agoPrevent cursors from being set on tooltip frames on Haiku
Po Lu [Sat, 30 Apr 2022 02:34:18 +0000 (02:34 +0000)]
Prevent cursors from being set on tooltip frames on Haiku

* src/haikuterm.c (haiku_show_hourglass, haiku_hide_hourglass)
(haiku_define_frame_cursor, haiku_toggle_invisible_pointer):
Ignore tooltip frames.  Otherwise, the cursor changes every time
a tooltip is mapped.

2 years agodebug-early: Print bytecode in a more manageable way
Stefan Monnier [Sat, 30 Apr 2022 02:18:09 +0000 (22:18 -0400)]
debug-early: Print bytecode in a more manageable way

* lisp/emacs-lisp/debug-early.el (debug-early-backtrace):
Escape newlines to and bytecodes to make backtraces slightly more
readable.  Use `cl-prin1` when available.

2 years ago* lisp/emacs-lisp/cl-preloaded.el (cl--typeof-types): Add `symbol-with-pos`
Stefan Monnier [Sat, 30 Apr 2022 02:13:20 +0000 (22:13 -0400)]
* lisp/emacs-lisp/cl-preloaded.el (cl--typeof-types): Add `symbol-with-pos`

2 years agoFix focus reversion of Motif menus on XI2
Po Lu [Sat, 30 Apr 2022 01:29:56 +0000 (09:29 +0800)]
Fix focus reversion of Motif menus on XI2

* src/xmenu.c (create_and_show_popup_menu): Stop setting input
focus on the menu window.

2 years agoFix mouse face bugs on Motif
Po Lu [Sat, 30 Apr 2022 01:22:20 +0000 (09:22 +0800)]
Fix mouse face bugs on Motif

* src/xterm.c (handle_one_xevent): Fix handling LeaveNotify
events from Motif menus.

2 years agoCheck display when handling XdndFinished events
Po Lu [Sat, 30 Apr 2022 00:47:42 +0000 (08:47 +0800)]
Check display when handling XdndFinished events

* src/xterm.c (handle_one_xevent): Check that the display is
actually the one we want before finishing DND.

2 years agoCL types: Accept both `byte-code-function` and `compiled-function`
Stefan Monnier [Fri, 29 Apr 2022 19:29:35 +0000 (15:29 -0400)]
CL types: Accept both `byte-code-function` and `compiled-function`

`type-of` returns `compiled-function` for bytecode functions, but the
predicate for those objects is called `byte-code-function-p`,
So accept both `compiled-function` and `byte-code-function` as type
names for those objects.

* lisp/emacs-lisp/cl-preloaded.el (cl--typeof-types):
Add `byte-code-function`.
* lisp/emacs-lisp/cl-macs.el (byte-code-function, compiled-function, subr):
New types.

2 years ago* test/lisp/replace-tests.el (query-replace-tests): Add more tests (bug#54733)
Juri Linkov [Fri, 29 Apr 2022 17:40:15 +0000 (20:40 +0300)]
* test/lisp/replace-tests.el (query-replace-tests): Add more tests (bug#54733)

(perform-replace-tests): New tests.
(perform-replace--run-tests): New function.
(perform-replace-tests): New test function.

2 years agoSimplify window-char-pixel-* code slightly
Lars Ingebrigtsen [Fri, 29 Apr 2022 13:52:21 +0000 (15:52 +0200)]
Simplify window-char-pixel-* code slightly

* lisp/window.el (window-char-pixel-width)
(window-char-pixel-height): Simplify code slightly.

2 years agoExplain effects of setting a zero-width fringe
Lars Ingebrigtsen [Fri, 29 Apr 2022 13:31:06 +0000 (15:31 +0200)]
Explain effects of setting a zero-width fringe

* lisp/fringe.el (fringe-mode): Not non-obvious effects of setting
a fringe to zero width.

2 years agoAdd new functions for computing character metrics for windows
Titus von der Malsburg [Fri, 29 Apr 2022 13:14:09 +0000 (15:14 +0200)]
Add new functions for computing character metrics for windows

* doc/lispref/display.texi (Size of Displayed Text): Document the
char functions.
* doc/lispref/windows.texi (Window Sizes): Document
window-max-characters-per-line.

* lisp/window.el (window-char-pixel-width)
(window-char-pixel-height)
(window-max-characters-per-line): New functions (bug#19395).

2 years agoMake timer_check even more resilient
Pip Cet [Fri, 29 Apr 2022 12:14:19 +0000 (14:14 +0200)]
Make timer_check even more resilient

* src/keyboard.c (timer_check): Inhibit atimers while making the
copy of the timer list (bug#21380).  This prevents an extremely
unlikely segfault.

2 years agoAvoid binding mouse-1 in xref when mouse-1 doesn't follow links
Lars Ingebrigtsen [Fri, 29 Apr 2022 11:57:57 +0000 (13:57 +0200)]
Avoid binding mouse-1 in xref when mouse-1 doesn't follow links

* lisp/progmodes/xref.el (xref--button-map): Avoid binding mouse-1
when `mouse-1-click-follows-link' is nil (bug#35353).

2 years agoFix colorspace calculations on Haiku
Po Lu [Fri, 29 Apr 2022 11:06:52 +0000 (11:06 +0000)]
Fix colorspace calculations on Haiku

* src/haiku_support.cc (be_get_display_planes)
(be_get_display_color_cells): Handle grayscale basic colorspaces
correctly.
(be_is_display_grayscale): New function.

* src/haiku_support.h: Update prototypes.

* src/haikufns.c (haiku_set_no_accept_focus, haiku_iconify_frame)
(Fxw_display_color_p, Fxw_color_values, Fx_display_grayscale_p):
Actually handle grayscale colorspaces.
(Fx_display_pixel_width, Fx_display_pixel_height)
(Fx_display_mm_height, Fx_display_mm_width): Clean up coding
style.
(Fx_display_visual_class): Handle grayscale colorspaces.
(syms_of_haikufns): New defsyms.

2 years agoAdd helper function to remove title bar when maximizing frames
Lars Ingebrigtsen [Fri, 29 Apr 2022 10:42:06 +0000 (12:42 +0200)]
Add helper function to remove title bar when maximizing frames

* lisp/frame.el (toggle-frame-maximized): Mention it.
(frame-hide-title-bar-when-maximized): New function (bug#31968).
Adapted from code by Jonathan Kyle Mitchell.

* src/window.c (syms_of_window): Mention it.

2 years ago; Fix typo in documentation of 'current-time-list'
Eli Zaretskii [Fri, 29 Apr 2022 07:12:02 +0000 (10:12 +0300)]
; Fix typo in documentation of 'current-time-list'

* src/timefns.c (syms_of_timefns) <current-time-list>:
* etc/NEWS:
* doc/lispref/os.texi (Time of Day): Fix a typo.

2 years agoHandle IO errors when creating Motif drag window
Po Lu [Fri, 29 Apr 2022 05:48:02 +0000 (13:48 +0800)]
Handle IO errors when creating Motif drag window

* src/xterm.c (xm_drag_window_io_error_handler): New function.
(xm_get_drag_window): Use that as the IO error handler when the
temporary display is open.

2 years agoFix file name selection conversion on Haiku
Po Lu [Fri, 29 Apr 2022 04:22:17 +0000 (04:22 +0000)]
Fix file name selection conversion on Haiku

* lisp/term/haiku-win.el (haiku-normal-selection-encoders):
Register new encoder.
(haiku-select-encode-file-name): New function.

2 years agoRemove some unneeded tests from the X double buffering code
Po Lu [Fri, 29 Apr 2022 03:52:22 +0000 (11:52 +0800)]
Remove some unneeded tests from the X double buffering code

* src/xterm.c (x_flip_and_flush): Fix coding style.
(flush_dirty_back_buffer_on): Avoid testing for impossible
situations.

2 years ago; * src/xterm.c (x_connection_closed): Clean up compiler warning.
Po Lu [Fri, 29 Apr 2022 01:35:58 +0000 (09:35 +0800)]
; * src/xterm.c (x_connection_closed): Clean up compiler warning.

2 years agoCancel DND correctly during display disconnect on a different display
Po Lu [Fri, 29 Apr 2022 01:27:51 +0000 (09:27 +0800)]
Cancel DND correctly during display disconnect on a different display

* src/xterm.c (x_dnd_io_error_handler): New function.
(x_connection_closed): Send the messages to cancel DND if a
different display was disconnected.

2 years ago* src/xterm.c (XTflash): Check return value of pselect.
Po Lu [Fri, 29 Apr 2022 00:43:27 +0000 (08:43 +0800)]
* src/xterm.c (XTflash): Check return value of pselect.

2 years agoFind libgccjit.dylib on Homebrew Macos
Eugene Ha [Thu, 28 Apr 2022 21:48:38 +0000 (23:48 +0200)]
Find libgccjit.dylib on Homebrew Macos

* configure.ac: Also find libggcjit on Homebrew (bug#55173).

Copyright-paperwork-exempt: yes

2 years agoPacify byte compiler etc. on org-compat, org-macs
Paul Eggert [Thu, 28 Apr 2022 20:40:13 +0000 (13:40 -0700)]
Pacify byte compiler etc. on org-compat, org-macs

Byte-compiler problem reported by Lars Ingebrigtsen in:
https://lists.gnu.org/r/emacs-devel/2022-04/msg01256.html
* lisp/org/org-compat.el (org-at-table.el-p):
Now declared in org-table, not org.
(org-string-collate-lessp): Define the ersatz
org-string-collate-lessp with the same API as the primary form, to
pacify check-declare-file when run on org-macs.
* lisp/org/org-macs.el (org-time-convert-to-integer): Declare.

2 years agoChange current-time back to list form
Paul Eggert [Thu, 28 Apr 2022 19:50:39 +0000 (12:50 -0700)]
Change current-time back to list form

Change current-time and related functions back to using the
traditional list form.  Also, add a new boolean variable
current-time-list that lets people try out (TICKS . HZ) form,
with the goal of smoothing the transition.
* src/timefns.c (CURRENT_TIME_LIST): Change default back to true.
(current-time-list): New boolean Lisp variable, which defaults to
CURRENT_TIME_LIST.  All uses of CURRENT_TIME_LIST changed to
use current_time_list, and all documentation changed.

2 years agoDocument \807 etc. in raw byte display
Paul Eggert [Thu, 28 Apr 2022 17:51:01 +0000 (10:51 -0700)]
Document \807 etc. in raw byte display

* doc/emacs/display.texi (Display Custom): Mention potential
confusion in raw byte display.

2 years agoKill off more Gnus buffers on Gnus exit
Lars Ingebrigtsen [Thu, 28 Apr 2022 16:36:59 +0000 (18:36 +0200)]
Kill off more Gnus buffers on Gnus exit

* lisp/gnus/gnus.el (gnus-kill-buffer): Make into function;
there's no reason this should be a macro.

* lisp/gnus/nntp.el (nntp-make-process-buffer): Ensure that we
kill these buffers on Gnus exit (bug#55167).

2 years agoAdd Sefirot to Omer counting
Sam Steingold [Thu, 28 Apr 2022 15:35:51 +0000 (11:35 -0400)]
Add Sefirot to Omer counting

* lisp/calendar/cal-hebrew.el (diary-hebrew-omer-sefirot): New variable.
(diary-hebrew-omer): Use it to show the sefirot.

2 years ago; * lisp/progmodes/xref.el (xref-query-replace-in-results): Fix last change.
Eli Zaretskii [Thu, 28 Apr 2022 15:41:53 +0000 (18:41 +0300)]
; * lisp/progmodes/xref.el (xref-query-replace-in-results): Fix last change.

2 years agoMerge from origin/emacs-28
Eli Zaretskii [Thu, 28 Apr 2022 15:37:34 +0000 (18:37 +0300)]
Merge from origin/emacs-28

# Conflicts:
# lisp/progmodes/xref.el

2 years ago; Merge from origin/emacs-28
Eli Zaretskii [Thu, 28 Apr 2022 15:36:15 +0000 (18:36 +0300)]
; Merge from origin/emacs-28

The following commit was skipped:

4d4f564 Fix customization-group of 'python-forward-sexp-function'

2 years agoAdd tests for image-supported-file-p
Stefan Kangas [Thu, 28 Apr 2022 15:01:20 +0000 (17:01 +0200)]
Add tests for image-supported-file-p

* test/lisp/image-tests.el (image-type-from-file-name): Suppress
obsoletion warnings for test.
(image-supported-file-p/built-in)
(image-supported-file-p/optional)
(image-supported-file-p/unsupported-returns-nil): New tests.

2 years ago* lisp/finder.el (finder-mode-map): Use defvar-keymap.
Stefan Kangas [Thu, 24 Mar 2022 08:55:10 +0000 (09:55 +0100)]
* lisp/finder.el (finder-mode-map): Use defvar-keymap.

2 years agoImprove documentation of font- and face-related attribute functions
Eli Zaretskii [Thu, 28 Apr 2022 14:53:36 +0000 (17:53 +0300)]
Improve documentation of font- and face-related attribute functions

* lisp/faces.el (face-attribute):
* src/xfaces.c (Fx_family_fonts):
* src/font.c (Ffont_get, Ffont_put): Improve and clarify the doc
strings.

* doc/lispref/display.texi (Low-Level Font): Document the :type
attribute of a font.  Improve documentation of 'font-get' and
'font-put'.
(Attribute Functions): Add cross-reference to the description of
face attributes.

2 years ago* lisp/emacs-lisp/nadvice.el: Fix bug#55149
Stefan Monnier [Thu, 28 Apr 2022 13:38:58 +0000 (09:38 -0400)]
* lisp/emacs-lisp/nadvice.el: Fix bug#55149

2 years agoAllow inserting and selecting binary blobs from sqlite
Lars Ingebrigtsen [Thu, 28 Apr 2022 12:58:20 +0000 (14:58 +0200)]
Allow inserting and selecting binary blobs from sqlite

* doc/lispref/text.texi (Database): Document how to insert binary
data.
* src/sqlite.c (bind_values): Bind BLOB columns correctly (bug#54591).

2 years agoSimplify buffer flipping code on Haiku
Po Lu [Thu, 28 Apr 2022 12:50:47 +0000 (12:50 +0000)]
Simplify buffer flipping code on Haiku

* src/haikuterm.c (flush_dirty_back_buffers): Delete function.
(haiku_flush_dirty_back_buffer_on): New function.
(haiku_read_socket): Use that instead of looping over each frame
at the end.

2 years agoDocument dired-keep-marker-copy more
Lars Ingebrigtsen [Thu, 28 Apr 2022 11:50:25 +0000 (13:50 +0200)]
Document dired-keep-marker-copy more

* doc/emacs/dired.texi (Operating on Files): Mention
dired-keep-marker-copy.

2 years agoImprove dired-do-copy doc string
Lars Ingebrigtsen [Thu, 28 Apr 2022 11:48:17 +0000 (13:48 +0200)]
Improve dired-do-copy doc string

* lisp/dired-aux.el (dired-do-copy): Mention the
`dired-keep-marker-copy' variable in the doc string (bug#21746).

2 years agoDocument the non-effect of narrowing on get-text-property
Lars Ingebrigtsen [Thu, 28 Apr 2022 11:04:28 +0000 (13:04 +0200)]
Document the non-effect of narrowing on get-text-property

* doc/lispref/text.texi (Examining Properties): Document
surprising non-effect of narrowing (bug#16413).

* src/textprop.c (Ftext_properties_at, Fget_text_property):
Mention narrowing.

2 years agoAdd comment to linum-mode about being old
Lars Ingebrigtsen [Thu, 28 Apr 2022 10:38:01 +0000 (12:38 +0200)]
Add comment to linum-mode about being old

* lisp/linum.el (linum-mode): Link to display-line-numbers-mode
(bug#34639).

2 years agoFix `g' in *grep* after `A' in Dired
Lars Ingebrigtsen [Thu, 28 Apr 2022 10:27:39 +0000 (12:27 +0200)]
Fix `g' in *grep* after `A' in Dired

* lisp/dired-aux.el (dired-do-find-regexp): Allow `g' to work in
the resulting grep buffer by not being destructive (bug#55157).

2 years agoFix another help-fns--insert-menu-bindings parsing problem
Lars Ingebrigtsen [Thu, 28 Apr 2022 10:16:35 +0000 (12:16 +0200)]
Fix another help-fns--insert-menu-bindings parsing problem

* lisp/help-fns.el (help-fns--insert-menu-bindings): Fix keymap
traversal when elements are symbols.

2 years ago* src/xterm.c (x_term_init): Fix the non-GTK3 XI2 build.
Po Lu [Thu, 28 Apr 2022 09:00:53 +0000 (17:00 +0800)]
* src/xterm.c (x_term_init): Fix the non-GTK3 XI2 build.

2 years agoRevert previous change in test/Makefile.in
Michael Albinus [Thu, 28 Apr 2022 08:16:50 +0000 (10:16 +0200)]
Revert previous change in test/Makefile.in

* test/Makefile.in (test_template): Revert previous change, it isn't needed.

2 years agoFix handling of proportional fonts on MS-Windows
Eli Zaretskii [Thu, 28 Apr 2022 07:50:50 +0000 (10:50 +0300)]
Fix handling of proportional fonts on MS-Windows

* src/xfaces.c (Fx_family_fonts): Consider fonts whose :spacing
value is numeric, but still indicates that they are proportional,
to be proportional.

* lisp/textmodes/artist.el (artist-mode): Fix test for monospaced
fonts.

2 years agoFix GTK build
Po Lu [Thu, 28 Apr 2022 05:07:33 +0000 (13:07 +0800)]
Fix GTK build

* src/xrdb.c (x_load_resources): Fix definitions of `helv'.

2 years agoStop overriding default Motif colors with our own
Po Lu [Thu, 28 Apr 2022 02:50:18 +0000 (10:50 +0800)]
Stop overriding default Motif colors with our own

* src/xrdb.c (x_load_resources): Instead of specifying the Motif
defaults manually, let Motif set them itself.  This makes
palettes provided by color servers work again.

2 years agoHandle display disconnects during DND
Po Lu [Thu, 28 Apr 2022 01:31:29 +0000 (09:31 +0800)]
Handle display disconnects during DND

* src/xterm.c (handle_one_xevent): Keep track of the display the
drop target is on during DND finish.
(x_connection_closed, x_delete_terminal): Handle display
disconnects during DND correctly.

2 years agoFix target display checks during Motif DND
Po Lu [Thu, 28 Apr 2022 00:46:21 +0000 (08:46 +0800)]
Fix target display checks during Motif DND

* src/xterm.c (handle_one_xevent): Check that the Motif DND
completion message is actually from the right display before
proceeding.

2 years agosrc/xdisp.c: Use same test in `redisplay_window` and `prepare_menu_bars`
Stefan Monnier [Wed, 27 Apr 2022 22:14:56 +0000 (18:14 -0400)]
src/xdisp.c: Use same test in `redisplay_window` and `prepare_menu_bars`

This consolidates the test made in those two functions so as to make
sure they agree whether a window needs to be redisplayed.
At the same time, change this test so it uses the window's point
rather than the buffer's point when comparing to `w->last_point`.

* src/xdisp.c (needs_no_redisplay): New function, extracted from
`redisplay_window`.
(redisplay_window, prepare_menu_bars): Use it.

* src/window.c (window_point): New function, extracted from `Fwindow_point`.
(Fwindow_point): Use it.
* src/window.h (window_point): Declare it.

2 years agoNew user option 'calc-kill-line-numbering'
Sean Whitton [Tue, 26 Apr 2022 18:39:38 +0000 (11:39 -0700)]
New user option 'calc-kill-line-numbering'

* lisp/calc/calc.el (calc-kill-line-numbering): New defcustom.
* lisp/calc/calc-yank.el (calc-kill): Unless calc-kill-line-numbering
is non-nil, do not include line numbering in copied text (bug#55133).
* etc/NEWS:
* doc/misc/calc.texi (Killing from the Stack): Document the change.

2 years agoCC Mode: "linux" style: set indent-tabs-mode to t
Alan Mackenzie [Wed, 27 Apr 2022 19:11:47 +0000 (19:11 +0000)]
CC Mode: "linux" style: set indent-tabs-mode to t

* lisp/progmodes/cc-styles.el (c-style-alist): Add the setting of
indent-tabs-mode to "linux" style.

2 years ago; Fix recently added documentation
Eli Zaretskii [Wed, 27 Apr 2022 18:16:46 +0000 (21:16 +0300)]
; Fix recently added documentation

* etc/NEWS: Improve wording of entry about 'mouse-yank-at-point'.
* doc/emacs/killing.texi (Secondary Selection): Fix a typo.

2 years agoImprove tramp-test46-read-password
Michael Albinus [Wed, 27 Apr 2022 18:15:07 +0000 (20:15 +0200)]
Improve tramp-test46-read-password

* test/lisp/net/tramp-tests.el (tramp-test46-read-password): Add a
further check.

2 years agoEmulate 'clock' for MS-Windows
Eli Zaretskii [Wed, 27 Apr 2022 18:06:55 +0000 (21:06 +0300)]
Emulate 'clock' for MS-Windows

* src/w32.c (sys_clock): New function.  (Bug#44674)
* nt/inc/ms-w32.h (clock): Redirect to sys_clock.

2 years agoMake `C-M-x' use the original value of print-length while evalling
Lars Ingebrigtsen [Wed, 27 Apr 2022 18:03:25 +0000 (20:03 +0200)]
Make `C-M-x' use the original value of print-length while evalling

* lisp/progmodes/elisp-mode.el (elisp--eval-defun): Eval the form
with the original values of print-level and print-length
(bug#135).

2 years agoImplement system_process_attributes on Cygwin
Ken Brown [Wed, 27 Apr 2022 14:46:57 +0000 (10:46 -0400)]
Implement system_process_attributes on Cygwin

* src/sysdep.c (system_process_attributes) [CYGWIN]: Implement,
using the /proc filesystem.  The code is identical to the
GNU/Linux code except for the 'ttname' attribute.  (Bug#55153)

* etc/NEWS: Mention the change.

2 years agoAdd new function current-cpu-time
Stefan Monnier [Wed, 27 Apr 2022 17:20:41 +0000 (19:20 +0200)]
Add new function current-cpu-time

* doc/lispref/os.texi (Time of Day): Document it.
* src/timefns.c (Fcurrent_cpu_time): New function (bug#44674).

2 years agoRegenerated ldefs-boot.el
Lars Ingebrigtsen [Wed, 27 Apr 2022 17:14:18 +0000 (19:14 +0200)]
Regenerated ldefs-boot.el

2 years agoChange parameter order for string-edit functions
Lars Ingebrigtsen [Wed, 27 Apr 2022 17:11:20 +0000 (19:11 +0200)]
Change parameter order for string-edit functions

* lisp/textmodes/string-edit.el (string-edit)
(read-string-from-buffer): Rework the function arguments so that
they're more similar to `read-string'.  Rename symbols throughout
the file from help-text to prompt.

2 years agoAdd autoload cookies to string-edit
Lars Ingebrigtsen [Wed, 27 Apr 2022 17:03:49 +0000 (19:03 +0200)]
Add autoload cookies to string-edit

* lisp/textmodes/string-edit.el (string-edit)
(read-string-from-buffer): Autoload.

2 years agoFix some typos in the recent holidays change
Lars Ingebrigtsen [Wed, 27 Apr 2022 16:48:16 +0000 (18:48 +0200)]
Fix some typos in the recent holidays change

* lisp/calendar/holidays.el (holiday-available-holiday-lists): Fix
typos.

2 years ago; Fix previous change in test/Makefile.in
Michael Albinus [Wed, 27 Apr 2022 14:32:24 +0000 (16:32 +0200)]
; Fix previous change in test/Makefile.in

2 years agoGive better error message in dired-toggle-read-only on nonexisting dirs
Lars Ingebrigtsen [Wed, 27 Apr 2022 14:09:38 +0000 (16:09 +0200)]
Give better error message in dired-toggle-read-only on nonexisting dirs

* lisp/dired.el (dired-toggle-read-only): Refuse to edit
non-existent directories (bug#23276).

2 years agoRename holiday-lists to holiday-available-holyday-lists
Lars Ingebrigtsen [Wed, 27 Apr 2022 13:30:25 +0000 (15:30 +0200)]
Rename holiday-lists to holiday-available-holyday-lists

* lisp/calendar/holidays.el (holiday-available-holyday-lists):
Give holiday-lists a better name.

2 years agoSeparate out the holiday lists into its own function
Lars Ingebrigtsen [Wed, 27 Apr 2022 12:57:57 +0000 (14:57 +0200)]
Separate out the holiday lists into its own function

* lisp/calendar/holidays.el (holiday-lists): Separated out into
its own function so that it can be altered (bug#55140).
(list-holidays): Use it.

2 years agoMake test/Makefile more robust
Michael Albinus [Wed, 27 Apr 2022 12:13:24 +0000 (14:13 +0200)]
Make test/Makefile more robust

* test/Makefile.in (test_template): Do not fails if corresponding
source file doesn't exist.

2 years agoAdd an instruction header line to string-edit
Lars Ingebrigtsen [Wed, 27 Apr 2022 12:08:49 +0000 (14:08 +0200)]
Add an instruction header line to string-edit

* lisp/textmodes/string-edit.el (string-edit): Add a header line
with instructions.

2 years agoMake isearch respond to 'mouse-yank-at-point'
Lars Ingebrigtsen [Wed, 27 Apr 2022 12:02:23 +0000 (14:02 +0200)]
Make isearch respond to 'mouse-yank-at-point'

* doc/emacs/killing.texi (Secondary Selection): Document it.
* lisp/isearch.el (isearch-mouse-2): Make isearch respond to
mouse-yank-at-point (bug#7787).

* lisp/mouse.el (mouse-yank-at-point): Mention it.

2 years ago; * doc/lispref/syntax.texi (Position Parse): Fix a typo. (Bug#55143)
Arash Esbati [Wed, 27 Apr 2022 10:32:38 +0000 (12:32 +0200)]
; * doc/lispref/syntax.texi (Position Parse): Fix a typo.  (Bug#55143)

2 years agoCleanups to PGTK code
Po Lu [Wed, 27 Apr 2022 11:19:01 +0000 (19:19 +0800)]
Cleanups to PGTK code

* src/pgtkfns.c (pgtk_explicitly_set_name, pgtk_set_tab_bar_lines)
(pgtk_change_tab_bar_height, pgtk_set_child_frame_border_width)
(pgtk_set_internal_border_width, pgtk_set_cursor_type)
(pgtk_set_mouse_color, pgtk_set_override_redirect, xg_set_icon)
(pgtk_frame_parm_handlers, Fpgtk_set_monitor_scale_factor)
(pgtk_set_scroll_bar_default_width, pgtk_get_focus_frame)
(pgtk_hide_tip, Fx_show_tip, Fx_hide_tip, frame_geometry)
(syms_of_pgtkfns): Clean up coding style and delete incorrect
comments that mostly duplicate what is in xfns.c, and fix
comment coding style.  Also rename functions from `x_' to
`pgtk_'.

* src/pgtkterm.c (pgtk_setup_relief_colors): Fix relief caching
with new flag.
(pgtk_draw_relief_rect, flip_cr_context, pgtk_wait_for_map_event)
(pgtk_make_frame_visible, pgtk_make_frame_invisible)
(pgtk_set_parent_frame, pgtk_draw_glyph_string_foreground)
(pgtk_draw_composite_glyph_string_foreground)
(pgtk_draw_glyphless_glyph_string_foreground)
(pgtk_set_clip_rectangles, pgtk_draw_glyph_string_bg_rect)
(pgtk_draw_image_foreground, pgtk_draw_image_glyph_string)
(pgtk_draw_stretch_glyph_string, pgtk_draw_glyph_string)
(pgtk_copy_bits, pgtk_bitmap_icon, pgtk_define_fringe_bitmap)
(pgtk_show_hourglass, pgtk_flash, pgtk_send_scroll_bar_event)
(pgtk_free_pixmap, set_opacity_recursively, frame_highlight)
(frame_unhighlight, pgtk_toggle_invisible_pointer)
(pgtk_create_terminal, pgtk_window_is_of_frame_recursive)
(pgtk_window_is_of_frame, pgtk_any_window_to_frame)
(pgtk_handle_draw, size_allocate, pgtk_enqueue_string)
(key_press_event, motion_notify_event): Fix coding style and
some minor bugs.

* src/pgtkterm.h (struct pgtk_output): New field for tracking
relief color status, update prototypes.