;;; bindings.el --- define standard key bindings and some variables
;; Copyright (C) 1985, 1986, 1987, 1992, 1993, 1994, 1995, 1996, 1999,
-;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: internal
(push (cons eol (cons mnemonic desc)) mode-line-eol-desc-cache)
desc)))
+(defvar mode-line-client
+ `(""
+ (:propertize ("" (:eval (if (frame-parameter nil 'client) "@" "")))
+ help-echo "Emacsclient frame"))
+ "Mode-line control for identifying Emacsclient frames.")
+
(defvar mode-line-mule-info
`(""
(current-input-method
(make-variable-buffer-local 'mode-line-mule-info)
-(defvar mode-line-frame-identification '("-%F ")
+(defvar mode-line-frame-identification '(window-system " " "-%F ")
"Mode-line control to describe the current frame.")
(defvar mode-line-process nil "\
(defvar mode-line-minor-mode-keymap
(let ((map (make-sparse-keymap)))
+ (define-key map [mode-line down-mouse-1] 'mouse-minor-mode-menu)
(define-key map [mode-line mouse-2] 'mode-line-minor-mode-help)
(define-key map [mode-line down-mouse-3] 'mode-line-mode-menu-1)
(define-key map [header-line down-mouse-3] 'mode-line-mode-menu-1)
"%e"
(propertize "-" 'help-echo help-echo)
'mode-line-mule-info
+ 'mode-line-client
'mode-line-modified
'mode-line-remote
'mode-line-frame-identification
'("" mode-line-process)
`(:propertize ("" minor-mode-alist)
mouse-face mode-line-highlight
- help-echo "mouse-2: minor mode help, mouse-3: toggle minor modes"
+ help-echo "mouse-1: minor mode, mouse-2: minor mode help, mouse-3: toggle minor modes"
local-map ,mode-line-minor-mode-keymap)
(propertize "%n" 'help-echo "mouse-2: widen"
'mouse-face 'mode-line-highlight
'local-map (make-mode-line-mouse-map
'mouse-2 #'mode-line-widen))
(propertize ")%]--" 'help-echo help-echo)))
+
(standard-mode-line-position
`((-3 ,(propertize "%p" 'help-echo help-echo))
(size-indication-mode
(x-popup-menu event mode-line-mode-menu))
(defun mode-line-minor-mode-help (event)
- "Describe minor mode for EVENT occurred on minor modes area of the mode line."
+ "Describe minor mode for EVENT on minor modes area of the mode line."
(interactive "@e")
(let ((indicator (car (nth 4 (car (cdr event))))))
(describe-minor-mode-from-indicator indicator)))
(defvar minor-mode-alist nil "\
Alist saying how to show minor modes in the mode line.
Each element looks like (VARIABLE STRING);
-STRING is included in the mode line iff VARIABLE's value is non-nil.
+STRING is included in the mode line if VARIABLE's value is non-nil.
Actually, STRING need not be a string; any possible mode-line element
is okay. See `mode-line-format'.")
'(".elc" ".lof"
".glo" ".idx" ".lot"
;; TeX-related
- ".dvi" ".fmt" ".tfm" ".pdf"
+ ".fmt" ".tfm"
;; Java compiled
".class"
;; CLISP
(if (fboundp 'complete-tag)
(complete-tag)
;; Don't autoload etags if we have no tags table.
- (error (substitute-command-keys
+ (error "%s" (substitute-command-keys
"No tags table loaded; use \\[visit-tags-table] to load one")))))
;; Reduce total amount of space we must allocate during this function
(define-key global-map "\e\e\e" 'keyboard-escape-quit)
(define-key global-map "\C-g" 'keyboard-quit)
+;; Used to be in termdev.el: when using several terminals, make C-z
+;; suspend only the relevant terminal.
+(substitute-key-definition 'suspend-emacs 'suspend-frame global-map)
+
(define-key global-map "\C-j" 'newline-and-indent)
(define-key global-map "\C-m" 'newline)
(define-key global-map "\C-o" 'open-line)
;; Override the global binding (which calls indent-relative via
;; indent-for-tab-command). The alignment that indent-relative tries to
;; do doesn't make much sense here since the prompt messes it up.
- (define-key map "\t" 'self-insert-command))
+ (define-key map "\t" 'self-insert-command)
+ (define-key minibuffer-local-map [C-tab] 'file-cache-minibuffer-complete))
(define-key global-map "\C-u" 'universal-argument)
(let ((i ?0))
(define-key ctl-x-map "rf" 'frame-configuration-to-register)
(define-key esc-map "q" 'fill-paragraph)
-;; (define-key esc-map "g" 'fill-region)
(define-key ctl-x-map "." 'set-fill-prefix)
\f
(define-key esc-map "{" 'backward-paragraph)
(define-key ctl-x-map "z" 'repeat)
+(define-key esc-map "\C-l" 'reposition-window)
+
+(define-key ctl-x-4-map "a" 'add-change-log-entry-other-window)
(define-key ctl-x-4-map "c" 'clone-indirect-buffer-other-window)
;; Signal handlers