Mercurial > emacs
comparison lisp/simple.el @ 90789:c0409ee15cee
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 670-674)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 209-210)
- Merge from emacs--devo--0
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-185
author | Miles Bader <miles@gnu.org> |
---|---|
date | Wed, 21 Mar 2007 13:33:07 +0000 |
parents | 91bf6e05918b 98c3595cace4 |
children | 4ef881a120fe |
comparison
equal
deleted
inserted
replaced
90788:a12805fdabe8 | 90789:c0409ee15cee |
---|---|
1908 string and it is displayed in the echo area, it is not specified whether | 1908 string and it is displayed in the echo area, it is not specified whether |
1909 the contents are inserted into the buffer anyway. | 1909 the contents are inserted into the buffer anyway. |
1910 | 1910 |
1911 Optional arguments NOT-THIS-WINDOW and FRAME are as for `display-buffer', | 1911 Optional arguments NOT-THIS-WINDOW and FRAME are as for `display-buffer', |
1912 and only used if a buffer is displayed." | 1912 and only used if a buffer is displayed." |
1913 (cond ((and (stringp message) | 1913 (cond ((and (stringp message) (not (string-match "\n" message))) |
1914 (not (string-match "\n" message)) | |
1915 (<= (length message) (frame-width))) | |
1916 ;; Trivial case where we can use the echo area | 1914 ;; Trivial case where we can use the echo area |
1917 (message "%s" message)) | 1915 (message "%s" message)) |
1918 ((and (stringp message) | 1916 ((and (stringp message) |
1919 (= (string-match "\n" message) (1- (length message))) | 1917 (= (string-match "\n" message) (1- (length message)))) |
1920 (<= (1- (length message)) (frame-width))) | |
1921 ;; Trivial case where we can just remove single trailing newline | 1918 ;; Trivial case where we can just remove single trailing newline |
1922 (message "%s" (substring message 0 (1- (length message))))) | 1919 (message "%s" (substring message 0 (1- (length message))))) |
1923 (t | 1920 (t |
1924 ;; General case | 1921 ;; General case |
1925 (with-current-buffer | 1922 (with-current-buffer |
3592 (signal (if (< arg 0) | 3589 (signal (if (< arg 0) |
3593 'beginning-of-buffer | 3590 'beginning-of-buffer |
3594 'end-of-buffer) | 3591 'end-of-buffer) |
3595 nil))) | 3592 nil))) |
3596 ;; Move by arg lines, but ignore invisible ones. | 3593 ;; Move by arg lines, but ignore invisible ones. |
3597 (let (done line-end) | 3594 (let (done) |
3598 (while (and (> arg 0) (not done)) | 3595 (while (and (> arg 0) (not done)) |
3599 ;; If the following character is currently invisible, | 3596 ;; If the following character is currently invisible, |
3600 ;; skip all characters with that same `invisible' property value. | 3597 ;; skip all characters with that same `invisible' property value. |
3601 (while (and (not (eobp)) (line-move-invisible-p (point))) | 3598 (while (and (not (eobp)) (line-move-invisible-p (point))) |
3602 (goto-char (next-char-property-change (point)))) | 3599 (goto-char (next-char-property-change (point)))) |
3603 ;; Move a line. | 3600 ;; Move a line. |
3604 ;; We don't use `end-of-line', since we want to escape | 3601 ;; We don't use `end-of-line', since we want to escape |
3605 ;; from field boundaries ocurring exactly at point. | 3602 ;; from field boundaries ocurring exactly at point. |
3606 (let ((inhibit-field-text-motion t)) | 3603 (goto-char (constrain-to-field |
3607 (setq line-end (line-end-position))) | 3604 (let ((inhibit-field-text-motion t)) |
3608 (goto-char (constrain-to-field line-end (point) t t)) | 3605 (line-end-position)) |
3606 (point) t t | |
3607 'inhibit-line-move-field-capture)) | |
3609 ;; If there's no invisibility here, move over the newline. | 3608 ;; If there's no invisibility here, move over the newline. |
3610 (cond | 3609 (cond |
3611 ((eobp) | 3610 ((eobp) |
3612 (if (not noerror) | 3611 (if (not noerror) |
3613 (signal 'end-of-buffer nil) | 3612 (signal 'end-of-buffer nil) |
4725 | 4724 |
4726 SEND-ACTIONS is a list of actions to call when the message is sent. | 4725 SEND-ACTIONS is a list of actions to call when the message is sent. |
4727 Each action has the form (FUNCTION . ARGS)." | 4726 Each action has the form (FUNCTION . ARGS)." |
4728 (interactive | 4727 (interactive |
4729 (list nil nil nil current-prefix-arg)) | 4728 (list nil nil nil current-prefix-arg)) |
4730 (let ((function (get mail-user-agent 'composefunc))) | 4729 (let ((function (get mail-user-agent 'composefunc)) |
4731 (funcall function to subject other-headers continue | 4730 result-buffer) |
4732 switch-function yank-action send-actions))) | 4731 (if switch-function |
4732 (save-window-excursion | |
4733 (prog1 | |
4734 (funcall function to subject other-headers continue | |
4735 nil yank-action send-actions) | |
4736 (funcall switch-function (current-buffer)))) | |
4737 (funcall function to subject other-headers continue | |
4738 nil yank-action send-actions)))) | |
4733 | 4739 |
4734 (defun compose-mail-other-window (&optional to subject other-headers continue | 4740 (defun compose-mail-other-window (&optional to subject other-headers continue |
4735 yank-action send-actions) | 4741 yank-action send-actions) |
4736 "Like \\[compose-mail], but edit the outgoing message in another window." | 4742 "Like \\[compose-mail], but edit the outgoing message in another window." |
4737 (interactive | 4743 (interactive |
5164 (minibuffer-completion-help)) | 5170 (minibuffer-completion-help)) |
5165 (let ((window (get-buffer-window "*Completions*"))) | 5171 (let ((window (get-buffer-window "*Completions*"))) |
5166 (when window | 5172 (when window |
5167 (select-window window) | 5173 (select-window window) |
5168 (goto-char (point-min)) | 5174 (goto-char (point-min)) |
5169 (search-forward "\n\n") | 5175 (search-forward "\n\n" nil t) |
5170 (forward-line 1)))) | 5176 (forward-line 1)))) |
5171 | 5177 |
5172 ;;; Support keyboard commands to turn on various modifiers. | 5178 ;;; Support keyboard commands to turn on various modifiers. |
5173 | 5179 |
5174 ;; These functions -- which are not commands -- each add one modifier | 5180 ;; These functions -- which are not commands -- each add one modifier |