Fix printing of C-@ in `describe-fontset'
* lisp/international/mule-diag.el (mule--kbd-at): New function (bug#17836). (print-fontset-element): Use it to get multi-key things correct.
This commit is contained in:
parent
13fdded2c1
commit
ac2cecbd83
1 changed files with 15 additions and 2 deletions
|
@ -862,15 +862,28 @@ The IGNORED argument is ignored."
|
|||
|
||||
(defvar mule--print-opened)
|
||||
|
||||
(defun mule--kbd-at (point)
|
||||
(save-excursion
|
||||
(goto-char point)
|
||||
(elt
|
||||
(kbd (buffer-substring
|
||||
(point)
|
||||
(progn
|
||||
;; Might be a space, in which case we want it.
|
||||
(if (zerop (skip-chars-forward "^ "))
|
||||
(1+ (point))
|
||||
(point)))))
|
||||
0)))
|
||||
|
||||
(defun print-fontset-element (val)
|
||||
;; VAL has this format:
|
||||
;; ((REQUESTED-FONT-NAME OPENED-FONT-NAME ...) ...)
|
||||
;; CHAR RANGE is already inserted. Get character codes from
|
||||
;; the current line.
|
||||
(beginning-of-line)
|
||||
(let ((from (following-char))
|
||||
(let ((from (mule--kbd-at (point)))
|
||||
(to (if (looking-at "[^.]*[.]* ")
|
||||
(char-after (match-end 0)))))
|
||||
(mule--kbd-at (match-end 0)))))
|
||||
(if (re-search-forward "[ \t]*$" nil t)
|
||||
(delete-region (match-beginning 0) (match-end 0)))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue