changeset 75557:21cbf755a07c

(tutorial--detailed-help): Make the list of changed keys look nicer.
author Richard M. Stallman <rms@gnu.org>
date Tue, 30 Jan 2007 23:47:57 +0000
parents 04f23eb0c0ca
children f7b5b15084ef
files lisp/tutorial.el
diffstat 1 files changed, 10 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/tutorial.el	Tue Jan 30 23:15:06 2007 +0000
+++ b/lisp/tutorial.el	Tue Jan 30 23:47:57 2007 +0000
@@ -334,10 +334,11 @@
 				tutorial--default-keys)))))
         (when changed-keys
           (insert
-           "The following key bindings used in the tutorial had been changed
-from the Emacs default in the " (buffer-name tutorial-buffer) " buffer:\n\n" )
-          (let ((frm "   %-9s %-27s %-11s %s\n"))
-            (insert (format frm "Key" "Standard Binding" "Is Now On" "Remark")))
+           "The following key bindings used in the tutorial have been changed
+from the Emacs default:\n\n" )
+          (let ((frm "   %-14s %-27s %-16s\n"))
+            (insert (format frm
+			    "Standard Key" "Command" "In Your Emacs")))
           (dolist (tk changed-keys)
             (let* ((def-fun     (nth 1 tk))
                    (key         (nth 0 tk))
@@ -354,25 +355,20 @@
                   (put-text-property 0 (length key-txt)
 				     'face 'tutorial-warning-face key-txt))
                 (insert "   " key-txt " ")
-                (setq tot-len (length key-txt))
-                (when (> 9 tot-len)
-                  (insert (make-string (- 9 tot-len) ?\s))
-                  (setq tot-len 9))
+		(indent-to 18)
                 ;; Insert a link describing the old binding:
                 (insert-button def-fun-txt
                                'value def-fun
                                'action
-                               (lambda(button) (interactive)
+                               (lambda (button) (interactive)
                                  (describe-function
                                   (button-get button 'value)))
                                'follow-link t)
-                (setq tot-len (+ tot-len (length def-fun-txt)))
-                (when (> 36 tot-len)
-                  (insert (make-string (- 36 tot-len) ?\s)))
+		(indent-to 45)
                 (when (listp where)
                   (setq where "list"))
                 ;; Tell where the old binding is now:
-                (insert (format " %-11s "
+                (insert (format " %-16s "
                                 (if (string= "" where)
                                     (format "M-x %s" def-fun-txt)
                                   where)))
@@ -381,7 +377,7 @@
                 ;; cua-mode replacements:
                 (insert-button (car remark)
                                'action
-                               (lambda(b) (interactive)
+                               (lambda (b) (interactive)
                                  (let ((value (button-get b 'value)))
                                    (tutorial--describe-nonstandard-key value)))
                                'value (cdr remark)