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/descr-text.el') 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/descr-text.el') 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/descr-text.el') 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