annotate lisp/mail/rmailmsc.el @ 85536:a23a7c302a2c

Add some support for Fortran 2003 syntax: (f90-type-indent): Now also applies to `enum'. (f90-associate-indent): New user option. (f90-keywords-re, f90-keywords-level-3-re, f90-procedures-re): Add some F2003 keywords. (f90-constants-re): New constant. (f90-font-lock-keywords-1): Add `associate' blocks, and `abstract Interface'. (f90-font-lock-keywords-2): Add `enumerator', `generic', `procedure', `class'. Arguments for `type'/`class' may have spaces. Add a new element for functions with specified types. Add `end enum' and `select type'. Add `implicit enumerator' and `procedure'. Add `class default' and `type is', `class is'. Fix `go to' regexp. (f90-font-lock-keywords-3): Add `asynchronous' attribute. (f90-font-lock-keywords-4): Add `f90-constants-re'. (f90-blocks-re): Add `enum' and `associate'. (f90-else-like-re): Add `class is', `type is', and `class default'. (f90-end-type-re): Add `enum'. (f90-end-associate-re, f90-typeis-re): New constants. (f90-end-block-re): Add `enum' and `associate'. Change from optional whitespace to end-of-word, to avoid `enumerator'. (f90-start-block-re): Add `select type', `abstract interface', and `enum'. Avoid `type is', and `type (sometype)'. (f90-mode-abbrev-table): Add `enumerator', `protected', and `volatile'. (f90-mode): Doc fix. (f90-looking-at-select-case): Doc fix. Add `select type'. (f90-looking-at-associate): New function, (f90-looking-at-type-like): Avoid `type is' and `type (sometype)'. Add `enum' and `abstract interface'. (f90-no-block-limit): Add `select type' and `abstract interface'. (f90-get-correct-indent, f90-calculate-indent) (f90-end-of-block, f90-beginning-of-block, f90-next-block) (f90-indent-region, f90-match-end): : Handle `associate' blocks.
author Glenn Morris <rgm@gnu.org>
date Mon, 22 Oct 2007 08:17:25 +0000
parents 8e27d63c45eb
children de499b20517a 4aedd218aad1 f55f9811f5d7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
658
7cbd4fcd8b0f *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 35
diff changeset
1 ;;; rmailmsc.el --- miscellaneous support functions for the RMAIL mail reader
7cbd4fcd8b0f *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 35
diff changeset
2
74509
f7702c5f335d Update copyright years.
Glenn Morris <rgm@gnu.org>
parents: 68648
diff changeset
3 ;; Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005,
75347
e3694f1cb928 Add 2007 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 74509
diff changeset
4 ;; 2006, 2007 Free Software Foundation, Inc.
845
213978acbc1e entered into RCS
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 814
diff changeset
5
807
4f28bd14272c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 658
diff changeset
6 ;; Maintainer: FSF
814
38b2499cb3e9 *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 807
diff changeset
7 ;; Keywords: mail
807
4f28bd14272c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 658
diff changeset
8
35
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
9 ;; This file is part of GNU Emacs.
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
10
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
11 ;; GNU Emacs is free software; you can redistribute it and/or modify
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
12 ;; it under the terms of the GNU General Public License as published by
78232
8e27d63c45eb Switch license to GPLv3 or later.
Glenn Morris <rgm@gnu.org>
parents: 75347
diff changeset
13 ;; the Free Software Foundation; either version 3, or (at your option)
35
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
14 ;; any later version.
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
15
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
16 ;; GNU Emacs is distributed in the hope that it will be useful,
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
19 ;; GNU General Public License for more details.
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
20
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
21 ;; You should have received a copy of the GNU General Public License
14169
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 8715
diff changeset
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
64085
18a818a2ee7c Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 52401
diff changeset
23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18a818a2ee7c Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 52401
diff changeset
24 ;; Boston, MA 02110-1301, USA.
35
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
25
38412
253f761ad37b Some fixes to follow coding conventions in files maintained by FSF.
Pavel Janík <Pavel@Janik.cz>
parents: 22955
diff changeset
26 ;;; Commentary:
253f761ad37b Some fixes to follow coding conventions in files maintained by FSF.
Pavel Janík <Pavel@Janik.cz>
parents: 22955
diff changeset
27
2233
fb0ed5a1d0f3 Add standard library headers.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 845
diff changeset
28 ;;; Code:
35
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
29
65207
0275d55d477d (rmail-current-message, rmail-inbox-list): Add defvars.
Juanma Barranquero <lekktu@gmail.com>
parents: 64754
diff changeset
30 (defvar rmail-current-message)
0275d55d477d (rmail-current-message, rmail-inbox-list): Add defvars.
Juanma Barranquero <lekktu@gmail.com>
parents: 64754
diff changeset
31 (defvar rmail-inbox-list)
0275d55d477d (rmail-current-message, rmail-inbox-list): Add defvars.
Juanma Barranquero <lekktu@gmail.com>
parents: 64754
diff changeset
32
16346
09fccbb1dcf1 (set-rmail-inbox-list): Add autoload cookie.
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
33 ;;;###autoload
35
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
34 (defun set-rmail-inbox-list (file-name)
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
35 "Set the inbox list of the current RMAIL file to FILE-NAME.
8715
b4cfdc266626 (set-rmail-inbox-list): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents: 7954
diff changeset
36 You can specify one file name, or several names separated by commas.
b4cfdc266626 (set-rmail-inbox-list): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents: 7954
diff changeset
37 If FILE-NAME is empty, remove any existing inbox list."
35
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
38 (interactive "sSet mailbox list to (comma-separated list of filenames): ")
22955
e3aa855e560c (set-rmail-inbox-list): Error if not in Rmail mode.
Richard M. Stallman <rms@gnu.org>
parents: 16346
diff changeset
39
e3aa855e560c (set-rmail-inbox-list): Error if not in Rmail mode.
Richard M. Stallman <rms@gnu.org>
parents: 16346
diff changeset
40 (unless (eq major-mode 'rmail-mode)
e3aa855e560c (set-rmail-inbox-list): Error if not in Rmail mode.
Richard M. Stallman <rms@gnu.org>
parents: 16346
diff changeset
41 (error "set-rmail-inbox-list works only for an Rmail file"))
e3aa855e560c (set-rmail-inbox-list): Error if not in Rmail mode.
Richard M. Stallman <rms@gnu.org>
parents: 16346
diff changeset
42
35
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
43 (save-excursion
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
44 (let ((names (rmail-parse-file-inboxes))
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
45 (standard-output nil))
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
46 (if (or (not names)
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
47 (y-or-n-p (concat "Replace "
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
48 (mapconcat 'identity names ", ")
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
49 "? ")))
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
50 (let ((buffer-read-only nil))
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
51 (widen)
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
52 (goto-char (point-min))
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
53 (search-forward "\n\^_")
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
54 (re-search-backward "^Mail" nil t)
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
55 (forward-line 0)
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
56 (if (looking-at "Mail:")
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
57 (delete-region (point)
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
58 (progn (forward-line 1)
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
59 (point))))
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
60 (if (not (string= file-name ""))
7954
621c28be27a0 (set-rmail-inbox-list): Use insert-before-markers.
Richard M. Stallman <rms@gnu.org>
parents: 2233
diff changeset
61 (insert-before-markers "Mail: " file-name "\n"))))))
35
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
62 (setq rmail-inbox-list (rmail-parse-file-inboxes))
63b375f17a65 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
63 (rmail-show-message rmail-current-message))
658
7cbd4fcd8b0f *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 35
diff changeset
64
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 38412
diff changeset
65 ;;; arch-tag: 74ed1d50-2c25-4cbd-b5ae-d29ed8aba6e4
658
7cbd4fcd8b0f *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 35
diff changeset
66 ;;; rmailmsc.el ends here