Use proper smime-keys entry for S/MIME signatures using OpenSSL
bug#67931
* doc/misc/emacs-mime.texi (MML Definition):
* lisp/gnus/mml.el (mml-parse-1): Add chainfile parameter to sign tags.
* lisp/gnus/mml-smime.el (mml-smime-openssl-sign-query): Include the
additional certificates from smime-keys in MML tag generation as
chainfile parameters.
(mml-smime-openssl-sign): Forward chainfile entries from the parsed tag
alist to smime-sign-buffer.
; * lisp/gnus/smime.el (smime-sign-region): Fix typo in documentation.
; (smime-sign-buffer): Improve documentation to match smime-sign-region.
Po Lu [Tue, 14 May 2024 08:13:58 +0000 (16:13 +0800)]
Port tramp-androidsu to a wider variety of systems
* lisp/net/tramp-androidsu.el
(tramp-androidsu-maybe-open-connection): Search for `su' when
the connection is initiated; replace PATH of inferior shell with
trap-androidsu-remote-path.
(tramp-androidsu-handle-make-process): Do not provide username
if root.
Andrea Corallo [Fri, 3 May 2024 20:21:20 +0000 (22:21 +0200)]
Introduce 'compilation-safety' variable
* lisp/emacs-lisp/bytecomp.el (compilation-safety): New customize.
* src/comp.c (comp_t): Add func_safety.
(emit_call_with_type_hint, emit_call2_with_type_hint): Make use of.
(compile_function): Set 'comp.func_safety'.
Avoid resizing mutation in subst-char-in-string, take two
This time we take care to preserve properties, and add a test.
* lisp/subr.el (subst-char-in-string):
Use string-replace to avoid resizing mutation and O(n^2) time.
* test/lisp/subr-tests.el (subr--subst-char-in-string): New test.
Juri Linkov [Mon, 13 May 2024 06:59:07 +0000 (09:59 +0300)]
* lisp/imenu.el: Support more values for imenu-flatten (bug#70846)
(imenu-flatten): Change type boolean to choice
of more values for prefix/suffix section names.
(imenu--completion-buffer): Add :annotation-function if
'imenu-flatten' is 'annotation'.
(imenu--flatten-index-alist): Put property 'imenu-section' if
'imenu-flatten' is 'annotation'.
Po Lu [Mon, 13 May 2024 06:40:15 +0000 (14:40 +0800)]
Communicate frame titles to the window manager on Android
* java/org/gnu/emacs/EmacsActivity.java (detachWindow)
(attachWindow): Call updateWmName.
(updateWmName): New function; transfer wm name from the window
attached to the task's description.
* java/org/gnu/emacs/EmacsWindow.java (EmacsWindow)
<wmName>: New field.
(setWmName): New function.
* src/android.c (android_init_emacs_window): Link to new
function.
(android_set_wm_name): New function.
* src/androidfns.c (android_set_name_internal, android_set_name)
(android_implicitly_set_name, android_explicitly_set_name)
(android_set_title): Port from X.
Dmitry Gutov [Sun, 12 May 2024 17:42:08 +0000 (20:42 +0300)]
Fix 'C-u C-x p g' globally and 'A' in dired-mode
* lisp/progmodes/project.el (project-find-regexp): Ensure the
DEFAULT-DIRECTORY is set correctly for the 'C-u' case (bug#70888).
* lisp/progmodes/project.el (project--files-in-directory):
Ensure that the DIR argument ends with a slash --
'dired-do-find-regexp' passes it differently, for example.
* lisp/progmodes/xref.el (xref--group-name-for-display): Ensure
the project-relative and absolute display modes work well for
groups with "relative" file names.
(xref--analyze, xref--add-log-current-defun): Change accordingly.
* test/lisp/progmodes/project-tests.el
(project-find-regexp-with-prefix): New test.
* lisp/net/tramp-compat.el (tramp-nspawn): Warn, if that package is used.
* lisp/net/tramp-container.el (tramp-nspawn-program): New defcustom.
(tramp-nspawn-method): New defconst.
(tramp-nspawn--completion-function, tramp-enable-nspawn-method):
New defuns.
Dmitry Gutov [Sun, 12 May 2024 02:57:10 +0000 (05:57 +0300)]
completion--replace: Fix completion cycling
* lisp/minibuffer.el (completion--replace):
Don't "insert before markers" after all because in some cases
(https://lists.gnu.org/archive/html/emacs-devel/2024-05/msg00701.html)
- like cycling - BEG can be denoted by a marker as well.
(minibuffer-completion-help): Make FIELD-END simply a fixnum. And
adjust its value manually inside the local
completion-list-insert-choice-function (bug#48356).
* lisp/emacs-lisp/cl-seq.el (cl-sort):
Don't use string mutation when sorting the characters in a string.
This avoids O(n^2) run time and makes it future-safe.
Po Lu [Sun, 12 May 2024 12:24:19 +0000 (20:24 +0800)]
Properly deinitialize directory cursors on closedir
* src/androidvfs.c (android_saf_tree_closedir): Call
cursor.close, for deleting the local reference to enable its
garbage collection is not sufficient to release all related
resources.
Po Lu [Sun, 12 May 2024 07:46:38 +0000 (15:46 +0800)]
Additional changes to processing of Num Lock on Android
* java/org/gnu/emacs/EmacsView.java (onKeyDown, onKeyMultiple)
(onKeyDown): Disregard Num and Scroll Lock keys, and return
value of window functions to the system.
* java/org/gnu/emacs/EmacsWindow.java (eventModifiers): Return
normalized meta state, not only those bits the system considers
modifiers.
(onKeyDown, onKeyUp): Ignore numpad keys to which no base
characters are assigned, so that the system may generate the
proper action keys instead.
Po Lu [Sun, 12 May 2024 06:13:27 +0000 (14:13 +0800)]
Correct earlier changes to processing of Num Lock on Android
* java/org/gnu/emacs/EmacsWindow.java (onKeyDown, onKeyUp):
Cease stripping META_NUM_LOCK_ON and META_SCROLL_LOCK_ON from
meta masks reported to getUnicodeChar.
Po Lu [Sun, 12 May 2024 05:27:43 +0000 (13:27 +0800)]
Pacify warnings in gmalloc.c
* src/gmalloc.c (__malloc_initialize_hook): Also declare in
advance on Glibc 2.24 and later.
(__after_morecore_hook, __morecore): Likewise on Glibc 2.34 and
later.
Paul Eggert [Sat, 4 May 2024 17:08:48 +0000 (10:08 -0700)]
Pacify gcc -Wmissing-variable-declarations
This is a new warning diagnostic in GCC 14.
* lib-src/etags.c (mercury_heuristics_ratio):
* src/pgtkselect.c, src/xselect.c (selection_request_stack):
* src/xselect.c (outstanding_transfers):
* src/xterm.c (pending_selection_requests)
(x_dnd_waiting_for_motif_finish_display):
Now static.
* lib-src/make-docfile.c (close_emacs_globals):
Arrange for lispsym to be declared with extern first,
when compiling lread.c.
* src/alloc.c (gdb_make_enums_visible) [__GNUC__]:
* src/emacs.c (RCS_Id):
* src/keyboard.c (stop_character):
* src/print.c (print_output_debug_flag):
Now declared with extern first.
* src/lisp.h (DEFINE_GDB_SYMBOL_BEGIN) [MAIN_PROGRAM]:
Arrange for ID to be declared extern first.
* src/lisp.h (garbage_collection_inhibited):
* src/xterm.h (x_frame_parm_handlers):
Declare here, so that its interface is properly checked. Other decls
removed.
Paul Eggert [Sat, 4 May 2024 16:55:27 +0000 (09:55 -0700)]
Adjust to recent Gnulib changes
* admin/merge-gnulib: Also remove the new Gnulib file
m4/off64_t.m4, as Emacs doesn’t need off64_t.
* configure.ac (gl_TYPE_OFF64_T): Define a nearly no-op.
kobarity [Thu, 9 May 2024 15:39:10 +0000 (00:39 +0900)]
Support Python 3 in 'package-test-update-archives-async'
* test/lisp/emacs-lisp/package-resources/package-test-server.py:
Support Python 3.
* test/lisp/emacs-lisp/package-tests.el
(package-test-update-archives-async): Search for an executable
named "python", "python3", or "python2". (Bug#70722)
Eli Zaretskii [Sat, 11 May 2024 09:16:48 +0000 (12:16 +0300)]
Fix Rmail summary by thread
* lisp/mail/rmailsum.el (rmail-summary-by-thread): Use value of
'rmail-total-messages' local to 'rmail-buffer'. Patch by Andrea
Monaco <andrea.monaco@autistici.org>.
Po Lu [Sat, 11 May 2024 06:38:54 +0000 (14:38 +0800)]
Improve documentation of p-s-p-scroll-down-page
* lisp/pixel-scroll.el
(pixel-scroll-precision-scroll-down-page): Document unit in
which the height of the window is measured, and what manner of
height applies. Reported by Eli Zaretskii <eliz@gnu.org>.
Eric Abrahamsen [Fri, 10 May 2024 19:38:57 +0000 (12:38 -0700)]
Update gnus-draft-check-draft-articles to use find-buffer-visiting
* lisp/gnus/gnus-draft.el (gnus-draft-check-draft-articles): Don't loop
through all the buffers; this removes the need for the `file-remote-p'
check. Also give the user some nicer feedback about what's going on.
Eric Abrahamsen [Fri, 10 May 2024 15:49:57 +0000 (08:49 -0700)]
Remove extra message-set-auto-save-file-name call in Gnus drafts
Bug#70579
* lisp/gnus/gnus-draft.el (gnus-draft-setup): This function is already
being called as part of the message-mail -> message-mode call
above. Running it twice results in a jump in assigned article numbers,
and the corresponding active value of the drafts group.
Juri Linkov [Fri, 10 May 2024 16:45:21 +0000 (19:45 +0300)]
Support customization of sorting order for Imenu completion candidates
* lisp/imenu.el (imenu--completion-buffer):
Set completion-extra-properties to '(:category imenu).
(imenu--flatten-index-alist): Use imenu--subalist-p to handle
newer format (INDEX-NAME INDEX-POSITION FUNCTION ARGUMENTS...)
as well (bug#70846).
Eli Zaretskii [Fri, 10 May 2024 12:56:30 +0000 (15:56 +0300)]
Fix 'dictionary-tooltip-mode'
* lisp/tooltip.el (tooltip-event-buffer): Make sure 'posn-window'
returns a window before calling 'window-buffer'.
* lisp/net/dictionary.el (dictionary-default-dictionary)
(dictionary-tooltip-dictionary): Doc fixes.
(dictionary-tooltip-dictionary): Change default value to t, which
means the same dictionary as 'dictionary-default-dictionary'.
(dictionary-do-search): If NOMATCHING is non-nil, do not insert
anything into the current buffer, as that is unexpected when
showing definitions in tooltips.
(dictionary-word-at-mouse-event): Be defensive about the values
returned by 'tooltip-event-buffer' and 'posn-point': they can be
unexpected when the mouse pointer is on the tool bar or mode line
etc.
(dictionary-display-tooltip): Ignore errors in this function.
(dictionary-tooltip-mode): Ignore mouse-movement events on tool
bar and tab-bar.
(dictionary-dictionaries): Decode the server response to present
dictionaries in human-readable form. Document in the doc string
the format of the return value.
Juri Linkov [Fri, 10 May 2024 06:52:09 +0000 (09:52 +0300)]
* lisp/imenu.el (imenu-flatten): New defcustom (bug#70846).
(imenu-level-separator): Adjust the docstring.
(imenu--flatten-index-alist): New function revived
from the initial implementation of this package.
(imenu-choose-buffer-index): Use imenu--flatten-index-alist
when imenu-flatten is non-nil.
(imenu-buffer-menubar): Remove obsolete variable.
Po Lu [Fri, 10 May 2024 03:01:29 +0000 (11:01 +0800)]
Fix bug#70856
* lisp/pixel-scroll.el (pixel-scroll-precision-scroll-down)
(pixel-scroll-precision-scroll-up): Apply finer threshold for
the minimum unit of scrolling.
(pixel-scroll-precision-scroll-down-page): Document true
restrictions on DELTA. (bug#70856)
Andrew G Cohen [Sun, 7 Apr 2024 23:36:17 +0000 (07:36 +0800)]
Don't limit gnus thread searches to a single message
* lisp/gnus/gnus-search.el (gnus-search-single-p): Searches for a
single message id finish after finding this one message; thread searches
continue until all messages are found.
Paul Eggert [Thu, 9 May 2024 19:24:18 +0000 (12:24 -0700)]
Improve static checking when using upcoming GCC 13.3
* src/lisp.h: In GCC 13.3 and later, do not ignore
-Wanalyzer-allocation-size.
* src/marker.c: In GCC 13.3 and later, do not ignore
-Wanalyzer-deref-before-check.
The issue was that the function always returned nil because
the closing parentheses were in the wrong position. This
meant that the function couldn't give back the data it was
supposed to, making the whole srecode system not work
properly.
By moving the parentheses to the correct place, the function
now returns a hash table with all the templates it finds.
* lisp/cedet/srecode/find.el (srecode-all-template-hash):
Adjusted the position of closing parentheses so that the mhash
variable is returned correctly. (Bug#70765)