1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-03 10:31:37 -08:00

* bindings.el (mode-line-remote): Add mouse-face. Improve tooltip.

(standard-mode-line-position): Add mouse-face.

* progmodes/compile.el (compilation-menu-map):
(compilation-mode-map):
* progmodes/grep.el (grep-mode-map):  Add :help.

* emacs-lisp/lisp-mode.el (emacs-lisp-mode-map): Define and
initialize in one step.  Add :help.  Use :enable to activate menu
items. Show the key binding for edebug-defun.
(lisp-interaction-mode-map): Add a menu.

* term.el (term-mode-map): Define and initialize in one step.

* ediff-init.el (ediff-color-display-p): Simplify.
(Xor): Remove unused function.
(ediff-with-syntax-table): Simplify for emacs.

* ediff-hook.el (menu-bar-ediff-menu): Don't depend on the
menu-bar being loaded, it always is.
This commit is contained in:
Dan Nicolaescu 2008-03-05 04:09:24 +00:00
parent 3405b0dfde
commit 388059876a
8 changed files with 197 additions and 135 deletions

View file

@ -1,3 +1,26 @@
2008-03-05 Dan Nicolaescu <dann@ics.uci.edu>
* bindings.el (mode-line-remote): Add mouse-face. Improve tooltip.
(standard-mode-line-position): Add mouse-face.
* progmodes/compile.el (compilation-menu-map):
(compilation-mode-map):
* progmodes/grep.el (grep-mode-map): Add :help.
* emacs-lisp/lisp-mode.el (emacs-lisp-mode-map): Define and
initialize in one step. Add :help. Use :enable to activate menu
items. Show the key binding for edebug-defun.
(lisp-interaction-mode-map): Add a menu.
* term.el (term-mode-map): Define and initialize in one step.
* ediff-init.el (ediff-color-display-p): Simplify.
(Xor): Remove unused function.
(ediff-with-syntax-table): Simplify for emacs.
* ediff-hook.el (menu-bar-ediff-menu): Don't depend on the
menu-bar being loaded, it always is.
2008-03-05 Glenn Morris <rgm@gnu.org> 2008-03-05 Glenn Morris <rgm@gnu.org>
* textmodes/tex-mode.el (tex-mode): Suppress warning about * textmodes/tex-mode.el (tex-mode): Suppress warning about

View file

