Mercurial > emacs
comparison lisp/simple.el @ 61651:74f1c2b96d14
(next-buffer, prev-buffer, next-error)
(scroll-other-window, keyboard-quit, keyboard-escape-quit)
(clone-indirect-buffer-other-window): Move bindings to bindings.el.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Tue, 19 Apr 2005 09:25:52 +0000 |
parents | 8c769026ef46 |
children | c1e3fbdb9d71 |
comparison
equal
deleted
inserted
replaced
61650:9a27f4097b8f | 61651:74f1c2b96d14 |
---|---|
49 | 49 |
50 (defgroup paren-matching nil | 50 (defgroup paren-matching nil |
51 "Highlight (un)matching of parens and expressions." | 51 "Highlight (un)matching of parens and expressions." |
52 :group 'matching) | 52 :group 'matching) |
53 | 53 |
54 (define-key global-map [?\C-x right] 'next-buffer) | |
55 (define-key global-map [?\C-x left] 'prev-buffer) | |
56 (defun next-buffer () | 54 (defun next-buffer () |
57 "Switch to the next buffer in cyclic order." | 55 "Switch to the next buffer in cyclic order." |
58 (interactive) | 56 (interactive) |
59 (let ((buffer (current-buffer))) | 57 (let ((buffer (current-buffer))) |
60 (switch-to-buffer (other-buffer buffer)) | 58 (switch-to-buffer (other-buffer buffer)) |
255 (with-current-buffer next-error-last-buffer | 253 (with-current-buffer next-error-last-buffer |
256 (funcall next-error-function (prefix-numeric-value arg) reset)))) | 254 (funcall next-error-function (prefix-numeric-value arg) reset)))) |
257 | 255 |
258 (defalias 'goto-next-locus 'next-error) | 256 (defalias 'goto-next-locus 'next-error) |
259 (defalias 'next-match 'next-error) | 257 (defalias 'next-match 'next-error) |
260 | |
261 (define-key ctl-x-map "`" 'next-error) | |
262 | 258 |
263 (defun previous-error (&optional n) | 259 (defun previous-error (&optional n) |
264 "Visit previous next-error message and corresponding source code. | 260 "Visit previous next-error message and corresponding source code. |
265 | 261 |
266 Prefix arg N says how many error messages to move backwards (or | 262 Prefix arg N says how many error messages to move backwards (or |
1396 Repeat this command to undo more changes. | 1392 Repeat this command to undo more changes. |
1397 A numeric argument serves as a repeat count. | 1393 A numeric argument serves as a repeat count. |
1398 Contrary to `undo', this will not redo a previous undo." | 1394 Contrary to `undo', this will not redo a previous undo." |
1399 (interactive "*p") | 1395 (interactive "*p") |
1400 (let ((undo-no-redo t)) (undo arg))) | 1396 (let ((undo-no-redo t)) (undo arg))) |
1401 ;; Richard said that we should not use C-x <uppercase letter> and I have | |
1402 ;; no idea whereas to bind it. Any suggestion welcome. -stef | |
1403 ;; (define-key ctl-x-map "U" 'undo-only) | |
1404 | 1397 |
1405 (defvar undo-in-progress nil | 1398 (defvar undo-in-progress nil |
1406 "Non-nil while performing an undo. | 1399 "Non-nil while performing an undo. |
1407 Some change-hooks test this variable to do something different.") | 1400 Some change-hooks test this variable to do something different.") |
1408 | 1401 |
3629 ;; Just invert the argument's meaning. | 3622 ;; Just invert the argument's meaning. |
3630 ;; We can do that without knowing which window it will be. | 3623 ;; We can do that without knowing which window it will be. |
3631 (if (eq lines '-) nil | 3624 (if (eq lines '-) nil |
3632 (if (null lines) '- | 3625 (if (null lines) '- |
3633 (- (prefix-numeric-value lines)))))) | 3626 (- (prefix-numeric-value lines)))))) |
3634 (define-key esc-map [?\C-\S-v] 'scroll-other-window-down) | |
3635 | 3627 |
3636 (defun beginning-of-buffer-other-window (arg) | 3628 (defun beginning-of-buffer-other-window (arg) |
3637 "Move point to the beginning of the buffer in the other window. | 3629 "Move point to the beginning of the buffer in the other window. |
3638 Leave mark at previous position. | 3630 Leave mark at previous position. |
3639 With arg N, put point N/10 of the way from the true beginning." | 3631 With arg N, put point N/10 of the way from the true beginning." |
4273 (if (fboundp 'kmacro-keyboard-quit) | 4265 (if (fboundp 'kmacro-keyboard-quit) |
4274 (kmacro-keyboard-quit)) | 4266 (kmacro-keyboard-quit)) |
4275 (setq defining-kbd-macro nil) | 4267 (setq defining-kbd-macro nil) |
4276 (signal 'quit nil)) | 4268 (signal 'quit nil)) |
4277 | 4269 |
4278 (define-key global-map "\C-g" 'keyboard-quit) | |
4279 | |
4280 (defvar buffer-quit-function nil | 4270 (defvar buffer-quit-function nil |
4281 "Function to call to \"quit\" the current buffer, or nil if none. | 4271 "Function to call to \"quit\" the current buffer, or nil if none. |
4282 \\[keyboard-escape-quit] calls this function when its more local actions | 4272 \\[keyboard-escape-quit] calls this function when its more local actions |
4283 \(such as cancelling a prefix argument, minibuffer or region) do not apply.") | 4273 \(such as cancelling a prefix argument, minibuffer or region) do not apply.") |
4284 | 4274 |
4317 (if device | 4307 (if device |
4318 (plist-put sound :device device)) | 4308 (plist-put sound :device device)) |
4319 (push 'sound sound) | 4309 (push 'sound sound) |
4320 (play-sound sound))) | 4310 (play-sound sound))) |
4321 | 4311 |
4322 (define-key global-map "\e\e\e" 'keyboard-escape-quit) | |
4323 | 4312 |
4324 (defcustom read-mail-command 'rmail | 4313 (defcustom read-mail-command 'rmail |
4325 "*Your preference for a mail reading package. | 4314 "*Your preference for a mail reading package. |
4326 This is used by some keybindings which support reading mail. | 4315 This is used by some keybindings which support reading mail. |
4327 See also `mail-user-agent' concerning sending mail." | 4316 See also `mail-user-agent' concerning sending mail." |
5110 (interactive "bClone buffer in other window: ") | 5099 (interactive "bClone buffer in other window: ") |
5111 (let ((pop-up-windows t)) | 5100 (let ((pop-up-windows t)) |
5112 (set-buffer buffer) | 5101 (set-buffer buffer) |
5113 (clone-indirect-buffer nil t norecord))) | 5102 (clone-indirect-buffer nil t norecord))) |
5114 | 5103 |
5115 (define-key ctl-x-4-map "c" 'clone-indirect-buffer-other-window) | |
5116 | 5104 |
5117 ;;; Handling of Backspace and Delete keys. | 5105 ;;; Handling of Backspace and Delete keys. |
5118 | 5106 |
5119 (defcustom normal-erase-is-backspace | 5107 (defcustom normal-erase-is-backspace |
5120 (and (not noninteractive) | 5108 (and (not noninteractive) |