[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp ChangeLog international/quail.el
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] emacs/lisp ChangeLog international/quail.el |
Date: |
Fri, 21 Nov 2008 20:40:18 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Stefan Monnier <monnier> 08/11/21 20:40:18
Modified files:
lisp : ChangeLog
lisp/international: quail.el
Log message:
(quail-indent-to): New function.
(quail-completion-1, quail-completion-list-translations)
(quail-insert-decode-map): Use it to improve alignment.
(quail-build-decode-map): Don't ignore latin-1 chars.
(quail-help): Increase the max decode-map size so that even the TeX map
gets printed.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.14824&r2=1.14825
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/international/quail.el?cvsroot=emacs&r1=1.166&r2=1.167
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.14824
retrieving revision 1.14825
diff -u -b -r1.14824 -r1.14825
--- ChangeLog 21 Nov 2008 19:29:16 -0000 1.14824
+++ ChangeLog 21 Nov 2008 20:40:08 -0000 1.14825
@@ -1,5 +1,12 @@
2008-11-21 Stefan Monnier <address@hidden>
+ * international/quail.el (quail-indent-to): New function.
+ (quail-completion-1, quail-completion-list-translations)
+ (quail-insert-decode-map): Use it to improve alignment.
+ (quail-build-decode-map): Don't ignore latin-1 chars.
+ (quail-help): Increase the max decode-map size so that even the TeX map
+ gets printed.
+
* bookmark.el (bookmark-get-bookmark): Add `noerror' arg.
Signal error for invalid bookmark.
(bookmark-get-bookmark-record): Undo last change.
Index: international/quail.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/international/quail.el,v
retrieving revision 1.166
retrieving revision 1.167
diff -u -b -r1.166 -r1.167
--- international/quail.el 29 Oct 2008 01:44:48 -0000 1.166
+++ international/quail.el 21 Nov 2008 20:40:16 -0000 1.167
@@ -136,6 +136,14 @@
(defsubst quail-name ()
"Return the name of the current Quail package."
(nth 0 quail-current-package))
+
+(defun quail-indent-to (col)
+ (indent-to col)
+ (let ((end (point)))
+ (save-excursion
+ (unless (zerop (skip-chars-backward "\t "))
+ (put-text-property (point) end 'display (list 'space :align-to
col))))))
+
;;;###autoload
(defun quail-title ()
"Return the title of the current Quail package."
@@ -990,13 +998,12 @@
(if no-decode-map
(setq annotations (delete no-decode-map annotations)
no-decode-map (cdr no-decode-map)))
- ;; Convert the remaining annoations to property list PROPS.
- (while annotations
+ ;; Convert the remaining annotations to property list PROPS.
+ (dolist (annotation annotations)
(setq props
- (cons (car (car annotations))
- (cons (cdr (car annotations))
- props))
- annotations (cdr annotations)))
+ (cons (car annotation)
+ (cons (cdr annotation)
+ props))))
(setq l (cdr l))))
;; Process the remaining arguments one by one.
(if append
@@ -2171,7 +2178,7 @@
(defun quail-completion-1 (key map indent)
"List all completions of KEY in MAP with indentation INDENT."
(let ((len (length key)))
- (indent-to indent)
+ (quail-indent-to indent)
(insert key ":")
(if (and (symbolp map) (fboundp map))
(setq map (funcall map key len)))
@@ -2218,7 +2225,7 @@
(when (zerop (% i 10))
(when (>= i 10)
(insert "\n")
- (indent-to indent))
+ (quail-indent-to indent))
(insert (format "(%d/%d)" (1+ (/ i 10)) (1+ (/ len 10)))))
;; We show the last digit of FROM while converting
;; 0,1,..,9 to 1,2,..,0.
@@ -2296,7 +2303,7 @@
elt)
(cond ((integerp translation)
;; Accept only non-ASCII chars not listed in IGNORES.
- (when (and (> translation 255) (not (memq translation ignores)))
+ (when (and (> translation 127) (not (memq translation ignores)))
(setcdr decode-map
(cons (cons key translation) (cdr decode-map)))
(setq num (1+ num))))
@@ -2306,7 +2313,7 @@
(mapc (function (lambda (x)
;; Accept only non-ASCII chars not
;; listed in IGNORES.
- (if (and (if (integerp x) (> x 255)
+ (if (and (if (integerp x) (> x 127)
(string-match-p "[^[:ascii:]]" x))
(not (member x ignores)))
(setq multibyte t))))
@@ -2374,9 +2381,9 @@
(if (> (% (length single-list) cols) 0)
(setq rows (1+ rows)))
(insert "key")
- (indent-to (1+ single-key-width))
+ (quail-indent-to (1+ single-key-width))
(insert "char")
- (indent-to (1+ col-width))
+ (quail-indent-to (1+ col-width))
(insert "[type a key sequence to insert the corresponding character]\n")
(setq pos (point))
(insert-char ?\n (+ rows 2))
@@ -2387,14 +2394,16 @@
(when (= (% row rows) 0)
(goto-char pos)
(setq col (+ col col-width))
- (move-to-column col t)
+ (move-to-column col)
+ (quail-indent-to col)
(insert-char ?- single-key-width)
(insert ? )
(insert-char ?- single-trans-width)
(forward-line 1))
- (move-to-column col t)
+ (move-to-column col)
+ (quail-indent-to col)
(insert (car elt))
- (indent-to (+ col single-key-width 1))
+ (quail-indent-to (+ col single-key-width 1))
(insert (cdr elt))
(forward-line 1)
(setq row (1+ row)))
@@ -2402,14 +2411,14 @@
(when multiple-list
(insert "key")
- (indent-to (1+ multiple-key-width))
+ (quail-indent-to (1+ multiple-key-width))
(insert "character(s) [type a key (sequence) and select one from the
list]\n")
(insert-char ?- multiple-key-width)
(insert " ------------\n")
(while multiple-list
(setq elt (car multiple-list) multiple-list (cdr multiple-list))
(insert (car elt))
- (indent-to multiple-key-width)
+ (quail-indent-to multiple-key-width)
(if (vectorp (cdr elt))
(mapc (function
(lambda (x)
@@ -2417,7 +2426,7 @@
(string-width x))))
(when (> (+ (current-column) 1 width) window-width)
(insert "\n")
- (indent-to multiple-key-width))
+ (quail-indent-to multiple-key-width))
(insert " " x))))
(cdr elt))
(insert " " (cdr elt)))
@@ -2518,7 +2527,10 @@
(let ((decode-map (list 'decode-map))
elt pos num)
(setq num (quail-build-decode-map (list (quail-map)) "" decode-map
- 0 512 done-list))
+ ;; We used to use 512 here, but
+ ;; TeX has more than 1000 and
+ ;; it's good to see the list.
+ 0 5120 done-list))
(when (> num 0)
(insert "
KEY SEQUENCE
@@ -2549,7 +2561,7 @@
(run-hooks 'temp-buffer-show-hook)))))
(defun quail-help-insert-keymap-description (keymap &optional header)
- (let (pos1 pos2 eol)
+ (let (pos1 pos2)
(setq pos1 (point))
(if header
(insert header))
- [Emacs-diffs] emacs/lisp ChangeLog international/quail.el,
Stefan Monnier <=