"Local keymap for the coding-system part of the mode line.")
-(defun mode-line-change-eol ()
+(defun mode-line-change-eol (event)
"Cycle through the various possible kinds of end-of-line styles."
- (interactive)
- (let ((eol (coding-system-eol-type buffer-file-coding-system)))
- (set-buffer-file-coding-system
- (cond ((eq eol 0) 'dos) ((eq eol 1) 'mac) (t 'unix)))))
+ (interactive "e")
+ (save-selected-window
+ (select-window (posn-window (event-start event)))
+ (let ((eol (coding-system-eol-type buffer-file-coding-system)))
+ (set-buffer-file-coding-system
+ (cond ((eq eol 0) 'dos) ((eq eol 1) 'mac) (t 'unix))))))
(defvar mode-line-eol-desc-cache nil)
(define-key mode-line-mode-menu [highlight-changes-mode]
`(menu-item ,(purecopy "Highlight changes (Chg)") highlight-changes-mode
:button (:toggle . highlight-changes-mode)))
-(define-key mode-line-mode-menu [glasses-mode]
- `(menu-item ,(purecopy "Glasses (o^o)") glasses-mode
- :button (:toggle . (bound-and-true-p glasses-mode))))
(define-key mode-line-mode-menu [hide-ifdef-mode]
`(menu-item ,(purecopy "Hide ifdef (Ifdef)") hide-ifdef-mode
:button (:toggle . (bound-and-true-p hide-ifdef-mode))))
+(define-key mode-line-mode-menu [glasses-mode]
+ `(menu-item ,(purecopy "Glasses (o^o)") glasses-mode
+ :button (:toggle . (bound-and-true-p glasses-mode))))
(define-key mode-line-mode-menu [font-lock-mode]
`(menu-item ,(purecopy "Font Lock") font-lock-mode
:button (:toggle . font-lock-mode)))
(define-key mode-line-mode-menu [column-number-mode]
`(menu-item ,(purecopy "Column number") column-number-mode
:button (:toggle . column-number-mode)))
-(define-key mode-line-mode-menu [auto-fill-mode]
- `(menu-item ,(purecopy "Auto Fill (Fill)") auto-fill-mode
- :button (:toggle . auto-fill-function)))
+(define-key mode-line-mode-menu [auto-revert-tail-mode]
+ `(menu-item ,(purecopy "Auto revert tail (Tail)") auto-revert-tail-mode
+ :button (:toggle . auto-revert-tail-mode)))
(define-key mode-line-mode-menu [auto-revert-mode]
`(menu-item ,(purecopy "Auto revert (ARev)") auto-revert-mode
:button (:toggle . auto-revert-mode)))
+(define-key mode-line-mode-menu [auto-fill-mode]
+ `(menu-item ,(purecopy "Auto fill (Fill)") auto-fill-mode
+ :button (:toggle . auto-fill-function)))
(define-key mode-line-mode-menu [abbrev-mode]
`(menu-item ,(purecopy "Abbrev (Abbrev)") abbrev-mode
:button (:toggle . abbrev-mode)))
(let ((map (make-sparse-keymap)))
;; Bind down- events so that the global keymap won't ``shine
;; through''.
- (define-key map [mode-line down-mouse-1] 'ignore)
(define-key map [mode-line mouse-1] 'mode-line-unbury-buffer)
(define-key map [header-line down-mouse-1] 'ignore)
(define-key map [header-line mouse-1] 'mode-line-unbury-buffer)
FMT is a format specifier such as \"%12b\". This function adds
text properties for face, help-echo, and local-map to it."
(list (propertize fmt
- 'face '(:weight bold)
+ 'face 'Buffer-menu-buffer-face
'help-echo
(purecopy "mouse-1: previous buffer, mouse-3: next buffer")
'local-map mode-line-buffer-identification-keymap)))
;; CMUCL
".x86f" ".sparcf"
;; Other CL implementations (Allegro, LispWorks, OpenMCL)
- ".fasl" ".ufsl" ".fsl" ".dxl" ".pfsl"
+ ".fasl" ".ufsl" ".fsl" ".dxl" ".pfsl" ".dfsl"
;; Libtool
".lo" ".la"
;; Gettext
;; files you do want to see, not just TeX stuff. -- fx
".toc" ".aux"
".cp" ".fn" ".ky" ".pg" ".tp" ".vr"
- ".cps" ".fns" ".kys" ".pgs" ".tps" ".vrs")))
+ ".cps" ".fns" ".kys" ".pgs" ".tps" ".vrs"
+ ;; Python byte-compiled
+ ".pyc" ".pyo")))
;; Suffixes used for executables.
(setq exec-suffixes
file-supersession
"^Previous command was not a yank$"
"^Minibuffer window is not active$"
+ "^No previous history search regexp$"
+ "^No later matching history item$"
+ "^No earlier matching history item$"
+ "^End of history; no default available$"
"^End of history; no next item$"
"^Beginning of history; no preceding item$"
"^No recursive edit is in progress$"
"^Changes to be undone are outside visible portion of buffer$"
"^No undo information in this buffer$"
- "^No further undo information$"
+ "^No further undo information"
"^Save not confirmed$"
"^Recover-file cancelled\\.$"
"^Cannot switch buffers in a dedicated window$"
-
- ;; ediff
- "^Errors in diff output. Diff output is in "
- "^Hmm... I don't see an Ediff command around here...$"
- "^Undocumented command! Type `G' in Ediff Control Panel to drop a note to the Ediff maintainer$"
- ": This command runs in Ediff Control Buffer only!$"
- ": Invalid op in ediff-check-version$"
- "^ediff-shrink-window-C can be used only for merging jobs$"
- "^Lost difference info on these directories$"
- "^This command is inapplicable in the present context$"
- "^This session group has no parent$"
- "^Can't hide active session, $"
- "^Ediff: something wrong--no multiple diffs buffer$"
- "^Can't make context diff for Session $"
- "^The patch buffer wasn't found$"
- "^Aborted$"
- "^This Ediff session is not part of a session group$"
- "^No active Ediff sessions or corrupted session registry$"
- "^No session info in this line$"
- "^`.*' is not an ordinary file$"
- "^Patch appears to have failed$"
- "^Recomputation of differences cancelled$"
- "^No fine differences in this mode$"
- "^Lost connection to ancestor buffer...sorry$"
- "^Not merging with ancestor$"
- "^Don't know how to toggle read-only in buffer "
- "Emacs is not running as a window application$"
- "^This command makes sense only when merging with an ancestor$"
- "^At end of the difference list$"
- "^At beginning of the difference list$"
- "^Nothing saved for diff .* in buffer "
- "^Buffer is out of sync for file "
- "^Buffer out of sync for file "
- "^Output from `diff' not found$"
- "^You forgot to specify a region in buffer "
- "^All right. Make up your mind and come back...$"
- "^Current buffer is not visiting any file$"
- "^Failed to retrieve revision: $"
- "^Can't determine display width.$"
- "^File `.*' does not exist or is not readable$"
- "^File `.*' is a directory$"
- "^Buffer .* doesn't exist$"
- "^Directories . and . are the same: "
- "^Directory merge aborted$"
- "^Merge of directory revisions aborted$"
- "^Buffer .* doesn't exist$"
- "^There is no file to merge$"
- "^Version control package .*.el not found. Use vc.el instead$"))
+ ))
(make-variable-buffer-local 'indent-tabs-mode)
(define-key global-map "\C-n" 'next-line)
(define-key global-map "\C-p" 'previous-line)
(define-key ctl-x-map "\C-n" 'set-goal-column)
+(define-key global-map "\C-e" 'move-end-of-line)
;;(defun function-key-error ()
;; (interactive)
(define-key global-map [C-up] 'backward-paragraph)
(define-key global-map [C-down] 'forward-paragraph)
(define-key global-map [C-prior] 'scroll-right)
+(put 'scroll-left 'disabled t)
(define-key global-map [C-next] 'scroll-left)
(define-key global-map [M-next] 'scroll-other-window)
(define-key global-map [M-prior] 'scroll-other-window-down)
;; This is "move to the clipboard", or as close as we come.
(global-set-key [S-delete] 'kill-region)
+(global-set-key [C-M-left] 'backward-sexp)
+(global-set-key [C-M-right] 'forward-sexp)
+(global-set-key [C-M-up] 'backward-up-list)
+(global-set-key [C-M-down] 'down-list)
+(global-set-key [C-M-home] 'beginning-of-defun)
+(global-set-key [C-M-end] 'end-of-defun)
+
(define-key esc-map "\C-f" 'forward-sexp)
(define-key esc-map "\C-b" 'backward-sexp)
(define-key esc-map "\C-u" 'backward-up-list)