1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-04 19:10:37 -08:00
Commit graph

155918 commits

Author SHA1 Message Date
Michael Albinus
abc92b0d56 ; Fix previous change in test/Makefile.in 2022-04-27 16:32:24 +02:00
Lars Ingebrigtsen
82fa112e8a 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).
2022-04-27 16:09:38 +02:00
Lars Ingebrigtsen
0beb8fd663 Rename holiday-lists to holiday-available-holyday-lists
* lisp/calendar/holidays.el (holiday-available-holyday-lists):
Give holiday-lists a better name.
2022-04-27 15:30:25 +02:00
Lars Ingebrigtsen
7933775a1b 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.
2022-04-27 14:58:53 +02:00
Michael Albinus
da25daf7f7 Make test/Makefile more robust
* test/Makefile.in (test_template): Do not fails if corresponding
source file doesn't exist.
2022-04-27 14:13:24 +02:00
Lars Ingebrigtsen
0613e7c33d Add an instruction header line to string-edit
* lisp/textmodes/string-edit.el (string-edit): Add a header line
with instructions.
2022-04-27 14:08:49 +02:00
Lars Ingebrigtsen
a7f2eb3054 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.
2022-04-27 14:02:23 +02:00
Po Lu
5aef2623a3 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.
2022-04-27 19:19:01 +08:00
Po Lu
d4e3e548f5 Remove some unnecessary code
* src/haiku_support.cc (class EmacsView, AfterResize)
(SetUpDoubleBuffering): Remove `cspace' field since it's always
RGBA32.
2022-04-27 08:07:56 +00:00
Juri Linkov
1e0c4883b7 * lisp/help-fns.el (help-fns--insert-menu-bindings): Don't highlight heading. 2022-04-27 10:36:41 +03:00
Paul Eggert
3abb3681b5 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.
2022-04-27 00:30:25 -07:00
Po Lu
e13689d55f Fix quitting application from the Deskbar on Haiku
* lisp/term/haiku-win.el (handle-save-session): Kill Emacs
afterwards.
2022-04-27 06:13:18 +00:00
Po Lu
0bea75c95a 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.
2022-04-27 05:19:15 +00:00
Michael Albinus
f1e11deca6 ; Instrument tramp-test46-read-password 2022-04-27 07:07:21 +02:00
Paul Eggert
8c2ea3a708 Avoid change to desktop file format
* lisp/desktop.el (desktop--get-file-modtime): New function.
(desktop-save, desktop-read): Use it.
2022-04-26 21:04:36 -07:00
Paul Eggert
b568a41a5e Be more compatible with older desktops
* lisp/desktop.el (desktop-save): When comparing timestamps use
time-equal-p instead of ‘equal’.
2022-04-26 18:12:53 -07:00
Po Lu
655b3e009b 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'.
2022-04-27 09:10:18 +08:00
Stefan Monnier
92e49944a3 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`.
2022-04-26 17:36:13 -04:00
Stefan Monnier
f30625943e 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.
2022-04-26 17:36:13 -04:00
Stefan Monnier
bc9be5449e 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.
2022-04-26 17:36:13 -04:00
Stefan Monnier
4dba7c31a2 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`.
2022-04-26 17:36:13 -04:00
Stefan Monnier
21112e3683 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.
2022-04-26 17:36:12 -04:00
Paul Eggert
d35b6a49b3 Fix gnus-html-image-cache-ttl FIXME
* lisp/gnus/gnus-html.el (gnus-html-image-cache-ttl):
Make it a seconds count.
2022-04-26 13:54:38 -07:00
Alex Schroeder
516ff422c5 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.
2022-04-26 18:13:50 +02:00
Stefan Monnier
bffc4cb39d 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`.
2022-04-26 10:36:52 -04:00
Lars Ingebrigtsen
756b7cf5d9 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).
2022-04-26 15:34:26 +02:00
Po Lu
0936bfcd77 Fix EWMH window activation
* src/xterm.c (x_ewmh_activate_frame): Add missing fields of
message.  (bug#55122)
2022-04-26 20:44:28 +08:00
Lars Ingebrigtsen
a38b7d3e90 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).
2022-04-26 14:32:07 +02:00
Lars Ingebrigtsen
631a8ae9ee 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).
2022-04-26 13:27:17 +02:00
Lars Ingebrigtsen
dd5ca0eaf2 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.
2022-04-26 13:23:51 +02:00
Lars Ingebrigtsen
ae877d5511 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.
2022-04-26 12:39:13 +02:00
Lars Ingebrigtsen
e98b7d6ba2 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).
2022-04-26 12:11:49 +02:00
Po Lu
1b64e0fc0e 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.
2022-04-26 12:38:52 +08:00
Po Lu
ec027d873c * src/xterm.c (x_scroll_run): Only flush GC if really necessary. 2022-04-26 11:58:35 +08:00
Dmitry Gutov
39646c822b 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.
2022-04-26 05:36:35 +03:00
Po Lu
4a837b0c72 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.
2022-04-26 01:20:30 +00:00
Paul Eggert
d6c7054ff5 Pacify misc/test-custom-opts
* lisp/gnus/gnus-html.el (gnus-html-image-cache-ttl):
Also allow it to be a cons of integers.
2022-04-25 17:49:47 -07:00
Stefan Monnier
0a151b7c29 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.
2022-04-25 15:41:21 -04:00
Paul Eggert
4a1f69ebca Use (TICKS . HZ) for current-time etc.
* src/timefns.c (CURRENT_TIME_LIST): Change default to false.
All documentation changed.
2022-04-25 12:40:20 -07:00
Paul Eggert
d75e2c12eb 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.
2022-04-25 12:40:20 -07:00
Lars Ingebrigtsen
fd1ca094bc 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.
2022-04-25 21:14:33 +02:00
Glenn Morris
f2a4dc66c2 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
2022-04-25 11:44:03 -07:00
Alan Third
96ec2ac7d0 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>
2022-04-25 19:08:54 +01:00
Karl Fogel
42366383c6 Update bookmark sort indicator at proper time
This follows up to my commit 8b071c77b0 of 2022-04-24.  Thanks to
Manuel Giraud <manuel@ledu-giraud.fr> for reporting the buglet.
2022-04-25 12:30:02 -05:00
Po Lu
ec4dabc238 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.
2022-04-25 12:27:15 +00:00
Lars Ingebrigtsen
a956305f99 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).
2022-04-25 14:09:53 +02:00
Lars Ingebrigtsen
9fdaf9ac4d 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).
2022-04-25 14:09:53 +02:00
Michael Albinus
d932c402aa 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.
2022-04-25 12:57:01 +02:00
Michael Albinus
c38e16a0cc ; Fix typos in tec/NEWS 2022-04-25 10:37:04 +02:00
Lars Ingebrigtsen
dad2a41a2a 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).
2022-04-25 10:05:44 +02:00