Mercurial > emacs
comparison lisp/simple.el @ 83405:1955a4462bf9
Merged from miles@gnu.org--gnu-2005 (patch 659-663)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-659
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-660
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-661
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-662
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-663
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-445
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Sat, 03 Dec 2005 14:25:50 +0000 |
parents | 69e184bbba16 818361523ce8 |
children | 37d0562504bf |
comparison
equal
deleted
inserted
replaced
83404:69e184bbba16 | 83405:1955a4462bf9 |
---|---|
607 | 607 |
608 In binary overwrite mode, this function does overwrite, and octal | 608 In binary overwrite mode, this function does overwrite, and octal |
609 digits are interpreted as a character code. This is intended to be | 609 digits are interpreted as a character code. This is intended to be |
610 useful for editing binary files." | 610 useful for editing binary files." |
611 (interactive "*p") | 611 (interactive "*p") |
612 (let* ((char (let (translation-table-for-input) | 612 (let* ((char (let (translation-table-for-input input-method-function) |
613 (if (or (not overwrite-mode) | 613 (if (or (not overwrite-mode) |
614 (eq overwrite-mode 'overwrite-mode-binary)) | 614 (eq overwrite-mode 'overwrite-mode-binary)) |
615 (read-quoted-char) | 615 (read-quoted-char) |
616 (read-char))))) | 616 (read-char))))) |
617 ;; Assume character codes 0240 - 0377 stand for characters in some | 617 ;; Assume character codes 0240 - 0377 stand for characters in some |
3328 (if (and next-line-add-newlines (= arg 1)) | 3328 (if (and next-line-add-newlines (= arg 1)) |
3329 (if (save-excursion (end-of-line) (eobp)) | 3329 (if (save-excursion (end-of-line) (eobp)) |
3330 ;; When adding a newline, don't expand an abbrev. | 3330 ;; When adding a newline, don't expand an abbrev. |
3331 (let ((abbrev-mode nil)) | 3331 (let ((abbrev-mode nil)) |
3332 (end-of-line) | 3332 (end-of-line) |
3333 (insert hard-newline)) | 3333 (insert (if use-hard-newlines hard-newline "\n"))) |
3334 (line-move arg nil nil try-vscroll)) | 3334 (line-move arg nil nil try-vscroll)) |
3335 (if (interactive-p) | 3335 (if (interactive-p) |
3336 (condition-case nil | 3336 (condition-case nil |
3337 (line-move arg nil nil try-vscroll) | 3337 (line-move arg nil nil try-vscroll) |
3338 ((beginning-of-buffer end-of-buffer) (ding))) | 3338 ((beginning-of-buffer end-of-buffer) (ding))) |
4261 :group 'paren-blinking) | 4261 :group 'paren-blinking) |
4262 | 4262 |
4263 (defcustom blink-matching-paren-on-screen t | 4263 (defcustom blink-matching-paren-on-screen t |
4264 "*Non-nil means show matching open-paren when it is on screen. | 4264 "*Non-nil means show matching open-paren when it is on screen. |
4265 If nil, means don't show it (but the open-paren can still be shown | 4265 If nil, means don't show it (but the open-paren can still be shown |
4266 when it is off screen)." | 4266 when it is off screen). |
4267 | |
4268 This variable has no effect if `blink-matching-paren' is nil. | |
4269 \(In that case, the open-paren is never shown.) | |
4270 It is also ignored if `show-paren-mode' is enabled." | |
4267 :type 'boolean | 4271 :type 'boolean |
4268 :group 'paren-blinking) | 4272 :group 'paren-blinking) |
4269 | 4273 |
4270 (defcustom blink-matching-paren-distance (* 25 1024) | 4274 (defcustom blink-matching-paren-distance (* 25 1024) |
4271 "*If non-nil, maximum distance to search backwards for matching open-paren. | 4275 "*If non-nil, maximum distance to search backwards for matching open-paren. |
4322 (cond | 4326 (cond |
4323 ((not (or (eq matching-paren (char-before oldpos)) | 4327 ((not (or (eq matching-paren (char-before oldpos)) |
4324 ;; The cdr might hold a new paren-class info rather than | 4328 ;; The cdr might hold a new paren-class info rather than |
4325 ;; a matching-char info, in which case the two CDRs | 4329 ;; a matching-char info, in which case the two CDRs |
4326 ;; should match. | 4330 ;; should match. |
4327 (eq matching-paren (cdr (syntax-after oldpos))))) | 4331 (eq matching-paren (cdr (syntax-after (1- oldpos)))))) |
4328 (message "Mismatched parentheses")) | 4332 (message "Mismatched parentheses")) |
4329 ((not blinkpos) | 4333 ((not blinkpos) |
4330 (if (not blink-matching-paren-distance) | 4334 (if (not blink-matching-paren-distance) |
4331 (message "Unmatched parenthesis"))) | 4335 (message "Unmatched parenthesis"))) |
4332 ((pos-visible-in-window-p blinkpos) | 4336 ((pos-visible-in-window-p blinkpos) |
4333 ;; Matching open within window, temporarily move to blinkpos but only | 4337 ;; Matching open within window, temporarily move to blinkpos but only |
4334 ;; if `blink-matching-paren-on-screen' is non-nil. | 4338 ;; if `blink-matching-paren-on-screen' is non-nil. |
4335 (when blink-matching-paren-on-screen | 4339 (and blink-matching-paren-on-screen |
4336 (save-excursion | 4340 (not show-paren-mode) |
4337 (goto-char blinkpos) | 4341 (save-excursion |
4338 (sit-for blink-matching-delay)))) | 4342 (goto-char blinkpos) |
4343 (sit-for blink-matching-delay)))) | |
4339 (t | 4344 (t |
4340 (save-excursion | 4345 (save-excursion |
4341 (goto-char blinkpos) | 4346 (goto-char blinkpos) |
4342 (setq open-paren-line-string | 4347 (setq open-paren-line-string |
4343 ;; Show what precedes the open in its line, if anything. | 4348 ;; Show what precedes the open in its line, if anything. |
4512 (rfc822-goto-eoh) | 4517 (rfc822-goto-eoh) |
4513 (while other-headers | 4518 (while other-headers |
4514 (unless (member-ignore-case (car (car other-headers)) | 4519 (unless (member-ignore-case (car (car other-headers)) |
4515 '("in-reply-to" "cc" "body")) | 4520 '("in-reply-to" "cc" "body")) |
4516 (insert (car (car other-headers)) ": " | 4521 (insert (car (car other-headers)) ": " |
4517 (cdr (car other-headers)) hard-newline)) | 4522 (cdr (car other-headers)) |
4523 (if use-hard-newlines hard-newline "\n"))) | |
4518 (setq other-headers (cdr other-headers))) | 4524 (setq other-headers (cdr other-headers))) |
4519 (when body | 4525 (when body |
4520 (forward-line 1) | 4526 (forward-line 1) |
4521 (insert body)) | 4527 (insert body)) |
4522 t))) | 4528 t))) |