]> git.eshelyaron.com Git - emacs.git/log
emacs.git
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.

2 years agoRemove some unnecessary code
Po Lu [Wed, 27 Apr 2022 08:07:39 +0000 (08:07 +0000)]
Remove some unnecessary code

* src/haiku_support.cc (class EmacsView, AfterResize)
(SetUpDoubleBuffering): Remove `cspace' field since it's always
RGBA32.

2 years ago* lisp/help-fns.el (help-fns--insert-menu-bindings): Don't highlight heading.
Juri Linkov [Wed, 27 Apr 2022 07:36:41 +0000 (10:36 +0300)]
* lisp/help-fns.el (help-fns--insert-menu-bindings): Don't highlight heading.

2 years agoUse org-time-convert-to-integer instead of by hand
Paul Eggert [Wed, 27 Apr 2022 07:29:26 +0000 (00:29 -0700)]
Use org-time-convert-to-integer instead of by hand

* lisp/org/org-macs.el (org-file-newer-than-p):
Don’t assume list-format timestamps, by using
org-time-convert-to-integer instead of doing it by hand.

2 years agoFix quitting application from the Deskbar on Haiku
Po Lu [Wed, 27 Apr 2022 06:13:18 +0000 (06:13 +0000)]
Fix quitting application from the Deskbar on Haiku

* lisp/term/haiku-win.el (handle-save-session): Kill Emacs
afterwards.

2 years agoAdd simple session management support to Haiku
Po Lu [Wed, 27 Apr 2022 05:18:50 +0000 (05:18 +0000)]
Add simple session management support to Haiku

* lisp/term/common-win.el (emacs-save-session-functions): Move
from x-win.el to common-win.el.
* lisp/term/haiku-win.el (haiku-save-session-reply)
(emacs-session-save, handle-save-session): New functions.
* lisp/term/x-win.el (emacs-save-session-functions): Delete.

* src/haiku_font_support.cc (font_style_to_flags):
* src/haiku_support.h (enum haiku_font_weight): Turn weight
macros into enum.
(struct haiku_font_pattern): Likewise.
(struct haiku_session_manager_reply): New struct.
* src/haiku_io.c (haiku_io_init): Create sm port.
* src/haiku_support.cc (QuitRequested): Wait for reply from sm
port.
* src/haikufns.c (Fhaiku_save_session_reply): New function.
(syms_of_haikufns): Define new subr.
* src/haikuterm.c (haiku_read_socket): Send session management
events.
(haiku_term_init): Check new port.

2 years ago; Instrument tramp-test46-read-password
Michael Albinus [Wed, 27 Apr 2022 05:07:21 +0000 (07:07 +0200)]
; Instrument tramp-test46-read-password

2 years agoAvoid change to desktop file format
Paul Eggert [Wed, 27 Apr 2022 04:03:21 +0000 (21:03 -0700)]
Avoid change to desktop file format

* lisp/desktop.el (desktop--get-file-modtime): New function.
(desktop-save, desktop-read): Use it.

2 years agoBe more compatible with older desktops
Paul Eggert [Wed, 27 Apr 2022 01:10:51 +0000 (18:10 -0700)]
Be more compatible with older desktops

* lisp/desktop.el (desktop-save): When comparing timestamps use
time-equal-p instead of ‘equal’.

2 years agoClean up pointer blanking code
Po Lu [Wed, 27 Apr 2022 01:10:18 +0000 (09:10 +0800)]
Clean up pointer blanking code

* src/xterm.c (XTtoggle_invisible_pointer): Dispatch to correct
function directly.
(x_probe_xfixes_extension): Return directly based on dpyinfo.
(xfixes_toggle_visible_pointer): Make conditional on
`HAVE_XFIXES'.
(make_invisible_cursor): Initialize `c' correctly.
(x_toggle_visible_pointer): Handle cursor allocation failures.
(x_free_frame_resources): Dispatch with
XTtoggle_visible_pointer.
(x_setup_pointer_blanking): Delete function.
(x_term_init): Initialize blank cursor here instead.
* src/xterm.h (struct x_display_info): New field
`fixes_pointer_blanking'.

2 years agonadvice.el: Auto-generate the doc describing the "how" arg
Stefan Monnier [Tue, 26 Apr 2022 21:09:03 +0000 (17:09 -0400)]
nadvice.el: Auto-generate the doc describing the "how" arg

