diff options
| author | Dan Nicolaescu | 2008-04-02 06:38:24 +0000 |
|---|---|---|
| committer | Dan Nicolaescu | 2008-04-02 06:38:24 +0000 |
| commit | f03562ec775a5db02e3e31185691dff5c589c31a (patch) | |
| tree | 5f77fad16650522461bdf5dcb477a38561d4771a | |
| parent | b23718189da61726e84127c557532cbec1c1bc2b (diff) | |
| download | emacs-f03562ec775a5db02e3e31185691dff5c589c31a.tar.gz emacs-f03562ec775a5db02e3e31185691dff5c589c31a.zip | |
(sh-mode-map): Rename the menu. Add :help.
Add menu entries corresponding to all the key bindings.
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/progmodes/sh-script.el | 77 |
2 files changed, 72 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 41da617afb7..7a7f15493f4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,13 @@ | |||
| 1 | 2008-04-02 Dan Nicolaescu <dann@ics.uci.edu> | 1 | 2008-04-02 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 2 | ||
| 3 | * progmodes/sh-script.el (sh-mode-map): Rename the menu. Add :help. | ||
| 4 | Add menu entries corresponding to all the key bindings. | ||
| 5 | |||
| 6 | * emacs-lisp/debug.el (debugger-mode-map): | ||
| 7 | * textmodes/conf-mode.el (conf-mode-map): Add a menu. | ||
| 8 | (conf-align-assignments): Only work on the region if it is active. | ||
| 9 | (conf-quote-normal): Use when instead of if. Remove redundant test. | ||
| 10 | |||
| 3 | * emacs-lisp/lisp-mode.el (emacs-lisp-mode-map): Add menu entries | 11 | * emacs-lisp/lisp-mode.el (emacs-lisp-mode-map): Add menu entries |
| 4 | for tracing and re-builder. | 12 | for tracing and re-builder. |
| 5 | 13 | ||
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 1fae4ef98c7..05c88339ec9 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el | |||
| @@ -446,7 +446,7 @@ This is buffer-local in every such buffer.") | |||
| 446 | 446 | ||
| 447 | (defvar sh-mode-map | 447 | (defvar sh-mode-map |
| 448 | (let ((map (make-sparse-keymap)) | 448 | (let ((map (make-sparse-keymap)) |
| 449 | (menu-map (make-sparse-keymap "Insert"))) | 449 | (menu-map (make-sparse-keymap))) |
| 450 | (define-key map "\C-c(" 'sh-function) | 450 | (define-key map "\C-c(" 'sh-function) |
| 451 | (define-key map "\C-c\C-w" 'sh-while) | 451 | (define-key map "\C-c\C-w" 'sh-while) |
| 452 | (define-key map "\C-c\C-u" 'sh-until) | 452 | (define-key map "\C-c\C-u" 'sh-until) |
| @@ -483,17 +483,68 @@ This is buffer-local in every such buffer.") | |||
| 483 | (define-key map "\C-c:" 'sh-set-shell) | 483 | (define-key map "\C-c:" 'sh-set-shell) |
| 484 | (define-key map [remap backward-sentence] 'sh-beginning-of-command) | 484 | (define-key map [remap backward-sentence] 'sh-beginning-of-command) |
| 485 | (define-key map [remap forward-sentence] 'sh-end-of-command) | 485 | (define-key map [remap forward-sentence] 'sh-end-of-command) |
| 486 | (define-key map [menu-bar insert] (cons "Insert" menu-map)) | 486 | (define-key map [menu-bar sh-script] (cons "Sh-Script" menu-map)) |
| 487 | (define-key menu-map [sh-while] '("While Loop" . sh-while)) | 487 | (define-key menu-map [sh-learn-buffer-indent] |
| 488 | (define-key menu-map [sh-until] '("Until Loop" . sh-until)) | 488 | '(menu-item "Learn buffer indentation" sh-learn-buffer-indent |
| 489 | (define-key menu-map [sh-tmp-file] '("Temporary File" . sh-tmp-file)) | 489 | :help "Learn how to indent the buffer the way it currently is.")) |
| 490 | (define-key menu-map [sh-select] '("Select Statement" . sh-select)) | 490 | (define-key menu-map [sh-learn-line-indent] |
| 491 | (define-key menu-map [sh-repeat] '("Repeat Loop" . sh-repeat)) | 491 | '(menu-item "Learn line indentation" sh-learn-line-indent |
| 492 | (define-key menu-map [sh-getopts] '("Options Loop" . sh-while-getopts)) | 492 | :help "Learn how to indent a line as it currently is indented")) |
| 493 | (define-key menu-map [sh-indexed-loop] '("Indexed Loop" . sh-indexed-loop)) | 493 | (define-key menu-map [sh-show-indent] |
| 494 | (define-key menu-map [sh-if] '("If Statement" . sh-if)) | 494 | '(menu-item "Show indentation" sh-show-indent |
| 495 | (define-key menu-map [sh-for] '("For Loop" . sh-for)) | 495 | :help "Set the indentation for the current line")) |
| 496 | (define-key menu-map [sh-case] '("Case Statement" . sh-case)) | 496 | (define-key menu-map [sh-set-indent] |
| 497 | '(menu-item "Set indentation" sh-set-indent | ||
| 498 | :help "Set the indentation for the current line")) | ||
| 499 | |||
| 500 | (define-key menu-map [sh-s0] '("--")) | ||
| 501 | ;; Insert | ||
| 502 | (define-key menu-map [sh-function] | ||
| 503 | '(menu-item "Function..." sh-function | ||
| 504 | :help "Insert a function definition")) | ||
| 505 | (define-key menu-map [sh-add] | ||
| 506 | '(menu-item "Addition..." sh-add | ||
| 507 | :help "Insert an addition of VAR and prefix DELTA for Bourne (type) shell")) | ||
| 508 | (define-key menu-map [sh-until] | ||
| 509 | '(menu-item "Until Loop" sh-until | ||
| 510 | :help "Insert an until loop")) | ||
| 511 | (define-key menu-map [sh-repeat] | ||
| 512 | '(menu-item "Repeat Loop" sh-repeat | ||
| 513 | :help "Insert a repeat loop definition")) | ||
| 514 | (define-key menu-map [sh-while] | ||
| 515 | '(menu-item "While Loop" sh-while | ||
| 516 | :help "Insert a while loop")) | ||
| 517 | (define-key menu-map [sh-getopts] | ||
| 518 | '(menu-item "Options Loop" sh-while-getopts | ||
| 519 | :help "Insert a while getopts loop.")) | ||
| 520 | (define-key menu-map [sh-indexed-loop] | ||
| 521 | '(menu-item "Indexed Loop" sh-indexed-loop | ||
| 522 | :help "Insert an indexed loop from 1 to n.")) | ||
| 523 | (define-key menu-map [sh-select] | ||
| 524 | '(menu-item "Select Statement" sh-select | ||
| 525 | :help "Insert a select statement ")) | ||
| 526 | (define-key menu-map [sh-if] | ||
| 527 | '(menu-item "If Statement" sh-if | ||
| 528 | :help "Insert an if statement")) | ||
| 529 | (define-key menu-map [sh-for] | ||
| 530 | '(menu-item "For Loop" sh-for | ||
| 531 | :help "Insert a for loop")) | ||
| 532 | (define-key menu-map [sh-case] | ||
| 533 | '(menu-item "Case Statement" sh-case | ||
| 534 | :help "Insert a case/switch statement")) | ||
| 535 | (define-key menu-map [sh-s1] '("--")) | ||
| 536 | (define-key menu-map [sh-exec] | ||
| 537 | '(menu-item "Execute region" sh-execute-region | ||
| 538 | :help "Pass optional header and region to a subshell for noninteractive execution")) | ||
| 539 | (define-key menu-map [sh-exec-interpret] | ||
| 540 | '(menu-item "Execute script..." executable-interpret | ||
| 541 | :help "Run script with user-specified args, and collect output in a buffer")) | ||
| 542 | (define-key menu-map [sh-set-shell] | ||
| 543 | '(menu-item "Set shell type..." sh-set-shell | ||
| 544 | :help "Set this buffer's shell to SHELL (a string)")) | ||
| 545 | (define-key menu-map [sh-backslash-region] | ||
| 546 | '(menu-item "Backslash region" sh-backslash-region | ||
| 547 | :help "Insert, align, or delete end-of-line backslashes on the lines in the region.")) | ||
| 497 | map) | 548 | map) |
| 498 | "Keymap used in Shell-Script mode.") | 549 | "Keymap used in Shell-Script mode.") |
| 499 | 550 | ||
| @@ -815,7 +866,7 @@ See `sh-feature'.") | |||
| 815 | (:foreground "yellow" :weight bold)) | 866 | (:foreground "yellow" :weight bold)) |
| 816 | (((class color) | 867 | (((class color) |
| 817 | (background light)) | 868 | (background light)) |
| 818 | (:foreground "tan" )) | 869 | (:foreground "tan1" )) |
| 819 | (t | 870 | (t |
| 820 | (:weight bold))) | 871 | (:weight bold))) |
| 821 | "Face to show a here-document" | 872 | "Face to show a here-document" |