@ -260,15 +260,16 @@ Normally nil in most modes, since there is no process to display.")
(defvar mode-line-remote (defvar mode-line-remote
(list (propertize (list (propertize
"%1@" "%1@"
'mouse-face 'mode-line-highlight
'help-echo (purecopy (lambda (window object point) 'help-echo (purecopy (lambda (window object point)
(format "%s" (format "%s"
(save-selected-window (save-selected-window
(select-window window) (select-window window)
(concat (concat
(if (file-remote-p default-directory) (if (file-remote-p default-directory)
"Remote: " "Current directory is remote: "
"Local: ") "Current directory is local: ")
default-directory))))))) default-directory)))))))
"Mode-line flag to show if default-directory for current buffer is remote.") "Mode-line flag to show if default-directory for current buffer is remote.")
(make-variable-buffer-local 'mode-line-remote) (make-variable-buffer-local 'mode-line-remote)
@ -370,6 +371,7 @@ mouse-3: Toggle minor modes"
`((-3 ,(propertize `((-3 ,(propertize
"%p" "%p"
'local-map mode-line-column-line-number-mode-map 'local-map mode-line-column-line-number-mode-map
'mouse-face 'mode-line-highlight
;; XXX needs better description ;; XXX needs better description
'help-echo "Size indication mode\n\ 'help-echo "Size indication mode\n\
mouse-1: Display Line and Column Mode Menu")) mouse-1: Display Line and Column Mode Menu"))
@ -377,6 +379,7 @@ mouse-1: Display Line and Column Mode Menu"))
(8 ,(propertize (8 ,(propertize
" of %I" " of %I"
'local-map mode-line-column-line-number-mode-map 'local-map mode-line-column-line-number-mode-map
'mouse-face 'mode-line-highlight
;; XXX needs better description ;; XXX needs better description
'help-echo "Size indication mode\n\ 'help-echo "Size indication mode\n\
mouse-1: Display Line and Column Mode Menu"))) mouse-1: Display Line and Column Mode Menu")))
@ -385,17 +388,20 @@ mouse-1: Display Line and Column Mode Menu")))
(10 ,(propertize (10 ,(propertize
" (%l,%c)" " (%l,%c)"
'local-map mode-line-column-line-number-mode-map 'local-map mode-line-column-line-number-mode-map
'mouse-face 'mode-line-highlight
'help-echo "Line number and Column number\n\ 'help-echo "Line number and Column number\n\
mouse-1: Display Line and Column Mode Menu")) mouse-1: Display Line and Column Mode Menu"))
(6 ,(propertize (6 ,(propertize
" L%l" " L%l"
'local-map mode-line-column-line-number-mode-map 'local-map mode-line-column-line-number-mode-map
'mouse-face 'mode-line-highlight
'help-echo "Line Number\n\ 'help-echo "Line Number\n\
mouse-1: Display Line and Column Mode Menu")))) mouse-1: Display Line and Column Mode Menu"))))
((column-number-mode ((column-number-mode
(5 ,(propertize (5 ,(propertize
" C%c" " C%c"
'local-map mode-line-column-line-number-mode-map 'local-map mode-line-column-line-number-mode-map
'mouse-face 'mode-line-highlight
'help-echo "Column number\n\ 'help-echo "Column number\n\
mouse-1: Display Line and Column Mode Menu")))))))) mouse-1: Display Line and Column Mode Menu"))))))))

View file

@ -154,9 +154,8 @@
(not (featurep 'ediff-hook))) (not (featurep 'ediff-hook)))
(ediff-xemacs-init-menus))) (ediff-xemacs-init-menus)))
;; Emacs--only if menu-bar is loaded ;; Emacs
(if (featurep 'menu-bar) (progn
(progn
;; initialize menu bar keymaps ;; initialize menu bar keymaps
(defvar menu-bar-ediff-misc-menu (defvar menu-bar-ediff-misc-menu
(make-sparse-keymap "Ediff Miscellanea")) (make-sparse-keymap "Ediff Miscellanea"))
@ -251,8 +250,6 @@
'("Customize Ediff" . ediff-customize)) '("Customize Ediff" . ediff-customize))
(define-key menu-bar-ediff-misc-menu [ediff-doc] (define-key menu-bar-ediff-misc-menu [ediff-doc]
'("Ediff Manual" . ediff-documentation)) '("Ediff Manual" . ediff-documentation))
)
) ; emacs case ) ; emacs case
) ; ediff-cond-compile-for-xemacs-or-emacs ) ; ediff-cond-compile-for-xemacs-or-emacs

View file

@ -795,12 +795,9 @@ to temp files when Ediff needs to find fine differences."
(defun ediff-color-display-p () (defun ediff-color-display-p ()
(condition-case nil (condition-case nil
(ediff-cond-compile-for-xemacs-or-emacs (if (featurep 'xemacs)
(eq (device-class (selected-device)) 'color) ; xemacs form (eq (device-class (selected-device)) 'color) ; xemacs form
(if (fboundp 'display-color-p) ; emacs form (display-color-p)) ; emacs form
(display-color-p)
(x-display-color-p))
)
(error nil))) (error nil)))
@ -1822,9 +1819,6 @@ Unless optional argument INPLACE is non-nil, return a new string."
"Don't skip difference regions." "Don't skip difference regions."
nil) nil)
(defsubst Xor (a b)
(or (and a (not b)) (and (not a) b)))
(defsubst ediff-message-if-verbose (string &rest args) (defsubst ediff-message-if-verbose (string &rest args)
(if ediff-verbose-p (if ediff-verbose-p
(apply 'message string args))) (apply 'message string args)))
@ -1846,22 +1840,23 @@ Unless optional argument INPLACE is non-nil, return a new string."
(convert-standard-filename fname) (convert-standard-filename fname)
fname)) fname))
(if (featurep 'emacs)
(if (fboundp 'with-syntax-table)
(defalias 'ediff-with-syntax-table 'with-syntax-table) (defalias 'ediff-with-syntax-table 'with-syntax-table)
;; stolen from subr.el in emacs 21 (if (fboundp 'with-syntax-table)
(defmacro ediff-with-syntax-table (table &rest body) (defalias 'ediff-with-syntax-table 'with-syntax-table)
(let ((old-table (make-symbol "table")) ;; stolen from subr.el in emacs 21
(old-buffer (make-symbol "buffer"))) (defmacro ediff-with-syntax-table (table &rest body)
`(let ((,old-table (syntax-table)) (let ((old-table (make-symbol "table"))
(,old-buffer (current-buffer))) (old-buffer (make-symbol "buffer")))
(unwind-protect `(let ((,old-table (syntax-table))
(progn (,old-buffer (current-buffer)))
(set-syntax-table (copy-syntax-table ,table)) (unwind-protect
,@body) (progn
(save-current-buffer (set-syntax-table (copy-syntax-table ,table))
(set-buffer ,old-buffer) ,@body)
(set-syntax-table ,old-table))))))) (save-current-buffer
(set-buffer ,old-buffer)
(set-syntax-table ,old-table))))))))
(provide 'ediff-init) (provide 'ediff-init)

