comparison lisp/simple.el @ 83291:bbf359ec4a59

Merged from miles@gnu.org--gnu-2005 (patch 269) Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-269 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-331
author Karoly Lorentey <lorentey@elte.hu>
date Mon, 25 Apr 2005 11:47:55 +0000
parents 2c2b97b30980 c0bf74e7fc30
children effe22690419
comparison
equal deleted inserted replaced
83290:042f282a2ed7 83291:bbf359ec4a59
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
3633 ;; Just invert the argument's meaning. 3626 ;; Just invert the argument's meaning.
3634 ;; We can do that without knowing which window it will be. 3627 ;; We can do that without knowing which window it will be.
3635 (if (eq lines '-) nil 3628 (if (eq lines '-) nil
3636 (if (null lines) '- 3629 (if (null lines) '-
3637 (- (prefix-numeric-value lines)))))) 3630 (- (prefix-numeric-value lines))))))
3638 (define-key esc-map [?\C-\S-v] 'scroll-other-window-down)
3639 3631
3640 (defun beginning-of-buffer-other-window (arg) 3632 (defun beginning-of-buffer-other-window (arg)
3641 "Move point to the beginning of the buffer in the other window. 3633 "Move point to the beginning of the buffer in the other window.
3642 Leave mark at previous position. 3634 Leave mark at previous position.
3643 With arg N, put point N/10 of the way from the true beginning." 3635 With arg N, put point N/10 of the way from the true beginning."
4203 (and parse-sexp-ignore-comments 4195 (and parse-sexp-ignore-comments
4204 (not blink-matching-paren-dont-ignore-comments)))) 4196 (not blink-matching-paren-dont-ignore-comments))))
4205 (setq blinkpos (scan-sexps oldpos -1))) 4197 (setq blinkpos (scan-sexps oldpos -1)))
4206 (error nil))) 4198 (error nil)))
4207 (and blinkpos 4199 (and blinkpos
4208 (not (eq (car (syntax-after blinkpos)) 8)) ;Not syntax '$'. 4200 ;; Not syntax '$'.
4201 (not (eq (syntax-class (syntax-after blinkpos)) 8))
4209 (setq matching-paren 4202 (setq matching-paren
4210 (let ((syntax (syntax-after blinkpos))) 4203 (let ((syntax (syntax-after blinkpos)))
4211 (and (consp syntax) 4204 (and (consp syntax)
4212 (eq (logand (car syntax) 255) 4) 4205 (eq (syntax-class syntax) 4)
4213 (cdr syntax))) 4206 (cdr syntax)))
4214 mismatch 4207 mismatch
4215 (or (null matching-paren) 4208 (or (null matching-paren)
4216 (/= (char-after (1- oldpos)) 4209 (/= (char-after (1- oldpos))
4217 matching-paren)))) 4210 matching-paren))))
4277 (if (fboundp 'kmacro-keyboard-quit) 4270 (if (fboundp 'kmacro-keyboard-quit)
4278 (kmacro-keyboard-quit)) 4271 (kmacro-keyboard-quit))
4279 (setq defining-kbd-macro nil) 4272 (setq defining-kbd-macro nil)
4280 (signal 'quit nil)) 4273 (signal 'quit nil))
4281 4274
4282 (define-key global-map "\C-g" 'keyboard-quit)
4283
4284 (defvar buffer-quit-function nil 4275 (defvar buffer-quit-function nil
4285 "Function to call to \"quit\" the current buffer, or nil if none. 4276 "Function to call to \"quit\" the current buffer, or nil if none.
4286 \\[keyboard-escape-quit] calls this function when its more local actions 4277 \\[keyboard-escape-quit] calls this function when its more local actions
4287 \(such as cancelling a prefix argument, minibuffer or region) do not apply.") 4278 \(such as cancelling a prefix argument, minibuffer or region) do not apply.")
4288 4279
4321 (if device 4312 (if device
4322 (plist-put sound :device device)) 4313 (plist-put sound :device device))
4323 (push 'sound sound) 4314 (push 'sound sound)
4324 (play-sound sound))) 4315 (play-sound sound)))
4325 4316
4326 (define-key global-map "\e\e\e" 'keyboard-escape-quit)
4327 4317
4328 (defcustom read-mail-command 'rmail 4318 (defcustom read-mail-command 'rmail
4329 "*Your preference for a mail reading package. 4319 "*Your preference for a mail reading package.
4330 This is used by some keybindings which support reading mail. 4320 This is used by some keybindings which support reading mail.
4331 See also `mail-user-agent' concerning sending mail." 4321 See also `mail-user-agent' concerning sending mail."
5114 (interactive "bClone buffer in other window: ") 5104 (interactive "bClone buffer in other window: ")
5115 (let ((pop-up-windows t)) 5105 (let ((pop-up-windows t))
5116 (set-buffer buffer) 5106 (set-buffer buffer)
5117 (clone-indirect-buffer nil t norecord))) 5107 (clone-indirect-buffer nil t norecord)))
5118 5108
5119 (define-key ctl-x-4-map "c" 'clone-indirect-buffer-other-window)
5120 5109
5121 ;;; Handling of Backspace and Delete keys. 5110 ;;; Handling of Backspace and Delete keys.
5122 5111
5123 (defcustom normal-erase-is-backspace 5112 (defcustom normal-erase-is-backspace
5124 (and (not noninteractive) 5113 (and (not noninteractive)