* lisp/emacs-lisp/nadvice.el (advice--make-how-alist): New macro.
(advice--how-alist): Use it.
(nadvice--make-docstring): New function.
(add-function, advice-add): Use it to auto-generate the table
describing the accepted values for `how`.

2 years agonadvice.el: Use OClosures
Stefan Monnier [Tue, 26 Apr 2022 20:39:41 +0000 (16:39 -0400)]
nadvice.el: Use OClosures

* lisp/emacs-lisp/nadvice.el (advice): New OClosure type.
(advice--how-alist): Make it hold prototype OClosures rather
than bytecode strings.
(advice--bytecodes): Delete var.
(advice--where): Make it an obsolete alias of new `advice--how`.
(oclosure-interactive-form, cl-print-object) <advice>: New methods.
(advice--make-1): Delete function.
(advice--make): Use `advice-copy` and `advice-cons`.
(advice--tweak): Use `advice-cons`.
(add-function, advice-add): Rename `where` arg to `how`.

* lisp/emacs-lisp/cl-print.el (cl-print-object) <:extra "nadvice">:
Remove now-redundant ad-hoc method.

* test/lisp/emacs-lisp/nadvice-tests.el (advice-test-print): New test.

2 years agonadvice.el: Rename "where" to "how"
Stefan Monnier [Tue, 26 Apr 2022 20:28:54 +0000 (16:28 -0400)]
nadvice.el: Rename "where" to "how"

* lisp/emacs-lisp/nadvice.el (advice--how-alist): Rename from
`advice--where-alist`.
(advice--how): Rename from `advice--where` and keep obsolete alias.
(add-function, advice-add): Rename `where` arg to `how`.
* lisp/emacs-lisp/cl-print.el (cl-print-object): Use `advice--how` name.

2 years agoUse `advice--cd*r` where applicable
Stefan Monnier [Tue, 26 Apr 2022 21:31:13 +0000 (17:31 -0400)]
Use `advice--cd*r` where applicable

* lisp/emacs-lisp/bytecomp.el (byte-compile--function-signature):
* lisp/emacs-lisp/advice.el (ad-get-orig-definition):
* lisp/help.el (help-function-arglist): Use `advice--cd*r`.

2 years agoPretty print OClosure slot accessors
Stefan Monnier [Tue, 26 Apr 2022 21:30:29 +0000 (17:30 -0400)]
Pretty print OClosure slot accessors

* lisp/emacs-lisp/oclosure.el (oclosure--accessor-cl-print): New function.
* lisp/emacs-lisp/cl-print.el (cl-print-object) <accessor>: New method.
* test/lisp/emacs-lisp/nadvice-tests.el (advice-test-call-interactively):
Avoid `defun` within a function.

2 years agoFix gnus-html-image-cache-ttl FIXME
Paul Eggert [Tue, 26 Apr 2022 00:57:50 +0000 (17:57 -0700)]
Fix gnus-html-image-cache-ttl FIXME

* lisp/gnus/gnus-html.el (gnus-html-image-cache-ttl):
Make it a seconds count.

2 years agoFix error in rcirc for IRC tags without values
Alex Schroeder [Sun, 24 Apr 2022 11:33:09 +0000 (13:33 +0200)]
Fix error in rcirc for IRC tags without values

* src/lisp/net/rcirc.el (rcirc-process-server-response-1): If the
optional value for a tag is not present, do not call
replace-regexp-in-string on it. If (match-string 2 tag) is
nil, the STRING argument for the replace-regexp-in-string is nil,
which results in an error.

2 years agoNew generic function `oclosure-interactive-form`
Stefan Monnier [Tue, 26 Apr 2022 14:36:52 +0000 (10:36 -0400)]
New generic function `oclosure-interactive-form`

It's used by `interactive-form` when it encounters an OClosure.
This lets one compute the `interactive-form` of OClosures
dynamically by adding appropriate methods.
This does not include support for `command-modes` for Oclosures.

* lisp/simple.el (oclosure-interactive-form): New generic function.

* src/data.c (Finteractive_form): Delegate to
`oclosure-interactive-form` if the arg is an OClosure.
(syms_of_data): New symbol `Qoclosure_interactive_form`.
* src/eval.c (Fcommandp): Delegate to `interactive-form` if the arg is
an OClosure.

* src/lisp.h (VALID_DOCSTRING_P): New function, extracted from
`store_function_docstring`.
* src/doc.c (store_function_docstring): Use it.

