diff options
| author | Richard M. Stallman | 2007-01-30 23:47:57 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2007-01-30 23:47:57 +0000 |
| commit | 5a192d7c8ad3ac7c9e15bf08d3e7dd655533cfd2 (patch) | |
| tree | 18534b7b2950e5d1863b35362d8012c227238d93 /lisp/tutorial.el | |
| parent | aeae09e341e85c8a7919935349fad46a74cd5750 (diff) | |
| download | emacs-5a192d7c8ad3ac7c9e15bf08d3e7dd655533cfd2.tar.gz emacs-5a192d7c8ad3ac7c9e15bf08d3e7dd655533cfd2.zip | |
(tutorial--detailed-help): Make the list of changed keys look nicer.
Diffstat (limited to 'lisp/tutorial.el')
| -rw-r--r-- | lisp/tutorial.el | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/lisp/tutorial.el b/lisp/tutorial.el index c446400d906..f1da71a8e5d 100644 --- a/lisp/tutorial.el +++ b/lisp/tutorial.el | |||
| @@ -334,10 +334,11 @@ LEFT and RIGHT are the elements to compare." | |||
| 334 | tutorial--default-keys))))) | 334 | tutorial--default-keys))))) |
| 335 | (when changed-keys | 335 | (when changed-keys |
| 336 | (insert | 336 | (insert |
| 337 | "The following key bindings used in the tutorial had been changed | 337 | "The following key bindings used in the tutorial have been changed |
| 338 | from the Emacs default in the " (buffer-name tutorial-buffer) " buffer:\n\n" ) | 338 | from the Emacs default:\n\n" ) |
| 339 | (let ((frm " %-9s %-27s %-11s %s\n")) | 339 | (let ((frm " %-14s %-27s %-16s\n")) |
| 340 | (insert (format frm "Key" "Standard Binding" "Is Now On" "Remark"))) | 340 | (insert (format frm |
| 341 | "Standard Key" "Command" "In Your Emacs"))) | ||
| 341 | (dolist (tk changed-keys) | 342 | (dolist (tk changed-keys) |
| 342 | (let* ((def-fun (nth 1 tk)) | 343 | (let* ((def-fun (nth 1 tk)) |
| 343 | (key (nth 0 tk)) | 344 | (key (nth 0 tk)) |
| @@ -354,25 +355,20 @@ from the Emacs default in the " (buffer-name tutorial-buffer) " buffer:\n\n" ) | |||
| 354 | (put-text-property 0 (length key-txt) | 355 | (put-text-property 0 (length key-txt) |
| 355 | 'face 'tutorial-warning-face key-txt)) | 356 | 'face 'tutorial-warning-face key-txt)) |
| 356 | (insert " " key-txt " ") | 357 | (insert " " key-txt " ") |
| 357 | (setq tot-len (length key-txt)) | 358 | (indent-to 18) |
| 358 | (when (> 9 tot-len) | ||
| 359 | (insert (make-string (- 9 tot-len) ?\s)) | ||
| 360 | (setq tot-len 9)) | ||
| 361 | ;; Insert a link describing the old binding: | 359 | ;; Insert a link describing the old binding: |
| 362 | (insert-button def-fun-txt | 360 | (insert-button def-fun-txt |
| 363 | 'value def-fun | 361 | 'value def-fun |
| 364 | 'action | 362 | 'action |
| 365 | (lambda(button) (interactive) | 363 | (lambda (button) (interactive) |
| 366 | (describe-function | 364 | (describe-function |
| 367 | (button-get button 'value))) | 365 | (button-get button 'value))) |
| 368 | 'follow-link t) | 366 | 'follow-link t) |
| 369 | (setq tot-len (+ tot-len (length def-fun-txt))) | 367 | (indent-to 45) |
| 370 | (when (> 36 tot-len) | ||
| 371 | (insert (make-string (- 36 tot-len) ?\s))) | ||
| 372 | (when (listp where) | 368 | (when (listp where) |
| 373 | (setq where "list")) | 369 | (setq where "list")) |
| 374 | ;; Tell where the old binding is now: | 370 | ;; Tell where the old binding is now: |
| 375 | (insert (format " %-11s " | 371 | (insert (format " %-16s " |
| 376 | (if (string= "" where) | 372 | (if (string= "" where) |
| 377 | (format "M-x %s" def-fun-txt) | 373 | (format "M-x %s" def-fun-txt) |
| 378 | where))) | 374 | where))) |
| @@ -381,7 +377,7 @@ from the Emacs default in the " (buffer-name tutorial-buffer) " buffer:\n\n" ) | |||
| 381 | ;; cua-mode replacements: | 377 | ;; cua-mode replacements: |
| 382 | (insert-button (car remark) | 378 | (insert-button (car remark) |
| 383 | 'action | 379 | 'action |
| 384 | (lambda(b) (interactive) | 380 | (lambda (b) (interactive) |
| 385 | (let ((value (button-get b 'value))) | 381 | (let ((value (button-get b 'value))) |
| 386 | (tutorial--describe-nonstandard-key value))) | 382 | (tutorial--describe-nonstandard-key value))) |
| 387 | 'value (cdr remark) | 383 | 'value (cdr remark) |