View file

@ -37,6 +37,8 @@
(defvar lisp-mode-abbrev-table nil) (defvar lisp-mode-abbrev-table nil)
(define-abbrev-table 'lisp-mode-abbrev-table ())
(defvar emacs-lisp-mode-syntax-table (defvar emacs-lisp-mode-syntax-table
(let ((table (make-syntax-table))) (let ((table (make-syntax-table)))
(let ((i 0)) (let ((i 0))
@ -88,8 +90,6 @@
(modify-syntax-entry ?| "\" 23bn" table) (modify-syntax-entry ?| "\" 23bn" table)
table)) table))
(define-abbrev-table 'lisp-mode-abbrev-table ())
(defvar lisp-imenu-generic-expression (defvar lisp-imenu-generic-expression
(list (list
(list nil (list nil
@ -270,41 +270,52 @@
map) map)
"Keymap for commands shared by all sorts of Lisp modes.") "Keymap for commands shared by all sorts of Lisp modes.")
(defvar emacs-lisp-mode-map () (defvar emacs-lisp-mode-map
(let ((map (make-sparse-keymap "Emacs-Lisp"))
(menu-map (make-sparse-keymap "Emacs-Lisp")))
(set-keymap-parent map lisp-mode-shared-map)
(define-key map "\e\t" 'lisp-complete-symbol)
(define-key map "\e\C-x" 'eval-defun)
(define-key map "\e\C-q" 'indent-pp-sexp)
(define-key map [menu-bar emacs-lisp] (cons "Emacs-Lisp" menu-map))
(define-key menu-map [edebug-defun]
'(menu-item "Instrument Function for Debugging" edebug-defun
:help "Evaluate the top level form point is in, stepping through with Edebug"
:keys "C-u C-M-x"))
(define-key menu-map [byte-recompile]
'(menu-item "Byte-recompile Directory..." byte-recompile-directory
:help "Recompile every `.el' file in DIRECTORY that needs recompilation"))
(define-key menu-map [emacs-byte-compile-and-load]
'(menu-item "Byte-compile And Load" emacs-lisp-byte-compile-and-load
:help "Byte-compile the current file (if it has changed), then load compiled code"))
(define-key menu-map [byte-compile]
'(menu-item "Byte-compile This File" emacs-lisp-byte-compile
:help "Byte compile the file containing the current buffer"))
(define-key menu-map [separator-eval] '("--"))
(define-key menu-map [eval-buffer]
'(menu-item "Evaluate Buffer" eval-buffer
:help "Execute the current buffer as Lisp code"))
(define-key menu-map [eval-region]
'(menu-item "Evaluate Region" eval-region
:help "Execute the region as Lisp code"
:enable (mark-active)))
(define-key menu-map [eval-sexp]
'(menu-item "Evaluate Last S-expression" eval-last-sexp
:help "Evaluate sexp before point; print value in minibuffer"))
(define-key menu-map [separator-format] '("--"))
(define-key menu-map [comment-region]
'(menu-item "Comment Out Region" comment-region
:help "Comment or uncomment each line in the region"
:enable (mark-active)))
(define-key menu-map [indent-region]
'(menu-item "Indent Region" indent-region
:help "Indent each nonblank line in the region"
:enable (mark-active)))
(define-key menu-map [indent-line] '("Indent Line" . lisp-indent-line))
map)
"Keymap for Emacs Lisp mode. "Keymap for Emacs Lisp mode.
All commands in `lisp-mode-shared-map' are inherited by this map.") All commands in `lisp-mode-shared-map' are inherited by this map.")
(if emacs-lisp-mode-map
()
(let ((map (make-sparse-keymap "Emacs-Lisp")))
(setq emacs-lisp-mode-map (make-sparse-keymap))
(set-keymap-parent emacs-lisp-mode-map lisp-mode-shared-map)
(define-key emacs-lisp-mode-map "\e\t" 'lisp-complete-symbol)
(define-key emacs-lisp-mode-map "\e\C-x" 'eval-defun)
(define-key emacs-lisp-mode-map "\e\C-q" 'indent-pp-sexp)
(define-key emacs-lisp-mode-map [menu-bar] (make-sparse-keymap))
(define-key emacs-lisp-mode-map [menu-bar emacs-lisp]
(cons "Emacs-Lisp" map))
(define-key map [edebug-defun]
'("Instrument Function for Debugging" . edebug-defun))
(define-key map [byte-recompile]
'("Byte-recompile Directory..." . byte-recompile-directory))
(define-key map [emacs-byte-compile-and-load]
'("Byte-compile And Load" . emacs-lisp-byte-compile-and-load))
(define-key map [byte-compile]
'("Byte-compile This File" . emacs-lisp-byte-compile))
(define-key map [separator-eval] '("--"))
(define-key map [eval-buffer] '("Evaluate Buffer" . eval-buffer))
(define-key map [eval-region] '("Evaluate Region" . eval-region))
(define-key map [eval-sexp] '("Evaluate Last S-expression" . eval-last-sexp))
(define-key map [separator-format] '("--"))
(define-key map [comment-region] '("Comment Out Region" . comment-region))
(define-key map [indent-region] '("Indent Region" . indent-region))
(define-key map [indent-line] '("Indent Line" . lisp-indent-line))
(put 'eval-region 'menu-enable 'mark-active)
(put 'comment-region 'menu-enable 'mark-active)
(put 'indent-region 'menu-enable 'mark-active)))
(defun emacs-lisp-byte-compile () (defun emacs-lisp-byte-compile ()
"Byte compile the file containing the current buffer." "Byte compile the file containing the current buffer."
(interactive) (interactive)
@ -417,12 +428,30 @@ if that value is non-nil."
(error "Process lisp does not exist")) (error "Process lisp does not exist"))
(defvar lisp-interaction-mode-map (defvar lisp-interaction-mode-map
(let ((map (make-sparse-keymap))) (let ((map (make-sparse-keymap))
(menu-map (make-sparse-keymap "Lisp-Interaction")))
(set-keymap-parent map lisp-mode-shared-map) (set-keymap-parent map lisp-mode-shared-map)
(define-key map "\e\C-x" 'eval-defun) (define-key map "\e\C-x" 'eval-defun)
(define-key map "\e\C-q" 'indent-pp-sexp) (define-key map "\e\C-q" 'indent-pp-sexp)
(define-key map "\e\t" 'lisp-complete-symbol) (define-key map "\e\t" 'lisp-complete-symbol)
(define-key map "\n" 'eval-print-last-sexp) (define-key map "\n" 'eval-print-last-sexp)
(define-key map [menu-bar lisp-interaction] (cons "Lisp-Interaction" menu-map))
(define-key menu-map [eval-defun]
'(menu-item "Evaluate Defun" eval-defun
:help "Evaluate the top-level form containing point, or after point"))
(define-key menu-map [eval-print-last-sexp]
'(menu-item "Evaluate and print" eval-print-last-sexp
:help "Evaluate sexp before point; print value into current buffer"))
(define-key map [edebug-defun-lisp-interaction]
'(menu-item "Instrument Function for Debugging" edebug-defun
:help "Evaluate the top level form point is in, stepping through with Edebug"
:keys "C-u C-M-x"))
(define-key menu-map [indent-pp-sexp]
'(menu-item "Indent or Pretty-Print" indent-pp-sexp
:help "Indent each line of the list starting just after point, or prettyprint it"))
(define-key menu-map [lisp-complete-symbol]
'(menu-item "Complete Lisp Symbol" lisp-complete-symbol
:help "Perform completion on Lisp symbol preceding point"))
map) map)
"Keymap for Lisp Interaction mode. "Keymap for Lisp Interaction mode.
All commands in `lisp-mode-shared-map' are inherited by this map.") All commands in `lisp-mode-shared-map' are inherited by this map.")

View file

@ -1291,7 +1291,8 @@ Returns the compilation buffer created."
(let ((map (make-sparse-keymap "Errors")) (let ((map (make-sparse-keymap "Errors"))
(opt-map (make-sparse-keymap "Skip"))) (opt-map (make-sparse-keymap "Skip")))
(define-key map [stop-subjob] (define-key map [stop-subjob]
'("Stop Compilation" . kill-compilation)) '(menu-item "Stop Compilation" kill-compilation
:help "Kill the process made by the M-x compile or M-x grep commands"))
(define-key map [compilation-mode-separator3] (define-key map [compilation-mode-separator3]
'("----" . nil)) '("----" . nil))
(define-key map [compilation-next-error-follow-minor-mode] (define-key map [compilation-next-error-follow-minor-mode]
@ -1325,11 +1326,14 @@ Returns the compilation buffer created."
(define-key map [compilation-mode-separator2] (define-key map [compilation-mode-separator2]
'("----" . nil)) '("----" . nil))
(define-key map [compilation-first-error] (define-key map [compilation-first-error]
'("First Error" . first-error)) '(menu-item "First Error" first-error
:help "Restart at the first error, visit corresponding source code"))
(define-key map [compilation-previous-error] (define-key map [compilation-previous-error]
'("Previous Error" . previous-error)) '(menu-item "Previous Error" previous-error
:help "Visit previous `next-error' message and corresponding source code"))
(define-key map [compilation-next-error] (define-key map [compilation-next-error]
'("Next Error" . next-error)) '(menu-item "Next Error" next-error
:help "Visit next `next-error' message and corresponding source code"))
map)) map))
(defvar compilation-minor-mode-map (defvar compilation-minor-mode-map
@ -1400,11 +1404,14 @@ Returns the compilation buffer created."
(define-key map [menu-bar compilation compilation-separator2] (define-key map [menu-bar compilation compilation-separator2]
'("----" . nil)) '("----" . nil))
(define-key map [menu-bar compilation compilation-grep] (define-key map [menu-bar compilation compilation-grep]
'("Search Files (grep)..." . grep)) '(menu-item "Search Files (grep)..." grep
:help "Run grep, with user-specified args, and collect output in a buffer"))
(define-key map [menu-bar compilation compilation-recompile] (define-key map [menu-bar compilation compilation-recompile]
'("Recompile" . recompile)) '(menu-item "Recompile" recompile
:help "Re-compile the program including the current buffer"))
(define-key map [menu-bar compilation compilation-compile] (define-key map [menu-bar compilation compilation-compile]
'("Compile..." . compile)) '(menu-item "Compile..." compile
:help "Compile the program including the current buffer. Default: run `make'"))
map) map)
"Keymap for compilation log buffers. "Keymap for compilation log buffers.
`compilation-minor-mode-map' is a parent of this.") `compilation-minor-mode-map' is a parent of this.")

View file

@ -197,25 +197,31 @@ See `compilation-error-screen-columns'"
(cons "Grep" (make-sparse-keymap "Grep"))) (cons "Grep" (make-sparse-keymap "Grep")))
(define-key map [menu-bar grep compilation-kill-compilation] (define-key map [menu-bar grep compilation-kill-compilation]
'("Kill Grep" . kill-compilation)) '(menu-item "Kill Grep" kill-compilation
(define-key map [menu-bar grep compilation-separator2] :help "Kill the currently running grep process"))
'("----" . nil)) (define-key map [menu-bar grep compilation-separator2] '("----"))
(define-key map [menu-bar grep compilation-compile] (define-key map [menu-bar grep compilation-compile]
'("Compile..." . compile)) '(menu-item "Compile..." compile
:help "Compile the program including the current buffer. Default: run `make'"))
(define-key map [menu-bar grep compilation-grep] (define-key map [menu-bar grep compilation-grep]
'("Another grep..." . grep)) '(menu-item "Another grep..." grep
:help "Run grep, with user-specified args, and collect output in a buffer."))
(define-key map [menu-bar grep compilation-grep-find] (define-key map [menu-bar grep compilation-grep-find]
'("Recursive grep..." . grep-find)) '(menu-item "Recursive grep..." grep-find
:help "Run grep via find, with user-specified args"))
(define-key map [menu-bar grep compilation-recompile] (define-key map [menu-bar grep compilation-recompile]
'("Repeat grep" . recompile)) '(menu-item "Repeat grep" recompile
(define-key map [menu-bar grep compilation-separator2] :help "Run grep again"))
'("----" . nil)) (define-key map [menu-bar grep compilation-separator2] '("----"))
(define-key map [menu-bar grep compilation-first-error] (define-key map [menu-bar grep compilation-first-error]
'("First Match" . first-error)) '(menu-item "First Match" first-error
:help "Restart at the first match, visit corresponding location"))
(define-key map [menu-bar grep compilation-previous-error] (define-key map [menu-bar grep compilation-previous-error]
'("Previous Match" . previous-error)) '(menu-item "Previous Match" previous-error
:help "Visit the previous match and corresponding location"))
(define-key map [menu-bar grep compilation-next-error] (define-key map [menu-bar grep compilation-next-error]
'("Next Match" . next-error)) '(menu-item "Next Match" next-error
:help "Visit the next match and corresponding location"))
map) map)
"Keymap for grep buffers. "Keymap for grep buffers.
`compilation-minor-mode-map' is a cdr of this.") `compilation-minor-mode-map' is a cdr of this.")

View file

@ -621,7 +621,53 @@ executed once when the buffer is created."
:type 'hook :type 'hook
:group 'term) :group 'term)
(defvar term-mode-map nil) (defvar term-mode-map
(let ((map (make-sparse-keymap)))
(define-key map "\ep" 'term-previous-input)
(define-key map "\en" 'term-next-input)
(define-key map "\er" 'term-previous-matching-input)
(define-key map "\es" 'term-next-matching-input)
(unless (featurep 'xemacs)
(define-key map [?\A-\M-r]
'term-previous-matching-input-from-input)
(define-key map [?\A-\M-s] 'term-next-matching-input-from-input))
(define-key map "\e\C-l" 'term-show-output)
(define-key map "\C-m" 'term-send-input)
(define-key map "\C-d" 'term-delchar-or-maybe-eof)
(define-key map "\C-c\C-a" 'term-bol)
(define-key map "\C-c\C-u" 'term-kill-input)
(define-key map "\C-c\C-w" 'backward-kill-word)
(define-key map "\C-c\C-c" 'term-interrupt-subjob)
(define-key map "\C-c\C-z" 'term-stop-subjob)
(define-key map "\C-c\C-\\" 'term-quit-subjob)
(define-key map "\C-c\C-m" 'term-copy-old-input)
(define-key map "\C-c\C-o" 'term-kill-output)
(define-key map "\C-c\C-r" 'term-show-output)
(define-key map "\C-c\C-e" 'term-show-maximum-output)
(define-key map "\C-c\C-l" 'term-dynamic-list-input-ring)
(define-key map "\C-c\C-n" 'term-next-prompt)
(define-key map "\C-c\C-p" 'term-previous-prompt)
(define-key map "\C-c\C-d" 'term-send-eof)
(define-key map "\C-c\C-k" 'term-char-mode)
(define-key map "\C-c\C-j" 'term-line-mode)
(define-key map "\C-c\C-q" 'term-pager-toggle)
;; ;; completion:
;; (define-key map [menu-bar completion]
;; (cons "Complete" (make-sparse-keymap "Complete")))
;; (define-key map [menu-bar completion complete-expand]
;; '("Expand File Name" . term-replace-by-expanded-filename))
;; (define-key map [menu-bar completion complete-listing]
;; '("File Completion Listing" . term-dynamic-list-filename-completions))
;; (define-key map [menu-bar completion complete-file]
;; '("Complete File Name" . term-dynamic-complete-filename))
;; (define-key map [menu-bar completion complete]
;; '("Complete Before Point" . term-dynamic-complete))
;; ;; Put them in the menu bar:
;; (setq menu-bar-final-items (append '(terminal completion inout signals)
;; menu-bar-final-items))
map))
(defvar term-raw-map nil (defvar term-raw-map nil
"Keyboard map for sending characters directly to the inferior process.") "Keyboard map for sending characters directly to the inferior process.")
(defvar term-escape-char nil (defvar term-escape-char nil
@ -725,53 +771,6 @@ is buffer-local.")
[ "Enable paging" term-pager-toggle (not term-pager-count)] [ "Enable paging" term-pager-toggle (not term-pager-count)]
[ "Disable paging" term-pager-toggle term-pager-count]))) [ "Disable paging" term-pager-toggle term-pager-count])))
(unless term-mode-map
(setq term-mode-map (make-sparse-keymap))
(define-key term-mode-map "\ep" 'term-previous-input)
(define-key term-mode-map "\en" 'term-next-input)
(define-key term-mode-map "\er" 'term-previous-matching-input)
(define-key term-mode-map "\es" 'term-next-matching-input)
(unless (featurep 'xemacs)
(define-key term-mode-map [?\A-\M-r]
'term-previous-matching-input-from-input)
(define-key term-mode-map [?\A-\M-s] 'term-next-matching-input-from-input))
(define-key term-mode-map "\e\C-l" 'term-show-output)
(define-key term-mode-map "\C-m" 'term-send-input)
(define-key term-mode-map "\C-d" 'term-delchar-or-maybe-eof)
(define-key term-mode-map "\C-c\C-a" 'term-bol)
(define-key term-mode-map "\C-c\C-u" 'term-kill-input)
(define-key term-mode-map "\C-c\C-w" 'backward-kill-word)
(define-key term-mode-map "\C-c\C-c" 'term-interrupt-subjob)
(define-key term-mode-map "\C-c\C-z" 'term-stop-subjob)
(define-key term-mode-map "\C-c\C-\\" 'term-quit-subjob)
(define-key term-mode-map "\C-c\C-m" 'term-copy-old-input)
(define-key term-mode-map "\C-c\C-o" 'term-kill-output)
(define-key term-mode-map "\C-c\C-r" 'term-show-output)
(define-key term-mode-map "\C-c\C-e" 'term-show-maximum-output)
(define-key term-mode-map "\C-c\C-l" 'term-dynamic-list-input-ring)
(define-key term-mode-map "\C-c\C-n" 'term-next-prompt)
(define-key term-mode-map "\C-c\C-p" 'term-previous-prompt)
(define-key term-mode-map "\C-c\C-d" 'term-send-eof)
(define-key term-mode-map "\C-c\C-k" 'term-char-mode)
(define-key term-mode-map "\C-c\C-j" 'term-line-mode)
(define-key term-mode-map "\C-c\C-q" 'term-pager-toggle)
; ;; completion:
; (define-key term-mode-map [menu-bar completion]
; (cons "Complete" (make-sparse-keymap "Complete")))
; (define-key term-mode-map [menu-bar completion complete-expand]
; '("Expand File Name" . term-replace-by-expanded-filename))
; (define-key term-mode-map [menu-bar completion complete-listing]
; '("File Completion Listing" . term-dynamic-list-filename-completions))
; (define-key term-mode-map [menu-bar completion complete-file]
; '("Complete File Name" . term-dynamic-complete-filename))
; (define-key term-mode-map [menu-bar completion complete]
; '("Complete Before Point" . term-dynamic-complete))
; ;; Put them in the menu bar:
; (setq menu-bar-final-items (append '(terminal completion inout signals)
; menu-bar-final-items))
)
;; Menu bars: ;; Menu bars:
(unless (featurep 'xemacs) (unless (featurep 'xemacs)
;; terminal: ;; terminal: