From 7b0216fbc0a1051e6f3bee5bf6c2435b2b3a1ddf Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Tue, 14 Jul 2020 03:12:06 +0300 Subject: Improve documentation of "C-u C-x =" * doc/emacs/mule.texi (International Chars): Update the composition information displayed by "C-u C-x =". (Bug#42256) --- lisp/descr-text.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/descr-text.el b/lisp/descr-text.el index 4de1a7b7005..6246f59d495 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el @@ -775,7 +775,7 @@ The character information includes: (setq glyph (lgstring-glyph gstring from))) (insert (format " %S\n" glyph)) (setq from (1+ from))) - (insert "from these character(s):\n") + (insert "from these characters:\n") (dotimes (i (lgstring-char-len gstring)) (let ((char (lgstring-char gstring i))) (insert (format " %c (#x%x) %s\n" -- cgit v1.2.3 From 36e6019034ab5af18f634644187c75863ef6ca80 Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Tue, 14 Jul 2020 13:49:34 +0100 Subject: Consistently stylize eldoc as ElDoc in more prose This fixes new occurrences of "Eldoc" since emacs-27. * doc/lispref/modes.texi (Major Mode Conventions): * etc/NEWS: * lisp/descr-text.el (describe-char-eldoc): * lisp/emacs-lisp/eldoc.el (eldoc-echo-area-use-multiline-p) (eldoc-prefer-doc-buffer, eldoc--documentation-strategy-defcustom): Consistently capitalize eldoc as ElDoc rather than Eldoc in documentation and commentary. --- doc/lispref/modes.texi | 2 +- etc/NEWS | 2 +- lisp/descr-text.el | 2 +- lisp/emacs-lisp/eldoc.el | 12 ++++++------ 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'lisp') diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 17e96079ab9..33a07c9fb4d 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -469,7 +469,7 @@ variable @code{imenu-generic-expression}, for the two variables @code{imenu-create-index-function} (@pxref{Imenu}). @item -The mode can tell Eldoc mode how to retrieve different types of +The mode can tell ElDoc mode how to retrieve different types of documentation for whatever is at point, by adding one or more buffer-local entries to the special hook @code{eldoc-documentation-functions}. diff --git a/etc/NEWS b/etc/NEWS index e55f57e01af..2afd4dee34f 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -263,7 +263,7 @@ obsolete. *** 'eldoc-echo-area-use-multiline-p' is now handled by ElDoc. The user option 'eldoc-echo-area-use-multiline-p' is now handled -by the Eldoc library itself. Functions in +by the ElDoc library itself. Functions in 'eldoc-documentation-functions' don't need to worry about consulting it when producing a doc string. diff --git a/lisp/descr-text.el b/lisp/descr-text.el index 6246f59d495..5cbdf444cf9 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el @@ -950,7 +950,7 @@ This function can be used as a value of ;; instead of returning a string tailored here for the echo area ;; exclusively, we could call the (now unused) argument ;; _CALLBACK with hints on how to shorten the string if needed, - ;; or with multiple usable strings which Eldoc picks according + ;; or with multiple usable strings which ElDoc picks according ;; to its space contraints. (describe-char-eldoc--format ch diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index 1dd0ea2942d..1a009bdefac 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -92,7 +92,7 @@ echo area must be resized to fit. If value is a number (integer or floating point), it has the semantics of `max-mini-window-height', constraining the resizing -for Eldoc purposes only. +for ElDoc purposes only. Any resizing respects `max-mini-window-height'. @@ -112,9 +112,9 @@ single line of display in the echo area." line" truncate-sym-name-if-fit))) (defcustom eldoc-prefer-doc-buffer nil - "Prefer Eldoc's documentation buffer if it is showing in some frame. + "Prefer ElDoc's documentation buffer if it is showing in some frame. If this variable's value is t and a piece of documentation needs -to be truncated to fit in the echo area, do so if Eldoc's +to be truncated to fit in the echo area, do so if ElDoc's documentation buffer is not already showing, since the buffer always holds the full documentation." :type 'boolean) @@ -539,11 +539,11 @@ Meant as a value for `eldoc-documentation-strategy'." (if (stringp str) (funcall callback str)) nil)))) -;; JT@2020-07-10: Eldoc is pre-loaded, so in in Emacs < 28 we can't +;; JT@2020-07-10: ElDoc is pre-loaded, so in Emacs < 28 we can't ;; make the "old" `eldoc-documentation-function' point to the new ;; `eldoc-documentation-strategy', so we do the reverse. This allows -;; for Eldoc to be loaded in those older Emacs versions and work with -;; whomever (major-modes, extensions, ueser) sets one of the other +;; for ElDoc to be loaded in those older Emacs versions and work with +;; whomever (major-modes, extensions, user) sets one or the other ;; variable. (defmacro eldoc--documentation-strategy-defcustom (main secondary value docstring &rest more) -- cgit v1.2.3 From 363f1d4d5e836d0b95242d5fa8b7f32af3411419 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Wed, 15 Jul 2020 02:19:49 +0300 Subject: Improve display of composed character names in "C-u C-x =" on GUI frames * lisp/descr-text.el (describe-char): On GUI frames, display the Unicode names of really composed characters only (Bug#42256) --- lisp/descr-text.el | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'lisp') diff --git a/lisp/descr-text.el b/lisp/descr-text.el index 5cbdf444cf9..be5e01435a7 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el @@ -775,13 +775,16 @@ The character information includes: (setq glyph (lgstring-glyph gstring from))) (insert (format " %S\n" glyph)) (setq from (1+ from))) - (insert "from these characters:\n") - (dotimes (i (lgstring-char-len gstring)) - (let ((char (lgstring-char gstring i))) - (insert (format " %c (#x%x) %s\n" - char char - (get-char-code-property - char 'name)))))) + (when (and (stringp (car composition)) + (string-match "\"\\([^\"]+\\)\"" (car composition))) + (insert "with these character(s):\n") + (let ((chars (match-string 1 (car composition)))) + (dotimes (i (length chars)) + (let ((char (aref chars i))) + (insert (format " %c (#x%x) %s\n" + char char + (get-char-code-property + char 'name)))))))) ;; TTY frame: show composition in terms of characters. (insert " by these characters:\n") (while (and (<= from to) -- cgit v1.2.3 From c2ef4a13c0cfb44a950fc32e3103952bb8e52772 Mon Sep 17 00:00:00 2001 From: Jonas Bernoulli Date: Tue, 18 Feb 2020 16:45:34 +0100 Subject: * lisp/epa.el (epa-faces): Move definition. Previously option `epa-mail-aliases' was the only option that was defined right after the group `epa-faces' and right before all the faces. Now it is defined with all the other options and thus before the definition of the `epa-faces' group, which it does not belong to. --- lisp/epa.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lisp') diff --git a/lisp/epa.el b/lisp/epa.el index 8ec42187358..0dd1cff4652 100644 --- a/lisp/epa.el +++ b/lisp/epa.el @@ -56,11 +56,6 @@ If neither t nor nil, ask user for confirmation." :type 'integer :group 'epa) -(defgroup epa-faces nil - "Faces for epa-mode." - :version "23.1" - :group 'epa) - (defcustom epa-mail-aliases nil "Alist of aliases of email addresses that stand for encryption keys. Each element is a list of email addresses (ALIAS EXPANSIONS...). @@ -76,6 +71,11 @@ The command `epa-mail-encrypt' uses this." :group 'epa :version "24.4") +(defgroup epa-faces nil + "Faces for epa-mode." + :version "23.1" + :group 'epa) + (defface epa-validity-high '((default :weight bold) (((class color) (background dark)) :foreground "PaleTurquoise")) -- cgit v1.2.3 From bb6fe683a29e832886292bf89ebb2c1f861f355b Mon Sep 17 00:00:00 2001 From: Jonas Bernoulli Date: Tue, 18 Feb 2020 16:49:19 +0100 Subject: Add all epa faces to epa-faces Custom group `epa-validity-face-alist' isn't actually a face but belongs in that group anyway. * lisp/epa.el (epa-field-name, epa-field-body) (epa-validity-face-alist): Add to epa-faces Custom group. --- lisp/epa.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lisp') diff --git a/lisp/epa.el b/lisp/epa.el index 0dd1cff4652..40b3861ea87 100644 --- a/lisp/epa.el +++ b/lisp/epa.el @@ -117,13 +117,15 @@ The command `epa-mail-encrypt' uses this." '((default :weight bold) (((class color) (background dark)) :foreground "PaleTurquoise")) "Face for the name of the attribute field." - :group 'epa) + :version "28.1" + :group 'epa-faces) (defface epa-field-body '((default :slant italic) (((class color) (background dark)) :foreground "turquoise")) "Face for the body of the attribute field." - :group 'epa) + :version "28.1" + :group 'epa-faces) (defcustom epa-validity-face-alist '((unknown . epa-validity-disabled) @@ -138,8 +140,9 @@ The command `epa-mail-encrypt' uses this." (full . epa-validity-high) (ultimate . epa-validity-high)) "An alist mapping validity values to faces." + :version "28.1" :type '(repeat (cons symbol face)) - :group 'epa) + :group 'epa-faces) (defvar epa-font-lock-keywords '(("^\\*" -- cgit v1.2.3 From da6edafcb138ade46358a8c24ece8f3fca6e801a Mon Sep 17 00:00:00 2001 From: Jonas Bernoulli Date: Tue, 18 Feb 2020 16:53:34 +0100 Subject: * lisp/epg-config.el (epg-config--make-gpg-configuration): Fix indentation. --- lisp/epg-config.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lisp') diff --git a/lisp/epg-config.el b/lisp/epg-config.el index daa9a5abd17..1c429246529 100644 --- a/lisp/epg-config.el +++ b/lisp/epg-config.el @@ -202,13 +202,13 @@ version requirement is met." (cond ((eq type 'group) (if (string-match "\\`\\([^:]+\\):" args) - (setq groups - (cons (cons (downcase (match-string 1 args)) - (delete "" (split-string - (substring args - (match-end 0)) - ";"))) - groups)) + (setq groups + (cons (cons (downcase (match-string 1 args)) + (delete "" (split-string + (substring args + (match-end 0)) + ";"))) + groups)) (if epg-debug (message "Invalid group configuration: %S" args)))) ((memq type '(pubkey cipher digest compress)) -- cgit v1.2.3 From 0e2af5cc3726d6e661f0f396a843185326ed5e7d Mon Sep 17 00:00:00 2001 From: Jonas Bernoulli Date: Tue, 18 Feb 2020 16:59:00 +0100 Subject: Improve and add doc-strings * lisp/epa-file.el (epa-file-select-keys): lisp/epa-hook.el (epa-file-name-regexp): lisp/epa.el (epa-exit-buffer): Improve doc-string. * lisp/epa-hook.el (epa-file-name-regexp-update): Add doc-string. --- lisp/epa-file.el | 4 ++-- lisp/epa-hook.el | 11 +++++++---- lisp/epa.el | 3 +-- 3 files changed, 10 insertions(+), 8 deletions(-) (limited to 'lisp') diff --git a/lisp/epa-file.el b/lisp/epa-file.el index dedf20b0d77..22c3dc1146b 100644 --- a/lisp/epa-file.el +++ b/lisp/epa-file.el @@ -40,9 +40,9 @@ Note that this option has no effect if you use GnuPG 2.0." (defcustom epa-file-select-keys nil "Control whether or not to pop up the key selection dialog. -If t, always asks user to select recipients. +If t, always ask user to select recipients. If nil, query user only when `epa-file-encrypt-to' is not set. -If neither t nor nil, doesn't ask user. In this case, symmetric +If neither t nor nil, don't ask user. In this case, symmetric encryption is used." :type '(choice (const :tag "Ask always" t) (const :tag "Ask when recipients are not set" nil) diff --git a/lisp/epa-hook.el b/lisp/epa-hook.el index d424e7a9faf..a86f23eb688 100644 --- a/lisp/epa-hook.el +++ b/lisp/epa-hook.el @@ -35,10 +35,10 @@ (defcustom epa-file-name-regexp (purecopy "\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'") "Regexp which matches filenames to be encrypted with GnuPG. -If you set this outside Custom while epa-file is already enabled, you -have to call `epa-file-name-regexp-update' after setting it to -properly update file-name-handler-alist. Setting this through Custom -does that automatically." +If you set this outside Custom while epa-file is already enabled, +you have to call `epa-file-name-regexp-update' after setting it +to properly update `file-name-handler-alist'. Setting this +through Custom does that automatically." :type 'regexp :group 'epa-file :set 'epa-file--file-name-regexp-set) @@ -72,6 +72,9 @@ May either be a string or a list of strings.") (list epa-file-name-regexp nil 'epa-file)) (defun epa-file-name-regexp-update () + "Update `file-name-handler-alist' after configuring outside Custom. +After setting `epa-file-name-regexp-update' outside the Custom +interface, update `file-name-handler-alist'." (interactive) (unless (equal (car epa-file-handler) epa-file-name-regexp) (setcar epa-file-handler epa-file-name-regexp))) diff --git a/lisp/epa.el b/lisp/epa.el index 40b3861ea87..e4d1e5b4148 100644 --- a/lisp/epa.el +++ b/lisp/epa.el @@ -335,8 +335,7 @@ If ARG is non-nil, mark the key." (epa-mark-key (not arg))) (defun epa-exit-buffer () - "Exit the current buffer. -`epa-exit-buffer-function' is called if it is set." + "Exit the current buffer using `epa-exit-buffer-function'." (interactive) (funcall epa-exit-buffer-function)) -- cgit v1.2.3 From e78c15acf679259caea6566446f61966cea032aa Mon Sep 17 00:00:00 2001 From: Jonas Bernoulli Date: Tue, 18 Feb 2020 16:58:31 +0100 Subject: Drop unnecessary backward compatibility aliases We can assume that `encode-coding-string' and `decode-coding-string' are available; they were added in 1997. * lisp/epa-file.el (epa-file--encode-coding-string) (epa-file--decode-coding-string): Remove aliases for encode-coding-string and decode-coding-string. * lisp/epa-file.el (epa-file-write-region): Use encode-coding-string instead of removed epa-file--encode-coding-string. --- lisp/epa-file.el | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) (limited to 'lisp') diff --git a/lisp/epa-file.el b/lisp/epa-file.el index 22c3dc1146b..14a169b13fb 100644 --- a/lisp/epa-file.el +++ b/lisp/epa-file.el @@ -51,16 +51,6 @@ encryption is used." (defvar epa-file-passphrase-alist nil) -(eval-and-compile - (if (fboundp 'encode-coding-string) - (defalias 'epa-file--encode-coding-string 'encode-coding-string) - (defalias 'epa-file--encode-coding-string 'identity))) - -(eval-and-compile - (if (fboundp 'decode-coding-string) - (defalias 'epa-file--decode-coding-string 'decode-coding-string) - (defalias 'epa-file--decode-coding-string 'identity))) - (defun epa-file-passphrase-callback-function (context key-id file) (if (and epa-file-cache-passphrase-for-symmetric-encryption (eq key-id 'SYM)) @@ -236,11 +226,7 @@ encryption is used." (setq file (expand-file-name file)) (let* ((coding-system (or coding-system-for-write (if (fboundp 'select-safe-coding-system) - ;; This is needed since Emacs 22 has - ;; no-conversion setting for *.gpg in - ;; `auto-coding-alist'. - (let ((buffer-file-name - (file-name-sans-extension file))) + (let ((buffer-file-name file)) (select-safe-coding-system (point-min) (point-max))) buffer-file-coding-system))) @@ -266,7 +252,7 @@ encryption is used." (epg-encrypt-string context (if (stringp start) - (epa-file--encode-coding-string start coding-system) + (encode-coding-string start coding-system) (unless start (setq start (point-min) end (point-max))) @@ -280,8 +266,8 @@ encryption is used." ;; decrypted contents. (format-encode-buffer (with-current-buffer buffer buffer-file-format)) - (epa-file--encode-coding-string (buffer-string) - coding-system))) + (encode-coding-string (buffer-string) + coding-system))) (if (or (eq epa-file-select-keys t) (and (null epa-file-select-keys) (not (local-variable-p 'epa-file-encrypt-to -- cgit v1.2.3 From 9f82622d33b7e7558d1ba30781b209b599b24b52 Mon Sep 17 00:00:00 2001 From: Jonas Bernoulli Date: Tue, 18 Feb 2020 16:56:16 +0100 Subject: Cosmetic changes to epa libraries These changes make the code more readable. * lisp/epa-dired.el (epa-dired-do-decrypt, epa-dired-do-verify) (epa-dired-do-sign, epa-dired-do-encrypt): Use dolist instead of while. * lisp/epa-file.el (epa-file-passphrase-callback-function): Set just one variable per setq call. --- lisp/epa-dired.el | 44 ++++++++++++++++++-------------------------- lisp/epa-file.el | 4 ++-- 2 files changed, 20 insertions(+), 28 deletions(-) (limited to 'lisp') diff --git a/lisp/epa-dired.el b/lisp/epa-dired.el index f601d426566..9269ea97070 100644 --- a/lisp/epa-dired.el +++ b/lisp/epa-dired.el @@ -29,48 +29,40 @@ (defun epa-dired-do-decrypt () "Decrypt marked files." (interactive) - (let ((file-list (dired-get-marked-files))) - (while file-list - (epa-decrypt-file (expand-file-name (car file-list))) - (setq file-list (cdr file-list))) - (revert-buffer))) + (dolist (file (dired-get-marked-files)) + (epa-decrypt-file (expand-file-name file))) + (revert-buffer)) ;;;###autoload (defun epa-dired-do-verify () "Verify marked files." (interactive) - (let ((file-list (dired-get-marked-files))) - (while file-list - (epa-verify-file (expand-file-name (car file-list))) - (setq file-list (cdr file-list))))) + (dolist (file (dired-get-marked-files)) + (epa-verify-file (expand-file-name file)))) ;;;###autoload (defun epa-dired-do-sign () "Sign marked files." (interactive) - (let ((file-list (dired-get-marked-files))) - (while file-list - (epa-sign-file - (expand-file-name (car file-list)) - (epa-select-keys (epg-make-context) "Select keys for signing. + (dolist (file (dired-get-marked-files)) + (epa-sign-file + (expand-file-name file) + (epa-select-keys (epg-make-context) "Select keys for signing. If no one is selected, default secret key is used. " - nil t) - (y-or-n-p "Make a detached signature? ")) - (setq file-list (cdr file-list))) - (revert-buffer))) + nil t) + (y-or-n-p "Make a detached signature? "))) + (revert-buffer)) ;;;###autoload (defun epa-dired-do-encrypt () "Encrypt marked files." (interactive) - (let ((file-list (dired-get-marked-files))) - (while file-list - (epa-encrypt-file - (expand-file-name (car file-list)) - (epa-select-keys (epg-make-context) "Select recipients for encryption. -If no one is selected, symmetric encryption will be performed. ")) - (setq file-list (cdr file-list))) - (revert-buffer))) + (dolist (file (dired-get-marked-files)) + (epa-encrypt-file + (expand-file-name file) + (epa-select-keys (epg-make-context) "Select recipients for encryption. +If no one is selected, symmetric encryption will be performed. "))) + (revert-buffer)) (provide 'epa-dired) diff --git a/lisp/epa-file.el b/lisp/epa-file.el index 14a169b13fb..20043a9eae4 100644 --- a/lisp/epa-file.el +++ b/lisp/epa-file.el @@ -61,8 +61,8 @@ encryption is used." (or (copy-sequence (cdr entry)) (progn (unless entry - (setq entry (list file) - epa-file-passphrase-alist + (setq entry (list file)) + (setq epa-file-passphrase-alist (cons entry epa-file-passphrase-alist))) (setq passphrase (epa-passphrase-callback-function context -- cgit v1.2.3 From 8c60347780937f87f8b5ff78e3e9372821cad89a Mon Sep 17 00:00:00 2001 From: Jonas Bernoulli Date: Mon, 20 Apr 2020 23:33:44 +0200 Subject: epa-key-list-mode-map: Use widget-keymap as parent keymap Normally when one keymap is to be treated as the parent of another, then that relationship is setup once at the time when the child is being defined, i.e. at birth. For some reason, this was not done here; instead `widget-keymap' is set as `epa-key-list-mode-map' parent every time the former is setup to be used as the local map. This appears to be a mistake. A few other keymaps use `widget-keymap' as their parent and in those cases the relationship is established just once. `epa-key-list-mode-map' is the only exception and because there is absolutely no indication that that is justified, we remove this inconsistency. * lisp/epa.el (epa-key-list-mode-map): Set the parent of this keymap while defining it. * lisp/epa.el (epa--list-keys): Do not set the parent of the local keymap here. --- lisp/epa.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/epa.el b/lisp/epa.el index e4d1e5b4148..8f45c667b9a 100644 --- a/lisp/epa.el +++ b/lisp/epa.el @@ -188,6 +188,7 @@ You should bind this variable with `let', but do not set it globally.") (defvar epa-key-list-mode-map (let ((keymap (make-sparse-keymap)) (menu-map (make-sparse-keymap))) + (set-keymap-parent keymap widget-keymap) (define-key keymap "m" 'epa-mark-key) (define-key keymap "u" 'epa-unmark-key) (define-key keymap "d" 'epa-decrypt-file) @@ -399,8 +400,7 @@ DOC is documentation text to insert at the start." (goto-char point)) (epa--insert-keys (epg-list-keys context name secret)) - (widget-setup) - (set-keymap-parent (current-local-map) widget-keymap)) + (widget-setup)) (make-local-variable 'epa-list-keys-arguments) (setq epa-list-keys-arguments (list name secret)) (goto-char (point-min)) -- cgit v1.2.3 From 58bec884d5a911690c2f8e0ecca6a487bd2c9fe0 Mon Sep 17 00:00:00 2001 From: Jonas Bernoulli Date: Mon, 20 Apr 2020 23:31:16 +0200 Subject: * lisp/epa.el (epa-show-key): New command. Users can move in `epa-key-list-mode' buffers using either `next-line'/`previous-line' or `widget-forward'/`widget-backward'. When using the first set of commands, then the cursor stays in the current column and that normally is the first column. The key widgets do not begin until the third character of their respective lines. All `epa' commands work regardless of whether the cursor is on the widget or before them. The `epa-show-key' command did not exist until now because the `widget-button-press' already performs its task. But because the widgets don't span complete lines we actually need this command too. --- lisp/epa.el | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/epa.el b/lisp/epa.el index 8f45c667b9a..3c7dd8309a8 100644 --- a/lisp/epa.el +++ b/lisp/epa.el @@ -25,7 +25,9 @@ (require 'epg) (require 'font-lock) (require 'widget) -(eval-when-compile (require 'wid-edit)) +(eval-when-compile + (require 'subr-x) + (require 'wid-edit)) (require 'derived) (defgroup epa nil @@ -189,6 +191,7 @@ You should bind this variable with `let', but do not set it globally.") (let ((keymap (make-sparse-keymap)) (menu-map (make-sparse-keymap))) (set-keymap-parent keymap widget-keymap) + (define-key keymap "\C-m" 'epa-show-key) (define-key keymap "m" 'epa-mark-key) (define-key keymap "u" 'epa-unmark-key) (define-key keymap "d" 'epa-decrypt-file) @@ -502,6 +505,14 @@ If SECRET is non-nil, list secret keys instead of public keys." (let ((keys (epg-list-keys context names secret))) (epa--select-keys prompt keys))) +(defun epa-show-key () + "Show a key on the current line." + (interactive) + (if-let ((key (get-text-property (point) 'epa-key))) + (save-selected-window + (epa--show-key key)) + (error "No key on this line"))) + (defun epa--show-key (key) (let* ((primary-sub-key (car (epg-key-sub-key-list key))) (entry (assoc (epg-sub-key-id primary-sub-key) -- cgit v1.2.3 From 85eaa8373bb0a91013af503d333670788ec5a956 Mon Sep 17 00:00:00 2001 From: Tassilo Horn Date: Wed, 15 Jul 2020 18:58:57 +0200 Subject: ;Fix eldoc regression bug#42365 --- lisp/emacs-lisp/eldoc.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index 1a009bdefac..510dff9ed0b 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -495,8 +495,9 @@ Honor most of `eldoc-echo-area-use-multiline-p'." (substitute-command-keys "\\[eldoc-doc-buffer]"))))))))) ((= available 1) ;; Truncate "brutally." ; FIXME: use `eldoc-prefer-doc-buffer' too? - (truncate-string-to-width - (buffer-substring (point-min) (line-end-position 1)) width))))) + (with-current-buffer (eldoc-doc-buffer) + (truncate-string-to-width + (buffer-substring (point-min) (line-end-position 1)) width)))))) (when echo-area-message (eldoc--message echo-area-message)))))) -- cgit v1.2.3