1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00

(c-mode-map): Add menu bar menu.

This commit is contained in:
Richard M. Stallman 1994-01-02 21:51:47 +00:00
parent c3a3ebc910
commit 885020c535

View File

@ -33,11 +33,9 @@
"Abbrev table in use in C mode.")
(define-abbrev-table 'c-mode-abbrev-table ())
(defvar c-mode-map ()
(defvar c-mode-map (make-sparse-keymap)
"Keymap used in C mode.")
(if c-mode-map
()
(setq c-mode-map (make-sparse-keymap))
(define-key c-mode-map "{" 'electric-c-brace)
(define-key c-mode-map "}" 'electric-c-brace)
(define-key c-mode-map ";" 'electric-c-semi)
@ -54,6 +52,28 @@
(define-key c-mode-map "\177" 'backward-delete-char-untabify)
(define-key c-mode-map "\t" 'c-indent-command))
(define-key c-mode-map [menu-bar] (make-sparse-keymap))
(define-key c-mode-map [menu-bar c]
(cons "C" (make-sparse-keymap "C")))
(define-key c-mode-map [menu-bar c indent-exp]
'("Indent Expression" . indent-c-exp))
(define-key c-mode-map [menu-bar c indent-line]
'("Indent Line" . c-indent-command))
(define-key c-mode-map [menu-bar c fill]
'("Fill Comment Paragraph" . c-fill-paragraph))
(define-key c-mode-map [menu-bar c up]
'("Up Conditional" . c-up-conditional))
(define-key c-mode-map [menu-bar c backward]
'("Backward Conditional" . c-backward-conditional))
(define-key c-mode-map [menu-bar c forward]
'("Forward Conditional" . c-forward-conditional))
(define-key c-mode-map [menu-bar c backward-stmt]
'("Backward Statement" . c-beginning-of-statement))
(define-key c-mode-map [menu-bar c forward-stmt]
'("Forward Statement" . c-end-of-statement))
;; cmacexp is lame because it uses no preprocessor symbols.
;; It isn't very extensible either -- hardcodes /lib/cpp.
(autoload 'c-macro-expand "cmacexp"