* lisp/kmacro.el (kmacro): Don't carry any interactive form.
(oclosure-interactive-form) <kmacro>: New method, instead.

* test/lisp/emacs-lisp/oclosure-tests.el (oclosure-interactive-form)
<oclosure-test>: New method.
(oclosure-test-interactive-form): New test.

* doc/lispref/commands.texi (Using Interactive):
Document `oclosure-interactive-form`.

2 years agoMention caveats in the map-delete doc string
Lars Ingebrigtsen [Tue, 26 Apr 2022 13:32:45 +0000 (15:32 +0200)]
Mention caveats in the map-delete doc string

* lisp/emacs-lisp/map.el (map-delete): Mention how this has to be
used for lists (bug#25929).

2 years agoFix EWMH window activation
Po Lu [Tue, 26 Apr 2022 12:43:15 +0000 (20:43 +0800)]
Fix EWMH window activation

* src/xterm.c (x_ewmh_activate_frame): Add missing fields of
message.  (bug#55122)

2 years agoTweak interactive use of delete-windows-on
Lars Ingebrigtsen [Tue, 26 Apr 2022 12:32:07 +0000 (14:32 +0200)]
Tweak interactive use of delete-windows-on

* lisp/window.el (delete-windows-on): Make prompting better, and
allow specifying only the current frame interactively (bug#34749).

2 years agoMake `C RET' work in archive-mode
Lars Ingebrigtsen [Tue, 26 Apr 2022 11:27:17 +0000 (13:27 +0200)]
Make `C RET' work in archive-mode

* lisp/arc-mode.el (archive-copy-file): Fix the default value
(when the user hits RET) (bug#55123).

2 years agoMake new menu *Help* output be more resilient
Lars Ingebrigtsen [Tue, 26 Apr 2022 11:23:51 +0000 (13:23 +0200)]
Make new menu *Help* output be more resilient

* lisp/help-fns.el (help-fns--insert-menu-bindings): Only insert
the heading if it turns out that we actually find the menu.
(help-fns--insert-bindings): Tweak calling convention.

2 years agoAdd new user option flymake-mode-line-lighter
Lars Ingebrigtsen [Tue, 26 Apr 2022 10:39:13 +0000 (12:39 +0200)]
Add new user option flymake-mode-line-lighter

* doc/misc/flymake.texi (Customizable variables): Document it.

* lisp/progmodes/flymake.el (flymake-mode-line-lighter): New user
option (bug#55115).
(flymake--mode-line-title): Use it.

2 years agoImprove documentation for t value for reusable-frames
Lars Ingebrigtsen [Tue, 26 Apr 2022 10:11:49 +0000 (12:11 +0200)]
Improve documentation for t value for reusable-frames

* doc/lispref/windows.texi (Buffer Display Action Alists): Note
that the t value is rarely a good one (bug#55103).

2 years agoFix event mask of activation client message
Po Lu [Tue, 26 Apr 2022 04:38:52 +0000 (12:38 +0800)]
Fix event mask of activation client message

* src/xterm.c (x_alloc_lighter_color):
(x_get_scale_factor): Minor formatting fixes.
(x_ewmh_activate_frame): Fix event mask used to send message to
the root window.

2 years ago* src/xterm.c (x_scroll_run): Only flush GC if really necessary.
Po Lu [Tue, 26 Apr 2022 03:57:47 +0000 (11:57 +0800)]
* src/xterm.c (x_scroll_run): Only flush GC if really necessary.

2 years agoFix Ruby indentation with double splat as first block param
Dmitry Gutov [Tue, 26 Apr 2022 02:36:35 +0000 (05:36 +0300)]
Fix Ruby indentation with double splat as first block param

* lisp/progmodes/ruby-mode.el (ruby-smie--forward-token)
(ruby-smie--backward-token): Tokenize "**" separately from "|".
Problem reported at https://github.com/dgutov/robe/issues/136.

2 years agoCache relief colors on Haiku since their computation is expensive
Po Lu [Tue, 26 Apr 2022 01:19:56 +0000 (01:19 +0000)]
Cache relief colors on Haiku since their computation is expensive

* src/haikufns.c (haiku_create_frame, haiku_create_tip_frame):
Clear `relief_background'.
* src/haikuterm.c (haiku_calculate_relief_colors): Cache relief
colors for each frame.
* src/haikuterm.h (struct haiku_output): New fields for caching
the last relief color.

2 years agoPacify misc/test-custom-opts
Paul Eggert [Tue, 26 Apr 2022 00:49:23 +0000 (17:49 -0700)]
Pacify misc/test-custom-opts

* lisp/gnus/gnus-html.el (gnus-html-image-cache-ttl):
Also allow it to be a cons of integers.

2 years agocl-generic.el: Upcase formal args in `C-h o`
Stefan Monnier [Mon, 25 Apr 2022 19:41:04 +0000 (15:41 -0400)]
cl-generic.el: Upcase formal args in `C-h o`

Try and improve the display of methods in `C-h o` by moving
the qualifiers to a separate line and upcasing the formal args.
It still needs love, tho.

* lisp/emacs-lisp/cl-generic.el: Upcase formal args in `C-h o`
(cl--generic-upcase-formal-args): New function.
(cl--generic-describe): Use it.

2 years agoUse (TICKS . HZ) for current-time etc.
Paul Eggert [Mon, 25 Apr 2022 18:56:48 +0000 (11:56 -0700)]
Use (TICKS . HZ) for current-time etc.

* src/timefns.c (CURRENT_TIME_LIST): Change default to false.
All documentation changed.

2 years agoSupport (encode-time (list s m h D M Y))
Paul Eggert [Mon, 25 Apr 2022 18:56:48 +0000 (11:56 -0700)]
Support (encode-time (list s m h D M Y))

* src/timefns.c (Fencode_time): Add support for a 6-elt list arg.
Requested by Max Nikulin for Org (bug#54764).
* test/src/timefns-tests.el (encode-time-alternate-apis): New test.

2 years agoChange the display of menu bindings in *Help*
Lars Ingebrigtsen [Mon, 25 Apr 2022 19:14:24 +0000 (21:14 +0200)]
Change the display of menu bindings in *Help*

* lisp/help-fns.el (help-fns--insert-menu-bindings): New function
to describe menu entries more fully (bug#52870).
(help-fns--key-bindings): Use it.

2 years agoFix type of word-wrap-whitespace-characters
Glenn Morris [Mon, 25 Apr 2022 18:44:03 +0000 (11:44 -0700)]
Fix type of word-wrap-whitespace-characters

* lisp/textmodes/word-wrap-mode.el (word-wrap-whitespace-characters):
Fix type.
; Ref https://hydra.nixos.org/build/174560242

2 years agoFix nsmenu compilation under macOS 10.6
Alan Third [Tue, 19 Apr 2022 04:05:17 +0000 (05:05 +0100)]
Fix nsmenu compilation under macOS 10.6

* src/nsmenu.m ([EmacsMenu fillWithWidgetValue:]): Replace modern
shorthand dictionary and array definitions.
* src/nsterm.h (NSTextAlignmentRight): Redefine if necessary.
* src/macfont.m (mac_font_create_preferred_family_for_attributes):
isOperatingSystemAtLeastVersion is new in macOS 10.10, so it's
probably wrong to use it to check whether we're below 10.9.
(mac_font_copy_default_descriptors_for_language):
(mac_font_copy_default_name_for_charset_and_languages): It seems these
functions are only used on macOS 10.8 and below.
* src/nsterm.m ([NSColor colorUsingDefaultColorSpace]): Use the
generic colorspace.
(ns_parent_window_rect):
(ns_frame_scale_factor):
([EmacsWindow setParentChildRelationships]): Fix macOS version stuff.

Co-authored-by: Po Lu <luangruo@yahoo.com>
2 years agoUpdate bookmark sort indicator at proper time
Karl Fogel [Mon, 25 Apr 2022 17:30:02 +0000 (12:30 -0500)]
Update bookmark sort indicator at proper time

This follows up to my commit 8b071c77b0d7 of 2022-04-24.  Thanks to
Manuel Giraud <manuel@ledu-giraud.fr> for reporting the buglet.

2 years agoMake default Haiku tool bar color match system preferences
Po Lu [Mon, 25 Apr 2022 12:26:44 +0000 (12:26 +0000)]
Make default Haiku tool bar color match system preferences

* lisp/faces.el (tool-bar): Use system bar color as the default
tool-bar background color on Haiku.

2 years agoMove the Incremental Search menu one menu up
Lars Ingebrigtsen [Mon, 25 Apr 2022 12:09:46 +0000 (14:09 +0200)]
Move the Incremental Search menu one menu up

* lisp/menu-bar.el (menu-bar-search-menu): Move the Incremental
Search from the Search menu...
(menu-bar-edit-menu): ... one step up (bug#43308).

2 years agoProtect against the host name containing an alpha character
Lars Ingebrigtsen [Mon, 25 Apr 2022 08:46:28 +0000 (10:46 +0200)]
Protect against the host name containing an alpha character

* src/filelock.c (lock_file_1, current_lock_owner): Protect
against the unlikely case that the host name contains an alpha
character (bug#14250).

2 years agoAdd test for Tramp password handling
Michael Albinus [Mon, 25 Apr 2022 10:57:01 +0000 (12:57 +0200)]
Add test for Tramp password handling

* lisp/net/tramp.el (tramp-error-show-message-timeout): New defvar.
(tramp-error-with-buffer, tramp-user-error): Use it.

* test/lisp/net/tramp-tests.el (tramp-error-show-message-timeout):
Set it to nil.
(tramp-test46-read-password): New test.
(tramp-test47-auto-load, tramp-test47-delay-load)
(tramp-test47-recursive-load, tramp-test47-remote-load-path)
(tramp-test48-unload):
* test/lisp/net/tramp-archive-tests.el (tramp-archive-test47-auto-load)
(tramp-archive-test47-delay-load): Rename.

2 years ago; Fix typos in tec/NEWS
Michael Albinus [Mon, 25 Apr 2022 08:37:04 +0000 (10:37 +0200)]
; Fix typos in tec/NEWS

2 years agoMake flymake-show-buffer-diagnostics error out in non-Flymake buffers
Lars Ingebrigtsen [Mon, 25 Apr 2022 08:05:44 +0000 (10:05 +0200)]
Make flymake-show-buffer-diagnostics error out in non-Flymake buffers

* lisp/progmodes/flymake.el (flymake-show-buffer-diagnostics):
Signal an error if run outside of a buffer with Flymake enabled
(bug#55097).

2 years agoFix up some string-edit.el strings
Lars Ingebrigtsen [Mon, 25 Apr 2022 07:47:54 +0000 (09:47 +0200)]
Fix up some string-edit.el strings

* lisp/textmodes/string-edit.el (string-edit)
(read-string-from-buffer): Make doc strings use dynamic key
bindings.
(string-edit): Fix message at the end.

2 years agoDelete some unused functions on Haiku
Po Lu [Mon, 25 Apr 2022 05:51:42 +0000 (05:51 +0000)]
Delete some unused functions on Haiku

* src/haiku_support.cc (haiku_current_workspace)
(BWindow_workspaces):
* src/haiku_support.h: Remove unused functions and prototypes.

2 years agoGet rid of autorelease warnings during building on GNUstep
Po Lu [Mon, 25 Apr 2022 05:42:44 +0000 (13:42 +0800)]
Get rid of autorelease warnings during building on GNUstep

* src/emacs.c (decode_env_path):
* src/nsfns.m (ns_appkit_version_str):
* src/nsterm.m (ns_term_shutdown): Setup autorelease when
objects might be autoreleased during building.

2 years ago* src/nsfns.m (Fns_list_colors): Fix autoreleasing.
Po Lu [Mon, 25 Apr 2022 04:13:22 +0000 (12:13 +0800)]
* src/nsfns.m (Fns_list_colors): Fix autoreleasing.

2 years agoUpdate to Org 9.5.3-3-gd54104
Kyle Meyer [Mon, 25 Apr 2022 01:07:40 +0000 (21:07 -0400)]
Update to Org 9.5.3-3-gd54104

2 years agoSet last user time during drag-and-drop
Po Lu [Mon, 25 Apr 2022 01:00:13 +0000 (09:00 +0800)]
Set last user time during drag-and-drop

* src/xterm.c (XTmouse_position): Set last user time if
track-mouse is drag-source or dropping.

2 years agoFix 32-bit Haiku build
Po Lu [Mon, 25 Apr 2022 00:40:53 +0000 (00:40 +0000)]
Fix 32-bit Haiku build

* src/haiku_support.h (be_get_ui_color): Fix prototype.

2 years agoImprove indexing in "Programmed Completion"
Eli Zaretskii [Sun, 24 Apr 2022 19:37:09 +0000 (22:37 +0300)]
Improve indexing in "Programmed Completion"

* doc/lispref/minibuf.texi (Programmed Completion): Improve
indexing.  (Bug#55095)