Po Lu [Sat, 18 Jun 2022 06:04:24 +0000 (06:04 +0000)]
Fix type mixup in haikuselect.c
* src/haikuselect.c (haiku_lisp_to_message): Fix variable mixup.
Found with --enable-check-lisp-object-type.
Stefan Kangas [Fri, 17 Jun 2022 23:39:12 +0000 (01:39 +0200)]
; * lisp/doc-view.el (doc-view-bookmark-jump): Fix capitalization.
Stefan Kangas [Sat, 18 Jun 2022 04:31:20 +0000 (06:31 +0200)]
Merge from origin/emacs-28
024bbcb35e Prune the Gnus FAQ of some outdated data
Stefan Kangas [Sat, 18 Jun 2022 04:31:20 +0000 (06:31 +0200)]
; Merge from origin/emacs-28
The following commit was skipped:
c1f4cca7f0 Fix efaq-w32.texi build warning
Stefan Kangas [Sat, 18 Jun 2022 04:31:18 +0000 (06:31 +0200)]
Merge from origin/emacs-28
d671cd57c4 Update cl-struct-sequence-type doc string
017bdb1611 Fix a tagging problem in tramp.texi
e0bac17bbc Mention face quirks after the final line in the lispref ma...
ad74677cf3 Delete reference to obsolete library complete.el
Po Lu [Sat, 18 Jun 2022 03:19:01 +0000 (11:19 +0800)]
Prevent Lisp code or synthetic events from ruining the user time
* src/xterm.c (x_display_set_last_user_time): New parameter
`send_event'. Make sure user time is newer unless !send_event.
(x_set_last_user_time_from_lisp): Remove redundant check.
(XTmouse_position):
(handle_one_xevent): Pass `send_event' whenever appropriate.
Po Lu [Sat, 18 Jun 2022 02:14:24 +0000 (10:14 +0800)]
Fix specifying named action lists in `x-begin-drag'
* src/xfns.c (Fx_begin_drag): Record original value of `targets'
separately. Pass that as the selection targets list instead.
* src/xterm.c (x_dnd_delete_action_list): New function.
(x_dnd_begin_drag_and_drop): Bind it if there are multiple
actions.
Lars Ingebrigtsen [Fri, 17 Jun 2022 22:17:40 +0000 (00:17 +0200)]
Extend 'e' in edebug to pretty-print the values
* doc/lispref/edebug.texi (Edebug Eval): Document it.
* lisp/emacs-lisp/edebug.el (edebug-eval-expression): Allow
displaying the full value in a different buffer.
Lars Ingebrigtsen [Fri, 17 Jun 2022 19:38:30 +0000 (21:38 +0200)]
Prune the Gnus FAQ of some outdated data
* doc/misc/gnus-faq.texi (FAQ 9-2): Remove some outdated advice
(bug#56042).
Stefan Kangas [Fri, 17 Jun 2022 19:30:34 +0000 (21:30 +0200)]
Delete another library obsolete since 24.1
This file was missed in the last commit to delete libraries obsolete
since Emacs 24.3 or older.
* lisp/obsolete/pc-mode.el: Delete file. This library has been
obsolete since Emacs 24.1. (Bug#50999)
Lars Ingebrigtsen [Fri, 17 Jun 2022 19:25:44 +0000 (21:25 +0200)]
Add hacek variations to `C-x 8'
* lisp/international/iso-transl.el (iso-transl-char-map): Add
hacek characters on `C-x 8 ^ ^'.
Stefan Kangas [Fri, 17 Jun 2022 19:14:39 +0000 (21:14 +0200)]
image-dired: Use full name for bookmark handler type
* lisp/image-dired.el (image-dired-bookmark-jump): Use full mode name
for bookmark handler type.
Stefan Kangas [Fri, 17 Jun 2022 19:02:40 +0000 (21:02 +0200)]
Set bookmark handler type for Eshell
* lisp/eshell/esh-mode.el (eshell-bookmark-jump): Set bookmark handler
type.
Stefan Kangas [Fri, 17 Jun 2022 18:08:55 +0000 (20:08 +0200)]
Update bookmark tests for recent change
* test/lisp/bookmark-tests.el (bookmark-tests-set/bookmark-use-annotations-t)
(bookmark-tests-edit-annotation)
(bookmark-test-bmenu-send-edited-annotation)
(bookmark-test-bmenu-send-edited-annotation/restore-focus): Update for
recent change.
Lars Ingebrigtsen [Fri, 17 Jun 2022 17:47:08 +0000 (19:47 +0200)]
Fix copy-from-above-command doc string type
* lisp/misc.el (copy-from-above-command): Fix doc string typo.
Lars Ingebrigtsen [Fri, 17 Jun 2022 17:33:48 +0000 (19:33 +0200)]
Add new command `duplicate-line'
* lisp/misc.el (copy-from-above-command): Mention it.
(duplicate-line): New command (bug#46621).
Mattias Engdegård [Fri, 17 Jun 2022 17:13:33 +0000 (19:13 +0200)]
Slightly faster hash-table-keys and hash-table-values
* lisp/emacs-lisp/subr-x.el (hash-table-keys, hash-table-values):
Omit the reversal of the returned list. It is not ordered anyway.
* test/lisp/emacs-lisp/subr-x-tests.el
(subr-x--hash-table-keys-and-values): New test.
Lars Ingebrigtsen [Fri, 17 Jun 2022 14:59:18 +0000 (16:59 +0200)]
Fix efaq-w32.texi build warning
* doc/misc/efaq-w32.texi (Other useful ports): Fix ordering to
match nodes (or should the nodes be moved instead?).
Do not merge to master.
Lars Ingebrigtsen [Fri, 17 Jun 2022 17:11:16 +0000 (19:11 +0200)]
Regenerate ldefs-boot.el
Lars Ingebrigtsen [Fri, 17 Jun 2022 17:10:44 +0000 (19:10 +0200)]
Don't quote numbers in byte-run--set-*
* lisp/emacs-lisp/byte-run.el (byte-run--set-doc-string)
(byte-run--set-indent): Don't quote numbers (bug#48145).
Michael Albinus [Fri, 17 Jun 2022 16:53:23 +0000 (18:53 +0200)]
Fix handling of "process-*" properties in Tramp
* lisp/net/tramp.el (tramp-local-host-regexp): Add "localhost4".
(with-tramp-saved-connection-property): New defmacro.
* lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band)
(tramp-sh-handle-make-process):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory):
(tramp-smb-handle-file-acl, tramp-smb-handle-process-file)
(tramp-smb-handle-set-file-acl)
(tramp-smb-handle-start-file-process): Use it. (Bug#55832)
Lars Ingebrigtsen [Fri, 17 Jun 2022 16:19:02 +0000 (18:19 +0200)]
Fix some declare-after-interactive functions
* lisp/progmodes/opascal.el (opascal-new-comment-line):
* lisp/image-mode.el (image-transform-fit-to-height):
* lisp/help-fns.el (help-fns-edit-variable):
* lisp/gnus/gnus-salt.el (gnus-pick-start-reading):
* lisp/eshell/esh-util.el (eshell-for):
* lisp/ldefs-boot.el (view-return-to-alist-update): Fix warnings
about declare after interactive.
Lars Ingebrigtsen [Fri, 17 Jun 2022 16:12:57 +0000 (18:12 +0200)]
Regenerate ldefs-boot.el
Lars Ingebrigtsen [Fri, 17 Jun 2022 16:12:38 +0000 (18:12 +0200)]
Don't quote the `when' form in obsoletions
* lisp/emacs-lisp/byte-run.el (byte-run--set-obsolete): The `when'
is a string (or nil), so don't quote it (bug#48145).
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--print-form):
Adjust folding.
Mattias Engdegård [Fri, 17 Jun 2022 15:06:05 +0000 (17:06 +0200)]
Warn about misplaced or duplicated function/macro declarations
Doc strings, `declare` and `interactive` forms must appear in that
order and at most once each. Complain if they don't, instead of
silently ignoring the problem (bug#55905).
* lisp/emacs-lisp/byte-run.el (byte-run--parse-body)
(byte-run--parse-declarations): New.
(defmacro, defun): Check for declaration well-formedness as
described above. Clarify doc strings. Refactor some common code.
* test/lisp/emacs-lisp/bytecomp-resources/fun-attr-warn.el:
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-fun-attr-warn):
New test.
Lars Ingebrigtsen [Fri, 17 Jun 2022 14:59:18 +0000 (16:59 +0200)]
Fix efaq-w32.texi build warning
* doc/misc/efaq-w32.texi (Other useful ports): Fix ordering to
match nodes (or should the nodes be moved instead?).
Lars Ingebrigtsen [Fri, 17 Jun 2022 14:50:42 +0000 (16:50 +0200)]
Regenerated ldefs-boot.el
Lars Ingebrigtsen [Fri, 17 Jun 2022 14:48:02 +0000 (16:48 +0200)]
Update cl-struct-sequence-type doc string
* lisp/emacs-lisp/cl-macs.el (cl-struct-sequence-type): Fix doc
string to reflect what it does (bug#46523).
Stefan Kangas [Fri, 17 Jun 2022 14:29:44 +0000 (16:29 +0200)]
Fix some command substitutions
* lisp/net/rcirc.el (rcirc-edit-multiline):
* lisp/textmodes/reftex-index.el (reftex-index-phrases-mode)
(reftex-index-phrase-selection-or-word):
* lisp/textmodes/remember.el (remember): Fix command substitutions.
Stefan Kangas [Fri, 17 Jun 2022 14:06:10 +0000 (16:06 +0200)]
Rename command to bookmark-edit-annotation-confirm
* lisp/bookmark.el (bookmark-edit-annotation-confirm): Rename from
'bookmark-send-edited-annotation' to be more consistent with
'bookmark-edit-annotation-cancel'. Make the old name into an
obsolete function alias.
Stefan Kangas [Fri, 17 Jun 2022 14:03:52 +0000 (16:03 +0200)]
Improve help-enable-variable-value-editing help
* lisp/help-fns.el (help-enable-variable-value-editing): Expand
docstring to better explain what effect it has.
(help-fns-edit-variable): Use command substitution.
Stefan Kangas [Fri, 17 Jun 2022 13:54:29 +0000 (15:54 +0200)]
Fix command substitution in emacsbug.el
* lisp/mail/emacsbug.el: Minor doc fix.
(submit-emacs-patch, report-emacs-bug): Fix command substitution.
Prefer keymap-set to define-key.
Lars Ingebrigtsen [Fri, 17 Jun 2022 14:30:16 +0000 (16:30 +0200)]
Allow editing all symbols in help-fns--editable-variable
* lisp/help-fns.el (help-fns--editable-variable): Allow editing
all symbols (bug#56038).
Lars Ingebrigtsen [Fri, 17 Jun 2022 14:03:48 +0000 (16:03 +0200)]
Improve time parsing documentation
* doc/lispref/os.texi (Time Parsing): Clarify which functions
take/return timestamps and which ones take decoded time structures.
* src/timefns.c (Fdecode_time): Clarify TIME argument (bug#46505).
Lars Ingebrigtsen [Fri, 17 Jun 2022 13:06:15 +0000 (15:06 +0200)]
Make uce.el obsolete (bug#46472)
Lars Ingebrigtsen [Fri, 17 Jun 2022 12:47:16 +0000 (14:47 +0200)]
Fix wdired marking of unsuccessfully renamed files
* lisp/wdired.el (wdired-finish-edit): Don't mark non-renamed
files as renamed (bug#46438).
Dmitry Gutov [Fri, 17 Jun 2022 12:22:29 +0000 (15:22 +0300)]
buffer-match-p: Resolve backward compat concerns
* doc/lispref/buffers.texi (Buffer List): Document 'major-mode'
and 'derived-mode' predicates. Fix some typos.
* lisp/subr.el (buffer-match-p): Use the structure initially
pioneered by project-kill-buffer-conditions as-is (bug#54296).
* lisp/progmodes/project.el (project-kill-buffer-conditions)
(project--buffer-check): Revert the latest change.
(project--buffer-check): Add support for lambda predicates.
Lars Ingebrigtsen [Fri, 17 Jun 2022 12:20:05 +0000 (14:20 +0200)]
Fix a tagging problem in tramp.texi
* doc/misc/tramp.texi (Frequently Asked Questions): Restore an
@end lisp removed by accident.
Po Lu [Fri, 17 Jun 2022 12:19:19 +0000 (20:19 +0800)]
Reduce code duplication when setting user time window
* src/xterm.c (x_make_frame_visible): Use
`x_update_frame_user_time_window'.
Lars Ingebrigtsen [Fri, 17 Jun 2022 12:17:51 +0000 (14:17 +0200)]
Mention face quirks after the final line in the lispref manual
* doc/lispref/display.texi (Face Attributes): Mention the quirks
about point after the final line (bug#56011).
Lars Ingebrigtsen [Fri, 17 Jun 2022 11:48:53 +0000 (13:48 +0200)]
Speed up shr-string-pixel-width
* lisp/net/eww.el (eww-update-header-line-format): Use
string-pixel-width (since we don't care about shr-use-fonts here).
* lisp/net/shr.el (shr-string-pixel-width): Use
`string-pixel-width', which should be faster.
Stefan Kangas [Fri, 17 Jun 2022 11:34:36 +0000 (13:34 +0200)]
Cancel editing bookmark annotations with C-c C-k
* lisp/bookmark.el (bookmark-edit-annotation-cancel): New command.
(bookmark-edit-annotation-mode): Document it.
(bookmark-edit-annotation-mode-map): Bind it to 'C-c C-k'.
(bookmark-default-annotation-text): Announce it when editing
annotations.
(bookmark-edit-annotation--maybe-display-list): New macro.
(bookmark-send-edited-annotation): Use above new macro.
Stefan Kangas [Fri, 17 Jun 2022 10:49:57 +0000 (12:49 +0200)]
Use command substitution in bookmark-edit-annotation
* lisp/bookmark.el (bookmark-default-annotation-text): Use command
substitution.
(bookmark-edit-annotation): Enter mode before inserting annotation
to get the correct command substitution.
Stefan Kangas [Fri, 17 Jun 2022 10:18:26 +0000 (12:18 +0200)]
* lisp/edmacro.el (edit-kbd-macro): Use command substitution.
Stefan Kangas [Fri, 17 Jun 2022 09:52:20 +0000 (11:52 +0200)]
Delete most libraries obsolete since 24.1 and 24.3
Emacs 24.3 was released 10 years ago.
* lisp/obsolete/abbrevlist.el:
* lisp/obsolete/assoc.el:
* lisp/obsolete/complete.el:
* lisp/obsolete/cust-print.el:
* lisp/obsolete/erc-hecomplete.el:
* lisp/obsolete/mailpost.el:
* lisp/obsolete/mouse-sel.el:
* lisp/obsolete/old-emacs-lock.el:
* lisp/obsolete/patcomp.el:
* lisp/obsolete/pc-select.el:
* lisp/obsolete/s-region.el: Delete files. These libraries have been
obsolete since Emacs 24.1 or 24.3. (Bug#50999)
* etc/NEWS: Announce their deletion.
* lisp/minibuffer.el (minibuffer-confirm-exit-commands):
* lisp/textmodes/rst.el: Remove references to above obsolete
libraries.
Po Lu [Fri, 17 Jun 2022 11:04:08 +0000 (19:04 +0800)]
Clarify doc of `x-display-set-last-user-time'
* src/xfns.c (Fx_display_last_user_time): Explain in more detail
the meaning of TERMINAL.
Stefan Kangas [Fri, 17 Jun 2022 10:04:48 +0000 (12:04 +0200)]
Delete reference to obsolete library complete.el
* doc/misc/tramp.texi (Frequently Asked Questions): Delete reference
to obsolete library complete.el.
Mattias Engdegård [Fri, 17 Jun 2022 08:32:54 +0000 (10:32 +0200)]
* src/fns.c (Fmapconcat): Better empty-string-or-nil detection.
Stefan Kangas [Fri, 17 Jun 2022 08:07:47 +0000 (10:07 +0200)]
Fix misplaced interactive spec
* test/lisp/progmodes/cperl-mode-tests.el (cperl-test-bug-10483):
* test/lisp/cedet/srecode/document-tests.el
(srecode-document-function-comment-extract-test):
* test/lisp/obsolete/inversion-tests.el (inversion-unit-test):
* test/lisp/cedet/cedet-files-tests.el (cedet-files-utest): Remove
misplaced interactive spec.
(cedet-files-utest-list): Minor doc fix; improve formatting.
Po Lu [Fri, 17 Jun 2022 07:29:59 +0000 (15:29 +0800)]
Improve compatibility when receiving drops from early XDND programs
* lisp/x-dnd.el (x-dnd-handle-xdnd): Save version in state.
If version is less than 5, don't put action and success in
XdndFinished events. If less than 2, always use `copy' as
the selected action.
Po Lu [Fri, 17 Jun 2022 06:58:20 +0000 (06:58 +0000)]
Fix computation of screen width and height on Haiku
* src/haiku_support.cc (be_get_screen_dimensions): Use correct
macros to extract width and height.
Po Lu [Fri, 17 Jun 2022 04:57:03 +0000 (12:57 +0800)]
Fix instances of not using a usable Motif drag atom
* src/xterm.c (xm_get_drag_atom_1): If another frame owns an
atom, use it anyway.
Stefan Kangas [Fri, 17 Jun 2022 04:30:35 +0000 (06:30 +0200)]
Merge from origin/emacs-28
f419de6eca * lisp/textmodes/artist.el: Minor doc fixes.
5ddd0f1a35 * lisp/net/tramp.el (tramp-methods): Fix quoting in docstr...
b0c5accb99 Update MS Windows FAQ for MinGW64-w64/MSYS2
Po Lu [Fri, 17 Jun 2022 02:57:42 +0000 (10:57 +0800)]
Improve window manager user time reporting mode switching
* src/xterm.c (x_display_set_last_user_time): Stop periodically
checking for user time window support.
(x_update_frame_user_time_window): New function.
(handle_one_xevent): Call it on toplevel ReparentNotify if the
frame has been visible at least once.
* src/xterm.h (struct x_display_info): Remove
`last_user_check_time'.
Po Lu [Fri, 17 Jun 2022 02:24:05 +0000 (10:24 +0800)]
Update last event time during DND operations
* lisp/x-dnd.el (x-dnd-handle-xdnd, x-dnd-handle-motif): Set
last user time to provided timestamp.
* src/xfns.c (Fx_display_last_user_time): New function.
(syms_of_xfns): New defsubr.
* src/xterm.c (x_set_last_user_time_from_lisp): New function.
* src/xterm.h: Update prototypes.
Stefan Kangas [Thu, 16 Jun 2022 07:48:05 +0000 (09:48 +0200)]
* lisp/textmodes/artist.el: Minor doc fixes.
Stefan Monnier [Thu, 16 Jun 2022 18:05:26 +0000 (14:05 -0400)]
* src/fns.c (Fmapconcat): Optimize the case where separator==""
Michael Albinus [Thu, 16 Jun 2022 17:29:55 +0000 (19:29 +0200)]
Fix Tramp test
* test/lisp/net/tramp-tests.el (tramp-test03-file-name-method-rules):
Remove superfluous checks.
Eli Zaretskii [Thu, 16 Jun 2022 17:22:56 +0000 (20:22 +0300)]
; * doc/emacs/package.texi (Package Installation): Fix markup.
Eli Zaretskii [Thu, 16 Jun 2022 16:53:45 +0000 (19:53 +0300)]
Fix disruption of windows' display by shr.el
* src/window.c (struct saved_window): New member 'vscroll'.
(Fset_window_configuration, save_window_save): Save and restore
the window's vscroll value.
* lisp/net/shr.el (shr-insert-document): Restore the original
window's hscroll, in case we are rendering in a window other than
where the document will be eventually displayed. This avoids
resetting hscroll of windows we use temporarily for shr's
rendering job. (Bug#56008)
Michael Heerdegen [Tue, 14 Jun 2022 11:26:06 +0000 (13:26 +0200)]
Allow number register insertion in Calc (Bug#55943)
* lisp/calc/calc-yank.el (calc-get-register): Convert number values to
strings.
Mattias Engdegård [Thu, 16 Jun 2022 14:04:48 +0000 (16:04 +0200)]
* src/fns.c (mapcar1): Test types in rough order of likelyhood.
Mattias Engdegård [Thu, 16 Jun 2022 12:11:03 +0000 (14:11 +0200)]
Use BASE_EQ instead of EQ where obviously safe
* src/alloc.c (deadp):
* src/buffer.c (reset_buffer_local_variables, candidate_buffer)
(Fkill_buffer, Fbuffer_swap_text, Fmake_overlay, Fmove_overlay):
* src/callint.c (Fcall_interactively):
* src/coding.c (decode_coding_object, encode_coding_object)
(code_convert_region, Ffind_operation_coding_system):
* src/comp.c (Fcomp_el_to_eln_rel_filename):
* src/conf_post.h (RE_TRANSLATE_P):
* src/data.c (Fkill_local_variable, Fash, expt_integer):
* src/dired.c (file_name_completion):
* src/dispnew.c (set_window_cursor_after_update, update_frame_1)
(Fframe_or_buffer_changed_p):
* src/doc.c (Fdocumentation, Fdocumentation_property)
(default_to_grave_quoting_style):
* src/editfns.c (Fconstrain_to_field, save_excursion_save)
(save_excursion_restore, Fngettext):
* src/eval.c (Fautoload, un_autoload, specbind):
* src/fileio.c (Fmake_temp_file_internal):
* src/fns.c (string_char_to_byte, string_byte_to_char)
(Fnthcdr, Fnreverse):
* src/indent.c (vmotion):
* src/inotify.c (add_watch):
* src/keyboard.c (command_loop_1, read_char)
(read_char_minibuf_menu_prompt):
* src/lread.c (oblookup):
* src/macfont.m (macfont_descriptor_entity, macfont_open):
* src/minibuf.c (Finnermost_minibuffer_p, Ftry_completion)
(Ftest_completion):
* src/nsfns.m (ns_set_icon_name):
* src/pdumper.c (dump_queue_dequeue):
* src/pgtkfns.c (pgtk_set_icon_type, pgtk_set_icon_name):
* src/process.c (Faccept_process_output):
* src/textprop.c (set_text_properties):
* src/w32fns.c (w32_set_icon_type, w32_set_icon_name):
* src/w32select.c (validate_coding_system):
* src/window.c (decode_next_window_args, window_loop)
(save_window_save):
* src/xdisp.c (wset_redisplay):
* src/xfaces.c (Fx_family_fonts, resolve_face_name)
(gui_supports_face_attributes_p):
* src/xfns.c (x_set_icon_type, x_set_icon_name):
* src/xselect.c (clean_local_selection_data):
Use BASE_EQ instead of EQ where it is obvious that neither argument
can be a symbol with properties or at least one argument is a
non-symbol.
Lars Ingebrigtsen [Thu, 16 Jun 2022 12:25:47 +0000 (14:25 +0200)]
Make package-recompile delete all .elc files first
* lisp/emacs-lisp/package.el (package-recompile): Delete all .elc
files under the package directory.
Lars Ingebrigtsen [Thu, 16 Jun 2022 11:49:02 +0000 (13:49 +0200)]
Add new package.el commands for recompilation
* doc/emacs/package.texi (Package Installation): Document them.
* lisp/emacs-lisp/package.el (package-recompile):
(package-recompile-all): New commands (bug#27253).
Michael Albinus [Thu, 16 Jun 2022 08:45:15 +0000 (10:45 +0200)]
* lisp/net/tramp.el (tramp-methods): Fix quoting in docstring.
Eli Zaretskii [Thu, 16 Jun 2022 08:09:19 +0000 (11:09 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Thu, 16 Jun 2022 08:06:29 +0000 (11:06 +0300)]
Speed up Org to Texinfo generation
* doc/misc/Makefile.in ($(1:.org=.texi)): Use a higher GC
threshold, to speed up .org=.texi conversion. Patch by Ihor
Radchenko <yantar92@gmail.com>.
Stefan Kangas [Thu, 16 Jun 2022 07:48:18 +0000 (09:48 +0200)]
Make artist-version variable obsolete
* lisp/textmodes/artist.el (artist-version): Make obsolete. This has
not been updated in nearly two decades; use the Emacs version instead.
(artist-submit-bug-report): Don't use above obsolete variable.
Stefan Kangas [Thu, 16 Jun 2022 07:47:47 +0000 (09:47 +0200)]
Prefer defvar-keymap for artist-mode-map
* lisp/textmodes/artist.el (artist-mode-map): Prefer
defvar-keymap.
Ihor Radchenko [Thu, 16 Jun 2022 02:43:29 +0000 (10:43 +0800)]
org-cite-list-citations: Cache footnote-definition searches
* lisp/org/oc.el (org-cite-list-citations): Avoid quadratic complexity.
Pre-calculate list of all footnote definitions and cache the footnote
label search hits. Do not make `org-element-map' accumulate unused
result.
Ihor Radchenko [Thu, 16 Jun 2022 01:28:27 +0000 (09:28 +0800)]
org-element-map: Avoid repetitive `plist-get' call
* lisp/org/org-element.el (org-element-map): Do not call `(plist-get info
:ignore-list)' on every iteration.
Ihor Radchenko [Wed, 15 Jun 2022 17:01:53 +0000 (01:01 +0800)]
org-export-data: Concatenate strings in temporary buffer for performance
* lisp/org/ox.el (org-export-data): Use temporary buffer to collect export
data instead of `mapconcat'. Using buffer puts less load on garbage
collector.
Ihor Radchenko [Wed, 15 Jun 2022 17:03:18 +0000 (01:03 +0800)]
org-export-as: Do not update buffer settings when not modified
* lisp/org/ox.el (org-export-as): Use `buffer-chars-modified-tick' and
avoid extra invocations of `org-set-regexps-and-options' and
`org-update-radio-target-regexp' when the buffer is not changed.
Also, disable folding checks. Folding is irrelevant inside export
buffer.
Ihor Radchenko [Sun, 12 Jun 2022 05:32:35 +0000 (13:32 +0800)]
org-export-resolve-id-link: Pre-cache all the ids in the parse tree
* lisp/org/ox.el (org-export-resolve-id-link): Pre-cache all the ids in
the parse tree for faster lookup.
Po Lu [Thu, 16 Jun 2022 07:51:56 +0000 (15:51 +0800)]
Fix Motif drag-and-drop timestamps
* lisp/x-dnd.el (x-dnd-handle-motif): Pass timestamp when
retrieving DND selection value. Bug found on Solaris 2.6.
Ihor Radchenko [Sun, 12 Jun 2022 05:06:47 +0000 (13:06 +0800)]
org-export-resolve-fuzyy-link: Pre-cache all possible search cells
* lisp/org/ox.el (org-export-resolve-fuzzy-link): Before matching LINK,
pre-process and cache all the non-nil search cells in the parse tree.
When matching, use the pre-processed info. Fix the :test function for
the cache hash table.
Ihor Radchenko [Sun, 12 Jun 2022 05:05:16 +0000 (13:05 +0800)]
org-export-get-footnote-definition: Pre-cache references in parse tree
* lisp/org/ox.el (org-export-get-footnote-definition): Pre-process parse
tree once to filter out all non-footnote elements. This speeds up
subsequent footnote definition searches.
Robert Pluim [Thu, 16 Jun 2022 07:34:28 +0000 (09:34 +0200)]
Fix check for window system with toolkit scrollbars
* configure.ac (USE_TOOLKIT_SCROLL_BARS): Add missing 'test' to
condition. (Bug#55970)
Po Lu [Thu, 16 Jun 2022 07:26:55 +0000 (15:26 +0800)]
Fix byte-swapping of Motif DND tables
* src/xterm.c (xm_read_targets_table_rec): Swap nitems first
before checking the length.
Arash Esbati [Wed, 15 Jun 2022 19:35:47 +0000 (21:35 +0200)]
Update MS Windows FAQ for MinGW64-w64/MSYS2
* doc/misc/efaq-w32.texi (Compiling, Debugging): Mention
MinGW64-w64/MSYS2 as the preferred way for building Emacs on
capable systems.
(Attachments with Gnus): Catch up with emacs-mime.texi in the
example given.
(Spell check): Add the availability of GNU Aspell and Hunspell
in MSYS2 distribution.
(Other useful ports): Add an entry for MinGW64-w64/MSYS2.
Fix link for MinGW homepage.
Remove entry for defunct UWIN project. (Bug#55930)
Eli Zaretskii [Thu, 16 Jun 2022 07:08:10 +0000 (10:08 +0300)]
; Fix last change in documentation of 'strz' bindat type
* doc/lispref/processes.texi (Bindat Types): Fix wording and
clarify the description of 'strz'. (Bug#55952)
Richard Hansen [Fri, 10 Jun 2022 00:41:50 +0000 (20:41 -0400)]
bindat (strz): Write null terminator after variable length string
* lisp/emacs-lisp/bindat.el (bindat--pack-strz): Explicitly write a
null byte after packing a variable-length string to ensure proper
termination when packing to a pre-allocated string.
* doc/lispref/processes.texi (Bindat Types): Update documentation.
* test/lisp/emacs-lisp/bindat-tests.el (bindat-test--str-strz-prealloc):
Update tests.
Po Lu [Thu, 16 Jun 2022 06:41:21 +0000 (14:41 +0800)]
Fix defcustom in last change
* lisp/x-dnd.el (x-dnd-use-offix-drop): Fix defcustom.
Po Lu [Thu, 16 Jun 2022 06:33:30 +0000 (14:33 +0800)]
Improve handling of fallback drop protocols
* lisp/x-dnd.el (x-dnd-use-offix-drop): New value `files', which
means to only drop files using the OffiX protocol. Make it the
default.
(x-dnd-handle-old-kde): Handle other data types correctly.
(x-dnd-offix-old-kde-to-name): New variable.
(x-dnd-offix-id-to-name): Fix typo in doc string.
(x-dnd-handle-unsupported-drop): Implement new value.
Po Lu [Thu, 16 Jun 2022 05:58:39 +0000 (13:58 +0800)]
Fix Motif DND after atom ownership is lost due to frame destruction
* src/xterm.c (xm_get_drag_atom_1): Record owner.
(x_free_frame_resources): Clear drag atom if owner was freed.
* src/xterm.h (struct x_display_info): New field
`motif_drag_atom_owner'.
Stefan Kangas [Thu, 16 Jun 2022 04:52:01 +0000 (06:52 +0200)]
Merge from origin/emacs-28
4d7a936ac2 ; * src/fileio.c (Fset_file_modes): Improve previous change
32cff740e2 Describe 'set-file-modes' argument prompting
Po Lu [Thu, 16 Jun 2022 04:49:07 +0000 (12:49 +0800)]
Improve drag atom computation
* src/xterm.c (xm_get_drag_window): Avoid leak if error occured
creating drag window. Also use StructureNotifyMask instead of
ButtonPressMask.
(xm_get_drag_atom_1): Update. Make EMACS_DRAG_ATOM a list of
atoms and use the first one that isn't currently owned.
(xm_get_drag_atom): Stop owning selection here.
(xm_setup_drag_info): Record chosen atom.
(x_dnd_cleanup_drag_and_drop, x_dnd_begin_drag_and_drop)
(x_dnd_update_state, handle_one_xevent, x_connection_closed):
Use chosen atom.
* src/xterm.h (struct x_display_info): New field
`motif_drag_atom_time'.
Paul Eggert [Thu, 16 Jun 2022 04:08:03 +0000 (23:08 -0500)]
Streamline time decoding and conversion
* src/lisp.h (lisp_h_BASE2_EQ, BASE2_EQ): New macros and functions.
* src/timefns.c (tzlookup, Fdecode_time): Use them.
(Ftime_convert): Convert to symbol once, instead of many times.
Paul Eggert [Thu, 16 Jun 2022 04:08:03 +0000 (23:08 -0500)]
Don’t test time functions for NaNs, INF
* test/src/timefns-tests.el (decode-then-encode-time)
(time-equal-p-NaN-NaN, time-arith-tests):
Don’t test time functions with infinities and NaNs,
which are not Lisp time values.
Paul Eggert [Thu, 16 Jun 2022 04:08:03 +0000 (23:08 -0500)]
Prefer BASE_EQ in time-sensitive ops
* src/timefns.c (tzlookup, lisp_time_hz_ticks)
(decode_time_components, lisp_to_timespec, lispint_arith)
(time_arith, time_cmp, Fdecode_time, Fencode_time)
(Ftime_convert): Prefer BASE_EQ to EQ where either will do.
Paul Eggert [Thu, 16 Jun 2022 04:05:22 +0000 (23:05 -0500)]
icalendar-tests no longer assumes TZ = wall
Do not assume that the TZ environment variable is either unset or
agrees with /etc/localtime. I ran into this test bug while
running ‘TZ=America/Chicago make check’ on a platform where
/etc/localtime was America/Los_Angeles.
* test/lisp/calendar/icalendar-tests.el:
(icalendar-tests--decode-isodatetime): Don’t use
set-time-zone-rule, whose doc string says “Instead of calling this
function, you typically want something else” for a reason.
Instead, pass the zone arg to icalendar-test--format.
Po Lu [Thu, 16 Jun 2022 02:39:01 +0000 (10:39 +0800)]
Handle OffiX drop of multiple files
* lisp/x-dnd.el (x-dnd-types-alist): Register DndTypeFiles.
(x-dnd-offix-id-to-name): Fix typo.
(x-dnd-handle-offix-files): New function.
(x-dnd-convert-to-offix): Fix conversion to DndTypeFiles.
Po Lu [Thu, 16 Jun 2022 02:08:12 +0000 (10:08 +0800)]
Comply with the Motif requirement for unique drag atoms
* src/xselect.c (x_handle_selection_request)
(Fx_get_selection_internal, syms_of_xselect): New variable
`x-selection-alias-alist'. Respect that alist of aliases.
* src/xterm.c (x_atom_refs): Intern _EMACS_DRAG_ATOM.
(xm_get_drag_atom_1, xm_get_drag_atom): New functions.
(xm_setup_drag_info, x_dnd_cleanup_drag_and_drop)
(x_dnd_begin_drag_and_drop, x_dnd_update_state, handle_one_xevent)
(x_connection_closed, x_intern_cached_atom): Alias the drag atom
to XdndSelection. Use it instead of XdndSelection to set the
Motif index atom.
(x_get_atom_name): Handle new atoms.
(syms_of_xterm): New defsym.
* src/xterm.h (struct x_display_info): New fields for new atoms
and their names.
Sean Whitton [Wed, 15 Jun 2022 21:42:40 +0000 (14:42 -0700)]
* .dir-locals.el: Set emacs-lisp-docstring-fill-column.
Sean Whitton [Wed, 15 Jun 2022 21:41:17 +0000 (14:41 -0700)]
; * etc/NEWS: Add entry for recent minibuffer abbrev table changes.
Lars Ingebrigtsen [Wed, 15 Jun 2022 16:36:58 +0000 (18:36 +0200)]
Adjust ibuffer test
* test/lisp/ibuffer-tests.el (ibuffer-format-qualifier): Adjust
test after recent formatting changes.
Lars Ingebrigtsen [Wed, 15 Jun 2022 16:29:42 +0000 (18:29 +0200)]
Allow completing tags, parameters and values in html-mode
* lisp/textmodes/sgml-mode.el (html-mode--complete-at-point):
Allow completing tags, parameters and values (bug#29057).
Manuel Giraud [Wed, 15 Jun 2022 15:52:38 +0000 (17:52 +0200)]
Do not display 'nil for 0-ary filter qualifier in ibuf
* lisp/ibuf-ext.el (ibuffer-format-qualifier-1): Do not display
nil in header for 0-ary filter qualifier.
* lisp/ibuf-macs.el (define-ibuffer-filter): Also fix the message.
Stefan Kangas [Wed, 15 Jun 2022 14:43:22 +0000 (16:43 +0200)]
Prefer defvar-keymap in ibuffer.el
* lisp/ibuffer.el (ibuffer--filter-map, ibuffer-name-map)
(ibuffer-filename/process-header-map, ibuffer-mode-name-map)
(ibuffer-name-header-map, ibuffer-size-header-map)
(ibuffer-mode-header-map, ibuffer-mode-filter-group-map): Prefer
defvar-keymap.