Mercurial > emacs
comparison lisp/gnus/message.el @ 59756:b53453586872
(message-beginning-of-line): Change the behavior when
invoked between BOL and : so that it first moves backward.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Fri, 28 Jan 2005 16:27:25 +0000 |
parents | 9bdd97960431 |
children | aac0a33f5772 f8a7a9ba3d08 |
comparison
equal
deleted
inserted
replaced
59755:c4bcae7d90b4 | 59756:b53453586872 |
---|---|
1 ;;; message.el --- composing mail and news messages | 1 ;;; message.el --- composing mail and news messages |
2 ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 | 2 ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 |
3 ;; Free Software Foundation, Inc. | 3 ;; Free Software Foundation, Inc. |
4 | 4 |
5 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> | 5 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> |
6 ;; Keywords: mail, news | 6 ;; Keywords: mail, news |
7 | 7 |
798 ;; proper solution. If a crash happens while replying, the auto-save file | 798 ;; proper solution. If a crash happens while replying, the auto-save file |
799 ;; will *not* have a `References:' header if `message-generate-headers-first' | 799 ;; will *not* have a `References:' header if `message-generate-headers-first' |
800 ;; is nil. See: http://article.gmane.org/gmane.emacs.gnus.general/51138 | 800 ;; is nil. See: http://article.gmane.org/gmane.emacs.gnus.general/51138 |
801 (defcustom message-generate-headers-first '(references) | 801 (defcustom message-generate-headers-first '(references) |
802 "Which headers should be generated before starting to compose a message. | 802 "Which headers should be generated before starting to compose a message. |
803 If `t', generate all required headers. This can also be a list of headers to | 803 If t, generate all required headers. This can also be a list of headers to |
804 generate. The variables `message-required-news-headers' and | 804 generate. The variables `message-required-news-headers' and |
805 `message-required-mail-headers' specify which headers to generate. | 805 `message-required-mail-headers' specify which headers to generate. |
806 | 806 |
807 Note that the variable `message-deletable-headers' specifies headers which | 807 Note that the variable `message-deletable-headers' specifies headers which |
808 are to be deleted and then re-generated before sending, so this variable | 808 are to be deleted and then re-generated before sending, so this variable |
5293 This command is identical to `beginning-of-line' if point is | 5293 This command is identical to `beginning-of-line' if point is |
5294 outside the message header or if the option `message-beginning-of-line' | 5294 outside the message header or if the option `message-beginning-of-line' |
5295 is nil. | 5295 is nil. |
5296 | 5296 |
5297 If point is in the message header and on a (non-continued) header | 5297 If point is in the message header and on a (non-continued) header |
5298 line, move point to the beginning of the header value. If point | 5298 line, move point to the beginning of the header value or the beginning of line, |
5299 is already there, move point to beginning of line. Therefore, | 5299 whichever is closer. If point is already at beginning of line, move point to |
5300 repeated calls will toggle point between beginning of field and | 5300 beginning of header value. Therefore, repeated calls will toggle point |
5301 beginning of line." | 5301 between beginning of field and beginning of line." |
5302 (interactive "p") | 5302 (interactive "p") |
5303 (let ((zrs 'zmacs-region-stays)) | 5303 (let ((zrs 'zmacs-region-stays)) |
5304 (when (and (interactive-p) (boundp zrs)) | 5304 (when (and (interactive-p) (boundp zrs)) |
5305 (set zrs t))) | 5305 (set zrs t))) |
5306 (if (and message-beginning-of-line | 5306 (if (and message-beginning-of-line |
5307 (message-point-in-header-p)) | 5307 (message-point-in-header-p)) |
5308 (let* ((here (point)) | 5308 (let* ((here (point)) |
5309 (bol (progn (beginning-of-line n) (point))) | 5309 (bol (progn (beginning-of-line n) (point))) |
5310 (eol (gnus-point-at-eol)) | 5310 (eol (gnus-point-at-eol)) |
5311 (eoh (re-search-forward ": *" eol t))) | 5311 (eoh (re-search-forward ": *" eol t))) |
5312 (if (or (not eoh) (equal here eoh)) | 5312 (goto-char |
5313 (goto-char bol) | 5313 (if (and eoh (or (< eoh here) (= bol here))) |
5314 (goto-char eoh))) | 5314 eoh bol))) |
5315 (beginning-of-line n))) | 5315 (beginning-of-line n))) |
5316 | 5316 |
5317 (defun message-buffer-name (type &optional to group) | 5317 (defun message-buffer-name (type &optional to group) |
5318 "Return a new (unique) buffer name based on TYPE and TO." | 5318 "Return a new (unique) buffer name based on TYPE and TO." |
5319 (cond | 5319 (cond |
6878 | 6878 |
6879 ;; Local Variables: | 6879 ;; Local Variables: |
6880 ;; coding: iso-8859-1 | 6880 ;; coding: iso-8859-1 |
6881 ;; End: | 6881 ;; End: |
6882 | 6882 |
6883 ;;; arch-tag: 94b32cac-4504-4b6c-8181-030ebf380ee0 | 6883 ;; arch-tag: 94b32cac-4504-4b6c-8181-030ebf380ee0 |
6884 ;;; message.el ends here | 6884 ;;; message.el ends here |