aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2006-04-21 05:39:14 +0000
committerMiles Bader2006-04-21 05:39:14 +0000
commit7e635d0ed3c42e6e779821f5c0c1c62289f4c1ee (patch)
treedc3853824edd4a6d426ab69a584a70c53a230dd0
parentcfc2051d0ed5a268528a647ab0911a2f5cc451de (diff)
parentf67d6742cb77a21087e40ae7ee4c84556ca18970 (diff)
downloademacs-7e635d0ed3c42e6e779821f5c0c1c62289f4c1ee.tar.gz
emacs-7e635d0ed3c42e6e779821f5c0c1c62289f4c1ee.zip
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-57
Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 226-238) - Update from CVS - Merge from gnus--rel--5.10 - Update from CVS: lisp/progmodes/python.el (python-mode): Fix typo. * gnus--rel--5.10 (patch 86-90) - Update from CVS - Merge from emacs--devo--0
-rw-r--r--ChangeLog6
-rw-r--r--INSTALL3
-rw-r--r--Makefile.in2
-rw-r--r--admin/ChangeLog4
-rw-r--r--admin/FOR-RELEASE3
-rw-r--r--admin/alloc-colors.c2
-rwxr-xr-xadmin/build-configs2
-rw-r--r--admin/cus-test.el2
-rwxr-xr-xadmin/diff-tar-files2
-rwxr-xr-xadmin/make-emacs2
-rwxr-xr-xadmin/revdiff2
-rw-r--r--config.bat2
-rwxr-xr-xconfig.guess4
-rwxr-xr-xconfig.sub4
-rwxr-xr-xconfigure2
-rw-r--r--etc/ChangeLog39
-rw-r--r--etc/MORE.STUFF2
-rw-r--r--etc/NEWS9
-rw-r--r--etc/TODO5
-rw-r--r--etc/gnus-refcard.tex9
-rw-r--r--etc/orgcard.tex2
-rw-r--r--leim/leim-ext.el2
-rw-r--r--leim/makefile.w32-in2
-rw-r--r--leim/quail/croatian.el2
-rw-r--r--leim/quail/cyril-jis.el2
-rw-r--r--leim/quail/cyrillic.el2
-rw-r--r--leim/quail/czech.el2
-rw-r--r--leim/quail/ethiopic.el2
-rw-r--r--leim/quail/georgian.el2
-rw-r--r--leim/quail/greek.el2
-rw-r--r--leim/quail/hangul.el2
-rw-r--r--leim/quail/hangul3.el2
-rw-r--r--leim/quail/hanja.el2
-rw-r--r--leim/quail/hanja3.el2
-rw-r--r--leim/quail/indian.el2
-rw-r--r--leim/quail/japanese.el2
-rw-r--r--leim/quail/latin-alt.el2
-rw-r--r--leim/quail/latin-ltx.el2
-rw-r--r--leim/quail/latin-post.el2
-rw-r--r--leim/quail/latin-pre.el2
-rw-r--r--leim/quail/lrt.el2
-rw-r--r--leim/quail/py-punct.el2
-rw-r--r--leim/quail/rfc1345.elbin31756 -> 31762 bytes
-rw-r--r--leim/quail/sgml-input.el2
-rw-r--r--leim/quail/sisheng.el2
-rw-r--r--leim/quail/slovak.el2
-rw-r--r--leim/quail/symbol-ksc.el2
-rw-r--r--leim/quail/tibetan.el2
-rw-r--r--leim/quail/uni-input.el2
-rw-r--r--leim/quail/vntelex.el2
-rw-r--r--leim/quail/welsh.el2
-rw-r--r--lisp/ChangeLog172
-rw-r--r--lisp/abbrev.el15
-rw-r--r--lisp/apropos.el1
-rw-r--r--lisp/comint.el45
-rw-r--r--lisp/complete.el66
-rw-r--r--lisp/env.el26
-rw-r--r--lisp/files.el11
-rw-r--r--lisp/gnus/ChangeLog54
-rw-r--r--lisp/gnus/gmm-utils.el413
-rw-r--r--lisp/gnus/gnus-group.el173
-rw-r--r--lisp/gnus/gnus-sum.el199
-rw-r--r--lisp/gnus/gnus-util.el30
-rw-r--r--lisp/gnus/message.el161
-rw-r--r--lisp/gnus/mm-bodies.el13
-rw-r--r--lisp/gnus/mm-util.el121
-rw-r--r--lisp/help-mode.el1
-rw-r--r--lisp/image-mode.el6
-rw-r--r--lisp/imenu.el88
-rw-r--r--lisp/mail/rmail.el4
-rw-r--r--lisp/mh-e/ChangeLog90
-rw-r--r--lisp/mh-e/mh-acros.el8
-rw-r--r--lisp/mh-e/mh-comp.el5
-rw-r--r--lisp/mh-e/mh-compat.el20
-rw-r--r--lisp/mh-e/mh-e.el342
-rw-r--r--lisp/mh-e/mh-folder.el12
-rw-r--r--lisp/mh-e/mh-gnus.el24
-rw-r--r--lisp/mh-e/mh-letter.el12
-rw-r--r--lisp/mh-e/mh-seq.el6
-rw-r--r--lisp/mh-e/mh-tool-bar.el102
-rw-r--r--lisp/mh-e/mh-utils.el57
-rw-r--r--lisp/net/tramp-smb.el2
-rw-r--r--lisp/net/tramp.el36
-rw-r--r--lisp/net/trampver.el2
-rw-r--r--lisp/newcomment.el4
-rw-r--r--lisp/progmodes/gdb-ui.el106
-rw-r--r--lisp/progmodes/gud.el5
-rw-r--r--lisp/progmodes/idlw-help.el1
-rw-r--r--lisp/progmodes/python.el8
-rw-r--r--lisp/progmodes/sh-script.el1
-rw-r--r--lisp/progmodes/tcl.el17
-rw-r--r--lisp/textmodes/org.el499
-rw-r--r--lisp/textmodes/tex-mode.el28
-rw-r--r--lisp/tooltip.el16
-rw-r--r--lispref/ChangeLog19
-rw-r--r--lispref/hooks.texi5
-rw-r--r--lispref/modes.texi7
-rw-r--r--lispref/searching.texi4
-rw-r--r--lispref/tips.texi10
-rw-r--r--lispref/variables.texi2
-rwxr-xr-xmake-dist2
-rw-r--r--man/ChangeLog49
-rw-r--r--man/building.texi15
-rw-r--r--man/gnus.texi620
-rw-r--r--man/mh-e.texi39
-rw-r--r--man/misc.texi10
-rw-r--r--man/org.texi159
-rw-r--r--man/trampver.texi2
-rw-r--r--src/ChangeLog58
-rw-r--r--src/abbrev.c26
-rw-r--r--src/eval.c1
-rw-r--r--src/image.c4
-rw-r--r--src/keymap.c2
-rw-r--r--src/mac.c71
-rw-r--r--src/macselect.c47
-rw-r--r--src/macterm.c76
-rw-r--r--src/print.c1
-rw-r--r--src/textprop.c32
-rw-r--r--src/window.c43
-rw-r--r--src/xdisp.c33
-rw-r--r--src/xmenu.c66
-rwxr-xr-xupdate-subdirs2
122 files changed, 3142 insertions, 1431 deletions
diff --git a/ChangeLog b/ChangeLog
index 80a9ba99a56..2bf1024844b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
12006-04-20 Ramprasad B <ramprasad_i82@yahoo.com>
2
3 * Copyright (sources/emacs): updated copyright year(s)
4
12006-04-01 Eli Zaretskii <eliz@gnu.org> 52006-04-01 Eli Zaretskii <eliz@gnu.org>
2 6
3 * configure: Regenerated. 7 * configure: Regenerated.
@@ -6225,7 +6229,7 @@
6225;; coding: iso-2022-7bit 6229;; coding: iso-2022-7bit
6226;; End: 6230;; End:
6227 6231
6228 Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 6232 Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2006
6229 Free Software Foundation, Inc. 6233 Free Software Foundation, Inc.
6230 Copying and distribution of this file, with or without modification, 6234 Copying and distribution of this file, with or without modification,
6231 are permitted provided the copyright notice and this notice are preserved. 6235 are permitted provided the copyright notice and this notice are preserved.
diff --git a/INSTALL b/INSTALL
index 5f998159ade..6d5383eee29 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,5 +1,6 @@
1GNU Emacs Installation Guide 1GNU Emacs Installation Guide
2Copyright (c) 1992, 94, 96, 97, 2000, 01, 02 Free software Foundation, Inc. 2Copyright (c) 1992, 1994, 1996, 1997, 2000, 2001, 2002, 2006
3Free software Foundation, Inc.
3See the end of the file for copying permissions. 4See the end of the file for copying permissions.
4 5
5 6
diff --git a/Makefile.in b/Makefile.in
index e89159f4a3e..12ef4befb48 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -2,7 +2,7 @@
2# DIST: make most of the changes to this file you might want, so try 2# DIST: make most of the changes to this file you might want, so try
3# DIST: that first. 3# DIST: that first.
4 4
5# Copyright (C) 1992,93,94,95,96,97,98,1999,2000,01,02,03,04,2005 5# Copyright (C) 1992,93,94,95,96,97,98,1999,2000,01,02,03,04,2005,2006
6# Free Software Foundation, Inc. 6# Free Software Foundation, Inc.
7 7
8# This file is part of GNU Emacs. 8# This file is part of GNU Emacs.
diff --git a/admin/ChangeLog b/admin/ChangeLog
index 8256beefb6c..9dc0def4788 100644
--- a/admin/ChangeLog
+++ b/admin/ChangeLog
@@ -1,3 +1,7 @@
12006-04-17 Ramprasad B <ramprasad_i82@yahoo.com>
2
3 * ./* (Copyright): Updated Copyright year(s)
4
12006-02-24 Reiner Steib <Reiner.Steib@gmx.de> 52006-02-24 Reiner Steib <Reiner.Steib@gmx.de>
2 6
3 * FOR-RELEASE (BUGS): Add URLs/MIDs. 7 * FOR-RELEASE (BUGS): Add URLs/MIDs.
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE
index 947922a4888..c641fbe106c 100644
--- a/admin/FOR-RELEASE
+++ b/admin/FOR-RELEASE
@@ -37,6 +37,9 @@ Assigned to Bill Wohler <wohler@newt.com>.
37 37
38** Is there a basic problem with cl-byte-compile-compiler-macro? 38** Is there a basic problem with cl-byte-compile-compiler-macro?
39 39
40** Recalculate the tool bar height after changing the default font.
41(Bug report by Yamamoto Mistuharu, 31 Mar 2006)
42
40** Markus Gritsch's report about Emacs looping on Windoze with the following 43** Markus Gritsch's report about Emacs looping on Windoze with the following
41.emacs file, and then reduce Emacs frame width to "something quite narrow": 44.emacs file, and then reduce Emacs frame width to "something quite narrow":
42 (setq-default truncate-lines t) 45 (setq-default truncate-lines t)
diff --git a/admin/alloc-colors.c b/admin/alloc-colors.c
index 361b3bd2f24..947b542005c 100644
--- a/admin/alloc-colors.c
+++ b/admin/alloc-colors.c
@@ -1,5 +1,5 @@
1/* Allocate X colors. Used for testing with dense colormaps. 1/* Allocate X colors. Used for testing with dense colormaps.
2 Copyright (C) 2001 Free Software Foundation, Inc. 2 Copyright (C) 2001, 2006 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
diff --git a/admin/build-configs b/admin/build-configs
index 083c9e766e6..29fc0f0b94c 100755
--- a/admin/build-configs
+++ b/admin/build-configs
@@ -1,6 +1,6 @@
1#! /usr/bin/perl 1#! /usr/bin/perl
2 2
3# Copyright (C) 2001 Free Software Foundation, Inc. 3# Copyright (C) 2001, 2006 Free Software Foundation, Inc.
4# 4#
5# This file is part of GNU Emacs. 5# This file is part of GNU Emacs.
6# 6#
diff --git a/admin/cus-test.el b/admin/cus-test.el
index ff38b0b08ff..6ff92b88c95 100644
--- a/admin/cus-test.el
+++ b/admin/cus-test.el
@@ -1,6 +1,6 @@
1;;; cus-test.el --- tests for custom types and load problems 1;;; cus-test.el --- tests for custom types and load problems
2 2
3;; Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc. 3;; Copyright (C) 1998, 2000, 2002, 2006 Free Software Foundation, Inc.
4 4
5;; Author: Markus Rost <markus.rost@mathematik.uni-regensburg.de> 5;; Author: Markus Rost <markus.rost@mathematik.uni-regensburg.de>
6;; Maintainer: Markus Rost <rost@math.ohio-state.edu> 6;; Maintainer: Markus Rost <rost@math.ohio-state.edu>
diff --git a/admin/diff-tar-files b/admin/diff-tar-files
index 7f27ab99876..da3b1911abb 100755
--- a/admin/diff-tar-files
+++ b/admin/diff-tar-files
@@ -1,6 +1,6 @@
1#! /bin/sh 1#! /bin/sh
2 2
3# Copyright (C) 2001 Free Software Foundation, Inc. 3# Copyright (C) 2001, 2006 Free Software Foundation, Inc.
4# 4#
5# This file is part of GNU Emacs. 5# This file is part of GNU Emacs.
6# 6#
diff --git a/admin/make-emacs b/admin/make-emacs
index d17e59e5692..57d04a8f625 100755
--- a/admin/make-emacs
+++ b/admin/make-emacs
@@ -1,6 +1,6 @@
1#! /usr/bin/perl 1#! /usr/bin/perl
2 2
3# Copyright (C) 2001 Free Software Foundation, Inc. 3# Copyright (C) 2001, 2006 Free Software Foundation, Inc.
4# 4#
5# This file is part of GNU Emacs. 5# This file is part of GNU Emacs.
6# 6#
diff --git a/admin/revdiff b/admin/revdiff
index d936106aada..3b5ffaad3f1 100755
--- a/admin/revdiff
+++ b/admin/revdiff
@@ -1,6 +1,6 @@
1#! /usr/bin/perl 1#! /usr/bin/perl
2 2
3# Copyright (C) 2001 Free Software Foundation, Inc. 3# Copyright (C) 2001, 2006 Free Software Foundation, Inc.
4# 4#
5# This file is part of GNU Emacs. 5# This file is part of GNU Emacs.
6# 6#
diff --git a/config.bat b/config.bat
index 1f25bfef9eb..9a80f5d7854 100644
--- a/config.bat
+++ b/config.bat
@@ -1,7 +1,7 @@
1@echo off 1@echo off
2rem ---------------------------------------------------------------------- 2rem ----------------------------------------------------------------------
3rem Configuration script for MSDOS 3rem Configuration script for MSDOS
4rem Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2004 4rem Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2004, 2006
5rem Free Software Foundation, Inc. 5rem Free Software Foundation, Inc.
6 6
7rem This file is part of GNU Emacs. 7rem This file is part of GNU Emacs.
diff --git a/config.guess b/config.guess
index 10a8260177a..862b408779a 100755
--- a/config.guess
+++ b/config.guess
@@ -1,9 +1,9 @@
1#! /bin/sh 1#! /bin/sh
2# Attempt to guess a canonical system name. 2# Attempt to guess a canonical system name.
3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. 4# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
5 5
6timestamp='2005-12-23' 6timestamp='2006-04-20'
7 7
8# This file is free software; you can redistribute it and/or modify it 8# This file is free software; you can redistribute it and/or modify it
9# under the terms of the GNU General Public License as published by 9# under the terms of the GNU General Public License as published by
diff --git a/config.sub b/config.sub
index 8f7b7381c47..5b41640064e 100755
--- a/config.sub
+++ b/config.sub
@@ -1,9 +1,9 @@
1#! /bin/sh 1#! /bin/sh
2# Configuration validation subroutine script. 2# Configuration validation subroutine script.
3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. 4# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
5 5
6timestamp='2005-12-23' 6timestamp='2006-04-20'
7 7
8# This file is (in principle) common to ALL GNU software. 8# This file is (in principle) common to ALL GNU software.
9# The presence of a machine in this file suggests that SOME GNU software 9# The presence of a machine in this file suggests that SOME GNU software
diff --git a/configure b/configure
index d06ab5d0511..bf8f816b8cb 100755
--- a/configure
+++ b/configure
@@ -2,7 +2,7 @@
2# Guess values for system-dependent variables and create Makefiles. 2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.59. 3# Generated by GNU Autoconf 2.59.
4# 4#
5# Copyright (C) 2003 Free Software Foundation, Inc. 5# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
6# This configure script is free software; the Free Software Foundation 6# This configure script is free software; the Free Software Foundation
7# gives unlimited permission to copy, distribute and modify it. 7# gives unlimited permission to copy, distribute and modify it.
8## --------------------- ## 8## --------------------- ##
diff --git a/etc/ChangeLog b/etc/ChangeLog
index 8673937f15b..013b59d5305 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,24 @@
12006-04-21 Nick Roberts <nickrob@snap.net.nz>
2
3 * NEWS: Mention t-mouse.el. Touch up description of gdb-ui.el.
4
52006-04-20 Carsten Dominik <dominik@science.uva.nl>
6
7 * orgcard.tex: Version number change only.
8
92006-04-18 Reiner Steib <Reiner.Steib@gmx.de>
10
11 * gnus-refcard.tex: Bump version to 5.11. Remove duplicate
12 \def's. Update date.
13
142006-04-18 Bill Wohler <wohler@newt.com>
15
16 * MORE.STUFF: Add MH-E.
17
182006-04-18 Carsten Dominik <dominik@science.uva.nl>
19
20 * orgcard.tex: Version number change only.
21
12006-04-12 Kenichi Handa <handa@m17n.org> 222006-04-12 Kenichi Handa <handa@m17n.org>
2 23
3 * PROBLEMS (C-SPC fails ...): Explicitly say fcitx in the header. 24 * PROBLEMS (C-SPC fails ...): Explicitly say fcitx in the header.
@@ -23,7 +44,7 @@
232006-03-28 Bill Wohler <wohler@newt.com> 442006-03-28 Bill Wohler <wohler@newt.com>
24 45
25 * images/README: Update with following information. 46 * images/README: Update with following information.
26 47
27 * images/data-save.xpm, images/mail/flag-for-followup.xpm: 48 * images/data-save.xpm, images/mail/flag-for-followup.xpm:
28 * images/zoom-in.xpm, images/zoom-out.xpm: New images from GNOME 49 * images/zoom-in.xpm, images/zoom-out.xpm: New images from GNOME
29 2.12. 50 2.12.
@@ -32,27 +53,27 @@
32 * images/mail/flag-for-followup.pbm, images/mail/inbox.pbm: 53 * images/mail/flag-for-followup.pbm, images/mail/inbox.pbm:
33 * images/mail/move.pbm, images/next-page.pbm, images/zoom-out.pbm: 54 * images/mail/move.pbm, images/next-page.pbm, images/zoom-out.pbm:
34 New bitmaps for new images. 55 New bitmaps for new images.
35 56
36 * images/refresh.xpm, images/sort-ascending.xpm, 57 * images/refresh.xpm, images/sort-ascending.xpm,
37 * images/sort-descending.xpm: Update with GTK 2.x images. Note 58 * images/sort-descending.xpm: Update with GTK 2.x images. Note
38 that the default GTK icons are not overridden by the GNOME theme 59 that the default GTK icons are not overridden by the GNOME theme
39 due to a bug which was fixed in GNOME 2.15. Once GNOME 2.16 is in 60 due to a bug which was fixed in GNOME 2.15. Once GNOME 2.16 is in
40 wide circulation, then the GTK icons should be replaced with the 61 wide circulation, then the GTK icons should be replaced with the
41 equivalent GNOME icons. Until then, we should be consistent with 62 equivalent GNOME icons. Until then, we should be consistent with
42 GTK first, then GNOME. 63 GTK first, then GNOME.
43 64
44 * images/mail/repack.xpm, images/mail/reply-from.xpm: 65 * images/mail/repack.xpm, images/mail/reply-from.xpm:
45 * images/mail/reply-to.xpm, images/search-replace.xpm: 66 * images/mail/reply-to.xpm, images/search-replace.xpm:
46 * images/separator.xpm, images/show.xpm: Update custom icons to be 67 * images/separator.xpm, images/show.xpm: Update custom icons to be
47 closer to their GNOME counterparts. 68 closer to their GNOME counterparts.
48 69
49 * images/attach.pbm, images/exit.pbm, images/mail/compose.pbm: 70 * images/attach.pbm, images/exit.pbm, images/mail/compose.pbm:
50 * images/mail/repack.pbm, images/mail/reply-all.pbm: 71 * images/mail/repack.pbm, images/mail/reply-all.pbm:
51 * images/mail/reply-from.pbm, images/mail/reply-to.pbm: 72 * images/mail/reply-from.pbm, images/mail/reply-to.pbm:
52 * images/mail/reply.pbm, images/mail/send.pbm, images/show.pbm: 73 * images/mail/reply.pbm, images/mail/send.pbm, images/show.pbm:
53 * images/search-replace.pbm: Update bitmaps. 74 * images/search-replace.pbm: Update bitmaps.
54 75
55 * images/execute.pbm, images/execute.xpm, images/fld-open.pbm: 76 * images/execute.pbm, images/execute.xpm, images/fld-open.pbm:
56 * images/fld-open.xpm, images/highlight.pbm, images/highlight.xpm: 77 * images/fld-open.xpm, images/highlight.pbm, images/highlight.xpm:
57 * images/mail.pbm, images/mail.xpm, images/mail/alias.pbm: 78 * images/mail.pbm, images/mail.xpm, images/mail/alias.pbm:
58 * images/mail/alias.xpm, images/mail/refile.pbm: 79 * images/mail/alias.xpm, images/mail/refile.pbm:
diff --git a/etc/MORE.STUFF b/etc/MORE.STUFF
index 2d8e9157b35..cd54c654563 100644
--- a/etc/MORE.STUFF
+++ b/etc/MORE.STUFF
@@ -71,6 +71,8 @@ You might find bug-fixes or enhancements in these places.
71 71
72 * Ispell: <URL:http://www.eng.utah.edu/~kstevens/ispell-page.html> 72 * Ispell: <URL:http://www.eng.utah.edu/~kstevens/ispell-page.html>
73 73
74 * MH-E: <URL:http://mh-e.sourceforge.net/>
75
74 * PC Selection: <URL:ftp://ftp.thp.uni-duisburg.de/pub/source/elisp/> 76 * PC Selection: <URL:ftp://ftp.thp.uni-duisburg.de/pub/source/elisp/>
75 77
76 * PS mode: <URL:http://odur.let.rug.nl/%7Ekleiweg/postscript/> 78 * PS mode: <URL:http://odur.let.rug.nl/%7Ekleiweg/postscript/>
diff --git a/etc/NEWS b/etc/NEWS
index 3ec9c17f692..c3a54e7e6ff 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1924,6 +1924,10 @@ for pager-like scrolling. Keys which normally move point by line or
1924paragraph will scroll the buffer by the respective amount of lines 1924paragraph will scroll the buffer by the respective amount of lines
1925instead and point will be kept vertically fixed relative to window 1925instead and point will be kept vertically fixed relative to window
1926boundaries during scrolling. 1926boundaries during scrolling.
1927
1928** The file t-mouse.el is now part of Emacs and provides access to mouse
1929events from the console. It still requires gpm to work but has been updated
1930for Emacs 22. In particular, the mode-line is now position sensitive.
1927 1931
1928* Changes in Specialized Modes and Packages in Emacs 22.1: 1932* Changes in Specialized Modes and Packages in Emacs 22.1:
1929 1933
@@ -2702,14 +2706,15 @@ and other common debugger commands.
2702 2706
2703+++ 2707+++
2704*** The new package gdb-ui.el provides an enhanced graphical interface to 2708*** The new package gdb-ui.el provides an enhanced graphical interface to
2705GDB. You can interact with GDB through the GUD buffer in the usual way, but 2709GDB. You can interact with GDB through the GUD buffer in the usual way, but
2706there are also further buffers which control the execution and describe the 2710there are also further buffers which control the execution and describe the
2707state of your program. It can separate the input/output of your program from 2711state of your program. It can separate the input/output of your program from
2708that of GDB and watches expressions in the speedbar. It also uses features of 2712that of GDB and watches expressions in the speedbar. It also uses features of
2709Emacs 21/22 such as the toolbar, and bitmaps in the fringe to indicate 2713Emacs 21/22 such as the toolbar, and bitmaps in the fringe to indicate
2710breakpoints. 2714breakpoints.
2711 2715
2712Use M-x gdb to start GDB-UI. 2716To use this package just type M-x gdb. See the Emacs manual if you want the
2717old behaviour.
2713 2718
2714*** The variable tooltip-gud-tips-p has been removed. GUD tooltips can now be 2719*** The variable tooltip-gud-tips-p has been removed. GUD tooltips can now be
2715toggled independently of normal tooltips with the minor mode 2720toggled independently of normal tooltips with the minor mode
diff --git a/etc/TODO b/etc/TODO
index 137536f4ee0..6b36b1a4259 100644
--- a/etc/TODO
+++ b/etc/TODO
@@ -9,15 +9,14 @@ to the FSF.
9 9
10* Small but important fixes needed in existing features: 10* Small but important fixes needed in existing features:
11 11
12** whitespace-cleanup should work only on the region if the region is active.
13
12** Distribute a bar cursor of width > 1 evenly between the two glyphs 14** Distribute a bar cursor of width > 1 evenly between the two glyphs
13 on each side of the bar (what to do at the edges?). 15 on each side of the bar (what to do at the edges?).
14 16
15** Make vc-checkin avoid reverting the buffer if has not changed after 17** Make vc-checkin avoid reverting the buffer if has not changed after
16 the checkin. Comparing (md5 BUFFER) to (md5 FILE) should be enough. 18 the checkin. Comparing (md5 BUFFER) to (md5 FILE) should be enough.
17 19
18** Make vc-annotate show place the cursor in the annotate buffer at the
19 same line as the current buffer.
20
21** buffer-offer-save should be a permanent local. 20** buffer-offer-save should be a permanent local.
22 21
23** revert-buffer should eliminate overlays and the mark. 22** revert-buffer should eliminate overlays and the mark.
diff --git a/etc/gnus-refcard.tex b/etc/gnus-refcard.tex
index 3bfca03d93d..106e3dc6212 100644
--- a/etc/gnus-refcard.tex
+++ b/etc/gnus-refcard.tex
@@ -76,8 +76,9 @@
76% \input{gnusref} % % % % % % % % % % % % % % % % % % % % % % % % % % 76% \input{gnusref} % % % % % % % % % % % % % % % % % % % % % % % % % %
77%% include file for the Gnus refcard and booklet 77%% include file for the Gnus refcard and booklet
78 78
79\def\progver{5.10}\def\refver{5.10-2} % program and refcard versions 79\def\progver{5.11} % program version
80\def\date{Mar, 2005} 80% \def\refver{5.10-2} % refcard version (not used)
81\def\date{April, 2006}
81\def\author{Gnus Bugfixing Girls + Boys $<$bugs@gnus.org$>$} 82\def\author{Gnus Bugfixing Girls + Boys $<$bugs@gnus.org$>$}
82 83
83%% 84%%
@@ -1267,10 +1268,6 @@
1267 1268
1268\begin{document} 1269\begin{document}
1269 1270
1270\def\progver{5.10}\def\refver{5.10-1} % program and refcard versions
1271\def\date{Jan 10th, 2004}
1272\def\author{Gnus Bugfixing Girls + Boys $<$bugs@gnus.org$>$}
1273
1274\ifthenelse{\isundefined{\booklettrue}}{ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1271\ifthenelse{\isundefined{\booklettrue}}{ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1275 \raggedbottom\raggedright 1272 \raggedbottom\raggedright
1276 \twocolumn 1273 \twocolumn
diff --git a/etc/orgcard.tex b/etc/orgcard.tex
index 245354e85d3..c5577a95be0 100644
--- a/etc/orgcard.tex
+++ b/etc/orgcard.tex
@@ -1,5 +1,5 @@
1% Reference Card for Org Mode 1% Reference Card for Org Mode
2\def\orgversionnumber{4.23} 2\def\orgversionnumber{4.25}
3\def\year{2006} 3\def\year{2006}
4% 4%
5%**start of header 5%**start of header
diff --git a/leim/leim-ext.el b/leim/leim-ext.el
index ecd22b7cf99..681e81185b2 100644
--- a/leim/leim-ext.el
+++ b/leim/leim-ext.el
@@ -1,6 +1,6 @@
1;; leim-ext.el -- extra leim configulation -*- coding:iso-2022-7bit; -*- 1;; leim-ext.el -- extra leim configulation -*- coding:iso-2022-7bit; -*-
2 2
3;; Copyright (C) 2004 3;; Copyright (C) 2004, 2006
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5;; Copyright (C) 2004, 2005 5;; Copyright (C) 2004, 2005
6;; National Institute of Advanced Industrial Science and Technology (AIST) 6;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/leim/makefile.w32-in b/leim/makefile.w32-in
index 73e44a5bfec..6c9ac670db1 100644
--- a/leim/makefile.w32-in
+++ b/leim/makefile.w32-in
@@ -1,5 +1,5 @@
1# -*- Makefile -*- for leim subdirectory in GNU Emacs on the Microsoft W32 API. 1# -*- Makefile -*- for leim subdirectory in GNU Emacs on the Microsoft W32 API.
2# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 2# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006
3# Free Software Foundation, Inc. 3# Free Software Foundation, Inc.
4# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 4# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
5# National Institute of Advanced Industrial Science and Technology (AIST) 5# National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/leim/quail/croatian.el b/leim/quail/croatian.el
index e6f7f4c341c..29b802b2914 100644
--- a/leim/quail/croatian.el
+++ b/leim/quail/croatian.el
@@ -1,6 +1,6 @@
1;;; quail/croatian.el -- Quail package for inputing Croatian -*-coding: iso-8859-2;-*- 1;;; quail/croatian.el -- Quail package for inputing Croatian -*-coding: iso-8859-2;-*-
2 2
3;; Copyright (C) 2003 Free Software Foundation, Inc. 3;; Copyright (C) 2003, 2006 Free Software Foundation, Inc.
4 4
5;; Author: Hrvoje Nik¹iæ <hniksic@xemacs.org>, 5;; Author: Hrvoje Nik¹iæ <hniksic@xemacs.org>,
6;; modeled after czech.el by Milan Zamazal. 6;; modeled after czech.el by Milan Zamazal.
diff --git a/leim/quail/cyril-jis.el b/leim/quail/cyril-jis.el
index a7d91e7da73..e0e76451217 100644
--- a/leim/quail/cyril-jis.el
+++ b/leim/quail/cyril-jis.el
@@ -1,6 +1,6 @@
1;;; cyril-jis.el --- Quail package for inputting JISX0208 Cyrillic letters 1;;; cyril-jis.el --- Quail package for inputting JISX0208 Cyrillic letters
2 2
3;; Copyright (C) 2001 Free Software Foundation, Inc. 3;; Copyright (C) 2001, 2006 Free Software Foundation, Inc.
4;; Copyright (C) 1997 4;; Copyright (C) 1997
5;; National Institute of Advanced Industrial Science and Technology (AIST) 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021 6;; Registration Number H14PRO021
diff --git a/leim/quail/cyrillic.el b/leim/quail/cyrillic.el
index a408919b26a..061bcbb8e58 100644
--- a/leim/quail/cyrillic.el
+++ b/leim/quail/cyrillic.el
@@ -1,6 +1,6 @@
1;;; cyrillic.el --- Quail package for inputting Cyrillic characters 1;;; cyrillic.el --- Quail package for inputting Cyrillic characters
2 2
3;; Copyright (C) 1997, 1998, 2001, 2002, 2003, 2004, 2005 3;; Copyright (C) 1997, 1998, 2001, 2002, 2003, 2004, 2005, 2006
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5;; Copyright (C) 1997, 2003 5;; Copyright (C) 1997, 2003
6;; National Institute of Advanced Industrial Science and Technology (AIST) 6;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/leim/quail/czech.el b/leim/quail/czech.el
index a3187f6994b..7c1134d7c75 100644
--- a/leim/quail/czech.el
+++ b/leim/quail/czech.el
@@ -1,6 +1,6 @@
1;;; czech.el --- Quail package for inputting Czech -*-coding: iso-2022-7bit;-*- 1;;; czech.el --- Quail package for inputting Czech -*-coding: iso-2022-7bit;-*-
2 2
3;; Copyright (C) 1998, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1998, 2001, 2006 Free Software Foundation, Inc.
4 4
5;; Author: Milan Zamazal <pdm@zamazal.org> 5;; Author: Milan Zamazal <pdm@zamazal.org>
6;; Maintainer: Pavel Jan,Bm(Bk <Pavel@Janik.cz> 6;; Maintainer: Pavel Jan,Bm(Bk <Pavel@Janik.cz>
diff --git a/leim/quail/ethiopic.el b/leim/quail/ethiopic.el
index d5af764bda2..c1f07534c91 100644
--- a/leim/quail/ethiopic.el
+++ b/leim/quail/ethiopic.el
@@ -1,6 +1,6 @@
1;;; ethiopic.el --- Quail package for inputting Ethiopic characters -*-coding: iso-2022-7bit;-*- 1;;; ethiopic.el --- Quail package for inputting Ethiopic characters -*-coding: iso-2022-7bit;-*-
2 2
3;; Copyright (C) 1997, 1998, 1999, 2001 3;; Copyright (C) 1997, 1998, 1999, 2001, 2006
4;; National Institute of Advanced Industrial Science and Technology (AIST) 4;; National Institute of Advanced Industrial Science and Technology (AIST)
5;; Registration Number H14PRO021 5;; Registration Number H14PRO021
6 6
diff --git a/leim/quail/georgian.el b/leim/quail/georgian.el
index a95511d3569..fbc71645b92 100644
--- a/leim/quail/georgian.el
+++ b/leim/quail/georgian.el
@@ -1,6 +1,6 @@
1;;; georgian.el --- Quail package for inputting Georgian characters -*-coding: utf-8;-*- 1;;; georgian.el --- Quail package for inputting Georgian characters -*-coding: utf-8;-*-
2 2
3;; Copyright (C) 2001 Free Software Foundation, Inc. 3;; Copyright (C) 2001, 2006 Free Software Foundation, Inc.
4 4
5;; Author: Dave Love <fx@gnu.org> 5;; Author: Dave Love <fx@gnu.org>
6;; Keywords: i18n 6;; Keywords: i18n
diff --git a/leim/quail/greek.el b/leim/quail/greek.el
index 856c9fe098f..3ab09c63b37 100644
--- a/leim/quail/greek.el
+++ b/leim/quail/greek.el
@@ -1,6 +1,6 @@
1;;; greek.el --- Quail package for inputting Greek -*-coding: iso-2022-7bit-*- 1;;; greek.el --- Quail package for inputting Greek -*-coding: iso-2022-7bit-*-
2 2
3;; Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
4;; Copyright (C) 1997, 2001 4;; Copyright (C) 1997, 2001
5;; National Institute of Advanced Industrial Science and Technology (AIST) 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021 6;; Registration Number H14PRO021
diff --git a/leim/quail/hangul.el b/leim/quail/hangul.el
index d82d49c3318..a8a821ad9bb 100644
--- a/leim/quail/hangul.el
+++ b/leim/quail/hangul.el
@@ -1,6 +1,6 @@
1;;; hangul.el --- Quail package for inputting Korean Hangul characters -*-coding: iso-2022-7bit;-*- 1;;; hangul.el --- Quail package for inputting Korean Hangul characters -*-coding: iso-2022-7bit;-*-
2 2
3;; Copyright (C) 2002 Free Software Foundation, Inc. 3;; Copyright (C) 2002, 2006 Free Software Foundation, Inc.
4;; Copyright (C) 1997 4;; Copyright (C) 1997
5;; National Institute of Advanced Industrial Science and Technology (AIST) 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021 6;; Registration Number H14PRO021
diff --git a/leim/quail/hangul3.el b/leim/quail/hangul3.el
index 028ea6609ee..4565fca0b1a 100644
--- a/leim/quail/hangul3.el
+++ b/leim/quail/hangul3.el
@@ -1,6 +1,6 @@
1;;; hangul3.el --- Quail package for inputting Korean Hangul characters -*-coding: iso-2022-7bit;-*- 1;;; hangul3.el --- Quail package for inputting Korean Hangul characters -*-coding: iso-2022-7bit;-*-
2 2
3;; Copyright (C) 1997, 1998, 2001, 2002 Free Software Foundation, Inc. 3;; Copyright (C) 1997, 1998, 2001, 2002, 2006 Free Software Foundation, Inc.
4;; Copyright (C) 1997, 2002 4;; Copyright (C) 1997, 2002
5;; National Institute of Advanced Industrial Science and Technology (AIST) 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021 6;; Registration Number H14PRO021
diff --git a/leim/quail/hanja.el b/leim/quail/hanja.el
index 8d923bd534f..6e9419e73d3 100644
--- a/leim/quail/hanja.el
+++ b/leim/quail/hanja.el
@@ -1,6 +1,6 @@
1;;; hanja.el --- Quail-package for Korean Hanja (KSC5601) -*-coding: iso-2022-7bit;-*- 1;;; hanja.el --- Quail-package for Korean Hanja (KSC5601) -*-coding: iso-2022-7bit;-*-
2 2
3;; Copyright (C) 1997 Free Software Foundation, Inc. 3;; Copyright (C) 1997, 2006 Free Software Foundation, Inc.
4;; Copyright (C) 1997 4;; Copyright (C) 1997
5;; National Institute of Advanced Industrial Science and Technology (AIST) 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021 6;; Registration Number H14PRO021
diff --git a/leim/quail/hanja3.el b/leim/quail/hanja3.el
index c2f67b4d09d..f04e16ac196 100644
--- a/leim/quail/hanja3.el
+++ b/leim/quail/hanja3.el
@@ -1,6 +1,6 @@
1;;; hanja3.el --- Quail-package for Korean Hanja (KSC5601) -*-coding: iso-2022-7bit;-*- 1;;; hanja3.el --- Quail-package for Korean Hanja (KSC5601) -*-coding: iso-2022-7bit;-*-
2 2
3;; Copyright (C) 1997, 1999, 2002 Free Software Foundation, Inc. 3;; Copyright (C) 1997, 1999, 2002, 2006 Free Software Foundation, Inc.
4 4
5;; Author: Koaunghi Un <koanughi.un@zdv.uni-tuebingen.de> 5;; Author: Koaunghi Un <koanughi.un@zdv.uni-tuebingen.de>
6;; Keywords: mule, quail, multilingual, input method, Korean, Hanja 6;; Keywords: mule, quail, multilingual, input method, Korean, Hanja
diff --git a/leim/quail/indian.el b/leim/quail/indian.el
index fa2dd6d80bd..06e8dd23d2b 100644
--- a/leim/quail/indian.el
+++ b/leim/quail/indian.el
@@ -1,6 +1,6 @@
1;;; indian.el --- Quail packages for inputting Indian 1;;; indian.el --- Quail packages for inputting Indian
2 2
3;; Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. 3;; Copyright (C) 2000, 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
4 4
5;; Author: KAWABATA, Taichi <kawabata@m17n.org> 5;; Author: KAWABATA, Taichi <kawabata@m17n.org>
6 6
diff --git a/leim/quail/japanese.el b/leim/quail/japanese.el
index 2961e1856f5..18cd23ae2ed 100644
--- a/leim/quail/japanese.el
+++ b/leim/quail/japanese.el
@@ -1,6 +1,6 @@
1;;; japanese.el --- Quail package for inputting Japanese -*-coding: iso-2022-7bit;-*- 1;;; japanese.el --- Quail package for inputting Japanese -*-coding: iso-2022-7bit;-*-
2 2
3;; Copyright (C) 2001 Free Software Foundation, Inc. 3;; Copyright (C) 2001, 2006 Free Software Foundation, Inc.
4;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2005 4;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2005
5;; National Institute of Advanced Industrial Science and Technology (AIST) 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021 6;; Registration Number H14PRO021
diff --git a/leim/quail/latin-alt.el b/leim/quail/latin-alt.el
index f52467a5d64..330c1b904b2 100644
--- a/leim/quail/latin-alt.el
+++ b/leim/quail/latin-alt.el
@@ -1,6 +1,6 @@
1;;; latin-alt.el --- Quail package for inputting various European characters -*-coding: utf-8;-*- 1;;; latin-alt.el --- Quail package for inputting various European characters -*-coding: utf-8;-*-
2 2
3;; Copyright (C) 1997, 1998, 2001, 2002 Free Software Foundation, Inc. 3;; Copyright (C) 1997, 1998, 2001, 2002, 2006 Free Software Foundation, Inc.
4;; Copyright (C) 1999 4;; Copyright (C) 1999
5;; National Institute of Advanced Industrial Science and Technology (AIST) 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021 6;; Registration Number H14PRO021
diff --git a/leim/quail/latin-ltx.el b/leim/quail/latin-ltx.el
index 9816cd42216..e0cb38ee562 100644
--- a/leim/quail/latin-ltx.el
+++ b/leim/quail/latin-ltx.el
@@ -1,6 +1,6 @@
1;;; latin-ltx.el --- Quail package for TeX-style input -*-coding: utf-8;-*- 1;;; latin-ltx.el --- Quail package for TeX-style input -*-coding: utf-8;-*-
2 2
3;; Copyright (C) 2001, 2003, 2004, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
4;; Copyright (C) 2001, 2005 4;; Copyright (C) 2001, 2005
5;; National Institute of Advanced Industrial Science and Technology (AIST) 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021 6;; Registration Number H14PRO021
diff --git a/leim/quail/latin-post.el b/leim/quail/latin-post.el
index 428910bcdd5..a3c7d9cb30e 100644
--- a/leim/quail/latin-post.el
+++ b/leim/quail/latin-post.el
@@ -1,6 +1,6 @@
1;;; latin-post.el --- Quail packages for inputting various European characters -*-coding: utf-8;-*- 1;;; latin-post.el --- Quail packages for inputting various European characters -*-coding: utf-8;-*-
2 2
3;; Copyright (C) 1997, 1998, 2001, 2002 Free Software Foundation, Inc. 3;; Copyright (C) 1997, 1998, 2001, 2002, 2006 Free Software Foundation, Inc.
4;; Copyright (C) 1997, 1999 4;; Copyright (C) 1997, 1999
5;; National Institute of Advanced Industrial Science and Technology (AIST) 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021 6;; Registration Number H14PRO021
diff --git a/leim/quail/latin-pre.el b/leim/quail/latin-pre.el
index 92ed76b5915..eb5c118b9f8 100644
--- a/leim/quail/latin-pre.el
+++ b/leim/quail/latin-pre.el
@@ -1,6 +1,6 @@
1;;; latin-pre.el --- Quail packages for inputting various European characters -*-coding: utf-8;-*- 1;;; latin-pre.el --- Quail packages for inputting various European characters -*-coding: utf-8;-*-
2 2
3;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 3;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2006
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5;; Copyright (C) 1997, 1998, 1999, 2000, 2005 5;; Copyright (C) 1997, 1998, 1999, 2000, 2005
6;; National Institute of Advanced Industrial Science and Technology (AIST) 6;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/leim/quail/lrt.el b/leim/quail/lrt.el
index 7c994944f1f..7985523f7e1 100644
--- a/leim/quail/lrt.el
+++ b/leim/quail/lrt.el
@@ -1,6 +1,6 @@
1;;; lrt.el --- Quail package for inputting Lao characters by LRT method -*-coding: iso-2022-7bit;-*- 1;;; lrt.el --- Quail package for inputting Lao characters by LRT method -*-coding: iso-2022-7bit;-*-
2 2
3;; Copyright (C) 1998 Free Software Foundation, Inc. 3;; Copyright (C) 1998, 2006 Free Software Foundation, Inc.
4;; Copyright (C) 1997, 1999 4;; Copyright (C) 1997, 1999
5;; National Institute of Advanced Industrial Science and Technology (AIST) 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021 6;; Registration Number H14PRO021
diff --git a/leim/quail/py-punct.el b/leim/quail/py-punct.el
index b07530963ed..04874b6cb60 100644
--- a/leim/quail/py-punct.el
+++ b/leim/quail/py-punct.el
@@ -1,6 +1,6 @@
1;;; py-punct.el --- Quail packages for Chinese (pinyin + extra symbols) -*-coding: iso-2022-7bit;-*- 1;;; py-punct.el --- Quail packages for Chinese (pinyin + extra symbols) -*-coding: iso-2022-7bit;-*-
2 2
3;; Copyright (C) 2001 Free Software Foundation, Inc. 3;; Copyright (C) 2001, 2006 Free Software Foundation, Inc.
4;; Copyright (C) 1997, 2000 4;; Copyright (C) 1997, 2000
5;; National Institute of Advanced Industrial Science and Technology (AIST) 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021 6;; Registration Number H14PRO021
diff --git a/leim/quail/rfc1345.el b/leim/quail/rfc1345.el
index de96b32d6e8..bf71aebcd52 100644
--- a/leim/quail/rfc1345.el
+++ b/leim/quail/rfc1345.el
Binary files differ
diff --git a/leim/quail/sgml-input.el b/leim/quail/sgml-input.el
index a962e9b7571..6bed808c83a 100644
--- a/leim/quail/sgml-input.el
+++ b/leim/quail/sgml-input.el
@@ -1,6 +1,6 @@
1;;; sgml-input.el --- Quail method for Unicode entered as SGML entities -*- coding: utf-8 -*- 1;;; sgml-input.el --- Quail method for Unicode entered as SGML entities -*- coding: utf-8 -*-
2 2
3;; Copyright (C) 2001 Free Software Foundation, Inc. 3;; Copyright (C) 2001, 2006 Free Software Foundation, Inc.
4 4
5;; Author: Dave Love <fx@gnu.org> 5;; Author: Dave Love <fx@gnu.org>
6;; Keywords: i18n 6;; Keywords: i18n
diff --git a/leim/quail/sisheng.el b/leim/quail/sisheng.el
index da294ff7215..48205fb57f8 100644
--- a/leim/quail/sisheng.el
+++ b/leim/quail/sisheng.el
@@ -1,6 +1,6 @@
1;;; sisheng.el --- sisheng input method for Chinese pinyin transliteration 1;;; sisheng.el --- sisheng input method for Chinese pinyin transliteration
2 2
3;; Copyright (C) 2004 Free Software Foundation, Inc. 3;; Copyright (C) 2004, 2006 Free Software Foundation, Inc.
4 4
5;; Author: Werner LEMBERG <wl@gnu.org> 5;; Author: Werner LEMBERG <wl@gnu.org>
6 6
diff --git a/leim/quail/slovak.el b/leim/quail/slovak.el
index d8114842522..f8a05f657d5 100644
--- a/leim/quail/slovak.el
+++ b/leim/quail/slovak.el
@@ -1,6 +1,6 @@
1;;; slovak.el --- Quail package for inputting Slovak -*-coding: iso-2022-7bit;-*- 1;;; slovak.el --- Quail package for inputting Slovak -*-coding: iso-2022-7bit;-*-
2 2
3;; Copyright (C) 1998, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1998, 2001, 2006 Free Software Foundation, Inc.
4 4
5;; Authors: Tibor ,B)(Bimko <tibor.simko@fmph.uniba.sk> 5;; Authors: Tibor ,B)(Bimko <tibor.simko@fmph.uniba.sk>
6;; Milan Zamazal <pdm@zamazal.org> 6;; Milan Zamazal <pdm@zamazal.org>
diff --git a/leim/quail/symbol-ksc.el b/leim/quail/symbol-ksc.el
index 385fe947696..1747d40c109 100644
--- a/leim/quail/symbol-ksc.el
+++ b/leim/quail/symbol-ksc.el
@@ -1,6 +1,6 @@
1;;; symbol-ksc.el --- Quail-package for Korean Symbol (KSC5601) -*-coding: iso-2022-7bit;-*- 1;;; symbol-ksc.el --- Quail-package for Korean Symbol (KSC5601) -*-coding: iso-2022-7bit;-*-
2 2
3;; Copyright (C) 1997, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1997, 2005, 2006 Free Software Foundation, Inc.
4;; Copyright (C) 1997, 1998 4;; Copyright (C) 1997, 1998
5;; National Institute of Advanced Industrial Science and Technology (AIST) 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021 6;; Registration Number H14PRO021
diff --git a/leim/quail/tibetan.el b/leim/quail/tibetan.el
index 921b3732c6f..e3f9f3c8bfb 100644
--- a/leim/quail/tibetan.el
+++ b/leim/quail/tibetan.el
@@ -1,6 +1,6 @@
1;;; tibetan.el --- Quail package for inputting Tibetan characters -*-coding: iso-2022-7bit;-*- 1;;; tibetan.el --- Quail package for inputting Tibetan characters -*-coding: iso-2022-7bit;-*-
2 2
3;; Copyright (C) 1997 Free Software Foundation, Inc. 3;; Copyright (C) 1997, 2006 Free Software Foundation, Inc.
4;; Copyright (C) 1997, 1998, 1999, 2000 4;; Copyright (C) 1997, 1998, 1999, 2000
5;; National Institute of Advanced Industrial Science and Technology (AIST) 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021 6;; Registration Number H14PRO021
diff --git a/leim/quail/uni-input.el b/leim/quail/uni-input.el
index d623c333a06..11d5d7393a8 100644
--- a/leim/quail/uni-input.el
+++ b/leim/quail/uni-input.el
@@ -1,6 +1,6 @@
1;;; uni-input.el --- Hex Unicode input method 1;;; uni-input.el --- Hex Unicode input method
2 2
3;; Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. 3;; Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
4;; Copyright (C) 2004 4;; Copyright (C) 2004
5;; National Institute of Advanced Industrial Science and Technology (AIST) 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021 6;; Registration Number H14PRO021
diff --git a/leim/quail/vntelex.el b/leim/quail/vntelex.el
index e2ff88bc25f..09d4daf2212 100644
--- a/leim/quail/vntelex.el
+++ b/leim/quail/vntelex.el
@@ -1,6 +1,6 @@
1;;; vntelex.el --- Quail package for Vietnamese by Telex method 1;;; vntelex.el --- Quail package for Vietnamese by Telex method
2 2
3;; Copyright (C) 2001, 2002 Free Software Foundation, Inc. 3;; Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
4 4
5;; Author: Werner Lemberg <wl@gnu.org> 5;; Author: Werner Lemberg <wl@gnu.org>
6;; Keywords: multilingual, input method, Vietnamese 6;; Keywords: multilingual, input method, Vietnamese
diff --git a/leim/quail/welsh.el b/leim/quail/welsh.el
index 97b12725760..50fa9621d4a 100644
--- a/leim/quail/welsh.el
+++ b/leim/quail/welsh.el
@@ -1,6 +1,6 @@
1;;; welsh.el --- Quail package for inputting Welsh characters -*-coding: iso-2022-7bit;-*- 1;;; welsh.el --- Quail package for inputting Welsh characters -*-coding: iso-2022-7bit;-*-
2 2
3;; Copyright (C) 2001 Free Software Foundation, Inc. 3;; Copyright (C) 2001, 2006 Free Software Foundation, Inc.
4 4
5;; Author: Dave Love <fx@gnu.org> 5;; Author: Dave Love <fx@gnu.org>
6;; Keywords: i18n 6;; Keywords: i18n
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 002c1c6e8ef..56ee9cb71e6 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,173 @@
12006-04-21 Nick Roberts <nickrob@snap.net.nz>
2
3 * progmodes/gdb-ui.el (gdb-data-list-register-values-handler):
4 Use font-lock-warning-face for any errors e.g. no stack.
5 (gdb-stack-list-locals-handler): Display any errors e.g. no stack.
6
72006-04-20 Dan Nicolaescu <dann@ics.uci.edu>
8
9 * progmodes/sh-script.el (sh-shell): Mark as safe.
10
11 * newcomment.el (comment-start, comment-start-skip)
12 (comment-end-skip, comment-end): Mark as safe.
13
142006-04-20 Carsten Dominik <dominik@science.uva.nl>
15
16 * textmodes/org.el: (org-deadline-announce): Face removed.
17 (org-level-faces, org-n-levels): Converted to constant.
18 (org-compatible-face): New function.
19 (org-hide, org-level-1, org-level-2, org-level-3, org-level-4)
20 (org-level-5, org-level-6, org-level-7, org-level-8)
21 (org-special-keyword, org-warning, org-headline-done, org-link)
22 (org-date, org-tag, org-todo, org-done, org-table, org-formula)
23 (org-scheduled-today, org-scheduled-previously, org-time-grid):
24 Face definition revised for better color tty support.
25 (org-bold-re, org-italic-re, org-underline-re): New constants.
26 (org-set-font-lock-defaults): Use the new constants.
27 (org-agenda-highlight-todo): New function.
28 (org-agenda-todo): Fixed bug with point at end of line.
29 (org-agenda-change-all-lines, org-finalize-agenda-entries):
30 Fontify TODO keywords.
31 (org-insert-link): Preserve relative path in ../ links.
32 (org-export-as-html): Convert links pointing to .org files into
33 links that will work beteen the exported HTML files.
34 (org-todo-list): Fix bug when arg=0.
35 (org-insert-heading): More fine-tuning.
36
372006-04-19 Romain Francoise <romain@orebokech.com>
38
39 * mail/rmail.el (rmail-convert-to-babyl-format): Use second group
40 from `rmail-mime-charset-pattern'.
41
422006-04-18 Dan Nicolaescu <dann@ics.uci.edu>
43
44 * progmodes/python.el (python-mode): Fix typo.
45
462006-04-18 J.D. Smith <jdsmith@as.arizona.edu>
47
48 * comint.el (comint-previous-input): Don't clobber input line
49 when moving off either end of the input history ring.
50 (comint-delete-input): New function, used by
51 `comint-previous-input' and others.
52 (comint-previous-matching-input): Use
53 `coming-delete-input'. Save the partial input if leaving the
54 edit line. Goto point-max before deleting input to avoid
55 partial input fragments hanging around.
56 (comint-restore-input): New function, used by
57 `comint-previous-input', and bound to "C-c C-j".
58
592006-04-18 Luc Teirlinck <teirllm@auburn.edu>
60
61 * imenu.el (imenu--index-alist): Balance parentheses.
62
632006-04-18 Dan Nicolaescu <dann@ics.uci.edu>
64
65 * progmodes/python.el (python-mode): Add support for
66 hs-minor-mode.
67
682006-04-19 Reiner Steib <Reiner.Steib@gmx.de>
69
70 * abbrev.el (read-abbrev-file): Use abbrev-file-name if optional
71 file is nil.
72
732006-04-18 Richard Stallman <rms@gnu.org>
74
75 * tooltip.el (tooltip-mode, tooltip-use-echo-area): Doc fixes.
76
77 * imenu.el (imenu-create-index-function, imenu--index-alist)
78 (imenu--last-menubar-index-alist, imenu--make-index-alist)
79 (imenu-default-create-index-function, imenu--generic-function):
80 Doc fixes.
81
82 * image-mode.el (image-toggle-display): Handle tar and arc subfiles.
83
84 * help-mode.el (help-mode): Set view-exit-action to delete window.
85
86 * env.el (setenv): Get rid of arg UNSET. Interactive unsetting
87 now works by passing nil as arg.
88
89 * apropos.el (apropos-print): Don't do where-is on self-insert-command.
90
91 * abbrev.el (edit-abbrevs-redefine): Temporarily widen.
92 (read-abbrev-file): Provide default when reading filename.
93
94 * files.el (enable-local-variables): Allow :all as value.
95 (hack-local-variables): Implement that value.
96 (safe-local-variable-values, safe-local-eval-forms)
97 (enable-local-variables): Mark as risky.
98 (find-file-visit-truename, kept-old-versions): Mark safe.
99
100 * time-stamp.el (time-stamp-format, time-stamp-line-limit)
101 (time-stamp-start, time-stamp-end, time-stamp-inserts-lines)
102 (time-stamp-count, time-stamp-pattern): Add safe-local-variable prop.
103
1042006-04-18 Stefan Monnier <monnier@iro.umontreal.ca>
105
106 * progmodes/tcl.el (tcl-send-string, tcl-send-region):
107 Use forward-line so as to get to BOL even in the presence of fields.
108 (tcl-eval-region): Strip surrounding space to avoid multiple prompts
109 in return.
110 (inferior-tcl): Tell tclsh to work in interactive mode.
111
112 * complete.el (partial-completion-mode):
113 Use 'choose-completion-string-functions to make sure that
114 choose-completion fills the minibuffer properly.
115
116 * complete.el (PC-old-read-file-name-internal): Remove.
117 (PC-read-include-file-name-internal): Remove. Turn it into an advice
118 of read-file-name-internal.
119 (partial-completion-mode): Enable/disable this advice.
120
1212006-04-18 Juanma Barranquero <lekktu@gmail.com>
122
123 * net/tramp.el (tramp-completion-file-name-handler): Revert change
124 of 2006-04-17.
125
1262006-04-18 Carsten Dominik <dominik@science.uva.nl>
127
128 * textmodes/org.el (org-insert-heading): Insert heading before
129 current if at beginning of line.
130 (org-todo, org-date): New faces.
131 (org-table-align): Make sure tooltip window contains full text.
132 (org-no-properties): New defsubst.
133 (org-set-font-lock-defaults): Use new faces.
134
1352006-04-18 Nick Roberts <nickrob@snap.net.nz>
136
137 * progmodes/gud.el (gud-speedbar-item-info): Display frame address
138 for root variables.
139
140 * progmodes/gdb-ui.el (gdb-pc-address): Rename from gdb-frame-address.
141 (gdb-frame-address): Re-use to identify frame for watch expression.
142 (gdb-var-list, gdb-var-create-handler): Add frame address for root
143 variables.
144 (gdb-init-1, gdb-source, gdb-post-prompt, )
145 (gdb-assembler-custom, gdb-invalidate-assembler): Use gdb-pc-address.
146 (gdb-frame-handler): Get gdb-frame-address.
147
1482006-04-17 Michael Albinus <michael.albinus@gmx.de>
149
150 Sync with Tramp 2.0.53.
151
152 * net/tramp.el (tramp-completion-mode): ?\t has event-modifier
153 'control. Reported by Matthias F,bv(Brste <slashdevslashnull@gmx.net>.
154 (tramp-completion-file-name-handler): Add autoload cookie for
155 adding to `file-name-handler-alist'.
156
157 * net/tramp-smb.el (tramp-smb-wait-for-output): Wait always for
158 the prompt. If it returns earlier (when detecting an error
159 message), the rest of the output will merge accidently with the
160 output of the next command. Reported by M Jared Finder
161 <jared@hpalace.com>.
162
163 * net/tramp-vc.el (vc-user-login-name): Wrap defadvice with a test
164 for `process-file', in order to let it work for older Emacsen too.
165
1662006-04-17 Ralf Angeli <angeli@iwi.uni-sb.de>
167
168 * textmodes/tex-mode.el (tex-font-lock-match-suscript): New function.
169 (tex-font-lock-keywords-3): Use it.
170
12006-04-16 Stefan Monnier <monnier@iro.umontreal.ca> 1712006-04-16 Stefan Monnier <monnier@iro.umontreal.ca>
2 172
3 * newcomment.el (comment-add): New function. 173 * newcomment.el (comment-add): New function.
@@ -2928,7 +3098,7 @@
2928 (vc-default-update-changelog): Don't use vc-user-login-name, we 3098 (vc-default-update-changelog): Don't use vc-user-login-name, we
2929 don't need it here. 3099 don't need it here.
2930 3100
2931 * tramp-vc.el (vc-user-login-name): Comment out defadvice, it is 3101 * net/tramp-vc.el (vc-user-login-name): Comment out defadvice, it is
2932 no longer necessary. 3102 no longer necessary.
2933 3103
29342006-01-25 Kenichi Handa <handa@m17n.org> 31042006-01-25 Kenichi Handa <handa@m17n.org>
diff --git a/lisp/abbrev.el b/lisp/abbrev.el
index d7bce2b313a..9ba53f6f6f5 100644
--- a/lisp/abbrev.el
+++ b/lisp/abbrev.el
@@ -160,8 +160,10 @@ or may be omitted (it is usually omitted)."
160(defun edit-abbrevs-redefine () 160(defun edit-abbrevs-redefine ()
161 "Redefine abbrevs according to current buffer contents." 161 "Redefine abbrevs according to current buffer contents."
162 (interactive) 162 (interactive)
163 (define-abbrevs t) 163 (save-restriction
164 (set-buffer-modified-p nil)) 164 (widen)
165 (define-abbrevs t)
166 (set-buffer-modified-p nil)))
165 167
166(defun define-abbrevs (&optional arg) 168(defun define-abbrevs (&optional arg)
167 "Define abbrevs according to current visible buffer contents. 169 "Define abbrevs according to current visible buffer contents.
@@ -195,9 +197,12 @@ the ones defined from the buffer now."
195Optional argument FILE is the name of the file to read; 197Optional argument FILE is the name of the file to read;
196it defaults to the value of `abbrev-file-name'. 198it defaults to the value of `abbrev-file-name'.
197Optional second argument QUIETLY non-nil means don't display a message." 199Optional second argument QUIETLY non-nil means don't display a message."
198 (interactive "fRead abbrev file: ") 200 (interactive
199 (load (if (and file (> (length file) 0)) file abbrev-file-name) 201 (list
200 nil quietly) 202 (read-file-name (format "Read abbrev file (default %s): "
203 abbrev-file-name)
204 nil abbrev-file-name t)))
205 (load (or file abbrev-file-name) nil quietly)
201 (setq abbrevs-changed nil)) 206 (setq abbrevs-changed nil))
202 207
203(defun quietly-read-abbrev-file (&optional file) 208(defun quietly-read-abbrev-file (&optional file)
diff --git a/lisp/apropos.el b/lisp/apropos.el
index b490b8173ba..3889655ff99 100644
--- a/lisp/apropos.el
+++ b/lisp/apropos.el
@@ -908,6 +908,7 @@ If non-nil TEXT is a string that will be printed as a heading."
908 ;; Calculate key-bindings if we want them. 908 ;; Calculate key-bindings if we want them.
909 (and do-keys 909 (and do-keys
910 (commandp symbol) 910 (commandp symbol)
911 (not (eq symbol 'self-insert-command))
911 (indent-to 30 1) 912 (indent-to 30 1)
912 (if (let ((keys 913 (if (let ((keys
913 (save-excursion 914 (save-excursion
diff --git a/lisp/comint.el b/lisp/comint.el
index 5ab00354f80..f8edc85c1ac 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -558,6 +558,9 @@ This is to support the command \\[comint-get-next-from-history].")
558 "Non-nil if you are accumulating input lines to send as input together. 558 "Non-nil if you are accumulating input lines to send as input together.
559The command \\[comint-accumulate] sets this.") 559The command \\[comint-accumulate] sets this.")
560 560
561(defvar comint-stored-incomplete-input nil
562 "Stored input for history cycling.")
563
561(put 'comint-replace-by-expanded-history 'menu-enable 'comint-input-autoexpand) 564(put 'comint-replace-by-expanded-history 'menu-enable 'comint-input-autoexpand)
562(put 'comint-input-ring 'permanent-local t) 565(put 'comint-input-ring 'permanent-local t)
563(put 'comint-input-ring-index 'permanent-local t) 566(put 'comint-input-ring-index 'permanent-local t)
@@ -638,6 +641,7 @@ Entry to this mode runs the hooks on `comint-mode-hook'."
638 (make-local-variable 'comint-scroll-to-bottom-on-input) 641 (make-local-variable 'comint-scroll-to-bottom-on-input)
639 (make-local-variable 'comint-move-point-for-output) 642 (make-local-variable 'comint-move-point-for-output)
640 (make-local-variable 'comint-scroll-show-maximum-output) 643 (make-local-variable 'comint-scroll-show-maximum-output)
644 (make-local-variable 'comint-stored-incomplete-input)
641 ;; This makes it really work to keep point at the bottom. 645 ;; This makes it really work to keep point at the bottom.
642 (make-local-variable 'scroll-conservatively) 646 (make-local-variable 'scroll-conservatively)
643 (setq scroll-conservatively 10000) 647 (setq scroll-conservatively 10000)
@@ -1015,6 +1019,16 @@ See also `comint-read-input-ring'."
1015 (t 1019 (t
1016 arg))) 1020 arg)))
1017 1021
1022(defun comint-restore-input ()
1023 "Restore unfinished input."
1024 (interactive)
1025 (when comint-input-ring-index
1026 (comint-delete-input)
1027 (when (> (length comint-stored-incomplete-input) 0)
1028 (insert comint-stored-incomplete-input)
1029 (message "Input restored"))
1030 (setq comint-input-ring-index nil)))
1031
1018(defun comint-search-start (arg) 1032(defun comint-search-start (arg)
1019 "Index to start a directional search, starting at `comint-input-ring-index'." 1033 "Index to start a directional search, starting at `comint-input-ring-index'."
1020 (if comint-input-ring-index 1034 (if comint-input-ring-index
@@ -1035,9 +1049,18 @@ Moves relative to `comint-input-ring-index'."
1035 arg))) 1049 arg)))
1036 1050
1037(defun comint-previous-input (arg) 1051(defun comint-previous-input (arg)
1038 "Cycle backwards through input history." 1052 "Cycle backwards through input history, saving input."
1039 (interactive "*p") 1053 (interactive "*p")
1040 (comint-previous-matching-input "." arg)) 1054 (if (and comint-input-ring-index
1055 (or ;; leaving the "end" of the ring
1056 (and (< arg 0) ; going down
1057 (eq comint-input-ring-index 0))
1058 (and (> arg 0) ; going up
1059 (eq comint-input-ring-index
1060 (1- (ring-length comint-input-ring)))))
1061 comint-stored-incomplete-input)
1062 (comint-restore-input)
1063 (comint-previous-matching-input "." arg)))
1041 1064
1042(defun comint-next-input (arg) 1065(defun comint-next-input (arg)
1043 "Cycle forwards through input history." 1066 "Cycle forwards through input history."
@@ -1077,6 +1100,14 @@ Moves relative to START, or `comint-input-ring-index'."
1077 (if (string-match regexp (ring-ref comint-input-ring n)) 1100 (if (string-match regexp (ring-ref comint-input-ring n))
1078 n))) 1101 n)))
1079 1102
1103(defun comint-delete-input ()
1104 "Delete all input between accumulation or process mark and point."
1105 (delete-region
1106 ;; Can't use kill-region as it sets this-command
1107 (or (marker-position comint-accum-marker)
1108 (process-mark (get-buffer-process (current-buffer))))
1109 (point-max)))
1110
1080(defun comint-previous-matching-input (regexp n) 1111(defun comint-previous-matching-input (regexp n)
1081 "Search backwards through input history for match for REGEXP. 1112 "Search backwards through input history for match for REGEXP.
1082\(Previous history elements are earlier commands.) 1113\(Previous history elements are earlier commands.)
@@ -1088,13 +1119,13 @@ If N is negative, find the next or Nth next match."
1088 ;; Has a match been found? 1119 ;; Has a match been found?
1089 (if (null pos) 1120 (if (null pos)
1090 (error "Not found") 1121 (error "Not found")
1122 ;; If leaving the edit line, save partial input
1123 (if (null comint-input-ring-index) ;not yet on ring
1124 (setq comint-stored-incomplete-input
1125 (funcall comint-get-old-input)))
1091 (setq comint-input-ring-index pos) 1126 (setq comint-input-ring-index pos)
1092 (message "History item: %d" (1+ pos)) 1127 (message "History item: %d" (1+ pos))
1093 (delete-region 1128 (comint-delete-input)
1094 ;; Can't use kill-region as it sets this-command
1095 (or (marker-position comint-accum-marker)
1096 (process-mark (get-buffer-process (current-buffer))))
1097 (point))
1098 (insert (ring-ref comint-input-ring pos))))) 1129 (insert (ring-ref comint-input-ring pos)))))
1099 1130
1100(defun comint-next-matching-input (regexp n) 1131(defun comint-next-matching-input (regexp n)
diff --git a/lisp/complete.el b/lisp/complete.el
index a50d02c41f0..6620db860c3 100644
--- a/lisp/complete.el
+++ b/lisp/complete.el
@@ -141,8 +141,6 @@ If nil, means use the colon-separated path in the variable $INCPATH instead."
141 "A list of the environment variable names and values.") 141 "A list of the environment variable names and values.")
142 142
143 143
144(defvar PC-old-read-file-name-internal nil)
145
146(defun PC-bindings (bind) 144(defun PC-bindings (bind)
147 (let ((completion-map minibuffer-local-completion-map) 145 (let ((completion-map minibuffer-local-completion-map)
148 (must-match-map minibuffer-local-must-match-map)) 146 (must-match-map minibuffer-local-must-match-map))
@@ -219,21 +217,32 @@ second TAB brings up the `*Completions*' buffer."
219 ((not PC-disable-includes) 217 ((not PC-disable-includes)
220 (add-hook 'find-file-not-found-functions 'PC-look-for-include-file))) 218 (add-hook 'find-file-not-found-functions 'PC-look-for-include-file)))
221 ;; ... with some underhand redefining. 219 ;; ... with some underhand redefining.
222 (cond ((and (not partial-completion-mode) 220 (cond ((not partial-completion-mode)
223 (functionp PC-old-read-file-name-internal)) 221 (ad-disable-advice 'read-file-name-internal 'around 'PC-include-file)
224 (fset 'read-file-name-internal PC-old-read-file-name-internal)) 222 (ad-activate 'read-file-name-internal))
225 ((and (not PC-disable-includes) (not PC-old-read-file-name-internal)) 223 ((not PC-disable-includes)
226 (setq PC-old-read-file-name-internal 224 (ad-enable-advice 'read-file-name-internal 'around 'PC-include-file)
227 (symbol-function 'read-file-name-internal)) 225 (ad-activate 'read-file-name-internal)))
228 (fset 'read-file-name-internal 226 ;; Adjust the completion selection in *Completion* buffers to the way
229 'PC-read-include-file-name-internal))) 227 ;; we work. The default minibuffer completion code only completes the
230 (when (and partial-completion-mode (null PC-env-vars-alist)) 228 ;; text before point and leaves the text after point alone (new in
231 (setq PC-env-vars-alist 229 ;; Emacs-22). In contrast we use the whole text and we even sometimes
232 (mapcar (lambda (string) 230 ;; move point to a place before EOB, to indicate the first position where
233 (let ((d (string-match "=" string))) 231 ;; there's a difference, so when the user uses choose-completion, we have
234 (cons (concat "$" (substring string 0 d)) 232 ;; to trick choose-completion into replacing the whole minibuffer text
235 (and d (substring string (1+ d)))))) 233 ;; rather than only the text before point. --Stef
236 process-environment)))) 234 (funcall
235 (if partial-completion-mode 'add-hook 'remove-hook)
236 'choose-completion-string-functions
237 (lambda (&rest x) (goto-char (point-max)) nil))
238 ;; Build the env-completion and mapping table.
239 (when (and partial-completion-mode (null PC-env-vars-alist))
240 (setq PC-env-vars-alist
241 (mapcar (lambda (string)
242 (let ((d (string-match "=" string)))
243 (cons (concat "$" (substring string 0 d))
244 (and d (substring string (1+ d))))))
245 process-environment))))
237 246
238 247
239(defun PC-complete () 248(defun PC-complete ()
@@ -930,20 +939,23 @@ absolute rather than relative to some directory on the SEARCH-PATH."
930 (setq sorted (cdr sorted))) 939 (setq sorted (cdr sorted)))
931 compressed)))) 940 compressed))))
932 941
933(defun PC-read-include-file-name-internal (string dir action) 942(defadvice read-file-name-internal (around PC-include-file disable)
934 (if (string-match "<\\([^\"<>]*\\)>?$" string) 943 (if (string-match "<\\([^\"<>]*\\)>?\\'" (ad-get-arg 0))
935 (let* ((name (substring string (match-beginning 1) (match-end 1))) 944 (let* ((string (ad-get-arg 0))
945 (action (ad-get-arg 2))
946 (name (substring string (match-beginning 1) (match-end 1)))
936 (str2 (substring string (match-beginning 0))) 947 (str2 (substring string (match-beginning 0)))
937 (completion-table 948 (completion-table
938 (mapcar (function (lambda (x) (list (format "<%s>" x)))) 949 (mapcar (lambda (x) (format "<%s>" x))
939 (PC-include-file-all-completions 950 (PC-include-file-all-completions
940 name (PC-include-file-path))))) 951 name (PC-include-file-path)))))
941 (cond 952 (setq ad-return-value
942 ((not completion-table) nil) 953 (cond
943 ((eq action nil) (try-completion str2 completion-table nil)) 954 ((not completion-table) nil)
944 ((eq action t) (all-completions str2 completion-table nil)) 955 ((eq action 'lambda) (test-completion str2 completion-table nil))
945 ((eq action 'lambda) (test-completion str2 completion-table nil)))) 956 ((eq action nil) (try-completion str2 completion-table nil))
946 (funcall PC-old-read-file-name-internal string dir action))) 957 ((eq action t) (all-completions str2 completion-table nil)))))
958 ad-do-it))
947 959
948 960
949(provide 'complete) 961(provide 'complete)
diff --git a/lisp/env.el b/lisp/env.el
index 81760ececfc..1b6c038cbea 100644
--- a/lisp/env.el
+++ b/lisp/env.el
@@ -90,28 +90,30 @@ Use `$$' to insert a single dollar sign."
90 90
91;; Fixme: Should `process-environment' be recoded if LC_CTYPE &c is set? 91;; Fixme: Should `process-environment' be recoded if LC_CTYPE &c is set?
92 92
93(defun setenv (variable &optional value unset substitute-env-vars) 93(defun setenv (variable &optional value substitute-env-vars)
94 "Set the value of the environment variable named VARIABLE to VALUE. 94 "Set the value of the environment variable named VARIABLE to VALUE.
95VARIABLE should be a string. VALUE is optional; if not provided or 95VARIABLE should be a string. VALUE is optional; if not provided or
96nil, the environment variable VARIABLE will be removed. UNSET 96nil, the environment variable VARIABLE will be removed.
97if non-nil means to remove VARIABLE from the environment.
98SUBSTITUTE-ENV-VARS, if non-nil, means to substitute environment
99variables in VALUE with `substitute-env-vars', where see.
100Value is the new value if VARIABLE, or nil if removed from the
101environment.
102 97
103Interactively, a prefix argument means to unset the variable. 98Interactively, a prefix argument means to unset the variable.
104Interactively, the current value (if any) of the variable 99Interactively, the current value (if any) of the variable
105appears at the front of the history list when you type in the new value. 100appears at the front of the history list when you type in the new value.
106Interactively, always replace environment variables in the new value. 101Interactively, always replace environment variables in the new value.
107 102
103SUBSTITUTE-ENV-VARS, if non-nil, means to substitute environment
104variables in VALUE with `substitute-env-vars', which see.
105This is normally used only for interactive calls.
106
107The return value is the new value of VARIABLE, or nil if
108it was removed from the environment.
109
108This function works by modifying `process-environment'. 110This function works by modifying `process-environment'.
109 111
110As a special case, setting variable `TZ' calls `set-time-zone-rule' as 112As a special case, setting variable `TZ' calls `set-time-zone-rule' as
111a side-effect." 113a side-effect."
112 (interactive 114 (interactive
113 (if current-prefix-arg 115 (if current-prefix-arg
114 (list (read-envvar-name "Clear environment variable: " 'exact) nil t) 116 (list (read-envvar-name "Clear environment variable: " 'exact) nil)
115 (let* ((var (read-envvar-name "Set environment variable: " nil)) 117 (let* ((var (read-envvar-name "Set environment variable: " nil))
116 (value (getenv var))) 118 (value (getenv var)))
117 (when value 119 (when value
@@ -121,7 +123,6 @@ a side-effect."
121 (read-from-minibuffer (format "Set %s to value: " var) 123 (read-from-minibuffer (format "Set %s to value: " var)
122 nil nil nil 'setenv-history 124 nil nil nil 'setenv-history
123 value) 125 value)
124 nil
125 t)))) 126 t))))
126 (if (and (multibyte-string-p variable) locale-coding-system) 127 (if (and (multibyte-string-p variable) locale-coding-system)
127 (let ((codings (find-coding-systems-string (concat variable value)))) 128 (let ((codings (find-coding-systems-string (concat variable value))))
@@ -129,10 +130,9 @@ a side-effect."
129 (memq (coding-system-base locale-coding-system) codings)) 130 (memq (coding-system-base locale-coding-system) codings))
130 (error "Can't encode `%s=%s' with `locale-coding-system'" 131 (error "Can't encode `%s=%s' with `locale-coding-system'"
131 variable (or value ""))))) 132 variable (or value "")))))
132 (if unset 133 (and value
133 (setq value nil) 134 substitute-env-vars
134 (if substitute-env-vars 135 (setq value (substitute-env-vars value)))
135 (setq value (substitute-env-vars value))))
136 (if (multibyte-string-p variable) 136 (if (multibyte-string-p variable)
137 (setq variable (encode-coding-string variable locale-coding-system))) 137 (setq variable (encode-coding-string variable locale-coding-system)))
138 (if (and value (multibyte-string-p value)) 138 (if (and value (multibyte-string-p value))
diff --git a/lisp/files.el b/lisp/files.el
index cd474e868d0..df63e016c63 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -452,6 +452,8 @@ not safe, Emacs queries you, once, whether to set them all.
452\(When you say yes to certain values, they are remembered as safe.) 452\(When you say yes to certain values, they are remembered as safe.)
453 453
454:safe means set the safe variables, and ignore the rest. 454:safe means set the safe variables, and ignore the rest.
455:all means set all variables, whether safe or not.
456 (Don't set it permanently to :all.)
455nil means always ignore the file local variables. 457nil means always ignore the file local variables.
456 458
457Any other value means always query you once whether to set them all. 459Any other value means always query you once whether to set them all.
@@ -464,8 +466,9 @@ a -*- line.
464The command \\[normal-mode], when used interactively, 466The command \\[normal-mode], when used interactively,
465always obeys file local variable specifications and the -*- line, 467always obeys file local variable specifications and the -*- line,
466and ignores this variable." 468and ignores this variable."
467 :type '(choice (const :tag "Obey" t) 469 :type '(choice (const :tag "Query Unsafe" t)
468 (const :tag "Safe Only" :safe) 470 (const :tag "Safe Only" :safe)
471 (const :tag "Do all" :all)
469 (const :tag "Ignore" nil) 472 (const :tag "Ignore" nil)
470 (other :tag "Query" other)) 473 (other :tag "Query" other))
471 :group 'find-file) 474 :group 'find-file)
@@ -2283,6 +2286,7 @@ asking you for confirmation."
2283 default-text-properties 2286 default-text-properties
2284 display-time-string 2287 display-time-string
2285 enable-local-eval 2288 enable-local-eval
2289 enable-local-variables
2286 eval 2290 eval
2287 exec-directory 2291 exec-directory
2288 exec-path 2292 exec-path
@@ -2318,6 +2322,8 @@ asking you for confirmation."
2318 parse-time-rules 2322 parse-time-rules
2319 process-environment 2323 process-environment
2320 rmail-output-file-alist 2324 rmail-output-file-alist
2325 safe-local-variable-values
2326 safe-local-eval-forms
2321 save-some-buffers-action-alist 2327 save-some-buffers-action-alist
2322 special-display-buffer-names 2328 special-display-buffer-names
2323 standard-input 2329 standard-input
@@ -2355,9 +2361,11 @@ asking you for confirmation."
2355 (c-indent-level . integerp) 2361 (c-indent-level . integerp)
2356 (comment-column . integerp) 2362 (comment-column . integerp)
2357 (compile-command . string-or-null-p) 2363 (compile-command . string-or-null-p)
2364 (find-file-visit-truename . t)
2358 (fill-column . integerp) 2365 (fill-column . integerp)
2359 (fill-prefix . string-or-null-p) 2366 (fill-prefix . string-or-null-p)
2360 (indent-tabs-mode . t) 2367 (indent-tabs-mode . t)
2368 (kept-old-versions . integerp)
2361 (kept-new-versions . integerp) 2369 (kept-new-versions . integerp)
2362 (left-margin . t) 2370 (left-margin . t)
2363 (no-byte-compile . t) 2371 (no-byte-compile . t)
@@ -2630,6 +2638,7 @@ is specified, returning t if it is specified."
2630 (if (or (and (eq enable-local-variables t) 2638 (if (or (and (eq enable-local-variables t)
2631 (null unsafe-vars) 2639 (null unsafe-vars)
2632 (null risky-vars)) 2640 (null risky-vars))
2641 (eq enable-local-variables :all)
2633 (hack-local-variables-confirm 2642 (hack-local-variables-confirm
2634 result unsafe-vars risky-vars)) 2643 result unsafe-vars risky-vars))
2635 (dolist (elt result) 2644 (dolist (elt result)
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 991d91a1112..c66def4af66 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,57 @@
12006-04-20 Reiner Steib <Reiner.Steib@gmx.de>
2
3 * gnus-util.el (gnus-replace-in-string): Prefer
4 replace-regexp-in-string over of replace-in-string.
5
62006-04-20 Katsumi Yamaoka <yamaoka@jpl.org>
7
8 * gnus-group.el: Bind tool-bar-mode instead of tool-bar-map.
9
10 * gnus-sum.el: Ditto.
11
12 * gnus-util.el (gnus-select-frame-set-input-focus): Use
13 select-frame-set-input-focus if it is available in XEmacs; use
14 definition defined in Emacs 22 for old Emacsen.
15
162006-04-17 Reiner Steib <Reiner.Steib@gmx.de>
17
18 [ Merge from Gnus trunk. ]
19
20 * mm-util.el (mm-charset-synonym-alist): Improve doc string.
21 (mm-charset-override-alist): New variable.
22 (mm-charset-to-coding-system): Use it.
23 (mm-codepage-setup): New helper function.
24 (mm-charset-eval-alist): New variable.
25 (mm-charset-to-coding-system): Use mm-charset-eval-alist. Warn
26 about unknown charsets. Add allow-override. Use
27 `mm-charset-override-alist' only when decoding.
28 (mm-detect-mime-charset-region): Use :mime-charset.
29
30 * mm-bodies.el (mm-decode-body, mm-decode-string): Call
31 `mm-charset-to-coding-system' with allow-override argument.
32
33 * message.el (message-tool-bar-zap-list, message-tool-bar)
34 (message-tool-bar-gnome, message-tool-bar-retro): New variables.
35 (message-tool-bar-local-item-from-menu): Remove.
36 (message-tool-bar-map): Replace by `message-make-tool-bar'.
37 (message-make-tool-bar): New function.
38 (message-mode): Use `message-make-tool-bar'.
39
40 * gnus-sum.el (gnus-summary-tool-bar)
41 (gnus-summary-tool-bar-gnome, gnus-summary-tool-bar-retro)
42 (gnus-summary-tool-bar-zap-list): New variables.
43 (gnus-summary-make-tool-bar): Complete rewrite using
44 `gmm-tool-bar-from-list'.
45
46 * gnus-group.el (gnus-group-tool-bar, gnus-group-tool-bar-gnome)
47 (gnus-group-tool-bar-retro, gnus-group-tool-bar-zap-list): New
48 variables.
49 (gnus-group-make-tool-bar): Complete rewrite using
50 `gmm-tool-bar-from-list'.
51 (gnus-group-tool-bar-update): New function.
52
53 * gmm-utils.el: New file.
54
12006-04-12 Ralf Angeli <angeli@iwi.uni-sb.de> 552006-04-12 Ralf Angeli <angeli@iwi.uni-sb.de>
2 56
3 * flow-fill.el (fill-flowed): Remove trailing space from blank 57 * flow-fill.el (fill-flowed): Remove trailing space from blank
diff --git a/lisp/gnus/gmm-utils.el b/lisp/gnus/gmm-utils.el
new file mode 100644
index 00000000000..4db811053ec
--- /dev/null
+++ b/lisp/gnus/gmm-utils.el
@@ -0,0 +1,413 @@
1;;; gmm-utils.el --- Utility functions for Gnus, Message and MML
2
3;; Copyright (C) 2006 Free Software Foundation, Inc.
4
5;; Author: Reiner Steib <reiner.steib@gmx.de>
6;; Keywords: news
7
8;; This file is part of GNU Emacs.
9
10;; GNU Emacs is free software; you can redistribute it and/or modify
11;; it under the terms of the GNU General Public License as published by
12;; the Free Software Foundation; either version 2, or (at your option)
13;; any later version.
14
15;; GNU Emacs is distributed in the hope that it will be useful,
16;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;; GNU General Public License for more details.
19
20;; You should have received a copy of the GNU General Public License
21;; along with GNU Emacs; see the file COPYING. If not, write to the
22;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
23;; Boston, MA 02110-1301, USA.
24
25;;; Commentary:
26
27;; This library provides self-contained utility functions. The functions are
28;; used in Gnus, Message and MML, but within this library there are no
29;; dependencies on Gnus, Message, or MML or Gnus.
30
31;;; Code:
32
33;; (require 'wid-edit)
34
35(defgroup gmm nil
36 "Utility functions for Gnus, Message and MML"
37 :prefix "gmm-"
38 :version "23.0" ;; No Gnus
39 :group 'lisp)
40
41;; Helper functions from `gnus-utils.el': gmm-verbose, gmm-message, gmm-error
42
43(defcustom gmm-verbose 7
44 "Integer that says how verbose gmm should be.
45The higher the number, the more messages will flash to say what
46it done. At zero, it will be totally mute; at five, it will
47display most important messages; and at ten, it will keep on
48jabbering all the time."
49 :type 'integer
50 :group 'gmm)
51
52;;;###autoload
53(defun gmm-message (level &rest args)
54 "If LEVEL is lower than `gmm-verbose' print ARGS using `message'.
55
56Guideline for numbers:
571 - error messages, 3 - non-serious error messages, 5 - messages for things
58that take a long time, 7 - not very important messages on stuff, 9 - messages
59inside loops."
60 (if (<= level gmm-verbose)
61 (apply 'message args)
62 ;; We have to do this format thingy here even if the result isn't
63 ;; shown - the return value has to be the same as the return value
64 ;; from `message'.
65 (apply 'format args)))
66
67;;;###autoload
68(defun gmm-error (level &rest args)
69 "Beep an error if LEVEL is equal to or less than `gmm-verbose'.
70ARGS are passed to `message'."
71 (when (<= (floor level) gmm-verbose)
72 (apply 'message args)
73 (ding)
74 (let (duration)
75 (when (and (floatp level)
76 (not (zerop (setq duration (* 10 (- level (floor level)))))))
77 (sit-for duration))))
78 nil)
79
80;;;###autoload
81(defun gmm-widget-p (symbol)
82 "Non-nil iff SYMBOL is a widget."
83 (get symbol 'widget-type))
84
85;; Copy of the `nnmail-lazy' code from `nnmail.el':
86(define-widget 'gmm-lazy 'default
87 "Base widget for recursive datastructures.
88
89This is copy of the `lazy' widget in Emacs 22.1 provided for compatibility."
90 :format "%{%t%}: %v"
91 :convert-widget 'widget-value-convert-widget
92 :value-create (lambda (widget)
93 (let ((value (widget-get widget :value))
94 (type (widget-get widget :type)))
95 (widget-put widget :children
96 (list (widget-create-child-value
97 widget (widget-convert type) value)))))
98 :value-delete 'widget-children-value-delete
99 :value-get (lambda (widget)
100 (widget-value (car (widget-get widget :children))))
101 :value-inline (lambda (widget)
102 (widget-apply (car (widget-get widget :children))
103 :value-inline))
104 :default-get (lambda (widget)
105 (widget-default-get
106 (widget-convert (widget-get widget :type))))
107 :match (lambda (widget value)
108 (widget-apply (widget-convert (widget-get widget :type))
109 :match value))
110 :validate (lambda (widget)
111 (widget-apply (car (widget-get widget :children)) :validate)))
112
113;; Note: The format of `gmm-tool-bar-item' may change if some future Emacs
114;; version will provide customizable tool bar buttons using a different
115;; interface.
116
117;; TODO: Extend API so that the "Command" entry can be a function or a plist.
118;; In case of a list it should have the format...
119;;
120;; (:none command-without-modifier
121;; :shift command-with-shift-pressed
122;; :control command-with-ctrl-pressed
123;; :control-shift command-with-control-and-shift-pressed
124;; ;; mouse-2 and mouse-3 can't be used in Emacs yet.
125;; :mouse-2 command-on-mouse-2-press
126;; :mouse-3 command-on-mouse-3-press) ;; typically a menu of related commands
127;;
128;; Combinations of mouse-[23] plus shift and/or controll might be overkill.
129;;
130;; Then use (plist-get rs-command :none), (plist-get rs-command :shift)
131
132(define-widget 'gmm-tool-bar-item (if (gmm-widget-p 'lazy) 'lazy 'gmm-lazy)
133 "Tool bar list item."
134 :tag "Tool bar item"
135 :type '(choice
136 (list :tag "Command and Icon"
137 (function :tag "Command")
138 (string :tag "Icon file")
139 (choice
140 (const :tag "Default map" nil)
141 ;; Note: Usually we need non-nil attributes if map is t.
142 (const :tag "No menu" t)
143 (sexp :tag "Other map"))
144 (plist :inline t :tag "Properties"))
145 (list :tag "Separator"
146 (const :tag "No command" gmm-ignore)
147 (string :tag "Icon file")
148 (const :tag "No map")
149 (plist :inline t :tag "Properties"))))
150
151(define-widget 'gmm-tool-bar-zap-list (if (gmm-widget-p 'lazy) 'lazy 'gmm-lazy)
152 "Tool bar zap list."
153 :tag "Tool bar zap list"
154 :type '(choice (const :tag "Zap all" t)
155 (const :tag "Keep all" nil)
156 (list
157 ;; :value
158 ;; Work around (bug in customize?), see
159 ;; <news:v9is48jrj1.fsf@marauder.physik.uni-ulm.de>
160 ;; (new-file open-file dired kill-buffer write-file
161 ;; print-buffer customize help)
162 (set :inline t
163 (const new-file)
164 (const open-file)
165 (const dired)
166 (const kill-buffer)
167 (const save-buffer)
168 (const write-file)
169 (const undo)
170 (const cut)
171 (const copy)
172 (const paste)
173 (const search-forward)
174 (const print-buffer)
175 (const customize)
176 (const help))
177 (repeat :inline t
178 :tag "Other"
179 (symbol :tag "Icon item")))))
180
181;; (defun gmm-color-cells (&optional display)
182;; "Return the number of color cells supported by DISPLAY.
183;; Compatibility function."
184;; ;; `display-color-cells' doesn't return more than 256 even if color depth is
185;; ;; > 8 in Emacs 21.
186;; ;;
187;; ;; Feel free to add proper XEmacs support.
188;; (let* ((cells (and (fboundp 'display-color-cells)
189;; (display-color-cells display)))
190;; (plane (and (fboundp 'x-display-planes)
191;; (ash 1 (x-display-planes))))
192;; (none -1))
193;; (max (if (integerp cells) cells none)
194;; (if (integerp plane) plane none))))
195
196(defcustom gmm-tool-bar-style
197 (if (and (boundp 'tool-bar-mode)
198 tool-bar-mode
199 (and (fboundp 'display-visual-class)
200 (not (memq (display-visual-class)
201 (list 'static-gray 'gray-scale
202 'static-color 'pseudo-color)))))
203 'gnome
204 'retro)
205 "Prefered tool bar style."
206 :type '(choice (const :tag "GNOME style" 'gnome)
207 (const :tag "Retro look" 'retro))
208 :group 'gmm)
209
210(defvar tool-bar-map)
211
212;;;###autoload
213(defun gmm-tool-bar-from-list (icon-list zap-list default-map)
214 "Make a tool bar from ICON-LIST.
215
216Within each entry of ICON-LIST, the first element is a menu
217command, the second element is an icon file name and the third
218element is a test function. You can use \\[describe-key]
219<menu-entry> to find out the name of a menu command. The fourth
220and all following elements are passed a the PROPS argument to the
221function `tool-bar-local-item'.
222
223If ZAP-LIST is a list, remove those item from the default
224`tool-bar-map'. If it is t, start with a new sparse map. You
225can use \\[describe-key] <icon> to find out the name of an icon
226item. When \\[describe-key] <icon> shows \"<tool-bar> <new-file>
227runs the command find-file\", then use `new-file' in ZAP-LIST.
228
229DEFAULT-MAP specifies the default key map for ICON-LIST."
230 (let (;; For Emacs 21, we must let-bind `tool-bar-map'. In Emacs 22, we
231 ;; could use some other local variable.
232 (tool-bar-map (if (eq zap-list t)
233 (make-sparse-keymap)
234 (copy-keymap tool-bar-map))))
235 (when (listp zap-list)
236 ;; Zap some items which aren't relevant for this mode and take up space.
237 (dolist (key zap-list)
238 (define-key tool-bar-map (vector key) nil)))
239 (mapc (lambda (el)
240 (let ((command (car el))
241 (icon (nth 1 el))
242 (fmap (or (nth 2 el) default-map))
243 (props (cdr (cdr (cdr el)))) )
244 ;; command may stem from different from-maps:
245 (cond ((eq command 'gmm-ignore)
246 ;; The dummy `gmm-ignore', see `gmm-tool-bar-item'
247 ;; widget. Suppress tooltip by adding `:enable nil'.
248 (if (fboundp 'tool-bar-local-item)
249 (apply 'tool-bar-local-item icon nil nil
250 tool-bar-map :enable nil props)
251 ;; (tool-bar-local-item ICON DEF KEY MAP &rest PROPS)
252 ;; (tool-bar-add-item ICON DEF KEY &rest PROPS)
253 (apply 'tool-bar-add-item icon nil nil :enable nil props)))
254 ((equal fmap t) ;; Not a menu command
255 (if (fboundp 'tool-bar-local-item)
256 (apply 'tool-bar-local-item
257 icon command
258 (intern icon) ;; reuse icon or fmap here?
259 tool-bar-map props)
260 ;; Emacs 21 compatibility:
261 (apply 'tool-bar-add-item
262 icon command
263 (intern icon)
264 props)))
265 (t ;; A menu command
266 (if (fboundp 'tool-bar-local-item-from-menu)
267 (apply 'tool-bar-local-item-from-menu
268 ;; (apply 'tool-bar-local-item icon def key
269 ;; tool-bar-map props)
270 command icon tool-bar-map (symbol-value fmap)
271 props)
272 ;; Emacs 21 compatibility:
273 (apply 'tool-bar-add-item-from-menu
274 command icon (symbol-value fmap)
275 props))))
276 t))
277 (if (symbolp icon-list)
278 (eval icon-list)
279 icon-list))
280 tool-bar-map))
281
282;; WARNING: The following is subject to change. Don't rely on it yet.
283
284;; From MH-E without modifications:
285
286(defmacro gmm-defun-compat (name function arg-list &rest body)
287 "Create function NAME.
288If FUNCTION exists, then NAME becomes an alias for FUNCTION.
289Otherwise, create function NAME with ARG-LIST and BODY."
290 (let ((defined-p (fboundp function)))
291 (if defined-p
292 `(defalias ',name ',function)
293 `(defun ,name ,arg-list ,@body))))
294
295(gmm-defun-compat gmm-image-search-load-path
296 image-search-load-path (file &optional path)
297 "Emacs 21 and XEmacs don't have `image-search-load-path'.
298This function returns nil on those systems."
299 nil)
300
301;; From MH-E with modifications:
302
303;; Don't use `gmm-defun-compat' until API changes in
304;; `image-load-path-for-library' in Emacs CVS are completed.
305
306(defun gmm-image-load-path-for-library (library image &optional path no-error)
307 "Return a suitable search path for images relative to LIBRARY.
308
309First it searches for IMAGE in `image-load-path' (excluding
310\"`data-directory'/images\") and `load-path', followed by a path
311suitable for LIBRARY, which includes \"../../etc/images\" and
312\"../etc/images\" relative to the library file itself, and then
313in \"`data-directory'/images\".
314
315Then this function returns a list of directories which contains
316first the directory in which IMAGE was found, followed by the
317value of `load-path'. If PATH is given, it is used instead of
318`load-path'.
319
320If NO-ERROR is non-nil and a suitable path can't be found, don't
321signal an error. Instead, return a list of directories as before,
322except that nil appears in place of the image directory.
323
324Here is an example that uses a common idiom to provide
325compatibility with versions of Emacs that lack the variable
326`image-load-path':
327
328 ;; Shush compiler.
329 (defvar image-load-path)
330
331 (let* ((load-path (image-load-path-for-library \"mh-e\" \"mh-logo.xpm\"))
332 (image-load-path (cons (car load-path)
333 (when (boundp 'image-load-path)
334 image-load-path))))
335 (mh-tool-bar-folder-buttons-init))"
336 (unless library (error "No library specified"))
337 (unless image (error "No image specified"))
338 (let (image-directory image-directory-load-path)
339 ;; Check for images in image-load-path or load-path.
340 (let ((img image)
341 (dir (or
342 ;; Images in image-load-path.
343 (gmm-image-search-load-path image) ;; "gmm-" prefix!
344 ;; Images in load-path.
345 (locate-library image)))
346 parent)
347 ;; Since the image might be in a nested directory (for
348 ;; example, mail/attach.pbm), adjust `image-directory'
349 ;; accordingly.
350 (when dir
351 (setq dir (file-name-directory dir))
352 (while (setq parent (file-name-directory img))
353 (setq img (directory-file-name parent)
354 dir (expand-file-name "../" dir))))
355 (setq image-directory-load-path dir))
356
357 ;; If `image-directory-load-path' isn't Emacs' image directory,
358 ;; it's probably a user preference, so use it. Then use a
359 ;; relative setting if possible; otherwise, use
360 ;; `image-directory-load-path'.
361 (cond
362 ;; User-modified image-load-path?
363 ((and image-directory-load-path
364 (not (equal image-directory-load-path
365 (file-name-as-directory
366 (expand-file-name "images" data-directory)))))
367 (setq image-directory image-directory-load-path))
368 ;; Try relative setting.
369 ((let (library-name d1ei d2ei)
370 ;; First, find library in the load-path.
371 (setq library-name (locate-library library))
372 (if (not library-name)
373 (error "Cannot find library %s in load-path" library))
374 ;; And then set image-directory relative to that.
375 (setq
376 ;; Go down 2 levels.
377 d2ei (file-name-as-directory
378 (expand-file-name
379 (concat (file-name-directory library-name) "../../etc/images")))
380 ;; Go down 1 level.
381 d1ei (file-name-as-directory
382 (expand-file-name
383 (concat (file-name-directory library-name) "../etc/images"))))
384 (setq image-directory
385 ;; Set it to nil if image is not found.
386 (cond ((file-exists-p (expand-file-name image d2ei)) d2ei)
387 ((file-exists-p (expand-file-name image d1ei)) d1ei)))))
388 ;; Use Emacs' image directory.
389 (image-directory-load-path
390 (setq image-directory image-directory-load-path))
391 (no-error
392 (message "Could not find image %s for library %s" image library))
393 (t
394 (error "Could not find image %s for library %s" image library)))
395
396 ;; Return an augmented `path' or `load-path'.
397 (nconc (list image-directory)
398 (delete image-directory (copy-sequence (or path load-path))))))
399
400(defun gmm-customize-mode (&optional mode)
401 "Customize customization group for MODE.
402If mode is nil, use `major-mode' of the curent buffer."
403 (interactive)
404 (customize-group
405 (or mode
406 (intern (let ((mode (symbol-name major-mode)))
407 (string-match "^\\(.+\\)-mode$" mode)
408 (match-string 1 mode))))))
409
410(provide 'gmm-utils)
411
412;; arch-tag: e0b60920-2ce6-40c1-bfc0-cadbbe26b602
413;;; gmm-utils.el ends here
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 24e4df14712..f3ca6248811 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -29,7 +29,7 @@
29 29
30(eval-when-compile 30(eval-when-compile
31 (require 'cl) 31 (require 'cl)
32 (defvar tool-bar-map)) 32 (defvar tool-bar-mode))
33 33
34(require 'gnus) 34(require 'gnus)
35(require 'gnus-start) 35(require 'gnus-start)
@@ -39,6 +39,7 @@
39(require 'gnus-range) 39(require 'gnus-range)
40(require 'gnus-win) 40(require 'gnus-win)
41(require 'gnus-undo) 41(require 'gnus-undo)
42(require 'gmm-utils)
42(require 'time-date) 43(require 'time-date)
43(require 'gnus-ems) 44(require 'gnus-ems)
44 45
@@ -979,36 +980,135 @@ simple manner.")
979 980
980 (gnus-run-hooks 'gnus-group-menu-hook))) 981 (gnus-run-hooks 'gnus-group-menu-hook)))
981 982
982(defvar gnus-group-toolbar-map nil) 983
983 984(defvar gnus-group-tool-bar-map nil)
984;; Emacs 21 tool bar. Should be no-op otherwise. 985
985(defun gnus-group-make-tool-bar () 986(defun gnus-group-tool-bar-update (&optional symbol value)
986 (if (and 987 "Update group buffer toolbar.
987 (condition-case nil (require 'tool-bar) (error nil)) 988Setter function for custom variables."
988 (fboundp 'tool-bar-add-item-from-menu) 989 (when symbol
989 (default-value 'tool-bar-mode) 990 (set-default symbol value))
990 (not gnus-group-toolbar-map)) 991 ;; (setq-default gnus-group-tool-bar-map nil)
991 (setq gnus-group-toolbar-map 992 ;; (use-local-map gnus-group-mode-map)
992 (let ((tool-bar-map (make-sparse-keymap)) 993 (when (gnus-alive-p)
993 (load-path (mm-image-load-path))) 994 (with-current-buffer gnus-group-buffer
994 (tool-bar-add-item-from-menu 995 (gnus-group-make-tool-bar t))))
995 'gnus-group-get-new-news "get-news" gnus-group-mode-map) 996
996 (tool-bar-add-item-from-menu 997(defcustom gnus-group-tool-bar (if (eq gmm-tool-bar-style 'gnome)
997 'gnus-group-get-new-news-this-group "gnntg" gnus-group-mode-map) 998 'gnus-group-tool-bar-gnome
998 (tool-bar-add-item-from-menu 999 'gnus-group-tool-bar-retro)
999 'gnus-group-catchup-current "catchup" gnus-group-mode-map) 1000 "Specifies the Gnus group tool bar.
1000 (tool-bar-add-item-from-menu 1001
1001 'gnus-group-describe-group "describe-group" gnus-group-mode-map) 1002It can be either a list or a symbol refering to a list. See
1002 (tool-bar-add-item "subscribe" 'gnus-group-subscribe 'subscribe 1003`gmm-tool-bar-from-list' for the format of the list. The
1003 :help "Subscribe to the current group") 1004default key map is `gnus-group-mode-map'.
1004 (tool-bar-add-item "unsubscribe" 'gnus-group-unsubscribe 1005
1005 'unsubscribe 1006Pre-defined symbols include `gnus-group-tool-bar-gnome' and
1006 :help "Unsubscribe from the current group") 1007`gnus-group-tool-bar-retro'."
1007 (tool-bar-add-item-from-menu 1008 :type '(choice (const :tag "GNOME style" gnus-group-tool-bar-gnome)
1008 'gnus-group-exit "exit-gnus" gnus-group-mode-map) 1009 (const :tag "Retro look" gnus-group-tool-bar-retro)
1009 tool-bar-map))) 1010 (repeat :tag "User defined list" gmm-tool-bar-item)
1010 (if gnus-group-toolbar-map 1011 (symbol))
1011 (set (make-local-variable 'tool-bar-map) gnus-group-toolbar-map))) 1012 :version "22.1" ;; Gnus 5.10.9
1013 :initialize 'custom-initialize-default
1014 :set 'gnus-group-tool-bar-update
1015 :group 'gnus-group)
1016
1017(defcustom gnus-group-tool-bar-gnome
1018 '((gnus-group-post-news "mail/compose")
1019 ;; Some useful agent icons? I don't use the agent so agent users should
1020 ;; suggest useful commands:
1021 (gnus-agent-toggle-plugged "connect" t
1022 :visible (and gnus-agent (not gnus-plugged)))
1023 (gnus-agent-toggle-plugged "disconnect" t
1024 :visible (and gnus-agent gnus-plugged))
1025 ;; FIXME: gnus-agent-toggle-plugged (in gnus-agent-group-make-menu-bar)
1026 ;; should have a better help text.
1027 (gnus-group-send-queue "mail/outbox" t
1028 :visible (and gnus-agent gnus-plugged)
1029 :help "Send articles from the queue group")
1030 (gnus-group-get-new-news "mail/inbox" nil
1031 :visible (or (not gnus-agent)
1032 gnus-plugged))
1033 ;; FIXME: gnus-*-read-group should have a better help text.
1034 (gnus-topic-read-group "open" nil
1035 :visible (and (boundp 'gnus-topic-mode)
1036 gnus-topic-mode))
1037 (gnus-group-read-group "open" nil
1038 :visible (not (and (boundp 'gnus-topic-mode)
1039 gnus-topic-mode)))
1040 ;; (gnus-group-find-new-groups "???" nil)
1041 (gnus-group-save-newsrc "save")
1042 (gnus-group-describe-group "describe")
1043 (gnus-group-unsubscribe-current-group "gnus/toggle-subscription")
1044 (gnus-group-prev-unread-group "left-arrow")
1045 (gnus-group-next-unread-group "right-arrow")
1046 (gnus-group-exit "exit")
1047 (gmm-customize-mode "preferences" t :help "Edit mode preferences")
1048 (gnus-info-find-node "help"))
1049 "List of functions for the group tool bar (GNOME style).
1050
1051See `gmm-tool-bar-from-list' for the format of the list."
1052 :type '(repeat gmm-tool-bar-item)
1053 :version "22.1" ;; Gnus 5.10.9
1054 :initialize 'custom-initialize-default
1055 :set 'gnus-group-tool-bar-update
1056 :group 'gnus-group)
1057
1058(defcustom gnus-group-tool-bar-retro
1059 '((gnus-group-get-new-news "gnus/get-news")
1060 (gnus-group-get-new-news-this-group "gnus/gnntg")
1061 (gnus-group-catchup-current "gnus/catchup")
1062 (gnus-group-describe-group "gnus/describe-group")
1063 (gnus-group-subscribe "gnus/subscribe" t
1064 :help "Subscribe to the current group")
1065 (gnus-group-unsubscribe "gnus/unsubscribe" t
1066 :help "Unsubscribe from the current group")
1067 (gnus-group-exit "gnus/exit-gnus" gnus-group-mode-map))
1068 "List of functions for the group tool bar (retro look).
1069
1070See `gmm-tool-bar-from-list' for the format of the list."
1071 :type '(repeat gmm-tool-bar-item)
1072 :version "22.1" ;; Gnus 5.10.9
1073 :initialize 'custom-initialize-default
1074 :set 'gnus-group-tool-bar-update
1075 :group 'gnus-group)
1076
1077(defcustom gnus-group-tool-bar-zap-list t
1078 "List of icon items from the global tool bar.
1079These items are not displayed in the Gnus group mode tool bar.
1080
1081See `gmm-tool-bar-from-list' for the format of the list."
1082 :type 'gmm-tool-bar-zap-list
1083 :version "22.1" ;; Gnus 5.10.9
1084 :initialize 'custom-initialize-default
1085 :set 'gnus-group-tool-bar-update
1086 :group 'gnus-group)
1087
1088(defvar image-load-path)
1089
1090(defun gnus-group-make-tool-bar (&optional force)
1091 "Make a group mode tool bar from `gnus-group-tool-bar'.
1092When FORCE, rebuild the tool bar."
1093 (when (and (not (featurep 'xemacs))
1094 (boundp 'tool-bar-mode)
1095 tool-bar-mode
1096 ;; The Gnus 5.10.6 code checked (default-value 'tool-bar-mode).
1097 ;; Why? --rsteib
1098 (or (not gnus-group-tool-bar-map) force))
1099 (let* ((load-path
1100 (gmm-image-load-path-for-library "gnus"
1101 "gnus/toggle-subscription.xpm"
1102 nil t))
1103 (image-load-path (cons (car load-path)
1104 (when (boundp 'image-load-path)
1105 image-load-path)))
1106 (map (gmm-tool-bar-from-list gnus-group-tool-bar
1107 gnus-group-tool-bar-zap-list
1108 'gnus-group-mode-map)))
1109 (if map
1110 (set (make-local-variable 'tool-bar-map) map))))
1111 gnus-group-tool-bar-map)
1012 1112
1013(defun gnus-group-mode () 1113(defun gnus-group-mode ()
1014 "Major mode for reading news. 1114 "Major mode for reading news.
@@ -1379,6 +1479,17 @@ if it is a string, only list groups matching REGEXP."
1379 (gnus-range-difference (list active) (gnus-info-read info)) 1479 (gnus-range-difference (list active) (gnus-info-read info))
1380 seen)))))) 1480 seen))))))
1381 1481
1482;; Moving through the Group buffer (in topic mode) e.g. with C-n doesn't
1483;; update the state (enabled/disabled) of the icon `gnus-group-describe-group'
1484;; automatically. After `C-l' the state is correct. See the following report
1485;; on emacs-devel
1486;; <http://thread.gmane.org/v9acdmrcse.fsf@marauder.physik.uni-ulm.de>:
1487;; From: Reiner Steib
1488;; Subject: tool bar icons not updated according to :active condition
1489;; Newsgroups: gmane.emacs.devel
1490;; Date: Mon, 23 Jan 2006 19:59:13 +0100
1491;; Message-ID: <v9acdmrcse.fsf@marauder.physik.uni-ulm.de>
1492
1382(defcustom gnus-group-update-tool-bar 1493(defcustom gnus-group-update-tool-bar
1383 (and (not (featurep 'xemacs)) 1494 (and (not (featurep 'xemacs))
1384 (boundp 'tool-bar-mode) 1495 (boundp 'tool-bar-mode)
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index bea7cb2445e..daecb1701cd 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -29,7 +29,7 @@
29 29
30(eval-when-compile 30(eval-when-compile
31 (require 'cl) 31 (require 'cl)
32 (defvar tool-bar-map)) 32 (defvar tool-bar-mode))
33 33
34(require 'gnus) 34(require 'gnus)
35(require 'gnus-group) 35(require 'gnus-group)
@@ -38,6 +38,7 @@
38(require 'gnus-int) 38(require 'gnus-int)
39(require 'gnus-undo) 39(require 'gnus-undo)
40(require 'gnus-util) 40(require 'gnus-util)
41(require 'gmm-utils)
41(require 'mm-decode) 42(require 'mm-decode)
42(require 'nnoo) 43(require 'nnoo)
43 44
@@ -2546,47 +2547,161 @@ gnus-summary-show-article-from-menu-as-charset-%s" cs))))
2546 2547
2547(defvar gnus-summary-tool-bar-map nil) 2548(defvar gnus-summary-tool-bar-map nil)
2548 2549
2549;; Emacs 21 tool bar. Should be no-op otherwise. 2550;; Note: The :set function in the `gnus-summary-tool-bar*' variables will only
2550(defun gnus-summary-make-tool-bar () 2551;; affect _new_ message buffers. We might add a function that walks thru all
2551 (if (and (fboundp 'tool-bar-add-item-from-menu) 2552;; summary-mode buffers and force the update.
2552 (default-value 'tool-bar-mode) 2553(defun gnus-summary-tool-bar-update (&optional symbol value)
2553 (not gnus-summary-tool-bar-map)) 2554 "Update summary mode toolbar.
2554 (setq gnus-summary-tool-bar-map 2555Setter function for custom variables."
2555 (let ((tool-bar-map (make-sparse-keymap)) 2556 (setq-default gnus-summary-tool-bar-map nil)
2556 (load-path (mm-image-load-path))) 2557 (when symbol
2557 (tool-bar-add-item-from-menu 2558 ;; When used as ":set" function:
2558 'gnus-summary-prev-unread "prev-ur" gnus-summary-mode-map) 2559 (set-default symbol value))
2559 (tool-bar-add-item-from-menu 2560 (when (gnus-buffer-live-p gnus-summary-buffer)
2560 'gnus-summary-next-unread "next-ur" gnus-summary-mode-map) 2561 (with-current-buffer gnus-summary-buffer
2561 (tool-bar-add-item-from-menu 2562 (gnus-summary-make-tool-bar))))
2562 'gnus-summary-post-news "post" gnus-summary-mode-map) 2563
2563 (tool-bar-add-item-from-menu 2564(defcustom gnus-summary-tool-bar (if (eq gmm-tool-bar-style 'gnome)
2564 'gnus-summary-followup-with-original "fuwo" gnus-summary-mode-map) 2565 'gnus-summary-tool-bar-gnome
2565 (tool-bar-add-item-from-menu 2566 'gnus-summary-tool-bar-retro)
2566 'gnus-summary-followup "followup" gnus-summary-mode-map) 2567 "Specifies the Gnus summary tool bar.
2567 (tool-bar-add-item-from-menu 2568
2568 'gnus-summary-reply-with-original "reply-wo" gnus-summary-mode-map) 2569It can be either a list or a symbol refering to a list. See
2569 (tool-bar-add-item-from-menu 2570`gmm-tool-bar-from-list' for the format of the list. The
2570 'gnus-summary-reply "reply" gnus-summary-mode-map) 2571default key map is `gnus-summary-mode-map'.
2571 (tool-bar-add-item-from-menu 2572
2572 'gnus-summary-caesar-message "rot13" gnus-summary-mode-map) 2573Pre-defined symbols include `gnus-summary-tool-bar-gnome' and
2573 (tool-bar-add-item-from-menu 2574`gnus-summary-tool-bar-retro'."
2574 'gnus-uu-decode-uu "uu-decode" gnus-summary-mode-map) 2575 :type '(choice (const :tag "GNOME style" gnus-summary-tool-bar-gnome)
2575 (tool-bar-add-item-from-menu 2576 (const :tag "Retro look" gnus-summary-tool-bar-retro)
2576 'gnus-summary-save-article-file "save-aif" gnus-summary-mode-map) 2577 (repeat :tag "User defined list" gmm-tool-bar-item)
2577 (tool-bar-add-item-from-menu 2578 (symbol))
2578 'gnus-summary-save-article "save-art" gnus-summary-mode-map) 2579 :version "22.1" ;; Gnus 5.10.9
2579 (tool-bar-add-item-from-menu 2580 :initialize 'custom-initialize-default
2580 'gnus-uu-post-news "uu-post" gnus-summary-mode-map) 2581 :set 'gnus-summary-tool-bar-update
2581 (tool-bar-add-item-from-menu 2582 :group 'gnus-summary)
2582 'gnus-summary-catchup "catchup" gnus-summary-mode-map) 2583
2583 (tool-bar-add-item-from-menu 2584(defcustom gnus-summary-tool-bar-gnome
2584 'gnus-summary-catchup-and-exit "cu-exit" gnus-summary-mode-map) 2585 '((gnus-summary-post-news "mail/compose" nil)
2585 (tool-bar-add-item-from-menu 2586 (gnus-summary-insert-new-articles "mail/inbox" nil
2586 'gnus-summary-exit "exit-summ" gnus-summary-mode-map) 2587 :visible (or (not gnus-agent)
2587 tool-bar-map))) 2588 gnus-plugged))
2588 (if gnus-summary-tool-bar-map 2589 (gnus-summary-reply-with-original "mail/reply")
2589 (set (make-local-variable 'tool-bar-map) gnus-summary-tool-bar-map))) 2590 (gnus-summary-reply "mail/reply" nil :visible nil)
2591 (gnus-summary-followup-with-original "mail/reply-all")
2592 (gnus-summary-followup "mail/reply-all" nil :visible nil)
2593 (gnus-summary-mail-forward "mail/forward")
2594 (gnus-summary-save-article "mail/save")
2595 (gnus-summary-search-article-forward "search" nil :visible nil)
2596 (gnus-summary-print-article "print")
2597 (gnus-summary-tick-article-forward "flag-followup" nil :visible nil)
2598 ;; Some new commands that may need more suitable icons:
2599 (gnus-summary-save-newsrc "save" nil :visible nil)
2600 ;; (gnus-summary-show-article "stock_message-display" nil :visible nil)
2601 (gnus-summary-prev-article "left-arrow")
2602 (gnus-summary-next-article "right-arrow")
2603 (gnus-summary-next-page "next-page")
2604 ;; (gnus-summary-enter-digest-group "right_arrow" nil :visible nil)
2605 ;;
2606 ;; Maybe some sort-by-... could be added:
2607 ;; (gnus-summary-sort-by-author "sort-a-z" nil :visible nil)
2608 ;; (gnus-summary-sort-by-date "sort-1-9" nil :visible nil)
2609 (gnus-summary-mark-as-expirable
2610 "delete" nil
2611 :visible (gnus-check-backend-function 'request-expire-articles
2612 gnus-newsgroup-name))
2613 (gnus-summary-mark-as-spam
2614 "mail/spam" t
2615 :visible (and (fboundp 'spam-group-ham-contents-p)
2616 (spam-group-ham-contents-p gnus-newsgroup-name))
2617 :help "Mark as spam")
2618 (gnus-summary-mark-as-read-forward
2619 "mail/not-spam" nil
2620 :visible (and (fboundp 'spam-group-spam-contents-p)
2621 (spam-group-spam-contents-p gnus-newsgroup-name)))
2622 ;;
2623 (gnus-summary-exit "exit")
2624 (gmm-customize-mode "preferences" t :help "Edit mode preferences")
2625 (gnus-info-find-node "help"))
2626 "List of functions for the summary tool bar (GNOME style).
2627
2628See `gmm-tool-bar-from-list' for the format of the list."
2629 :type '(repeat gmm-tool-bar-item)
2630 :version "22.1" ;; Gnus 5.10.9
2631 :initialize 'custom-initialize-default
2632 :set 'gnus-summary-tool-bar-update
2633 :group 'gnus-summary)
2634
2635(defcustom gnus-summary-tool-bar-retro
2636 '((gnus-summary-prev-unread-article "gnus/prev-ur")
2637 (gnus-summary-next-unread-article "gnus/next-ur")
2638 (gnus-summary-post-news "gnus/post")
2639 (gnus-summary-followup-with-original "gnus/fuwo")
2640 (gnus-summary-followup "gnus/followup")
2641 (gnus-summary-reply-with-original "gnus/reply-wo")
2642 (gnus-summary-reply "gnus/reply")
2643 (gnus-summary-caesar-message "gnus/rot13")
2644 (gnus-uu-decode-uu "gnus/uu-decode")
2645 (gnus-summary-save-article-file "gnus/save-aif")
2646 (gnus-summary-save-article "gnus/save-art")
2647 (gnus-uu-post-news "gnus/uu-post")
2648 (gnus-summary-catchup "gnus/catchup")
2649 (gnus-summary-catchup-and-exit "gnus/cu-exit")
2650 (gnus-summary-exit "gnus/exit-summ")
2651 ;; Some new command that may need more suitable icons:
2652 (gnus-summary-print-article "gnus/print" nil :visible nil)
2653 (gnus-summary-mark-as-expirable "gnus/close" nil :visible nil)
2654 (gnus-summary-save-newsrc "gnus/save" nil :visible nil)
2655 ;; (gnus-summary-enter-digest-group "gnus/right_arrow" nil :visible nil)
2656 (gnus-summary-search-article-forward "gnus/search" nil :visible nil)
2657 ;; (gnus-summary-insert-new-articles "gnus/paste" nil :visible nil)
2658 ;; (gnus-summary-toggle-threads "gnus/open" nil :visible nil)
2659 ;;
2660 (gnus-info-find-node "gnus/help" nil :visible nil))
2661 "List of functions for the summary tool bar (retro look).
2662
2663See `gmm-tool-bar-from-list' for the format of the list."
2664 :type '(repeat gmm-tool-bar-item)
2665 :version "22.1" ;; Gnus 5.10.9
2666 :initialize 'custom-initialize-default
2667 :set 'gnus-summary-tool-bar-update
2668 :group 'gnus-summary)
2669
2670(defcustom gnus-summary-tool-bar-zap-list t
2671 "List of icon items from the global tool bar.
2672These items are not displayed in the Gnus summary mode tool bar.
2673
2674See `gmm-tool-bar-from-list' for the format of the list."
2675 :type 'gmm-tool-bar-zap-list
2676 :version "22.1" ;; Gnus 5.10.9
2677 :initialize 'custom-initialize-default
2678 :set 'gnus-summary-tool-bar-update
2679 :group 'gnus-summary)
2680
2681(defvar image-load-path)
2682
2683(defun gnus-summary-make-tool-bar (&optional force)
2684 "Make a summary mode tool bar from `gnus-summary-tool-bar'.
2685When FORCE, rebuild the tool bar."
2686 (when (and (not (featurep 'xemacs))
2687 (boundp 'tool-bar-mode)
2688 tool-bar-mode
2689 (or (not gnus-summary-tool-bar-map) force))
2690 (let* ((load-path
2691 (gmm-image-load-path-for-library "gnus"
2692 "mail/save.xpm"
2693 nil t))
2694 (image-load-path (cons (car load-path)
2695 (when (boundp 'image-load-path)
2696 image-load-path)))
2697 (map (gmm-tool-bar-from-list gnus-summary-tool-bar
2698 gnus-summary-tool-bar-zap-list
2699 'gnus-summary-mode-map)))
2700 (when map
2701 ;; Need to set `gnus-summary-tool-bar-map' because `gnus-article-mode'
2702 ;; uses it's value.
2703 (setq gnus-summary-tool-bar-map map))))
2704 (set (make-local-variable 'tool-bar-map) gnus-summary-tool-bar-map))
2590 2705
2591(defun gnus-score-set-default (var value) 2706(defun gnus-score-set-default (var value)
2592 "A version of set that updates the GNU Emacs menu-bar." 2707 "A version of set that updates the GNU Emacs menu-bar."
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index cb3a4e9209c..6b525fc490c 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -61,8 +61,11 @@
61 61
62(eval-and-compile 62(eval-and-compile
63 (cond 63 (cond
64 ((fboundp 'replace-in-string) 64 ;; Prefer `replace-regexp-in-string' (present in Emacs, XEmacs 21.5,
65 (defalias 'gnus-replace-in-string 'replace-in-string)) 65 ;; SXEmacs 22.1.4) over `replace-in-string'. The later leads to inf-loops
66 ;; on empty matches:
67 ;; (replace-in-string "foo" "/*$" "/")
68 ;; (replace-in-string "xe" "\\(x\\)?" "")
66 ((fboundp 'replace-regexp-in-string) 69 ((fboundp 'replace-regexp-in-string)
67 (defun gnus-replace-in-string (string regexp newtext &optional literal) 70 (defun gnus-replace-in-string (string regexp newtext &optional literal)
68 "Replace all matches for REGEXP with NEWTEXT in STRING. 71 "Replace all matches for REGEXP with NEWTEXT in STRING.
@@ -71,6 +74,8 @@ string containing the replacements.
71 74
72This is a compatibility function for different Emacsen." 75This is a compatibility function for different Emacsen."
73 (replace-regexp-in-string regexp newtext string nil literal))) 76 (replace-regexp-in-string regexp newtext string nil literal)))
77 ((fboundp 'replace-in-string)
78 (defalias 'gnus-replace-in-string 'replace-in-string))
74 (t 79 (t
75 (defun gnus-replace-in-string (string regexp newtext &optional literal) 80 (defun gnus-replace-in-string (string regexp newtext &optional literal)
76 "Replace all matches for REGEXP with NEWTEXT in STRING. 81 "Replace all matches for REGEXP with NEWTEXT in STRING.
@@ -1424,20 +1429,19 @@ CHOICE is a list of the choice char and help message at IDX."
1424(defun gnus-select-frame-set-input-focus (frame) 1429(defun gnus-select-frame-set-input-focus (frame)
1425 "Select FRAME, raise it, and set input focus, if possible." 1430 "Select FRAME, raise it, and set input focus, if possible."
1426 (cond ((featurep 'xemacs) 1431 (cond ((featurep 'xemacs)
1427 (raise-frame frame) 1432 (if (fboundp 'select-frame-set-input-focus)
1428 (select-frame frame) 1433 (select-frame-set-input-focus frame)
1429 (focus-frame frame)) 1434 (raise-frame frame)
1430 ;; The function `select-frame-set-input-focus' won't set 1435 (select-frame frame)
1431 ;; the input focus under Emacs 21.2 and X window system. 1436 (focus-frame frame)))
1432 ;;((fboundp 'select-frame-set-input-focus) 1437 ;; `select-frame-set-input-focus' defined in Emacs 21 will not
1433 ;; (defalias 'gnus-select-frame-set-input-focus 1438 ;; set the input focus.
1434 ;; 'select-frame-set-input-focus) 1439 ((>= emacs-major-version 22)
1435 ;; (select-frame-set-input-focus frame)) 1440 (select-frame-set-input-focus frame))
1436 (t 1441 (t
1437 (raise-frame frame) 1442 (raise-frame frame)
1438 (select-frame frame) 1443 (select-frame frame)
1439 (cond ((and (eq window-system 'x) 1444 (cond ((memq window-system '(x mac))
1440 (fboundp 'x-focus-frame))
1441 (x-focus-frame frame)) 1445 (x-focus-frame frame))
1442 ((eq window-system 'w32) 1446 ((eq window-system 'w32)
1443 (w32-focus-frame frame))) 1447 (w32-focus-frame frame)))
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 741b193f779..472eb2468dd 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -37,6 +37,7 @@
37 (defvar gnus-list-identifiers)) ; gnus-sum is required where necessary 37 (defvar gnus-list-identifiers)) ; gnus-sum is required where necessary
38(require 'canlock) 38(require 'canlock)
39(require 'mailheader) 39(require 'mailheader)
40(require 'gmm-utils)
40(require 'nnheader) 41(require 'nnheader)
41;; This is apparently necessary even though things are autoloaded. 42;; This is apparently necessary even though things are autoloaded.
42;; Because we dynamically bind mail-abbrev-mode-regexp, we'd better 43;; Because we dynamically bind mail-abbrev-mode-regexp, we'd better
@@ -2529,7 +2530,7 @@ M-RET `message-newline-and-reformat' (break the line and reformat)."
2529 (set (make-local-variable 'font-lock-defaults) 2530 (set (make-local-variable 'font-lock-defaults)
2530 '(message-font-lock-keywords t)) 2531 '(message-font-lock-keywords t))
2531 (if (boundp 'tool-bar-map) 2532 (if (boundp 'tool-bar-map)
2532 (set (make-local-variable 'tool-bar-map) (message-tool-bar-map)))) 2533 (set (make-local-variable 'tool-bar-map) (message-make-tool-bar))))
2533 (easy-menu-add message-mode-menu message-mode-map) 2534 (easy-menu-add message-mode-menu message-mode-map)
2534 (easy-menu-add message-mode-field-menu message-mode-map) 2535 (easy-menu-add message-mode-field-menu message-mode-map)
2535 (gnus-make-local-hook 'after-change-functions) 2536 (gnus-make-local-hook 'after-change-functions)
@@ -6586,53 +6587,123 @@ which specify the range to operate on."
6586 6587
6587;; Support for toolbar 6588;; Support for toolbar
6588(eval-when-compile 6589(eval-when-compile
6589 (defvar tool-bar-map)
6590 (defvar tool-bar-mode)) 6590 (defvar tool-bar-mode))
6591 6591
6592(defun message-tool-bar-local-item-from-menu (command icon in-map &optional from-map &rest props) 6592;; Note: The :set function in the `message-tool-bar*' variables will only
6593 ;; We need to make tool bar entries in local keymaps with 6593;; affect _new_ message buffers. We might add a function that walks thru all
6594 ;; `tool-bar-local-item-from-menu' in Emacs >= 22 6594;; message-mode buffers and force the update.
6595 (if (fboundp 'tool-bar-local-item-from-menu) 6595(defun message-tool-bar-update (&optional symbol value)
6596 (tool-bar-local-item-from-menu command icon in-map from-map props) 6596 "Update message mode toolbar.
6597 (tool-bar-add-item-from-menu command icon from-map props))) 6597Setter function for custom variables."
6598 6598 (setq-default message-tool-bar-map nil)
6599(defun message-tool-bar-map () 6599 (when symbol
6600 (or message-tool-bar-map 6600 ;; When used as ":set" function:
6601 (setq message-tool-bar-map 6601 (set-default symbol value)))
6602 (and 6602
6603 (condition-case nil (require 'tool-bar) (error nil)) 6603(defcustom message-tool-bar (if (eq gmm-tool-bar-style 'gnome)
6604 (fboundp 'tool-bar-add-item-from-menu) 6604 'message-tool-bar-gnome
6605 'message-tool-bar-retro)
6606 "Specifies the message mode tool bar.
6607
6608It can be either a list or a symbol refering to a list. See
6609`gmm-tool-bar-from-list' for the format of the list. The
6610default key map is `message-mode-map'.
6611
6612Pre-defined symbols include `message-tool-bar-gnome' and
6613`message-tool-bar-retro'."
6614 :type '(repeat gmm-tool-bar-list-item)
6615 :type '(choice (const :tag "GNOME style" message-tool-bar-gnome)
6616 (const :tag "Retro look" message-tool-bar-retro)
6617 (repeat :tag "User defined list" gmm-tool-bar-item)
6618 (symbol))
6619 :version "22.1" ;; Gnus 5.10.9
6620 :initialize 'custom-initialize-default
6621 :set 'message-tool-bar-update
6622 :group 'message)
6623
6624(defcustom message-tool-bar-gnome
6625 '((ispell-message "spell" nil
6626 :visible (or (not (boundp 'flyspell-mode))
6627 (not flyspell-mode)))
6628 (flyspell-buffer "spell" t
6629 :visible (and (boundp 'flyspell-mode)
6630 flyspell-mode)
6631 :help "Flyspell whole buffer")
6632 (gmm-ignore "separator")
6633 (message-send-and-exit "mail/send")
6634 (message-dont-send "mail/save-draft")
6635 (message-kill-buffer "close") ;; stock_cancel
6636 (mml-attach-file "attach" mml-mode-map)
6637 (mml-preview "mail/preview" mml-mode-map)
6638 ;; (mml-secure-message-sign-encrypt "lock" mml-mode-map :visible nil)
6639 (message-insert-importance-high "important" nil :visible nil)
6640 (message-insert-importance-low "unimportant" nil :visible nil)
6641 (message-insert-disposition-notification-to "receipt" nil :visible nil)
6642 (gmm-customize-mode "preferences" t :help "Edit mode preferences")
6643 (message-info "help" t :help "Message manual"))
6644 "List of items for the message tool bar (GNOME style).
6645
6646See `gmm-tool-bar-from-list' for details on the format of the list."
6647 :type '(repeat gmm-tool-bar-item)
6648 :version "22.1" ;; Gnus 5.10.9
6649 :initialize 'custom-initialize-default
6650 :set 'message-tool-bar-update
6651 :group 'message)
6652
6653(defcustom message-tool-bar-retro
6654 '(;; Old Emacs 21 icon for consistency.
6655 (message-send-and-exit "gnus/mail_send")
6656 (message-kill-buffer "close")
6657 (message-dont-send "cancel")
6658 (mml-attach-file "attach" mml-mode-map)
6659 (ispell-message "spell")
6660 (mml-preview "preview" mml-mode-map)
6661 (message-insert-importance-high "gnus/important")
6662 (message-insert-importance-low "gnus/unimportant")
6663 (message-insert-disposition-notification-to "gnus/receipt"))
6664 "List of items for the message tool bar (retro style).
6665
6666See `gmm-tool-bar-from-list' for details on the format of the list."
6667 :type '(repeat gmm-tool-bar-item)
6668 :version "22.1" ;; Gnus 5.10.9
6669 :initialize 'custom-initialize-default
6670 :set 'message-tool-bar-update
6671 :group 'message)
6672
6673(defcustom message-tool-bar-zap-list
6674 '(new-file open-file dired kill-buffer write-file
6675 print-buffer customize help)
6676 "List of icon items from the global tool bar.
6677These items are not displayed on the message mode tool bar.
6678
6679See `gmm-tool-bar-from-list' for the format of the list."
6680 :type 'gmm-tool-bar-zap-list
6681 :version "22.1" ;; Gnus 5.10.9
6682 :initialize 'custom-initialize-default
6683 :set 'message-tool-bar-update
6684 :group 'message)
6685
6686(defvar image-load-path)
6687
6688(defun message-make-tool-bar (&optional force)
6689 "Make a message mode tool bar from `message-tool-bar-list'.
6690When FORCE, rebuild the tool bar."
6691 (when (and (not (featurep 'xemacs))
6692 (boundp 'tool-bar-mode)
6605 tool-bar-mode 6693 tool-bar-mode
6606 (let ((tool-bar-map (copy-keymap tool-bar-map)) 6694 (or (not message-tool-bar-map) force))
6607 (load-path (mm-image-load-path))) 6695 (setq message-tool-bar-map
6608 ;; Zap some items which aren't so relevant and take 6696 (let* ((load-path
6609 ;; up space. 6697 (gmm-image-load-path-for-library "message"
6610 (dolist (key '(print-buffer kill-buffer save-buffer 6698 "mail/save-draft.xpm"
6611 write-file dired open-file)) 6699 nil t))
6612 (define-key tool-bar-map (vector key) nil)) 6700 (image-load-path (cons (car load-path)
6613 (message-tool-bar-local-item-from-menu 6701 (when (boundp 'image-load-path)
6614 'message-send-and-exit "mail/send" tool-bar-map message-mode-map) 6702 image-load-path))))
6615 (message-tool-bar-local-item-from-menu 6703 (gmm-tool-bar-from-list message-tool-bar
6616 'message-kill-buffer "close" tool-bar-map message-mode-map) 6704 message-tool-bar-zap-list
6617 (message-tool-bar-local-item-from-menu 6705 'message-mode-map))))
6618 'message-dont-send "cancel" tool-bar-map message-mode-map) 6706 message-tool-bar-map)
6619 (message-tool-bar-local-item-from-menu
6620 'mml-attach-file "attach" tool-bar-map mml-mode-map)
6621 (message-tool-bar-local-item-from-menu
6622 'ispell-message "spell" tool-bar-map message-mode-map)
6623 (message-tool-bar-local-item-from-menu
6624 'mml-preview "preview"
6625 tool-bar-map mml-mode-map)
6626 (message-tool-bar-local-item-from-menu
6627 'message-insert-importance-high "important"
6628 tool-bar-map message-mode-map)
6629 (message-tool-bar-local-item-from-menu
6630 'message-insert-importance-low "unimportant"
6631 tool-bar-map message-mode-map)
6632 (message-tool-bar-local-item-from-menu
6633 'message-insert-disposition-notification-to "receipt"
6634 tool-bar-map message-mode-map)
6635 tool-bar-map)))))
6636 6707
6637;;; Group name completion. 6708;;; Group name completion.
6638 6709
diff --git a/lisp/gnus/mm-bodies.el b/lisp/gnus/mm-bodies.el
index 7871ca9f253..a1d51a1b9ea 100644
--- a/lisp/gnus/mm-bodies.el
+++ b/lisp/gnus/mm-bodies.el
@@ -56,6 +56,8 @@
56 ;; known to break servers. 56 ;; known to break servers.
57 ;; Note: UTF-16 variants are invalid for text parts [RFC 2781], 57 ;; Note: UTF-16 variants are invalid for text parts [RFC 2781],
58 ;; so this can't happen :-/. 58 ;; so this can't happen :-/.
59 ;; PPS: Yes, it can happen if the user specifies UTF-16 in the MML
60 ;; markup. - jh.
59 (utf-16 . base64) 61 (utf-16 . base64)
60 (utf-16be . base64) 62 (utf-16be . base64)
61 (utf-16le . base64)) 63 (utf-16le . base64))
@@ -250,7 +252,10 @@ decoding. If it is nil, default to `mail-parse-charset'."
250 (mm-decode-content-transfer-encoding encoding type)) 252 (mm-decode-content-transfer-encoding encoding type))
251 (when (and (featurep 'mule) ;; Fixme: Wrong test for unibyte session. 253 (when (and (featurep 'mule) ;; Fixme: Wrong test for unibyte session.
252 (not (eq charset 'gnus-decoded))) 254 (not (eq charset 'gnus-decoded)))
253 (let ((coding-system (mm-charset-to-coding-system charset))) 255 (let ((coding-system (mm-charset-to-coding-system
256 ;; Allow overwrite using
257 ;; `mm-charset-override-alist'.
258 charset nil t)))
254 (if (and (not coding-system) 259 (if (and (not coding-system)
255 (listp mail-parse-ignored-charsets) 260 (listp mail-parse-ignored-charsets)
256 (memq 'gnus-unknown mail-parse-ignored-charsets)) 261 (memq 'gnus-unknown mail-parse-ignored-charsets))
@@ -281,7 +286,11 @@ decoding. If it is nil, default to `mail-parse-charset'."
281 (setq charset mail-parse-charset)) 286 (setq charset mail-parse-charset))
282 (or 287 (or
283 (when (featurep 'mule) 288 (when (featurep 'mule)
284 (let ((coding-system (mm-charset-to-coding-system charset))) 289 (let ((coding-system (mm-charset-to-coding-system
290 charset
291 ;; Allow overwrite using
292 ;; `mm-charset-override-alist'.
293 nil t)))
285 (if (and (not coding-system) 294 (if (and (not coding-system)
286 (listp mail-parse-ignored-charsets) 295 (listp mail-parse-ignored-charsets)
287 (memq 'gnus-unknown mail-parse-ignored-charsets)) 296 (memq 'gnus-unknown mail-parse-ignored-charsets))
diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el
index 524fbdaf294..9a0464be958 100644
--- a/lisp/gnus/mm-util.el
+++ b/lisp/gnus/mm-util.el
@@ -177,6 +177,29 @@ system object in XEmacs."
177 ;; no-MULE XEmacs: 177 ;; no-MULE XEmacs:
178 (car (memq cs (mm-get-coding-system-list)))))) 178 (car (memq cs (mm-get-coding-system-list))))))
179 179
180(defun mm-codepage-setup (number &optional alias)
181 "Create a coding system cpNUMBER.
182The coding system is created using `codepage-setup'. If ALIAS is
183non-nil, an alias is created and added to
184`mm-charset-synonym-alist'. If ALIAS is a string, it's used as
185the alias. Else windows-NUMBER is used."
186 (interactive
187 (let ((completion-ignore-case t)
188 (candidates (cp-supported-codepages)))
189 (list (completing-read "Setup DOS Codepage: (default 437) " candidates
190 nil t nil nil "437"))))
191 (when alias
192 (setq alias (if (stringp alias)
193 (intern alias)
194 (intern (format "windows-%s" number)))))
195 (let* ((cp (intern (format "cp%s" number))))
196 (unless (mm-coding-system-p cp)
197 (codepage-setup number))
198 (when (and alias
199 ;; Don't add alias if setup of cp failed.
200 (mm-coding-system-p cp))
201 (add-to-list 'mm-charset-synonym-alist (cons alias cp)))))
202
180(defvar mm-charset-synonym-alist 203(defvar mm-charset-synonym-alist
181 `( 204 `(
182 ;; Not in XEmacs, but it's not a proper MIME charset anyhow. 205 ;; Not in XEmacs, but it's not a proper MIME charset anyhow.
@@ -200,8 +223,61 @@ system object in XEmacs."
200 ,@(if (and (not (mm-coding-system-p 'windows-1250)) 223 ,@(if (and (not (mm-coding-system-p 'windows-1250))
201 (mm-coding-system-p 'cp1250)) 224 (mm-coding-system-p 'cp1250))
202 '((windows-1250 . cp1250))) 225 '((windows-1250 . cp1250)))
226 ;; A Microsoft misunderstanding.
227 ,@(if (and (not (mm-coding-system-p 'unicode))
228 (mm-coding-system-p 'utf-16-le))
229 '((unicode . utf-16-le)))
230 ;; A Microsoft misunderstanding.
231 ,@(unless (mm-coding-system-p 'ks_c_5601-1987)
232 (if (mm-coding-system-p 'cp949)
233 '((ks_c_5601-1987 . cp949))
234 '((ks_c_5601-1987 . euc-kr))))
203 ) 235 )
204 "A mapping from invalid charset names to the real charset names.") 236 "A mapping from unknown or invalid charset names to the real charset names.")
237
238(defcustom mm-charset-override-alist
239 `((iso-8859-1 . windows-1252))
240 "A mapping from undesired charset names to their replacement.
241
242You may add pairs like (iso-8859-1 . windows-1252) here,
243i.e. treat iso-8859-1 as windows-1252. windows-1252 is a
244superset of iso-8859-1."
245 :type '(list (set :inline t
246 (const (iso-8859-1 . windows-1252))
247 (const (undecided . windows-1252)))
248 (repeat :inline t
249 :tag "Other options"
250 (cons (symbol :tag "From charset")
251 (symbol :tag "To charset"))))
252 :version "23.0" ;; No Gnus
253 :group 'mime)
254
255(defcustom mm-charset-eval-alist
256 (if (featurep 'xemacs)
257 nil ;; I don't know what would be useful for XEmacs.
258 '(;; Emacs 21 offers 1250 1251 1253 1257. Emacs 22 provides autoloads for
259 ;; 1250-1258 (i.e. `mm-codepage-setup' does nothing).
260 (windows-1250 . (mm-codepage-setup 1250 t))
261 (windows-1251 . (mm-codepage-setup 1251 t))
262 (windows-1253 . (mm-codepage-setup 1253 t))
263 (windows-1257 . (mm-codepage-setup 1257 t))))
264 "An alist of (CHARSET . FORM) pairs.
265If an article is encoded in an unknown CHARSET, FORM is
266evaluated. This allows to load additional libraries providing
267charsets on demand. If supported by your Emacs version, you
268could use `autoload-coding-system' here."
269 :version "23.0" ;; No Gnus
270 :type '(list (set :inline t
271 (const (windows-1250 . (mm-codepage-setup 1250 t)))
272 (const (windows-1251 . (mm-codepage-setup 1251 t)))
273 (const (windows-1253 . (mm-codepage-setup 1253 t)))
274 (const (windows-1257 . (mm-codepage-setup 1257 t)))
275 (const (cp850 . (mm-codepage-setup 850 nil))))
276 (repeat :inline t
277 :tag "Other options"
278 (cons (symbol :tag "charset")
279 (symbol :tag "form"))))
280 :group 'mime)
205 281
206(defvar mm-binary-coding-system 282(defvar mm-binary-coding-system
207 (cond 283 (cond
@@ -396,11 +472,17 @@ mail with multiple parts is preferred to sending a Unicode one.")
396 (pop alist)) 472 (pop alist))
397 out))) 473 out)))
398 474
399(defun mm-charset-to-coding-system (charset &optional lbt) 475(defun mm-charset-to-coding-system (charset &optional lbt
476 allow-override)
400 "Return coding-system corresponding to CHARSET. 477 "Return coding-system corresponding to CHARSET.
401CHARSET is a symbol naming a MIME charset. 478CHARSET is a symbol naming a MIME charset.
402If optional argument LBT (`unix', `dos' or `mac') is specified, it is 479If optional argument LBT (`unix', `dos' or `mac') is specified, it is
403used as the line break code type of the coding system." 480used as the line break code type of the coding system.
481
482If ALLOW-OVERRIDE is given, use `mm-charset-override-alist' to
483map undesired charset names to their replacement. This should
484only be used for decoding, not for encoding."
485 ;; OVERRIDE is used (only) in `mm-decode-body' and `mm-decode-string'.
404 (when (stringp charset) 486 (when (stringp charset)
405 (setq charset (intern (downcase charset)))) 487 (setq charset (intern (downcase charset))))
406 (when lbt 488 (when lbt
@@ -412,6 +494,11 @@ used as the line break code type of the coding system."
412 ((or (null (mm-get-coding-system-list)) 494 ((or (null (mm-get-coding-system-list))
413 (not (fboundp 'coding-system-get))) 495 (not (fboundp 'coding-system-get)))
414 charset) 496 charset)
497 ;; Check override list quite early. Should only used for decoding, not for
498 ;; encoding!
499 ((and allow-override
500 (let ((cs (cdr (assq charset mm-charset-override-alist))))
501 (and cs (mm-coding-system-p cs) cs))))
415 ;; ascii 502 ;; ascii
416 ((eq charset 'us-ascii) 503 ((eq charset 'us-ascii)
417 'ascii) 504 'ascii)
@@ -424,9 +511,27 @@ used as the line break code type of the coding system."
424;;; (eq charset (coding-system-get charset 'mime-charset)) 511;;; (eq charset (coding-system-get charset 'mime-charset))
425 ) 512 )
426 charset) 513 charset)
514 ;; Eval expressions from `mm-charset-eval-alist'
515 ((let* ((el (assq charset mm-charset-eval-alist))
516 (cs (car el))
517 (form (cdr el)))
518 (and cs
519 form
520 (prog2
521 ;; Avoid errors...
522 (condition-case nil (eval form) (error nil))
523 ;; (message "Failed to eval `%s'" form))
524 (mm-coding-system-p cs)
525 (message "Added charset `%s' via `mm-charset-eval-alist'" cs))
526 cs)))
427 ;; Translate invalid charsets. 527 ;; Translate invalid charsets.
428 ((let ((cs (cdr (assq charset mm-charset-synonym-alist)))) 528 ((let ((cs (cdr (assq charset mm-charset-synonym-alist))))
429 (and cs (mm-coding-system-p cs) cs))) 529 (and cs
530 (mm-coding-system-p cs)
531 ;; (message
532 ;; "Using synonym `%s' from `mm-charset-synonym-alist' for `%s'"
533 ;; cs charset)
534 cs)))
430 ;; Last resort: search the coding system list for entries which 535 ;; Last resort: search the coding system list for entries which
431 ;; have the right mime-charset in case the canonical name isn't 536 ;; have the right mime-charset in case the canonical name isn't
432 ;; defined (though it should be). 537 ;; defined (though it should be).
@@ -438,6 +543,11 @@ used as the line break code type of the coding system."
438 (eq charset (or (coding-system-get c :mime-charset) 543 (eq charset (or (coding-system-get c :mime-charset)
439 (coding-system-get c 'mime-charset)))) 544 (coding-system-get c 'mime-charset))))
440 (setq cs c))) 545 (setq cs c)))
546 (unless cs
547 ;; Warn the user about unknown charset:
548 (if (fboundp 'gnus-message)
549 (gnus-message 7 "Unknown charset: %s" charset)
550 (message "Unknown charset: %s" charset)))
441 cs)))) 551 cs))))
442 552
443(defsubst mm-replace-chars-in-string (string from to) 553(defsubst mm-replace-chars-in-string (string from to)
@@ -1001,7 +1111,8 @@ If SUFFIX is non-nil, add that at the end of the file name."
1001 (defun mm-detect-mime-charset-region (start end) 1111 (defun mm-detect-mime-charset-region (start end)
1002 "Detect MIME charset of the text in the region between START and END." 1112 "Detect MIME charset of the text in the region between START and END."
1003 (let ((cs (mm-detect-coding-region start end))) 1113 (let ((cs (mm-detect-coding-region start end)))
1004 (coding-system-get cs 'mime-charset))) 1114 (or (coding-system-get cs :mime-charset)
1115 (coding-system-get cs 'mime-charset))))
1005 (defun mm-detect-mime-charset-region (start end) 1116 (defun mm-detect-mime-charset-region (start end)
1006 "Detect MIME charset of the text in the region between START and END." 1117 "Detect MIME charset of the text in the region between START and END."
1007 (let ((cs (mm-detect-coding-region start end))) 1118 (let ((cs (mm-detect-coding-region start end)))
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index 94621535154..a5cdf1f4d72 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -197,6 +197,7 @@ Commands:
197 (view-mode) 197 (view-mode)
198 (make-local-variable 'view-no-disable-on-exit) 198 (make-local-variable 'view-no-disable-on-exit)
199 (setq view-no-disable-on-exit t) 199 (setq view-no-disable-on-exit t)
200 (setq view-exit-action (lambda (buffer) (delete-window)))
200 (run-mode-hooks 'help-mode-hook)) 201 (run-mode-hooks 'help-mode-hook))
201 202
202;;;###autoload 203;;;###autoload
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index 258f852a4d6..1a55676e3c7 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -139,7 +139,11 @@ and showing the image as an image."
139 ;; was inserted 139 ;; was inserted
140 (let* ((image 140 (let* ((image
141 (if (and (buffer-file-name) 141 (if (and (buffer-file-name)
142 (not (buffer-modified-p))) 142 (not (buffer-modified-p))
143 (not (and (boundp 'archive-superior-buffer)
144 archive-superior-buffer))
145 (not (and (boundp 'tar-superior-buffer)
146 tar-superior-buffer)))
143 (progn (clear-image-cache) 147 (progn (clear-image-cache)
144 (create-image (buffer-file-name))) 148 (create-image (buffer-file-name)))
145 (create-image 149 (create-image
diff --git a/lisp/imenu.el b/lisp/imenu.el
index 774903e1092..a609bcbadf9 100644
--- a/lisp/imenu.el
+++ b/lisp/imenu.el
@@ -208,18 +208,13 @@ during matching.")
208 208
209;;;###autoload 209;;;###autoload
210(defvar imenu-create-index-function 'imenu-default-create-index-function 210(defvar imenu-create-index-function 'imenu-default-create-index-function
211 "The function to use for creating a buffer index. 211 "The function to use for creating an index alist of the current buffer.
212 212
213It should be a function that takes no arguments and returns an index 213It should be a function that takes no arguments and returns
214of the current buffer as an alist. 214an index alist of the current buffer. The function is
215called within a `save-excursion'.
215 216
216Simple elements in the alist look like (INDEX-NAME . INDEX-POSITION). 217See `imenu--index-alist' for the format of the buffer index alist.")
217Special elements look like (INDEX-NAME INDEX-POSITION FUNCTION ARGUMENTS...).
218A nested sub-alist element looks like (INDEX-NAME SUB-ALIST).
219The function `imenu--subalist-p' tests an element and returns t
220if it is a sub-alist.
221
222This function is called within a `save-excursion'.")
223;;;###autoload 218;;;###autoload
224(make-variable-buffer-local 'imenu-create-index-function) 219(make-variable-buffer-local 'imenu-create-index-function)
225 220
@@ -431,15 +426,27 @@ Don't move point."
431;; The latest buffer index. 426;; The latest buffer index.
432;; Buffer local. 427;; Buffer local.
433(defvar imenu--index-alist nil 428(defvar imenu--index-alist nil
434 "The buffer index computed for this buffer in Imenu. 429 "The buffer index alist computed for this buffer in Imenu.
435Simple elements in the alist look like (INDEX-NAME . INDEX-POSITION). 430
436Special elements look like (INDEX-NAME INDEX-POSITION FUNCTION ARGUMENTS...). 431Simple elements in the alist look like (INDEX-NAME . POSITION).
437A nested sub-alist element looks like (INDEX-NAME SUB-ALIST).") 432POSITION is the buffer position of the item; to go to the item
433is simply to move point to that position.
434
435Special elements look like (INDEX-NAME POSITION FUNCTION ARGUMENTS...).
436To \"go to\" a special element means applying FUNCTION
437to INDEX-NAME, POSITION, and the ARGUMENTS.
438
439A nested sub-alist element looks like (INDEX-NAME SUB-ALIST).
440The function `imenu--subalist-p' tests an element and returns t
441if it is a sub-alist.
442
443There is one simple element with negative POSITION; selecting that
444element recalculates the buffer's index alist.")
438 445
439(make-variable-buffer-local 'imenu--index-alist) 446(make-variable-buffer-local 'imenu--index-alist)
440 447
441(defvar imenu--last-menubar-index-alist nil 448(defvar imenu--last-menubar-index-alist nil
442 "The latest buffer index used to update the menu bar menu.") 449 "The latest buffer index alist used to update the menu bar menu.")
443 450
444(make-variable-buffer-local 'imenu--last-menubar-index-alist) 451(make-variable-buffer-local 'imenu--last-menubar-index-alist)
445 452
@@ -547,19 +554,12 @@ A nested sub-alist element looks like (INDEX-NAME SUB-ALIST).")
547 554
548 555
549(defun imenu--make-index-alist (&optional noerror) 556(defun imenu--make-index-alist (&optional noerror)
550 "Create an index-alist for the definitions in the current buffer. 557 "Create an index alist for the definitions in the current buffer.
551 558This works by using the hook function `imenu-create-index-function'.
552Report an error if the list is empty unless NOERROR is supplied and 559Report an error if the list is empty unless NOERROR is supplied and
553non-nil. 560non-nil.
554 561
555Simple elements in the alist look like (INDEX-NAME . INDEX-POSITION). 562See `imenu--index-alist' for the format of the index alist."
556Special elements look like (INDEX-NAME FUNCTION ARGUMENTS...).
557A nested sub-alist element looks like (INDEX-NAME SUB-ALIST).
558The function `imenu--subalist-p' tests an element and returns t
559if it is a sub-alist.
560
561There is one simple element with negative POSITION; that's intended
562as a way for the user to ask to recalculate the buffer's index alist."
563 (or (and imenu--index-alist 563 (or (and imenu--index-alist
564 (or (not imenu-auto-rescan) 564 (or (not imenu-auto-rescan)
565 (and imenu-auto-rescan 565 (and imenu-auto-rescan
@@ -657,11 +657,15 @@ and speed-up matching.")
657(make-variable-buffer-local 'imenu-syntax-alist) 657(make-variable-buffer-local 'imenu-syntax-alist)
658 658
659(defun imenu-default-create-index-function () 659(defun imenu-default-create-index-function ()
660 "*Wrapper for index searching functions. 660 "*Default function to create an index alist of the current buffer.
661 661
662Moves point to end of buffer and then repeatedly calls 662The most general method is to move point to end of buffer, then repeatedly call
663`imenu-prev-index-position-function' and `imenu-extract-index-name-function'. 663`imenu-prev-index-position-function' and `imenu-extract-index-name-function'.
664Their results are gathered into an index alist." 664All the results returned by the latter are gathered into an index alist.
665This method is used if those two variables are non-nil.
666
667The alternate method, which is the one most often used, is to call
668`imenu--generic-function' with `imenu-generic-expression' as argument."
665 ;; These should really be done by setting imenu-create-index-function 669 ;; These should really be done by setting imenu-create-index-function
666 ;; in these major modes. But save that change for later. 670 ;; in these major modes. But save that change for later.
667 (cond ((and imenu-prev-index-position-function 671 (cond ((and imenu-prev-index-position-function
@@ -687,27 +691,6 @@ Their results are gathered into an index alist."
687 (t 691 (t
688 (error "This buffer cannot use `imenu-default-create-index-function'")))) 692 (error "This buffer cannot use `imenu-default-create-index-function'"))))
689 693
690;; Not used and would require cl at run time
691;; (defun imenu--flatten-index-alist (index-alist &optional concat-names prefix)
692;; ;; Takes a nested INDEX-ALIST and returns a flat index alist.
693;; ;; If optional CONCAT-NAMES is non-nil, then a nested index has its
694;; ;; name and a space concatenated to the names of the children.
695;; ;; Third argument PREFIX is for internal use only.
696;; (mapcan
697;; (lambda (item)
698;; (let* ((name (car item))
699;; (pos (cdr item))
700;; (new-prefix (and concat-names
701;; (if prefix
702;; (concat prefix imenu-level-separator name)
703;; name))))
704;; (cond
705;; ((or (markerp pos) (numberp pos))
706;; (list (cons new-prefix pos)))
707;; (t
708;; (imenu--flatten-index-alist pos new-prefix)))))
709;; index-alist))
710
711;;; 694;;;
712;;; Generic index gathering function. 695;;; Generic index gathering function.
713;;; 696;;;
@@ -724,7 +707,7 @@ for modes which use `imenu--generic-function'. If it is not set, but
724;; This function can be called with quitting disabled, 707;; This function can be called with quitting disabled,
725;; so it needs to be careful never to loop! 708;; so it needs to be careful never to loop!
726(defun imenu--generic-function (patterns) 709(defun imenu--generic-function (patterns)
727 "Return an index of the current buffer as an alist. 710 "Return an index alist of the current buffer based on PATTERNS.
728 711
729PATTERNS is an alist with elements that look like this: 712PATTERNS is an alist with elements that look like this:
730 (MENU-TITLE REGEXP INDEX) 713 (MENU-TITLE REGEXP INDEX)
@@ -732,9 +715,8 @@ or like this:
732 (MENU-TITLE REGEXP INDEX FUNCTION ARGUMENTS...) 715 (MENU-TITLE REGEXP INDEX FUNCTION ARGUMENTS...)
733with zero or more ARGUMENTS. The former format creates a simple 716with zero or more ARGUMENTS. The former format creates a simple
734element in the index alist when it matches; the latter creates a 717element in the index alist when it matches; the latter creates a
735special element of the form (NAME POSITION-MARKER FUNCTION 718special element of the form (INDEX-NAME POSITION-MARKER FUNCTION
736ARGUMENTS...) with FUNCTION and ARGUMENTS copied from 719ARGUMENTS...) with FUNCTION and ARGUMENTS copied from PATTERNS.
737`imenu-generic-expression'.
738 720
739MENU-TITLE is a string used as the title for the submenu or nil 721MENU-TITLE is a string used as the title for the submenu or nil
740if the entries are not nested. 722if the entries are not nested.
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 1be06fa7a3e..97ada1942bc 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -1994,7 +1994,7 @@ is non-nil if the user has supplied the password interactively.
1994 (re-search-backward 1994 (re-search-backward
1995 rmail-mime-charset-pattern 1995 rmail-mime-charset-pattern
1996 start t)))) 1996 start t))))
1997 (intern (downcase (match-string 1)))))) 1997 (intern (downcase (match-string 2))))))
1998 (rmail-decode-region start (point) mime-charset))))) 1998 (rmail-decode-region start (point) mime-charset)))))
1999 ;; Add an X-Coding-System: header if we don't have one. 1999 ;; Add an X-Coding-System: header if we don't have one.
2000 (save-excursion 2000 (save-excursion
@@ -2155,7 +2155,7 @@ is non-nil if the user has supplied the password interactively.
2155 (re-search-backward 2155 (re-search-backward
2156 rmail-mime-charset-pattern 2156 rmail-mime-charset-pattern
2157 start t)))) 2157 start t))))
2158 (intern (downcase (match-string 1)))))) 2158 (intern (downcase (match-string 2))))))
2159 (rmail-decode-region start (point) mime-charset))) 2159 (rmail-decode-region start (point) mime-charset)))
2160 (save-excursion 2160 (save-excursion
2161 (goto-char start) 2161 (goto-char start)
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog
index e67cdd553d0..89ca1dc04aa 100644
--- a/lisp/mh-e/ChangeLog
+++ b/lisp/mh-e/ChangeLog
@@ -1,3 +1,83 @@
12006-04-20 Bill Wohler <wohler@newt.com>
2
3 * mh-tool-bar.el (image-load-path): Define to shush compiler.
4 (mh-buffer-exists-p): Move inside mh-do-in-gnu-emacs since it
5 isn't used outside of it.
6 (mh-tool-bar-folder-buttons-init,
7 mh-tool-bar-letter-buttons-init): Update load-path/image-load-path
8 before setting buttons. This code used to be in
9 mh-folder-mode/mh-letter-mode but this was the wrong place since
10 mh-tool-bar-*-buttons-init can also be called when customizing the
11 buttons.
12 (mh-tool-bar-update): New function which updates tool-bar-map in
13 all of the MH-E buffers after customizing the buttons (closes SF
14 #1452718).
15 (mh-tool-bar-folder-buttons-set, mh-tool-bar-letter-buttons-set):
16 Call it (closes SF #1452718).
17
18 * mh-folder.el (mh-folder-buttons-init-flag): Delete. Use
19 mh-folder-tool-bar-map instead.
20 (image-load-path): Delete. No longer used.
21 (mh-folder-mode): Moved setting of image-load-path into
22 mh-tool-bar-folder-buttons-init.
23
24 * mh-letter.el (mh-letter-buttons-init-flag): Delete. Use
25 mh-letter-tool-bar-map instead.
26 (image-load-path): Delete. No longer used.
27 (mh-letter-mode): Moved setting of image-load-path into
28 mh-tool-bar-letter-buttons-init.
29
30 * mh-seq.el (mh-narrow-to-seq, mh-widen): Use with-current-buffer
31 instead of set-buffer.
32
332006-04-19 Bill Wohler <wohler@newt.com>
34
35 * mh-tool-bar.el (mh-tool-bar-define): Fix enable-expr so that one
36 can permanently disable a button (such as a separator) with nil.
37
382006-04-18 Bill Wohler <wohler@newt.com>
39
40 * mh-e.el (defcustom-mh, defface-mh, defgroup-mh, mh-face-data)
41 (mh-strip-package-version, mh-face-data, mh-inherit-face-flag)
42 (mh-min-colors-defined-flag): Do not unbind these macros and
43 variables. Nice idea, but too many nasty side-effects. These
44 macros are needed by [Cc]ustom-make-dependencies when creating the
45 MH-E customization groups in mh-cus-load.el. These disappeared
46 when the macros above were introduced. Besides, if a developer
47 were to try to show the help for a macro or variable they were
48 looking at and got [No match] when they did so, that would be bad.
49
502006-04-17 Bill Wohler <wohler@newt.com>
51
52 * mh-comp.el (mh-insert-x-mailer): Strip build number from
53 version in X-Mailer field (closes SF #1466481).
54
55 * mh-acros.el (mh-defun-compat): Rename to defun-mh in order that
56 variables and functions with the same name are found correctly by
57 find-func (invoked by clicking on the filename link in the *Help*
58 buffer).
59 (mh-defmacro-compat): Rename to defmacro-mh. Ditto.
60 * mh-e.el: (mh-defgroup): Rename to defgroup-mh. Ditto.
61 (mh-defcustom): Rename to defcustom-mh. Ditto.
62 (mh-defface): Rename to defface-mh. Ditto.
63 (mh-font-lock-add-keywords): Make changes according to these
64 renamings.
65
66 * mh-e.el, mh-compat.el, mh-gnus.el: Use the new names (closes SF
67 #1472029).
68
69 * mh-utils.el (mh-sub-folders-actual): Mention that folder must
70 have been processed by mh-normalize-folder-name.
71 (mh-folder-completion-function): Handle completion of folders with
72 absolute names. Also, when flag is t, display complete folder name
73 to provide proper highlighting in Emacs 22 now that
74 minibuffer-completing-file-name is nil (closes SF #1470518).
75 (mh-folder-completing-read): No longer set
76 minibuffer-completing-file-name to t. This was causing "Can't set
77 current directory errors" when browsing absolute file names.
78 Another benefit of this change is that SPC can be used for
79 completion again (closes SF #1470518).
80
12006-04-15 Bill Wohler <wohler@newt.com> 812006-04-15 Bill Wohler <wohler@newt.com>
2 82
3 * mh-compat.el (mh-font-lock-add-keywords): Fix typo in docstring. 83 * mh-compat.el (mh-font-lock-add-keywords): Fix typo in docstring.
@@ -147,7 +227,7 @@
147 (mh-scan-line-formats, mh-search, mh-sending-mail) 227 (mh-scan-line-formats, mh-search, mh-sending-mail)
148 (mh-sequences, mh-show, mh-speedbar, mh-thread, mh-tool-bar) 228 (mh-sequences, mh-show, mh-speedbar, mh-thread, mh-tool-bar)
149 (mh-hooks, mh-faces): Add :package-version keyword to these 229 (mh-hooks, mh-faces): Add :package-version keyword to these
150 groups. 230 groups (closes SF #1452724).
151 (mh-alias-completion-ignore-case-flag) 231 (mh-alias-completion-ignore-case-flag)
152 (mh-alias-expand-aliases-flag, mh-alias-flash-on-comma) 232 (mh-alias-expand-aliases-flag, mh-alias-flash-on-comma)
153 (mh-alias-insert-file, mh-alias-insertion-location) 233 (mh-alias-insert-file, mh-alias-insertion-location)
@@ -193,7 +273,7 @@
193 (mh-show-use-xface-flag, mh-store-default-directory) 273 (mh-show-use-xface-flag, mh-store-default-directory)
194 (mh-summary-height, mh-speed-update-interval) 274 (mh-summary-height, mh-speed-update-interval)
195 (mh-show-threads-flag, mh-tool-bar-search-function): Add 275 (mh-show-threads-flag, mh-tool-bar-search-function): Add
196 :package-version keyword to these options. 276 :package-version keyword to these options (closes SF #1452724).
197 (mh-after-commands-processed-hook) 277 (mh-after-commands-processed-hook)
198 (mh-alias-reloaded-hook, mh-before-commands-processed-hook) 278 (mh-alias-reloaded-hook, mh-before-commands-processed-hook)
199 (mh-before-quit-hook, mh-before-send-letter-hook) 279 (mh-before-quit-hook, mh-before-send-letter-hook)
@@ -204,7 +284,7 @@
204 (mh-mh-to-mime-hook, mh-search-mode-hook, mh-quit-hook) 284 (mh-mh-to-mime-hook, mh-search-mode-hook, mh-quit-hook)
205 (mh-refile-msg-hook, mh-show-hook, mh-show-mode-hook) 285 (mh-refile-msg-hook, mh-show-hook, mh-show-mode-hook)
206 (mh-unseen-updated-hook): Add :package-version keyword to these 286 (mh-unseen-updated-hook): Add :package-version keyword to these
207 hooks. 287 hooks (closes SF #1452724).
208 (mh-min-colors-defined-flag) 288 (mh-min-colors-defined-flag)
209 (mh-folder-address, mh-folder-body, mh-folder-cur-msg-number) 289 (mh-folder-address, mh-folder-body, mh-folder-cur-msg-number)
210 (mh-folder-date, mh-folder-deleted, mh-folder-followup) 290 (mh-folder-date, mh-folder-deleted, mh-folder-followup)
@@ -218,10 +298,10 @@
218 (mh-speedbar-folder, mh-speedbar-folder-with-unseen-messages) 298 (mh-speedbar-folder, mh-speedbar-folder-with-unseen-messages)
219 (mh-speedbar-selected-folder) 299 (mh-speedbar-selected-folder)
220 (mh-speedbar-selected-folder-with-unseen-messages): : Add 300 (mh-speedbar-selected-folder-with-unseen-messages): : Add
221 :package-version keyword to these faces. 301 :package-version keyword to these faces (closes SF #1452724).
222 302
223 * mh-tool-bar.el (mh-tool-bar-define): Added commented-out 303 * mh-tool-bar.el (mh-tool-bar-define): Added commented-out
224 :package-version keywords. 304 :package-version keywords (closes SF #1452724).
225 305
2262006-03-28 Bill Wohler <wohler@newt.com> 3062006-03-28 Bill Wohler <wohler@newt.com>
227 307
diff --git a/lisp/mh-e/mh-acros.el b/lisp/mh-e/mh-acros.el
index 41fadc1ec99..9fa69fae5d9 100644
--- a/lisp/mh-e/mh-acros.el
+++ b/lisp/mh-e/mh-acros.el
@@ -82,7 +82,7 @@ loads \"cl\" appropriately."
82 (funcall ',function ,@args)))) 82 (funcall ',function ,@args))))
83 83
84;;;###mh-autoload 84;;;###mh-autoload
85(defmacro mh-defun-compat (name function arg-list &rest body) 85(defmacro defun-mh (name function arg-list &rest body)
86 "Create function NAME. 86 "Create function NAME.
87If FUNCTION exists, then NAME becomes an alias for FUNCTION. 87If FUNCTION exists, then NAME becomes an alias for FUNCTION.
88Otherwise, create function NAME with ARG-LIST and BODY." 88Otherwise, create function NAME with ARG-LIST and BODY."
@@ -90,10 +90,10 @@ Otherwise, create function NAME with ARG-LIST and BODY."
90 (if defined-p 90 (if defined-p
91 `(defalias ',name ',function) 91 `(defalias ',name ',function)
92 `(defun ,name ,arg-list ,@body)))) 92 `(defun ,name ,arg-list ,@body))))
93(put 'mh-defun-compat 'lisp-indent-function 'defun) 93(put 'defun-mh 'lisp-indent-function 'defun)
94 94
95;;;###mh-autoload 95;;;###mh-autoload
96(defmacro mh-defmacro-compat (name macro arg-list &rest body) 96(defmacro defmacro-mh (name macro arg-list &rest body)
97 "Create macro NAME. 97 "Create macro NAME.
98If MACRO exists, then NAME becomes an alias for MACRO. 98If MACRO exists, then NAME becomes an alias for MACRO.
99Otherwise, create macro NAME with ARG-LIST and BODY." 99Otherwise, create macro NAME with ARG-LIST and BODY."
@@ -101,7 +101,7 @@ Otherwise, create macro NAME with ARG-LIST and BODY."
101 (if defined-p 101 (if defined-p
102 `(defalias ',name ',macro) 102 `(defalias ',name ',macro)
103 `(defmacro ,name ,arg-list ,@body)))) 103 `(defmacro ,name ,arg-list ,@body))))
104(put 'mh-defmacro-compat 'lisp-indent-function 'defun) 104(put 'defmacro-mh 'lisp-indent-function 'defun)
105 105
106 106
107 107
diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el
index b3c6ba12f57..ad80e3be838 100644
--- a/lisp/mh-e/mh-comp.el
+++ b/lisp/mh-e/mh-comp.el
@@ -912,7 +912,10 @@ The versions of MH-E, Emacs, and MH are shown."
912 (format "MH-E %s; %s; %sEmacs %s" 912 (format "MH-E %s; %s; %sEmacs %s"
913 mh-version mh-variant-in-use 913 mh-version mh-variant-in-use
914 (if mh-xemacs-flag "X" "GNU ") 914 (if mh-xemacs-flag "X" "GNU ")
915 (cond ((not mh-xemacs-flag) emacs-version) 915 (cond ((not mh-xemacs-flag)
916 (string-match "[0-9]+\\.[0-9]+\\(\\.[0-9]+\\)?"
917 emacs-version)
918 (match-string 0 emacs-version))
916 ((string-match "[0-9.]*\\( +\([ a-z]+[0-9]+\)\\)?" 919 ((string-match "[0-9.]*\\( +\([ a-z]+[0-9]+\)\\)?"
917 emacs-version) 920 emacs-version)
918 (match-string 0 emacs-version)) 921 (match-string 0 emacs-version))
diff --git a/lisp/mh-e/mh-compat.el b/lisp/mh-e/mh-compat.el
index 560a7fd4709..b346a41fad7 100644
--- a/lisp/mh-e/mh-compat.el
+++ b/lisp/mh-e/mh-compat.el
@@ -62,7 +62,7 @@ Simulate NOERROR argument in XEmacs which lacks it."
62 (load filename noerror t) 62 (load filename noerror t)
63 (load (format "%s" feature) noerror t))))) 63 (load (format "%s" feature) noerror t)))))
64 64
65(mh-defun-compat mh-assoc-string assoc-string (key list case-fold) 65(defun-mh mh-assoc-string assoc-string (key list case-fold)
66 "Like `assoc' but specifically for strings. 66 "Like `assoc' but specifically for strings.
67Case is ignored if CASE-FOLD is non-nil. 67Case is ignored if CASE-FOLD is non-nil.
68This function is used by Emacs versions that lack `assoc-string', 68This function is used by Emacs versions that lack `assoc-string',
@@ -77,7 +77,7 @@ introduced in Emacs 22."
77 'cancel-timer 77 'cancel-timer
78 'delete-itimer)) 78 'delete-itimer))
79 79
80(mh-defun-compat mh-display-color-cells display-color-cells (&optional display) 80(defun-mh mh-display-color-cells display-color-cells (&optional display)
81 "Return the number of color cells supported by DISPLAY. 81 "Return the number of color cells supported by DISPLAY.
82This function is used by XEmacs to return 2 when 82This function is used by XEmacs to return 2 when
83`device-color-cells' returns nil. This happens when compiling or 83`device-color-cells' returns nil. This happens when compiling or
@@ -115,12 +115,12 @@ introduced in Emacs 22."
115 `(face-background ,face ,frame) 115 `(face-background ,face ,frame)
116 `(face-background ,face ,frame ,inherit))) 116 `(face-background ,face ,frame ,inherit)))
117 117
118(mh-defun-compat mh-font-lock-add-keywords font-lock-add-keywords 118(defun-mh mh-font-lock-add-keywords font-lock-add-keywords
119 (mode keywords &optional how) 119 (mode keywords &optional how)
120 "XEmacs does not have `font-lock-add-keywords'. 120 "XEmacs does not have `font-lock-add-keywords'.
121This function returns nil on that system.") 121This function returns nil on that system.")
122 122
123(mh-defun-compat mh-image-load-path-for-library 123(defun-mh mh-image-load-path-for-library
124 image-load-path-for-library (library image &optional path no-error) 124 image-load-path-for-library (library image &optional path no-error)
125 "Return a suitable search path for images used by LIBRARY. 125 "Return a suitable search path for images used by LIBRARY.
126 126
@@ -215,7 +215,7 @@ compatibility with versions of Emacs that lack the variable
215 (nconc (list image-directory) 215 (nconc (list image-directory)
216 (delete image-directory (copy-sequence (or path load-path)))))) 216 (delete image-directory (copy-sequence (or path load-path))))))
217 217
218(mh-defun-compat mh-image-search-load-path 218(defun-mh mh-image-search-load-path
219 image-search-load-path (file &optional path) 219 image-search-load-path (file &optional path)
220 "Emacs 21 and XEmacs don't have `image-search-load-path'. 220 "Emacs 21 and XEmacs don't have `image-search-load-path'.
221This function returns nil on those systems." 221This function returns nil on those systems."
@@ -234,13 +234,13 @@ This function returns nil on those systems."
234 'point-at-eol)) 234 'point-at-eol))
235 235
236(mh-require 'mailabbrev nil t) 236(mh-require 'mailabbrev nil t)
237(mh-defun-compat mh-mail-abbrev-make-syntax-table 237(defun-mh mh-mail-abbrev-make-syntax-table
238 mail-abbrev-make-syntax-table () 238 mail-abbrev-make-syntax-table ()
239 "Emacs 21 and XEmacs don't have `mail-abbrev-make-syntax-table'. 239 "Emacs 21 and XEmacs don't have `mail-abbrev-make-syntax-table'.
240This function returns nil on those systems." 240This function returns nil on those systems."
241 nil) 241 nil)
242 242
243(mh-defun-compat mh-match-string-no-properties 243(defun-mh mh-match-string-no-properties
244 match-string-no-properties (num &optional string) 244 match-string-no-properties (num &optional string)
245 "Return string of text matched by last search, without text properties. 245 "Return string of text matched by last search, without text properties.
246This function is used by XEmacs that lacks `match-string-no-properties'. 246This function is used by XEmacs that lacks `match-string-no-properties'.
@@ -249,7 +249,7 @@ The argument STRING is ignored."
249 (buffer-substring-no-properties 249 (buffer-substring-no-properties
250 (match-beginning num) (match-end num))) 250 (match-beginning num) (match-end num)))
251 251
252(mh-defun-compat mh-replace-regexp-in-string replace-regexp-in-string 252(defun-mh mh-replace-regexp-in-string replace-regexp-in-string
253 (regexp rep string &optional fixedcase literal subexp start) 253 (regexp rep string &optional fixedcase literal subexp start)
254 "Replace REGEXP with REP everywhere in STRING and return result. 254 "Replace REGEXP with REP everywhere in STRING and return result.
255This function is used by XEmacs that lacks `replace-regexp-in-string'. 255This function is used by XEmacs that lacks `replace-regexp-in-string'.
@@ -269,7 +269,7 @@ The arguments FIXEDCASE, SUBEXP, and START, used by
269 "A list of characters that are _NOT_ reserved in the URL spec. 269 "A list of characters that are _NOT_ reserved in the URL spec.
270This is taken from RFC 2396.")) 270This is taken from RFC 2396."))
271 271
272(mh-defun-compat mh-url-hexify-string url-hexify-string (str) 272(defun-mh mh-url-hexify-string url-hexify-string (str)
273 "Escape characters in a string. 273 "Escape characters in a string.
274This is a copy of `url-hexify-string' from url-util.el in Emacs 274This is a copy of `url-hexify-string' from url-util.el in Emacs
27522; needed by Emacs 21." 27522; needed by Emacs 21."
@@ -283,7 +283,7 @@ This is a copy of `url-hexify-string' from url-util.el in Emacs
283 (char-to-string char))) 283 (char-to-string char)))
284 str "")) 284 str ""))
285 285
286(mh-defun-compat mh-view-mode-enter 286(defun-mh mh-view-mode-enter
287 view-mode-enter (&optional return-to exit-action) 287 view-mode-enter (&optional return-to exit-action)
288 "Enter View mode. 288 "Enter View mode.
289This function is used by XEmacs that lacks `view-mode-enter'. 289This function is used by XEmacs that lacks `view-mode-enter'.
diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el
index 6bf9458b459..9ae686d8950 100644
--- a/lisp/mh-e/mh-e.el
+++ b/lisp/mh-e/mh-e.el
@@ -114,11 +114,11 @@
114 (eval-when-compile 114 (eval-when-compile
115 `((,(concat "(\\(" 115 `((,(concat "(\\("
116 ;; Function declarations (use font-lock-function-name-face). 116 ;; Function declarations (use font-lock-function-name-face).
117 "\\(mh-def\\(un\\|macro\\)-compat\\)\\|" 117 "\\(def\\(un\\|macro\\)-mh\\)\\|"
118 ;; Variable declarations (use font-lock-variable-name-face). 118 ;; Variable declarations (use font-lock-variable-name-face).
119 "\\(mh-def\\(custom\\|face\\)\\)\\|" 119 "\\(def\\(custom\\|face\\)-mh\\)\\|"
120 ;; Group declarations (use font-lock-type-face). 120 ;; Group declarations (use font-lock-type-face).
121 "\\(mh-defgroup\\)" 121 "\\(defgroup-mh\\)"
122 "\\)\\>" 122 "\\)\\>"
123 ;; Any whitespace and defined object. 123 ;; Any whitespace and defined object.
124 "[ \t'\(]*" 124 "[ \t'\(]*"
@@ -684,7 +684,7 @@ ARGS is returned unchanged."
684 (t t)) 684 (t t))
685 collect keyword)))) 685 collect keyword))))
686 686
687(defmacro mh-defgroup (symbol members doc &rest args) 687(defmacro defgroup-mh (symbol members doc &rest args)
688 "Declare SYMBOL as a customization group containing MEMBERS. 688 "Declare SYMBOL as a customization group containing MEMBERS.
689See documentation for `defgroup' for a description of the arguments 689See documentation for `defgroup' for a description of the arguments
690SYMBOL, MEMBERS, DOC and ARGS. 690SYMBOL, MEMBERS, DOC and ARGS.
@@ -692,9 +692,9 @@ This macro is used by Emacs versions that lack the :package-version
692keyword, introduced in Emacs 22." 692keyword, introduced in Emacs 22."
693 (declare (doc-string 3)) 693 (declare (doc-string 3))
694 `(defgroup ,symbol ,members ,doc ,@(mh-strip-package-version args))) 694 `(defgroup ,symbol ,members ,doc ,@(mh-strip-package-version args)))
695(put 'mh-defgroup 'lisp-indent-function 'defun) 695(put 'defgroup-mh 'lisp-indent-function 'defun)
696 696
697(defmacro mh-defcustom (symbol value doc &rest args) 697(defmacro defcustom-mh (symbol value doc &rest args)
698 "Declare SYMBOL as a customizable variable that defaults to VALUE. 698 "Declare SYMBOL as a customizable variable that defaults to VALUE.
699See documentation for `defcustom' for a description of the arguments 699See documentation for `defcustom' for a description of the arguments
700SYMBOL, VALUE, DOC and ARGS. 700SYMBOL, VALUE, DOC and ARGS.
@@ -702,9 +702,9 @@ This macro is used by Emacs versions that lack the :package-version
702keyword, introduced in Emacs 22." 702keyword, introduced in Emacs 22."
703 (declare (doc-string 3)) 703 (declare (doc-string 3))
704 `(defcustom ,symbol ,value ,doc ,@(mh-strip-package-version args))) 704 `(defcustom ,symbol ,value ,doc ,@(mh-strip-package-version args)))
705(put 'mh-defcustom 'lisp-indent-function 'defun) 705(put 'defcustom-mh 'lisp-indent-function 'defun)
706 706
707(defmacro mh-defface (face spec doc &rest args) 707(defmacro defface-mh (face spec doc &rest args)
708 "Declare FACE as a customizable face that defaults to SPEC. 708 "Declare FACE as a customizable face that defaults to SPEC.
709See documentation for `defface' for a description of the arguments 709See documentation for `defface' for a description of the arguments
710FACE, SPEC, DOC and ARGS. 710FACE, SPEC, DOC and ARGS.
@@ -712,13 +712,13 @@ This macro is used by Emacs versions that lack the :package-version
712keyword, introduced in Emacs 22." 712keyword, introduced in Emacs 22."
713 (declare (doc-string 3)) 713 (declare (doc-string 3))
714 `(defface ,face ,spec ,doc ,@(mh-strip-package-version args))) 714 `(defface ,face ,spec ,doc ,@(mh-strip-package-version args)))
715(put 'mh-defface 'lisp-indent-function 'defun) 715(put 'defface-mh 'lisp-indent-function 'defun)
716 716
717 717
718 718
719;;; Variant Support 719;;; Variant Support
720 720
721(mh-defcustom mh-path nil 721(defcustom-mh mh-path nil
722 "*Additional list of directories to search for MH. 722 "*Additional list of directories to search for MH.
723See `mh-variant'." 723See `mh-variant'."
724 :group 'mh-e 724 :group 'mh-e
@@ -932,7 +932,7 @@ finally GNU mailutils."
932 (mapconcat '(lambda (x) (format "%s" (car x))) 932 (mapconcat '(lambda (x) (format "%s" (car x)))
933 (mh-variants) " or ")))))) 933 (mh-variants) " or "))))))
934 934
935(mh-defcustom mh-variant 'autodetect 935(defcustom-mh mh-variant 'autodetect
936 "*Specifies the variant used by MH-E. 936 "*Specifies the variant used by MH-E.
937 937
938The default setting of this option is \"Auto-detect\" which means 938The default setting of this option is \"Auto-detect\" which means
@@ -1017,7 +1017,7 @@ windows in the frame are removed."
1017 1017
1018;;; MH-E Customization Groups 1018;;; MH-E Customization Groups
1019 1019
1020(mh-defgroup mh-e nil 1020(defgroup-mh mh-e nil
1021 "Emacs interface to the MH mail system. 1021 "Emacs interface to the MH mail system.
1022MH is the Rand Mail Handler. Other implementations include nmh 1022MH is the Rand Mail Handler. Other implementations include nmh
1023and GNU mailutils." 1023and GNU mailutils."
@@ -1025,126 +1025,126 @@ and GNU mailutils."
1025 :group 'mail 1025 :group 'mail
1026 :package-version '(MH-E . "8.0")) 1026 :package-version '(MH-E . "8.0"))
1027 1027
1028(mh-defgroup mh-alias nil 1028(defgroup-mh mh-alias nil
1029 "Aliases." 1029 "Aliases."
1030 :link '(custom-manual "(mh-e)Aliases") 1030 :link '(custom-manual "(mh-e)Aliases")
1031 :prefix "mh-alias-" 1031 :prefix "mh-alias-"
1032 :group 'mh-e 1032 :group 'mh-e
1033 :package-version '(MH-E . "7.1")) 1033 :package-version '(MH-E . "7.1"))
1034 1034
1035(mh-defgroup mh-folder nil 1035(defgroup-mh mh-folder nil
1036 "Organizing your mail with folders." 1036 "Organizing your mail with folders."
1037 :prefix "mh-" 1037 :prefix "mh-"
1038 :link '(custom-manual "(mh-e)Folders") 1038 :link '(custom-manual "(mh-e)Folders")
1039 :group 'mh-e 1039 :group 'mh-e
1040 :package-version '(MH-E . "7.1")) 1040 :package-version '(MH-E . "7.1"))
1041 1041
1042(mh-defgroup mh-folder-selection nil 1042(defgroup-mh mh-folder-selection nil
1043 "Folder selection." 1043 "Folder selection."
1044 :prefix "mh-" 1044 :prefix "mh-"
1045 :link '(custom-manual "(mh-e)Folder Selection") 1045 :link '(custom-manual "(mh-e)Folder Selection")
1046 :group 'mh-e 1046 :group 'mh-e
1047 :package-version '(MH-E . "8.0")) 1047 :package-version '(MH-E . "8.0"))
1048 1048
1049(mh-defgroup mh-identity nil 1049(defgroup-mh mh-identity nil
1050 "Identities." 1050 "Identities."
1051 :link '(custom-manual "(mh-e)Identities") 1051 :link '(custom-manual "(mh-e)Identities")
1052 :prefix "mh-identity-" 1052 :prefix "mh-identity-"
1053 :group 'mh-e 1053 :group 'mh-e
1054 :package-version '(MH-E . "7.1")) 1054 :package-version '(MH-E . "7.1"))
1055 1055
1056(mh-defgroup mh-inc nil 1056(defgroup-mh mh-inc nil
1057 "Incorporating your mail." 1057 "Incorporating your mail."
1058 :prefix "mh-inc-" 1058 :prefix "mh-inc-"
1059 :link '(custom-manual "(mh-e)Incorporating Mail") 1059 :link '(custom-manual "(mh-e)Incorporating Mail")
1060 :group 'mh-e 1060 :group 'mh-e
1061 :package-version '(MH-E . "8.0")) 1061 :package-version '(MH-E . "8.0"))
1062 1062
1063(mh-defgroup mh-junk nil 1063(defgroup-mh mh-junk nil
1064 "Dealing with junk mail." 1064 "Dealing with junk mail."
1065 :link '(custom-manual "(mh-e)Junk") 1065 :link '(custom-manual "(mh-e)Junk")
1066 :prefix "mh-junk-" 1066 :prefix "mh-junk-"
1067 :group 'mh-e 1067 :group 'mh-e
1068 :package-version '(MH-E . "7.3")) 1068 :package-version '(MH-E . "7.3"))
1069 1069
1070(mh-defgroup mh-letter nil 1070(defgroup-mh mh-letter nil
1071 "Editing a draft." 1071 "Editing a draft."
1072 :prefix "mh-" 1072 :prefix "mh-"
1073 :link '(custom-manual "(mh-e)Editing Drafts") 1073 :link '(custom-manual "(mh-e)Editing Drafts")
1074 :group 'mh-e 1074 :group 'mh-e
1075 :package-version '(MH-E . "7.1")) 1075 :package-version '(MH-E . "7.1"))
1076 1076
1077(mh-defgroup mh-ranges nil 1077(defgroup-mh mh-ranges nil
1078 "Ranges." 1078 "Ranges."
1079 :prefix "mh-" 1079 :prefix "mh-"
1080 :link '(custom-manual "(mh-e)Ranges") 1080 :link '(custom-manual "(mh-e)Ranges")
1081 :group 'mh-e 1081 :group 'mh-e
1082 :package-version '(MH-E . "8.0")) 1082 :package-version '(MH-E . "8.0"))
1083 1083
1084(mh-defgroup mh-scan-line-formats nil 1084(defgroup-mh mh-scan-line-formats nil
1085 "Scan line formats." 1085 "Scan line formats."
1086 :link '(custom-manual "(mh-e)Scan Line Formats") 1086 :link '(custom-manual "(mh-e)Scan Line Formats")
1087 :prefix "mh-" 1087 :prefix "mh-"
1088 :group 'mh-e 1088 :group 'mh-e
1089 :package-version '(MH-E . "8.0")) 1089 :package-version '(MH-E . "8.0"))
1090 1090
1091(mh-defgroup mh-search nil 1091(defgroup-mh mh-search nil
1092 "Searching." 1092 "Searching."
1093 :link '(custom-manual "(mh-e)Searching") 1093 :link '(custom-manual "(mh-e)Searching")
1094 :prefix "mh-search-" 1094 :prefix "mh-search-"
1095 :group 'mh-e 1095 :group 'mh-e
1096 :package-version '(MH-E . "8.0")) 1096 :package-version '(MH-E . "8.0"))
1097 1097
1098(mh-defgroup mh-sending-mail nil 1098(defgroup-mh mh-sending-mail nil
1099 "Sending mail." 1099 "Sending mail."
1100 :prefix "mh-" 1100 :prefix "mh-"
1101 :link '(custom-manual "(mh-e)Sending Mail") 1101 :link '(custom-manual "(mh-e)Sending Mail")
1102 :group 'mh-e 1102 :group 'mh-e
1103 :package-version '(MH-E . "8.0")) 1103 :package-version '(MH-E . "8.0"))
1104 1104
1105(mh-defgroup mh-sequences nil 1105(defgroup-mh mh-sequences nil
1106 "Sequences." 1106 "Sequences."
1107 :prefix "mh-" 1107 :prefix "mh-"
1108 :link '(custom-manual "(mh-e)Sequences") 1108 :link '(custom-manual "(mh-e)Sequences")
1109 :group 'mh-e 1109 :group 'mh-e
1110 :package-version '(MH-E . "8.0")) 1110 :package-version '(MH-E . "8.0"))
1111 1111
1112(mh-defgroup mh-show nil 1112(defgroup-mh mh-show nil
1113 "Reading your mail." 1113 "Reading your mail."
1114 :prefix "mh-" 1114 :prefix "mh-"
1115 :link '(custom-manual "(mh-e)Reading Mail") 1115 :link '(custom-manual "(mh-e)Reading Mail")
1116 :group 'mh-e 1116 :group 'mh-e
1117 :package-version '(MH-E . "7.1")) 1117 :package-version '(MH-E . "7.1"))
1118 1118
1119(mh-defgroup mh-speedbar nil 1119(defgroup-mh mh-speedbar nil
1120 "The speedbar." 1120 "The speedbar."
1121 :prefix "mh-speed-" 1121 :prefix "mh-speed-"
1122 :link '(custom-manual "(mh-e)Speedbar") 1122 :link '(custom-manual "(mh-e)Speedbar")
1123 :group 'mh-e 1123 :group 'mh-e
1124 :package-version '(MH-E . "8.0")) 1124 :package-version '(MH-E . "8.0"))
1125 1125
1126(mh-defgroup mh-thread nil 1126(defgroup-mh mh-thread nil
1127 "Threading." 1127 "Threading."
1128 :prefix "mh-thread-" 1128 :prefix "mh-thread-"
1129 :link '(custom-manual "(mh-e)Threading") 1129 :link '(custom-manual "(mh-e)Threading")
1130 :group 'mh-e 1130 :group 'mh-e
1131 :package-version '(MH-E . "8.0")) 1131 :package-version '(MH-E . "8.0"))
1132 1132
1133(mh-defgroup mh-tool-bar nil 1133(defgroup-mh mh-tool-bar nil
1134 "The tool bar" 1134 "The tool bar"
1135 :link '(custom-manual "(mh-e)Tool Bar") 1135 :link '(custom-manual "(mh-e)Tool Bar")
1136 :prefix "mh-" 1136 :prefix "mh-"
1137 :group 'mh-e 1137 :group 'mh-e
1138 :package-version '(MH-E . "8.0")) 1138 :package-version '(MH-E . "8.0"))
1139 1139
1140(mh-defgroup mh-hooks nil 1140(defgroup-mh mh-hooks nil
1141 "MH-E hooks." 1141 "MH-E hooks."
1142 :link '(custom-manual "(mh-e)Top") 1142 :link '(custom-manual "(mh-e)Top")
1143 :prefix "mh-" 1143 :prefix "mh-"
1144 :group 'mh-e 1144 :group 'mh-e
1145 :package-version '(MH-E . "7.1")) 1145 :package-version '(MH-E . "7.1"))
1146 1146
1147(mh-defgroup mh-faces nil 1147(defgroup-mh mh-faces nil
1148 "Faces used in MH-E." 1148 "Faces used in MH-E."
1149 :link '(custom-manual "(mh-e)Top") 1149 :link '(custom-manual "(mh-e)Top")
1150 :prefix "mh-" 1150 :prefix "mh-"
@@ -1160,7 +1160,7 @@ and GNU mailutils."
1160 1160
1161;;; Aliases (:group 'mh-alias) 1161;;; Aliases (:group 'mh-alias)
1162 1162
1163(mh-defcustom mh-alias-completion-ignore-case-flag t 1163(defcustom-mh mh-alias-completion-ignore-case-flag t
1164 "*Non-nil means don't consider case significant in MH alias completion. 1164 "*Non-nil means don't consider case significant in MH alias completion.
1165 1165
1166As MH ignores case in the aliases, so too does MH-E. However, you 1166As MH ignores case in the aliases, so too does MH-E. However, you
@@ -1171,7 +1171,7 @@ lowercase for mailing lists and uppercase for people."
1171 :group 'mh-alias 1171 :group 'mh-alias
1172 :package-version '(MH-E . "7.1")) 1172 :package-version '(MH-E . "7.1"))
1173 1173
1174(mh-defcustom mh-alias-expand-aliases-flag nil 1174(defcustom-mh mh-alias-expand-aliases-flag nil
1175 "*Non-nil means to expand aliases entered in the minibuffer. 1175 "*Non-nil means to expand aliases entered in the minibuffer.
1176 1176
1177In other words, aliases entered in the minibuffer will be 1177In other words, aliases entered in the minibuffer will be
@@ -1181,7 +1181,7 @@ this expansion is not performed."
1181 :group 'mh-alias 1181 :group 'mh-alias
1182 :package-version '(MH-E . "7.1")) 1182 :package-version '(MH-E . "7.1"))
1183 1183
1184(mh-defcustom mh-alias-flash-on-comma t 1184(defcustom-mh mh-alias-flash-on-comma t
1185 "*Specify whether to flash address or warn on translation. 1185 "*Specify whether to flash address or warn on translation.
1186 1186
1187This option controls the behavior when a [comma] is pressed while 1187This option controls the behavior when a [comma] is pressed while
@@ -1194,7 +1194,7 @@ does not display a warning if the alias is not found."
1194 :group 'mh-alias 1194 :group 'mh-alias
1195 :package-version '(MH-E . "7.1")) 1195 :package-version '(MH-E . "7.1"))
1196 1196
1197(mh-defcustom mh-alias-insert-file nil 1197(defcustom-mh mh-alias-insert-file nil
1198 "*Filename used to store a new MH-E alias. 1198 "*Filename used to store a new MH-E alias.
1199 1199
1200The default setting of this option is \"Use Aliasfile Profile 1200The default setting of this option is \"Use Aliasfile Profile
@@ -1208,7 +1208,7 @@ name, MH-E will prompt for one of them when MH-E adds an alias."
1208 :group 'mh-alias 1208 :group 'mh-alias
1209 :package-version '(MH-E . "7.1")) 1209 :package-version '(MH-E . "7.1"))
1210 1210
1211(mh-defcustom mh-alias-insertion-location 'sorted 1211(defcustom-mh mh-alias-insertion-location 'sorted
1212 "Specifies where new aliases are entered in alias files. 1212 "Specifies where new aliases are entered in alias files.
1213 1213
1214This option is set to \"Alphabetical\" by default. If you organize 1214This option is set to \"Alphabetical\" by default. If you organize
@@ -1220,7 +1220,7 @@ or \"Bottom\" of your alias file might be more appropriate."
1220 :group 'mh-alias 1220 :group 'mh-alias
1221 :package-version '(MH-E . "7.1")) 1221 :package-version '(MH-E . "7.1"))
1222 1222
1223(mh-defcustom mh-alias-local-users t 1223(defcustom-mh mh-alias-local-users t
1224 "*If on, local users are added to alias completion. 1224 "*If on, local users are added to alias completion.
1225 1225
1226Aliases are created from \"/etc/passwd\" entries with a user ID 1226Aliases are created from \"/etc/passwd\" entries with a user ID
@@ -1241,7 +1241,7 @@ NIS password file."
1241 :group 'mh-alias 1241 :group 'mh-alias
1242 :package-version '(MH-E . "7.1")) 1242 :package-version '(MH-E . "7.1"))
1243 1243
1244(mh-defcustom mh-alias-local-users-prefix "local." 1244(defcustom-mh mh-alias-local-users-prefix "local."
1245 "*String prefixed to the real names of users from the password file. 1245 "*String prefixed to the real names of users from the password file.
1246This option can also be set to \"Use Login\". 1246This option can also be set to \"Use Login\".
1247 1247
@@ -1263,7 +1263,7 @@ turned off."
1263 :group 'mh-alias 1263 :group 'mh-alias
1264 :package-version '(MH-E . "7.4")) 1264 :package-version '(MH-E . "7.4"))
1265 1265
1266(mh-defcustom mh-alias-passwd-gecos-comma-separator-flag t 1266(defcustom-mh mh-alias-passwd-gecos-comma-separator-flag t
1267 "*Non-nil means the gecos field in the password file uses a comma separator. 1267 "*Non-nil means the gecos field in the password file uses a comma separator.
1268 1268
1269In the example in `mh-alias-local-users-prefix', commas are used 1269In the example in `mh-alias-local-users-prefix', commas are used
@@ -1277,7 +1277,7 @@ whose contents may contain commas, you can turn this option off."
1277 1277
1278;;; Organizing Your Mail with Folders (:group 'mh-folder) 1278;;; Organizing Your Mail with Folders (:group 'mh-folder)
1279 1279
1280(mh-defcustom mh-new-messages-folders t 1280(defcustom-mh mh-new-messages-folders t
1281 "Folders searched for the \"unseen\" sequence. 1281 "Folders searched for the \"unseen\" sequence.
1282 1282
1283Set this option to \"Inbox\" to search the \"+inbox\" folder or 1283Set this option to \"Inbox\" to search the \"+inbox\" folder or
@@ -1292,7 +1292,7 @@ See also `mh-recursive-folders-flag'."
1292 :group 'mh-folder 1292 :group 'mh-folder
1293 :package-version '(MH-E . "8.0")) 1293 :package-version '(MH-E . "8.0"))
1294 1294
1295(mh-defcustom mh-ticked-messages-folders t 1295(defcustom-mh mh-ticked-messages-folders t
1296 "Folders searched for `mh-tick-seq'. 1296 "Folders searched for `mh-tick-seq'.
1297 1297
1298Set this option to \"Inbox\" to search the \"+inbox\" folder or 1298Set this option to \"Inbox\" to search the \"+inbox\" folder or
@@ -1307,7 +1307,7 @@ See also `mh-recursive-folders-flag'."
1307 :group 'mh-folder 1307 :group 'mh-folder
1308 :package-version '(MH-E . "8.0")) 1308 :package-version '(MH-E . "8.0"))
1309 1309
1310(mh-defcustom mh-large-folder 200 1310(defcustom-mh mh-large-folder 200
1311 "The number of messages that indicates a large folder. 1311 "The number of messages that indicates a large folder.
1312 1312
1313If a folder is deemed to be large, that is the number of messages 1313If a folder is deemed to be large, that is the number of messages
@@ -1319,7 +1319,7 @@ folders are treated as if they are small."
1319 :group 'mh-folder 1319 :group 'mh-folder
1320 :package-version '(MH-E . "7.0")) 1320 :package-version '(MH-E . "7.0"))
1321 1321
1322(mh-defcustom mh-recenter-summary-flag nil 1322(defcustom-mh mh-recenter-summary-flag nil
1323 "*Non-nil means to recenter the summary window. 1323 "*Non-nil means to recenter the summary window.
1324 1324
1325If this option is turned on, recenter the summary window when the 1325If this option is turned on, recenter the summary window when the
@@ -1328,13 +1328,13 @@ show window is toggled off."
1328 :group 'mh-folder 1328 :group 'mh-folder
1329 :package-version '(MH-E . "7.0")) 1329 :package-version '(MH-E . "7.0"))
1330 1330
1331(mh-defcustom mh-recursive-folders-flag nil 1331(defcustom-mh mh-recursive-folders-flag nil
1332 "*Non-nil means that commands which operate on folders do so recursively." 1332 "*Non-nil means that commands which operate on folders do so recursively."
1333 :type 'boolean 1333 :type 'boolean
1334 :group 'mh-folder 1334 :group 'mh-folder
1335 :package-version '(MH-E . "7.0")) 1335 :package-version '(MH-E . "7.0"))
1336 1336
1337(mh-defcustom mh-sortm-args nil 1337(defcustom-mh mh-sortm-args nil
1338 "*Additional arguments for \"sortm\"\\<mh-folder-mode-map>. 1338 "*Additional arguments for \"sortm\"\\<mh-folder-mode-map>.
1339 1339
1340This option is consulted when a prefix argument is used with 1340This option is consulted when a prefix argument is used with
@@ -1348,7 +1348,7 @@ an alternate view. For example, \"'(\"-nolimit\" \"-textfield\"
1348 1348
1349;;; Folder Selection (:group 'mh-folder-selection) 1349;;; Folder Selection (:group 'mh-folder-selection)
1350 1350
1351(mh-defcustom mh-default-folder-for-message-function nil 1351(defcustom-mh mh-default-folder-for-message-function nil
1352 "Function to select a default folder for refiling or \"Fcc:\". 1352 "Function to select a default folder for refiling or \"Fcc:\".
1353 1353
1354When this function is called, the current buffer contains the message 1354When this function is called, the current buffer contains the message
@@ -1360,7 +1360,7 @@ the default, or an empty string to suppress the default entirely."
1360 :group 'mh-folder-selection 1360 :group 'mh-folder-selection
1361 :package-version '(MH-E . "8.0")) 1361 :package-version '(MH-E . "8.0"))
1362 1362
1363(mh-defcustom mh-default-folder-list nil 1363(defcustom-mh mh-default-folder-list nil
1364 "*List of addresses and folders. 1364 "*List of addresses and folders.
1365 1365
1366The folder name associated with the first address found in this 1366The folder name associated with the first address found in this
@@ -1378,7 +1378,7 @@ for more information."
1378 :group 'mh-folder-selection 1378 :group 'mh-folder-selection
1379 :package-version '(MH-E . "7.2")) 1379 :package-version '(MH-E . "7.2"))
1380 1380
1381(mh-defcustom mh-default-folder-must-exist-flag t 1381(defcustom-mh mh-default-folder-must-exist-flag t
1382 "*Non-nil means guessed folder name must exist to be used. 1382 "*Non-nil means guessed folder name must exist to be used.
1383 1383
1384If the derived folder does not exist, and this option is on, then 1384If the derived folder does not exist, and this option is on, then
@@ -1392,7 +1392,7 @@ for more information."
1392 :group 'mh-folder-selection 1392 :group 'mh-folder-selection
1393 :package-version '(MH-E . "7.2")) 1393 :package-version '(MH-E . "7.2"))
1394 1394
1395(mh-defcustom mh-default-folder-prefix "" 1395(defcustom-mh mh-default-folder-prefix ""
1396 "*Prefix used for folder names generated from aliases. 1396 "*Prefix used for folder names generated from aliases.
1397The prefix is used to prevent clutter in your mail directory. 1397The prefix is used to prevent clutter in your mail directory.
1398 1398
@@ -1411,7 +1411,7 @@ for more information."
1411Real definition will take effect when mh-identity is loaded." 1411Real definition will take effect when mh-identity is loaded."
1412 nil))) 1412 nil)))
1413 1413
1414(mh-defcustom mh-identity-list nil 1414(defcustom-mh mh-identity-list nil
1415 "*List of identities. 1415 "*List of identities.
1416 1416
1417To customize this option, click on the \"INS\" button and enter a label 1417To customize this option, click on the \"INS\" button and enter a label
@@ -1480,7 +1480,7 @@ fashion."
1480 :group 'mh-identity 1480 :group 'mh-identity
1481 :package-version '(MH-E . "7.1")) 1481 :package-version '(MH-E . "7.1"))
1482 1482
1483(mh-defcustom mh-auto-fields-list nil 1483(defcustom-mh mh-auto-fields-list nil
1484 "List of recipients for which header lines are automatically inserted. 1484 "List of recipients for which header lines are automatically inserted.
1485 1485
1486This option can be used to set the identity depending on the 1486This option can be used to set the identity depending on the
@@ -1541,14 +1541,14 @@ as the result is undefined."
1541 :group 'mh-identity 1541 :group 'mh-identity
1542 :package-version '(MH-E . "7.3")) 1542 :package-version '(MH-E . "7.3"))
1543 1543
1544(mh-defcustom mh-auto-fields-prompt-flag t 1544(defcustom-mh mh-auto-fields-prompt-flag t
1545 "*Non-nil means to prompt before sending if fields inserted. 1545 "*Non-nil means to prompt before sending if fields inserted.
1546See `mh-auto-fields-list'." 1546See `mh-auto-fields-list'."
1547 :type 'boolean 1547 :type 'boolean
1548 :group 'mh-identity 1548 :group 'mh-identity
1549 :package-version '(MH-E . "8.0")) 1549 :package-version '(MH-E . "8.0"))
1550 1550
1551(mh-defcustom mh-identity-default nil 1551(defcustom-mh mh-identity-default nil
1552 "Default identity to use when `mh-letter-mode' is called. 1552 "Default identity to use when `mh-letter-mode' is called.
1553See `mh-identity-list'." 1553See `mh-identity-list'."
1554 :type (append 1554 :type (append
@@ -1559,7 +1559,7 @@ See `mh-identity-list'."
1559 :group 'mh-identity 1559 :group 'mh-identity
1560 :package-version '(MH-E . "7.1")) 1560 :package-version '(MH-E . "7.1"))
1561 1561
1562(mh-defcustom mh-identity-handlers 1562(defcustom-mh mh-identity-handlers
1563 '(("From" . mh-identity-handler-top) 1563 '(("From" . mh-identity-handler-top)
1564 (":default" . mh-identity-handler-bottom) 1564 (":default" . mh-identity-handler-bottom)
1565 (":attribution-verb" . mh-identity-handler-attribution-verb) 1565 (":attribution-verb" . mh-identity-handler-attribution-verb)
@@ -1595,7 +1595,7 @@ containing the VALUE for the field is given."
1595 1595
1596;;; Incorporating Your Mail (:group 'mh-inc) 1596;;; Incorporating Your Mail (:group 'mh-inc)
1597 1597
1598(mh-defcustom mh-inc-prog "inc" 1598(defcustom-mh mh-inc-prog "inc"
1599 "*Program to incorporate new mail into a folder. 1599 "*Program to incorporate new mail into a folder.
1600 1600
1601This program generates a one-line summary for each of the new 1601This program generates a one-line summary for each of the new
@@ -1614,7 +1614,7 @@ several scan line format variables appropriately."
1614Real definition will take effect when mh-inc is loaded." 1614Real definition will take effect when mh-inc is loaded."
1615 nil))) 1615 nil)))
1616 1616
1617(mh-defcustom mh-inc-spool-list nil 1617(defcustom-mh mh-inc-spool-list nil
1618 "*Alternate spool files. 1618 "*Alternate spool files.
1619 1619
1620You can use the `mh-inc-spool-list' variable to direct MH-E to 1620You can use the `mh-inc-spool-list' variable to direct MH-E to
@@ -1687,7 +1687,7 @@ The function is always called with SYMBOL bound to
1687 until (executable-find (symbol-name (car element))) 1687 until (executable-find (symbol-name (car element)))
1688 finally return (car element))))) 1688 finally return (car element)))))
1689 1689
1690(mh-defcustom mh-junk-background nil 1690(defcustom-mh mh-junk-background nil
1691 "If on, spam programs are run in background. 1691 "If on, spam programs are run in background.
1692 1692
1693By default, the programs are run in the foreground, but this can 1693By default, the programs are run in the foreground, but this can
@@ -1699,14 +1699,14 @@ you might try turning on this option."
1699 :group 'mh-junk 1699 :group 'mh-junk
1700 :package-version '(MH-E . "8.0")) 1700 :package-version '(MH-E . "8.0"))
1701 1701
1702(mh-defcustom mh-junk-disposition nil 1702(defcustom-mh mh-junk-disposition nil
1703 "Disposition of junk mail." 1703 "Disposition of junk mail."
1704 :type '(choice (const :tag "Delete Spam" nil) 1704 :type '(choice (const :tag "Delete Spam" nil)
1705 (string :tag "Spam Folder")) 1705 (string :tag "Spam Folder"))
1706 :group 'mh-junk 1706 :group 'mh-junk
1707 :package-version '(MH-E . "8.0")) 1707 :package-version '(MH-E . "8.0"))
1708 1708
1709(mh-defcustom mh-junk-program nil 1709(defcustom-mh mh-junk-program nil
1710 "Spam program that MH-E should use. 1710 "Spam program that MH-E should use.
1711 1711
1712The default setting of this option is \"Auto-detect\" which means 1712The default setting of this option is \"Auto-detect\" which means
@@ -1724,7 +1724,7 @@ bogofilter, then you can set this option to \"Bogofilter\"."
1724 1724
1725;;; Editing a Draft (:group 'mh-letter) 1725;;; Editing a Draft (:group 'mh-letter)
1726 1726
1727(mh-defcustom mh-compose-insertion (if (locate-library "mml") 'mml 'mh) 1727(defcustom-mh mh-compose-insertion (if (locate-library "mml") 'mml 'mh)
1728 "Type of tags used when composing MIME messages. 1728 "Type of tags used when composing MIME messages.
1729 1729
1730In addition to MH-style directives, MH-E also supports MML (MIME 1730In addition to MH-style directives, MH-E also supports MML (MIME
@@ -1738,7 +1738,7 @@ MH-style directives are preferred."
1738 :group 'mh-letter 1738 :group 'mh-letter
1739 :package-version '(MH-E . "7.0")) 1739 :package-version '(MH-E . "7.0"))
1740 1740
1741(mh-defcustom mh-compose-skipped-header-fields 1741(defcustom-mh mh-compose-skipped-header-fields
1742 '("From" "Organization" "References" "In-Reply-To" 1742 '("From" "Organization" "References" "In-Reply-To"
1743 "X-Face" "Face" "X-Image-URL" "X-Mailer") 1743 "X-Face" "Face" "X-Image-URL" "X-Mailer")
1744 "List of header fields to skip over when navigating in draft." 1744 "List of header fields to skip over when navigating in draft."
@@ -1746,13 +1746,13 @@ MH-style directives are preferred."
1746 :group 'mh-letter 1746 :group 'mh-letter
1747 :package-version '(MH-E . "7.4")) 1747 :package-version '(MH-E . "7.4"))
1748 1748
1749(mh-defcustom mh-compose-space-does-completion-flag nil 1749(defcustom-mh mh-compose-space-does-completion-flag nil
1750 "*Non-nil means \\<mh-letter-mode-map>\\[mh-letter-complete-or-space] does completion in message header." 1750 "*Non-nil means \\<mh-letter-mode-map>\\[mh-letter-complete-or-space] does completion in message header."
1751 :type 'boolean 1751 :type 'boolean
1752 :group 'mh-letter 1752 :group 'mh-letter
1753 :package-version '(MH-E . "7.4")) 1753 :package-version '(MH-E . "7.4"))
1754 1754
1755(mh-defcustom mh-delete-yanked-msg-window-flag nil 1755(defcustom-mh mh-delete-yanked-msg-window-flag nil
1756 "*Non-nil means delete any window displaying the message. 1756 "*Non-nil means delete any window displaying the message.
1757 1757
1758This deletes the window containing the original message after 1758This deletes the window containing the original message after
@@ -1762,7 +1762,7 @@ more room on your screen for your reply."
1762 :group 'mh-letter 1762 :group 'mh-letter
1763 :package-version '(MH-E . "7.0")) 1763 :package-version '(MH-E . "7.0"))
1764 1764
1765(mh-defcustom mh-extract-from-attribution-verb "wrote:" 1765(defcustom-mh mh-extract-from-attribution-verb "wrote:"
1766 "*Verb to use for attribution when a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg]. 1766 "*Verb to use for attribution when a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg].
1767 1767
1768The attribution consists of the sender's name and email address 1768The attribution consists of the sender's name and email address
@@ -1776,7 +1776,7 @@ followed by the content of this option. This option can be set to
1776 :group 'mh-letter 1776 :group 'mh-letter
1777 :package-version '(MH-E . "7.0")) 1777 :package-version '(MH-E . "7.0"))
1778 1778
1779(mh-defcustom mh-ins-buf-prefix "> " 1779(defcustom-mh mh-ins-buf-prefix "> "
1780 "*String to put before each line of a yanked or inserted message. 1780 "*String to put before each line of a yanked or inserted message.
1781 1781
1782The prefix \"> \" is the default setting of this option. I 1782The prefix \"> \" is the default setting of this option. I
@@ -1792,7 +1792,7 @@ flavors of `mh-yank-behavior' or you have added a
1792 :group 'mh-letter 1792 :group 'mh-letter
1793 :package-version '(MH-E . "6.0")) 1793 :package-version '(MH-E . "6.0"))
1794 1794
1795(mh-defcustom mh-letter-complete-function 'ispell-complete-word 1795(defcustom-mh mh-letter-complete-function 'ispell-complete-word
1796 "*Function to call when completing outside of address or folder fields. 1796 "*Function to call when completing outside of address or folder fields.
1797 1797
1798In the body of the message, 1798In the body of the message,
@@ -1802,7 +1802,7 @@ which is set to \"ispell-complete-word\" by default."
1802 :group 'mh-letter 1802 :group 'mh-letter
1803 :package-version '(MH-E . "7.1")) 1803 :package-version '(MH-E . "7.1"))
1804 1804
1805(mh-defcustom mh-letter-fill-column 72 1805(defcustom-mh mh-letter-fill-column 72
1806 "*Fill column to use in MH Letter mode. 1806 "*Fill column to use in MH Letter mode.
1807 1807
1808By default, this option is 72 to allow others to quote your 1808By default, this option is 72 to allow others to quote your
@@ -1811,7 +1811,7 @@ message without line wrapping."
1811 :group 'mh-letter 1811 :group 'mh-letter
1812 :package-version '(MH-E . "6.0")) 1812 :package-version '(MH-E . "6.0"))
1813 1813
1814(mh-defcustom mh-mml-method-default (if mh-pgp-support-flag "pgpmime" "none") 1814(defcustom-mh mh-mml-method-default (if mh-pgp-support-flag "pgpmime" "none")
1815 "Default method to use in security tags. 1815 "Default method to use in security tags.
1816 1816
1817This option is used to select between a variety of mail security 1817This option is used to select between a variety of mail security
@@ -1834,7 +1834,7 @@ you write!"
1834 :group 'mh-letter 1834 :group 'mh-letter
1835 :package-version '(MH-E . "8.0")) 1835 :package-version '(MH-E . "8.0"))
1836 1836
1837(mh-defcustom mh-signature-file-name "~/.signature" 1837(defcustom-mh mh-signature-file-name "~/.signature"
1838 "*Source of user's signature. 1838 "*Source of user's signature.
1839 1839
1840By default, the text of your signature is taken from the file 1840By default, the text of your signature is taken from the file
@@ -1857,7 +1857,7 @@ The signature is inserted into your message with the command
1857 :group 'mh-letter 1857 :group 'mh-letter
1858 :package-version '(MH-E . "6.0")) 1858 :package-version '(MH-E . "6.0"))
1859 1859
1860(mh-defcustom mh-signature-separator-flag t 1860(defcustom-mh mh-signature-separator-flag t
1861 "*Non-nil means a signature separator should be inserted. 1861 "*Non-nil means a signature separator should be inserted.
1862 1862
1863It is not recommended that you change this option since various 1863It is not recommended that you change this option since various
@@ -1868,7 +1868,7 @@ replying or yanking a letter into a draft."
1868 :group 'mh-letter 1868 :group 'mh-letter
1869 :package-version '(MH-E . "8.0")) 1869 :package-version '(MH-E . "8.0"))
1870 1870
1871(mh-defcustom mh-x-face-file "~/.face" 1871(defcustom-mh mh-x-face-file "~/.face"
1872 "*File containing face header field to insert in outgoing mail. 1872 "*File containing face header field to insert in outgoing mail.
1873 1873
1874If the file starts with either of the strings \"X-Face:\", \"Face:\" 1874If the file starts with either of the strings \"X-Face:\", \"Face:\"
@@ -1897,7 +1897,7 @@ this option doesn't exist."
1897 :group 'mh-letter 1897 :group 'mh-letter
1898 :package-version '(MH-E . "7.0")) 1898 :package-version '(MH-E . "7.0"))
1899 1899
1900(mh-defcustom mh-yank-behavior 'attribution 1900(defcustom-mh mh-yank-behavior 'attribution
1901 "*Controls which part of a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg]. 1901 "*Controls which part of a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg].
1902 1902
1903To include the entire message, including the entire header, use 1903To include the entire message, including the entire header, use
@@ -1944,7 +1944,7 @@ inserted."
1944 1944
1945;;; Ranges (:group 'mh-ranges) 1945;;; Ranges (:group 'mh-ranges)
1946 1946
1947(mh-defcustom mh-interpret-number-as-range-flag t 1947(defcustom-mh mh-interpret-number-as-range-flag t
1948 "*Non-nil means interpret a number as a range. 1948 "*Non-nil means interpret a number as a range.
1949 1949
1950Since one of the most frequent ranges used is \"last:N\", MH-E 1950Since one of the most frequent ranges used is \"last:N\", MH-E
@@ -1964,7 +1964,7 @@ message 200, then use the range \"200:200\"."
1964Real definition, below, uses variables that aren't defined yet." 1964Real definition, below, uses variables that aren't defined yet."
1965 (set-default symbol value)))) 1965 (set-default symbol value))))
1966 1966
1967(mh-defcustom mh-adaptive-cmd-note-flag t 1967(defcustom-mh mh-adaptive-cmd-note-flag t
1968 "*Non-nil means that the message number width is determined dynamically. 1968 "*Non-nil means that the message number width is determined dynamically.
1969 1969
1970If you've created your own format to handle long message numbers, 1970If you've created your own format to handle long message numbers,
@@ -1993,7 +1993,7 @@ set SYMBOL to VALUE."
1993 "unless you use \"Use MH-E scan Format\"") 1993 "unless you use \"Use MH-E scan Format\"")
1994 (set-default symbol value))) 1994 (set-default symbol value)))
1995 1995
1996(mh-defcustom mh-scan-format-file t 1996(defcustom-mh mh-scan-format-file t
1997 "Specifies the format file to pass to the scan program. 1997 "Specifies the format file to pass to the scan program.
1998 1998
1999The default setting for this option is \"Use MH-E scan Format\". This 1999The default setting for this option is \"Use MH-E scan Format\". This
@@ -2032,7 +2032,7 @@ Otherwise, set SYMBOL to VALUE."
2032 "is set to \"Use MH-E scan Format\"") 2032 "is set to \"Use MH-E scan Format\"")
2033 (set-default symbol value))) 2033 (set-default symbol value)))
2034 2034
2035(mh-defcustom mh-scan-prog "scan" 2035(defcustom-mh mh-scan-prog "scan"
2036 "*Program used to scan messages. 2036 "*Program used to scan messages.
2037 2037
2038The name of the program that generates a listing of one line per 2038The name of the program that generates a listing of one line per
@@ -2047,7 +2047,7 @@ directory. You may link another program to `scan' (see
2047 2047
2048;;; Searching (:group 'mh-search) 2048;;; Searching (:group 'mh-search)
2049 2049
2050(mh-defcustom mh-search-program nil 2050(defcustom-mh mh-search-program nil
2051 "Search program that MH-E shall use. 2051 "Search program that MH-E shall use.
2052 2052
2053The default setting of this option is \"Auto-detect\" which means 2053The default setting of this option is \"Auto-detect\" which means
@@ -2070,7 +2070,7 @@ MH-E can be found in the documentation of `mh-search'."
2070 2070
2071;;; Sending Mail (:group 'mh-sending-mail) 2071;;; Sending Mail (:group 'mh-sending-mail)
2072 2072
2073(mh-defcustom mh-compose-forward-as-mime-flag t 2073(defcustom-mh mh-compose-forward-as-mime-flag t
2074 "*Non-nil means that messages are forwarded as attachments. 2074 "*Non-nil means that messages are forwarded as attachments.
2075 2075
2076By default, this option is on which means that the forwarded 2076By default, this option is on which means that the forwarded
@@ -2086,7 +2086,7 @@ regardless of the settings of this option."
2086 :group 'mh-sending-mail 2086 :group 'mh-sending-mail
2087 :package-version '(MH-E . "8.0")) 2087 :package-version '(MH-E . "8.0"))
2088 2088
2089(mh-defcustom mh-compose-letter-function nil 2089(defcustom-mh mh-compose-letter-function nil
2090 "Invoked when starting a new draft. 2090 "Invoked when starting a new draft.
2091 2091
2092However, it is the last function called before you edit your 2092However, it is the last function called before you edit your
@@ -2098,13 +2098,13 @@ fields."
2098 :group 'mh-sending-mail 2098 :group 'mh-sending-mail
2099 :package-version '(MH-E . "6.0")) 2099 :package-version '(MH-E . "6.0"))
2100 2100
2101(mh-defcustom mh-compose-prompt-flag nil 2101(defcustom-mh mh-compose-prompt-flag nil
2102 "*Non-nil means prompt for header fields when composing a new draft." 2102 "*Non-nil means prompt for header fields when composing a new draft."
2103 :type 'boolean 2103 :type 'boolean
2104 :group 'mh-sending-mail 2104 :group 'mh-sending-mail
2105 :package-version '(MH-E . "7.4")) 2105 :package-version '(MH-E . "7.4"))
2106 2106
2107(mh-defcustom mh-forward-subject-format "%s: %s" 2107(defcustom-mh mh-forward-subject-format "%s: %s"
2108 "*Format string for forwarded message subject. 2108 "*Format string for forwarded message subject.
2109 2109
2110This option is a string which includes two escapes (\"%s\"). The 2110This option is a string which includes two escapes (\"%s\"). The
@@ -2114,7 +2114,7 @@ and the second one is replaced with the original \"Subject:\"."
2114 :group 'mh-sending-mail 2114 :group 'mh-sending-mail
2115 :package-version '(MH-E . "6.0")) 2115 :package-version '(MH-E . "6.0"))
2116 2116
2117(mh-defcustom mh-insert-x-mailer-flag t 2117(defcustom-mh mh-insert-x-mailer-flag t
2118 "*Non-nil means append an \"X-Mailer:\" header field to the header. 2118 "*Non-nil means append an \"X-Mailer:\" header field to the header.
2119 2119
2120This header field includes the version of MH-E and Emacs that you 2120This header field includes the version of MH-E and Emacs that you
@@ -2124,7 +2124,7 @@ can turn this option off."
2124 :group 'mh-sending-mail 2124 :group 'mh-sending-mail
2125 :package-version '(MH-E . "7.0")) 2125 :package-version '(MH-E . "7.0"))
2126 2126
2127(mh-defcustom mh-redist-full-contents-flag nil 2127(defcustom-mh mh-redist-full-contents-flag nil
2128 "*Non-nil means the \"dist\" command needs entire letter for redistribution. 2128 "*Non-nil means the \"dist\" command needs entire letter for redistribution.
2129 2129
2130This option must be turned on if \"dist\" requires the whole 2130This option must be turned on if \"dist\" requires the whole
@@ -2136,7 +2136,7 @@ has been redistributed before, turn off this option."
2136 :group 'mh-sending-mail 2136 :group 'mh-sending-mail
2137 :package-version '(MH-E . "8.0")) 2137 :package-version '(MH-E . "8.0"))
2138 2138
2139(mh-defcustom mh-reply-default-reply-to nil 2139(defcustom-mh mh-reply-default-reply-to nil
2140 "*Sets the person or persons to whom a reply will be sent. 2140 "*Sets the person or persons to whom a reply will be sent.
2141 2141
2142This option is set to \"Prompt\" by default so that you are 2142This option is set to \"Prompt\" by default so that you are
@@ -2152,7 +2152,7 @@ this option to \"cc\". Other choices include \"from\", \"to\", or
2152 :group 'mh-sending-mail 2152 :group 'mh-sending-mail
2153 :package-version '(MH-E . "6.0")) 2153 :package-version '(MH-E . "6.0"))
2154 2154
2155(mh-defcustom mh-reply-show-message-flag t 2155(defcustom-mh mh-reply-show-message-flag t
2156 "*Non-nil means the MH-Show buffer is displayed when replying. 2156 "*Non-nil means the MH-Show buffer is displayed when replying.
2157 2157
2158If you include the message automatically, you can hide the 2158If you include the message automatically, you can hide the
@@ -2169,7 +2169,7 @@ See also `mh-reply'."
2169;; the docstring: "Additional sequences that should not to be preserved can be 2169;; the docstring: "Additional sequences that should not to be preserved can be
2170;; specified by setting `mh-unpropagated-sequences' appropriately." XXX 2170;; specified by setting `mh-unpropagated-sequences' appropriately." XXX
2171 2171
2172(mh-defcustom mh-refile-preserves-sequences-flag t 2172(defcustom-mh mh-refile-preserves-sequences-flag t
2173 "*Non-nil means that sequences are preserved when messages are refiled. 2173 "*Non-nil means that sequences are preserved when messages are refiled.
2174 2174
2175If a message is in any sequence (except \"Previous-Sequence:\" 2175If a message is in any sequence (except \"Previous-Sequence:\"
@@ -2180,7 +2180,7 @@ desired, then turn off this option."
2180 :group 'mh-sequences 2180 :group 'mh-sequences
2181 :package-version '(MH-E . "7.4")) 2181 :package-version '(MH-E . "7.4"))
2182 2182
2183(mh-defcustom mh-tick-seq 'tick 2183(defcustom-mh mh-tick-seq 'tick
2184 "The name of the MH sequence for ticked messages. 2184 "The name of the MH sequence for ticked messages.
2185 2185
2186You can customize this option if you already use the \"tick\" 2186You can customize this option if you already use the \"tick\"
@@ -2192,7 +2192,7 @@ there isn't much advantage to that."
2192 :group 'mh-sequences 2192 :group 'mh-sequences
2193 :package-version '(MH-E . "7.3")) 2193 :package-version '(MH-E . "7.3"))
2194 2194
2195(mh-defcustom mh-update-sequences-after-mh-show-flag t 2195(defcustom-mh mh-update-sequences-after-mh-show-flag t
2196 "*Non-nil means flush MH sequences to disk after message is shown\\<mh-folder-mode-map>. 2196 "*Non-nil means flush MH sequences to disk after message is shown\\<mh-folder-mode-map>.
2197 2197
2198Three sequences are maintained internally by MH-E and pushed out 2198Three sequences are maintained internally by MH-E and pushed out
@@ -2209,7 +2209,7 @@ commands."
2209 2209
2210;;; Reading Your Mail (:group 'mh-show) 2210;;; Reading Your Mail (:group 'mh-show)
2211 2211
2212(mh-defcustom mh-bury-show-buffer-flag t 2212(defcustom-mh mh-bury-show-buffer-flag t
2213 "*Non-nil means show buffer is buried. 2213 "*Non-nil means show buffer is buried.
2214 2214
2215One advantage of not burying the show buffer is that one can 2215One advantage of not burying the show buffer is that one can
@@ -2220,7 +2220,7 @@ running \\[electric-buffer-list] to see what I mean."
2220 :group 'mh-show 2220 :group 'mh-show
2221 :package-version '(MH-E . "7.0")) 2221 :package-version '(MH-E . "7.0"))
2222 2222
2223(mh-defcustom mh-clean-message-header-flag t 2223(defcustom-mh mh-clean-message-header-flag t
2224 "*Non-nil means remove extraneous header fields. 2224 "*Non-nil means remove extraneous header fields.
2225 2225
2226See also `mh-invisible-header-fields-default' and 2226See also `mh-invisible-header-fields-default' and
@@ -2229,7 +2229,7 @@ See also `mh-invisible-header-fields-default' and
2229 :group 'mh-show 2229 :group 'mh-show
2230 :package-version '(MH-E . "7.0")) 2230 :package-version '(MH-E . "7.0"))
2231 2231
2232(mh-defcustom mh-decode-mime-flag (not (not (locate-library "mm-decode"))) 2232(defcustom-mh mh-decode-mime-flag (not (not (locate-library "mm-decode")))
2233 "*Non-nil means attachments are handled\\<mh-folder-mode-map>. 2233 "*Non-nil means attachments are handled\\<mh-folder-mode-map>.
2234 2234
2235MH-E can handle attachments as well if the Gnus `mm-decode' 2235MH-E can handle attachments as well if the Gnus `mm-decode'
@@ -2247,7 +2247,7 @@ messages and other graphical widgets. See the options
2247 :group 'mh-show 2247 :group 'mh-show
2248 :package-version '(MH-E . "7.0")) 2248 :package-version '(MH-E . "7.0"))
2249 2249
2250(mh-defcustom mh-display-buttons-for-alternatives-flag nil 2250(defcustom-mh mh-display-buttons-for-alternatives-flag nil
2251 "*Non-nil means display buttons for all alternative attachments. 2251 "*Non-nil means display buttons for all alternative attachments.
2252 2252
2253Sometimes, a mail program will produce multiple alternatives of 2253Sometimes, a mail program will produce multiple alternatives of
@@ -2259,7 +2259,7 @@ inline and buttons are shown for each of the other alternatives."
2259 :group 'mh-show 2259 :group 'mh-show
2260 :package-version '(MH-E . "7.4")) 2260 :package-version '(MH-E . "7.4"))
2261 2261
2262(mh-defcustom mh-display-buttons-for-inline-parts-flag nil 2262(defcustom-mh mh-display-buttons-for-inline-parts-flag nil
2263 "*Non-nil means display buttons for all inline attachments\\<mh-folder-mode-map>. 2263 "*Non-nil means display buttons for all inline attachments\\<mh-folder-mode-map>.
2264 2264
2265The sender can request that attachments should be viewed inline so 2265The sender can request that attachments should be viewed inline so
@@ -2282,7 +2282,7 @@ text (including HTML) and images."
2282 :group 'mh-show 2282 :group 'mh-show
2283 :package-version '(MH-E . "7.0")) 2283 :package-version '(MH-E . "7.0"))
2284 2284
2285(mh-defcustom mh-do-not-confirm-flag nil 2285(defcustom-mh mh-do-not-confirm-flag nil
2286 "*Non-nil means non-reversible commands do not prompt for confirmation. 2286 "*Non-nil means non-reversible commands do not prompt for confirmation.
2287 2287
2288Commands such as `mh-pack-folder' prompt to confirm whether to 2288Commands such as `mh-pack-folder' prompt to confirm whether to
@@ -2294,7 +2294,7 @@ retracted--without question."
2294 :group 'mh-show 2294 :group 'mh-show
2295 :package-version '(MH-E . "7.0")) 2295 :package-version '(MH-E . "7.0"))
2296 2296
2297(mh-defcustom mh-fetch-x-image-url nil 2297(defcustom-mh mh-fetch-x-image-url nil
2298 "*Control fetching of \"X-Image-URL:\" header field image. 2298 "*Control fetching of \"X-Image-URL:\" header field image.
2299 2299
2300Ths option controls the fetching of the \"X-Image-URL:\" header 2300Ths option controls the fetching of the \"X-Image-URL:\" header
@@ -2330,7 +2330,7 @@ turned on."
2330 :group 'mh-show 2330 :group 'mh-show
2331 :package-version '(MH-E . "7.3")) 2331 :package-version '(MH-E . "7.3"))
2332 2332
2333(mh-defcustom mh-graphical-smileys-flag t 2333(defcustom-mh mh-graphical-smileys-flag t
2334 "*Non-nil means graphical smileys are displayed. 2334 "*Non-nil means graphical smileys are displayed.
2335 2335
2336It is a long standing custom to inject body language using a 2336It is a long standing custom to inject body language using a
@@ -2345,7 +2345,7 @@ turned off."
2345 :group 'mh-show 2345 :group 'mh-show
2346 :package-version '(MH-E . "7.0")) 2346 :package-version '(MH-E . "7.0"))
2347 2347
2348(mh-defcustom mh-graphical-emphasis-flag t 2348(defcustom-mh mh-graphical-emphasis-flag t
2349 "*Non-nil means graphical emphasis is displayed. 2349 "*Non-nil means graphical emphasis is displayed.
2350 2350
2351A few typesetting features are indicated in ASCII text with 2351A few typesetting features are indicated in ASCII text with
@@ -2362,7 +2362,7 @@ turned off."
2362 :group 'mh-show 2362 :group 'mh-show
2363 :package-version '(MH-E . "7.0")) 2363 :package-version '(MH-E . "7.0"))
2364 2364
2365(mh-defcustom mh-highlight-citation-style 'gnus 2365(defcustom-mh mh-highlight-citation-style 'gnus
2366 "Style for highlighting citations. 2366 "Style for highlighting citations.
2367 2367
2368If the sender of the message has cited other messages in his 2368If the sender of the message has cited other messages in his
@@ -2589,7 +2589,7 @@ Because the function `mh-invisible-headers' uses both
2589`mh-invisible-header-fields' and `mh-invisible-header-fields', it 2589`mh-invisible-header-fields' and `mh-invisible-header-fields', it
2590cannot be run until both variables have been initialized.") 2590cannot be run until both variables have been initialized.")
2591 2591
2592(mh-defcustom mh-invisible-header-fields nil 2592(defcustom-mh mh-invisible-header-fields nil
2593 "*Additional header fields to hide. 2593 "*Additional header fields to hide.
2594 2594
2595Header fields that you would like to hide that aren't listed in 2595Header fields that you would like to hide that aren't listed in
@@ -2610,7 +2610,7 @@ See also `mh-clean-message-header-flag'."
2610 :group 'mh-show 2610 :group 'mh-show
2611 :package-version '(MH-E . "7.1")) 2611 :package-version '(MH-E . "7.1"))
2612 2612
2613(mh-defcustom mh-invisible-header-fields-default nil 2613(defcustom-mh mh-invisible-header-fields-default nil
2614 "*List of hidden header fields. 2614 "*List of hidden header fields.
2615 2615
2616The header fields listed in this option are hidden, although you 2616The header fields listed in this option are hidden, although you
@@ -2663,7 +2663,7 @@ removed and entries from `mh-invisible-header-fields' are added."
2663;; Compile invisible header fields. 2663;; Compile invisible header fields.
2664(mh-invisible-headers) 2664(mh-invisible-headers)
2665 2665
2666(mh-defcustom mh-lpr-command-format "lpr -J '%s'" 2666(defcustom-mh mh-lpr-command-format "lpr -J '%s'"
2667 "*Command used to print\\<mh-folder-mode-map>. 2667 "*Command used to print\\<mh-folder-mode-map>.
2668 2668
2669This option contains the Unix command line which performs the 2669This option contains the Unix command line which performs the
@@ -2680,7 +2680,7 @@ This options is not used by the commands \\[mh-ps-print-msg] or
2680 :group 'mh-show 2680 :group 'mh-show
2681 :package-version '(MH-E . "6.0")) 2681 :package-version '(MH-E . "6.0"))
2682 2682
2683(mh-defcustom mh-max-inline-image-height nil 2683(defcustom-mh mh-max-inline-image-height nil
2684 "*Maximum inline image height if \"Content-Disposition:\" is not present. 2684 "*Maximum inline image height if \"Content-Disposition:\" is not present.
2685 2685
2686Some older mail programs do not insert this needed plumbing to 2686Some older mail programs do not insert this needed plumbing to
@@ -2696,7 +2696,7 @@ these numbers."
2696 :group 'mh-show 2696 :group 'mh-show
2697 :package-version '(MH-E . "7.0")) 2697 :package-version '(MH-E . "7.0"))
2698 2698
2699(mh-defcustom mh-max-inline-image-width nil 2699(defcustom-mh mh-max-inline-image-width nil
2700 "*Maximum inline image width if \"Content-Disposition:\" is not present. 2700 "*Maximum inline image width if \"Content-Disposition:\" is not present.
2701 2701
2702Some older mail programs do not insert this needed plumbing to 2702Some older mail programs do not insert this needed plumbing to
@@ -2712,7 +2712,7 @@ these numbers."
2712 :group 'mh-show 2712 :group 'mh-show
2713 :package-version '(MH-E . "7.0")) 2713 :package-version '(MH-E . "7.0"))
2714 2714
2715(mh-defcustom mh-mhl-format-file nil 2715(defcustom-mh mh-mhl-format-file nil
2716 "*Specifies the format file to pass to the \"mhl\" program. 2716 "*Specifies the format file to pass to the \"mhl\" program.
2717 2717
2718Normally MH-E takes care of displaying messages itself (rather than 2718Normally MH-E takes care of displaying messages itself (rather than
@@ -2736,7 +2736,7 @@ file."
2736 :group 'mh-show 2736 :group 'mh-show
2737 :package-version '(MH-E . "8.0")) 2737 :package-version '(MH-E . "8.0"))
2738 2738
2739(mh-defcustom mh-mime-save-parts-default-directory t 2739(defcustom-mh mh-mime-save-parts-default-directory t
2740 "Default directory to use for \\<mh-folder-mode-map>\\[mh-mime-save-parts]. 2740 "Default directory to use for \\<mh-folder-mode-map>\\[mh-mime-save-parts].
2741 2741
2742The default value for this option is \"Prompt Always\" so that 2742The default value for this option is \"Prompt Always\" so that
@@ -2752,7 +2752,7 @@ directory's name."
2752 :group 'mh-show 2752 :group 'mh-show
2753 :package-version '(MH-E . "7.0")) 2753 :package-version '(MH-E . "7.0"))
2754 2754
2755(mh-defcustom mh-print-background-flag nil 2755(defcustom-mh mh-print-background-flag nil
2756 "*Non-nil means messages should be printed in the background\\<mh-folder-mode-map>. 2756 "*Non-nil means messages should be printed in the background\\<mh-folder-mode-map>.
2757 2757
2758Normally messages are printed in the foreground. If this is slow on 2758Normally messages are printed in the foreground. If this is slow on
@@ -2768,7 +2768,7 @@ This option is not used by the commands \\[mh-ps-print-msg] or
2768 :group 'mh-show 2768 :group 'mh-show
2769 :package-version '(MH-E . "7.0")) 2769 :package-version '(MH-E . "7.0"))
2770 2770
2771(mh-defcustom mh-show-maximum-size 0 2771(defcustom-mh mh-show-maximum-size 0
2772 "*Maximum size of message (in bytes) to display automatically. 2772 "*Maximum size of message (in bytes) to display automatically.
2773 2773
2774This option provides an opportunity to skip over large messages 2774This option provides an opportunity to skip over large messages
@@ -2778,7 +2778,7 @@ message are shown regardless of size."
2778 :group 'mh-show 2778 :group 'mh-show
2779 :package-version '(MH-E . "8.0")) 2779 :package-version '(MH-E . "8.0"))
2780 2780
2781(mh-defcustom mh-show-use-xface-flag (>= emacs-major-version 21) 2781(defcustom-mh mh-show-use-xface-flag (>= emacs-major-version 21)
2782 "*Non-nil means display face images in MH-show buffers. 2782 "*Non-nil means display face images in MH-show buffers.
2783 2783
2784MH-E can display the content of \"Face:\", \"X-Face:\", and 2784MH-E can display the content of \"Face:\", \"X-Face:\", and
@@ -2818,7 +2818,7 @@ The option `mh-fetch-x-image-url' controls the fetching of the
2818 :group 'mh-show 2818 :group 'mh-show
2819 :package-version '(MH-E . "7.0")) 2819 :package-version '(MH-E . "7.0"))
2820 2820
2821(mh-defcustom mh-store-default-directory nil 2821(defcustom-mh mh-store-default-directory nil
2822 "*Default directory for \\<mh-folder-mode-map>\\[mh-store-msg]. 2822 "*Default directory for \\<mh-folder-mode-map>\\[mh-store-msg].
2823 2823
2824If you would like to change the initial default directory, 2824If you would like to change the initial default directory,
@@ -2830,7 +2830,7 @@ the content of these messages."
2830 :group 'mh-show 2830 :group 'mh-show
2831 :package-version '(MH-E . "6.0")) 2831 :package-version '(MH-E . "6.0"))
2832 2832
2833(mh-defcustom mh-summary-height nil 2833(defcustom-mh mh-summary-height nil
2834 "*Number of lines in MH-Folder buffer (including the mode line). 2834 "*Number of lines in MH-Folder buffer (including the mode line).
2835 2835
2836The default value of this option is \"Automatic\" which means 2836The default value of this option is \"Automatic\" which means
@@ -2845,7 +2845,7 @@ lines you'd like to see."
2845 2845
2846;;; The Speedbar (:group 'mh-speedbar) 2846;;; The Speedbar (:group 'mh-speedbar)
2847 2847
2848(mh-defcustom mh-speed-update-interval 60 2848(defcustom-mh mh-speed-update-interval 60
2849 "Time between speedbar updates in seconds. 2849 "Time between speedbar updates in seconds.
2850Set to 0 to disable automatic update." 2850Set to 0 to disable automatic update."
2851 :type 'integer 2851 :type 'integer
@@ -2854,7 +2854,7 @@ Set to 0 to disable automatic update."
2854 2854
2855;;; Threading (:group 'mh-thread) 2855;;; Threading (:group 'mh-thread)
2856 2856
2857(mh-defcustom mh-show-threads-flag nil 2857(defcustom-mh mh-show-threads-flag nil
2858 "*Non-nil means new folders start in threaded mode. 2858 "*Non-nil means new folders start in threaded mode.
2859 2859
2860Threading large number of messages can be time consuming so this 2860Threading large number of messages can be time consuming so this
@@ -2870,7 +2870,7 @@ threaded is less than `mh-large-folder'."
2870;; mh-tool-bar-folder-buttons and mh-tool-bar-letter-buttons defined 2870;; mh-tool-bar-folder-buttons and mh-tool-bar-letter-buttons defined
2871;; dynamically in mh-tool-bar.el. 2871;; dynamically in mh-tool-bar.el.
2872 2872
2873(mh-defcustom mh-tool-bar-search-function 'mh-search 2873(defcustom-mh mh-tool-bar-search-function 'mh-search
2874 "*Function called by the tool bar search button. 2874 "*Function called by the tool bar search button.
2875 2875
2876By default, this is set to `mh-search'. You can also choose 2876By default, this is set to `mh-search'. You can also choose
@@ -2883,7 +2883,7 @@ of your own choosing."
2883 2883
2884;; XEmacs has a couple of extra customizations... 2884;; XEmacs has a couple of extra customizations...
2885(mh-do-in-xemacs 2885(mh-do-in-xemacs
2886 (mh-defcustom mh-xemacs-use-tool-bar-flag mh-xemacs-has-tool-bar-flag 2886 (defcustom-mh mh-xemacs-use-tool-bar-flag mh-xemacs-has-tool-bar-flag
2887 "*If non-nil, use tool bar. 2887 "*If non-nil, use tool bar.
2888 2888
2889This option controls whether to show the MH-E icons at all. By 2889This option controls whether to show the MH-E icons at all. By
@@ -2899,7 +2899,7 @@ won't be able to turn on this option."
2899 (set-default symbol value)) 2899 (set-default symbol value))
2900 :package-version '(MH-E . "7.3")) 2900 :package-version '(MH-E . "7.3"))
2901 2901
2902 (mh-defcustom mh-xemacs-tool-bar-position nil 2902 (defcustom-mh mh-xemacs-tool-bar-position nil
2903 "*Tool bar location. 2903 "*Tool bar location.
2904 2904
2905This option controls the placement of the tool bar along the four 2905This option controls the placement of the tool bar along the four
@@ -2921,7 +2921,7 @@ default tool bar."
2921 2921
2922;;; Hooks (:group 'mh-hooks + group where hook described) 2922;;; Hooks (:group 'mh-hooks + group where hook described)
2923 2923
2924(mh-defcustom mh-after-commands-processed-hook nil 2924(defcustom-mh mh-after-commands-processed-hook nil
2925 "Hook run by \\<mh-folder-mode-map>\\[mh-execute-commands] after performing outstanding refile and delete requests. 2925 "Hook run by \\<mh-folder-mode-map>\\[mh-execute-commands] after performing outstanding refile and delete requests.
2926 2926
2927Variables that are useful in this hook include 2927Variables that are useful in this hook include
@@ -2933,14 +2933,14 @@ folder, which is also available in `mh-current-folder'."
2933 :group 'mh-folder 2933 :group 'mh-folder
2934 :package-version '(MH-E . "8.0")) 2934 :package-version '(MH-E . "8.0"))
2935 2935
2936(mh-defcustom mh-alias-reloaded-hook nil 2936(defcustom-mh mh-alias-reloaded-hook nil
2937 "Hook run by `mh-alias-reload' after loading aliases." 2937 "Hook run by `mh-alias-reload' after loading aliases."
2938 :type 'hook 2938 :type 'hook
2939 :group 'mh-hooks 2939 :group 'mh-hooks
2940 :group 'mh-alias 2940 :group 'mh-alias
2941 :package-version '(MH-E . "8.0")) 2941 :package-version '(MH-E . "8.0"))
2942 2942
2943(mh-defcustom mh-before-commands-processed-hook nil 2943(defcustom-mh mh-before-commands-processed-hook nil
2944 "Hook run by \\<mh-folder-mode-map>\\[mh-execute-commands] before performing outstanding refile and delete requests. 2944 "Hook run by \\<mh-folder-mode-map>\\[mh-execute-commands] before performing outstanding refile and delete requests.
2945 2945
2946Variables that are useful in this hook include `mh-delete-list' 2946Variables that are useful in this hook include `mh-delete-list'
@@ -2951,7 +2951,7 @@ be made to the current folder, `mh-current-folder'."
2951 :group 'mh-folder 2951 :group 'mh-folder
2952 :package-version '(MH-E . "8.0")) 2952 :package-version '(MH-E . "8.0"))
2953 2953
2954(mh-defcustom mh-before-quit-hook nil 2954(defcustom-mh mh-before-quit-hook nil
2955 "Hook run by \\<mh-folder-mode-map>\\[mh-quit] before quitting MH-E. 2955 "Hook run by \\<mh-folder-mode-map>\\[mh-quit] before quitting MH-E.
2956 2956
2957This hook is called before the quit occurs, so you might use it 2957This hook is called before the quit occurs, so you might use it
@@ -2964,7 +2964,7 @@ See also `mh-quit-hook'."
2964 :group 'mh-folder 2964 :group 'mh-folder
2965 :package-version '(MH-E . "6.0")) 2965 :package-version '(MH-E . "6.0"))
2966 2966
2967(mh-defcustom mh-before-send-letter-hook nil 2967(defcustom-mh mh-before-send-letter-hook nil
2968 "Hook run at the beginning of the \\<mh-letter-mode-map>\\[mh-send-letter] command. 2968 "Hook run at the beginning of the \\<mh-letter-mode-map>\\[mh-send-letter] command.
2969 2969
2970For example, if you want to check your spelling in your message 2970For example, if you want to check your spelling in your message
@@ -2975,7 +2975,7 @@ before sending, add the `ispell-message' function."
2975 :group 'mh-letter 2975 :group 'mh-letter
2976 :package-version '(MH-E . "6.0")) 2976 :package-version '(MH-E . "6.0"))
2977 2977
2978(mh-defcustom mh-delete-msg-hook nil 2978(defcustom-mh mh-delete-msg-hook nil
2979 "Hook run by \\<mh-letter-mode-map>\\[mh-delete-msg] after marking each message for deletion. 2979 "Hook run by \\<mh-letter-mode-map>\\[mh-delete-msg] after marking each message for deletion.
2980 2980
2981For example, a past maintainer of MH-E used this once when he 2981For example, a past maintainer of MH-E used this once when he
@@ -2985,7 +2985,7 @@ kept statistics on his mail usage."
2985 :group 'mh-show 2985 :group 'mh-show
2986 :package-version '(MH-E . "6.0")) 2986 :package-version '(MH-E . "6.0"))
2987 2987
2988(mh-defcustom mh-find-path-hook nil 2988(defcustom-mh mh-find-path-hook nil
2989 "Hook run by `mh-find-path' after reading the user's MH profile. 2989 "Hook run by `mh-find-path' after reading the user's MH profile.
2990 2990
2991This hook can be used the change the value of the variables that 2991This hook can be used the change the value of the variables that
@@ -2996,28 +2996,28 @@ between MH and MH-E."
2996 :group 'mh-e 2996 :group 'mh-e
2997 :package-version '(MH-E . "7.0")) 2997 :package-version '(MH-E . "7.0"))
2998 2998
2999(mh-defcustom mh-folder-mode-hook nil 2999(defcustom-mh mh-folder-mode-hook nil
3000 "Hook run by `mh-folder-mode' when visiting a new folder." 3000 "Hook run by `mh-folder-mode' when visiting a new folder."
3001 :type 'hook 3001 :type 'hook
3002 :group 'mh-hooks 3002 :group 'mh-hooks
3003 :group 'mh-folder 3003 :group 'mh-folder
3004 :package-version '(MH-E . "6.0")) 3004 :package-version '(MH-E . "6.0"))
3005 3005
3006(mh-defcustom mh-forward-hook nil 3006(defcustom-mh mh-forward-hook nil
3007 "Hook run by `mh-forward' on a forwarded letter." 3007 "Hook run by `mh-forward' on a forwarded letter."
3008 :type 'hook 3008 :type 'hook
3009 :group 'mh-hooks 3009 :group 'mh-hooks
3010 :group 'mh-sending-mail 3010 :group 'mh-sending-mail
3011 :package-version '(MH-E . "8.0")) 3011 :package-version '(MH-E . "8.0"))
3012 3012
3013(mh-defcustom mh-inc-folder-hook nil 3013(defcustom-mh mh-inc-folder-hook nil
3014 "Hook run by \\<mh-folder-mode-map>\\[mh-inc-folder] after incorporating mail into a folder." 3014 "Hook run by \\<mh-folder-mode-map>\\[mh-inc-folder] after incorporating mail into a folder."
3015 :type 'hook 3015 :type 'hook
3016 :group 'mh-hooks 3016 :group 'mh-hooks
3017 :group 'mh-inc 3017 :group 'mh-inc
3018 :package-version '(MH-E . "6.0")) 3018 :package-version '(MH-E . "6.0"))
3019 3019
3020(mh-defcustom mh-insert-signature-hook nil 3020(defcustom-mh mh-insert-signature-hook nil
3021 "Hook run by \\<mh-letter-mode-map>\\[mh-insert-signature] after signature has been inserted. 3021 "Hook run by \\<mh-letter-mode-map>\\[mh-insert-signature] after signature has been inserted.
3022 3022
3023Hook functions may access the actual name of the file or the 3023Hook functions may access the actual name of the file or the
@@ -3028,7 +3028,7 @@ function used to insert the signature with
3028 :group 'mh-letter 3028 :group 'mh-letter
3029 :package-version '(MH-E . "8.0")) 3029 :package-version '(MH-E . "8.0"))
3030 3030
3031(mh-defcustom mh-kill-folder-suppress-prompt-hooks '(mh-search-p) 3031(defcustom-mh mh-kill-folder-suppress-prompt-hooks '(mh-search-p)
3032 "Abnormal hook run at the beginning of \\<mh-folder-mode-map>\\[mh-kill-folder]. 3032 "Abnormal hook run at the beginning of \\<mh-folder-mode-map>\\[mh-kill-folder].
3033 3033
3034The hook functions are called with no arguments and should return 3034The hook functions are called with no arguments and should return
@@ -3046,7 +3046,7 @@ accident in the \"+inbox\" folder, you will not be happy."
3046 :group 'mh-folder 3046 :group 'mh-folder
3047 :package-version '(MH-E . "7.4")) 3047 :package-version '(MH-E . "7.4"))
3048 3048
3049(mh-defcustom mh-letter-mode-hook nil 3049(defcustom-mh mh-letter-mode-hook nil
3050 "Hook run by `mh-letter-mode' on a new letter. 3050 "Hook run by `mh-letter-mode' on a new letter.
3051 3051
3052This hook allows you to do some processing before editing a 3052This hook allows you to do some processing before editing a
@@ -3059,14 +3059,14 @@ go."
3059 :group 'mh-sending-mail 3059 :group 'mh-sending-mail
3060 :package-version '(MH-E . "6.0")) 3060 :package-version '(MH-E . "6.0"))
3061 3061
3062(mh-defcustom mh-mh-to-mime-hook nil 3062(defcustom-mh mh-mh-to-mime-hook nil
3063 "Hook run on the formatted letter by \\<mh-letter-mode-map>\\[mh-mh-to-mime]." 3063 "Hook run on the formatted letter by \\<mh-letter-mode-map>\\[mh-mh-to-mime]."
3064 :type 'hook 3064 :type 'hook
3065 :group 'mh-hooks 3065 :group 'mh-hooks
3066 :group 'mh-letter 3066 :group 'mh-letter
3067 :package-version '(MH-E . "8.0")) 3067 :package-version '(MH-E . "8.0"))
3068 3068
3069(mh-defcustom mh-search-mode-hook nil 3069(defcustom-mh mh-search-mode-hook nil
3070 "Hook run upon entry to `mh-search-mode'\\<mh-folder-mode-map>. 3070 "Hook run upon entry to `mh-search-mode'\\<mh-folder-mode-map>.
3071 3071
3072If you find that you do the same thing over and over when editing 3072If you find that you do the same thing over and over when editing
@@ -3078,7 +3078,7 @@ This can be done with this hook which is called when
3078 :group 'mh-search 3078 :group 'mh-search
3079 :package-version '(MH-E . "8.0")) 3079 :package-version '(MH-E . "8.0"))
3080 3080
3081(mh-defcustom mh-quit-hook nil 3081(defcustom-mh mh-quit-hook nil
3082 "Hook run by \\<mh-folder-mode-map>\\[mh-quit] after quitting MH-E. 3082 "Hook run by \\<mh-folder-mode-map>\\[mh-quit] after quitting MH-E.
3083 3083
3084This hook is not run in an MH-E context, so you might use it to 3084This hook is not run in an MH-E context, so you might use it to
@@ -3090,14 +3090,14 @@ See also `mh-before-quit-hook'."
3090 :group 'mh-folder 3090 :group 'mh-folder
3091 :package-version '(MH-E . "6.0")) 3091 :package-version '(MH-E . "6.0"))
3092 3092
3093(mh-defcustom mh-refile-msg-hook nil 3093(defcustom-mh mh-refile-msg-hook nil
3094 "Hook run by \\<mh-folder-mode-map>\\[mh-refile-msg] after marking each message for refiling." 3094 "Hook run by \\<mh-folder-mode-map>\\[mh-refile-msg] after marking each message for refiling."
3095 :type 'hook 3095 :type 'hook
3096 :group 'mh-hooks 3096 :group 'mh-hooks
3097 :group 'mh-folder 3097 :group 'mh-folder
3098 :package-version '(MH-E . "6.0")) 3098 :package-version '(MH-E . "6.0"))
3099 3099
3100(mh-defcustom mh-show-hook nil 3100(defcustom-mh mh-show-hook nil
3101 "Hook run after \\<mh-folder-mode-map>\\[mh-show] shows a message. 3101 "Hook run after \\<mh-folder-mode-map>\\[mh-show] shows a message.
3102 3102
3103It is the last thing called after messages are displayed. It's 3103It is the last thing called after messages are displayed. It's
@@ -3108,7 +3108,7 @@ used to affect the behavior of MH-E in general or when
3108 :group 'mh-show 3108 :group 'mh-show
3109 :package-version '(MH-E . "6.0")) 3109 :package-version '(MH-E . "6.0"))
3110 3110
3111(mh-defcustom mh-show-mode-hook nil 3111(defcustom-mh mh-show-mode-hook nil
3112 "Hook run upon entry to `mh-show-mode'. 3112 "Hook run upon entry to `mh-show-mode'.
3113 3113
3114This hook is called early on in the process of the message 3114This hook is called early on in the process of the message
@@ -3119,7 +3119,7 @@ message's content. See `mh-show-hook'."
3119 :group 'mh-show 3119 :group 'mh-show
3120 :package-version '(MH-E . "6.0")) 3120 :package-version '(MH-E . "6.0"))
3121 3121
3122(mh-defcustom mh-unseen-updated-hook nil 3122(defcustom-mh mh-unseen-updated-hook nil
3123 "Hook run after the unseen sequence has been updated. 3123 "Hook run after the unseen sequence has been updated.
3124 3124
3125The variable `mh-seen-list' can be used by this hook to obtain 3125The variable `mh-seen-list' can be used by this hook to obtain
@@ -3139,7 +3139,7 @@ sequence."
3139 3139
3140;; To add a new face: 3140;; To add a new face:
3141;; 1. Add entry to variable mh-face-data. 3141;; 1. Add entry to variable mh-face-data.
3142;; 2. Create face using mh-defface (which removes min-color spec and 3142;; 2. Create face using defface-mh (which removes min-color spec and
3143;; :package-version keyword where these are not supported), 3143;; :package-version keyword where these are not supported),
3144;; accessing face data with function mh-face-data. 3144;; accessing face data with function mh-face-data.
3145;; 3. Add inherit argument to function mh-face-data if applicable. 3145;; 3. Add inherit argument to function mh-face-data if applicable.
@@ -3288,7 +3288,7 @@ sequence."
3288 (:underline t))))) 3288 (:underline t)))))
3289 "MH-E face data. 3289 "MH-E face data.
3290Used by function `mh-face-data' which returns spec that is 3290Used by function `mh-face-data' which returns spec that is
3291consumed by `mh-defface'.") 3291consumed by `defface-mh'.")
3292 3292
3293(require 'cus-face) 3293(require 'cus-face)
3294 3294
@@ -3341,14 +3341,14 @@ specified colors."
3341 (setq new-spec (cons entry new-spec))))) 3341 (setq new-spec (cons entry new-spec)))))
3342 new-spec)))) 3342 new-spec))))
3343 3343
3344(mh-defface mh-folder-address 3344(defface-mh mh-folder-address
3345 (mh-face-data 'mh-folder-subject '((t (:inherit mh-folder-subject)))) 3345 (mh-face-data 'mh-folder-subject '((t (:inherit mh-folder-subject))))
3346 "Recipient face." 3346 "Recipient face."
3347 :group 'mh-faces 3347 :group 'mh-faces
3348 :group 'mh-folder 3348 :group 'mh-folder
3349 :package-version '(MH-E . "8.0")) 3349 :package-version '(MH-E . "8.0"))
3350 3350
3351(mh-defface mh-folder-body 3351(defface-mh mh-folder-body
3352 (mh-face-data 'mh-folder-msg-number 3352 (mh-face-data 'mh-folder-msg-number
3353 '((((class color)) 3353 '((((class color))
3354 (:inherit mh-folder-msg-number)) 3354 (:inherit mh-folder-msg-number))
@@ -3359,7 +3359,7 @@ specified colors."
3359 :group 'mh-folder 3359 :group 'mh-folder
3360 :package-version '(MH-E . "8.0")) 3360 :package-version '(MH-E . "8.0"))
3361 3361
3362(mh-defface mh-folder-cur-msg-number 3362(defface-mh mh-folder-cur-msg-number
3363 (mh-face-data 'mh-folder-msg-number 3363 (mh-face-data 'mh-folder-msg-number
3364 '((t (:inherit mh-folder-msg-number :bold t)))) 3364 '((t (:inherit mh-folder-msg-number :bold t))))
3365 "Current message number face." 3365 "Current message number face."
@@ -3367,39 +3367,39 @@ specified colors."
3367 :group 'mh-folder 3367 :group 'mh-folder
3368 :package-version '(MH-E . "8.0")) 3368 :package-version '(MH-E . "8.0"))
3369 3369
3370(mh-defface mh-folder-date 3370(defface-mh mh-folder-date
3371 (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-msg-number)))) 3371 (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-msg-number))))
3372 "Date face." 3372 "Date face."
3373 :group 'mh-faces 3373 :group 'mh-faces
3374 :group 'mh-folder 3374 :group 'mh-folder
3375 :package-version '(MH-E . "8.0")) 3375 :package-version '(MH-E . "8.0"))
3376 3376
3377(mh-defface mh-folder-deleted 3377(defface-mh mh-folder-deleted
3378 (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-msg-number)))) 3378 (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-msg-number))))
3379 "Deleted message face." 3379 "Deleted message face."
3380 :group 'mh-faces 3380 :group 'mh-faces
3381 :group 'mh-folder 3381 :group 'mh-folder
3382 :package-version '(MH-E . "8.0")) 3382 :package-version '(MH-E . "8.0"))
3383 3383
3384(mh-defface mh-folder-followup (mh-face-data 'mh-folder-followup) 3384(defface-mh mh-folder-followup (mh-face-data 'mh-folder-followup)
3385 "\"Re:\" face." 3385 "\"Re:\" face."
3386 :group 'mh-faces 3386 :group 'mh-faces
3387 :group 'mh-folder 3387 :group 'mh-folder
3388 :package-version '(MH-E . "8.0")) 3388 :package-version '(MH-E . "8.0"))
3389 3389
3390(mh-defface mh-folder-msg-number (mh-face-data 'mh-folder-msg-number) 3390(defface-mh mh-folder-msg-number (mh-face-data 'mh-folder-msg-number)
3391 "Message number face." 3391 "Message number face."
3392 :group 'mh-faces 3392 :group 'mh-faces
3393 :group 'mh-folder 3393 :group 'mh-folder
3394 :package-version '(MH-E . "8.0")) 3394 :package-version '(MH-E . "8.0"))
3395 3395
3396(mh-defface mh-folder-refiled (mh-face-data 'mh-folder-refiled) 3396(defface-mh mh-folder-refiled (mh-face-data 'mh-folder-refiled)
3397 "Refiled message face." 3397 "Refiled message face."
3398 :group 'mh-faces 3398 :group 'mh-faces
3399 :group 'mh-folder 3399 :group 'mh-folder
3400 :package-version '(MH-E . "8.0")) 3400 :package-version '(MH-E . "8.0"))
3401 3401
3402(mh-defface mh-folder-sent-to-me-hint 3402(defface-mh mh-folder-sent-to-me-hint
3403 (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-date)))) 3403 (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-date))))
3404 "Fontification hint face in messages sent directly to us. 3404 "Fontification hint face in messages sent directly to us.
3405The detection of messages sent to us is governed by the scan 3405The detection of messages sent to us is governed by the scan
@@ -3409,7 +3409,7 @@ format `mh-scan-format-nmh' and the regular expression
3409 :group 'mh-folder 3409 :group 'mh-folder
3410 :package-version '(MH-E . "8.0")) 3410 :package-version '(MH-E . "8.0"))
3411 3411
3412(mh-defface mh-folder-sent-to-me-sender 3412(defface-mh mh-folder-sent-to-me-sender
3413 (mh-face-data 'mh-folder-followup '((t (:inherit mh-folder-followup)))) 3413 (mh-face-data 'mh-folder-followup '((t (:inherit mh-folder-followup))))
3414 "Sender face in messages sent directly to us. 3414 "Sender face in messages sent directly to us.
3415The detection of messages sent to us is governed by the scan 3415The detection of messages sent to us is governed by the scan
@@ -3419,98 +3419,98 @@ format `mh-scan-format-nmh' and the regular expression
3419 :group 'mh-folder 3419 :group 'mh-folder
3420 :package-version '(MH-E . "8.0")) 3420 :package-version '(MH-E . "8.0"))
3421 3421
3422(mh-defface mh-folder-subject (mh-face-data 'mh-folder-subject) 3422(defface-mh mh-folder-subject (mh-face-data 'mh-folder-subject)
3423 "Subject face." 3423 "Subject face."
3424 :group 'mh-faces 3424 :group 'mh-faces
3425 :group 'mh-folder 3425 :group 'mh-folder
3426 :package-version '(MH-E . "8.0")) 3426 :package-version '(MH-E . "8.0"))
3427 3427
3428(mh-defface mh-folder-tick (mh-face-data 'mh-folder-tick) 3428(defface-mh mh-folder-tick (mh-face-data 'mh-folder-tick)
3429 "Ticked message face." 3429 "Ticked message face."
3430 :group 'mh-faces 3430 :group 'mh-faces
3431 :group 'mh-folder 3431 :group 'mh-folder
3432 :package-version '(MH-E . "8.0")) 3432 :package-version '(MH-E . "8.0"))
3433 3433
3434(mh-defface mh-folder-to (mh-face-data 'mh-folder-to) 3434(defface-mh mh-folder-to (mh-face-data 'mh-folder-to)
3435 "\"To:\" face." 3435 "\"To:\" face."
3436 :group 'mh-faces 3436 :group 'mh-faces
3437 :group 'mh-folder 3437 :group 'mh-folder
3438 :package-version '(MH-E . "8.0")) 3438 :package-version '(MH-E . "8.0"))
3439 3439
3440(mh-defface mh-letter-header-field (mh-face-data 'mh-letter-header-field) 3440(defface-mh mh-letter-header-field (mh-face-data 'mh-letter-header-field)
3441 "Editable header field value face in draft buffers." 3441 "Editable header field value face in draft buffers."
3442 :group 'mh-faces 3442 :group 'mh-faces
3443 :group 'mh-letter 3443 :group 'mh-letter
3444 :package-version '(MH-E . "8.0")) 3444 :package-version '(MH-E . "8.0"))
3445 3445
3446(mh-defface mh-search-folder (mh-face-data 'mh-search-folder) 3446(defface-mh mh-search-folder (mh-face-data 'mh-search-folder)
3447 "Folder heading face in MH-Folder buffers created by searches." 3447 "Folder heading face in MH-Folder buffers created by searches."
3448 :group 'mh-faces 3448 :group 'mh-faces
3449 :group 'mh-search 3449 :group 'mh-search
3450 :package-version '(MH-E . "8.0")) 3450 :package-version '(MH-E . "8.0"))
3451 3451
3452(mh-defface mh-show-cc (mh-face-data 'mh-show-cc) 3452(defface-mh mh-show-cc (mh-face-data 'mh-show-cc)
3453 "Face used to highlight \"cc:\" header fields." 3453 "Face used to highlight \"cc:\" header fields."
3454 :group 'mh-faces 3454 :group 'mh-faces
3455 :group 'mh-show 3455 :group 'mh-show
3456 :package-version '(MH-E . "8.0")) 3456 :package-version '(MH-E . "8.0"))
3457 3457
3458(mh-defface mh-show-date (mh-face-data 'mh-show-date) 3458(defface-mh mh-show-date (mh-face-data 'mh-show-date)
3459 "Face used to highlight \"Date:\" header fields." 3459 "Face used to highlight \"Date:\" header fields."
3460 :group 'mh-faces 3460 :group 'mh-faces
3461 :group 'mh-show 3461 :group 'mh-show
3462 :package-version '(MH-E . "8.0")) 3462 :package-version '(MH-E . "8.0"))
3463 3463
3464(mh-defface mh-show-from (mh-face-data 'mh-show-from) 3464(defface-mh mh-show-from (mh-face-data 'mh-show-from)
3465 "Face used to highlight \"From:\" header fields." 3465 "Face used to highlight \"From:\" header fields."
3466 :group 'mh-faces 3466 :group 'mh-faces
3467 :group 'mh-show 3467 :group 'mh-show
3468 :package-version '(MH-E . "8.0")) 3468 :package-version '(MH-E . "8.0"))
3469 3469
3470(mh-defface mh-show-header (mh-face-data 'mh-show-header) 3470(defface-mh mh-show-header (mh-face-data 'mh-show-header)
3471 "Face used to deemphasize less interesting header fields." 3471 "Face used to deemphasize less interesting header fields."
3472 :group 'mh-faces 3472 :group 'mh-faces
3473 :group 'mh-show 3473 :group 'mh-show
3474 :package-version '(MH-E . "8.0")) 3474 :package-version '(MH-E . "8.0"))
3475 3475
3476(mh-defface mh-show-pgg-bad (mh-face-data 'mh-show-pgg-bad) 3476(defface-mh mh-show-pgg-bad (mh-face-data 'mh-show-pgg-bad)
3477 "Bad PGG signature face." 3477 "Bad PGG signature face."
3478 :group 'mh-faces 3478 :group 'mh-faces
3479 :group 'mh-show 3479 :group 'mh-show
3480 :package-version '(MH-E . "8.0")) 3480 :package-version '(MH-E . "8.0"))
3481 3481
3482(mh-defface mh-show-pgg-good (mh-face-data 'mh-show-pgg-good) 3482(defface-mh mh-show-pgg-good (mh-face-data 'mh-show-pgg-good)
3483 "Good PGG signature face." 3483 "Good PGG signature face."
3484 :group 'mh-faces 3484 :group 'mh-faces
3485 :group 'mh-show 3485 :group 'mh-show
3486 :package-version '(MH-E . "8.0")) 3486 :package-version '(MH-E . "8.0"))
3487 3487
3488(mh-defface mh-show-pgg-unknown (mh-face-data 'mh-show-pgg-unknown) 3488(defface-mh mh-show-pgg-unknown (mh-face-data 'mh-show-pgg-unknown)
3489 "Unknown or untrusted PGG signature face." 3489 "Unknown or untrusted PGG signature face."
3490 :group 'mh-faces 3490 :group 'mh-faces
3491 :group 'mh-show 3491 :group 'mh-show
3492 :package-version '(MH-E . "8.0")) 3492 :package-version '(MH-E . "8.0"))
3493 3493
3494(mh-defface mh-show-signature (mh-face-data 'mh-show-signature) 3494(defface-mh mh-show-signature (mh-face-data 'mh-show-signature)
3495 "Signature face." 3495 "Signature face."
3496 :group 'mh-faces 3496 :group 'mh-faces
3497 :group 'mh-show 3497 :group 'mh-show
3498 :package-version '(MH-E . "8.0")) 3498 :package-version '(MH-E . "8.0"))
3499 3499
3500(mh-defface mh-show-subject 3500(defface-mh mh-show-subject
3501 (mh-face-data 'mh-folder-subject '((t (:inherit mh-folder-subject)))) 3501 (mh-face-data 'mh-folder-subject '((t (:inherit mh-folder-subject))))
3502 "Face used to highlight \"Subject:\" header fields." 3502 "Face used to highlight \"Subject:\" header fields."
3503 :group 'mh-faces 3503 :group 'mh-faces
3504 :group 'mh-show 3504 :group 'mh-show
3505 :package-version '(MH-E . "8.0")) 3505 :package-version '(MH-E . "8.0"))
3506 3506
3507(mh-defface mh-show-to (mh-face-data 'mh-show-to) 3507(defface-mh mh-show-to (mh-face-data 'mh-show-to)
3508 "Face used to highlight \"To:\" header fields." 3508 "Face used to highlight \"To:\" header fields."
3509 :group 'mh-faces 3509 :group 'mh-faces
3510 :group 'mh-show 3510 :group 'mh-show
3511 :package-version '(MH-E . "8.0")) 3511 :package-version '(MH-E . "8.0"))
3512 3512
3513(mh-defface mh-show-xface 3513(defface-mh mh-show-xface
3514 (mh-face-data 'mh-show-from '((t (:inherit (mh-show-from highlight))))) 3514 (mh-face-data 'mh-show-from '((t (:inherit (mh-show-from highlight)))))
3515"X-Face image face. 3515"X-Face image face.
3516The background and foreground are used in the image." 3516The background and foreground are used in the image."
@@ -3518,13 +3518,13 @@ The background and foreground are used in the image."
3518 :group 'mh-show 3518 :group 'mh-show
3519 :package-version '(MH-E . "8.0")) 3519 :package-version '(MH-E . "8.0"))
3520 3520
3521(mh-defface mh-speedbar-folder (mh-face-data 'mh-speedbar-folder) 3521(defface-mh mh-speedbar-folder (mh-face-data 'mh-speedbar-folder)
3522 "Basic folder face." 3522 "Basic folder face."
3523 :group 'mh-faces 3523 :group 'mh-faces
3524 :group 'mh-speedbar 3524 :group 'mh-speedbar
3525 :package-version '(MH-E . "8.0")) 3525 :package-version '(MH-E . "8.0"))
3526 3526
3527(mh-defface mh-speedbar-folder-with-unseen-messages 3527(defface-mh mh-speedbar-folder-with-unseen-messages
3528 (mh-face-data 'mh-speedbar-folder 3528 (mh-face-data 'mh-speedbar-folder
3529 '((t (:inherit mh-speedbar-folder :bold t)))) 3529 '((t (:inherit mh-speedbar-folder :bold t))))
3530 "Folder face when folder contains unread messages." 3530 "Folder face when folder contains unread messages."
@@ -3532,14 +3532,14 @@ The background and foreground are used in the image."
3532 :group 'mh-speedbar 3532 :group 'mh-speedbar
3533 :package-version '(MH-E . "8.0")) 3533 :package-version '(MH-E . "8.0"))
3534 3534
3535(mh-defface mh-speedbar-selected-folder 3535(defface-mh mh-speedbar-selected-folder
3536 (mh-face-data 'mh-speedbar-selected-folder) 3536 (mh-face-data 'mh-speedbar-selected-folder)
3537 "Selected folder face." 3537 "Selected folder face."
3538 :group 'mh-faces 3538 :group 'mh-faces
3539 :group 'mh-speedbar 3539 :group 'mh-speedbar
3540 :package-version '(MH-E . "8.0")) 3540 :package-version '(MH-E . "8.0"))
3541 3541
3542(mh-defface mh-speedbar-selected-folder-with-unseen-messages 3542(defface-mh mh-speedbar-selected-folder-with-unseen-messages
3543 (mh-face-data 'mh-speedbar-selected-folder 3543 (mh-face-data 'mh-speedbar-selected-folder
3544 '((t (:inherit mh-speedbar-selected-folder :bold t)))) 3544 '((t (:inherit mh-speedbar-selected-folder :bold t))))
3545 "Selected folder face when folder contains unread messages." 3545 "Selected folder face when folder contains unread messages."
@@ -3547,16 +3547,6 @@ The background and foreground are used in the image."
3547 :group 'mh-speedbar 3547 :group 'mh-speedbar
3548 :package-version '(MH-E . "8.0")) 3548 :package-version '(MH-E . "8.0"))
3549 3549
3550;; Get rid of temporary functions and data structures.
3551(fmakunbound 'mh-defcustom)
3552(fmakunbound 'mh-defface)
3553(fmakunbound 'mh-defgroup)
3554(fmakunbound 'mh-face-data)
3555(fmakunbound 'mh-strip-package-version)
3556(makunbound 'mh-face-data)
3557(makunbound 'mh-inherit-face-flag)
3558(makunbound 'mh-min-colors-defined-flag)
3559
3560(provide 'mh-e) 3550(provide 'mh-e)
3561 3551
3562;; Local Variables: 3552;; Local Variables:
diff --git a/lisp/mh-e/mh-folder.el b/lisp/mh-e/mh-folder.el
index 8516856f14e..282bc118439 100644
--- a/lisp/mh-e/mh-folder.el
+++ b/lisp/mh-e/mh-folder.el
@@ -524,11 +524,8 @@ font-lock is done highlighting.")
524;; Shush compiler. 524;; Shush compiler.
525(defvar desktop-save-buffer) 525(defvar desktop-save-buffer)
526(defvar font-lock-auto-fontify) 526(defvar font-lock-auto-fontify)
527(defvar image-load-path)
528(defvar font-lock-defaults) ; XEmacs 527(defvar font-lock-defaults) ; XEmacs
529 528
530(defvar mh-folder-buttons-init-flag nil)
531
532;; Ensure new buffers won't get this mode if default-major-mode is nil. 529;; Ensure new buffers won't get this mode if default-major-mode is nil.
533(put 'mh-folder-mode 'mode-class 'special) 530(put 'mh-folder-mode 'mode-class 'special)
534 531
@@ -590,13 +587,8 @@ perform the operation on all messages in that region.
590 587
591\\{mh-folder-mode-map}" 588\\{mh-folder-mode-map}"
592 (mh-do-in-gnu-emacs 589 (mh-do-in-gnu-emacs
593 (unless mh-folder-buttons-init-flag 590 (unless mh-folder-tool-bar-map
594 (let* ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm")) 591 (mh-tool-bar-folder-buttons-init))
595 (image-load-path (cons (car load-path)
596 (when (boundp 'image-load-path)
597 image-load-path))))
598 (mh-tool-bar-folder-buttons-init)
599 (setq mh-folder-buttons-init-flag t)))
600 (set (make-local-variable 'tool-bar-map) mh-folder-tool-bar-map)) 592 (set (make-local-variable 'tool-bar-map) mh-folder-tool-bar-map))
601 (mh-do-in-xemacs 593 (mh-do-in-xemacs
602 (mh-tool-bar-init :folder)) 594 (mh-tool-bar-init :folder))
diff --git a/lisp/mh-e/mh-gnus.el b/lisp/mh-e/mh-gnus.el
index 970f98556e2..1e3b385eda7 100644
--- a/lisp/mh-e/mh-gnus.el
+++ b/lisp/mh-e/mh-gnus.el
@@ -39,19 +39,19 @@
39(mh-require 'mml nil t) 39(mh-require 'mml nil t)
40 40
41;; Copy of function from gnus-util.el. 41;; Copy of function from gnus-util.el.
42(mh-defun-compat mh-gnus-local-map-property gnus-local-map-property (map) 42(defun-mh mh-gnus-local-map-property gnus-local-map-property (map)
43 "Return a list suitable for a text property list specifying keymap MAP." 43 "Return a list suitable for a text property list specifying keymap MAP."
44 (cond (mh-xemacs-flag (list 'keymap map)) 44 (cond (mh-xemacs-flag (list 'keymap map))
45 ((>= emacs-major-version 21) (list 'keymap map)) 45 ((>= emacs-major-version 21) (list 'keymap map))
46 (t (list 'local-map map)))) 46 (t (list 'local-map map))))
47 47
48;; Copy of function from mm-decode.el. 48;; Copy of function from mm-decode.el.
49(mh-defun-compat mh-mm-merge-handles mm-merge-handles (handles1 handles2) 49(defun-mh mh-mm-merge-handles mm-merge-handles (handles1 handles2)
50 (append (if (listp (car handles1)) handles1 (list handles1)) 50 (append (if (listp (car handles1)) handles1 (list handles1))
51 (if (listp (car handles2)) handles2 (list handles2)))) 51 (if (listp (car handles2)) handles2 (list handles2))))
52 52
53;; Copy of function from mm-decode.el. 53;; Copy of function from mm-decode.el.
54(mh-defun-compat mh-mm-set-handle-multipart-parameter 54(defun-mh mh-mm-set-handle-multipart-parameter
55 mm-set-handle-multipart-parameter (handle parameter value) 55 mm-set-handle-multipart-parameter (handle parameter value)
56 ;; HANDLE could be a CTL. 56 ;; HANDLE could be a CTL.
57 (if handle 57 (if handle
@@ -59,7 +59,7 @@
59 (car handle)))) 59 (car handle))))
60 60
61;; Copy of function from mm-view.el. 61;; Copy of function from mm-view.el.
62(mh-defun-compat mh-mm-inline-text-vcard mm-inline-text-vcard (handle) 62(defun-mh mh-mm-inline-text-vcard mm-inline-text-vcard (handle)
63 (let (buffer-read-only) 63 (let (buffer-read-only)
64 (mm-insert-inline 64 (mm-insert-inline
65 handle 65 handle
@@ -73,17 +73,17 @@
73 73
74;; Function from mm-decode.el used in PGP messages. Just define it with older 74;; Function from mm-decode.el used in PGP messages. Just define it with older
75;; Gnus to avoid compiler warning. 75;; Gnus to avoid compiler warning.
76(mh-defun-compat mh-mm-possibly-verify-or-decrypt 76(defun-mh mh-mm-possibly-verify-or-decrypt
77 mm-possibly-verify-or-decrypt (parts ctl) 77 mm-possibly-verify-or-decrypt (parts ctl)
78 nil) 78 nil)
79 79
80;; Copy of macro in mm-decode.el. 80;; Copy of macro in mm-decode.el.
81(mh-defmacro-compat mh-mm-handle-multipart-ctl-parameter 81(defmacro-mh mh-mm-handle-multipart-ctl-parameter
82 mm-handle-multipart-ctl-parameter (handle parameter) 82 mm-handle-multipart-ctl-parameter (handle parameter)
83 `(get-text-property 0 ,parameter (car ,handle))) 83 `(get-text-property 0 ,parameter (car ,handle)))
84 84
85;; Copy of function in mm-decode.el. 85;; Copy of function in mm-decode.el.
86(mh-defun-compat mh-mm-readable-p mm-readable-p (handle) 86(defun-mh mh-mm-readable-p mm-readable-p (handle)
87 "Say whether the content of HANDLE is readable." 87 "Say whether the content of HANDLE is readable."
88 (and (< (with-current-buffer (mm-handle-buffer handle) 88 (and (< (with-current-buffer (mm-handle-buffer handle)
89 (buffer-size)) 10000) 89 (buffer-size)) 10000)
@@ -93,7 +93,7 @@
93 (not (mh-mm-long-lines-p 76)))))) 93 (not (mh-mm-long-lines-p 76))))))
94 94
95;; Copy of function in mm-bodies.el. 95;; Copy of function in mm-bodies.el.
96(mh-defun-compat mh-mm-long-lines-p mm-long-lines-p (length) 96(defun-mh mh-mm-long-lines-p mm-long-lines-p (length)
97 "Say whether any of the lines in the buffer is longer than LENGTH." 97 "Say whether any of the lines in the buffer is longer than LENGTH."
98 (save-excursion 98 (save-excursion
99 (goto-char (point-min)) 99 (goto-char (point-min))
@@ -105,21 +105,21 @@
105 (and (> (current-column) length) 105 (and (> (current-column) length)
106 (current-column)))) 106 (current-column))))
107 107
108(mh-defun-compat mh-mm-keep-viewer-alive-p mm-keep-viewer-alive-p (handle) 108(defun-mh mh-mm-keep-viewer-alive-p mm-keep-viewer-alive-p (handle)
109 ;; Released Gnus doesn't keep handles associated with externally displayed 109 ;; Released Gnus doesn't keep handles associated with externally displayed
110 ;; MIME parts. So this will always return nil. 110 ;; MIME parts. So this will always return nil.
111 nil) 111 nil)
112 112
113(mh-defun-compat mh-mm-destroy-parts mm-destroy-parts (list) 113(defun-mh mh-mm-destroy-parts mm-destroy-parts (list)
114 "Older versions of Emacs don't have this function." 114 "Older versions of Emacs don't have this function."
115 nil) 115 nil)
116 116
117(mh-defun-compat mh-mm-uu-dissect-text-parts mm-uu-dissect-text-parts (handles) 117(defun-mh mh-mm-uu-dissect-text-parts mm-uu-dissect-text-parts (handles)
118 "Emacs 21 and XEmacs don't have this function." 118 "Emacs 21 and XEmacs don't have this function."
119 nil) 119 nil)
120 120
121;; Copy of function in mml.el. 121;; Copy of function in mml.el.
122(mh-defun-compat mh-mml-minibuffer-read-disposition 122(defun-mh mh-mml-minibuffer-read-disposition
123 mml-minibuffer-read-disposition (type &optional default) 123 mml-minibuffer-read-disposition (type &optional default)
124 (unless default (setq default 124 (unless default (setq default
125 (if (and (string-match "\\`text/" type) 125 (if (and (string-match "\\`text/" type)
diff --git a/lisp/mh-e/mh-letter.el b/lisp/mh-e/mh-letter.el
index 2da824c34c2..9445b5ea41f 100644
--- a/lisp/mh-e/mh-letter.el
+++ b/lisp/mh-e/mh-letter.el
@@ -275,10 +275,7 @@ searching for `mh-mail-header-separator' in the buffer."
275 275
276;;; MH-Letter Mode 276;;; MH-Letter Mode
277 277
278(defvar mh-letter-buttons-init-flag nil)
279
280;; Shush compiler. 278;; Shush compiler.
281(defvar image-load-path)
282(defvar font-lock-defaults) ; XEmacs 279(defvar font-lock-defaults) ; XEmacs
283 280
284;; Ensure new buffers won't get this mode if default-major-mode is nil. 281;; Ensure new buffers won't get this mode if default-major-mode is nil.
@@ -313,13 +310,8 @@ order).
313 (make-local-variable 'mh-sent-from-folder) 310 (make-local-variable 'mh-sent-from-folder)
314 (make-local-variable 'mh-sent-from-msg) 311 (make-local-variable 'mh-sent-from-msg)
315 (mh-do-in-gnu-emacs 312 (mh-do-in-gnu-emacs
316 (unless mh-letter-buttons-init-flag 313 (unless mh-letter-tool-bar-map
317 (let* ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm")) 314 (mh-tool-bar-letter-buttons-init))
318 (image-load-path (cons (car load-path)
319 (when (boundp 'image-load-path)
320 image-load-path))))
321 (mh-tool-bar-letter-buttons-init)
322 (setq mh-letter-buttons-init-flag t)))
323 (set (make-local-variable 'tool-bar-map) mh-letter-tool-bar-map)) 315 (set (make-local-variable 'tool-bar-map) mh-letter-tool-bar-map))
324 (mh-do-in-xemacs 316 (mh-do-in-xemacs
325 (mh-tool-bar-init :letter)) 317 (mh-tool-bar-init :letter))
diff --git a/lisp/mh-e/mh-seq.el b/lisp/mh-e/mh-seq.el
index ae260692b74..6d15739fe4d 100644
--- a/lisp/mh-e/mh-seq.el
+++ b/lisp/mh-e/mh-seq.el
@@ -238,8 +238,7 @@ When you want to widen the view to all your messages again, use
238 (set (make-local-variable 'tool-bar-map) 238 (set (make-local-variable 'tool-bar-map)
239 mh-folder-seq-tool-bar-map) 239 mh-folder-seq-tool-bar-map)
240 (when (buffer-live-p (get-buffer mh-show-buffer)) 240 (when (buffer-live-p (get-buffer mh-show-buffer))
241 (save-excursion 241 (with-current-buffer mh-show-buffer
242 (set-buffer (get-buffer mh-show-buffer))
243 (set (make-local-variable 'tool-bar-map) 242 (set (make-local-variable 'tool-bar-map)
244 mh-show-seq-tool-bar-map)))) 243 mh-show-seq-tool-bar-map))))
245 (push 'widen mh-view-ops))) 244 (push 'widen mh-view-ops)))
@@ -371,8 +370,7 @@ remove all limits and sequence restrictions."
371 (when (and (null mh-folder-view-stack) (boundp 'tool-bar-mode) tool-bar-mode) 370 (when (and (null mh-folder-view-stack) (boundp 'tool-bar-mode) tool-bar-mode)
372 (set (make-local-variable 'tool-bar-map) mh-folder-tool-bar-map) 371 (set (make-local-variable 'tool-bar-map) mh-folder-tool-bar-map)
373 (when (buffer-live-p (get-buffer mh-show-buffer)) 372 (when (buffer-live-p (get-buffer mh-show-buffer))
374 (save-excursion 373 (with-current-buffer mh-show-buffer
375 (set-buffer (get-buffer mh-show-buffer))
376 (set (make-local-variable 'tool-bar-map) mh-show-tool-bar-map))))) 374 (set (make-local-variable 'tool-bar-map) mh-show-tool-bar-map)))))
377 375
378 376
diff --git a/lisp/mh-e/mh-tool-bar.el b/lisp/mh-e/mh-tool-bar.el
index fccf83cf8d6..9b18848bd12 100644
--- a/lisp/mh-e/mh-tool-bar.el
+++ b/lisp/mh-e/mh-tool-bar.el
@@ -83,6 +83,9 @@ When INCLUDE-FLAG is non-nil, include message body being replied to."
83 83
84;;; Tool Bar Creation 84;;; Tool Bar Creation
85 85
86;; Shush compiler.
87(defvar image-load-path)
88
86(defmacro mh-tool-bar-define (defaults &rest buttons) 89(defmacro mh-tool-bar-define (defaults &rest buttons)
87 "Define a tool bar for MH-E. 90 "Define a tool bar for MH-E.
88DEFAULTS is the list of buttons that are present by default. It 91DEFAULTS is the list of buttons that are present by default. It
@@ -151,7 +154,7 @@ where,
151 (doc (if (string-match "\\(.*\\)\n" full-doc) 154 (doc (if (string-match "\\(.*\\)\n" full-doc)
152 (match-string 1 full-doc) 155 (match-string 1 full-doc)
153 full-doc)) 156 full-doc))
154 (enable-expr (or (nth 4 button) t)) 157 (enable-expr (if (eql (length button) 4) t (nth 4 button)))
155 (modes (nth 1 button)) 158 (modes (nth 1 button))
156 functions show-sym) 159 functions show-sym)
157 (when (memq 'letter modes) (setq functions `(:letter ,name))) 160 (when (memq 'letter modes) (setq functions `(:letter ,name)))
@@ -178,7 +181,7 @@ where,
178 (t 'folder-vectors))) 181 (t 'folder-vectors)))
179 (list (cond ((eq type :letter) 'mh-tool-bar-letter-buttons) 182 (list (cond ((eq type :letter) 'mh-tool-bar-letter-buttons)
180 (t 'mh-tool-bar-folder-buttons))) 183 (t 'mh-tool-bar-folder-buttons)))
181 (key (intern (concat "mh-" type1 "tool-bar-" name-str))) 184 (key (intern (concat "mh-" type1 "-tool-bar-" name-str)))
182 (setter (intern (concat type1 "-button-setter"))) 185 (setter (intern (concat type1 "-button-setter")))
183 (mbuttons (cond ((eq type :letter) 'letter-buttons) 186 (mbuttons (cond ((eq type :letter) 'letter-buttons)
184 ((eq type :show) 'show-buttons) 187 ((eq type :show) 'show-buttons)
@@ -209,50 +212,79 @@ where,
209 (unless (memq x letter-buttons) 212 (unless (memq x letter-buttons)
210 (error "Letter defaults contains unknown button %s" x))) 213 (error "Letter defaults contains unknown button %s" x)))
211 `(eval-when (compile load eval) 214 `(eval-when (compile load eval)
212 (defun mh-buffer-exists-p (mode)
213 "Test whether a buffer with major mode MODE is present."
214 (loop for buf in (buffer-list)
215 when (save-excursion
216 (set-buffer buf)
217 (eq major-mode mode))
218 return t))
219
220 ;; GNU Emacs tool bar specific code 215 ;; GNU Emacs tool bar specific code
221 (mh-do-in-gnu-emacs 216 (mh-do-in-gnu-emacs
217 (defun mh-buffer-exists-p (mode)
218 "Test whether a buffer with major mode MODE is present."
219 (loop for buf in (buffer-list)
220 when (with-current-buffer buf
221 (eq major-mode mode))
222 return t))
222 ;; Tool bar initialization functions 223 ;; Tool bar initialization functions
223 (defun mh-tool-bar-folder-buttons-init () 224 (defun mh-tool-bar-folder-buttons-init ()
224 (when (mh-buffer-exists-p 'mh-folder-mode) 225 (when (mh-buffer-exists-p 'mh-folder-mode)
225 (setq mh-folder-tool-bar-map 226 (let* ((load-path (mh-image-load-path-for-library "mh-e"
226 (let ((tool-bar-map (make-sparse-keymap))) 227 "mh-logo.xpm"))
227 ,@(nreverse folder-button-setter) 228 (image-load-path (cons (car load-path)
228 tool-bar-map)) 229 (when (boundp 'image-load-path)
229 (setq mh-show-tool-bar-map 230 image-load-path))))
230 (let ((tool-bar-map (make-sparse-keymap))) 231 (setq mh-folder-tool-bar-map
231 ,@(nreverse show-button-setter) 232 (let ((tool-bar-map (make-sparse-keymap)))
232 tool-bar-map)) 233 ,@(nreverse folder-button-setter)
233 (setq mh-show-seq-tool-bar-map 234 tool-bar-map))
234 (let ((tool-bar-map (copy-keymap mh-show-tool-bar-map))) 235 (setq mh-folder-seq-tool-bar-map
235 ,@(nreverse show-seq-button-setter) 236 (let ((tool-bar-map (copy-keymap mh-folder-tool-bar-map)))
236 tool-bar-map)) 237 ,@(nreverse sequence-button-setter)
237 (setq mh-folder-seq-tool-bar-map 238 tool-bar-map))
238 (let ((tool-bar-map (copy-keymap mh-folder-tool-bar-map))) 239 (setq mh-show-tool-bar-map
239 ,@(nreverse sequence-button-setter) 240 (let ((tool-bar-map (make-sparse-keymap)))
240 tool-bar-map)))) 241 ,@(nreverse show-button-setter)
242 tool-bar-map))
243 (setq mh-show-seq-tool-bar-map
244 (let ((tool-bar-map (copy-keymap mh-show-tool-bar-map)))
245 ,@(nreverse show-seq-button-setter)
246 tool-bar-map)))))
241 (defun mh-tool-bar-letter-buttons-init () 247 (defun mh-tool-bar-letter-buttons-init ()
242 (when (mh-buffer-exists-p 'mh-letter-mode) 248 (when (mh-buffer-exists-p 'mh-letter-mode)
243 (setq mh-letter-tool-bar-map 249 (let* ((load-path (mh-image-load-path-for-library "mh-e"
244 (let ((tool-bar-map (make-sparse-keymap))) 250 "mh-logo.xpm"))
245 ,@(nreverse letter-button-setter) 251 (image-load-path (cons (car load-path)
246 tool-bar-map)))) 252 (when (boundp 'image-load-path)
253 image-load-path))))
254 (setq mh-letter-tool-bar-map
255 (let ((tool-bar-map (make-sparse-keymap)))
256 ,@(nreverse letter-button-setter)
257 tool-bar-map)))))
247 ;; Custom setter functions 258 ;; Custom setter functions
259 (defun mh-tool-bar-update (mode default-map sequence-map)
260 "Update `tool-bar-map' in all buffers of MODE.
261Use SEQUENCE-MAP if display is limited; DEFAULT-MAP otherwise."
262 (loop for buf in (buffer-list)
263 do (with-current-buffer buf
264 (if (eq mode major-mode)
265 (let ((map (if mh-folder-view-stack
266 sequence-map
267 default-map)))
268 ;; Yes, make-local-variable is necessary since we
269 ;; get here during initialization when loading
270 ;; mh-e.el, after the +inbox buffer has been
271 ;; created, but before mh-folder-mode has run and
272 ;; created the local map.
273 (set (make-local-variable 'tool-bar-map) map))))))
248 (defun mh-tool-bar-folder-buttons-set (symbol value) 274 (defun mh-tool-bar-folder-buttons-set (symbol value)
249 "Construct tool bar for `mh-folder-mode' and `mh-show-mode'." 275 "Construct tool bar for `mh-folder-mode' and `mh-show-mode'."
250 (set-default symbol value) 276 (set-default symbol value)
251 (mh-tool-bar-folder-buttons-init)) 277 (mh-tool-bar-folder-buttons-init)
278 (mh-tool-bar-update 'mh-folder-mode mh-folder-tool-bar-map
279 mh-folder-seq-tool-bar-map)
280 (mh-tool-bar-update 'mh-show-mode mh-show-tool-bar-map
281 mh-show-seq-tool-bar-map))
252 (defun mh-tool-bar-letter-buttons-set (symbol value) 282 (defun mh-tool-bar-letter-buttons-set (symbol value)
253 "Construct tool bar for `mh-letter-mode'." 283 "Construct tool bar for `mh-letter-mode'."
254 (set-default symbol value) 284 (set-default symbol value)
255 (mh-tool-bar-letter-buttons-init))) 285 (mh-tool-bar-letter-buttons-init)
286 (mh-tool-bar-update 'mh-letter-mode mh-letter-tool-bar-map
287 mh-letter-tool-bar-map)))
256 ;; XEmacs specific code 288 ;; XEmacs specific code
257 (mh-do-in-xemacs 289 (mh-do-in-xemacs
258 (defvar mh-tool-bar-folder-vector-map 290 (defvar mh-tool-bar-folder-vector-map
@@ -318,7 +350,8 @@ where,
318 'mh-tool-bar-folder-buttons 350 'mh-tool-bar-folder-buttons
319 '(list ,@(mapcar (lambda (x) `(quote ,x)) folder-defaults)) 351 '(list ,@(mapcar (lambda (x) `(quote ,x)) folder-defaults))
320 "List of buttons to include in MH-Folder tool bar." 352 "List of buttons to include in MH-Folder tool bar."
321 :group 'mh-tool-bar :set 'mh-tool-bar-folder-buttons-set 353 :group 'mh-tool-bar
354 :set 'mh-tool-bar-folder-buttons-set
322 :type '(set ,@(loop for x in folder-buttons 355 :type '(set ,@(loop for x in folder-buttons
323 for y in folder-docs 356 for y in folder-docs
324 collect `(const :tag ,y ,x))) 357 collect `(const :tag ,y ,x)))
@@ -328,7 +361,8 @@ where,
328 'mh-tool-bar-letter-buttons 361 'mh-tool-bar-letter-buttons
329 '(list ,@(mapcar (lambda (x) `(quote ,x)) letter-defaults)) 362 '(list ,@(mapcar (lambda (x) `(quote ,x)) letter-defaults))
330 "List of buttons to include in MH-Letter tool bar." 363 "List of buttons to include in MH-Letter tool bar."
331 :group 'mh-tool-bar :set 'mh-tool-bar-letter-buttons-set 364 :group 'mh-tool-bar
365 :set 'mh-tool-bar-letter-buttons-set
332 :type '(set ,@(loop for x in letter-buttons 366 :type '(set ,@(loop for x in letter-buttons
333 for y in letter-docs 367 for y in letter-docs
334 collect `(const :tag ,y ,x))) 368 collect `(const :tag ,y ,x)))
diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el
index 46aed35be7b..73a15583165 100644
--- a/lisp/mh-e/mh-utils.el
+++ b/lisp/mh-e/mh-utils.el
@@ -556,10 +556,18 @@ nested folders within them."
556 sub-folders) 556 sub-folders)
557 sub-folders))) 557 sub-folders)))
558 558
559;; FIXME: This function does not do well if FOLDER does not exist. It
560;; then changes the context to that folder which causes problems down
561;; the line. Since a folder in the cache could later be deleted, it
562;; would be good for mh-sub-folders-actual to return nil in this case
563;; so that mh-sub-folders could delete it from the cache. This
564;; function could protect itself by using a temporary context.
559(defun mh-sub-folders-actual (folder) 565(defun mh-sub-folders-actual (folder)
560 "Execute the command folders to return the sub-folders of FOLDER. 566 "Execute the command folders to return the sub-folders of FOLDER.
561Filters out the folder names that start with \".\" so that 567Filters out the folder names that start with \".\" so that
562directories that aren't usually mail folders are hidden." 568directories that aren't usually mail folders are hidden.
569Expects FOLDER to have already been normalized with
570 (mh-normalize-folder-name folder nil nil t)"
563 (let ((arg-list `(,(expand-file-name "folders" mh-progs) 571 (let ((arg-list `(,(expand-file-name "folders" mh-progs)
564 nil (t nil) nil "-noheader" "-norecurse" "-nototal" 572 nil (t nil) nil "-noheader" "-norecurse" "-nototal"
565 ,@(if (stringp folder) (list folder) ()))) 573 ,@(if (stringp folder) (list folder) ())))
@@ -683,36 +691,44 @@ This variable should never be set.")
683(defun mh-folder-completion-function (name predicate flag) 691(defun mh-folder-completion-function (name predicate flag)
684 "Programmable completion for folder names. 692 "Programmable completion for folder names.
685NAME is the partial folder name that has been input. PREDICATE if 693NAME is the partial folder name that has been input. PREDICATE if
686non-nil is a function that is used to filter the possible choices 694non-nil is a function that is used to filter the possible
687and FLAG determines whether the completion is over." 695choices. FLAG is nil to indicate `try-completion', t for
696`all-completions', or the symbol lambda for `test-completion'.
697See Info node `(elisp) Programmed Completion' for details."
688 (let* ((orig-name name) 698 (let* ((orig-name name)
699 ;; After normalization, name is nil, +, or +something. If a
700 ;; trailing slash is present, it is preserved.
689 (name (mh-normalize-folder-name name nil t)) 701 (name (mh-normalize-folder-name name nil t))
690 (last-slash (mh-search-from-end ?/ name)) 702 (last-slash (mh-search-from-end ?/ name))
691 (last-complete (if last-slash (substring name 0 last-slash) nil)) 703 ;; nil if + or +folder; +folder/ if slash present.
704 (last-complete (if last-slash (substring name 0 (1+ last-slash)) nil))
705 ;; Either +folder/remainder, +remainder, or "".
692 (remainder (cond (last-complete (substring name (1+ last-slash))) 706 (remainder (cond (last-complete (substring name (1+ last-slash)))
693 ((and (> (length name) 0) (equal (aref name 0) ?+)) 707 (name (substring name 1))
694 (substring name 1))
695 (t "")))) 708 (t ""))))
696 (cond ((eq flag nil) 709 (cond ((eq flag nil)
697 (let ((try-res (try-completion 710 (let ((try-res
698 name 711 (try-completion
699 (mapcar (lambda (x) 712 name
700 (cons (if (not last-complete) 713 (mapcar (lambda (x)
701 (concat "+" (car x)) 714 (cons (concat (or last-complete "+") (car x))
702 (concat last-complete "/" (car x))) 715 (cdr x)))
703 (cdr x))) 716 (mh-sub-folders last-complete t))
704 (mh-sub-folders last-complete t)) 717 predicate)))
705 predicate)))
706 (cond ((eq try-res nil) nil) 718 (cond ((eq try-res nil) nil)
707 ((and (eq try-res t) (equal name orig-name)) t) 719 ((and (eq try-res t) (equal name orig-name)) t)
708 ((eq try-res t) name) 720 ((eq try-res t) name)
709 (t try-res)))) 721 (t try-res))))
710 ((eq flag t) 722 ((eq flag t)
711 (all-completions 723 (mapcar (lambda (x)
712 remainder (mh-sub-folders last-complete t) predicate)) 724 (concat (or last-complete "+") x))
725 (all-completions
726 remainder (mh-sub-folders last-complete t) predicate)))
713 ((eq flag 'lambda) 727 ((eq flag 'lambda)
714 (let ((path (concat mh-user-path 728 (let ((path (concat (unless (and (> (length name) 1)
715 (substring (mh-normalize-folder-name name) 1)))) 729 (eq (aref name 1) ?/))
730 mh-user-path)
731 (substring name 1))))
716 (cond (mh-allow-root-folder-flag (file-exists-p path)) 732 (cond (mh-allow-root-folder-flag (file-exists-p path))
717 ((equal path mh-user-path) nil) 733 ((equal path mh-user-path) nil)
718 (t (file-exists-p path)))))))) 734 (t (file-exists-p path))))))))
@@ -726,8 +742,7 @@ and FLAG determines whether the completion is over."
726If ALLOW-ROOT-FOLDER-FLAG is non-nil then \"+\" is allowed to be 742If ALLOW-ROOT-FOLDER-FLAG is non-nil then \"+\" is allowed to be
727a folder name corresponding to `mh-user-path'." 743a folder name corresponding to `mh-user-path'."
728 (mh-normalize-folder-name 744 (mh-normalize-folder-name
729 (let ((minibuffer-completing-file-name t) 745 (let ((completion-root-regexp "^[+/]")
730 (completion-root-regexp "^[+/]")
731 (minibuffer-local-completion-map mh-folder-completion-map) 746 (minibuffer-local-completion-map mh-folder-completion-map)
732 (mh-allow-root-folder-flag allow-root-folder-flag)) 747 (mh-allow-root-folder-flag allow-root-folder-flag))
733 (completing-read prompt 'mh-folder-completion-function nil nil nil 748 (completing-read prompt 'mh-folder-completion-function nil nil nil
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index 04fbd3636f8..34bb388f855 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -979,7 +979,7 @@ Returns nil if an error message has appeared."
979 ;; Algorithm: get waiting output. See if last line contains 979 ;; Algorithm: get waiting output. See if last line contains
980 ;; tramp-smb-prompt sentinel or tramp-smb-errors strings. 980 ;; tramp-smb-prompt sentinel or tramp-smb-errors strings.
981 ;; If not, wait a bit and again get waiting output. 981 ;; If not, wait a bit and again get waiting output.
982 (while (and (not found) (not err)) 982 (while (not found)
983 983
984 ;; Accept pending output. 984 ;; Accept pending output.
985 (tramp-accept-process-output proc) 985 (tramp-accept-process-output proc)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 5abd3dd36e4..617e21ebfeb 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -4458,24 +4458,28 @@ necessary anymore."
4458 file) 4458 file)
4459 (member (match-string 1 file) (mapcar 'car tramp-methods))) 4459 (member (match-string 1 file) (mapcar 'car tramp-methods)))
4460 ((or (equal last-input-event 'tab) 4460 ((or (equal last-input-event 'tab)
4461 ;; Emacs 4461 ;; Emacs
4462 (and (integerp last-input-event) 4462 (and (integerp last-input-event)
4463 (not (event-modifiers last-input-event)) 4463 (or
4464 (or (char-equal last-input-event ?\?) 4464 ;; ?\t has event-modifier 'control
4465 (char-equal last-input-event ?\t) ; handled by 'tab already? 4465 (char-equal last-input-event ?\t)
4466 (char-equal last-input-event ?\ ))) 4466 (and (not (event-modifiers last-input-event))
4467 (or (char-equal last-input-event ?\?)
4468 (char-equal last-input-event ?\ )))))
4467 ;; XEmacs 4469 ;; XEmacs
4468 (and (featurep 'xemacs) 4470 (and (featurep 'xemacs)
4469 (not (event-modifiers last-input-event)) 4471 (or
4470 (or (char-equal 4472 ;; ?\t has event-modifier 'control
4471 (funcall (symbol-function 'event-to-character) 4473 (char-equal
4472 last-input-event) ?\?) 4474 (funcall (symbol-function 'event-to-character)
4473 (char-equal 4475 last-input-event) ?\t)
4474 (funcall (symbol-function 'event-to-character) 4476 (and (not (event-modifiers last-input-event))
4475 last-input-event) ?\t) 4477 (or (char-equal
4476 (char-equal 4478 (funcall (symbol-function 'event-to-character)
4477 (funcall (symbol-function 'event-to-character) 4479 last-input-event) ?\?)
4478 last-input-event) ?\ )))) 4480 (char-equal
4481 (funcall (symbol-function 'event-to-character)
4482 last-input-event) ?\ ))))))
4479 t))) 4483 t)))
4480 4484
4481(defun tramp-completion-handle-file-exists-p (filename) 4485(defun tramp-completion-handle-file-exists-p (filename)
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el
index a71667291da..c7edf9a4cdc 100644
--- a/lisp/net/trampver.el
+++ b/lisp/net/trampver.el
@@ -30,7 +30,7 @@
30;; are auto-frobbed from configure.ac, so you should edit that file and run 30;; are auto-frobbed from configure.ac, so you should edit that file and run
31;; "autoconf && ./configure" to change them. 31;; "autoconf && ./configure" to change them.
32 32
33(defconst tramp-version "2.0.52" 33(defconst tramp-version "2.0.53"
34 "This version of Tramp.") 34 "This version of Tramp.")
35 35
36(defconst tramp-bug-report-address "tramp-devel@gnu.org" 36(defconst tramp-bug-report-address "tramp-devel@gnu.org"
diff --git a/lisp/newcomment.el b/lisp/newcomment.el
index 877d5c9f399..d5a2cea914a 100644
--- a/lisp/newcomment.el
+++ b/lisp/newcomment.el
@@ -108,21 +108,25 @@ not to go beyond `comment-fill-column'."
108;;;###autoload 108;;;###autoload
109(defvar comment-start nil 109(defvar comment-start nil
110 "*String to insert to start a new comment, or nil if no comment syntax.") 110 "*String to insert to start a new comment, or nil if no comment syntax.")
111;;;###autoload(put 'comment-start 'safe-local-variable 'string-or-null-p)
111 112
112;;;###autoload 113;;;###autoload
113(defvar comment-start-skip nil 114(defvar comment-start-skip nil
114 "*Regexp to match the start of a comment plus everything up to its body. 115 "*Regexp to match the start of a comment plus everything up to its body.
115If there are any \\(...\\) pairs, the comment delimiter text is held to begin 116If there are any \\(...\\) pairs, the comment delimiter text is held to begin
116at the place matched by the close of the first pair.") 117at the place matched by the close of the first pair.")
118;;;###autoload(put 'comment-start-skip 'safe-local-variable 'string-or-null-p)
117 119
118;;;###autoload 120;;;###autoload
119(defvar comment-end-skip nil 121(defvar comment-end-skip nil
120 "Regexp to match the end of a comment plus everything up to its body.") 122 "Regexp to match the end of a comment plus everything up to its body.")
123;;;###autoload(put 'comment-end-skip 'safe-local-variable 'string-or-null-p)
121 124
122;;;###autoload 125;;;###autoload
123(defvar comment-end "" 126(defvar comment-end ""
124 "*String to insert to end a new comment. 127 "*String to insert to end a new comment.
125Should be an empty string if comments are terminated by end-of-line.") 128Should be an empty string if comments are terminated by end-of-line.")
129;;;###autoload(put 'comment-end 'safe-local-variable 'string-or-null-p)
126 130
127;;;###autoload 131;;;###autoload
128(defvar comment-indent-function 'comment-indent-default 132(defvar comment-indent-function 'comment-indent-default
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index d6854d091fe..a5163319fbf 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -100,7 +100,9 @@
100(defvar tool-bar-map) 100(defvar tool-bar-map)
101(defvar speedbar-initial-expansion-list-name) 101(defvar speedbar-initial-expansion-list-name)
102 102
103(defvar gdb-frame-address "main" "Initialization for Assembler buffer.") 103(defvar gdb-pc-address nil "Initialization for Assembler buffer.
104Set to \"main\" at start if gdb-show-main is t.")
105(defvar gdb-frame-address nil "Identity of frame for watch expression.")
104(defvar gdb-previous-frame-address nil) 106(defvar gdb-previous-frame-address nil)
105(defvar gdb-memory-address "main") 107(defvar gdb-memory-address "main")
106(defvar gdb-previous-frame nil) 108(defvar gdb-previous-frame nil)
@@ -109,8 +111,9 @@
109(defvar gdb-current-language nil) 111(defvar gdb-current-language nil)
110(defvar gdb-var-list nil 112(defvar gdb-var-list nil
111 "List of variables in watch window. 113 "List of variables in watch window.
112Each element has the form (VARNUM EXPRESSION NUMCHILD TYPE VALUE STATUS) where 114Each element has the form (VARNUM EXPRESSION NUMCHILD TYPE VALUE STATUS FP)
113STATUS is nil (unchanged), `changed' or `out-of-scope'.") 115where STATUS is nil (unchanged), `changed' or `out-of-scope', FP the frame
116address for root variables.")
114(defvar gdb-force-update t 117(defvar gdb-force-update t
115 "Non-nil means that view of watch expressions will be updated in the speedbar.") 118 "Non-nil means that view of watch expressions will be updated in the speedbar.")
116(defvar gdb-main-file nil "Source file from which program execution begins.") 119(defvar gdb-main-file nil "Source file from which program execution begins.")
@@ -516,7 +519,7 @@ With arg, use separate IO iff arg is positive."
516 (setq comint-input-sender 'gdb-send) 519 (setq comint-input-sender 'gdb-send)
517 520
518 ;; (re-)initialize 521 ;; (re-)initialize
519 (setq gdb-frame-address (if gdb-show-main "main" nil)) 522 (setq gdb-pc-address (if gdb-show-main "main" nil))
520 (setq gdb-previous-frame-address nil 523 (setq gdb-previous-frame-address nil
521 gdb-memory-address "main" 524 gdb-memory-address "main"
522 gdb-previous-frame nil 525 gdb-previous-frame nil
@@ -720,7 +723,7 @@ With arg, enter name of variable to be watched in the minibuffer."
720 expr) 723 expr)
721 (match-string 2) 724 (match-string 2)
722 (match-string 3) 725 (match-string 3)
723 nil nil))) 726 nil nil gdb-frame-address)))
724 (push var gdb-var-list) 727 (push var gdb-var-list)
725 (speedbar 1) 728 (speedbar 1)
726 (unless (string-equal 729 (unless (string-equal
@@ -1206,7 +1209,7 @@ This filter may simply queue input for a later time."
1206 (cons 1209 (cons
1207 (match-string 1 args) 1210 (match-string 1 args)
1208 (string-to-number (match-string 2 args)))) 1211 (string-to-number (match-string 2 args))))
1209 (setq gdb-frame-address (match-string 3 args)) 1212 (setq gdb-pc-address (match-string 3 args))
1210 ;; cover for auto-display output which comes *before* 1213 ;; cover for auto-display output which comes *before*
1211 ;; stopped annotation 1214 ;; stopped annotation
1212 (if (eq gdb-output-sink 'inferior) (setq gdb-output-sink 'user))) 1215 (if (eq gdb-output-sink 'inferior) (setq gdb-output-sink 'user)))
@@ -1357,7 +1360,7 @@ happens to be appropriate."
1357 (gdb-get-buffer-create 'gdb-breakpoints-buffer) 1360 (gdb-get-buffer-create 'gdb-breakpoints-buffer)
1358 (gdb-invalidate-breakpoints) 1361 (gdb-invalidate-breakpoints)
1359 ;; Do this through gdb-get-selected-frame -> gdb-frame-handler 1362 ;; Do this through gdb-get-selected-frame -> gdb-frame-handler
1360 ;; so gdb-frame-address is updated. 1363 ;; so gdb-pc-address is updated.
1361 ;; (gdb-invalidate-assembler) 1364 ;; (gdb-invalidate-assembler)
1362 1365
1363 (if (string-equal gdb-version "pre-6.4") 1366 (if (string-equal gdb-version "pre-6.4")
@@ -3004,11 +3007,11 @@ BUFFER nil or omitted means use the current buffer."
3004 (pos 1) (address) (flag) (bptno)) 3007 (pos 1) (address) (flag) (bptno))
3005 (with-current-buffer buffer 3008 (with-current-buffer buffer
3006 (save-excursion 3009 (save-excursion
3007 (if (not (equal gdb-frame-address "main")) 3010 (if (not (equal gdb-pc-address "main"))
3008 (progn 3011 (progn
3009 (goto-char (point-min)) 3012 (goto-char (point-min))
3010 (if (and gdb-frame-address 3013 (if (and gdb-pc-address
3011 (search-forward gdb-frame-address nil t)) 3014 (search-forward gdb-pc-address nil t))
3012 (progn 3015 (progn
3013 (setq pos (point)) 3016 (setq pos (point))
3014 (beginning-of-line) 3017 (beginning-of-line)
@@ -3038,7 +3041,7 @@ BUFFER nil or omitted means use the current buffer."
3038 (goto-char (point-min)) 3041 (goto-char (point-min))
3039 (if (search-forward address nil t) 3042 (if (search-forward address nil t)
3040 (gdb-put-breakpoint-icon (eq flag ?y) bptno)))))))) 3043 (gdb-put-breakpoint-icon (eq flag ?y) bptno))))))))
3041 (if (not (equal gdb-frame-address "main")) 3044 (if (not (equal gdb-pc-address "main"))
3042 (with-current-buffer buffer 3045 (with-current-buffer buffer
3043 (set-window-point (get-buffer-window buffer 0) pos))))) 3046 (set-window-point (get-buffer-window buffer 0) pos)))))
3044 3047
@@ -3100,7 +3103,7 @@ BUFFER nil or omitted means use the current buffer."
3100 (special-display-frame-alist gdb-frame-parameters)) 3103 (special-display-frame-alist gdb-frame-parameters))
3101 (display-buffer (gdb-get-buffer-create 'gdb-assembler-buffer)))) 3104 (display-buffer (gdb-get-buffer-create 'gdb-assembler-buffer))))
3102 3105
3103;; modified because if gdb-frame-address has changed value a new command 3106;; modified because if gdb-pc-address has changed value a new command
3104;; must be enqueued to update the buffer with the new output 3107;; must be enqueued to update the buffer with the new output
3105(defun gdb-invalidate-assembler (&optional ignored) 3108(defun gdb-invalidate-assembler (&optional ignored)
3106 (if (gdb-get-buffer 'gdb-assembler-buffer) 3109 (if (gdb-get-buffer 'gdb-assembler-buffer)
@@ -3109,7 +3112,7 @@ BUFFER nil or omitted means use the current buffer."
3109 (string-equal gdb-selected-frame gdb-previous-frame)) 3112 (string-equal gdb-selected-frame gdb-previous-frame))
3110 (if (or (not (member 'gdb-invalidate-assembler 3113 (if (or (not (member 'gdb-invalidate-assembler
3111 gdb-pending-triggers)) 3114 gdb-pending-triggers))
3112 (not (string-equal gdb-frame-address 3115 (not (string-equal gdb-pc-address
3113 gdb-previous-frame-address))) 3116 gdb-previous-frame-address)))
3114 (progn 3117 (progn
3115 ;; take previous disassemble command, if any, off the queue 3118 ;; take previous disassemble command, if any, off the queue
@@ -3122,11 +3125,11 @@ BUFFER nil or omitted means use the current buffer."
3122 (gdb-enqueue-input 3125 (gdb-enqueue-input
3123 (list 3126 (list
3124 (concat gdb-server-prefix "disassemble " 3127 (concat gdb-server-prefix "disassemble "
3125 (if (member gdb-frame-address '(nil "main")) nil "0x") 3128 (if (member gdb-pc-address '(nil "main")) nil "0x")
3126 gdb-frame-address "\n") 3129 gdb-pc-address "\n")
3127 'gdb-assembler-handler)) 3130 'gdb-assembler-handler))
3128 (push 'gdb-invalidate-assembler gdb-pending-triggers) 3131 (push 'gdb-invalidate-assembler gdb-pending-triggers)
3129 (setq gdb-previous-frame-address gdb-frame-address) 3132 (setq gdb-previous-frame-address gdb-pc-address)
3130 (setq gdb-previous-frame gdb-selected-frame))))))) 3133 (setq gdb-previous-frame gdb-selected-frame)))))))
3131 3134
3132(defun gdb-get-selected-frame () 3135(defun gdb-get-selected-frame ()
@@ -3141,8 +3144,10 @@ BUFFER nil or omitted means use the current buffer."
3141 (setq gdb-pending-triggers 3144 (setq gdb-pending-triggers
3142 (delq 'gdb-get-selected-frame gdb-pending-triggers)) 3145 (delq 'gdb-get-selected-frame gdb-pending-triggers))
3143 (goto-char (point-min)) 3146 (goto-char (point-min))
3144 (if (re-search-forward "Stack level \\([0-9]+\\)" nil t) 3147 (when (re-search-forward
3145 (setq gdb-frame-number (match-string 1))) 3148 "Stack level \\([0-9]+\\), frame at \\(0x[[:xdigit:]]+\\)" nil t)
3149 (setq gdb-frame-number (match-string 1))
3150 (setq gdb-frame-address (match-string 2)))
3146 (goto-char (point-min)) 3151 (goto-char (point-min))
3147 (when (re-search-forward ".*=\\s-+0x0*\\(\\S-*\\)\\s-+in\\s-+\\(\\S-+?\\)\ 3152 (when (re-search-forward ".*=\\s-+0x0*\\(\\S-*\\)\\s-+in\\s-+\\(\\S-+?\\)\
3148\\(?: (\\(\\S-+?\\):[0-9]+?)\\)*;? " 3153\\(?: (\\(\\S-+?\\):[0-9]+?)\\)*;? "
@@ -3154,7 +3159,7 @@ BUFFER nil or omitted means use the current buffer."
3154 (if (gdb-get-buffer 'gdb-assembler-buffer) 3159 (if (gdb-get-buffer 'gdb-assembler-buffer)
3155 (with-current-buffer (gdb-get-buffer 'gdb-assembler-buffer) 3160 (with-current-buffer (gdb-get-buffer 'gdb-assembler-buffer)
3156 (setq mode-name (concat "Machine:" gdb-selected-frame)))) 3161 (setq mode-name (concat "Machine:" gdb-selected-frame))))
3157 (setq gdb-frame-address (match-string 1)) 3162 (setq gdb-pc-address (match-string 1))
3158 (if (and (match-string 3) gud-overlay-arrow-position) 3163 (if (and (match-string 3) gud-overlay-arrow-position)
3159 (let ((buffer (marker-buffer gud-overlay-arrow-position)) 3164 (let ((buffer (marker-buffer gud-overlay-arrow-position))
3160 (position (marker-position gud-overlay-arrow-position))) 3165 (position (marker-position gud-overlay-arrow-position)))
@@ -3289,6 +3294,7 @@ in_scope=\"\\(.*?\\)\".*?}")
3289 (with-current-buffer (gdb-get-buffer 'gdb-registers-buffer) 3294 (with-current-buffer (gdb-get-buffer 'gdb-registers-buffer)
3290 (let ((buffer-read-only nil)) 3295 (let ((buffer-read-only nil))
3291 (erase-buffer) 3296 (erase-buffer)
3297 (put-text-property 0 (length err) 'face font-lock-warning-face err)
3292 (insert err) 3298 (insert err)
3293 (goto-char (point-min))))) 3299 (goto-char (point-min)))))
3294 (let ((register-list (reverse gdb-register-names)) 3300 (let ((register-list (reverse gdb-register-names))
@@ -3385,36 +3391,44 @@ in_scope=\"\\(.*?\\)\".*?}")
3385(defun gdb-stack-list-locals-handler () 3391(defun gdb-stack-list-locals-handler ()
3386 (setq gdb-pending-triggers (delq 'gdb-invalidate-locals-1 3392 (setq gdb-pending-triggers (delq 'gdb-invalidate-locals-1
3387 gdb-pending-triggers)) 3393 gdb-pending-triggers))
3388 (let (local locals-list) 3394 (goto-char (point-min))
3389 (goto-char (point-min)) 3395 (if (re-search-forward gdb-error-regexp nil t)
3390 (while (re-search-forward gdb-stack-list-locals-regexp nil t) 3396 (let ((err (match-string 1)))
3391 (let ((local (list (match-string 1) 3397 (with-current-buffer (gdb-get-buffer 'gdb-locals-buffer)
3392 (match-string 2) 3398 (let ((buffer-read-only nil))
3393 nil))) 3399 (erase-buffer)
3394 (if (looking-at ",value=\\(\".*\"\\).*?}") 3400 (insert err)
3395 (setcar (nthcdr 2 local) (read (match-string 1)))) 3401 (goto-char (point-min)))))
3396 (push local locals-list))) 3402 (let (local locals-list)
3397 (let ((buf (gdb-get-buffer 'gdb-locals-buffer))) 3403 (goto-char (point-min))
3398 (and buf (with-current-buffer buf 3404 (while (re-search-forward gdb-stack-list-locals-regexp nil t)
3399 (let* ((window (get-buffer-window buf 0)) 3405 (let ((local (list (match-string 1)
3400 (start (window-start window)) 3406 (match-string 2)
3401 (p (window-point window)) 3407 nil)))
3402 (buffer-read-only nil)) 3408 (if (looking-at ",value=\\(\".*\"\\).*?}")
3403 (erase-buffer) 3409 (setcar (nthcdr 2 local) (read (match-string 1))))
3404 (dolist (local locals-list) 3410 (push local locals-list)))
3405 (setq name (car local)) 3411 (let ((buf (gdb-get-buffer 'gdb-locals-buffer)))
3406 (if (or (not (nth 2 local)) 3412 (and buf (with-current-buffer buf
3407 (string-match "\\0x" (nth 2 local))) 3413 (let* ((window (get-buffer-window buf 0))
3408 (add-text-properties 0 (length name) 3414 (start (window-start window))
3409 `(mouse-face highlight 3415 (p (window-point window))
3410 help-echo "mouse-2: create watch expression" 3416 (buffer-read-only nil))
3411 local-map ,gdb-locals-watch-map-1) 3417 (erase-buffer)
3412 name)) 3418 (dolist (local locals-list)
3419 (setq name (car local))
3420 (if (or (not (nth 2 local))
3421 (string-match "^\\0x" (nth 2 local)))
3422 (add-text-properties 0 (length name)
3423 `(mouse-face highlight
3424 help-echo "mouse-2: create watch expression"
3425 local-map ,gdb-locals-watch-map-1)
3426 name))
3413 (insert 3427 (insert
3414 (concat name "\t" (nth 1 local) 3428 (concat name "\t" (nth 1 local)
3415 "\t" (nth 2 local) "\n"))) 3429 "\t" (nth 2 local) "\n")))
3416 (set-window-start window start) 3430 (set-window-start window start)
3417 (set-window-point window p))))))) 3431 (set-window-point window p))))))))
3418 3432
3419(defun gdb-get-register-names () 3433(defun gdb-get-register-names ()
3420 "Create a list of register names." 3434 "Create a list of register names."
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 907a2e7c300..e1e2b9e28cd 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -374,8 +374,9 @@ t means that there is no stack, and we are in display-file mode.")
374(defun gud-speedbar-item-info () 374(defun gud-speedbar-item-info ()
375 "Display the data type of the watch expression element." 375 "Display the data type of the watch expression element."
376 (let ((var (nth (- (line-number-at-pos (point)) 2) gdb-var-list))) 376 (let ((var (nth (- (line-number-at-pos (point)) 2) gdb-var-list)))
377 (if (nth 4 var) 377 (if (nth 6 var)
378 (speedbar-message "%s" (nth 3 var))))) 378 (speedbar-message "%s: %s" (nth 6 var) (nth 3 var))
379 (speedbar-message "%s" (nth 3 var)))))
379 380
380(defun gud-install-speedbar-variables () 381(defun gud-install-speedbar-variables ()
381 "Install those variables used by speedbar to enhance gud/gdb." 382 "Install those variables used by speedbar to enhance gud/gdb."
diff --git a/lisp/progmodes/idlw-help.el b/lisp/progmodes/idlw-help.el
index c2fc13cf505..e5726312623 100644
--- a/lisp/progmodes/idlw-help.el
+++ b/lisp/progmodes/idlw-help.el
@@ -864,6 +864,7 @@ This function can be used as `idlwave-extra-help-function'."
864 (erase-buffer) 864 (erase-buffer)
865 (insert-file-contents file nil nil nil 'replace)) 865 (insert-file-contents file nil nil nil 'replace))
866 (idlwave-help-error name type class keyword))) 866 (idlwave-help-error name type class keyword)))
867 (goto-char (point-min))
867 (if (and idlwave-help-fontify-source-code (not in-buf)) 868 (if (and idlwave-help-fontify-source-code (not in-buf))
868 (idlwave-help-fontify))) 869 (idlwave-help-fontify)))
869 (idlwave-help-error name type class keyword)) 870 (idlwave-help-error name type class keyword))
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index f110828d602..5e645535a23 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1744,6 +1744,14 @@ lines count as headers.
1744 #'python-eldoc-function) 1744 #'python-eldoc-function)
1745 (add-hook 'eldoc-mode-hook 1745 (add-hook 'eldoc-mode-hook
1746 '(lambda () (run-python nil t)) nil t) ; need it running 1746 '(lambda () (run-python nil t)) nil t) ; need it running
1747 (unless (assoc 'python-mode hs-special-modes-alist)
1748 (setq
1749 hs-special-modes-alist
1750 (cons (list
1751 'python-mode "^\\s-*def\\>" nil "#"
1752 (lambda (arg)(python-end-of-defun)(skip-chars-backward " \t\n"))
1753 nil)
1754 hs-special-modes-alist)))
1747 (if (featurep 'hippie-exp) 1755 (if (featurep 'hippie-exp)
1748 (set (make-local-variable 'hippie-expand-try-functions-list) 1756 (set (make-local-variable 'hippie-expand-try-functions-list)
1749 (cons 'python-try-complete hippie-expand-try-functions-list))) 1757 (cons 'python-try-complete hippie-expand-try-functions-list)))
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 6fe818facca..0e73427a33c 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -356,6 +356,7 @@ the car and cdr are the same symbol.")
356 356
357(defvar sh-shell (sh-canonicalize-shell (file-name-nondirectory sh-shell-file)) 357(defvar sh-shell (sh-canonicalize-shell (file-name-nondirectory sh-shell-file))
358 "The shell being programmed. This is set by \\[sh-set-shell].") 358 "The shell being programmed. This is set by \\[sh-set-shell].")
359;;;###autoload(put 'sh-shell 'safe-local-variable 'symbolp)
359 360
360(defvar sh-mode-abbrev-table nil) 361(defvar sh-mode-abbrev-table nil)
361 362
diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el
index 5c8477ac337..b194bb56727 100644
--- a/lisp/progmodes/tcl.el
+++ b/lisp/progmodes/tcl.el
@@ -1042,7 +1042,7 @@ Returns nil if line starts inside a string, t if in a comment."
1042(defun tcl-send-string (proc string) 1042(defun tcl-send-string (proc string)
1043 (with-current-buffer (process-buffer proc) 1043 (with-current-buffer (process-buffer proc)
1044 (goto-char (process-mark proc)) 1044 (goto-char (process-mark proc))
1045 (beginning-of-line) 1045 (forward-line 0) ;Not (beginning-of-line) because of fields.
1046 (if (looking-at comint-prompt-regexp) 1046 (if (looking-at comint-prompt-regexp)
1047 (set-marker inferior-tcl-delete-prompt-marker (point)))) 1047 (set-marker inferior-tcl-delete-prompt-marker (point))))
1048 (comint-send-string proc string)) 1048 (comint-send-string proc string))
@@ -1050,7 +1050,7 @@ Returns nil if line starts inside a string, t if in a comment."
1050(defun tcl-send-region (proc start end) 1050(defun tcl-send-region (proc start end)
1051 (with-current-buffer (process-buffer proc) 1051 (with-current-buffer (process-buffer proc)
1052 (goto-char (process-mark proc)) 1052 (goto-char (process-mark proc))
1053 (beginning-of-line) 1053 (forward-line 0) ;Not (beginning-of-line) because of fields.
1054 (if (looking-at comint-prompt-regexp) 1054 (if (looking-at comint-prompt-regexp)
1055 (set-marker inferior-tcl-delete-prompt-marker (point)))) 1055 (set-marker inferior-tcl-delete-prompt-marker (point))))
1056 (comint-send-region proc start end)) 1056 (comint-send-region proc start end))
@@ -1080,7 +1080,11 @@ See variable `inferior-tcl-buffer'."
1080Prefix argument means switch to the Tcl buffer afterwards." 1080Prefix argument means switch to the Tcl buffer afterwards."
1081 (interactive "r\nP") 1081 (interactive "r\nP")
1082 (let ((proc (inferior-tcl-proc))) 1082 (let ((proc (inferior-tcl-proc)))
1083 (tcl-send-region proc start end) 1083 (tcl-send-region
1084 proc
1085 ;; Strip leading and trailing whitespace.
1086 (save-excursion (goto-char start) (skip-chars-forward " \t\n") (point))
1087 (save-excursion (goto-char end) (skip-chars-backward " \t\n") (point)))
1084 (tcl-send-string proc "\n") 1088 (tcl-send-string proc "\n")
1085 (if and-go (switch-to-tcl t)))) 1089 (if and-go (switch-to-tcl t))))
1086 1090
@@ -1149,7 +1153,12 @@ See documentation for function `inferior-tcl-mode' for more information."
1149 (unless (comint-check-proc "*inferior-tcl*") 1153 (unless (comint-check-proc "*inferior-tcl*")
1150 (set-buffer (apply (function make-comint) "inferior-tcl" cmd nil 1154 (set-buffer (apply (function make-comint) "inferior-tcl" cmd nil
1151 tcl-command-switches)) 1155 tcl-command-switches))
1152 (inferior-tcl-mode)) 1156 (inferior-tcl-mode)
1157 ;; Make tclsh display a prompt on ms-windows (or under Unix, when a tty
1158 ;; wasn't used). Doesn't affect wish, unfortunately.
1159 (unless (process-tty-name (inferior-tcl-proc))
1160 (tcl-send-string (inferior-tcl-proc)
1161 "set ::tcl_interactive 1; concat\n")))
1153 (set (make-local-variable 'tcl-application) cmd) 1162 (set (make-local-variable 'tcl-application) cmd)
1154 (setq inferior-tcl-buffer "*inferior-tcl*") 1163 (setq inferior-tcl-buffer "*inferior-tcl*")
1155 (pop-to-buffer "*inferior-tcl*")) 1164 (pop-to-buffer "*inferior-tcl*"))
diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el
index abefe6c623d..12359391f73 100644
--- a/lisp/textmodes/org.el
+++ b/lisp/textmodes/org.el
@@ -5,7 +5,7 @@
5;; Author: Carsten Dominik <dominik at science dot uva dot nl> 5;; Author: Carsten Dominik <dominik at science dot uva dot nl>
6;; Keywords: outlines, hypermedia, calendar, wp 6;; Keywords: outlines, hypermedia, calendar, wp
7;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/ 7;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/
8;; Version: 4.23 8;; Version: 4.25
9;; 9;;
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
11;; 11;;
@@ -81,6 +81,15 @@
81;; 81;;
82;; Changes since version 4.00: 82;; Changes since version 4.00:
83;; --------------------------- 83;; ---------------------------
84;; Version 4.25
85;; - Revision of the font-lock faces section, with better tty support.
86;; - TODO keywords in Agenda buffer are fontified.
87;; - Export converts links between .org files to links between .html files.
88;; - Better support for bold/italic/underline emphasis.
89;;
90;; Version 4.24
91;; - Bug fixes.
92;;
84;; Version 4.23 93;; Version 4.23
85;; - Bug fixes. 94;; - Bug fixes.
86;; 95;;
@@ -179,7 +188,7 @@
179 188
180;;; Customization variables 189;;; Customization variables
181 190
182(defvar org-version "4.23" 191(defvar org-version "4.25"
183 "The version number of the file org.el.") 192 "The version number of the file org.el.")
184(defun org-version () 193(defun org-version ()
185 (interactive) 194 (interactive)
@@ -189,7 +198,7 @@
189;; of outline.el. 198;; of outline.el.
190(defconst org-noutline-p (featurep 'noutline) 199(defconst org-noutline-p (featurep 'noutline)
191 "Are we using the new outline mode?") 200 "Are we using the new outline mode?")
192(defconst org-xemacs-p (featurep 'xemacs)) 201(defconst org-xemacs-p (featurep 'xemacs)) ;; FIXME: used by external code?
193(defconst org-format-transports-properties-p 202(defconst org-format-transports-properties-p
194 (let ((x "a")) 203 (let ((x "a"))
195 (add-text-properties 0 1 '(test t) x) 204 (add-text-properties 0 1 '(test t) x)
@@ -232,7 +241,11 @@ uninteresting. Also tables look terrible when wrapped."
232(defcustom org-startup-align-all-tables nil 241(defcustom org-startup-align-all-tables nil
233 "Non-nil means, align all tables when visiting a file. 242 "Non-nil means, align all tables when visiting a file.
234This is useful when the column width in tables is forced with <N> cookies 243This is useful when the column width in tables is forced with <N> cookies
235in table fields. Such tables will look correct only after the first re-align." 244in table fields. Such tables will look correct only after the first re-align.
245This can also be configured on a per-file basis by adding one of
246the following lines anywhere in the buffer:
247 #+STARTUP: align
248 #+STARTUP: noalign"
236 :group 'org-startup 249 :group 'org-startup
237 :type 'boolean) 250 :type 'boolean)
238 251
@@ -242,7 +255,6 @@ This means, if you start editing an org file, you will get an
242immediate reminder of any due deadlines. 255immediate reminder of any due deadlines.
243This can also be configured on a per-file basis by adding one of 256This can also be configured on a per-file basis by adding one of
244the following lines anywhere in the buffer: 257the following lines anywhere in the buffer:
245
246 #+STARTUP: dlcheck 258 #+STARTUP: dlcheck
247 #+STARTUP: nodlcheck" 259 #+STARTUP: nodlcheck"
248 :group 'org-startup 260 :group 'org-startup
@@ -396,7 +408,12 @@ This has the effect that two stars are being added/taken away in
396promotion/demotion commands. It also influences how levels are 408promotion/demotion commands. It also influences how levels are
397handled by the exporters. 409handled by the exporters.
398Changing it requires restart of `font-lock-mode' to become effective 410Changing it requires restart of `font-lock-mode' to become effective
399for fontification also in regions already fontified." 411for fontification also in regions already fontified.
412You may also set this on a per-file basis by adding one of the following
413lines to the buffer:
414
415 #+STARTUP: odd
416 #+STARTUP: oddeven"
400 :group 'org-edit-structure 417 :group 'org-edit-structure
401 :group 'org-font-lock 418 :group 'org-font-lock
402 :type 'boolean) 419 :type 'boolean)
@@ -1124,7 +1141,7 @@ closing date."
1124 :type 'boolean) 1141 :type 'boolean)
1125 1142
1126(defgroup org-priorities nil 1143(defgroup org-priorities nil
1127 "Keywords in Org-mode." 1144 "Priorities in Org-mode."
1128 :tag "Org Priorities" 1145 :tag "Org Priorities"
1129 :group 'org-todo) 1146 :group 'org-todo)
1130 1147
@@ -1179,7 +1196,7 @@ moved to the new date."
1179 :type 'boolean) 1196 :type 'boolean)
1180 1197
1181(defgroup org-tags nil 1198(defgroup org-tags nil
1182 "Options concerning startup of Org-mode." 1199 "Options concerning tags in Org-mode."
1183 :tag "Org Tags" 1200 :tag "Org Tags"
1184 :group 'org) 1201 :group 'org)
1185 1202
@@ -1818,6 +1835,18 @@ you can \"misuse\" it to add arbitrary text to the header."
1818 :group 'org-export-html 1835 :group 'org-export-html
1819 :type 'string) 1836 :type 'string)
1820 1837
1838(defcustom org-export-html-link-org-files-as-html t
1839 "Non-nil means, make file links to `file.org' point to `file.html'.
1840When org-mode is exporting an org-mode file to HTML, links to
1841non-html files are directly put into a href tag in HTML.
1842However, links to other Org-mode files (recognized by the
1843extension `.org.) should become links to the corresponding html
1844file, assuming that the linked org-mode file will also be
1845converted to HTML.
1846When nil, the links still point to the plain `.org' file."
1847 :group 'org-export-html
1848 :type 'boolean)
1849
1821(defcustom org-export-html-inline-images t 1850(defcustom org-export-html-inline-images t
1822 "Non-nil means, inline images into exported HTML pages. 1851 "Non-nil means, inline images into exported HTML pages.
1823The link will still be to the original location of the image file. 1852The link will still be to the original location of the image file.
@@ -1903,7 +1932,12 @@ face is white for a light background, and black for a dark
1903background. You may have to customize the face `org-hide' to 1932background. You may have to customize the face `org-hide' to
1904make this work. 1933make this work.
1905Changing it requires restart of `font-lock-mode' to become effective 1934Changing it requires restart of `font-lock-mode' to become effective
1906also in regions already fontified." 1935also in regions already fontified.
1936You may also set this on a per-file basis by adding one of the following
1937lines to the buffer:
1938
1939 #+STARTUP: hidestars
1940 #+STARTUP: showstars"
1907 :group 'org-font-lock 1941 :group 'org-font-lock
1908 :type 'boolean) 1942 :type 'boolean)
1909 1943
@@ -1926,188 +1960,246 @@ Changing this variable requires a restart of Emacs to take effect."
1926 :tag "Org Faces" 1960 :tag "Org Faces"
1927 :group 'org-font-lock) 1961 :group 'org-font-lock)
1928 1962
1963(defun org-compatible-face (specs)
1964 "Make a compatible face specification.
1965XEmacs and Emacs 21 do not know about the `min-colors' attribute.
1966For them we convert a (min-colors 8) entry to a `tty' entry and move it
1967to the top of the list. The `min-colors' attribute will be removed from
1968any other entries, and any resulting duplicates will be removed entirely."
1969 (if (or (featurep 'xemacs) (< emacs-major-version 22))
1970 (let (r e a)
1971 (while (setq e (pop specs))
1972 (cond
1973 ((memq (car e) '(t default)) (push e r))
1974 ((setq a (member '(min-colors 8) (car e)))
1975 (nconc r (list (cons (cons '(type tty) (delq (car a) (car e)))
1976 (cdr e)))))
1977 ((setq a (assq 'min-colors (car e)))
1978 (setq e (cons (delq a (car e)) (cdr e)))
1979 (or (assoc (car e) r) (push e r)))
1980 (t (or (assoc (car e) r) (push e r)))))
1981 (nreverse r))
1982 specs))
1983
1929(defface org-hide 1984(defface org-hide
1930 '( 1985 '((((background light)) (:foreground "white"))
1931 (((type tty) (class color)) (:foreground "white")) 1986 (((background dark)) (:foreground "black")))
1932 (((class color) (background light)) (:foreground "white")) 1987 "Face used to hide leading stars in headlines.
1933 (((class color) (background dark)) (:foreground "black")) 1988The forground color of this face should be equal to the background
1934 (t (:inverse-video nil))) 1989color of the frame."
1935 "Face used for level 1 headlines."
1936 :group 'org-faces) 1990 :group 'org-faces)
1937 1991
1938(defface org-level-1 ;; font-lock-function-name-face 1992(defface org-level-1 ;; font-lock-function-name-face
1939 '((((type tty) (class color)) (:foreground "blue" :weight bold)) 1993 (org-compatible-face
1940 (((class color) (background light)) (:foreground "Blue")) 1994 '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
1941 (((class color) (background dark)) (:foreground "LightSkyBlue")) 1995 (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
1942 (t (:inverse-video t :bold t))) 1996 (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
1997 (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
1998 (((class color) (min-colors 8)) (:foreground "blue" :bold t))
1999 (t (:bold t))))
1943 "Face used for level 1 headlines." 2000 "Face used for level 1 headlines."
1944 :group 'org-faces) 2001 :group 'org-faces)
1945 2002
1946(defface org-level-2 ;; font-lock-variable-name-face 2003(defface org-level-2 ;; font-lock-variable-name-face
1947 '((((type tty) (class color)) (:foreground "yellow" :weight light)) 2004 (org-compatible-face
1948 (((class color) (background light)) (:foreground "DarkGoldenrod")) 2005 '((((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod"))
1949 (((class color) (background dark)) (:foreground "LightGoldenrod")) 2006 (((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod"))
1950 (t (:bold t :italic t))) 2007 (((class color) (min-colors 8) (background light)) (:foreground "yellow"))
2008 (((class color) (min-colors 8) (background dark)) (:foreground "yellow" :bold t))
2009 (t (:bold t))))
1951 "Face used for level 2 headlines." 2010 "Face used for level 2 headlines."
1952 :group 'org-faces) 2011 :group 'org-faces)
1953 2012
1954(defface org-level-3 ;; font-lock-keyword-face 2013(defface org-level-3 ;; font-lock-keyword-face
1955 '((((type tty) (class color)) (:foreground "cyan" :weight bold)) 2014 (org-compatible-face
1956 (((class color) (background light)) (:foreground "Purple")) 2015 '((((class color) (min-colors 88) (background light)) (:foreground "Purple"))
1957 (((class color) (background dark)) (:foreground "Cyan")) 2016 (((class color) (min-colors 88) (background dark)) (:foreground "Cyan1"))
1958 (t (:bold t))) 2017 (((class color) (min-colors 16) (background light)) (:foreground "Purple"))
2018 (((class color) (min-colors 16) (background dark)) (:foreground "Cyan"))
2019 (((class color) (min-colors 8) (background light)) (:foreground "purple" :bold t))
2020 (((class color) (min-colors 8) (background dark)) (:foreground "cyan" :bold t))
2021 (t (:bold t))))
1959 "Face used for level 3 headlines." 2022 "Face used for level 3 headlines."
1960 :group 'org-faces) 2023 :group 'org-faces)
1961 2024
1962(defface org-level-4 ;; font-lock-comment-face 2025(defface org-level-4 ;; font-lock-comment-face
1963 '((((type tty pc) (class color) (background light)) (:foreground "red")) 2026 (org-compatible-face
1964 (((type tty pc) (class color) (background dark)) (:foreground "red1")) 2027 '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
1965 (((class color) (background light)) (:foreground "Firebrick")) 2028 (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
1966 (((class color) (background dark)) (:foreground "chocolate1")) 2029 (((class color) (min-colors 16) (background light)) (:foreground "red"))
1967 (t (:bold t :italic t))) 2030 (((class color) (min-colors 16) (background dark)) (:foreground "red1"))
2031 (((class color) (min-colors 8) (background light)) (:foreground "red" :bold t))
2032 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
2033 (t (:bold t))))
1968 "Face used for level 4 headlines." 2034 "Face used for level 4 headlines."
1969 :group 'org-faces) 2035 :group 'org-faces)
1970 2036
1971(defface org-level-5 ;; font-lock-type-face 2037(defface org-level-5 ;; font-lock-type-face
1972 '((((type tty) (class color)) (:foreground "green")) 2038 (org-compatible-face
1973 (((class color) (background light)) (:foreground "ForestGreen")) 2039 '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen"))
1974 (((class color) (background dark)) (:foreground "PaleGreen")) 2040 (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen"))
1975 (t (:bold t :underline t))) 2041 (((class color) (min-colors 8)) (:foreground "green"))))
1976 "Face used for level 5 headlines." 2042 "Face used for level 5 headlines."
1977 :group 'org-faces) 2043 :group 'org-faces)
1978 2044
1979(defface org-level-6 ;; font-lock-constant-face 2045(defface org-level-6 ;; font-lock-constant-face
1980 '((((type tty) (class color)) (:foreground "magenta")) 2046 (org-compatible-face
1981 (((class color) (background light)) (:foreground "CadetBlue")) 2047 '((((class color) (min-colors 16) (background light)) (:foreground "CadetBlue"))
1982 (((class color) (background dark)) (:foreground "Aquamarine")) 2048 (((class color) (min-colors 16) (background dark)) (:foreground "Aquamarine"))
1983 (t (:bold t :underline t))) 2049 (((class color) (min-colors 8)) (:foreground "magenta"))))
1984 "Face used for level 6 headlines." 2050 "Face used for level 6 headlines."
1985 :group 'org-faces) 2051 :group 'org-faces)
1986 2052
1987(defface org-level-7 ;; font-lock-builtin-face 2053(defface org-level-7 ;; font-lock-builtin-face
1988 '((((type tty) (class color)) (:foreground "blue" :weight light)) 2054 (org-compatible-face
1989 (((class color) (background light)) (:foreground "Orchid")) 2055 '((((class color) (min-colors 16) (background light)) (:foreground "Orchid"))
1990 (((class color) (background dark)) (:foreground "LightSteelBlue")) 2056 (((class color) (min-colors 16) (background dark)) (:foreground "LightSteelBlue"))
1991 (t (:bold t))) 2057 (((class color) (min-colors 8)) (:foreground "blue")))) ;; FIXME: for dark bg?
1992 "Face used for level 7 headlines." 2058 "Face used for level 7 headlines."
1993 :group 'org-faces) 2059 :group 'org-faces)
1994 2060
1995(defface org-level-8 ;; font-lock-string-face 2061(defface org-level-8 ;; font-lock-string-face
1996 '((((type tty) (class color)) (:foreground "green")) 2062 (org-compatible-face
1997 (((class color) (background light)) (:foreground "RosyBrown")) 2063 '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
1998 (((class color) (background dark)) (:foreground "LightSalmon")) 2064 (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
1999 (t (:italic t))) 2065 (((class color) (min-colors 8)) (:foreground "green"))))
2000 "Face used for level 8 headlines." 2066 "Face used for level 8 headlines."
2001 :group 'org-faces) 2067 :group 'org-faces)
2002 2068
2003(defface org-special-keyword ;; font-lock-string-face 2069(defface org-special-keyword ;; font-lock-string-face
2004 '((((type tty) (class color)) (:foreground "green")) 2070 (org-compatible-face
2005 (((class color) (background light)) (:foreground "RosyBrown")) 2071 '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
2006 (((class color) (background dark)) (:foreground "LightSalmon")) 2072 (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
2007 (t (:italic t))) 2073 (t (:italic t))))
2008 "Face used for special keywords." 2074 "Face used for special keywords."
2009 :group 'org-faces) 2075 :group 'org-faces)
2010 2076
2011(defface org-warning ;; font-lock-warning-face 2077(defface org-warning ;; font-lock-warning-face
2012 '((((type tty) (class color)) (:foreground "red")) 2078 (org-compatible-face
2013 (((class color) (background light)) (:foreground "Red" :bold t)) 2079 '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :bold t))
2014 (((class color) (background dark)) (:foreground "Red1" :bold t)) 2080 (((class color) (min-colors 16) (background dark)) (:foreground "Pink" :bold t))
2015; (((class color) (background dark)) (:foreground "Pink" :bold t)) 2081 (((class color) (min-colors 8) (background light)) (:foreground "red" :bold t))
2016 (t (:inverse-video t :bold t))) 2082 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
2083 (t (:bold t))))
2017 "Face for deadlines and TODO keywords." 2084 "Face for deadlines and TODO keywords."
2018 :group 'org-faces) 2085 :group 'org-faces)
2019 2086
2020(defface org-headline-done ;; font-lock-string-face 2087(defface org-headline-done ;; font-lock-string-face
2021 '((((type tty) (class color)) (:foreground "green")) 2088 (org-compatible-face
2022 (((class color) (background light)) (:foreground "RosyBrown")) 2089 '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
2023 (((class color) (background dark)) (:foreground "LightSalmon")) 2090 (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
2024 (t (:italic t))) 2091 (((class color) (min-colors 8) (background light)) (:bold nil))))
2025 "Face used to indicate that a headline is DONE. See also the variable 2092 "Face used to indicate that a headline is DONE.
2026`org-fontify-done-headline'." 2093This face is only used if `org-fontify-done-headline' is set."
2027 :group 'org-faces)
2028
2029;; Inheritance does not work for xemacs. So we just copy...
2030
2031(defface org-deadline-announce
2032 '((((type tty) (class color)) (:foreground "blue" :weight bold))
2033 (((class color) (background light)) (:foreground "Blue"))
2034 (((class color) (background dark)) (:foreground "LightSkyBlue"))
2035 (t (:inverse-video t :bold t)))
2036 "Face for upcoming deadlines."
2037 :group 'org-faces)
2038
2039(defface org-scheduled-today
2040 '((((type tty) (class color)) (:foreground "green"))
2041 (((class color) (background light)) (:foreground "DarkGreen"))
2042 (((class color) (background dark)) (:foreground "PaleGreen"))
2043 (t (:bold t :underline t)))
2044 "Face for items scheduled for a certain day."
2045 :group 'org-faces)
2046
2047(defface org-scheduled-previously
2048 '((((type tty pc) (class color) (background light)) (:foreground "red"))
2049 (((type tty pc) (class color) (background dark)) (:foreground "red1"))
2050 (((class color) (background light)) (:foreground "Firebrick"))
2051 (((class color) (background dark)) (:foreground "chocolate1"))
2052 (t (:bold t :italic t)))
2053 "Face for items scheduled previously, and not yet done."
2054 :group 'org-faces) 2094 :group 'org-faces)
2055 2095
2056(defface org-formula 2096(defface org-link
2057 '((((type tty pc) (class color) (background light)) (:foreground "red")) 2097 '((((class color) (background light)) (:foreground "Purple" :underline t))
2058 (((type tty pc) (class color) (background dark)) (:foreground "red1")) 2098 (((class color) (background dark)) (:foreground "Cyan" :underline t))
2059 (((class color) (background light)) (:foreground "Firebrick")) 2099 (t (:underline t)))
2060 (((class color) (background dark)) (:foreground "chocolate1")) 2100 "Face for links."
2061 (t (:bold t :italic t)))
2062 "Face for formulas."
2063 :group 'org-faces) 2101 :group 'org-faces)
2064 2102
2065(defface org-link 2103(defface org-date
2066 '((((type tty) (class color)) (:foreground "cyan" :weight bold)) 2104 '((((class color) (background light)) (:foreground "Purple" :underline t))
2067 (((class color) (background light)) (:foreground "Purple" :underline t))
2068 (((class color) (background dark)) (:foreground "Cyan" :underline t)) 2105 (((class color) (background dark)) (:foreground "Cyan" :underline t))
2069 (t (:bold t))) 2106 (t (:underline t)))
2070 "Face for links." 2107 "Face for links."
2071 :group 'org-faces) 2108 :group 'org-faces)
2072 2109
2073(defface org-tag 2110(defface org-tag
2074 '((((type tty) (class color)) (:weight bold)) 2111 '((t (:bold t)))
2075 (((class color) (background light)) (:weight bold))
2076 (((class color) (background dark)) (:weight bold))
2077 (t (:bold t)))
2078 "Face for tags." 2112 "Face for tags."
2079 :group 'org-faces) 2113 :group 'org-faces)
2080 2114
2115(defface org-todo ;; font-lock-warning-face
2116 (org-compatible-face
2117 '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :bold t))
2118 (((class color) (min-colors 16) (background dark)) (:foreground "Pink" :bold t))
2119 (((class color) (min-colors 8) (background light)) (:foreground "red" :bold t))
2120 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
2121 (t (:inverse-video t :bold t))))
2122 "Face for TODO keywords."
2123 :group 'org-faces)
2124
2081(defface org-done ;; font-lock-type-face 2125(defface org-done ;; font-lock-type-face
2082 '((((type tty) (class color)) (:foreground "green")) 2126 (org-compatible-face
2083 (((class color) (background light)) (:foreground "ForestGreen" :bold t)) 2127 '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen"))
2084 (((class color) (background dark)) (:foreground "PaleGreen" :bold t)) 2128 (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen"))
2085 (t (:bold t :underline t))) 2129 (((class color) (min-colors 8)) (:foreground "green"))
2130 (t (:bold t))))
2086 "Face used for DONE." 2131 "Face used for DONE."
2087 :group 'org-faces) 2132 :group 'org-faces)
2088 2133
2089(defface org-table ;; font-lock-function-name-face 2134(defface org-table ;; font-lock-function-name-face
2090 '((((type tty) (class color)) (:foreground "blue" :weight bold)) 2135 (org-compatible-face
2091 (((class color) (background light)) (:foreground "Blue")) 2136 '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
2092 (((class color) (background dark)) (:foreground "LightSkyBlue")) 2137 (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
2093 (t (:inverse-video t :bold t))) 2138 (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
2139 (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
2140 (((class color) (min-colors 8) (background light)) (:foreground "blue"))
2141 (((class color) (min-colors 8) (background dark)))))
2094 "Face used for tables." 2142 "Face used for tables."
2095 :group 'org-faces) 2143 :group 'org-faces)
2096 2144
2145(defface org-formula
2146 (org-compatible-face
2147 '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
2148 (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
2149 (((class color) (min-colors 8) (background light)) (:foreground "red"))
2150 (((class color) (min-colors 8) (background dark)) (:foreground "red"))
2151 (t (:bold t :italic t))))
2152 "Face for formulas."
2153 :group 'org-faces)
2154
2155(defface org-scheduled-today
2156 (org-compatible-face
2157 '((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen"))
2158 (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen"))
2159 (((class color) (min-colors 8)) (:foreground "green"))
2160 (t (:bold t :italic t))))
2161 "Face for items scheduled for a certain day."
2162 :group 'org-faces)
2163
2164(defface org-scheduled-previously
2165 (org-compatible-face
2166 '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
2167 (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
2168 (((class color) (min-colors 8) (background light)) (:foreground "red"))
2169 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
2170 (t (:bold t))))
2171 "Face for items scheduled previously, and not yet done."
2172 :group 'org-faces)
2173
2097(defface org-time-grid ;; font-lock-variable-name-face 2174(defface org-time-grid ;; font-lock-variable-name-face
2098 '((((type tty) (class color)) (:foreground "yellow" :weight light)) 2175 (org-compatible-face
2099 (((class color) (background light)) (:foreground "DarkGoldenrod")) 2176 '((((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod"))
2100 (((class color) (background dark)) (:foreground "LightGoldenrod")) 2177 (((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod"))
2101 (t (:bold t :italic t))) 2178 (((class color) (min-colors 8)) (:foreground "yellow" :weight light)))) ; FIXME: turn off???
2102 "Face used for time grids." 2179 "Face used for time grids."
2103 :group 'org-faces) 2180 :group 'org-faces)
2104 2181
2105(defvar org-level-faces 2182(defconst org-level-faces
2106 '(org-level-1 org-level-2 org-level-3 org-level-4 2183 '(org-level-1 org-level-2 org-level-3 org-level-4
2107 org-level-5 org-level-6 org-level-7 org-level-8 2184 org-level-5 org-level-6 org-level-7 org-level-8
2108 )) 2185 ))
2109(defvar org-n-levels (length org-level-faces)) 2186(defconst org-n-levels (length org-level-faces))
2110 2187
2188(defconst org-bold-re
2189 (if (featurep 'xemacs)
2190 "\\([ ]\\|^\\)\\(\\*\\(\\w[a-zA-Z0-9-_ ]*?\\w\\)\\*\\)\\([ ,.]\\|$\\)"
2191 "\\([ ]\\|^\\)\\(\\*\\(\\w[[:word:] -_]*?\\w\\)\\*\\)\\([ ,.]\\|$\\)")
2192 "Regular expression for bold emphasis.")
2193(defconst org-italic-re
2194 (if (featurep 'xemacs)
2195 "\\([ ]\\|^\\)\\(/\\(\\w[a-zA-Z0-9-_ ]*?\\w\\)/\\)\\([ ,.]\\|$\\)"
2196 "\\([ ]\\|^\\)\\(/\\(\\w[[:word:] -_]*?\\w\\)/\\)\\([ ,.]\\|$\\)")
2197 "Regular expression for italic emphasis.")
2198(defconst org-underline-re
2199 (if (featurep 'xemacs)
2200 "\\([ ]\\|^\\)\\(_\\(\\w[a-zA-Z0-9-_ ]*?\\w\\)_\\)\\([ ,.]\\|$\\)"
2201 "\\([ ]\\|^\\)\\(_\\(\\w[[:word:] -_]*?\\w\\)_\\)\\([ ,.]\\|$\\)")
2202 "Regular expression for underline emphasis.")
2111 2203
2112;; Variables for pre-computed regular expressions, all buffer local 2204;; Variables for pre-computed regular expressions, all buffer local
2113(defvar org-done-string nil 2205(defvar org-done-string nil
@@ -2400,6 +2492,10 @@ The following commands are available:
2400 s) 2492 s)
2401 (match-string-no-properties num string))) 2493 (match-string-no-properties num string)))
2402 2494
2495(defsubst org-no-properties (s)
2496 (remove-text-properties 0 (length s) org-rm-props s)
2497 s)
2498
2403(defun org-current-time () 2499(defun org-current-time ()
2404 "Current time, possibly rounded to `org-time-stamp-rounding-minutes'." 2500 "Current time, possibly rounded to `org-time-stamp-rounding-minutes'."
2405 (if (> org-time-stamp-rounding-minutes 0) 2501 (if (> org-time-stamp-rounding-minutes 0)
@@ -2530,7 +2626,9 @@ that will be added to PLIST. Returns the string that was modified."
2530(defun org-activate-bracket-links (limit) 2626(defun org-activate-bracket-links (limit)
2531 "Run through the buffer and add overlays to bracketed links." 2627 "Run through the buffer and add overlays to bracketed links."
2532 (if (re-search-forward org-bracket-link-regexp limit t) 2628 (if (re-search-forward org-bracket-link-regexp limit t)
2533 (let* ((help (concat "LINK: " (org-match-string-no-properties 1))) 2629 (let* ((help (concat "LINK: "
2630 (org-match-string-no-properties 1)))
2631 ;; FIXME: above we should remove the escapes.
2534 (ip (list 'invisible 'org-link 'intangible t 'rear-nonsticky t 2632 (ip (list 'invisible 'org-link 'intangible t 'rear-nonsticky t
2535 'keymap org-mouse-map 'mouse-face 'highlight 2633 'keymap org-mouse-map 'mouse-face 'highlight
2536 'help-echo help)) 2634 'help-echo help))
@@ -2678,20 +2776,23 @@ between words."
2678 (if (memq 'plain lk) '(org-activate-plain-links (0 'org-link t))) 2776 (if (memq 'plain lk) '(org-activate-plain-links (0 'org-link t)))
2679 (if (memq 'bracket lk) '(org-activate-bracket-links (0 'org-link t))) 2777 (if (memq 'bracket lk) '(org-activate-bracket-links (0 'org-link t)))
2680 (if (memq 'radio lk) '(org-activate-target-links (0 'org-link t))) 2778 (if (memq 'radio lk) '(org-activate-target-links (0 'org-link t)))
2681 (if (memq 'date lk) '(org-activate-dates (0 'org-link t))) 2779 (if (memq 'date lk) '(org-activate-dates (0 'org-date t)))
2682 (if (memq 'camel lk) '(org-activate-camels (0 'org-link t))) 2780 (if (memq 'camel lk) '(org-activate-camels (0 'org-link t)))
2683 (if (memq 'tag lk) '(org-activate-tags (1 'org-tag prepend))) 2781 (if (memq 'tag lk) '(org-activate-tags (1 'org-tag prepend)))
2684 (if org-table-limit-column-width 2782 (if org-table-limit-column-width
2685 '(org-hide-wide-columns (0 nil append))) 2783 '(org-hide-wide-columns (0 nil append)))
2686 (list (concat "^\\*+[ \t]*" org-not-done-regexp) 2784 (list (concat "^\\*+[ \t]*" org-not-done-regexp)
2687 '(1 'org-warning t)) 2785 '(1 'org-todo t))
2688 (list (concat "\\[#[A-Z]\\]") '(0 'org-special-keyword t)) 2786 (list (concat "\\[#[A-Z]\\]") '(0 'org-special-keyword t))
2689 (list (concat "\\<" org-deadline-string) '(0 'org-special-keyword t)) 2787 (list (concat "\\<" org-deadline-string) '(0 'org-special-keyword t))
2690 (list (concat "\\<" org-scheduled-string) '(0 'org-special-keyword t)) 2788 (list (concat "\\<" org-scheduled-string) '(0 'org-special-keyword t))
2691 (list (concat "\\<" org-closed-string) '(0 'org-special-keyword t)) 2789 (list (concat "\\<" org-closed-string) '(0 'org-special-keyword t))
2692 (if em '("\\(\\W\\|^\\)\\(\\*\\w+\\*\\)\\(\\W\\|$\\)" 2 'bold prepend)) 2790; (if em '("\\(\\W\\|^\\)\\(\\*\\w+\\*\\)\\(\\W\\|$\\)" 2 'bold prepend))
2693 (if em '("\\(\\W\\|^\\)\\(/\\w+/\\)\\(\\W\\|$\\)" 2 'italic prepend)) 2791; (if em '("\\(\\W\\|^\\)\\(/\\w+/\\)\\(\\W\\|$\\)" 2 'italic prepend))
2694 (if em '("\\(\\W\\|^\\)\\(_\\w+_\\)\\(\\W\\|$\\)" 2 'underline prepend)) 2792; (if em '("\\(\\W\\|^\\)\\(_\\w+_\\)\\(\\W\\|$\\)" 2 'underline prepend))
2793 (if em (list org-bold-re 2 ''bold 'prepend))
2794 (if em (list org-italic-re 2 ''italic 'prepend))
2795 (if em (list org-underline-re 2 ''underline 'prepend))
2695 (list (concat "^\\*+[ \t]*\\<\\(" org-comment-string 2796 (list (concat "^\\*+[ \t]*\\<\\(" org-comment-string
2696 "\\|" org-quote-string "\\)\\>") 2797 "\\|" org-quote-string "\\)\\>")
2697 '(1 'org-special-keyword t)) 2798 '(1 'org-special-keyword t))
@@ -2705,7 +2806,7 @@ between words."
2705 '("| *\\(:?=[^|\n]*\\)" (1 'org-formula t)) 2806 '("| *\\(:?=[^|\n]*\\)" (1 'org-formula t))
2706 '("^[ \t]*| *\\([#!$*_^]\\) *|" (1 'org-formula t)) 2807 '("^[ \t]*| *\\([#!$*_^]\\) *|" (1 'org-formula t))
2707 (if org-format-transports-properties-p 2808 (if org-format-transports-properties-p
2708 '("| *\\(<[0-9]+>\\) *|" (1 'org-formula t))) 2809 '("| *\\(<[0-9]+>\\) *" (1 'org-formula t)))
2709 ))) 2810 )))
2710 (setq org-font-lock-extra-keywords (delq nil org-font-lock-extra-keywords)) 2811 (setq org-font-lock-extra-keywords (delq nil org-font-lock-extra-keywords))
2711 ;; Now set the full font-lock-keywords 2812 ;; Now set the full font-lock-keywords
@@ -3070,10 +3171,14 @@ or nil."
3070 (error (outline-next-heading))) 3171 (error (outline-next-heading)))
3071 (prog1 (match-string 0) 3172 (prog1 (match-string 0)
3072 (funcall outline-level))))) 3173 (funcall outline-level)))))
3073 (unless (bolp) (newline)) 3174 (cond
3175 ((and (org-on-heading-p) (bolp)
3176 (save-excursion (backward-char 1) (not (org-invisible-p))))
3177 (open-line 1))
3178 ((bolp) nil)
3179 (t (newline)))
3074 (insert head) 3180 (insert head)
3075 (if (looking-at "[ \t]*") 3181 (just-one-space)
3076 (replace-match " "))
3077 (run-hooks 'org-insert-heading-hook)))) 3182 (run-hooks 'org-insert-heading-hook))))
3078 3183
3079(defun org-insert-item () 3184(defun org-insert-item ()
@@ -3086,8 +3191,20 @@ Return t when things worked, nil when we are not in an item."
3086 (org-at-item-p) 3191 (org-at-item-p)
3087 t) 3192 t)
3088 (error nil))) 3193 (error nil)))
3089 (unless (bolp) (newline)) 3194 (let* ((bul (match-string 0))
3090 (insert (match-string 0)) 3195 (eow (save-excursion (beginning-of-line 1) (looking-at "[ \t]*")
3196 (match-end 0)))
3197 (eowcol (save-excursion (goto-char eow) (current-column))))
3198 (cond
3199 ((and (org-at-item-p) (<= (point) eow))
3200 ;; before the bullet
3201 (beginning-of-line 1)
3202 (open-line 1))
3203 ((<= (point) eow)
3204 (beginning-of-line 1))
3205 (t (newline)))
3206 (insert bul)
3207 (just-one-space))
3091 (org-maybe-renumber-ordered-list) 3208 (org-maybe-renumber-ordered-list)
3092 t)) 3209 t))
3093 3210
@@ -5293,7 +5410,8 @@ for a keyword. A numeric prefix directly selects the Nth keyword in
5293 (completion-ignore-case t) 5410 (completion-ignore-case t)
5294 (org-select-this-todo-keyword 5411 (org-select-this-todo-keyword
5295 (if (stringp arg) arg 5412 (if (stringp arg) arg
5296 (and arg (integerp arg) (nth (1- arg) org-todo-keywords)))) 5413 (and arg (integerp arg) (> arg 0)
5414 (nth (1- arg) org-todo-keywords))))
5297 rtn rtnall files file pos) 5415 rtn rtnall files file pos)
5298 (when (equal arg '(4)) 5416 (when (equal arg '(4))
5299 (setq org-select-this-todo-keyword 5417 (setq org-select-this-todo-keyword
@@ -5893,6 +6011,7 @@ the documentation of `org-diary'."
5893 "Return the TODO information for agenda display." 6011 "Return the TODO information for agenda display."
5894 (let* ((props (list 'face nil 6012 (let* ((props (list 'face nil
5895 'done-face 'org-done 6013 'done-face 'org-done
6014 'org-not-done-regexp org-not-done-regexp
5896 'mouse-face 'highlight 6015 'mouse-face 'highlight
5897 'keymap org-agenda-keymap 6016 'keymap org-agenda-keymap
5898 'help-echo 6017 'help-echo
@@ -5933,6 +6052,7 @@ the documentation of `org-diary'."
5933(defun org-agenda-get-timestamps () 6052(defun org-agenda-get-timestamps ()
5934 "Return the date stamp information for agenda display." 6053 "Return the date stamp information for agenda display."
5935 (let* ((props (list 'face nil 6054 (let* ((props (list 'face nil
6055 'org-not-done-regexp org-not-done-regexp
5936 'mouse-face 'highlight 6056 'mouse-face 'highlight
5937 'keymap org-agenda-keymap 6057 'keymap org-agenda-keymap
5938 'help-echo 6058 'help-echo
@@ -5998,6 +6118,7 @@ the documentation of `org-diary'."
5998(defun org-agenda-get-closed () 6118(defun org-agenda-get-closed ()
5999 "Return the logged TODO entries for agenda display." 6119 "Return the logged TODO entries for agenda display."
6000 (let* ((props (list 'mouse-face 'highlight 6120 (let* ((props (list 'mouse-face 'highlight
6121 'org-not-done-regexp org-not-done-regexp
6001 'keymap org-agenda-keymap 6122 'keymap org-agenda-keymap
6002 'help-echo 6123 'help-echo
6003 (format "mouse-2 or RET jump to org file %s" 6124 (format "mouse-2 or RET jump to org file %s"
@@ -6049,6 +6170,7 @@ the documentation of `org-diary'."
6049 "Return the deadline information for agenda display." 6170 "Return the deadline information for agenda display."
6050 (let* ((wdays org-deadline-warning-days) 6171 (let* ((wdays org-deadline-warning-days)
6051 (props (list 'mouse-face 'highlight 6172 (props (list 'mouse-face 'highlight
6173 'org-not-done-regexp org-not-done-regexp
6052 'keymap org-agenda-keymap 6174 'keymap org-agenda-keymap
6053 'help-echo 6175 'help-echo
6054 (format "mouse-2 or RET jump to org file %s" 6176 (format "mouse-2 or RET jump to org file %s"
@@ -6104,6 +6226,7 @@ the documentation of `org-diary'."
6104(defun org-agenda-get-scheduled () 6226(defun org-agenda-get-scheduled ()
6105 "Return the scheduled information for agenda display." 6227 "Return the scheduled information for agenda display."
6106 (let* ((props (list 'face 'org-scheduled-previously 6228 (let* ((props (list 'face 'org-scheduled-previously
6229 'org-not-done-regexp org-not-done-regexp
6107 'undone-face 'org-scheduled-previously 6230 'undone-face 'org-scheduled-previously
6108 'done-face 'org-done 6231 'done-face 'org-done
6109 'mouse-face 'highlight 6232 'mouse-face 'highlight
@@ -6153,6 +6276,7 @@ the documentation of `org-diary'."
6153(defun org-agenda-get-blocks () 6276(defun org-agenda-get-blocks ()
6154 "Return the date-range information for agenda display." 6277 "Return the date-range information for agenda display."
6155 (let* ((props (list 'face nil 6278 (let* ((props (list 'face nil
6279 'org-not-done-regexp org-not-done-regexp
6156 'mouse-face 'highlight 6280 'mouse-face 'highlight
6157 'keymap org-agenda-keymap 6281 'keymap org-agenda-keymap
6158 'help-echo 6282 'help-echo
@@ -6251,7 +6375,6 @@ only the correctly processes TXT should be returned - this is used by
6251 (file-name-nondirectory buffer-file-name)) 6375 (file-name-nondirectory buffer-file-name))
6252 ""))) 6376 "")))
6253 (tag (if tags (nth (1- (length tags)) tags) "")) 6377 (tag (if tags (nth (1- (length tags)) tags) ""))
6254 ;;(tag (or (nth (1- (or (length tags) 0)) tags) "")) FIXME: rm
6255 time ;; needed for the eval of the prefix format 6378 time ;; needed for the eval of the prefix format
6256 (ts (if dotime (concat (if (stringp dotime) dotime "") txt))) 6379 (ts (if dotime (concat (if (stringp dotime) dotime "") txt)))
6257 (time-of-day (and dotime (org-get-time-of-day ts))) 6380 (time-of-day (and dotime (org-get-time-of-day ts)))
@@ -6389,8 +6512,25 @@ HH:MM."
6389 6512
6390(defun org-finalize-agenda-entries (list) 6513(defun org-finalize-agenda-entries (list)
6391 "Sort and concatenate the agenda items." 6514 "Sort and concatenate the agenda items."
6515 (setq list (mapcar 'org-agenda-highlight-todo list))
6392 (mapconcat 'identity (sort list 'org-entries-lessp) "\n")) 6516 (mapconcat 'identity (sort list 'org-entries-lessp) "\n"))
6393 6517
6518(defun org-agenda-highlight-todo (x)
6519 (let (re)
6520 (if (eq x 'line)
6521 (save-excursion
6522 (beginning-of-line 1)
6523 (setq re (get-text-property (point) 'org-not-done-regexp))
6524 (goto-char (+ (point) (get-text-property (point) 'prefix-length)))
6525 (and (looking-at (concat "[ \t]*" re))
6526 (add-text-properties (match-beginning 0) (match-end 0)
6527 '(face org-todo))))
6528 (setq re (get-text-property 0 'org-not-done-regexp x))
6529 (and re (string-match re x)
6530 (add-text-properties (match-beginning 0) (match-end 0)
6531 '(face org-todo) x))
6532 x)))
6533
6394(defsubst org-cmp-priority (a b) 6534(defsubst org-cmp-priority (a b)
6395 "Compare the priorities of string A and B." 6535 "Compare the priorities of string A and B."
6396 (let ((pa (or (get-text-property 1 'priority a) 0)) 6536 (let ((pa (or (get-text-property 1 'priority a) 0))
@@ -6541,7 +6681,7 @@ the same tree node, and the headline of the tree node in the Org-mode file."
6541 (and (outline-next-heading) 6681 (and (outline-next-heading)
6542 (org-flag-heading nil))) ; show the next heading 6682 (org-flag-heading nil))) ; show the next heading
6543 (org-todo arg) 6683 (org-todo arg)
6544 (forward-char 1) 6684 (and (bolp) (forward-char 1))
6545 (setq newhead (org-get-heading)) 6685 (setq newhead (org-get-heading))
6546 (save-excursion 6686 (save-excursion
6547 (org-back-to-heading) 6687 (org-back-to-heading)
@@ -6581,12 +6721,13 @@ the new TODO state."
6581 (replace-match new t t) 6721 (replace-match new t t)
6582 (beginning-of-line 1) 6722 (beginning-of-line 1)
6583 (add-text-properties (point-at-bol) (point-at-eol) props) 6723 (add-text-properties (point-at-bol) (point-at-eol) props)
6584 (if fixface 6724 (when fixface
6585 (add-text-properties 6725 (add-text-properties
6586 (point-at-bol) (point-at-eol) 6726 (point-at-bol) (point-at-eol)
6587 (list 'face 6727 (list 'face
6588 (if org-last-todo-state-is-todo 6728 (if org-last-todo-state-is-todo
6589 undone-face done-face)))) 6729 undone-face done-face)))
6730 (org-agenda-highlight-todo 'line))
6590 (beginning-of-line 1)) 6731 (beginning-of-line 1))
6591 (error "Line update did not work"))) 6732 (error "Line update did not work")))
6592 (beginning-of-line 0))))) 6733 (beginning-of-line 0)))))
@@ -7306,7 +7447,10 @@ optional argument IN-EMACS is non-nil, Emacs will visit the file."
7306 (format "Execute \"%s\" in shell? " 7447 (format "Execute \"%s\" in shell? "
7307 (org-add-props cmd nil 7448 (org-add-props cmd nil
7308 'face 'org-warning)))) 7449 'face 'org-warning))))
7309 (shell-command cmd) 7450 (progn
7451 (message "Executing %s..." cmd)
7452 (shell-command cmd)
7453 (message "Executing %s...done" cmd))
7310 (error "Abort")))) 7454 (error "Abort"))))
7311 7455
7312 (t 7456 (t
@@ -7760,7 +7904,11 @@ If the file does not exist, an error is thrown."
7760 (setq cmd 'emacs)))) 7904 (setq cmd 'emacs))))
7761 (cond 7905 (cond
7762 ((and (stringp cmd) (not (string-match "^\\s-*$" cmd))) 7906 ((and (stringp cmd) (not (string-match "^\\s-*$" cmd)))
7763 (setq cmd (format cmd (concat "\"" file "\""))) 7907; (setq cmd (format cmd (concat "\"" file "\"")))
7908 ;; FIXME: normalize use of quotes
7909 (if (string-match "['\"]%s['\"]" cmd)
7910 (setq cmd (replace-match "'%s'" t t cmd)))
7911 (setq cmd (format cmd file))
7764 (save-window-excursion 7912 (save-window-excursion
7765 (shell-command (concat cmd " &")))) 7913 (shell-command (concat cmd " &"))))
7766 ((or (stringp cmd) 7914 ((or (stringp cmd)
@@ -8154,12 +8302,16 @@ is in the current directory or below."
8154 (complete-file 8302 (complete-file
8155 ;; Completing read for file names. 8303 ;; Completing read for file names.
8156 (setq file (read-file-name "File: ")) 8304 (setq file (read-file-name "File: "))
8157 (let ((pwd (file-name-as-directory (expand-file-name ".")))) 8305 (let ((pwd (file-name-as-directory (expand-file-name ".")))
8306 (pwd1 (file-name-as-directory (abbreviate-file-name
8307 (expand-file-name ".")))))
8158 (cond 8308 (cond
8159 ((equal complete-file '(16)) 8309 ((equal complete-file '(16))
8160 (setq link (org-make-link 8310 (setq link (org-make-link
8161 "file:" 8311 "file:"
8162 (abbreviate-file-name (expand-file-name file))))) 8312 (abbreviate-file-name (expand-file-name file)))))
8313 ((string-match (concat "^" (regexp-quote pwd1) "\\(.+\\)") file)
8314 (setq link (org-make-link "file:" (match-string 1 file))))
8163 ((string-match (concat "^" (regexp-quote pwd) "\\(.+\\)") 8315 ((string-match (concat "^" (regexp-quote pwd) "\\(.+\\)")
8164 (expand-file-name file)) 8316 (expand-file-name file))
8165 (setq link (org-make-link 8317 (setq link (org-make-link
@@ -8665,7 +8817,7 @@ This is being used to correctly align a single field after TAB or RET.")
8665 (> (org-string-width xx) fmax)) 8817 (> (org-string-width xx) fmax))
8666 (org-add-props xx nil 8818 (org-add-props xx nil
8667 'help-echo 8819 'help-echo
8668 (concat "Clipped table field, use C-c ` to edit. Full value is:\n" (copy-sequence xx))) 8820 (concat "Clipped table field, use C-c ` to edit. Full value is:\n" (org-no-properties (copy-sequence xx))))
8669 (setq f1 (min fmax (or (string-match org-bracket-link-regexp xx) fmax))) 8821 (setq f1 (min fmax (or (string-match org-bracket-link-regexp xx) fmax)))
8670 (unless (> f1 1) 8822 (unless (> f1 1)
8671 (error "Cannot narrow field starting with wide link \"%s\"" 8823 (error "Cannot narrow field starting with wide link \"%s\""
@@ -11752,21 +11904,35 @@ headlines. The default is 3. Lower levels will become bulleted lists."
11752 ;; FILE link 11904 ;; FILE link
11753 (let* ((filename path) 11905 (let* ((filename path)
11754 (abs-p (file-name-absolute-p filename)) 11906 (abs-p (file-name-absolute-p filename))
11755 (thefile (if abs-p (expand-file-name filename) filename)) 11907 thefile file-is-image-p search)
11756 (thefile (save-match-data 11908 (save-match-data
11757 (if (string-match ":[0-9]+$" thefile) 11909 (if (string-match "::\\(.*\\)" filename)
11758 (replace-match "" t t thefile) 11910 (setq search (match-string 1 filename)
11759 thefile))) 11911 filename (replace-match "" nil nil filename)))
11760 (file-is-image-p 11912 (setq file-is-image-p
11761 (save-match-data 11913 (string-match (org-image-file-name-regexp) filename))
11762 (string-match (org-image-file-name-regexp) thefile)))) 11914 (setq thefile (if abs-p (expand-file-name filename) filename))
11915 (when (and org-export-html-link-org-files-as-html
11916 (string-match "\\.org$" thefile))
11917 (setq thefile (concat (substring thefile 0
11918 (match-beginning 0))
11919 ".html"))
11920 (if (and search
11921 ;; make sure this is can be used as target search
11922 (not (string-match "^[0-9]*$" search))
11923 (not (string-match "^\\*" search))
11924 (not (string-match "^/.*/$" search)))
11925 (setq thefile (concat thefile "#"
11926 (org-solidify-link-text
11927 (org-link-unescape search)))))))
11763 (setq rpl (if (and org-export-html-inline-images 11928 (setq rpl (if (and org-export-html-inline-images
11764 file-is-image-p) 11929 file-is-image-p)
11765 (concat "<img src=\"" thefile "\"/>") 11930 (concat "<img src=\"" thefile "\"/>")
11766 (concat "<a href=\"" thefile "\">" desc "</a>"))))) 11931 (concat "<a href=\"" thefile "\">" desc "</a>")))))
11767 ((member type '("bbdb" "vm" "wl" "mhe" "rmail" "gnus" "shell")) 11932 ((member type '("bbdb" "vm" "wl" "mhe" "rmail" "gnus" "shell"))
11768 (setq rpl (concat "<i>&lt;" type ":" path "&gt;</i>")))) 11933 (setq rpl (concat "<i>&lt;" type ":"
11769 ;; FIXME: We get to see the escaped links!!!!! 11934 (save-match-data (org-link-unescape path))
11935 "&gt;</i>"))))
11770 (setq line (replace-match rpl t t line) 11936 (setq line (replace-match rpl t t line)
11771 start (+ start (length rpl)))) 11937 start (+ start (length rpl))))
11772 ;; TODO items 11938 ;; TODO items
@@ -12111,15 +12277,24 @@ stacked delimiters is N. Escaping delimiters is not possible."
12111 (setq string (replace-match (match-string 1 string) t t string)))) 12277 (setq string (replace-match (match-string 1 string) t t string))))
12112 string) 12278 string)
12113 12279
12280;(defun org-export-html-convert-emphasize (string)
12281; (let (c (s 0))
12282; (while (string-match "\\(\\W\\|^\\)\\([*/_]\\)\\(\\w+\\)\\2\\(\\W\\|$\\)" string s)
12283; (setq c (cdr (assoc (match-string 2 string)
12284; '(("*" . "b") ("/" . "i") ("_" . "u"))))
12285; s (+ (match-end 0) 3)
12286; string (replace-match
12287; (concat "\\1<" c ">\\3</" c ">\\4") t nil string)))
12288; string))
12289
12114(defun org-export-html-convert-emphasize (string) 12290(defun org-export-html-convert-emphasize (string)
12115 (let (c (s 0)) 12291 (while (string-match org-italic-re string)
12116 (while (string-match "\\(\\W\\|^\\)\\([*/_]\\)\\(\\w+\\)\\2\\(\\W\\|$\\)" string s) 12292 (setq string (replace-match "\\1<i>\\3</i>\\4" t nil string)))
12117 (setq c (cdr (assoc (match-string 2 string) 12293 (while (string-match org-bold-re string)
12118 '(("*" . "b") ("/" . "i") ("_" . "u")))) 12294 (setq string (replace-match "\\1<b>\\3</b>\\4" t nil string)))
12119 s (+ (match-end 0) 3) 12295 (while (string-match org-underline-re string)
12120 string (replace-match 12296 (setq string (replace-match "\\1<u>\\3</u>\\4" t nil string)))
12121 (concat "\\1<" c ">\\3</" c ">\\4") t nil string))) 12297 string)
12122 string))
12123 12298
12124(defun org-parse-key-lines () 12299(defun org-parse-key-lines ()
12125 "Find the special key lines with the information for exporters." 12300 "Find the special key lines with the information for exporters."
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 97153e31a25..8ca7c3026e8 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -594,20 +594,24 @@ An alternative value is \" . \", if you use a font with a narrow period."
594 '(face subscript display (raise -0.3)) 594 '(face subscript display (raise -0.3))
595 '(face superscript display (raise +0.3))))) 595 '(face superscript display (raise +0.3)))))
596 596
597(defun tex-font-lock-match-suscript (limit)
598 "Match subscript and superscript patterns up to LIMIT."
599 (when (re-search-forward "[_^] *\\([^\n\\{}]\\|\
600\\\\\\([a-zA-Z@]+\\|[^ \t\n]\\)\\|{[^\\{]*}\\|\\({\\)\\)" limit t)
601 (when (match-end 3)
602 (let ((beg (match-beginning 3))
603 (end (save-restriction
604 (narrow-to-region (point-min) limit)
605 (condition-case nil (scan-lists (point) 1 1) (error nil)))))
606 (store-match-data (if end
607 (list (match-beginning 0) end beg end)
608 (list beg beg beg beg)))))
609 t))
610
597(defconst tex-font-lock-keywords-3 611(defconst tex-font-lock-keywords-3
598 (append tex-font-lock-keywords-2 612 (append tex-font-lock-keywords-2
599 (eval-when-compile 613 '((tex-font-lock-match-suscript
600 (let ((general "\\([a-zA-Z@]+\\|[^ \t\n]\\)") 614 (1 (tex-font-lock-suscript (match-beginning 0)) append))))
601 (slash "\\\\")
602 ;; This is not the same regexp as before: it has a `+' removed.
603 ;; The + makes the matching faster in the above cases (where we can
604 ;; exit as soon as the match fails) but would make this matching
605 ;; degenerate to nasty complexity (because we try to match the
606 ;; closing brace, which forces trying all matching combinations).
607 (arg "{\\(?:[^{}\\]\\|\\\\.\\|{[^}]*}\\)*"))
608 `((,(concat "[_^] *\\([^\n\\{}#]\\|" slash general "\\|#[0-9]\\|" arg "}\\)")
609 (1 (tex-font-lock-suscript (match-beginning 0))
610 append))))))
611 "Experimental expressions to highlight in TeX modes.") 615 "Experimental expressions to highlight in TeX modes.")
612 616
613(defvar tex-font-lock-keywords tex-font-lock-keywords-1 617(defvar tex-font-lock-keywords tex-font-lock-keywords-1
diff --git a/lisp/tooltip.el b/lisp/tooltip.el
index 8dc811c09e6..cacd6f59670 100644
--- a/lisp/tooltip.el
+++ b/lisp/tooltip.el
@@ -47,11 +47,15 @@
47;; would be accompanied by a full redisplay. 47;; would be accompanied by a full redisplay.
48 48
49(define-minor-mode tooltip-mode 49(define-minor-mode tooltip-mode
50 "Toggle Tooltip display. 50 "Toggle Tooltip mode.
51With ARG, turn tooltip mode on if and only if ARG is positive. 51With ARG, turn Tooltip mode on if and only if ARG is positive.
52When this minor mode is enabled, Emacs displays help text 52When this minor mode is enabled, Emacs displays help text
53in a pop-up window on mouse-over. When it is disabled, 53in a pop-up window for buttons and menu items that you put the mouse on.
54Emacs displays the help text in the echo area instead." 54\(However, if `tooltip-use-echo-area' is non-nil, this and
55all pop-up help appears in the echo area.)
56
57When Tooltip mode is disabled, Emacs displays one line of
58the help text in the echo area, and does not make a pop-up window."
55 :global t 59 :global t
56 :init-value (not (or noninteractive 60 :init-value (not (or noninteractive
57 emacs-basic-display 61 emacs-basic-display
@@ -142,7 +146,9 @@ position to pop up the tooltip."
142 :group 'basic-faces) 146 :group 'basic-faces)
143 147
144(defcustom tooltip-use-echo-area nil 148(defcustom tooltip-use-echo-area nil
145 "Use the echo area instead of tooltip frames for help and GUD tooltips." 149 "Use the echo area instead of tooltip frames for help and GUD tooltips.
150To display multi-line help text in the echo area, set this to t
151and enable `tooltip-mode'."
146 :type 'boolean 152 :type 'boolean
147 :group 'tooltip) 153 :group 'tooltip)
148 154
diff --git a/lispref/ChangeLog b/lispref/ChangeLog
index c3591cbb64a..48205488ef8 100644
--- a/lispref/ChangeLog
+++ b/lispref/ChangeLog
@@ -1,3 +1,19 @@
12006-04-18 Richard Stallman <rms@gnu.org>
2
3 * tips.texi (Coding Conventions): Explain when the package's
4 prefix should appear later on (not at the start of the name).
5
6 * searching.texi (String Search): Clarify effect of NOERROR.
7
8 * modes.texi (Imenu): Clarify what special items do.
9
10 * hooks.texi (Standard Hooks): Delete text about old hook names.
11
122006-04-17 Romain Francoise <romain@orebokech.com>
13
14 * variables.texi (Local Variables): Update the default value of
15 `max-specpdl-size'.
16
12006-04-15 Michael Olson <mwolson@gnu.org> 172006-04-15 Michael Olson <mwolson@gnu.org>
2 18
3 * processes.texi (Transaction Queues): Mention the new optional 19 * processes.texi (Transaction Queues): Mention the new optional
@@ -59,8 +75,7 @@
59 75
602006-03-19 Alan Mackenzie <acm@muc.de> 762006-03-19 Alan Mackenzie <acm@muc.de>
61 77
62 * text.texi (Special Properties): Clarify the definition of 78 * text.texi (Special Properties): Clarify `fontified' property.
63 'fontified.
64 79
652006-03-16 Richard Stallman <rms@gnu.org> 802006-03-16 Richard Stallman <rms@gnu.org>
66 81
diff --git a/lispref/hooks.texi b/lispref/hooks.texi
index 2ba06a2b19a..562d728339e 100644
--- a/lispref/hooks.texi
+++ b/lispref/hooks.texi
@@ -31,11 +31,6 @@ these functions are called in a special way (they are passed arguments,
31or their values are used). The variables whose names end in 31or their values are used). The variables whose names end in
32@samp{-function} have single functions as their values. 32@samp{-function} have single functions as their values.
33 33
34(In older Emacs versions, some normal hooks had names ending in
35@samp{-hooks} or @samp{-functions}, and some abnormal hooks had names
36ending in @samp{-hook}. We have renamed all of these to conform to
37the above conventions.)
38
39@c We need to xref to where each hook is documented or else document 34@c We need to xref to where each hook is documented or else document
40@c it here. 35@c it here.
41 36
diff --git a/lispref/modes.texi b/lispref/modes.texi
index fc1953d24d9..b33424a58be 100644
--- a/lispref/modes.texi
+++ b/lispref/modes.texi
@@ -2174,10 +2174,9 @@ An element can also look like this:
2174(@var{menu-title} @var{regexp} @var{index} @var{function} @var{arguments}@dots{}) 2174(@var{menu-title} @var{regexp} @var{index} @var{function} @var{arguments}@dots{})
2175@end example 2175@end example
2176 2176
2177Like in the previous case, each match for this element creates an 2177Each match for this element creates an index item, and when the index
2178index item. However, if this index item is selected by the user, it 2178item is selected by the user, it calls @var{function} with arguments
2179calls @var{function} with arguments consisting of the item name, the 2179consisting of the item name, the buffer position, and @var{arguments}.
2180buffer position, and @var{arguments}.
2181 2180
2182For Emacs Lisp mode, @code{imenu-generic-expression} could look like 2181For Emacs Lisp mode, @code{imenu-generic-expression} could look like
2183this: 2182this:
diff --git a/lispref/searching.texi b/lispref/searching.texi
index 9b80fdfd930..644376f5cdd 100644
--- a/lispref/searching.texi
+++ b/lispref/searching.texi
@@ -86,6 +86,10 @@ upper bound and returns @code{nil}. (It would be more consistent now to
86return the new position of point in that case, but some existing 86return the new position of point in that case, but some existing
87programs may depend on a value of @code{nil}.) 87programs may depend on a value of @code{nil}.)
88 88
89The argument @var{noerror} only affects valid searches which fail to
90find a match. Invalid arguments cause errors regardless of
91@var{noerror}.
92
89If @var{repeat} is supplied (it must be a positive number), then the 93If @var{repeat} is supplied (it must be a positive number), then the
90search is repeated that many times (each time starting at the end of the 94search is repeated that many times (each time starting at the end of the
91previous time's match). If these successive searches succeed, the 95previous time's match). If these successive searches succeed, the
diff --git a/lispref/tips.texi b/lispref/tips.texi
index 8b033139275..889ac3e6a6d 100644
--- a/lispref/tips.texi
+++ b/lispref/tips.texi
@@ -56,9 +56,13 @@ distinguish your program from other Lisp programs.@footnote{The
56benefits of a Common Lisp-style package system are considered not to 56benefits of a Common Lisp-style package system are considered not to
57outweigh the costs.} Then take care to begin the names of all global 57outweigh the costs.} Then take care to begin the names of all global
58variables, constants, and functions in your program with the chosen 58variables, constants, and functions in your program with the chosen
59prefix. This helps avoid name conflicts. (Occasionally, for a command 59prefix. This helps avoid name conflicts.
60name intended for users to use, it is cleaner if some words come 60
61before the package name prefix.) 61Occasionally, for a command name intended for users to use, it is more
62convenient if some words come before the package's name prefix. And
63constructs that define functions, variables, etc., work better if they
64start with @samp{defun} or @samp{defvar}, so put the name prefix later
65on in the name.
62 66
63This recommendation applies even to names for traditional Lisp 67This recommendation applies even to names for traditional Lisp
64primitives that are not primitives in Emacs Lisp---such as 68primitives that are not primitives in Emacs Lisp---such as
diff --git a/lispref/variables.texi b/lispref/variables.texi
index f3e81c3ddd3..d97848549c0 100644
--- a/lispref/variables.texi
+++ b/lispref/variables.texi
@@ -276,7 +276,7 @@ that Lisp avoids infinite recursion on an ill-defined function.
276@code{max-lisp-eval-depth} provides another limit on depth of nesting. 276@code{max-lisp-eval-depth} provides another limit on depth of nesting.
277@xref{Definition of max-lisp-eval-depth,, Eval}. 277@xref{Definition of max-lisp-eval-depth,, Eval}.
278 278
279The default value is 600. Entry to the Lisp debugger increases the 279The default value is 1000. Entry to the Lisp debugger increases the
280value, if there is little room left, to make sure the debugger itself 280value, if there is little room left, to make sure the debugger itself
281has room to execute. 281has room to execute.
282@end defvar 282@end defvar
diff --git a/make-dist b/make-dist
index 592d3ca5e96..2ad0540e578 100755
--- a/make-dist
+++ b/make-dist
@@ -6,7 +6,7 @@
6#### be distributed. This means that if you add a file with an odd name, 6#### be distributed. This means that if you add a file with an odd name,
7#### you should make sure that this script will include it. 7#### you should make sure that this script will include it.
8 8
9# Copyright (C) 1995, 1997, 1998, 2000, 2001, 2002, 2005 9# Copyright (C) 1995, 1997, 1998, 2000, 2001, 2002, 2005, 2006
10# Free Software Foundation, Inc. 10# Free Software Foundation, Inc.
11# 11#
12# This file is part of GNU Emacs. 12# This file is part of GNU Emacs.
diff --git a/man/ChangeLog b/man/ChangeLog
index afb891b18b8..100920e311a 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,3 +1,52 @@
12006-04-20 Reiner Steib <Reiner.Steib@gmx.de>
2
3 * gnus.texi (Spam Statistics Package): Fix typo in @pxref.
4 (Splitting mail using spam-stat): Fix @xref.
5
62006-04-20 Chong Yidong <cyd@stupidchicken.com>
7
8 * gnus.texi (Spam Package): Major revision of the text. Previouly
9 this node was "Filtering Spam Using The Spam ELisp Package".
10
112006-04-20 Carsten Dominik <dominik@science.uva.nl>
12
13 * org.texi: (Time stamps): Better explanation of the purpose of
14 different time stamps.
15 (Structure editing, Plain lists): More details on how new items
16 and headings are inserted.
17
182006-04-18 J.D. Smith <jdsmith@as.arizona.edu>
19
20 * misc.texi (Shell Ring): Added notes on saved input when
21 navigating off the end of the history list.
22
232006-04-18 Chong Yidong <cyd@mit.edu>
24
25 * misc.texi (Shell Options): Correct default value of
26 comint-scroll-show-maximum-output.
27
282006-04-18 Carsten Dominik <dominik@science.uva.nl>
29
30 * org.texi: (Formula syntax): Fixed link to Calc Manual.
31
322006-04-17 Reiner Steib <Reiner.Steib@gmx.de>
33
34 * gnus.texi (Emacsen): Don't support Emacs 20.7 and XEmacs 21.1.
35
362006-04-17 Bill Wohler <wohler@newt.com>
37
38 * mh-e.texi (Folders): Updated mh-before-quit-hook and
39 mh-quit-hook example with code that removes the buffers rather
40 than just bury them.
41
422006-04-18 Nick Roberts <nickrob@snap.net.nz>
43
44 * building.texi (Watch Expressions): Update.
45
462006-04-17 Michael Albinus <michael.albinus@gmx.de>
47
48 Sync with Tramp 2.0.53.
49
12006-04-13 Carsten Dominik <dominik@science.uva.nl> 502006-04-13 Carsten Dominik <dominik@science.uva.nl>
2 51
3 * org.texi: (Updating settings): New section. 52 * org.texi: (Updating settings): New section.
diff --git a/man/building.texi b/man/building.texi
index ec44b828022..cc5e667f1c3 100644
--- a/man/building.texi
+++ b/man/building.texi
@@ -929,20 +929,26 @@ the new frame.
929@cindex Watching expressions in GDB 929@cindex Watching expressions in GDB
930 930
931@findex gud-watch 931@findex gud-watch
932@kindex C-x C-a C-w @r{(GUD)}
932 If you want to see how a variable changes each time your program 933 If you want to see how a variable changes each time your program
933stops, move point into the variable name and click on the watch icon 934stops, move point into the variable name and click on the watch icon
934in the tool bar (@code{gud-watch}). 935in the tool bar (@code{gud-watch}) or type @kbd{C-x C-a C-w}. If you
936specify a prefix argument, you can enter the variable name in the
937minibuffer.
935 938
936 Each watch expression is displayed in the speedbar. Complex data 939 Each watch expression is displayed in the speedbar. Complex data
937types, such as arrays, structures and unions are represented in a tree 940types, such as arrays, structures and unions are represented in a tree
938format. Leaves and simple data types show the name of the expression 941format. Leaves and simple data types show the name of the expression
939and its value and, when the speedbar frame is selected, display the 942and its value and, when the speedbar frame is selected, display the
940type as a tooltip. Higher levels show the name, type and address 943type as a tooltip. Higher levels show the name, type and address
941value for pointers and just the name and type otherwise. 944value for pointers and just the name and type otherwise. Root expressions
945also display the frame address as a tooltip to help identify the frame
946in which they were defined.
942 947
943 To expand or contract a complex data type, click @kbd{Mouse-2} 948 To expand or contract a complex data type, click @kbd{Mouse-2}
944on the tag to the left of the expression. 949on the tag to the left of the expression.
945 950
951@kindex D @r{(GDB speedbar)}
946@findex gdb-var-delete 952@findex gdb-var-delete
947 To delete a complex watch expression, move point to the root 953 To delete a complex watch expression, move point to the root
948expression in the speedbar and type @kbd{D} (@code{gdb-var-delete}). 954expression in the speedbar and type @kbd{D} (@code{gdb-var-delete}).
@@ -965,9 +971,8 @@ edit its value.
965@vindex gdb-use-colon-colon-notation 971@vindex gdb-use-colon-colon-notation
966 If the variable @code{gdb-use-colon-colon-notation} is 972 If the variable @code{gdb-use-colon-colon-notation} is
967non-@code{nil}, Emacs uses the @samp{@var{function}::@var{variable}} 973non-@code{nil}, Emacs uses the @samp{@var{function}::@var{variable}}
968format to display variables in the speedbar. Since this does not work 974format. This allows the user to display watch expressions which share
969for variables defined in compound statements, the default value is 975the same variable name. The default value is @code{nil}.
970@code{nil}.
971 976
972@vindex gdb-speedbar-auto-raise 977@vindex gdb-speedbar-auto-raise
973To automatically raise the speedbar every time the display of watch 978To automatically raise the speedbar every time the display of watch
diff --git a/man/gnus.texi b/man/gnus.texi
index c5857f40ab4..2f1a7322dc0 100644
--- a/man/gnus.texi
+++ b/man/gnus.texi
@@ -799,7 +799,8 @@ Various
799* Moderation:: What to do if you're a moderator. 799* Moderation:: What to do if you're a moderator.
800* Image Enhancements:: Modern versions of Emacs/XEmacs can display images. 800* Image Enhancements:: Modern versions of Emacs/XEmacs can display images.
801* Fuzzy Matching:: What's the big fuzz? 801* Fuzzy Matching:: What's the big fuzz?
802* Thwarting Email Spam:: A how-to on avoiding unsolicited commercial email. 802* Thwarting Email Spam:: Simple ways to avoid unsolicited commercial email.
803* Spam Package:: A package for filtering and processing spam.
803* Other modes:: Interaction with other modes. 804* Other modes:: Interaction with other modes.
804* Various Various:: Things that are really various. 805* Various Various:: Things that are really various.
805 806
@@ -818,7 +819,8 @@ Image Enhancements
818 819
819* X-Face:: Display a funky, teensy black-and-white image. 820* X-Face:: Display a funky, teensy black-and-white image.
820* Face:: Display a funkier, teensier colored image. 821* Face:: Display a funkier, teensier colored image.
821* Smileys:: Show all those happy faces the way they were meant to be shown. 822* Smileys:: Show all those happy faces the way they were
823 meant to be shown.
822* Picons:: How to display pictures of what you're reading. 824* Picons:: How to display pictures of what you're reading.
823* XVarious:: Other XEmacsy Gnusey variables. 825* XVarious:: Other XEmacsy Gnusey variables.
824 826
@@ -828,28 +830,19 @@ Thwarting Email Spam
828* Anti-Spam Basics:: Simple steps to reduce the amount of spam. 830* Anti-Spam Basics:: Simple steps to reduce the amount of spam.
829* SpamAssassin:: How to use external anti-spam tools. 831* SpamAssassin:: How to use external anti-spam tools.
830* Hashcash:: Reduce spam by burning CPU time. 832* Hashcash:: Reduce spam by burning CPU time.
831* Filtering Spam Using The Spam ELisp Package::
832* Filtering Spam Using Statistics with spam-stat::
833 833
834Filtering Spam Using The Spam ELisp Package 834Spam Package
835 835
836* Spam ELisp Package Sequence of Events:: 836* Spam Package Introduction::
837* Spam ELisp Package Filtering of Incoming Mail:: 837* Filtering Incoming Mail::
838* Spam ELisp Package Global Variables:: 838* Detecting Spam in Groups::
839* Spam ELisp Package Configuration Examples:: 839* Spam and Ham Processors::
840* Blacklists and Whitelists:: 840* Spam Package Configuration Examples::
841* BBDB Whitelists:: 841* Spam Back Ends::
842* Gmane Spam Reporting:: 842* Extending the Spam package::
843* Anti-spam Hashcash Payments:: 843* Spam Statistics Package::
844* Blackholes::
845* Regular Expressions Header Matching::
846* Bogofilter::
847* ifile spam filtering::
848* spam-stat spam filtering::
849* SpamOracle::
850* Extending the Spam ELisp package::
851 844
852Filtering Spam Using Statistics with spam-stat 845Spam Statistics Package
853 846
854* Creating a spam-stat dictionary:: 847* Creating a spam-stat dictionary::
855* Splitting mail using spam-stat:: 848* Splitting mail using spam-stat::
@@ -20797,7 +20790,8 @@ four days, Gnus will decay the scores four times, for instance.
20797* Fetching a Group:: Starting Gnus just to read a group. 20790* Fetching a Group:: Starting Gnus just to read a group.
20798* Image Enhancements:: Modern versions of Emacs/XEmacs can display images. 20791* Image Enhancements:: Modern versions of Emacs/XEmacs can display images.
20799* Fuzzy Matching:: What's the big fuzz? 20792* Fuzzy Matching:: What's the big fuzz?
20800* Thwarting Email Spam:: A how-to on avoiding unsolicited commercial email. 20793* Thwarting Email Spam:: Simple ways to avoid unsolicited commercial email.
20794* Spam Package:: A package for filtering and processing spam.
20801* Other modes:: Interaction with other modes. 20795* Other modes:: Interaction with other modes.
20802* Various Various:: Things that are really various. 20796* Various Various:: Things that are really various.
20803@end menu 20797@end menu
@@ -22479,8 +22473,6 @@ This is annoying. Here's what you can do about it.
22479* Anti-Spam Basics:: Simple steps to reduce the amount of spam. 22473* Anti-Spam Basics:: Simple steps to reduce the amount of spam.
22480* SpamAssassin:: How to use external anti-spam tools. 22474* SpamAssassin:: How to use external anti-spam tools.
22481* Hashcash:: Reduce spam by burning CPU time. 22475* Hashcash:: Reduce spam by burning CPU time.
22482* Filtering Spam Using The Spam ELisp Package::
22483* Filtering Spam Using Statistics with spam-stat::
22484@end menu 22476@end menu
22485 22477
22486@node The problem of spam 22478@node The problem of spam
@@ -22796,41 +22788,107 @@ hashcash cookies, it is expected that this is performed by your hand
22796customized mail filtering scripts. Improvements in this area would be 22788customized mail filtering scripts. Improvements in this area would be
22797a useful contribution, however. 22789a useful contribution, however.
22798 22790
22799@node Filtering Spam Using The Spam ELisp Package 22791@node Spam Package
22800@subsection Filtering Spam Using The Spam ELisp Package 22792@section Spam Package
22793@cindex spam filtering
22794@cindex spam
22795
22796The Spam package provides Gnus with a centralized mechanism for
22797detecting and filtering spam. It filters new mail, and processes
22798messages according to whether they are spam or ham. (@dfn{Ham} is the
22799name used throughout this manual to indicate non-spam messages.)
22800
22801@menu
22802* Spam Package Introduction::
22803* Filtering Incoming Mail::
22804* Detecting Spam in Groups::
22805* Spam and Ham Processors::
22806* Spam Package Configuration Examples::
22807* Spam Back Ends::
22808* Extending the Spam package::
22809* Spam Statistics Package::
22810@end menu
22811
22812@node Spam Package Introduction
22813@subsection Spam Package Introduction
22801@cindex spam filtering 22814@cindex spam filtering
22815@cindex spam filtering sequence of events
22802@cindex spam 22816@cindex spam
22803 22817
22804The idea behind @file{spam.el} is to have a control center for spam detection 22818You must read this section to understand how the Spam package works.
22805and filtering in Gnus. To that end, @file{spam.el} does two things: it 22819Do not skip, speed-read, or glance through this section.
22806filters new mail, and it analyzes mail known to be spam or ham.
22807@dfn{Ham} is the name used throughout @file{spam.el} to indicate
22808non-spam messages.
22809 22820
22810@cindex spam-initialize 22821@cindex spam-initialize
22811First of all, you @strong{must} run the function 22822@vindex spam-use-stat
22812@code{spam-initialize} to autoload @code{spam.el} and to install the 22823To use the Spam package, you @strong{must} first run the function
22813@code{spam.el} hooks. There is one exception: if you use the 22824@code{spam-initialize}:
22814@code{spam-use-stat} (@pxref{spam-stat spam filtering}) setting, you
22815should turn it on before @code{spam-initialize}:
22816 22825
22817@example 22826@example
22818(setq spam-use-stat t) ;; if needed
22819(spam-initialize) 22827(spam-initialize)
22820@end example 22828@end example
22821 22829
22822So, what happens when you load @file{spam.el}? 22830This autoloads @code{spam.el} and installs the various hooks necessary
22823 22831to let the Spam package do its job. In order to make use of the Spam
22824First, some hooks will get installed by @code{spam-initialize}. There 22832package, you have to set up certain group parameters and variables,
22825are some hooks for @code{spam-stat} so it can save its databases, and 22833which we will describe below. All of the variables controlling the
22826there are hooks so interesting things will happen when you enter and 22834Spam package can be found in the @samp{spam} customization group.
22827leave a group. More on the sequence of events later (@pxref{Spam 22835
22828ELisp Package Sequence of Events}). 22836There are two ``contact points'' between the Spam package and the rest
22829 22837of Gnus: checking new mail for spam, and leaving a group.
22830You get the following keyboard commands: 22838
22839Checking new mail for spam is done in one of two ways: while splitting
22840incoming mail, or when you enter a group.
22841
22842The first way, checking for spam while splitting incoming mail, is
22843suited to mail back ends such as @code{nnml} or @code{nnimap}, where
22844new mail appears in a single spool file. The Spam package processes
22845incoming mail, and sends mail considered to be spam to a designated
22846``spam'' group. @xref{Filtering Incoming Mail}.
22847
22848The second way is suited to back ends such as @code{nntp}, which have
22849no incoming mail spool, or back ends where the server is in charge of
22850splitting incoming mail. In this case, when you enter a Gnus group,
22851the unseen or unread messages in that group are checked for spam.
22852Detected spam messages are marked as spam. @xref{Detecting Spam in
22853Groups}.
22854
22855@cindex spam back ends
22856In either case, you have to tell the Spam package what method to use
22857to detect spam messages. There are several methods, or @dfn{spam back
22858ends} (not to be confused with Gnus back ends!) to choose from: spam
22859``blacklists'' and ``whitelists'', dictionary-based filters, and so
22860forth. @xref{Spam Back Ends}.
22861
22862In the Gnus summary buffer, messages that have been identified as spam
22863always appear with a @samp{$} symbol.
22864
22865The Spam package divides Gnus groups into three categories: ham
22866groups, spam groups, and unclassified groups. You should mark each of
22867the groups you subscribe to as either a ham group or a spam group,
22868using the @code{spam-contents} group parameter (@pxref{Group
22869Parameters}). Spam groups have a special property: when you enter a
22870spam group, all unseen articles are marked as spam. Thus, mail split
22871into a spam group is automatically marked as spam.
22872
22873Identifying spam messages is only half of the Spam package's job. The
22874second half comes into play whenever you exit a group buffer. At this
22875point, the Spam package does several things:
22876
22877First, it calls @dfn{spam and ham processors} to process the articles
22878according to whether they are spam or ham. There is a pair of spam
22879and ham processors associated with each spam back end, and what the
22880processors do depends on the back end. At present, the main role of
22881spam and ham processors is for dictionary-based spam filters: they add
22882the contents of the messages in the group to the filter's dictionary,
22883to improve its ability to detect future spam. The @code{spam-process}
22884group parameter specifies what spam processors to use. @xref{Spam and
22885Ham Processors}.
22886
22887If the spam filter failed to mark a spam message, you can mark it
22888yourself, so that the message is processed as spam when you exit the
22889group:
22831 22890
22832@table @kbd 22891@table @kbd
22833
22834@item M-d 22892@item M-d
22835@itemx M s x 22893@itemx M s x
22836@itemx S x 22894@itemx S x
@@ -22838,189 +22896,103 @@ You get the following keyboard commands:
22838@kindex S x 22896@kindex S x
22839@kindex M s x 22897@kindex M s x
22840@findex gnus-summary-mark-as-spam 22898@findex gnus-summary-mark-as-spam
22841@code{gnus-summary-mark-as-spam}. 22899@findex gnus-summary-mark-as-spam
22842 22900Mark current article as spam, showing it with the @samp{$} mark
22843Mark current article as spam, showing it with the @samp{$} mark. 22901(@code{gnus-summary-mark-as-spam}).
22844Whenever you see a spam article, make sure to mark its summary line
22845with @kbd{M-d} before leaving the group. This is done automatically
22846for unread articles in @emph{spam} groups.
22847
22848@item M s t
22849@itemx S t
22850@kindex M s t
22851@kindex S t
22852@findex spam-bogofilter-score
22853@code{spam-bogofilter-score}.
22854
22855You must have Bogofilter installed for that command to work properly.
22856
22857@xref{Bogofilter}.
22858
22859@end table 22902@end table
22860 22903
22861Also, when you load @file{spam.el}, you will be able to customize its 22904@noindent
22862variables. Try @code{customize-group} on the @samp{spam} variable 22905Similarly, you can unmark an article if it has been erroneously marked
22863group. 22906as spam. @xref{Setting Marks}.
22864
22865@menu
22866* Spam ELisp Package Sequence of Events::
22867* Spam ELisp Package Filtering of Incoming Mail::
22868* Spam ELisp Package Global Variables::
22869* Spam ELisp Package Configuration Examples::
22870* Blacklists and Whitelists::
22871* BBDB Whitelists::
22872* Gmane Spam Reporting::
22873* Anti-spam Hashcash Payments::
22874* Blackholes::
22875* Regular Expressions Header Matching::
22876* Bogofilter::
22877* ifile spam filtering::
22878* spam-stat spam filtering::
22879* SpamOracle::
22880* Extending the Spam ELisp package::
22881@end menu
22882
22883@node Spam ELisp Package Sequence of Events
22884@subsubsection Spam ELisp Package Sequence of Events
22885@cindex spam filtering
22886@cindex spam filtering sequence of events
22887@cindex spam
22888
22889You must read this section to understand how @code{spam.el} works.
22890Do not skip, speed-read, or glance through this section.
22891
22892There are two @emph{contact points}, if you will, between
22893@code{spam.el} and the rest of Gnus: checking new mail for spam, and
22894leaving a group.
22895
22896Getting new mail is done in one of two ways. You can either split
22897your incoming mail or you can classify new articles as ham or spam
22898when you enter the group.
22899
22900Splitting incoming mail is better suited to mail backends such as
22901@code{nnml} or @code{nnimap} where new mail appears in a single file
22902called a @dfn{Spool File}. See @xref{Spam ELisp Package Filtering of
22903Incoming Mail}.
22904
22905For backends such as @code{nntp} there is no incoming mail spool, so
22906an alternate mechanism must be used. This may also happen for
22907backends where the server is in charge of splitting incoming mail, and
22908Gnus does not do further splitting. The @code{spam-autodetect} and
22909@code{spam-autodetect-methods} group parameters (accessible with
22910@kbd{G c} and @kbd{G p} as usual), and the corresponding variables
22911@code{gnus-spam-autodetect-methods} and
22912@code{gnus-spam-autodetect-methods} (accessible with @kbd{M-x
22913customize-variable} as usual).
22914
22915When @code{spam-autodetect} is used, it hooks into the process of
22916entering a group. Thus, entering a group with unseen or unread
22917articles becomes the substitute for checking incoming mail. Whether
22918only unseen articles or all unread articles will be processed is
22919determined by the @code{spam-autodetect-recheck-messages}. When set
22920to @code{t}, unread messages will be rechecked.
22921
22922@code{spam-autodetect} grants the user at once more and less control
22923of spam filtering. The user will have more control over each group's
22924spam methods, so for instance the @samp{ding} group may have
22925@code{spam-use-BBDB} as the autodetection method, while the
22926@samp{suspect} group may have the @code{spam-use-blacklist} and
22927@code{spam-use-bogofilter} methods enabled. Every article detected to
22928be spam will be marked with the spam mark @samp{$} and processed on
22929exit from the group as normal spam. The user has less control over
22930the @emph{sequence} of checks, as he might with @code{spam-split}.
22931
22932When the newly split mail goes into groups, or messages are
22933autodetected to be ham or spam, those groups must be exited (after
22934entering, if needed) for further spam processing to happen. It
22935matters whether the group is considered a ham group, a spam group, or
22936is unclassified, based on its @code{spam-content} parameter
22937(@pxref{Spam ELisp Package Global Variables}). Spam groups have the
22938additional characteristic that, when entered, any unseen or unread
22939articles (depending on the @code{spam-mark-only-unseen-as-spam}
22940variable) will be marked as spam. Thus, mail split into a spam group
22941gets automatically marked as spam when you enter the group.
22942
22943So, when you exit a group, the @code{spam-processors} are applied, if
22944any are set, and the processed mail is moved to the
22945@code{ham-process-destination} or the @code{spam-process-destination}
22946depending on the article's classification. If the
22947@code{ham-process-destination} or the @code{spam-process-destination},
22948whichever is appropriate, are @code{nil}, the article is left in the
22949current group.
22950
22951If a spam is found in any group (this can be changed to only non-spam
22952groups with @code{spam-move-spam-nonspam-groups-only}), it is
22953processed by the active @code{spam-processors} (@pxref{Spam ELisp
22954Package Global Variables}) when the group is exited. Furthermore, the
22955spam is moved to the @code{spam-process-destination} (@pxref{Spam
22956ELisp Package Global Variables}) for further training or deletion.
22957You have to load the @code{gnus-registry.el} package and enable the
22958@code{spam-log-to-registry} variable if you want spam to be processed
22959no more than once. Thus, spam is detected and processed everywhere,
22960which is what most people want. If the
22961@code{spam-process-destination} is @code{nil}, the spam is marked as
22962expired, which is usually the right thing to do.
22963
22964If spam can not be moved---because of a read-only backend such as
22965@acronym{NNTP}, for example, it will be copied.
22966 22907
22967If a ham mail is found in a ham group, as determined by the 22908Normally, a ham message found in a non-ham group is not processed as
22968@code{ham-marks} parameter, it is processed as ham by the active ham 22909ham---the rationale is that it should be moved into a ham group for
22969@code{spam-processor} when the group is exited. With the variables 22910further processing (see below). However, you can force these articles
22911to be processed as ham by setting
22970@code{spam-process-ham-in-spam-groups} and 22912@code{spam-process-ham-in-spam-groups} and
22971@code{spam-process-ham-in-nonham-groups} the behavior can be further 22913@code{spam-process-ham-in-nonham-groups}.
22972altered so ham found anywhere can be processed. You have to load the
22973@code{gnus-registry.el} package and enable the
22974@code{spam-log-to-registry} variable if you want ham to be processed
22975no more than once. Thus, ham is detected and processed only when
22976necessary, which is what most people want. More on this in
22977@xref{Spam ELisp Package Configuration Examples}.
22978 22914
22979If ham can not be moved---because of a read-only backend such as 22915@vindex gnus-ham-process-destinations
22980@acronym{NNTP}, for example, it will be copied. 22916@vindex gnus-spam-process-destinations
22917The second thing that the Spam package does when you exit a group is
22918to move ham articles out of spam groups, and spam articles out of ham
22919groups. Ham in a spam group is moved to the group specified by the
22920variable @code{gnus-ham-process-destinations}, or the group parameter
22921@code{ham-process-destination}. Spam in a ham group is moved to the
22922group specified by the variable @code{gnus-spam-process-destinations},
22923or the group parameter @code{spam-process-destination}. If these
22924variables are not set, the articles are left in their current group.
22925If an article cannot not be moved (e.g., with a read-only backend such
22926as @acronym{NNTP}), it is copied.
22927
22928If an article is moved to another group, it is processed again when
22929you visit the new group. Normally, this is not a problem, but if you
22930want each article to be processed only once, load the
22931@code{gnus-registry.el} package and set the variable
22932@code{spam-log-to-registry} to @code{t}. @xref{Spam Package
22933Configuration Examples}.
22934
22935Normally, spam groups ignore @code{gnus-spam-process-destinations}.
22936However, if you set @code{spam-move-spam-nonspam-groups-only} to
22937@code{nil}, spam will also be moved out of spam groups, depending on
22938the @code{spam-process-destination} parameter.
22939
22940The final thing the Spam package does is to mark spam articles as
22941expired, which is usually the right thing to do.
22981 22942
22982If all this seems confusing, don't worry. Soon it will be as natural 22943If all this seems confusing, don't worry. Soon it will be as natural
22983as typing Lisp one-liners on a neural interface@dots{} err, sorry, that's 22944as typing Lisp one-liners on a neural interface@dots{} err, sorry, that's
2298450 years in the future yet. Just trust us, it's not so bad. 2294550 years in the future yet. Just trust us, it's not so bad.
22985 22946
22986@node Spam ELisp Package Filtering of Incoming Mail 22947@node Filtering Incoming Mail
22987@subsubsection Spam ELisp Package Filtering of Incoming Mail 22948@subsection Filtering Incoming Mail
22988@cindex spam filtering 22949@cindex spam filtering
22989@cindex spam filtering incoming mail 22950@cindex spam filtering incoming mail
22990@cindex spam 22951@cindex spam
22991 22952
22992To use the @file{spam.el} facilities for incoming mail filtering, you 22953To use the Spam package to filter incoming mail, you must first set up
22993must add the following to your fancy split list 22954fancy mail splitting. @xref{Fancy Mail Splitting}. The Spam package
22994@code{nnmail-split-fancy} or @code{nnimap-split-fancy}: 22955defines a special splitting function that you can add to your fancy
22956split variable (either @code{nnmail-split-fancy} or
22957@code{nnimap-split-fancy}, depending on your mail back end):
22995 22958
22996@example 22959@example
22997(: spam-split) 22960(: spam-split)
22998@end example 22961@end example
22999 22962
23000Note that the fancy split may be called @code{nnmail-split-fancy} or 22963@vindex spam-split-group
23001@code{nnimap-split-fancy}, depending on whether you use the nnmail or 22964@noindent
23002nnimap back ends to retrieve your mail. 22965The @code{spam-split} function scans incoming mail according to your
23003 22966chosen spam back end(s), and sends messages identified as spam to a
23004Also, @code{spam-split} will not modify incoming mail in any way. 22967spam group. By default, the spam group is a group named @samp{spam},
23005 22968but you can change this by customizing @code{spam-split-group}. Make
23006The @code{spam-split} function will process incoming mail and send the 22969sure the contents of @code{spam-split-group} are an unqualified group
23007mail considered to be spam into the group name given by the variable 22970name. For instance, in an @code{nnimap} server @samp{your-server},
23008@code{spam-split-group}. By default that group name is @samp{spam}, 22971the value @samp{spam} means @samp{nnimap+your-server:spam}. The value
23009but you can customize @code{spam-split-group}. Make sure the contents 22972@samp{nnimap+server:spam} is therefore wrong---it gives the group
23010of @code{spam-split-group} are an @emph{unqualified} group name, for 22973@samp{nnimap+your-server:nnimap+server:spam}.
23011instance in an @code{nnimap} server @samp{your-server} the value 22974
23012@samp{spam} will turn out to be @samp{nnimap+your-server:spam}. The 22975@code{spam-split} does not modify the contents of messages in any way.
23013value @samp{nnimap+server:spam}, therefore, is wrong and will
23014actually give you the group
23015@samp{nnimap+your-server:nnimap+server:spam} which may or may not
23016work depending on your server's tolerance for strange group names.
23017
23018You can also give @code{spam-split} a parameter,
23019e.g. @code{spam-use-regex-headers} or @code{"maybe-spam"}. Why is
23020this useful?
23021 22976
23022Take these split rules (with @code{spam-use-regex-headers} and 22977@vindex nnimap-split-download-body
23023@code{spam-use-blackholes} set): 22978Note for IMAP users: if you use the @code{spam-check-bogofilter},
22979@code{spam-check-ifile}, and @code{spam-check-stat} spam back ends,
22980you should also set set the variable @code{nnimap-split-download-body}
22981to @code{t}. These spam back ends are most useful when they can
22982``scan'' the full message body. By default, the nnimap back end only
22983retrieves the message headers; @code{nnimap-split-download-body} tells
22984it to retrieve the message bodies as well. We don't set this by
22985default because it will slow @acronym{IMAP} down, and that is not an
22986appropriate decision to make on behalf of the user. @xref{Splitting
22987in IMAP}.
22988
22989You have to specify one or more spam back ends for @code{spam-split}
22990to use, by setting the @code{spam-use-*} variables. @xref{Spam Back
22991Ends}. Normally, @code{spam-split} simply uses all the spam back ends
22992you enabled in this way. However, you can tell @code{spam-split} to
22993use only some of them. Why this is useful? Suppose you are using the
22994@code{spam-use-regex-headers} and @code{spam-use-blackholes} spam back
22995ends, and the following split rule:
23024 22996
23025@example 22997@example
23026 nnimap-split-fancy '(| 22998 nnimap-split-fancy '(|
@@ -23030,21 +23002,23 @@ Take these split rules (with @code{spam-use-regex-headers} and
23030 "mail") 23002 "mail")
23031@end example 23003@end example
23032 23004
23033Now, the problem is that you want all ding messages to make it to the 23005@noindent
23034ding folder. But that will let obvious spam (for example, spam 23006The problem is that you want all ding messages to make it to the ding
23035detected by SpamAssassin, and @code{spam-use-regex-headers}) through, 23007folder. But that will let obvious spam (for example, spam detected by
23036when it's sent to the ding list. On the other hand, some messages to 23008SpamAssassin, and @code{spam-use-regex-headers}) through, when it's
23037the ding list are from a mail server in the blackhole list, so the 23009sent to the ding list. On the other hand, some messages to the ding
23038invocation of @code{spam-split} can't be before the ding rule. 23010list are from a mail server in the blackhole list, so the invocation
23039 23011of @code{spam-split} can't be before the ding rule.
23040You can let SpamAssassin headers supersede ding rules, but all other 23012
23041@code{spam-split} rules (including a second invocation of the 23013The solution is to let SpamAssassin headers supersede ding rules, and
23042regex-headers check) will be after the ding rule: 23014perform the other @code{spam-split} rules (including a second
23015invocation of the regex-headers check) after the ding rule. This is
23016done by passing a parameter to @code{spam-split}:
23043 23017
23044@example 23018@example
23045nnimap-split-fancy 23019nnimap-split-fancy
23046 '(| 23020 '(|
23047 ;; @r{all spam detected by @code{spam-use-regex-headers} goes to @samp{regex-spam}} 23021 ;; @r{spam detected by @code{spam-use-regex-headers} goes to @samp{regex-spam}}
23048 (: spam-split "regex-spam" 'spam-use-regex-headers) 23022 (: spam-split "regex-spam" 'spam-use-regex-headers)
23049 (any "ding" "ding") 23023 (any "ding" "ding")
23050 ;; @r{all other spam detected by spam-split goes to @code{spam-split-group}} 23024 ;; @r{all other spam detected by spam-split goes to @code{spam-split-group}}
@@ -23053,58 +23027,68 @@ nnimap-split-fancy
23053 "mail") 23027 "mail")
23054@end example 23028@end example
23055 23029
23030@noindent
23056This lets you invoke specific @code{spam-split} checks depending on 23031This lets you invoke specific @code{spam-split} checks depending on
23057your particular needs, and to target the results of those checks to a 23032your particular needs, and target the results of those checks to a
23058particular spam group. You don't have to throw all mail into all the 23033particular spam group. You don't have to throw all mail into all the
23059spam tests. Another reason why this is nice is that messages to 23034spam tests. Another reason why this is nice is that messages to
23060mailing lists you have rules for don't have to have resource-intensive 23035mailing lists you have rules for don't have to have resource-intensive
23061blackhole checks performed on them. You could also specify different 23036blackhole checks performed on them. You could also specify different
23062spam checks for your nnmail split vs. your nnimap split. Go crazy. 23037spam checks for your nnmail split vs. your nnimap split. Go crazy.
23063 23038
23064You should still have specific checks such as 23039You should set the @code{spam-use-*} variables for whatever spam back
23065@code{spam-use-regex-headers} set to @code{t}, even if you 23040ends you intend to use. The reason is that when loading
23066specifically invoke @code{spam-split} with the check. The reason is 23041@file{spam.el}, some conditional loading is done depending on what
23067that when loading @file{spam.el}, some conditional loading is done 23042@code{spam-use-xyz} variables you have set. @xref{Spam Back Ends}.
23068depending on what @code{spam-use-xyz} variables you have set. This 23043
23069is usually not critical, though. 23044@c @emph{TODO: spam.el needs to provide a uniform way of training all the
23070 23045@c statistical databases. Some have that functionality built-in, others
23071@emph{Note for IMAP users} 23046@c don't.}
23072 23047
23073The boolean variable @code{nnimap-split-download-body} needs to be 23048@node Detecting Spam in Groups
23074set, if you want to split based on the whole message instead of just 23049@subsection Detecting Spam in Groups
23075the headers. By default, the nnimap back end will only retrieve the 23050
23076message headers. If you use @code{spam-check-bogofilter}, 23051To detect spam when visiting a group, set the group's
23077@code{spam-check-ifile}, or @code{spam-check-stat} (the splitters that 23052@code{spam-autodetect} and @code{spam-autodetect-methods} group
23078can benefit from the full message body), you should set this variable. 23053parameters. These are accessible with @kbd{G c} or @kbd{G p}, as
23079It is not set by default because it will slow @acronym{IMAP} down, and 23054usual (@pxref{Group Parameters}).
23080that is not an appropriate decision to make on behalf of the user. 23055
23081 23056You should set the @code{spam-use-*} variables for whatever spam back
23082@xref{Splitting in IMAP}. 23057ends you intend to use. The reason is that when loading
23083 23058@file{spam.el}, some conditional loading is done depending on what
23084@emph{TODO: spam.el needs to provide a uniform way of training all the 23059@code{spam-use-xyz} variables you have set.
23085statistical databases. Some have that functionality built-in, others 23060
23086don't.} 23061By default, only unseen articles are processed for spam. You can
23087 23062force Gnus to recheck all messages in the group by setting the
23088@node Spam ELisp Package Global Variables 23063variable @code{spam-autodetect-recheck-messages} to @code{t}.
23089@subsubsection Spam ELisp Package Global Variables 23064
23065If you use the @code{spam-autodetect} method of checking for spam, you
23066can specify different spam detection methods for different groups.
23067For instance, the @samp{ding} group may have @code{spam-use-BBDB} as
23068the autodetection method, while the @samp{suspect} group may have the
23069@code{spam-use-blacklist} and @code{spam-use-bogofilter} methods
23070enabled. Unlike with @code{spam-split}, you don't have any control
23071over the @emph{sequence} of checks, but this is probably unimportant.
23072
23073@node Spam and Ham Processors
23074@subsection Spam and Ham Processors
23090@cindex spam filtering 23075@cindex spam filtering
23091@cindex spam filtering variables 23076@cindex spam filtering variables
23092@cindex spam variables 23077@cindex spam variables
23093@cindex spam 23078@cindex spam
23094 23079
23095@vindex gnus-spam-process-newsgroups 23080@vindex gnus-spam-process-newsgroups
23096The concepts of ham processors and spam processors are very important. 23081Spam and ham processors specify special actions to take when you exit
23097Ham processors and spam processors for a group can be set with the 23082a group buffer. Spam processors act on spam messages, and ham
23098@code{spam-process} group parameter, or the 23083processors on ham messages. At present, the main role of these
23099@code{gnus-spam-process-newsgroups} variable. Ham processors take 23084processors is to update the dictionaries of dictionary-based spam back
23100mail known to be non-spam (@emph{ham}) and process it in some way so 23085ends such as Bogofilter (@pxref{Bogofilter}) and the Spam Statistics
23101that later similar mail will also be considered non-spam. Spam 23086package (@pxref{Spam Statistics Filtering}).
23102processors take mail known to be spam and process it so similar spam 23087
23103will be detected later. 23088The spam and ham processors that apply to each group are determined by
23104 23089the group's@code{spam-process} group parameter. If this group
23105The format of the spam or ham processor entry used to be a symbol, 23090parameter is not defined, they are determined by the variable
23106but now it is a @sc{cons} cell. See the individual spam processor entries 23091@code{gnus-spam-process-newsgroups}.
23107for more information.
23108 23092
23109@vindex gnus-spam-newsgroup-contents 23093@vindex gnus-spam-newsgroup-contents
23110Gnus learns from the spam you get. You have to collect your spam in 23094Gnus learns from the spam you get. You have to collect your spam in
@@ -23258,8 +23242,8 @@ When autodetecting spam, this variable tells @code{spam.el} whether
23258only unseen articles or all unread articles should be checked for 23242only unseen articles or all unread articles should be checked for
23259spam. It is recommended that you leave it off. 23243spam. It is recommended that you leave it off.
23260 23244
23261@node Spam ELisp Package Configuration Examples 23245@node Spam Package Configuration Examples
23262@subsubsection Spam ELisp Package Configuration Examples 23246@subsection Spam Package Configuration Examples
23263@cindex spam filtering 23247@cindex spam filtering
23264@cindex spam filtering configuration examples 23248@cindex spam filtering configuration examples
23265@cindex spam configuration examples 23249@cindex spam configuration examples
@@ -23384,11 +23368,11 @@ bogofilter or DCC).
23384 23368
23385Because of the @code{gnus-group-spam-classification-spam} entry, all 23369Because of the @code{gnus-group-spam-classification-spam} entry, all
23386messages are marked as spam (with @code{$}). When I find a false 23370messages are marked as spam (with @code{$}). When I find a false
23387positive, I mark the message with some other ham mark (@code{ham-marks}, 23371positive, I mark the message with some other ham mark
23388@ref{Spam ELisp Package Global Variables}). On group exit, those 23372(@code{ham-marks}, @ref{Spam and Ham Processors}). On group exit,
23389messages are copied to both groups, @samp{INBOX} (where I want to have 23373those messages are copied to both groups, @samp{INBOX} (where I want
23390the article) and @samp{training.ham} (for training bogofilter) and 23374to have the article) and @samp{training.ham} (for training bogofilter)
23391deleted from the @samp{spam.detected} folder. 23375and deleted from the @samp{spam.detected} folder.
23392 23376
23393The @code{gnus-article-sort-by-chars} entry simplifies detection of 23377The @code{gnus-article-sort-by-chars} entry simplifies detection of
23394false positives for me. I receive lots of worms (sweN, @dots{}), that all 23378false positives for me. I receive lots of worms (sweN, @dots{}), that all
@@ -23424,6 +23408,29 @@ through my local news server (leafnode). I.e. the article numbers are
23424not the same as on news.gmane.org, thus @code{spam-report.el} has to check 23408not the same as on news.gmane.org, thus @code{spam-report.el} has to check
23425the @code{X-Report-Spam} header to find the correct number. 23409the @code{X-Report-Spam} header to find the correct number.
23426 23410
23411@node Spam Back Ends
23412@subsection Spam Back Ends
23413@cindex spam back ends
23414
23415The spam package offers a variety of back ends for detecting spam.
23416Each back end defines a set of methods for detecting spam
23417(@pxref{Filtering Incoming Mail}, @pxref{Detecting Spam in Groups}),
23418and a pair of spam and ham processors (@pxref{Spam and Ham
23419Processors}).
23420
23421@menu
23422* Blacklists and Whitelists::
23423* BBDB Whitelists::
23424* Gmane Spam Reporting::
23425* Anti-spam Hashcash Payments::
23426* Blackholes::
23427* Regular Expressions Header Matching::
23428* Bogofilter::
23429* ifile spam filtering::
23430* Spam Statistics Filtering::
23431* SpamOracle::
23432@end menu
23433
23427@node Blacklists and Whitelists 23434@node Blacklists and Whitelists
23428@subsubsection Blacklists and Whitelists 23435@subsubsection Blacklists and Whitelists
23429@cindex spam filtering 23436@cindex spam filtering
@@ -23728,6 +23735,15 @@ You should not enable this if you use @code{spam-use-bogofilter-headers}.
23728 23735
23729@end defvar 23736@end defvar
23730 23737
23738@table @kbd
23739@item M s t
23740@itemx S t
23741@kindex M s t
23742@kindex S t
23743@findex spam-bogofilter-score
23744Get the Bogofilter spamicity score (@code{spam-bogofilter-score}).
23745@end table
23746
23731@defvar spam-use-bogofilter-headers 23747@defvar spam-use-bogofilter-headers
23732 23748
23733Set this variable if you want @code{spam-split} to use Eric Raymond's 23749Set this variable if you want @code{spam-split} to use Eric Raymond's
@@ -23829,20 +23845,21 @@ purpose. A ham and a spam processor are provided, plus the
23829should be used. The 1.2.1 version of ifile was used to test this 23845should be used. The 1.2.1 version of ifile was used to test this
23830functionality. 23846functionality.
23831 23847
23832@node spam-stat spam filtering 23848@node Spam Statistics Filtering
23833@subsubsection spam-stat spam filtering 23849@subsubsection Spam Statistics Filtering
23834@cindex spam filtering 23850@cindex spam filtering
23835@cindex spam-stat, spam filtering 23851@cindex spam-stat, spam filtering
23836@cindex spam-stat 23852@cindex spam-stat
23837@cindex spam 23853@cindex spam
23838 23854
23839@xref{Filtering Spam Using Statistics with spam-stat}. 23855This back end uses the Spam Statistics Emacs Lisp package to perform
23856statistics-based filtering (@pxref{Spam Statistics Package}). Before
23857using this, you may want to perform some additional steps to
23858initialize your Spam Statistics dictionary. @xref{Creating a
23859spam-stat dictionary}.
23840 23860
23841@defvar spam-use-stat 23861@defvar spam-use-stat
23842 23862
23843Enable this variable if you want @code{spam-split} to use
23844spam-stat.el, an Emacs Lisp statistical analyzer.
23845
23846@end defvar 23863@end defvar
23847 23864
23848@defvar gnus-group-spam-exit-processor-stat 23865@defvar gnus-group-spam-exit-processor-stat
@@ -23902,18 +23919,17 @@ One possibility is to run SpamOracle as a @code{:prescript} from the
23902@xref{Mail Source Specifiers}, (@pxref{SpamAssassin}). This method has 23919@xref{Mail Source Specifiers}, (@pxref{SpamAssassin}). This method has
23903the advantage that the user can see the @emph{X-Spam} headers. 23920the advantage that the user can see the @emph{X-Spam} headers.
23904 23921
23905The easiest method is to make @file{spam.el} (@pxref{Filtering Spam 23922The easiest method is to make @file{spam.el} (@pxref{Spam Package})
23906Using The Spam ELisp Package}) call SpamOracle. 23923call SpamOracle.
23907 23924
23908@vindex spam-use-spamoracle 23925@vindex spam-use-spamoracle
23909To enable SpamOracle usage by @file{spam.el}, set the variable 23926To enable SpamOracle usage by @file{spam.el}, set the variable
23910@code{spam-use-spamoracle} to @code{t} and configure the 23927@code{spam-use-spamoracle} to @code{t} and configure the
23911@code{nnmail-split-fancy} or @code{nnimap-split-fancy} as described in 23928@code{nnmail-split-fancy} or @code{nnimap-split-fancy}. @xref{Spam
23912the section @xref{Filtering Spam Using The Spam ELisp Package}. In 23929Package}. In this example the @samp{INBOX} of an nnimap server is
23913this example the @samp{INBOX} of an nnimap server is filtered using 23930filtered using SpamOracle. Mails recognized as spam mails will be
23914SpamOracle. Mails recognized as spam mails will be moved to 23931moved to @code{spam-split-group}, @samp{Junk} in this case. Ham
23915@code{spam-split-group}, @samp{Junk} in this case. Ham messages stay 23932messages stay in @samp{INBOX}:
23916in @samp{INBOX}:
23917 23933
23918@example 23934@example
23919(setq spam-use-spamoracle t 23935(setq spam-use-spamoracle t
@@ -23945,14 +23961,14 @@ database to live somewhere special, set
23945 23961
23946SpamOracle employs a statistical algorithm to determine whether a 23962SpamOracle employs a statistical algorithm to determine whether a
23947message is spam or ham. In order to get good results, meaning few 23963message is spam or ham. In order to get good results, meaning few
23948false hits or misses, SpamOracle needs training. SpamOracle learns the 23964false hits or misses, SpamOracle needs training. SpamOracle learns
23949characteristics of your spam mails. Using the @emph{add} mode 23965the characteristics of your spam mails. Using the @emph{add} mode
23950(training mode) one has to feed good (ham) and spam mails to 23966(training mode) one has to feed good (ham) and spam mails to
23951SpamOracle. This can be done by pressing @kbd{|} in the Summary buffer 23967SpamOracle. This can be done by pressing @kbd{|} in the Summary
23952and pipe the mail to a SpamOracle process or using @file{spam.el}'s 23968buffer and pipe the mail to a SpamOracle process or using
23953spam- and ham-processors, which is much more convenient. For a 23969@file{spam.el}'s spam- and ham-processors, which is much more
23954detailed description of spam- and ham-processors, @xref{Filtering Spam 23970convenient. For a detailed description of spam- and ham-processors,
23955Using The Spam ELisp Package}. 23971@xref{Spam Package}.
23956 23972
23957@defvar gnus-group-spam-exit-processor-spamoracle 23973@defvar gnus-group-spam-exit-processor-spamoracle
23958Add this symbol to a group's @code{spam-process} parameter by 23974Add this symbol to a group's @code{spam-process} parameter by
@@ -24001,8 +24017,8 @@ the user marks some messages as spam messages, these messages will be
24001processed by SpamOracle. The processor sends the messages to 24017processed by SpamOracle. The processor sends the messages to
24002SpamOracle as new samples for spam. 24018SpamOracle as new samples for spam.
24003 24019
24004@node Extending the Spam ELisp package 24020@node Extending the Spam package
24005@subsubsection Extending the Spam ELisp package 24021@subsection Extending the Spam package
24006@cindex spam filtering 24022@cindex spam filtering
24007@cindex spam elisp package, extending 24023@cindex spam elisp package, extending
24008@cindex extending the spam elisp package 24024@cindex extending the spam elisp package
@@ -24109,9 +24125,8 @@ to the @code{spam-autodetect-methods} group parameter in
24109 24125
24110@end enumerate 24126@end enumerate
24111 24127
24112 24128@node Spam Statistics Package
24113@node Filtering Spam Using Statistics with spam-stat 24129@subsection Spam Statistics Package
24114@subsection Filtering Spam Using Statistics with spam-stat
24115@cindex Paul Graham 24130@cindex Paul Graham
24116@cindex Graham, Paul 24131@cindex Graham, Paul
24117@cindex naive Bayesian spam filtering 24132@cindex naive Bayesian spam filtering
@@ -24138,7 +24153,11 @@ non-spam mail. Use the 15 most conspicuous words, compute the total
24138probability of the mail being spam. If this probability is higher 24153probability of the mail being spam. If this probability is higher
24139than a certain threshold, the mail is considered to be spam. 24154than a certain threshold, the mail is considered to be spam.
24140 24155
24141Gnus supports this kind of filtering. But it needs some setting up. 24156The Spam Statistics package adds support to Gnus for this kind of
24157filtering. It can be used as one of the back ends of the Spam package
24158(@pxref{Spam Package}), or by itself.
24159
24160Before using the Spam Statistics package, you need to set it up.
24142First, you need two collections of your mail, one with spam, one with 24161First, you need two collections of your mail, one with spam, one with
24143non-spam. Then you need to create a dictionary using these two 24162non-spam. Then you need to create a dictionary using these two
24144collections, and save it. And last but not least, you need to use 24163collections, and save it. And last but not least, you need to use
@@ -24224,8 +24243,10 @@ The filename used to store the dictionary. This defaults to
24224@node Splitting mail using spam-stat 24243@node Splitting mail using spam-stat
24225@subsubsection Splitting mail using spam-stat 24244@subsubsection Splitting mail using spam-stat
24226 24245
24227In order to use @code{spam-stat} to split your mail, you need to add the 24246This section describes how to use the Spam statistics
24228following to your @file{~/.gnus.el} file: 24247@emph{independently} of the @xref{Spam Package}.
24248
24249First, add the following to your @file{~/.gnus.el} file:
24229 24250
24230@lisp 24251@lisp
24231(require 'spam-stat) 24252(require 'spam-stat)
@@ -24870,16 +24891,17 @@ Gnus should work on:
24870@itemize @bullet 24891@itemize @bullet
24871 24892
24872@item 24893@item
24873Emacs 20.7 and up. 24894Emacs 21.1 and up.
24874 24895
24875@item 24896@item
24876XEmacs 21.1 and up. 24897XEmacs 21.4 and up.
24877 24898
24878@end itemize 24899@end itemize
24879 24900
24880This Gnus version will absolutely not work on any Emacsen older than 24901This Gnus version will absolutely not work on any Emacsen older than
24881that. Not reliably, at least. Older versions of Gnus may work on older 24902that. Not reliably, at least. Older versions of Gnus may work on older
24882Emacs versions. 24903Emacs versions. Particularly, Gnus 5.10.8 should also work on Emacs
2490420.7 and XEmacs 21.1.
24883 24905
24884There are some vague differences between Gnus on the various 24906There are some vague differences between Gnus on the various
24885platforms---XEmacs features more graphics (a logo and a toolbar)---but 24907platforms---XEmacs features more graphics (a logo and a toolbar)---but
diff --git a/man/mh-e.texi b/man/mh-e.texi
index 956bad07859..d8245b325ab 100644
--- a/man/mh-e.texi
+++ b/man/mh-e.texi
@@ -11,8 +11,8 @@
11@set VERSION 7.93 11@set VERSION 7.93
12@c Edition of the manual. It is either empty for the first edition or 12@c Edition of the manual. It is either empty for the first edition or
13@c has the form ", nth Edition" (without the quotes). 13@c has the form ", nth Edition" (without the quotes).
14@set EDITION , 6th Edition 14@set EDITION , 7th Edition
15@set UPDATED 2006-04-02 15@set UPDATED 2006-04-17
16@set UPDATE-MONTH April, 2006 16@set UPDATE-MONTH April, 2006
17 17
18@c Other variables. 18@c Other variables.
@@ -3724,33 +3724,36 @@ again.
3724@findex mh-execute-commands 3724@findex mh-execute-commands
3725@kindex q 3725@kindex q
3726@vindex mh-before-quit-hook 3726@vindex mh-before-quit-hook
3727@vindex mh-before-quit-hook, example
3727@vindex mh-quit-hook 3728@vindex mh-quit-hook
3729@vindex mh-quit-hook, example
3728 3730
3729The two hooks @code{mh-before-quit-hook} and @code{mh-quit-hook} are 3731The two hooks @code{mh-before-quit-hook} and @code{mh-quit-hook} are
3730called by @kbd{q}. The former one is called before the quit occurs, so 3732called by @kbd{q}. The former one is called before the quit occurs, so
3731you might use it to perform any MH-E operations; you could perform 3733you might use it to perform any MH-E operations; you could perform
3732some query and abort the quit or call @code{mh-execute-commands}, for 3734some query and abort the quit or call @code{mh-execute-commands}, for
3733example. The latter is not run in an MH-E context, so you might use it 3735example. The latter is not run in an MH-E context, so you might use it
3734to modify the window setup. For example, if the window configuration 3736to modify the window setup. If you find that @kbd{q} buries a lot of
3735was saved as in the example in @ref{Miscellaneous Commands and 3737buffers that you would rather remove, you can use both
3736Options}, you would also want to set @code{mh-quit-hook} to the 3738@code{mh-before-quit-hook} and @code{mh-quit-hook} to accomplish that.
3737following:
3738
3739@c XXX Replace this with my example for killing the mail buffers.
3740
3741@vindex mh-quit-hook, example
3742 3739
3743@smalllisp 3740@smalllisp
3744@group 3741@group
3742(defvar my-mh-folder-buffer-to-delete nil
3743 "Folder buffer that is being quit.")
3744
3745(defun my-mh-before-quit-hook ()
3746 "Save folder buffer that is to be deleted."
3747 (setq my-mh-folder-buffer-to-delete (current-buffer)))
3748
3745(defun my-mh-quit-hook () 3749(defun my-mh-quit-hook ()
3746 "Clear window configuration variables as the MH window is gone." 3750 "Kill folder buffer rather than just bury it."
3747 (setq my-mh-screen-saved nil) 3751 (set-buffer my-mh-folder-buffer-to-delete)
3748 (setq my-mh-screen nil) 3752 (if (get-buffer mh-show-buffer)
3749 (if my-normal-screen 3753 (kill-buffer mh-show-buffer))
3750 (set-window-configuration my-normal-screen)) 3754 (kill-buffer (current-buffer)))
3751 (setq my-normal-screen nil)) 3755
3752 3756@i{Kill MH-Folder buffer instead of burying it}
3753@i{Clean up window setup in mh-quit-hook}
3754@end group 3757@end group
3755@end smalllisp 3758@end smalllisp
3756 3759
diff --git a/man/misc.texi b/man/misc.texi
index 42cc1a8ae63..0b07e04ed68 100644
--- a/man/misc.texi
+++ b/man/misc.texi
@@ -825,7 +825,9 @@ same regexp used last time.
825 825
826 When you find the previous input you want, you can resubmit it by 826 When you find the previous input you want, you can resubmit it by
827typing @key{RET}, or you can edit it first and then resubmit it if you 827typing @key{RET}, or you can edit it first and then resubmit it if you
828wish. 828wish. Any partial input you were composing before navigating the
829history list is restored when you go to the beginning or end of the
830history ring.
829 831
830 Often it is useful to reexecute several successive shell commands that 832 Often it is useful to reexecute several successive shell commands that
831were previously executed in sequence. To do this, first find and 833were previously executed in sequence. To do this, first find and
@@ -967,14 +969,14 @@ current directory.
967@vindex comint-scroll-to-bottom-on-input 969@vindex comint-scroll-to-bottom-on-input
968 If the variable @code{comint-scroll-to-bottom-on-input} is 970 If the variable @code{comint-scroll-to-bottom-on-input} is
969non-@code{nil}, insertion and yank commands scroll the selected window 971non-@code{nil}, insertion and yank commands scroll the selected window
970to the bottom before inserting. 972to the bottom before inserting. The default is @code{nil}.
971 973
972@vindex comint-scroll-show-maximum-output 974@vindex comint-scroll-show-maximum-output
973 If @code{comint-scroll-show-maximum-output} is non-@code{nil}, then 975 If @code{comint-scroll-show-maximum-output} is non-@code{nil}, then
974arrival of output when point is at the end tries to place the last line of 976arrival of output when point is at the end tries to place the last line of
975text at the bottom line of the window, so as to show as much useful 977text at the bottom line of the window, so as to show as much useful
976text as possible. (This mimics the scrolling behavior of many 978text as possible. (This mimics the scrolling behavior of most
977terminals.) The default is @code{nil}. 979terminals.) The default is @code{t}.
978 980
979@vindex comint-move-point-for-output 981@vindex comint-move-point-for-output
980 By setting @code{comint-move-point-for-output}, you can opt for 982 By setting @code{comint-move-point-for-output}, you can opt for
diff --git a/man/org.texi b/man/org.texi
index f3a6c21a445..efb42ab5b3a 100644
--- a/man/org.texi
+++ b/man/org.texi
@@ -4,7 +4,7 @@
4@setfilename ../info/org 4@setfilename ../info/org
5@settitle Org Mode Manual 5@settitle Org Mode Manual
6 6
7@set VERSION 4.23 7@set VERSION 4.25
8@set DATE April 2006 8@set DATE April 2006
9 9
10@dircategory Emacs 10@dircategory Emacs
@@ -76,13 +76,13 @@ Software Foundation raise funds for GNU development.''
76 76
77@menu 77@menu
78* Introduction:: Getting started 78* Introduction:: Getting started
79* Document Structure:: A tree works like your brain 79* Document structure:: A tree works like your brain
80* Tables:: Pure magic for quick formatting 80* Tables:: Pure magic for quick formatting
81* Hyperlinks:: Notes in context 81* Hyperlinks:: Notes in context
82* TODO items:: Every tree branch can be a TODO item 82* TODO items:: Every tree branch can be a TODO item
83* Timestamps:: Assign date and time to items 83* Timestamps:: Assign date and time to items
84* Tags:: Tagging headlines and matching sets of tags 84* Tags:: Tagging headlines and matching sets of tags
85* Agenda Views:: Collecting information into views 85* Agenda views:: Collecting information into views
86* Exporting:: Sharing and publishing of notes 86* Exporting:: Sharing and publishing of notes
87* Miscellaneous:: All the rest which did not fit elsewhere 87* Miscellaneous:: All the rest which did not fit elsewhere
88* Index:: The fast road to specific information 88* Index:: The fast road to specific information
@@ -97,7 +97,7 @@ Introduction
97* Installation and activation:: How to install Org-mode 97* Installation and activation:: How to install Org-mode
98* Feedback:: Bug reports, ideas, patches etc. 98* Feedback:: Bug reports, ideas, patches etc.
99 99
100Document Structure 100Document structure
101 101
102* Outlines:: Org-mode is based on outline-mode 102* Outlines:: Org-mode is based on outline-mode
103* Headlines:: How to typeset org-tree headlines 103* Headlines:: How to typeset org-tree headlines
@@ -106,7 +106,7 @@ Document Structure
106* Structure editing:: Changing sequence and level of headlines 106* Structure editing:: Changing sequence and level of headlines
107* Archiving:: Move done task trees to a different place 107* Archiving:: Move done task trees to a different place
108* Sparse trees:: Matches embedded in context 108* Sparse trees:: Matches embedded in context
109* Plain Lists:: Editing hand-formatted lists 109* Plain lists:: Editing hand-formatted lists
110 110
111Tables 111Tables
112 112
@@ -163,11 +163,11 @@ Tags
163* Setting tags:: How to assign tags to a headline 163* Setting tags:: How to assign tags to a headline
164* Tag searches:: Searching for combinations of tags 164* Tag searches:: Searching for combinations of tags
165 165
166Agenda Views 166Agenda views
167 167
168* Agenda files:: Files being searched for agenda information 168* Agenda files:: Files being searched for agenda information
169* Agenda dispatcher:: Keyboard access to agenda views 169* Agenda dispatcher:: Keyboard access to agenda views
170* Weekly/Daily Agenda:: The calendar page with current tasks 170* Weekly/Daily agenda:: The calendar page with current tasks
171* Global TODO list:: All unfinished action items 171* Global TODO list:: All unfinished action items
172* Matching headline tags:: Structured information with fine-tuned search 172* Matching headline tags:: Structured information with fine-tuned search
173* Timeline:: Time-sorted view for single file 173* Timeline:: Time-sorted view for single file
@@ -210,7 +210,7 @@ Miscellaneous
210@end detailmenu 210@end detailmenu
211@end menu 211@end menu
212 212
213@node Introduction, Document Structure, Top, Top 213@node Introduction, Document structure, Top, Top
214@chapter Introduction 214@chapter Introduction
215@cindex introduction 215@cindex introduction
216 216
@@ -339,7 +339,7 @@ with clear information about:
339@end enumerate 339@end enumerate
340@noindent Thank you for helping to improve this mode. 340@noindent Thank you for helping to improve this mode.
341 341
342@node Document Structure, Tables, Introduction, Top 342@node Document structure, Tables, Introduction, Top
343@chapter Document Structure 343@chapter Document Structure
344@cindex document structure 344@cindex document structure
345@cindex structure of document 345@cindex structure of document
@@ -355,10 +355,10 @@ edit the structure of the document.
355* Structure editing:: Changing sequence and level of headlines 355* Structure editing:: Changing sequence and level of headlines
356* Archiving:: Move done task trees to a different place 356* Archiving:: Move done task trees to a different place
357* Sparse trees:: Matches embedded in context 357* Sparse trees:: Matches embedded in context
358* Plain Lists:: Editing hand-formatted lists 358* Plain lists:: Editing hand-formatted lists
359@end menu 359@end menu
360 360
361@node Outlines, Headlines, Document Structure, Document Structure 361@node Outlines, Headlines, Document structure, Document structure
362@section Outlines 362@section Outlines
363@cindex outlines 363@cindex outlines
364@cindex outline-mode 364@cindex outline-mode
@@ -373,7 +373,7 @@ outlines by compressing the entire show/hide functionality into a
373single command @command{org-cycle}, which is bound to the @key{TAB} 373single command @command{org-cycle}, which is bound to the @key{TAB}
374key. 374key.
375 375
376@node Headlines, Visibility cycling, Outlines, Document Structure 376@node Headlines, Visibility cycling, Outlines, Document structure
377@section Headlines 377@section Headlines
378@cindex headlines 378@cindex headlines
379@cindex outline tree 379@cindex outline tree
@@ -396,7 +396,7 @@ example:
396outline that has whitespace followed by a single star as headline 396outline that has whitespace followed by a single star as headline
397starters. @ref{Clean view} describes a setup to realize this. 397starters. @ref{Clean view} describes a setup to realize this.
398 398
399@node Visibility cycling, Motion, Headlines, Document Structure 399@node Visibility cycling, Motion, Headlines, Document structure
400@section Visibility cycling 400@section Visibility cycling
401@cindex cycling, visibility 401@cindex cycling, visibility
402@cindex visibility cycling 402@cindex visibility cycling
@@ -458,7 +458,7 @@ buffer:
458#+STARTUP: showall 458#+STARTUP: showall
459@end example 459@end example
460 460
461@node Motion, Structure editing, Visibility cycling, Document Structure 461@node Motion, Structure editing, Visibility cycling, Document structure
462@section Motion 462@section Motion
463@cindex motion, between headlines 463@cindex motion, between headlines
464@cindex jumping, to headlines 464@cindex jumping, to headlines
@@ -491,7 +491,7 @@ the original buffer, and the headings hierarchy above it is made
491visible. 491visible.
492@end table 492@end table
493 493
494@node Structure editing, Archiving, Motion, Document Structure 494@node Structure editing, Archiving, Motion, Document structure
495@section Structure editing 495@section Structure editing
496@cindex structure editing 496@cindex structure editing
497@cindex headline, promotion and demotion 497@cindex headline, promotion and demotion
@@ -507,9 +507,14 @@ visible.
507@kindex M-@key{RET} 507@kindex M-@key{RET}
508@item M-@key{RET} 508@item M-@key{RET}
509Insert new heading with same level as current. If the cursor is in a 509Insert new heading with same level as current. If the cursor is in a
510plain list item, a new item is created. To force creation of a new 510plain list item, a new item is created (@pxref{Plain lists}). To force
511headline, use a prefix arg, or first press @key{RET} to get to the 511creation of a new headline, use a prefix arg, or first press @key{RET}
512beginning of the next line. 512to get to the beginning of the next line. When this command is used in
513the middle of a line, the line is split and the rest of the line becomes
514the new headline. If the command is used at the beginning of a
515headline, the new headline is created before the current line. It at
516the beginning of any other line, the content of that line is made the
517new heading.
513@kindex M-S-@key{RET} 518@kindex M-S-@key{RET}
514@item M-S-@key{RET} 519@item M-S-@key{RET}
515Insert new TODO entry with same level as current heading. 520Insert new TODO entry with same level as current heading.
@@ -559,7 +564,7 @@ just after the last headline to change. Note that when the cursor is
559inside a table (@pxref{Tables}), the Meta-Cursor keys have different 564inside a table (@pxref{Tables}), the Meta-Cursor keys have different
560functionality. 565functionality.
561 566
562@node Archiving, Sparse trees, Structure editing, Document Structure 567@node Archiving, Sparse trees, Structure editing, Document structure
563@section Archiving 568@section Archiving
564@cindex archiving 569@cindex archiving
565@cindex filing subtrees 570@cindex filing subtrees
@@ -583,7 +588,7 @@ this, see the documentation string of the variable
583agenda, archiving to a different file is a good way to keep archived 588agenda, archiving to a different file is a good way to keep archived
584trees from contributing agenda items. 589trees from contributing agenda items.
585 590
586@node Sparse trees, Plain Lists, Archiving, Document Structure 591@node Sparse trees, Plain lists, Archiving, Document structure
587@section Sparse trees 592@section Sparse trees
588@cindex sparse trees 593@cindex sparse trees
589@cindex trees, sparse 594@cindex trees, sparse
@@ -643,8 +648,8 @@ the document to another file (extension @file{.txt}) which can then be
643printed in any desired way. 648printed in any desired way.
644 649
645 650
646@node Plain Lists, , Sparse trees, Document Structure 651@node Plain lists, , Sparse trees, Document structure
647@section Plain Lists 652@section Plain lists
648@cindex plain lists 653@cindex plain lists
649@cindex lists, plain 654@cindex lists, plain
650@cindex lists, ordered 655@cindex lists, ordered
@@ -699,7 +704,14 @@ always subordinate to real headlines, the hierarchies remain
699completely separated. 704completely separated.
700@kindex M-@key{RET} 705@kindex M-@key{RET}
701@item M-@key{RET} 706@item M-@key{RET}
702Insert new item at current level. With prefix arg, for a new heading. 707Insert new item at current level. With prefix arg, force a new heading
708(@pxref{Structure editing}). If this command is used in the middle of a
709line, the line is @emph{split} and the rest of the line becomes the new
710item. If this command is executed in the @emph{whitespace before a bullet or
711number}, the new item is created @emph{before} the current item. If the
712command is executed in the white space before the text that is part of
713an item but does not contain the bullet, a bullet is added to the
714current line.
703@kindex M-S-@key{up} 715@kindex M-S-@key{up}
704@kindex M-S-@key{down} 716@kindex M-S-@key{down}
705@item M-S-@key{up} 717@item M-S-@key{up}
@@ -722,7 +734,7 @@ the command chain with a cursor motion or so.
722Renumber the ordered list at the cursor. 734Renumber the ordered list at the cursor.
723@end table 735@end table
724 736
725@node Tables, Hyperlinks, Document Structure, Top 737@node Tables, Hyperlinks, Document structure, Top
726@chapter Tables 738@chapter Tables
727@cindex tables 739@cindex tables
728@cindex editing tables 740@cindex editing tables
@@ -1056,7 +1068,7 @@ A formula can be any algebraic expression understood by the Emacs
1056@file{calc} package. Note that @file{calc} has the slightly 1068@file{calc} package. Note that @file{calc} has the slightly
1057non-standard convention that @samp{/} has lower precedence than 1069non-standard convention that @samp{/} has lower precedence than
1058@samp{*}, so that @samp{a/b*c} is interpreted as @samp{a/(b*c)}. Before 1070@samp{*}, so that @samp{a/b*c} is interpreted as @samp{a/(b*c)}. Before
1059evaluation by @code{calc-eval} (@pxref{Calling Calc from Your Lisp 1071evaluation by @code{calc-eval} (@pxref{Calling Calc from Your
1060Programs,calc-eval,Calling calc from Your Lisp Programs,calc,GNU Emacs 1072Programs,calc-eval,Calling calc from Your Lisp Programs,calc,GNU Emacs
1061Calc Manual}), variable substitution takes place: 1073Calc Manual}), variable substitution takes place:
1062 1074
@@ -1414,6 +1426,9 @@ often it is convenient to put them into a comment line, for example
1414# <<My Target>> 1426# <<My Target>>
1415@end example 1427@end example
1416 1428
1429@noindent In HTML export (@pxref{HTML export}), such targets will become
1430named anchors for direct access through http links.
1431
1417If no dedicated target exists, Org-mode will search for the words in the 1432If no dedicated target exists, Org-mode will search for the words in the
1418link, often removing the need for a dedicated target. In the above 1433link, often removing the need for a dedicated target. In the above
1419example the search would be for @samp{my target}. Links starting with a 1434example the search would be for @samp{my target}. Links starting with a
@@ -1571,9 +1586,10 @@ When @kbd{C-c C-l} is called with a @kbd{C-u} prefix argument, a link to
1571a file will be inserted and you may use file name completion to select 1586a file will be inserted and you may use file name completion to select
1572the name of the file. The path to the file is inserted relative to the 1587the name of the file. The path to the file is inserted relative to the
1573directory of the current org file, if the linked file is in the current 1588directory of the current org file, if the linked file is in the current
1574directory or in a subdirectory of it. Otherwise an absolute path, if 1589directory or in a subdirectory of it, or if the path is written relative
1575possible with @samp{~/} for your home directory is used. You can force 1590to the current directory using @samp{../}. Otherwise an absolute path
1576an absolute path with two @kbd{C-u} prefixes. 1591is used, if possible with @samp{~/} for your home directory. You can
1592force an absolute path with two @kbd{C-u} prefixes.
1577 1593
1578@item C-c C-l @r{with cursor on existing link} 1594@item C-c C-l @r{with cursor on existing link}
1579When the cursor is on an existing link, @kbd{C-c C-l} allows to edit the 1595When the cursor is on an existing link, @kbd{C-c C-l} allows to edit the
@@ -1648,7 +1664,9 @@ Jump to line 255.
1648@item My Target 1664@item My Target
1649Search for a link target @samp{<<My Target>>}, or do a text search for 1665Search for a link target @samp{<<My Target>>}, or do a text search for
1650@samp{my target}, similar to the search in internal links, see 1666@samp{my target}, similar to the search in internal links, see
1651@ref{Internal links}. 1667@ref{Internal links}. In HTML export (@pxref{HTML export}), such a file
1668link will become an html reference to the corresponding named anchor in
1669the linked file.
1652@item *My Target 1670@item *My Target
1653In an Org-mode file, restrict search to headlines. 1671In an Org-mode file, restrict search to headlines.
1654@item /regexp/ 1672@item /regexp/
@@ -1821,7 +1839,7 @@ numerical prefix N, show the tree for the Nth keyword in the variable
1821@kindex C-c a t 1839@kindex C-c a t
1822@item C-c a t 1840@item C-c a t
1823Show the global TODO list. This collects the TODO items from all 1841Show the global TODO list. This collects the TODO items from all
1824agenda files (@pxref{Agenda Views}) into a single buffer. The buffer is in 1842agenda files (@pxref{Agenda views}) into a single buffer. The buffer is in
1825@code{agenda-mode}, so there are commands to examine and manipulate 1843@code{agenda-mode}, so there are commands to examine and manipulate
1826the TODO entries directly from that buffer (@pxref{Agenda commands}). 1844the TODO entries directly from that buffer (@pxref{Agenda commands}).
1827@xref{Global TODO list}, for more information. 1845@xref{Global TODO list}, for more information.
@@ -1847,7 +1865,7 @@ C-t} in the Org-mode buffer or @kbd{t} in the agenda buffer, a line
1847@samp{CLOSED: [timestamp]} will be inserted just after the headline. 1865@samp{CLOSED: [timestamp]} will be inserted just after the headline.
1848If you turn the entry back into a TODO item again through further 1866If you turn the entry back into a TODO item again through further
1849state cycling, that line will be removed again. In the timeline 1867state cycling, that line will be removed again. In the timeline
1850(@pxref{Timeline}) and in the agenda (@pxref{Weekly/Daily Agenda}), 1868(@pxref{Timeline}) and in the agenda (@pxref{Weekly/Daily agenda}),
1851you can then use the @kbd{L} key to display the TODO items closed on 1869you can then use the @kbd{L} key to display the TODO items closed on
1852each day, giving you an overview of what has been done on a day. 1870each day, giving you an overview of what has been done on a day.
1853 1871
@@ -1989,7 +2007,7 @@ headline, like this
1989With its standard setup, Org-mode supports priorities @samp{A}, 2007With its standard setup, Org-mode supports priorities @samp{A},
1990@samp{B}, and @samp{C}. @samp{A} is the highest priority. An entry 2008@samp{B}, and @samp{C}. @samp{A} is the highest priority. An entry
1991without a cookie is treated as priority @samp{B}. Priorities make a 2009without a cookie is treated as priority @samp{B}. Priorities make a
1992difference only in the agenda (@pxref{Weekly/Daily Agenda}). 2010difference only in the agenda (@pxref{Weekly/Daily agenda}).
1993 2011
1994@table @kbd 2012@table @kbd
1995@kindex @kbd{C-c ,} 2013@kindex @kbd{C-c ,}
@@ -2034,14 +2052,16 @@ A time stamp is a specification of a date (possibly with time) in a
2034special format, either @samp{<2003-09-16 Tue>} or @samp{<2003-09-16 2052special format, either @samp{<2003-09-16 Tue>} or @samp{<2003-09-16
2035Tue 09:39>}. A time stamp can appear anywhere in the headline or body 2053Tue 09:39>}. A time stamp can appear anywhere in the headline or body
2036of an org-tree entry. Its presence allows entries to be shown on specific 2054of an org-tree entry. Its presence allows entries to be shown on specific
2037dates in the agenda (@pxref{Weekly/Daily Agenda}). We distinguish: 2055dates in the agenda (@pxref{Weekly/Daily agenda}). We distinguish:
2038 2056
2039@table @var 2057@table @var
2040@cindex timestamp 2058@cindex timestamp
2041@item TIMESTAMP 2059@item TIMESTAMP
2042A simple time stamp just assigns a date/time to an item. In the 2060A simple time stamp just assigns a date/time to an item. This is just
2043timeline and agenda displays, the headline of the entry will be shown 2061like writing down an appointment in a paper agenda, or like writing down
2044exactly on that date. 2062an event in a diary, when you want to take not of when something
2063happened. In the timeline and agenda displays, the headline of an entry
2064associated with a plain time stamp will be shown exactly on that date.
2045 2065
2046@item TIMERANGE 2066@item TIMERANGE
2047@cindex timerange 2067@cindex timerange
@@ -2055,6 +2075,21 @@ example:
2055 <2004-08-23 Mon>--<2004-08-26 Thu> 2075 <2004-08-23 Mon>--<2004-08-26 Thu>
2056@end example 2076@end example
2057 2077
2078@item SCHEDULED
2079@cindex SCHEDULED keyword
2080If a time stamp is preceded by the word @samp{SCHEDULED:}, it means you
2081are planning to start working on that task on the given date. So this is
2082not about recording an event, but about planning your work. The
2083headline will be listed under the given date. In addition, a reminder
2084that the scheduled date has passed will be present in the compilation
2085for @emph{today}, until the entry is marked DONE. I.e., the task will
2086automatically be forwarded until completed.
2087
2088@example
2089*** TODO Call Trillian to ask her out for a date on New Years Eve.
2090 SCHEDULED: <2004-12-25 Sat>
2091@end example
2092
2058@item DEADLINE 2093@item DEADLINE
2059@cindex DEADLINE keyword 2094@cindex DEADLINE keyword
2060If a time stamp is preceded by the word @samp{DEADLINE:}, the task 2095If a time stamp is preceded by the word @samp{DEADLINE:}, the task
@@ -2069,15 +2104,6 @@ continuing until the entry is marked DONE. An example:
2069 The editor in charge is <bbdb:Ford Prefect> 2104 The editor in charge is <bbdb:Ford Prefect>
2070 DEADLINE: <2004-02-29 Sun> 2105 DEADLINE: <2004-02-29 Sun>
2071@end example 2106@end example
2072
2073@item SCHEDULED
2074@cindex SCHEDULED keyword
2075If a time stamp is preceded by the word @samp{SCHEDULED:}, it means
2076you are planning to start working on that task on the given date. The
2077headline will be listed under the given date. In addition, a reminder
2078that the scheduled date has passed will be present in the compilation
2079for @emph{today}, until the entry is marked DONE. I.e., the
2080task will automatically be forwarded.
2081@end table 2107@end table
2082 2108
2083@node Creating timestamps, , Time stamps, Timestamps 2109@node Creating timestamps, , Time stamps, Timestamps
@@ -2120,7 +2146,7 @@ instead.
2120@kindex C-c C-o 2146@kindex C-c C-o
2121@item C-c C-o 2147@item C-c C-o
2122Access the agenda for the date given by the time stamp at point 2148Access the agenda for the date given by the time stamp at point
2123(@pxref{Weekly/Daily Agenda}). 2149(@pxref{Weekly/Daily agenda}).
2124 2150
2125@kindex C-c C-d 2151@kindex C-c C-d
2126@item C-c C-d 2152@item C-c C-d
@@ -2207,7 +2233,7 @@ One month back.
2207Choose date in calendar (only if nothing typed into minibuffer). 2233Choose date in calendar (only if nothing typed into minibuffer).
2208@end table 2234@end table
2209 2235
2210@node Tags, Agenda Views, Timestamps, Top 2236@node Tags, Agenda views, Timestamps, Top
2211@chapter Tags 2237@chapter Tags
2212@cindex tags 2238@cindex tags
2213@cindex headline tagging 2239@cindex headline tagging
@@ -2311,7 +2337,7 @@ tagged @samp{:WORK:} or @samp{:LAPTOP:}. The string
2311@samp{WORK|LAPTOP&NIGHT} requires that the @samp{:LAPTOP:} lines are 2337@samp{WORK|LAPTOP&NIGHT} requires that the @samp{:LAPTOP:} lines are
2312also tagged @samp{NIGHT}. 2338also tagged @samp{NIGHT}.
2313 2339
2314@node Agenda Views, Exporting, Tags, Top 2340@node Agenda views, Exporting, Tags, Top
2315@chapter Agenda Views 2341@chapter Agenda Views
2316@cindex agenda views 2342@cindex agenda views
2317 2343
@@ -2345,14 +2371,14 @@ edit these files remotely.
2345@menu 2371@menu
2346* Agenda files:: Files being searched for agenda information 2372* Agenda files:: Files being searched for agenda information
2347* Agenda dispatcher:: Keyboard access to agenda views 2373* Agenda dispatcher:: Keyboard access to agenda views
2348* Weekly/Daily Agenda:: The calendar page with current tasks 2374* Weekly/Daily agenda:: The calendar page with current tasks
2349* Global TODO list:: All unfinished action items 2375* Global TODO list:: All unfinished action items
2350* Matching headline tags:: Structured information with fine-tuned search 2376* Matching headline tags:: Structured information with fine-tuned search
2351* Timeline:: Time-sorted view for single file 2377* Timeline:: Time-sorted view for single file
2352* Agenda commands:: Remote editing of org trees 2378* Agenda commands:: Remote editing of org trees
2353@end menu 2379@end menu
2354 2380
2355@node Agenda files, Agenda dispatcher, Agenda Views, Agenda Views 2381@node Agenda files, Agenda dispatcher, Agenda views, Agenda views
2356@section Agenda files 2382@section Agenda files
2357 2383
2358The information to be shown is collected from all @emph{agenda files}, 2384The information to be shown is collected from all @emph{agenda files},
@@ -2385,7 +2411,7 @@ Cycle through agenda file list, visiting one file after the other.
2385The Org menu contains the current list of files and can be used 2411The Org menu contains the current list of files and can be used
2386to visit any of them. 2412to visit any of them.
2387 2413
2388@node Agenda dispatcher, Weekly/Daily Agenda, Agenda files, Agenda Views 2414@node Agenda dispatcher, Weekly/Daily agenda, Agenda files, Agenda views
2389@section The agenda dispatcher 2415@section The agenda dispatcher
2390@cindex agenda dispatcher 2416@cindex agenda dispatcher
2391@cindex dispatching agenda commands 2417@cindex dispatching agenda commands
@@ -2400,7 +2426,7 @@ letter is required to execute a command. The dispatcher offers the
2400following default commands: 2426following default commands:
2401@table @kbd 2427@table @kbd
2402@item a 2428@item a
2403Create the calendar-like agenda (@pxref{Weekly/Daily Agenda}). 2429Create the calendar-like agenda (@pxref{Weekly/Daily agenda}).
2404@item t / T 2430@item t / T
2405Create a list of all TODO items (@pxref{Global TODO list}). 2431Create a list of all TODO items (@pxref{Global TODO list}).
2406@item m / M 2432@item m / M
@@ -2438,7 +2464,7 @@ f} to create a sparse tree with all entries containing the word
2438@samp{FIXME}. For more information, look at the documentation string 2464@samp{FIXME}. For more information, look at the documentation string
2439of the variable @code{org-agenda-custom-commands}. 2465of the variable @code{org-agenda-custom-commands}.
2440 2466
2441@node Weekly/Daily Agenda, Global TODO list, Agenda dispatcher, Agenda Views 2467@node Weekly/Daily agenda, Global TODO list, Agenda dispatcher, Agenda views
2442@section The weekly/daily agenda 2468@section The weekly/daily agenda
2443@cindex agenda 2469@cindex agenda
2444 2470
@@ -2468,7 +2494,7 @@ commands}.
2468* Sorting of agenda items:: The order of things 2494* Sorting of agenda items:: The order of things
2469@end menu 2495@end menu
2470 2496
2471@node Categories, Time-of-day specifications, Weekly/Daily Agenda, Weekly/Daily Agenda 2497@node Categories, Time-of-day specifications, Weekly/Daily agenda, Weekly/Daily agenda
2472@subsection Categories 2498@subsection Categories
2473 2499
2474@cindex category 2500@cindex category
@@ -2485,7 +2511,7 @@ for the text below it (but the first category also applies to any text
2485before the first CATEGORY line). The display in the agenda buffer looks 2511before the first CATEGORY line). The display in the agenda buffer looks
2486best if the category is not longer than 10 characters. 2512best if the category is not longer than 10 characters.
2487 2513
2488@node Time-of-day specifications, Calendar/Diary integration, Categories, Weekly/Daily Agenda 2514@node Time-of-day specifications, Calendar/Diary integration, Categories, Weekly/Daily agenda
2489@subsection Time-of-Day Specifications 2515@subsection Time-of-Day Specifications
2490 2516
2491Org-mode checks each agenda item for a time-of-day specification. The 2517Org-mode checks each agenda item for a time-of-day specification. The
@@ -2533,7 +2559,7 @@ The time grid can be turned on and off with the variable
2533@code{org-agenda-time-grid}. 2559@code{org-agenda-time-grid}.
2534 2560
2535 2561
2536@node Calendar/Diary integration, Sorting of agenda items, Time-of-day specifications, Weekly/Daily Agenda 2562@node Calendar/Diary integration, Sorting of agenda items, Time-of-day specifications, Weekly/Daily agenda
2537@subsection Calendar/Diary integration 2563@subsection Calendar/Diary integration
2538@cindex calendar integration 2564@cindex calendar integration
2539@cindex diary integration 2565@cindex diary integration
@@ -2564,7 +2590,7 @@ Sunrise/Sunset times, show lunar phases and to convert to other
2564calendars, respectively. @kbd{c} can be used to switch back and forth 2590calendars, respectively. @kbd{c} can be used to switch back and forth
2565between calendar and agenda. 2591between calendar and agenda.
2566 2592
2567@node Sorting of agenda items, , Calendar/Diary integration, Weekly/Daily Agenda 2593@node Sorting of agenda items, , Calendar/Diary integration, Weekly/Daily agenda
2568@subsection Sorting of agenda items 2594@subsection Sorting of agenda items
2569@cindex sorting, of agenda items 2595@cindex sorting, of agenda items
2570@cindex priorities, of agenda items 2596@cindex priorities, of agenda items
@@ -2583,7 +2609,7 @@ Sorting can be customized using the variable
2583@code{org-agenda-sorting-strategy}. 2609@code{org-agenda-sorting-strategy}.
2584 2610
2585 2611
2586@node Global TODO list, Matching headline tags, Weekly/Daily Agenda, Agenda Views 2612@node Global TODO list, Matching headline tags, Weekly/Daily agenda, Agenda views
2587@section The global TODO list 2613@section The global TODO list
2588@cindex global TODO list 2614@cindex global TODO list
2589@cindex TODO list, global 2615@cindex TODO list, global
@@ -2595,7 +2621,7 @@ collected into a single place.
2595@kindex C-c a t 2621@kindex C-c a t
2596@item C-c a t 2622@item C-c a t
2597Show the global TODO list. This collects the TODO items from all 2623Show the global TODO list. This collects the TODO items from all
2598agenda files (@pxref{Agenda Views}) into a single buffer. The buffer is in 2624agenda files (@pxref{Agenda views}) into a single buffer. The buffer is in
2599@code{agenda-mode}, so there are commands to examine and manipulate 2625@code{agenda-mode}, so there are commands to examine and manipulate
2600the TODO entries directly from that buffer (@pxref{Agenda commands}). 2626the TODO entries directly from that buffer (@pxref{Agenda commands}).
2601@xref{Global TODO list}, for more information. 2627@xref{Global TODO list}, for more information.
@@ -2616,7 +2642,7 @@ Remote editing of TODO items means that you can change the state of a
2616TODO entry with a single key press. The commands available in the 2642TODO entry with a single key press. The commands available in the
2617TODO list are described in @ref{Agenda commands}. 2643TODO list are described in @ref{Agenda commands}.
2618 2644
2619@node Matching headline tags, Timeline, Global TODO list, Agenda Views 2645@node Matching headline tags, Timeline, Global TODO list, Agenda views
2620@section Matching headline tags 2646@section Matching headline tags
2621@cindex matching, of tags 2647@cindex matching, of tags
2622@cindex tags view 2648@cindex tags view
@@ -2643,7 +2669,7 @@ and force checking subitems (see variable
2643The commands available in the tags list are described in @ref{Agenda 2669The commands available in the tags list are described in @ref{Agenda
2644commands}. 2670commands}.
2645 2671
2646@node Timeline, Agenda commands, Matching headline tags, Agenda Views 2672@node Timeline, Agenda commands, Matching headline tags, Agenda views
2647@section Timeline for a single file 2673@section Timeline for a single file
2648@cindex single file summary 2674@cindex single file summary
2649@cindex agenda, for single file 2675@cindex agenda, for single file
@@ -2669,7 +2695,7 @@ When called with a @kbd{C-u} prefix, all unfinished TODO entries
2669The commands available in the timeline buffer are listed in 2695The commands available in the timeline buffer are listed in
2670@ref{Agenda commands}. 2696@ref{Agenda commands}.
2671 2697
2672@node Agenda commands, , Timeline, Agenda Views 2698@node Agenda commands, , Timeline, Agenda views
2673@section Commands in the agenda buffer 2699@section Commands in the agenda buffer
2674@cindex commands, in agenda buffer 2700@cindex commands, in agenda buffer
2675 2701
@@ -2886,7 +2912,7 @@ visit org files will not be removed.
2886 2912
2887@end table 2913@end table
2888 2914
2889@node Exporting, Miscellaneous, Agenda Views, Top 2915@node Exporting, Miscellaneous, Agenda views, Top
2890@chapter Exporting 2916@chapter Exporting
2891@cindex exporting 2917@cindex exporting
2892 2918
@@ -3003,6 +3029,9 @@ the new style visible to Emacs. This command restarts org-mode for the
3003current buffer and forces Emacs to re-evaluate the local variables 3029current buffer and forces Emacs to re-evaluate the local variables
3004section in the buffer. 3030section in the buffer.
3005 3031
3032@c FIXME: More about header and footer styles
3033@c FIXME: Talk about links and targets.
3034
3006@node XML export, iCalendar export, HTML export, Exporting 3035@node XML export, iCalendar export, HTML export, Exporting
3007@section XML export 3036@section XML export
3008@cindex XML export 3037@cindex XML export
@@ -3114,7 +3143,7 @@ formatted output.
3114@item 3143@item
3115Plain lists @samp{-}, @samp{*} or @samp{+} as bullet, or with @samp{1.} 3144Plain lists @samp{-}, @samp{*} or @samp{+} as bullet, or with @samp{1.}
3116or @samp{2)} as enumerator will be recognized and transformed if the 3145or @samp{2)} as enumerator will be recognized and transformed if the
3117backend supports lists. See @xref{Plain Lists}. 3146backend supports lists. See @xref{Plain lists}.
3118 3147
3119@cindex underlined text 3148@cindex underlined text
3120@cindex bold text 3149@cindex bold text
@@ -3835,6 +3864,8 @@ specified time.
3835@item 3864@item
3836Sacha Chua suggested to copy some linking code from Planner. 3865Sacha Chua suggested to copy some linking code from Planner.
3837@item 3866@item
3867Kees Dullemond inspired the use of narrowed tabled columns.
3868@item
3838Christian Egli converted the documentation into TeXInfo format, patched 3869Christian Egli converted the documentation into TeXInfo format, patched
3839CSS formatting into the HTML exporter, and inspired the agenda. 3870CSS formatting into the HTML exporter, and inspired the agenda.
3840@item 3871@item
diff --git a/man/trampver.texi b/man/trampver.texi
index 625e3869c11..4fc3958b2f2 100644
--- a/man/trampver.texi
+++ b/man/trampver.texi
@@ -4,7 +4,7 @@
4@c In the Tramp CVS, the version number is auto-frobbed from 4@c In the Tramp CVS, the version number is auto-frobbed from
5@c configure.ac, so you should edit that file and run 5@c configure.ac, so you should edit that file and run
6@c "autoconf && ./configure" to change the version number. 6@c "autoconf && ./configure" to change the version number.
7@set trampver 2.0.52 7@set trampver 2.0.53
8 8
9@c Other flags from configuration 9@c Other flags from configuration
10@set prefix /usr/local 10@set prefix /usr/local
diff --git a/src/ChangeLog b/src/ChangeLog
index 88492417723..5c66a6b5c7d 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,8 +1,66 @@
12006-04-21 Nick Roberts <nickrob@snap.net.nz>
2
3 * xdisp.c (note_mouse_highlight): Use build_string.
4
52006-04-20 Lars Hansen <larsh@soem.dk>
6
7 * textprop.c (Fremove_list_of_text_properties): Ensure
8 modify_region is called only when buffer is modified and that
9 signal_after_change is allways called in that case.
10
11 * print.c (PRINTFINISH): Call signal_after_change.
12
132006-04-20 Kim F. Storm <storm@cua.dk>
14
15 * xdisp.c (redisplay_window): Fix last change.
16
17 * xdisp.c (redisplay_window): If current window start is not at the
18 beginning of a line, select a new window start if buffer is modified
19 and window start is in the modified region, but the first change is
20 before window start.
21
222006-04-18 Richard Stallman <rms@gnu.org>
23
24 * xmenu.c (restore_menu_items, save_menu_items): New fns.
25 (set_frame_menubar): Use save_menu_items. Save updated vector in
26 the frame before unwinding it. Don't use unuse_menu_items. Don't
27 use discard_menu_items.
28 (digest_single_submenu): Abort if an item is not in a pane.
29 (init_menu_items): Put the error check at the top.
30
31 * keymap.c (describe_map): Make "shadowed" warning more verbose.
32
33 * window.c (adjust_window_trailing_edge): Correctly distinguish
34 series vs parallel cases, even when window has no parent.
35
36 * abbrev.c (record_symbol): New function.
37 (Finsert_abbrev_table_description): Sort the abbrevs alphabetically.
38
392006-04-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
40
41 * image.c (x_create_bitmap_from_data) [MAC_OS]: Don't check return
42 value of xmalloc.
43
44 * mac.c (mac_coerce_file_name_ptr, mac_coerce_file_name_desc)
45 (create_apple_event_from_event_ref, xrm_get_preference_database)
46 (cfstring_create_normalized): Don't check return value of xmalloc.
47
48 * macselect.c (get_scrap_target_type_list, defer_apple_events)
49 (copy_scrap_flavor_data, mac_handle_service_event): Don't check
50 return value of xmalloc/xrealloc.
51
52 * macterm.c (XCreateGC, x_per_char_metric, xlfdpat_create)
53 (init_font_name_table, init_font_name_table, mac_do_list_fonts)
54 (XLoadQueryFont, mac_store_apple_event): Don't check
55 return value of xmalloc.
56
12006-04-17 Kim F. Storm <storm@cua.dk> 572006-04-17 Kim F. Storm <storm@cua.dk>
2 58
3 * window.c (coordinates_in_window): On the vertical border, 59 * window.c (coordinates_in_window): On the vertical border,
4 calculate the row number measured from the top of the window, not 60 calculate the row number measured from the top of the window, not
5 the top of the frame. 61 the top of the frame.
62 (window_loop): Test w->dedicated with !NILP instead of EQ Qt.
63 (window_scroll_pixel_based): Fix off-by-one bug in 2002-12-23 change.
6 64
72006-04-16 Eli Zaretskii <eliz@gnu.org> 652006-04-16 Eli Zaretskii <eliz@gnu.org>
8 66
diff --git a/src/abbrev.c b/src/abbrev.c
index 13da66f5801..f47a83b0bfe 100644
--- a/src/abbrev.c
+++ b/src/abbrev.c
@@ -537,6 +537,13 @@ describe_abbrev (sym, stream)
537 Fterpri (stream); 537 Fterpri (stream);
538} 538}
539 539
540static void
541record_symbol (sym, list)
542 Lisp_Object sym, list;
543{
544 XSETCDR (list, Fcons (sym, XCDR (list)));
545}
546
540DEFUN ("insert-abbrev-table-description", Finsert_abbrev_table_description, 547DEFUN ("insert-abbrev-table-description", Finsert_abbrev_table_description,
541 Sinsert_abbrev_table_description, 1, 2, 0, 548 Sinsert_abbrev_table_description, 1, 2, 0,
542 doc: /* Insert before point a full description of abbrev table named NAME. 549 doc: /* Insert before point a full description of abbrev table named NAME.
@@ -552,6 +559,7 @@ READABLE is non-nil, they are listed. */)
552 Lisp_Object name, readable; 559 Lisp_Object name, readable;
553{ 560{
554 Lisp_Object table; 561 Lisp_Object table;
562 Lisp_Object symbols;
555 Lisp_Object stream; 563 Lisp_Object stream;
556 564
557 CHECK_SYMBOL (name); 565 CHECK_SYMBOL (name);
@@ -560,12 +568,22 @@ READABLE is non-nil, they are listed. */)
560 568
561 XSETBUFFER (stream, current_buffer); 569 XSETBUFFER (stream, current_buffer);
562 570
571 symbols = Fcons (Qnil, Qnil);
572 map_obarray (table, record_symbol, symbols);
573 symbols = XCDR (symbols);
574 symbols = Fsort (symbols, Qstring_lessp);
575
563 if (!NILP (readable)) 576 if (!NILP (readable))
564 { 577 {
565 insert_string ("("); 578 insert_string ("(");
566 Fprin1 (name, stream); 579 Fprin1 (name, stream);
567 insert_string (")\n\n"); 580 insert_string (")\n\n");
568 map_obarray (table, describe_abbrev, stream); 581 while (! NILP (symbols))
582 {
583 describe_abbrev (XCAR (symbols), stream);
584 symbols = XCDR (symbols);
585 }
586
569 insert_string ("\n\n"); 587 insert_string ("\n\n");
570 } 588 }
571 else 589 else
@@ -573,7 +591,11 @@ READABLE is non-nil, they are listed. */)
573 insert_string ("(define-abbrev-table '"); 591 insert_string ("(define-abbrev-table '");
574 Fprin1 (name, stream); 592 Fprin1 (name, stream);
575 insert_string (" '(\n"); 593 insert_string (" '(\n");
576 map_obarray (table, write_abbrev, stream); 594 while (! NILP (symbols))
595 {
596 write_abbrev (XCAR (symbols), stream);
597 symbols = XCDR (symbols);
598 }
577 insert_string (" ))\n\n"); 599 insert_string (" ))\n\n");
578 } 600 }
579 601
diff --git a/src/eval.c b/src/eval.c
index 86ee384896c..20f29b5f06b 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -204,6 +204,7 @@ init_eval_once ()
204 specpdl_size = 50; 204 specpdl_size = 50;
205 specpdl = (struct specbinding *) xmalloc (specpdl_size * sizeof (struct specbinding)); 205 specpdl = (struct specbinding *) xmalloc (specpdl_size * sizeof (struct specbinding));
206 specpdl_ptr = specpdl; 206 specpdl_ptr = specpdl;
207 /* Don't forget to update docs (lispref node "Local Variables"). */
207 max_specpdl_size = 1000; 208 max_specpdl_size = 1000;
208 max_lisp_eval_depth = 300; 209 max_lisp_eval_depth = 300;
209 210
diff --git a/src/image.c b/src/image.c
index 91aa1198769..10c402be119 100644
--- a/src/image.c
+++ b/src/image.c
@@ -201,7 +201,7 @@ XPutPixel (ximage, x, y, pixel)
201 } 201 }
202 else 202 else
203#endif 203#endif
204 if (depth == 1) 204 if (depth == 1)
205 { 205 {
206 char *base_addr = GetPixBaseAddr (pixmap); 206 char *base_addr = GetPixBaseAddr (pixmap);
207 short row_bytes = GetPixRowBytes (pixmap); 207 short row_bytes = GetPixRowBytes (pixmap);
@@ -444,8 +444,6 @@ x_create_bitmap_from_data (f, bits, width, height)
444 id = x_allocate_bitmap_record (f); 444 id = x_allocate_bitmap_record (f);
445#ifdef MAC_OS 445#ifdef MAC_OS
446 dpyinfo->bitmaps[id - 1].bitmap_data = (char *) xmalloc (height * width); 446 dpyinfo->bitmaps[id - 1].bitmap_data = (char *) xmalloc (height * width);
447 if (! dpyinfo->bitmaps[id - 1].bitmap_data)
448 return -1;
449 bcopy (bits, dpyinfo->bitmaps[id - 1].bitmap_data, height * width); 447 bcopy (bits, dpyinfo->bitmaps[id - 1].bitmap_data, height * width);
450#endif /* MAC_OS */ 448#endif /* MAC_OS */
451 449
diff --git a/src/keymap.c b/src/keymap.c
index e5122c84efc..6930ed08d8c 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -3391,7 +3391,7 @@ describe_map (map, prefix, elt_describer, partial, shadow,
3391 if (vect[i].shadowed) 3391 if (vect[i].shadowed)
3392 { 3392 {
3393 SET_PT (PT - 1); 3393 SET_PT (PT - 1);
3394 insert_string (" (shadowed)"); 3394 insert_string ("\n (that binding is currently shadowed by another mode)");
3395 SET_PT (PT + 1); 3395 SET_PT (PT + 1);
3396 } 3396 }
3397 } 3397 }
diff --git a/src/mac.c b/src/mac.c
index 2b4e8dcbc64..7172301b6b0 100644
--- a/src/mac.c
+++ b/src/mac.c
@@ -453,15 +453,10 @@ mac_coerce_file_name_ptr (type_code, data_ptr, data_size,
453 char *buf; 453 char *buf;
454 454
455 buf = xmalloc (data_size + 1); 455 buf = xmalloc (data_size + 1);
456 if (buf) 456 memcpy (buf, data_ptr, data_size);
457 { 457 buf[data_size] = '\0';
458 memcpy (buf, data_ptr, data_size); 458 err = posix_pathname_to_fsspec (buf, &fs);
459 buf[data_size] = '\0'; 459 xfree (buf);
460 err = posix_pathname_to_fsspec (buf, &fs);
461 xfree (buf);
462 }
463 else
464 err = memFullErr;
465 if (err == noErr) 460 if (err == noErr)
466 err = AECoercePtr (typeFSS, &fs, sizeof (FSSpec), to_type, result); 461 err = AECoercePtr (typeFSS, &fs, sizeof (FSSpec), to_type, result);
467#endif 462#endif
@@ -489,14 +484,11 @@ mac_coerce_file_name_ptr (type_code, data_ptr, data_size,
489 { 484 {
490 size = AEGetDescDataSize (&desc); 485 size = AEGetDescDataSize (&desc);
491 buf = xmalloc (size); 486 buf = xmalloc (size);
492 if (buf) 487 err = AEGetDescData (&desc, buf, size);
493 { 488 if (err == noErr)
494 err = AEGetDescData (&desc, buf, size); 489 url = CFURLCreateWithBytes (NULL, buf, size,
495 if (err == noErr) 490 kCFStringEncodingUTF8, NULL);
496 url = CFURLCreateWithBytes (NULL, buf, size, 491 xfree (buf);
497 kCFStringEncodingUTF8, NULL);
498 xfree (buf);
499 }
500 AEDisposeDesc (&desc); 492 AEDisposeDesc (&desc);
501 } 493 }
502 } 494 }
@@ -581,21 +573,16 @@ mac_coerce_file_name_desc (from_desc, to_type, handler_refcon, result)
581 data_size = GetHandleSize (from_desc->dataHandle); 573 data_size = GetHandleSize (from_desc->dataHandle);
582#endif 574#endif
583 data_ptr = xmalloc (data_size); 575 data_ptr = xmalloc (data_size);
584 if (data_ptr)
585 {
586#if TARGET_API_MAC_CARBON 576#if TARGET_API_MAC_CARBON
587 err = AEGetDescData (from_desc, data_ptr, data_size); 577 err = AEGetDescData (from_desc, data_ptr, data_size);
588#else 578#else
589 memcpy (data_ptr, *(from_desc->dataHandle), data_size); 579 memcpy (data_ptr, *(from_desc->dataHandle), data_size);
590#endif 580#endif
591 if (err == noErr) 581 if (err == noErr)
592 err = mac_coerce_file_name_ptr (from_type, data_ptr, 582 err = mac_coerce_file_name_ptr (from_type, data_ptr,
593 data_size, to_type, 583 data_size, to_type,
594 handler_refcon, result); 584 handler_refcon, result);
595 xfree (data_ptr); 585 xfree (data_ptr);
596 }
597 else
598 err = memFullErr;
599 } 586 }
600 587
601 if (err != noErr) 588 if (err != noErr)
@@ -691,8 +678,6 @@ create_apple_event_from_event_ref (event, num_params, names, types, result)
691 if (err != noErr) 678 if (err != noErr)
692 break; 679 break;
693 buf = xmalloc (size); 680 buf = xmalloc (size);
694 if (buf == NULL)
695 break;
696 err = GetEventParameter (event, names[i], types[i], NULL, 681 err = GetEventParameter (event, names[i], types[i], NULL,
697 size, NULL, buf); 682 size, NULL, buf);
698 if (err == noErr) 683 if (err == noErr)
@@ -1596,8 +1581,6 @@ xrm_get_preference_database (application)
1596 1581
1597 count = CFSetGetCount (key_set); 1582 count = CFSetGetCount (key_set);
1598 keys = xmalloc (sizeof (CFStringRef) * count); 1583 keys = xmalloc (sizeof (CFStringRef) * count);
1599 if (keys == NULL)
1600 goto out;
1601 CFSetGetValues (key_set, (const void **)keys); 1584 CFSetGetValues (key_set, (const void **)keys);
1602 for (index = 0; index < count; index++) 1585 for (index = 0; index < count; index++)
1603 { 1586 {
@@ -4547,11 +4530,8 @@ cfstring_create_normalized (str, symbol)
4547 if (in_text == NULL) 4530 if (in_text == NULL)
4548 { 4531 {
4549 buffer = xmalloc (sizeof (UniChar) * length); 4532 buffer = xmalloc (sizeof (UniChar) * length);
4550 if (buffer) 4533 CFStringGetCharacters (str, CFRangeMake (0, length), buffer);
4551 { 4534 in_text = buffer;
4552 CFStringGetCharacters (str, CFRangeMake (0, length), buffer);
4553 in_text = buffer;
4554 }
4555 } 4535 }
4556 4536
4557 if (in_text) 4537 if (in_text)
@@ -4559,15 +4539,12 @@ cfstring_create_normalized (str, symbol)
4559 while (err == noErr) 4539 while (err == noErr)
4560 { 4540 {
4561 out_buf = xmalloc (out_size); 4541 out_buf = xmalloc (out_size);
4562 if (out_buf == NULL) 4542 err = ConvertFromUnicodeToText (uni, length * sizeof (UniChar),
4563 err = mFulErr; 4543 in_text,
4564 else 4544 kUnicodeDefaultDirectionMask,
4565 err = ConvertFromUnicodeToText (uni, length * sizeof (UniChar), 4545 0, NULL, NULL, NULL,
4566 in_text, 4546 out_size, &out_read, &out_len,
4567 kUnicodeDefaultDirectionMask, 4547 out_buf);
4568 0, NULL, NULL, NULL,
4569 out_size, &out_read, &out_len,
4570 out_buf);
4571 if (err == noErr && out_read < length * sizeof (UniChar)) 4548 if (err == noErr && out_read < length * sizeof (UniChar))
4572 { 4549 {
4573 xfree (out_buf); 4550 xfree (out_buf);
diff --git a/src/macselect.c b/src/macselect.c
index 8312197181f..fe4a7c8eccc 100644
--- a/src/macselect.c
+++ b/src/macselect.c
@@ -373,14 +373,11 @@ get_scrap_target_type_list (scrap)
373 err = GetScrapFlavorCount (scrap, &count); 373 err = GetScrapFlavorCount (scrap, &count);
374 if (err == noErr) 374 if (err == noErr)
375 flavor_info = xmalloc (sizeof (ScrapFlavorInfo) * count); 375 flavor_info = xmalloc (sizeof (ScrapFlavorInfo) * count);
376 if (flavor_info) 376 err = GetScrapFlavorInfoList (scrap, &count, flavor_info);
377 if (err != noErr)
377 { 378 {
378 err = GetScrapFlavorInfoList (scrap, &count, flavor_info); 379 xfree (flavor_info);
379 if (err != noErr) 380 flavor_info = NULL;
380 {
381 xfree (flavor_info);
382 flavor_info = NULL;
383 }
384 } 381 }
385 if (flavor_info == NULL) 382 if (flavor_info == NULL)
386 count = 0; 383 count = 0;
@@ -1021,20 +1018,13 @@ defer_apple_events (apple_event, reply)
1021 deferred_apple_events.count = 0; 1018 deferred_apple_events.count = 0;
1022 deferred_apple_events.buf = 1019 deferred_apple_events.buf =
1023 xmalloc (sizeof (AppleEvent) * deferred_apple_events.size); 1020 xmalloc (sizeof (AppleEvent) * deferred_apple_events.size);
1024 if (deferred_apple_events.buf == NULL)
1025 err = memFullErr;
1026 } 1021 }
1027 else if (deferred_apple_events.count == deferred_apple_events.size) 1022 else if (deferred_apple_events.count == deferred_apple_events.size)
1028 { 1023 {
1029 AppleEvent *newbuf;
1030
1031 deferred_apple_events.size *= 2; 1024 deferred_apple_events.size *= 2;
1032 newbuf = xrealloc (deferred_apple_events.buf, 1025 deferred_apple_events.buf
1033 sizeof (AppleEvent) * deferred_apple_events.size); 1026 = xrealloc (deferred_apple_events.buf,
1034 if (newbuf) 1027 sizeof (AppleEvent) * deferred_apple_events.size);
1035 deferred_apple_events.buf = newbuf;
1036 else
1037 err = memFullErr;
1038 } 1028 }
1039 } 1029 }
1040 1030
@@ -1192,17 +1182,7 @@ copy_scrap_flavor_data (from_scrap, to_scrap, flavor_type)
1192 buf = NULL; 1182 buf = NULL;
1193 } 1183 }
1194 else if (size_allocated < size) 1184 else if (size_allocated < size)
1195 { 1185 buf = xrealloc (buf, size);
1196 char *newbuf = xrealloc (buf, size);
1197
1198 if (newbuf)
1199 buf = newbuf;
1200 else
1201 {
1202 xfree (buf);
1203 buf = NULL;
1204 }
1205 }
1206 else 1186 else
1207 break; 1187 break;
1208 } 1188 }
@@ -1302,14 +1282,11 @@ mac_handle_service_event (call_ref, event, data)
1302 err = GetScrapFlavorCount (cur_scrap, &count); 1282 err = GetScrapFlavorCount (cur_scrap, &count);
1303 if (err == noErr) 1283 if (err == noErr)
1304 flavor_info = xmalloc (sizeof (ScrapFlavorInfo) * count); 1284 flavor_info = xmalloc (sizeof (ScrapFlavorInfo) * count);
1305 if (flavor_info) 1285 err = GetScrapFlavorInfoList (cur_scrap, &count, flavor_info);
1286 if (err != noErr)
1306 { 1287 {
1307 err = GetScrapFlavorInfoList (cur_scrap, &count, flavor_info); 1288 xfree (flavor_info);
1308 if (err != noErr) 1289 flavor_info = NULL;
1309 {
1310 xfree (flavor_info);
1311 flavor_info = NULL;
1312 }
1313 } 1290 }
1314 if (flavor_info == NULL) 1291 if (flavor_info == NULL)
1315 break; 1292 break;
diff --git a/src/macterm.c b/src/macterm.c
index 5c3787c2a51..b7a7fadeab2 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -1510,11 +1510,8 @@ XCreateGC (display, window, mask, xgcv)
1510{ 1510{
1511 GC gc = xmalloc (sizeof (*gc)); 1511 GC gc = xmalloc (sizeof (*gc));
1512 1512
1513 if (gc) 1513 bzero (gc, sizeof (*gc));
1514 { 1514 XChangeGC (display, gc, mask, xgcv);
1515 bzero (gc, sizeof (*gc));
1516 XChangeGC (display, gc, mask, xgcv);
1517 }
1518 1515
1519 return gc; 1516 return gc;
1520} 1517}
@@ -2163,21 +2160,17 @@ x_per_char_metric (font, char2b)
2163 if (*row == NULL) 2160 if (*row == NULL)
2164 { 2161 {
2165 *row = xmalloc (sizeof (XCharStructRow)); 2162 *row = xmalloc (sizeof (XCharStructRow));
2166 if (*row) 2163 bzero (*row, sizeof (XCharStructRow));
2167 bzero (*row, sizeof (XCharStructRow));
2168 } 2164 }
2169 if (*row) 2165 pcm = (*row)->per_char + char2b->byte2;
2166 if (!XCHARSTRUCTROW_CHAR_VALID_P (*row, char2b->byte2))
2170 { 2167 {
2171 pcm = (*row)->per_char + char2b->byte2; 2168 BLOCK_INPUT;
2172 if (!XCHARSTRUCTROW_CHAR_VALID_P (*row, char2b->byte2)) 2169 mac_query_char_extents (font->mac_style,
2173 { 2170 (char2b->byte1 << 8) + char2b->byte2,
2174 BLOCK_INPUT; 2171 NULL, NULL, pcm, NULL);
2175 mac_query_char_extents (font->mac_style, 2172 UNBLOCK_INPUT;
2176 (char2b->byte1 << 8) + char2b->byte2, 2173 XCHARSTRUCTROW_SET_CHAR_VALID (*row, char2b->byte2);
2177 NULL, NULL, pcm, NULL);
2178 UNBLOCK_INPUT;
2179 XCHARSTRUCTROW_SET_CHAR_VALID (*row, char2b->byte2);
2180 }
2181 } 2174 }
2182 } 2175 }
2183 else 2176 else
@@ -6582,12 +6575,7 @@ xlfdpat_create (pattern)
6582 struct xlfdpat_block *blk; 6575 struct xlfdpat_block *blk;
6583 6576
6584 pat = xmalloc (sizeof (struct xlfdpat)); 6577 pat = xmalloc (sizeof (struct xlfdpat));
6585 if (pat == NULL)
6586 goto error;
6587
6588 pat->buf = xmalloc (strlen (pattern) + 1); 6578 pat->buf = xmalloc (strlen (pattern) + 1);
6589 if (pat->buf == NULL)
6590 goto error;
6591 6579
6592 /* Normalize the pattern string and store it to `pat->buf'. */ 6580 /* Normalize the pattern string and store it to `pat->buf'. */
6593 nblocks = 0; 6581 nblocks = 0;
@@ -6651,8 +6639,6 @@ xlfdpat_create (pattern)
6651 } 6639 }
6652 6640
6653 pat->blocks = xmalloc (sizeof (struct xlfdpat_block) * nblocks); 6641 pat->blocks = xmalloc (sizeof (struct xlfdpat_block) * nblocks);
6654 if (pat->blocks == NULL)
6655 goto error;
6656 6642
6657 /* Divide the normalized pattern into blocks. */ 6643 /* Divide the normalized pattern into blocks. */
6658 p = pat->buf; 6644 p = pat->buf;
@@ -7112,9 +7098,10 @@ init_font_name_table ()
7112 Qnil, Qnil, Qnil);; 7098 Qnil, Qnil, Qnil);;
7113 err = ATSUFontCount (&nfonts); 7099 err = ATSUFontCount (&nfonts);
7114 if (err == noErr) 7100 if (err == noErr)
7115 font_ids = xmalloc (sizeof (ATSUFontID) * nfonts); 7101 {
7116 if (font_ids) 7102 font_ids = xmalloc (sizeof (ATSUFontID) * nfonts);
7117 err = ATSUGetFontIDs (font_ids, nfonts, NULL); 7103 err = ATSUGetFontIDs (font_ids, nfonts, NULL);
7104 }
7118 if (err == noErr) 7105 if (err == noErr)
7119 for (i = 0; i < nfonts; i++) 7106 for (i = 0; i < nfonts; i++)
7120 { 7107 {
@@ -7124,8 +7111,6 @@ init_font_name_table ()
7124 if (err != noErr) 7111 if (err != noErr)
7125 continue; 7112 continue;
7126 name = xmalloc (name_len + 1); 7113 name = xmalloc (name_len + 1);
7127 if (name == NULL)
7128 continue;
7129 name[name_len] = '\0'; 7114 name[name_len] = '\0';
7130 err = ATSUFindFontName (font_ids[i], kFontFamilyName, 7115 err = ATSUFindFontName (font_ids[i], kFontFamilyName,
7131 kFontMacintoshPlatform, kFontNoScript, 7116 kFontMacintoshPlatform, kFontNoScript,
@@ -7455,8 +7440,6 @@ mac_do_list_fonts (pattern, maxnames)
7455 int former_len = ptr - font_name_table[i]; 7440 int former_len = ptr - font_name_table[i];
7456 7441
7457 scaled = xmalloc (strlen (font_name_table[i]) + 20 + 1); 7442 scaled = xmalloc (strlen (font_name_table[i]) + 20 + 1);
7458 if (scaled == NULL)
7459 continue;
7460 memcpy (scaled, font_name_table[i], former_len); 7443 memcpy (scaled, font_name_table[i], former_len);
7461 sprintf (scaled + former_len, 7444 sprintf (scaled + former_len,
7462 "-%d-%d-72-72-m-%d-%s", 7445 "-%d-%d-72-72-m-%d-%s",
@@ -7789,18 +7772,8 @@ XLoadQueryFont (Display *dpy, char *fontname)
7789 font->max_char_or_byte2 = 0xff; 7772 font->max_char_or_byte2 = 0xff;
7790 7773
7791 font->bounds.rows = xmalloc (sizeof (XCharStructRow *) * 0x100); 7774 font->bounds.rows = xmalloc (sizeof (XCharStructRow *) * 0x100);
7792 if (font->bounds.rows == NULL)
7793 {
7794 mac_unload_font (&one_mac_display_info, font);
7795 return NULL;
7796 }
7797 bzero (font->bounds.rows, sizeof (XCharStructRow *) * 0x100); 7775 bzero (font->bounds.rows, sizeof (XCharStructRow *) * 0x100);
7798 font->bounds.rows[0] = xmalloc (sizeof (XCharStructRow)); 7776 font->bounds.rows[0] = xmalloc (sizeof (XCharStructRow));
7799 if (font->bounds.rows[0] == NULL)
7800 {
7801 mac_unload_font (&one_mac_display_info, font);
7802 return NULL;
7803 }
7804 bzero (font->bounds.rows[0], sizeof (XCharStructRow)); 7777 bzero (font->bounds.rows[0], sizeof (XCharStructRow));
7805 7778
7806#if USE_CG_TEXT_DRAWING 7779#if USE_CG_TEXT_DRAWING
@@ -7822,9 +7795,10 @@ XLoadQueryFont (Display *dpy, char *fontname)
7822 } 7795 }
7823 7796
7824 if (font->cg_font) 7797 if (font->cg_font)
7825 font->cg_glyphs = xmalloc (sizeof (CGGlyph) * 0x100); 7798 {
7826 if (font->cg_glyphs) 7799 font->cg_glyphs = xmalloc (sizeof (CGGlyph) * 0x100);
7827 bzero (font->cg_glyphs, sizeof (CGGlyph) * 0x100); 7800 bzero (font->cg_glyphs, sizeof (CGGlyph) * 0x100);
7801 }
7828#endif 7802#endif
7829 space_bounds = font->bounds.rows[0]->per_char + 0x20; 7803 space_bounds = font->bounds.rows[0]->per_char + 0x20;
7830 err = mac_query_char_extents (font->mac_style, 0x20, 7804 err = mac_query_char_extents (font->mac_style, 0x20,
@@ -7970,11 +7944,6 @@ XLoadQueryFont (Display *dpy, char *fontname)
7970 7944
7971 font->bounds.per_char = 7945 font->bounds.per_char =
7972 xmalloc (sizeof (XCharStruct) * (0xff - 0x20 + 1)); 7946 xmalloc (sizeof (XCharStruct) * (0xff - 0x20 + 1));
7973 if (font->bounds.per_char == NULL)
7974 {
7975 mac_unload_font (&one_mac_display_info, font);
7976 return NULL;
7977 }
7978 bzero (font->bounds.per_char, 7947 bzero (font->bounds.per_char,
7979 sizeof (XCharStruct) * (0xff - 0x20 + 1)); 7948 sizeof (XCharStruct) * (0xff - 0x20 + 1));
7980 7949
@@ -8979,15 +8948,12 @@ mac_store_apple_event (class, id, desc)
8979 Lisp_Object class, id; 8948 Lisp_Object class, id;
8980 const AEDesc *desc; 8949 const AEDesc *desc;
8981{ 8950{
8982 OSErr err = noErr; 8951 OSErr err;
8983 struct input_event buf; 8952 struct input_event buf;
8984 AEDesc *desc_copy; 8953 AEDesc *desc_copy;
8985 8954
8986 desc_copy = xmalloc (sizeof (AEDesc)); 8955 desc_copy = xmalloc (sizeof (AEDesc));
8987 if (desc_copy == NULL) 8956 err = AEDuplicateDesc (desc, desc_copy);
8988 err = memFullErr;
8989 else
8990 err = AEDuplicateDesc (desc, desc_copy);
8991 if (err == noErr) 8957 if (err == noErr)
8992 { 8958 {
8993 EVENT_INIT (buf); 8959 EVENT_INIT (buf);
diff --git a/src/print.c b/src/print.c
index 0eb82b663d6..0db9780e314 100644
--- a/src/print.c
+++ b/src/print.c
@@ -276,6 +276,7 @@ int print_output_debug_flag = 1;
276 else \ 276 else \
277 insert_1_both (print_buffer, print_buffer_pos, \ 277 insert_1_both (print_buffer, print_buffer_pos, \
278 print_buffer_pos_byte, 0, 1, 0); \ 278 print_buffer_pos_byte, 0, 1, 0); \
279 signal_after_change (PT - print_buffer_pos, 0, print_buffer_pos);\
279 } \ 280 } \
280 if (free_print_buffer) \ 281 if (free_print_buffer) \
281 { \ 282 { \
diff --git a/src/textprop.c b/src/textprop.c
index 65823d9fa3f..e2f9c531735 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -1602,10 +1602,12 @@ Return t if any property was actually removed, nil otherwise. */)
1602 } 1602 }
1603 } 1603 }
1604 1604
1605 if (BUFFERP (object)) 1605 /* We are at the beginning of an interval, with len to scan.
1606 modify_region (XBUFFER (object), XINT (start), XINT (end)); 1606 The flag `modified' records if changes have been made.
1607 1607 When object is a buffer, we must call modify_region before changes are
1608 /* We are at the beginning of an interval, with len to scan */ 1608 made and signal_after_change when we are done.
1609 We call modify_region before calling remove_properties iff modified == 0,
1610 and we call signal_after_change before returning iff modified != 0. */
1609 for (;;) 1611 for (;;)
1610 { 1612 {
1611 if (i == 0) 1613 if (i == 0)
@@ -1614,10 +1616,20 @@ Return t if any property was actually removed, nil otherwise. */)
1614 if (LENGTH (i) >= len) 1616 if (LENGTH (i) >= len)
1615 { 1617 {
1616 if (! interval_has_some_properties_list (properties, i)) 1618 if (! interval_has_some_properties_list (properties, i))
1617 return modified ? Qt : Qnil; 1619 if (modified)
1620 {
1621 if (BUFFERP (object))
1622 signal_after_change (XINT (start), XINT (end) - XINT (start),
1623 XINT (end) - XINT (start));
1624 return Qt;
1625 }
1626 else
1627 return Qnil;
1618 1628
1619 if (LENGTH (i) == len) 1629 if (LENGTH (i) == len)
1620 { 1630 {
1631 if (!modified && BUFFERP (object))
1632 modify_region (XBUFFER (object), XINT (start), XINT (end));
1621 remove_properties (Qnil, properties, i, object); 1633 remove_properties (Qnil, properties, i, object);
1622 if (BUFFERP (object)) 1634 if (BUFFERP (object))
1623 signal_after_change (XINT (start), XINT (end) - XINT (start), 1635 signal_after_change (XINT (start), XINT (end) - XINT (start),
@@ -1629,6 +1641,8 @@ Return t if any property was actually removed, nil otherwise. */)
1629 unchanged = i; 1641 unchanged = i;
1630 i = split_interval_left (i, len); 1642 i = split_interval_left (i, len);
1631 copy_properties (unchanged, i); 1643 copy_properties (unchanged, i);
1644 if (!modified && BUFFERP (object))
1645 modify_region (XBUFFER (object), XINT (start), XINT (end));
1632 remove_properties (Qnil, properties, i, object); 1646 remove_properties (Qnil, properties, i, object);
1633 if (BUFFERP (object)) 1647 if (BUFFERP (object))
1634 signal_after_change (XINT (start), XINT (end) - XINT (start), 1648 signal_after_change (XINT (start), XINT (end) - XINT (start),
@@ -1636,8 +1650,14 @@ Return t if any property was actually removed, nil otherwise. */)
1636 return Qt; 1650 return Qt;
1637 } 1651 }
1638 1652
1653 if (interval_has_some_properties_list (properties, i))
1654 {
1655 if (!modified && BUFFERP (object))
1656 modify_region (XBUFFER (object), XINT (start), XINT (end));
1657 remove_properties (Qnil, properties, i, object);
1658 modified = 1;
1659 }
1639 len -= LENGTH (i); 1660 len -= LENGTH (i);
1640 modified += remove_properties (Qnil, properties, i, object);
1641 i = next_interval (i); 1661 i = next_interval (i);
1642 } 1662 }
1643} 1663}
diff --git a/src/window.c b/src/window.c
index d4e6ac3569f..1bd8c3924a1 100644
--- a/src/window.c
+++ b/src/window.c
@@ -662,6 +662,8 @@ coordinates_in_window (w, x, y)
662 { 662 {
663 if (!WINDOW_LEFTMOST_P (w) && abs (*x - x0) < grabbable_width) 663 if (!WINDOW_LEFTMOST_P (w) && abs (*x - x0) < grabbable_width)
664 { 664 {
665 /* Convert X and Y to window relative coordinates.
666 Vertical border is at the left edge of window. */
665 *x = max (0, *x - x0); 667 *x = max (0, *x - x0);
666 *y -= top_y; 668 *y -= top_y;
667 return ON_VERTICAL_BORDER; 669 return ON_VERTICAL_BORDER;
@@ -671,6 +673,8 @@ coordinates_in_window (w, x, y)
671 { 673 {
672 if (abs (*x - x1) < grabbable_width) 674 if (abs (*x - x1) < grabbable_width)
673 { 675 {
676 /* Convert X and Y to window relative coordinates.
677 Vertical border is at the right edge of window. */
674 *x = min (x1, *x) - x0; 678 *x = min (x1, *x) - x0;
675 *y -= top_y; 679 *y -= top_y;
676 return ON_VERTICAL_BORDER; 680 return ON_VERTICAL_BORDER;
@@ -717,6 +721,8 @@ coordinates_in_window (w, x, y)
717 && !WINDOW_RIGHTMOST_P (w) 721 && !WINDOW_RIGHTMOST_P (w)
718 && (abs (*x - right_x) < grabbable_width)) 722 && (abs (*x - right_x) < grabbable_width))
719 { 723 {
724 /* Convert X and Y to window relative coordinates.
725 Vertical border is at the right edge of window. */
720 *x = min (right_x, *x) - left_x; 726 *x = min (right_x, *x) - left_x;
721 *y -= top_y; 727 *y -= top_y;
722 return ON_VERTICAL_BORDER; 728 return ON_VERTICAL_BORDER;
@@ -2027,7 +2033,7 @@ window_loop (type, obj, mini, frames)
2027 `obj & 1' means consider only full-width windows. 2033 `obj & 1' means consider only full-width windows.
2028 `obj & 2' means consider also dedicated windows. */ 2034 `obj & 2' means consider also dedicated windows. */
2029 if (((XINT (obj) & 1) && !WINDOW_FULL_WIDTH_P (w)) 2035 if (((XINT (obj) & 1) && !WINDOW_FULL_WIDTH_P (w))
2030 || (!(XINT (obj) & 2) && EQ (w->dedicated, Qt)) 2036 || (!(XINT (obj) & 2) && !NILP (w->dedicated))
2031 /* Minibuffer windows are always ignored. */ 2037 /* Minibuffer windows are always ignored. */
2032 || MINI_WINDOW_P (w)) 2038 || MINI_WINDOW_P (w))
2033 break; 2039 break;
@@ -2082,7 +2088,7 @@ window_loop (type, obj, mini, frames)
2082 case GET_LARGEST_WINDOW: 2088 case GET_LARGEST_WINDOW:
2083 { /* nil `obj' means to ignore dedicated windows. */ 2089 { /* nil `obj' means to ignore dedicated windows. */
2084 /* Ignore dedicated windows and minibuffers. */ 2090 /* Ignore dedicated windows and minibuffers. */
2085 if (MINI_WINDOW_P (w) || (NILP (obj) && EQ (w->dedicated, Qt))) 2091 if (MINI_WINDOW_P (w) || (NILP (obj) && !NILP (w->dedicated)))
2086 break; 2092 break;
2087 2093
2088 if (NILP (best_window)) 2094 if (NILP (best_window))
@@ -4269,18 +4275,30 @@ adjust_window_trailing_edge (window, delta, horiz_flag)
4269 4275
4270 while (1) 4276 while (1)
4271 { 4277 {
4278 Lisp_Object first_parallel = Qnil;
4279
4272 p = XWINDOW (window); 4280 p = XWINDOW (window);
4273 parent = p->parent; 4281 parent = p->parent;
4274 4282
4275 /* Make sure there is a following window. */ 4283 if (NILP (XWINDOW (window)->next))
4276 if (NILP (parent)
4277 && (horiz_flag ? 1
4278 : NILP (XWINDOW (window)->next)))
4279 { 4284 {
4280 Fset_window_configuration (old_config); 4285 Fset_window_configuration (old_config);
4281 error ("No other window following this one"); 4286 error ("No other window following this one");
4282 } 4287 }
4283 4288
4289 /* See if this level has windows in parallel in the specified
4290 direction. If so, set FIRST_PARALLEL to the first one. */
4291 if (horiz_flag)
4292 {
4293 if (! NILP (parent) && !NILP (XWINDOW (parent)->vchild))
4294 first_parallel = XWINDOW (parent)->vchild;
4295 }
4296 else
4297 {
4298 if (! NILP (parent) && !NILP (XWINDOW (parent)->hchild))
4299 first_parallel = XWINDOW (parent)->hchild;
4300 }
4301
4284 /* Don't make this window too small. */ 4302 /* Don't make this window too small. */
4285 if (XINT (CURSIZE (window)) + delta 4303 if (XINT (CURSIZE (window)) + delta
4286 < (horiz_flag ? window_min_width : window_min_height)) 4304 < (horiz_flag ? window_min_width : window_min_height))
@@ -4298,12 +4316,11 @@ adjust_window_trailing_edge (window, delta, horiz_flag)
4298 XINT (CURSIZE (window)) + delta); 4316 XINT (CURSIZE (window)) + delta);
4299 4317
4300 /* If this window has following siblings in the desired dimension, 4318 /* If this window has following siblings in the desired dimension,
4301 make them smaller. 4319 make them smaller, and exit the loop.
4320
4302 (If we reach the top of the tree and can never do this, 4321 (If we reach the top of the tree and can never do this,
4303 we will fail and report an error, above.) */ 4322 we will fail and report an error, above.) */
4304 if (horiz_flag 4323 if (NILP (first_parallel))
4305 ? !NILP (XWINDOW (parent)->hchild)
4306 : !NILP (XWINDOW (parent)->vchild))
4307 { 4324 {
4308 if (!NILP (XWINDOW (window)->next)) 4325 if (!NILP (XWINDOW (window)->next))
4309 { 4326 {
@@ -4325,9 +4342,7 @@ adjust_window_trailing_edge (window, delta, horiz_flag)
4325 else 4342 else
4326 /* Here we have a chain of parallel siblings, in the other dimension. 4343 /* Here we have a chain of parallel siblings, in the other dimension.
4327 Change the size of the other siblings. */ 4344 Change the size of the other siblings. */
4328 for (child = (horiz_flag 4345 for (child = first_parallel;
4329 ? XWINDOW (parent)->vchild
4330 : XWINDOW (parent)->hchild);
4331 ! NILP (child); 4346 ! NILP (child);
4332 child = XWINDOW (child)->next) 4347 child = XWINDOW (child)->next)
4333 if (! EQ (child, window)) 4348 if (! EQ (child, window))
@@ -4868,7 +4883,7 @@ window_scroll_pixel_based (window, n, whole, noerror)
4868 { 4883 {
4869 if (it.current_y < it.last_visible_y 4884 if (it.current_y < it.last_visible_y
4870 && (it.current_y + it.max_ascent + it.max_descent 4885 && (it.current_y + it.max_ascent + it.max_descent
4871 >= it.last_visible_y)) 4886 > it.last_visible_y))
4872 { 4887 {
4873 /* The last line was only partially visible, make it fully 4888 /* The last line was only partially visible, make it fully
4874 visible. */ 4889 visible. */
diff --git a/src/xdisp.c b/src/xdisp.c
index ca5137bb4ff..1689ec88be5 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -12784,8 +12784,6 @@ redisplay_window (window, just_this_one_p)
12784 /* IT may overshoot PT if text at PT is invisible. */ 12784 /* IT may overshoot PT if text at PT is invisible. */
12785 else if (IT_CHARPOS (it) > PT && CHARPOS (startp) <= PT) 12785 else if (IT_CHARPOS (it) > PT && CHARPOS (startp) <= PT)
12786 w->force_start = Qt; 12786 w->force_start = Qt;
12787
12788
12789 } 12787 }
12790 12788
12791 /* Handle case where place to start displaying has been specified, 12789 /* Handle case where place to start displaying has been specified,
@@ -12955,6 +12953,35 @@ redisplay_window (window, just_this_one_p)
12955 || (XFASTINT (w->last_modified) >= MODIFF 12953 || (XFASTINT (w->last_modified) >= MODIFF
12956 && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF))) 12954 && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF)))
12957 { 12955 {
12956
12957 /* If first window line is a continuation line, and window start
12958 is inside the modified region, but the first change is before
12959 current window start, we must select a new window start.*/
12960 if (NILP (w->start_at_line_beg))
12961 {
12962 /* Make sure beg_unchanged and end_unchanged are up to date.
12963 Do it only if buffer has really changed. This may or may
12964 not have been done by try_window_id (see which) already. */
12965 if (MODIFF > SAVE_MODIFF
12966 /* This seems to happen sometimes after saving a buffer. */
12967 || BEG_UNCHANGED + END_UNCHANGED > Z_BYTE)
12968 {
12969 if (GPT - BEG < BEG_UNCHANGED)
12970 BEG_UNCHANGED = GPT - BEG;
12971 if (Z - GPT < END_UNCHANGED)
12972 END_UNCHANGED = Z - GPT;
12973 }
12974
12975 if (CHARPOS (startp) > BEG + BEG_UNCHANGED
12976 && CHARPOS (startp) <= Z - END_UNCHANGED)
12977 {
12978 /* There doesn't seems to be a simple way to find a new
12979 window start that is near the old window start, so
12980 we just recenter. */
12981 goto recenter;
12982 }
12983 }
12984
12958#if GLYPH_DEBUG 12985#if GLYPH_DEBUG
12959 debug_method_add (w, "same window start"); 12986 debug_method_add (w, "same window start");
12960#endif 12987#endif
@@ -22535,7 +22562,7 @@ note_mouse_highlight (f, x, y)
22535 if (part == ON_VERTICAL_BORDER) 22562 if (part == ON_VERTICAL_BORDER)
22536 { 22563 {
22537 cursor = FRAME_X_OUTPUT (f)->horizontal_drag_cursor; 22564 cursor = FRAME_X_OUTPUT (f)->horizontal_drag_cursor;
22538 help_echo_string = make_string ("drag-mouse-1: resize", 20); 22565 help_echo_string = build_string ("drag-mouse-1: resize");
22539 } 22566 }
22540 else if (part == ON_LEFT_FRINGE || part == ON_RIGHT_FRINGE 22567 else if (part == ON_LEFT_FRINGE || part == ON_RIGHT_FRINGE
22541 || part == ON_SCROLL_BAR) 22568 || part == ON_SCROLL_BAR)
diff --git a/src/xmenu.c b/src/xmenu.c
index 156c44c9bb0..8558e113863 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -266,14 +266,15 @@ menubar_id_to_frame (id)
266static void 266static void
267init_menu_items () 267init_menu_items ()
268{ 268{
269 if (!NILP (menu_items_inuse))
270 error ("Trying to use a menu from within a menu-entry");
271
269 if (NILP (menu_items)) 272 if (NILP (menu_items))
270 { 273 {
271 menu_items_allocated = 60; 274 menu_items_allocated = 60;
272 menu_items = Fmake_vector (make_number (menu_items_allocated), Qnil); 275 menu_items = Fmake_vector (make_number (menu_items_allocated), Qnil);
273 } 276 }
274 277
275 if (!NILP (menu_items_inuse))
276 error ("Trying to use a menu from within a menu-entry");
277 menu_items_inuse = Qt; 278 menu_items_inuse = Qt;
278 menu_items_used = 0; 279 menu_items_used = 0;
279 menu_items_n_panes = 0; 280 menu_items_n_panes = 0;
@@ -310,6 +311,39 @@ discard_menu_items ()
310 xassert (NILP (menu_items_inuse)); 311 xassert (NILP (menu_items_inuse));
311} 312}
312 313
314/* This undoes save_menu_items, and it is called by the specpdl unwind
315 mechanism. */
316
317static Lisp_Object
318restore_menu_items (saved)
319 Lisp_Object saved;
320{
321 menu_items = XCAR (saved);
322 menu_items_inuse = (! NILP (menu_items) ? Qt : Qnil);
323 menu_items_allocated = (VECTORP (menu_items) ? ASIZE (menu_items) : 0);
324 saved = XCDR (saved);
325 menu_items_used = XINT (XCAR (saved));
326 saved = XCDR (saved);
327 menu_items_n_panes = XINT (XCAR (saved));
328 saved = XCDR (saved);
329 menu_items_submenu_depth = XINT (XCAR (saved));
330}
331
332/* Push the whole state of menu_items processing onto the specpdl.
333 It will be restored when the specpdl is unwound. */
334
335static void
336save_menu_items ()
337{
338 Lisp_Object saved = list4 (!NILP (menu_items_inuse) ? menu_items : Qnil,
339 make_number (menu_items_used),
340 make_number (menu_items_n_panes),
341 make_number (menu_items_submenu_depth));
342 record_unwind_protect (restore_menu_items, saved);
343 menu_items_inuse = Qnil;
344 menu_items = Qnil;
345}
346
313/* Make the menu_items vector twice as large. */ 347/* Make the menu_items vector twice as large. */
314 348
315static void 349static void
@@ -320,6 +354,7 @@ grow_menu_items ()
320 old = menu_items; 354 old = menu_items;
321 355
322 menu_items_allocated *= 2; 356 menu_items_allocated *= 2;
357
323 menu_items = Fmake_vector (make_number (menu_items_allocated), Qnil); 358 menu_items = Fmake_vector (make_number (menu_items_allocated), Qnil);
324 bcopy (XVECTOR (old)->contents, XVECTOR (menu_items)->contents, 359 bcopy (XVECTOR (old)->contents, XVECTOR (menu_items)->contents,
325 old_size * sizeof (Lisp_Object)); 360 old_size * sizeof (Lisp_Object));
@@ -1728,6 +1763,7 @@ digest_single_submenu (start, end, top_level_items)
1728 int i; 1763 int i;
1729 int submenu_depth = 0; 1764 int submenu_depth = 0;
1730 widget_value **submenu_stack; 1765 widget_value **submenu_stack;
1766 int panes_seen = 0;
1731 1767
1732 submenu_stack 1768 submenu_stack
1733 = (widget_value **) alloca (menu_items_used * sizeof (widget_value *)); 1769 = (widget_value **) alloca (menu_items_used * sizeof (widget_value *));
@@ -1774,6 +1810,8 @@ digest_single_submenu (start, end, top_level_items)
1774 Lisp_Object pane_name, prefix; 1810 Lisp_Object pane_name, prefix;
1775 char *pane_string; 1811 char *pane_string;
1776 1812
1813 panes_seen++;
1814
1777 pane_name = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_NAME]; 1815 pane_name = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_NAME];
1778 prefix = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_PREFIX]; 1816 prefix = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_PREFIX];
1779 1817
@@ -1821,6 +1859,10 @@ digest_single_submenu (start, end, top_level_items)
1821 Lisp_Object item_name, enable, descrip, def, type, selected; 1859 Lisp_Object item_name, enable, descrip, def, type, selected;
1822 Lisp_Object help; 1860 Lisp_Object help;
1823 1861
1862 /* All items should be contained in panes. */
1863 if (panes_seen == 0)
1864 abort ();
1865
1824 item_name = AREF (menu_items, i + MENU_ITEMS_ITEM_NAME); 1866 item_name = AREF (menu_items, i + MENU_ITEMS_ITEM_NAME);
1825 enable = AREF (menu_items, i + MENU_ITEMS_ITEM_ENABLE); 1867 enable = AREF (menu_items, i + MENU_ITEMS_ITEM_ENABLE);
1826 descrip = AREF (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY); 1868 descrip = AREF (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY);
@@ -2046,7 +2088,6 @@ set_frame_menubar (f, first_time, deep_p)
2046 specbind (Qdebug_on_next_call, Qnil); 2088 specbind (Qdebug_on_next_call, Qnil);
2047 2089
2048 record_unwind_save_match_data (); 2090 record_unwind_save_match_data ();
2049 record_unwind_protect (unuse_menu_items, Qnil);
2050 if (NILP (Voverriding_local_map_menu_flag)) 2091 if (NILP (Voverriding_local_map_menu_flag))
2051 { 2092 {
2052 specbind (Qoverriding_terminal_local_map, Qnil); 2093 specbind (Qoverriding_terminal_local_map, Qnil);
@@ -2074,6 +2115,8 @@ set_frame_menubar (f, first_time, deep_p)
2074 2115
2075 /* Fill in menu_items with the current menu bar contents. 2116 /* Fill in menu_items with the current menu bar contents.
2076 This can evaluate Lisp code. */ 2117 This can evaluate Lisp code. */
2118 save_menu_items ();
2119
2077 menu_items = f->menu_bar_vector; 2120 menu_items = f->menu_bar_vector;
2078 menu_items_allocated = VECTORP (menu_items) ? ASIZE (menu_items) : 0; 2121 menu_items_allocated = VECTORP (menu_items) ? ASIZE (menu_items) : 0;
2079 submenu_start = (int *) alloca (XVECTOR (items)->size * sizeof (int *)); 2122 submenu_start = (int *) alloca (XVECTOR (items)->size * sizeof (int *));
@@ -2133,23 +2176,33 @@ set_frame_menubar (f, first_time, deep_p)
2133 } 2176 }
2134 2177
2135 set_buffer_internal_1 (prev); 2178 set_buffer_internal_1 (prev);
2136 unbind_to (specpdl_count, Qnil);
2137 2179
2138 /* If there has been no change in the Lisp-level contents 2180 /* If there has been no change in the Lisp-level contents
2139 of the menu bar, skip redisplaying it. Just exit. */ 2181 of the menu bar, skip redisplaying it. Just exit. */
2140 2182
2183 /* Compare the new menu items with the ones computed last time. */
2141 for (i = 0; i < previous_menu_items_used; i++) 2184 for (i = 0; i < previous_menu_items_used; i++)
2142 if (menu_items_used == i 2185 if (menu_items_used == i
2143 || (!EQ (previous_items[i], XVECTOR (menu_items)->contents[i]))) 2186 || (!EQ (previous_items[i], XVECTOR (menu_items)->contents[i])))
2144 break; 2187 break;
2145 if (i == menu_items_used && i == previous_menu_items_used && i != 0) 2188 if (i == menu_items_used && i == previous_menu_items_used && i != 0)
2146 { 2189 {
2190 /* The menu items have not changed. Don't bother updating
2191 the menus in any form, since it would be a no-op. */
2147 free_menubar_widget_value_tree (first_wv); 2192 free_menubar_widget_value_tree (first_wv);
2148 discard_menu_items (); 2193 discard_menu_items ();
2149 2194 unbind_to (specpdl_count, Qnil);
2150 return; 2195 return;
2151 } 2196 }
2152 2197
2198 /* The menu items are different, so store them in the frame. */
2199 f->menu_bar_vector = menu_items;
2200 f->menu_bar_items_used = menu_items_used;
2201
2202 /* This calls restore_menu_items to restore menu_items, etc.,
2203 as they were outside. */
2204 unbind_to (specpdl_count, Qnil);
2205
2153 /* Now GC cannot happen during the lifetime of the widget_value, 2206 /* Now GC cannot happen during the lifetime of the widget_value,
2154 so it's safe to store data from a Lisp_String. */ 2207 so it's safe to store data from a Lisp_String. */
2155 wv = first_wv->contents; 2208 wv = first_wv->contents;
@@ -2164,9 +2217,6 @@ set_frame_menubar (f, first_time, deep_p)
2164 wv = wv->next; 2217 wv = wv->next;
2165 } 2218 }
2166 2219
2167 f->menu_bar_vector = menu_items;
2168 f->menu_bar_items_used = menu_items_used;
2169 discard_menu_items ();
2170 } 2220 }
2171 else 2221 else
2172 { 2222 {
diff --git a/update-subdirs b/update-subdirs
index 29ac404575a..ef259fe6f67 100755
--- a/update-subdirs
+++ b/update-subdirs
@@ -1,7 +1,7 @@
1#!/bin/sh 1#!/bin/sh
2# Write into $1/subdirs.el a list of subdirs of directory $1. 2# Write into $1/subdirs.el a list of subdirs of directory $1.
3 3
4# Copyright (C) 1994,95,97,1999,2001,2004 Free Software Foundation, Inc. 4# Copyright (C) 1994,95,97,1999,2001,2004,2006 Free Software Foundation, Inc.
5# 5#
6# This file is part of GNU Emacs. 6# This file is part of GNU Emacs.
7# 7#