diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2011-02-01 12:09:25 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2011-02-01 12:09:25 -0500 |
commit | 8f1d2ef658f95549eb33fe5265f8f11c5129bece (patch) | |
tree | b7cd852a1adb423384532cfe22c31547160b22bc /lisp | |
parent | 590130fb19e1f433965c421d98fedeb2d7c33310 (diff) | |
parent | 1dc4075fa8809805aed5092e93e225e889725c94 (diff) | |
download | emacs-8f1d2ef658f95549eb33fe5265f8f11c5129bece.tar.gz |
Merge from trunk
Diffstat (limited to 'lisp')
1387 files changed, 20487 insertions, 12055 deletions
diff --git a/lisp/ChangeLog.1 b/lisp/ChangeLog.1 index 6855c935746..f1c931589d1 100644 --- a/lisp/ChangeLog.1 +++ b/lisp/ChangeLog.1 @@ -3247,8 +3247,7 @@ Set current buffer variables from defaults in case user's init file has changed them. - Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 - Free Software Foundation, Inc. + Copyright (C) 1985-1986, 2001-2011 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -3264,5 +3263,3 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. - -;;; arch-tag: b6060738-7fac-4c9c-80ae-67995bae78a7 diff --git a/lisp/ChangeLog.10 b/lisp/ChangeLog.10 index 32c3688f935..83ee20fa497 100644 --- a/lisp/ChangeLog.10 +++ b/lisp/ChangeLog.10 @@ -23534,8 +23534,7 @@ See ChangeLog.9 for earlier changes. ;; coding: utf-8 ;; End: - Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2001-2011 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -23552,4 +23551,3 @@ See ChangeLog.9 for earlier changes. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. -;;; arch-tag: 5fcf8004-6f58-452a-b9d6-6950323a19c1 diff --git a/lisp/ChangeLog.11 b/lisp/ChangeLog.11 index 5b9fa028a9d..76bac50c4b8 100644 --- a/lisp/ChangeLog.11 +++ b/lisp/ChangeLog.11 @@ -14336,8 +14336,7 @@ See ChangeLog.10 for earlier changes. ;; coding: utf-8 ;; End: - Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 - Free Software Foundation, Inc. + Copyright (C) 2003-2011 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -14353,5 +14352,3 @@ See ChangeLog.10 for earlier changes. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. - -;; arch-tag: 2fe8d7b0-27e3-4634-a0b7-db70ff071825 diff --git a/lisp/ChangeLog.12 b/lisp/ChangeLog.12 index b95219ab332..d2f7cab27f0 100644 --- a/lisp/ChangeLog.12 +++ b/lisp/ChangeLog.12 @@ -33349,7 +33349,7 @@ See ChangeLog.11 for earlier changes. ;; add-log-time-zone-rule: t ;; End: - Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2005-2011 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -33366,4 +33366,3 @@ See ChangeLog.11 for earlier changes. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. -;;; arch-tag: e39939be-dab3-400e-86f5-0e2701a883c1 diff --git a/lisp/ChangeLog.13 b/lisp/ChangeLog.13 index d8ec37390f1..8cbe1ad5776 100644 --- a/lisp/ChangeLog.13 +++ b/lisp/ChangeLog.13 @@ -16696,7 +16696,7 @@ See ChangeLog.12 for earlier changes. ;; coding: utf-8 ;; End: - Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2007-2011 Free Software Foundation, Inc. This file is part of GNU Emacs. diff --git a/lisp/ChangeLog.14 b/lisp/ChangeLog.14 index cfb6b84269c..7c32b11ec14 100644 --- a/lisp/ChangeLog.14 +++ b/lisp/ChangeLog.14 @@ -20551,7 +20551,7 @@ See ChangeLog.13 for earlier changes. ;; coding: utf-8 ;; End: - Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2008-2011 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -20568,4 +20568,3 @@ See ChangeLog.13 for earlier changes. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. -;; arch-tag: c241c1f9-d668-48bf-920a-2897ed0340bc diff --git a/lisp/ChangeLog.2 b/lisp/ChangeLog.2 index 90c00dc6360..36046562653 100644 --- a/lisp/ChangeLog.2 +++ b/lisp/ChangeLog.2 @@ -3992,8 +3992,7 @@ See ChangeLog.1 for earlier changes. - Copyright (C) 1986, 1987, 1988, 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 1986-1988, 2001-2011 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -4010,4 +4009,3 @@ See ChangeLog.1 for earlier changes. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. -;;; arch-tag: c315ba16-14ba-4b07-86e6-013a18f11be7 diff --git a/lisp/ChangeLog.3 b/lisp/ChangeLog.3 index 4c36aa94509..b54580ff0bc 100644 --- a/lisp/ChangeLog.3 +++ b/lisp/ChangeLog.3 @@ -12438,8 +12438,7 @@ See ChangeLog.2 for earlier changes. ;; coding: utf-8 ;; End: - Copyright (C) 1989, 1993, 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 1989, 1993, 2001-2011 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -12456,4 +12455,3 @@ See ChangeLog.2 for earlier changes. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. -;;; arch-tag: f07a3446-5672-464a-8fdc-2ca92e8e7b2a diff --git a/lisp/ChangeLog.4 b/lisp/ChangeLog.4 index 683ca0ed857..f9407ce20d8 100644 --- a/lisp/ChangeLog.4 +++ b/lisp/ChangeLog.4 @@ -8936,8 +8936,7 @@ See ChangeLog.3 for earlier changes. ;; coding: utf-8 ;; End: - Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 1993-1994, 2001-2011 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -8954,4 +8953,3 @@ See ChangeLog.3 for earlier changes. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. -;;; arch-tag: 91035822-35c7-44a9-8417-2454b88c3db2 diff --git a/lisp/ChangeLog.5 b/lisp/ChangeLog.5 index 8cb0e343a1a..ebf1d6fb975 100644 --- a/lisp/ChangeLog.5 +++ b/lisp/ChangeLog.5 @@ -9265,8 +9265,7 @@ See ChangeLog.4 for earlier changes. ;; coding: utf-8 ;; End: - Copyright (C) 1994, 1995, 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 1994-1995, 2001-2011 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -9283,4 +9282,3 @@ See ChangeLog.4 for earlier changes. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. -;;; arch-tag: 1a8fbb45-25d0-48e2-a926-29ca4e3d343a diff --git a/lisp/ChangeLog.6 b/lisp/ChangeLog.6 index e5bd7fa9d27..2f73c290231 100644 --- a/lisp/ChangeLog.6 +++ b/lisp/ChangeLog.6 @@ -8022,8 +8022,7 @@ See ChangeLog.5 for earlier changes. ;; coding: utf-8 ;; End: - Copyright (C) 1995, 1996, 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 1995-1996, 2001-2011 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -8040,4 +8039,3 @@ See ChangeLog.5 for earlier changes. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. -;;; arch-tag: f90e8ffe-6bd0-4423-97d9-637ac4382520 diff --git a/lisp/ChangeLog.7 b/lisp/ChangeLog.7 index c68d02bc3d2..7ef7fe9dffc 100644 --- a/lisp/ChangeLog.7 +++ b/lisp/ChangeLog.7 @@ -23107,8 +23107,7 @@ See ChangeLog.6 for earlier changes. ;; coding: utf-8 ;; End: - Copyright (C) 1997, 1998, 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 1997-1998, 2001-2011 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -23125,4 +23124,3 @@ See ChangeLog.6 for earlier changes. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. -;;; arch-tag: 0995d517-13da-45ab-9c2d-7911aa25512b diff --git a/lisp/ChangeLog.8 b/lisp/ChangeLog.8 index 6127667ac7e..ada6d98ce3d 100644 --- a/lisp/ChangeLog.8 +++ b/lisp/ChangeLog.8 @@ -9993,8 +9993,7 @@ See ChangeLog.7 for earlier changes. ;; add-log-time-zone-rule: t ;; End: - Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 1999, 2001-2011 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -10011,4 +10010,3 @@ See ChangeLog.7 for earlier changes. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. -;;; arch-tag: efdc1531-ed46-4e14-be59-bee4b23088f3 diff --git a/lisp/ChangeLog.9 b/lisp/ChangeLog.9 index d6e9d2f8bcc..14214ccc3d3 100644 --- a/lisp/ChangeLog.9 +++ b/lisp/ChangeLog.9 @@ -20693,8 +20693,7 @@ See ChangeLog.8 for earlier changes. ;; coding: utf-8 ;; End: - Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2000-2011 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -20711,4 +20710,3 @@ See ChangeLog.8 for earlier changes. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. -;;; arch-tag: a7cd2b86-43eb-409b-883f-3700fa85334f diff --git a/lisp/ChangeLog.trunk b/lisp/ChangeLog.trunk index 5b0fab21cc9..584bf71c744 100644 --- a/lisp/ChangeLog.trunk +++ b/lisp/ChangeLog.trunk @@ -1,3 +1,1666 @@ +2011-01-31 Stefan Monnier <monnier@iro.umontreal.ca> + + * progmodes/compile.el (compilation--flush-directory-cache): + New function, extracted from compilation--remove-properties. + (compilation--remove-properties, compilation--parse-region): Use it. + (compilation--previous-directory): Handle one more case. + (compilation-enable-debug-messages): Remove. + (compilation-parse-errors, compilation--flush-parse): Just remove the + left over debug messages. + +2011-01-31 Sam Steingold <sds@gnu.org> + + * progmodes/compile.el (compilation-enable-debug-messages): + Add a variable to make the parsing messages introduced in + 2011-01-28T22:12:05Z!monnier@iro.umontreal.ca optional. + (compilation-parse-errors, compilation--flush-parse): Use it. + +2011-01-31 Deniz Dogan <deniz.a.m.dogan@gmail.com> + + * net/rcirc.el: Clean log filenames (Bug#7933). + (rcirc-log-write): Use convert-standard-filename. + (rcirc-log-filename-function): Documentation updates. + +2011-01-30 Jan Djärv <jan.h.d@swipnet.se> + + * mail/emacsbug.el (report-emacs-bug-insert-to-mailer): + Check report-emacs-bug-can-use-osx-open and use that if t. + (report-emacs-bug-can-use-osx-open): New function. + (report-emacs-bug): Rename can-xdg-email to can-insert-mail. + Check report-emacs-bug-can-use-osx-open also for can-insert-mail. + +2011-01-29 Chong Yidong <cyd@stupidchicken.com> + + * vc/vc-dispatcher.el (vc-set-async-update): New function for + updating Dired or VC-dir buffers after async command completes. + + * vc/vc-bzr.el (vc-bzr-async-command): Return the process buffer. + (vc-bzr-pull, vc-bzr-merge-branch): Use vc-set-async-update. + + * vc/vc-git.el (vc-git-merge-branch): Add FETCH_HEAD to branch + completions if it exists. Use vc-set-async-update. + (vc-git-pull): Use vc-set-async-update. + + * vc/vc-hg.el (vc-hg-pull): Fix default-contents arg to + read-shell-command. Use vc-set-async-update. + (vc-hg-merge-branch): Use vc-set-async-update. + +2011-01-29 Daiki Ueno <ueno@unixuser.org> + + * epg.el (epg--status-KEYEXPIRED, epg--status-KEYREVOKED): + Don't presume KEYEXPIRED and KEYREVOKED to be a fatal error status + (Bug#7931). + +2011-01-29 Stefan Monnier <monnier@iro.umontreal.ca> + + * progmodes/compile.el: Avoid an N² behavior in grep. + (compilation--previous-directory): New fun. + (compilation--previous-directory-cache): New var. + (compilation--remove-properties): Flush it. + (compilation-directory-properties, compilation-error-properties): + Use the new fun to speed up looking for the current directory. + +2011-01-29 Chong Yidong <cyd@stupidchicken.com> + + * vc/vc-hg.el (vc-hg-history): New var. + (vc-hg-pull): Perform default pull if called via Lisp by vc-pull. + (vc-hg-merge-branch): New function. + + * vc/vc.el (vc-pull): Make vc-update an alias for this, instead of + the other way around. + + * vc/vc-git.el (vc-git-branches, vc-git-pull) + (vc-git-merge-branch): New functions. + (vc-git-history): New var. + +2011-01-28 Chong Yidong <cyd@stupidchicken.com> + + * vc/vc-dispatcher.el (vc-do-async-command): New function. + + * vc/vc-bzr.el (vc-bzr-async-command): Convert into a wrapper for + vc-do-async-command. + + * vc/vc-bzr.el (vc-bzr-pull, vc-bzr-merge-branch): + Callers changed. + +2011-01-28 Leo <sdl.web@gmail.com> + + * emacs-lisp/advice.el (ad-make-advised-docstring): Don't apply + highlighting to the "this function is advised" message. + + * help-mode.el (help-mode-finish): Apply highlighting here, to + avoid clobbering by substitute-command-keys (Bug#6304). + +2011-01-28 Chong Yidong <cyd@stupidchicken.com> + + * woman.el (woman0-roff-buffer): Process roff escape sequences + occurring prior to the first request (Bug#7843). + +2011-01-28 Stefan Monnier <monnier@iro.umontreal.ca> + + * progmodes/compile.el: Don't use font-lock any more. + (compilation-error-regexp-alist-alist): Change handling of makepp + so it preserves the warning/error distinction on subsequent files. + Simplify various rules. + (compilation-directory-properties): Use font-lock-face. + Add a compilation-message property. + (compilation-internal-error-properties): Use font-lock-face. + Don't set the compilation-debug property here. + (compilation--put-prop, compilation--remove-properties) + (compilation--parse-region, compilation--ensure-parse) + (compilation--ensure-parse): New functions. + (compilation-parse-errors): New function, largely inspired of + compilation-mode-font-lock-keywords. Set compilation-debug here. + (compilation--parsed): New var. + (compilation--flush-parse): Use compilation--ensure-parse. + (compilation-start): Don't call font-lock. + (compilation-turn-on-font-lock): Remove. + (compilation-setup): Don't set font-lock-extra-managed-props not change + other font-lock settings, other than keywords. + Don't activate font-lock-mode. + Set change-major-mode-hook and before-change-functions. + (compilation--unsetup): Remove properties and hooks. + (compilation-next-single-property-change): New function. + (compilation-next-error): Use it to parse when needed. + (compile-goto-error): Parse buffer as needed. + (compilation--compat-error-properties): Don't need a dummy `face' + property any more. + +2011-01-28 Stefan Monnier <monnier@iro.umontreal.ca> + + * progmodes/compile.el: Use accessors for clarity and fix omake hack. + (compilation-process-setup-function): Fix docstring's false promises. + (compilation-error-regexp-alist-alist): Catch omake's continuous + recompilation message and avoid reuse of old markers. + (compilation-parse-errors-function): Declare obsolete. + (compilation-buffer-modtime): Remove. + (compilation--make-cdrloc, compilation--loc->col) + (compilation--loc->line, compilation--loc->file-struct) + (compilation--loc->marker, compilation--loc->visited) + (compilation--make-file-struct, compilation--file-struct->file-spec) + (compilation--file-struct->formats) + (compilation--file-struct->loc-tree): New macros. Use them. + (compilation--message): New defstruct. Use them. + (compilation-next-error-function): Don't mess with timestamps to try + and guess when to reparse. + +2011-01-28 Stefan Monnier <monnier@iro.umontreal.ca> + + * textmodes/tex-mode.el: Get rid of compilation-parse-errors-function + (tex-old-error-file-name): New function, + extracted from tex-compilation-parse-errors. + (tex-compilation-parse-errors): Remove. + (tex-error-regexp-alist): New var. + (tex-shell): Use it to avoid compilation-parse-errors-function. + + * progmodes/grep.el (grep-regexp-alist): Tighten regexp. + (grep-mode-font-lock-keywords): Remove regexp that seems like + a left-over from before we used compile.el. + (grep-mode-font-lock-keywords): Call syntax-ppss-flush-cache when + modifying the buffer within with-silent-modifications. + + * progmodes/compile.el: Cleanup text-properties namespace by using + `compilation-message' instead of `message', `compilation-directory' + instead of `directory', and `compilation-debug' instead of `debug'. + (compilation-last-buffer, compilation-parsing-end) + (compilation-error-list, compilation-old-error-list): Move to the + compatibility part of the code. + (compilation-error-properties): If `file' is a function, let it return + a file name. + (compilation-mode-font-lock-keywords): Be more conservative with the + omake "^ *" pattern prefix, to try and minimize the risk of + pathologically slow regexp matching. + (compilation-start): Use inhibit-read-only. + (compilation--unsetup): New function. + (compilation-shell-minor-mode, compilation-minor-mode): Use it. + (compilation-filter): Minor tweaks. + (compilation-next-error-function): Try and avoid abusing variables. + (compilation--flush-file-structure): New fun. + (compilation-fake-loc): Use it to improve behavior when file is reused. + (debug-ignored-errors): Add "Moved past last ...". + (compilation--compat-error-properties) + (compilation--compat-parse-errors): Rename by doubling the "-". + + Port features from the previous prolog.el to the new one. + * progmodes/prolog.el (prolog-system): Add GNU and ECLiPSe options. + (prolog-program-name, prolog-program-switches, prolog-consult-string) + (prolog-compile-string, prolog-prompt-regexp): Get rid of the <foo>-i + variable and use a function to compute the value dynamically. + (prolog-prompt-regexp): Add regexp for GNU Prolog. + (prolog-continued-prompt-regexp): Remove, unused. + (prolog-find-value-by-system): Try and use the value of prolog-system + in the *prolog* buffer if it helps. + (prolog-mode-keybindings-common): Bind C-c C-z unconditionally... + (prolog-zip-on): ..and check prolog-system and version here instead. + (prolog-inferior-self-insert-command): New command. + (prolog-inferior-mode-map): Use it. + (prolog-inferior-error-regexp-alist): New var. + (prolog-inferior-mode): Use it, with compilation-shell-minor-mode. + (prolog-input-filter): Use derived-mode-p. + (prolog-inferior-guess-flavor): New function. + (prolog-ensure-process): Use it. Use make-comint-in-buffer rather than + make-comint to avoid running comint-mode twice. + (prolog-inferior-buffer): New fun. + (prolog-old-process-region, prolog-old-process-file): + Don't call prolog-bsts here... + (prolog-build-prolog-command): ...do it here instead. + (prolog-old-process-region, prolog-old-process-file): + Use compilation-fake-loc and compilation-forget-errors. + (prolog-consult-compile-region): Use bolp. + +2011-01-28 Chong Yidong <cyd@stupidchicken.com> + + * image-mode.el (image-display-size): Doc fix (Bug#7820). + +2011-01-27 Sam Steingold <sds@gnu.org> + + * midnight.el (clean-buffer-list-kill-never-buffer-names): + Remove "*server*" which is never created by emacs server. + +2011-01-27 Deniz Dogan <deniz.a.m.dogan@gmail.com> + + * vc/vc-bzr.el (vc-bzr-diff): Don't pass --diff-options unless + there are some diff switches. + +2011-01-27 Stefan Monnier <monnier@iro.umontreal.ca> + + * progmodes/ruby-mode.el (ruby-syntax-propertize-function): + Copy change made to ruby-font-lock-syntactic-keywords. + + * htmlfontify.el: Make it obey the font-lock-face text property. + Miscellaneous cleanup such as: + - Don't hide expressions after a closing paren. + - Move initial setq into let. + - Hoist common parts out of ifs. + (hfy-p-to-face, hfy-p-to-face-lennart): Remove. + (hfy-face-at): Use get-text-property instead. + (hfy-prop-invisible-p): Use invisible-p if available. + (htmlfontify-manual): Use \\[...]. + (hfy-html-quote-regex): Use [...]. + (hfy-combined-face-spec): Simplify. + (hfy-compile-face-map): Don't presume point-min==1. + (hfy-css-name, hfy-buffer, htmlfontify-buffer): Use \' rather than $ to + match end of string. + (hfy-text-p): η-reduce. + (hfy-tags-for-file): Receive cache-hash directly. + (hfy-mark-tag-names): Adjust call. + +2011-01-27 Glenn Morris <rgm@gnu.org> + + * msb.el (msb-after-load-hooks): Make it an obsolete alias. + (msb-after-load-hook): Remove eval-after-load wackiness. + +2011-01-25 Sam Steingold <sds@gnu.org> + + * vc/vc-svn.el (vc-svn-diff): Use `diff-command' instead of the + literal "diff" (important for windows-nt). + +2011-01-25 Glenn Morris <rgm@gnu.org> + + * emacs-lisp/copyright.el (copyright-at-end-flag) + (copyright-names-regexp): Add safety properties. + (copyright-year-ranges): New option. + (copyright-find-end): New function, split from copyright-update-year. + (copyright-update-year): Use copyright-find-end. + (copyright-fix-years): Optionally, convert years to ranges. + Handle years continued over comment lines. + Do not mess with the fill-prefix. + Do not call copyright-update. + (copyright-update-directory): Optionally, fix years rather than update. + Skip directories. Find files with only safe local vars. + +2011-01-25 Stefan Monnier <monnier@iro.umontreal.ca> + + * files.el (file-name-non-special): Only change buffer-file-name after + insert-file-contents if it's `visit'ing the file (bug#7854). + +2011-01-25 Chong Yidong <cyd@stupidchicken.com> + + * dired.el (dired-revert): Doc fix (Bug#7758). + + * simple.el (line-move-visual): Doc fix (Bug#7594). + +2011-01-25 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * progmodes/ruby-mode.el (ruby-here-doc-beg-match): Fix for + here-doc which ends with an underscore. + (ruby-mode-set-encoding): Skip shebang line always. + (ruby-mode-map): Bind C-c C-c to comment-region. + (ruby-font-lock-keywords): Highlight literal hash key labels as symbols. + (ruby-forward-sexp): Stop after literal hash key labels. + (ruby-font-lock-syntactic-keywords): Highlight regexp after open + bracket. + +2011-01-25 Keitaro Miyazaki <keitaro.miyazaki@gmail.com> (tiny change) + + * emacs-lisp/re-builder.el (reb-mode-map): Set case-fold-search in + the correct buffer (Bug#7650). + +2011-01-25 Glenn Morris <rgm@gnu.org> + + * comint.el (comint-mode): Doc fix. (Bug#7897) + + * simple.el (do-auto-fill): Give it a doc string. + + * button.el (make-text-button): Doc fix. (See bug#7881) + +2011-01-24 Stefan Monnier <monnier@iro.umontreal.ca> + + * progmodes/perl-mode.el (perl-syntax-propertize-special-constructs): + Don't move backward, so as not to fall in an inf-loop (bug#7736). + + * progmodes/ruby-mode.el (ruby-syntax-propertize-function): (bug#7735) + Handle ?" and friends differently (e.g. don't use backrefs). + +2011-01-24 Jay Belanger <jay.p.belanger@gmail.com> + + * calc/calc.el (calc-default-power-reference-level) + (calc-default-field-reference-level): New variables. + * calc/calc-units.el (math-standard-units): Add dB and Np. + (math-logunits): New variable. + (math-extract-logunits, math-logcombine, calcFunc-luplus) + (calcFunc-luminus, calc-luplus, calc-luminus, math-logunit-level) + (calcFunc-fieldlevel, calcFunc-powerlevel, calc-level): + New functions. + (math-find-base-units-rec): Add entry for ln(10). + * calc/calc-help.el (calc-u-prefix-help): Add logarithmic help. + (calc-ul-prefix-help): New function. + * calc/calc-ext.el (calc-init-extensions): Autoload new units + functions. Add keybindings for new units functions. + +2011-01-22 Giorgos Keramidas <keramida@ceid.upatras.gr> (tiny change) + + * net/rcirc.el (rcirc-kill-buffer-hook): Flush logs when killing + rcirc buffers. (Bug#4940) + +2011-01-22 Glenn Morris <rgm@gnu.org> + + * emacs-lisp/copyright.el (copyright-find-copyright): New function, + split out from copyright-update-year. + (copyright-update): Don't mess with the GPL version if we don't own the + copyright. Update license regexp, and remove no longer needed + Esperanto stuff. + (copyright-fix-years): Use copyright-find-copyright. + +2011-01-22 Chong Yidong <cyd@stupidchicken.com> + + * vc/diff.el (diff-sentinel): Doc fix (Bug#7682). + +2011-01-22 Jari Aalto <jari.aalto@cante.net> + + * play/landmark.el: Change `lm-' prefix to `landmark-' (Bug#7672). + (lm): Rename to landmark. + (lm-test-run): Rename to landmark-test-run. + +2011-01-22 Chong Yidong <cyd@stupidchicken.com> + + * emacs-lisp/re-builder.el (reb-mode-map): Fix logic error in + "Case sensitive" menu item. + +2011-01-22 Roland McGrath <roland@frob.com> + + * comint.el (comint-replace-by-expanded-history-before-point): Fix + expansion of !$ and !!:N syntax to pick the indicated word (bug#7883). + +2011-01-22 Stefan Monnier <monnier@iro.umontreal.ca> + + * progmodes/js.el (js--regexp-literal): Count backslashes (bug#7882). + +2011-01-22 Jari Aalto <jari.aalto@cante.net> + + * emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine): + Assume foo(bar) is a manpage reference rather than some unquoted + symbol (bug#7705). + +2011-01-22 Stefan Monnier <monnier@iro.umontreal.ca> + + * subr.el (shell-quote-argument): Properly quote \n (bug#7687). + Suggested by Flo <sensorflo@gmail.com>. + +2011-01-22 Glenn Morris <rgm@gnu.org> + + * progmodes/compile.el (compilation-error-regexp-alist): + Fix custom type. (Bug#7812) + +2011-01-22 Ken Manheimer <ken.manheimer@gmail.com> + + * allout.el (allout-prefixed-keybindings): Bind (prefixed) '#' to + allout-number-siblings, in keeping with what obtained due to + (now-defunct) allout-keybindings-list. Ditch repeat binding to + (prefixed) ?i. + (allout-before-change-handler): Better expose spots affected by + undo. + +2011-01-22 Chong Yidong <cyd@stupidchicken.com> + + * man.el (Man-highlight-references0): Use make-button (Bug#7881). + +2011-01-22 Phil Hagelberg <phil@evri.com> + + * pcmpl-unix.el (pcmpl-ssh-config-file): New option. + (pcmpl-ssh-known-hosts): Rename from pcmpl-ssh-hosts. + (pcmpl-ssh-config-hosts): New function. + (pcmpl-ssh-hosts): Use pcmpl-ssh-config-hosts in addition to + pcmpl-ssh-known-hosts. + +2011-01-21 Jay Belanger <jay.p.belanger@gmail.com> + + * calc/calc-undo.el (calc-undo): Autoload it. + * calc/calc-ext.el (calc-init-extensions): Remove keybindings + and autoload for `calc-undo'. + * calc/calc.el (calc-mode-map): Add keybindings for `calc-undo'. + * calc/calc-prog.el: + * calc/calc-graph.el: + * calc/calc-map.el: Change `arglist' to `math-arglist' throughout. + +2011-01-21 Å tÄ›pán NÄ›mec <stepnem@gmail.com> (tiny change) + + * calc/calc-ext.el (calc-init-extensions): Map all `undo' + keybindings to `calc-undo'. + +2011-01-20 Stefan Monnier <monnier@iro.umontreal.ca> + + Don't mess with *temp*. + * obsolete/spell.el: Move from textmodes/spell.el. + (spell-string): + * term.el (term-read-input-ring): + * startup.el (display-startup-echo-area-message): + * progmodes/antlr-mode.el (antlr-directory-dependencies): + * comint.el (comint-read-input-ring): Use with-temp-buffer. + * international/mule.el (ctext-pre-write-conversion): Don't hardcode + point-min==1. + +2011-01-20 Ken Manheimer <ken.manheimer@gmail.com> + + * allout.el: (allout-institute-keymap): Use fset instead of + reapplying defalias. + + (allout-hotspot-key-handler): Check for non-control-modified + bindings for hotspot characters if there are no control-modified + versions. + + * allout.el: Summary - migrate to defining allout mode using + define-minor-mode instead of defun. Significantly clean-up + internal keymap provisions, refactoring and, in the process, + removing a lot of accumulated cruft. + + allout-mode-map is now a keymap by virtue of being a defalias to + allout-mode-map-value, which contains the actual keymap structure. + + (allout-mode): Use define-minor-mode rather than defun. + Remove now-unnecessary minor-mode setup activities from the body. + Specify :keymap as allout-mode-map so the minor-mode-map-alist + entry will be '(allout-mode . allout-mode-map) - see + allout-mode-map-value, below. Adjust docstring to track changes. + (allout-minor-mode): Remove this defalias, now that we're using + define-minor-mode. + (allout-mode-map): Set value to be 'allout-mode-map. The actual + keymap is allout-mode-map-value, via defalias. + (allout-mode-map-value): The variable holding the actual mode + keymap structure, by virtue of defalias from allout-mode-map. + (allout-compose-and-institute-keymap): Rename from + allout-bind-keys, and including the binding-composition + functionality of the former produce-allout-mode-map and + allout-setup-mode-map. + (allout-institute-keymap): Take over the "setup" part of the former + allout-setup-mode-map. Reassign allout-mode-map-value value and + update the defalias. + (allout-command-prefix) (allout-prefixed-keybindings) + (allout-unprefixed-keybindings): + Use allout-compose-and-institute-keymap to process the bindings. + (allout-unprefixed-keybindings): Remove extraneous '?' question + marks. + (allout-prefixed-keybindings): Elide binding to (prefixed) \C-h - + user can customize if they want to use that binding. + Bind allout-copy-topic-as-kill to (prefixed) \M-k. + Bind allout-up-current-level to (prefixed) \C-u. (I think i mistakenly + elided that, previously, instead of the one for \C-h.) + (allout-hotspot-key-handler): Remove attempt to resolve the key + through the literal key-string lookup on allout-keybindings-list. + That probably hasn't worked for a Long Time, and removal of + allout-keybindings-list further simplifies the keybindings + situation. + (allout-pre-command-business): Use allout-mode-map-value instead + of allout-mode-map. + (allout-preempt-trailing-ctrl-h): Remove. The user can customize + the bindings if they want to use a keybinding having a trailing + \C-h. No deprecation needed since this feature was never in a + release. + (allout-keybindings-list): Remove. It's not been useful for a + while. (See allout-hotspot-key-handler changes, above.) + (produce-allout-mode-map): Remove. Consolidate into + allout-compose-and-institute-keymap. + (allout-mode-map-adjustments): Remove. No longer necessary with + removal of allout-preempt-trailing-ctrl-h. + (allout-setup-mode-map): Remove. Consolidate into + allout-compose-and-institute-keymap and allout-institute-keymap. + +2011-01-20 Glenn Morris <rgm@gnu.org> + + * vc/vc-svn.el (vc-svn-after-dir-status): Tweak previous change. + + * simple.el (read-expression-history): Remove, it's in minibuf.c. + +2011-01-20 Chong Yidong <cyd@stupidchicken.com> + + * subr.el (y-or-n-p): Revert 2011-01-07 change, removing ARGS. + + * files.el (find-alternate-file, basic-save-buffer) + (basic-save-buffer-2, revert-buffer, recover-file) + (kill-buffer-ask, abort-if-file-too-large) + (set-visited-file-name, write-file, backup-buffer) + (basic-save-buffer, save-some-buffers): + * dired-aux.el (dired-compress-file): Callers changed. + +2011-01-19 Glenn Morris <rgm@gnu.org> + + * vc/vc-svn.el (vc-svn-after-dir-status, vc-svn-parse-status): + Also check the property status. (Bug#7861) + +2011-01-18 Michael Albinus <michael.albinus@gmx.de> + + * net/tramp.el (tramp-debug-message): Extend function exclude + list. Use `regexp-opt'. + +2011-01-18 Stefan Monnier <monnier@iro.umontreal.ca> + + * textmodes/tex-mode.el (tex-font-lock-verb): Make sure \verb + highlighting doesn't spill over subsequent lines. + + * emacs-lisp/easy-mmode.el (define-minor-mode): Don't re-evaluate the + keymap expression. Improve docstring. + + * electric.el (electric-indent-post-self-insert-function): + Don't auto-indent for indent-to-left-margin, it's too often + counter-productive. + +2011-01-16 Tassilo Horn <tassilo@member.fsf.org> + + * strokes.el (strokes-read-stroke): Re-fill strokes buffer with + spaces if the frame was resized, so that the full visible buffer + serves as canvas for strokes. + +2011-01-16 Glenn Morris <rgm@gnu.org> + + * info-xref.el (info-xref-docstrings): Replace cl function. + Also skip directories. + +2011-01-16 Kevin Ryde <user42@zip.com.au> + + * info-xref.el: Version 3. + (info-xref-check, info-xref-check-all): Move commentary details + into docstrings for better visibility. + Use compilation-mode for the results buffer. + (info-xref-output, info-xref-output-error, info-xref-with-output) + (info-xref-filename, info-xref-in-progress): + New internals for this. + (info-xref-check-list, info-xref-check-buffer) + (info-xref-check-all-custom): Use those. + (info-xref-output-buffer): Rename from info-xref-results-buffer. + (info-xref-output-heading): Rename from info-xref-filename-heading. + (info-xref-good, info-xref-bad, info-xref-xfile-alist) + (info-xref-filename-heading): Move to output managing section. + (info-xref-docstrings): New command checking "Info node `(foo)Bar'" + (info-xref-lock-file-p, info-xref-with-file): New helpers for it. + (info-xref-subfile-p): Move to generic section with those two. + (info-xref-check-node): New function split from + info-xref-check-buffer, shared by info-xref-docstrings. + (info-xref-goto-node-p): Move to a checking section with that func. + (info-xref-unavail): New counter. + (info-xref-check-node): Use it. + (info-xref-with-output): Show count of unavailables at end of output. + (info-xref-all-info-files): Exclude ".*" dotfiles. Ignore broken + symlinks. Exclude .texi files. Exclude Emacs backup files. + (info-xref-check-all-custom): Fix quietening viper-mode and + gnus-registry-install -- use setq not let so as not to unbind + after load. + +2011-01-16 Juri Linkov <juri@jurta.org> + + * isearch.el (isearch-abort): Don't quit if search has + an incomplete regexp (isearch-error is non-nil). (Bug#7534) + +2011-01-15 Mark Diekhans <markd@soe.ucsc.edu> + + * files.el (backup-buffer): Make last-resort backup file in + .emacs.d (Bug#6953). + + * subr.el (locate-user-emacs-file): If .emacs.d does not exist, + make it with permission 700. + +2011-01-15 Kenichi Handa <handa@m17n.org> + + * mail/rmailmm.el (rmail-mime-insert-header): + Set rmail-mime-coding-system to a cons whose car is the last coding + system used to decode the header. + (rmail-mime-find-header-encoding): New function. + (rmail-mime-insert-decoded-text): + Override rmail-mime-coding-system if it is a cons. + (rmail-show-mime): If only a header part was decoded, find the + coding system while ignoring mm-charset-override-alist. + +2011-01-15 Chong Yidong <cyd@stupidchicken.com> + + * subr.el (event-start, event-end): Doc fix (Bug#7826). + +2011-01-15 Kenichi Handa <handa@m17n.org> + + * mail/rmailmm.el (rmail-mime-next-item) + (rmail-mime-previous-item): Delete them. + (rmail-mime-shown-mode): Recursively call for children. + (rmail-mime-hidden-mode): Delete the 2nd arg TOP. + Callers changed. + (rmail-mime-raw-mode): Recursively call for children. + (rmail-mode-map): Change mapping of tab and backtab to + forward-button and backward-button respectively. + (rmail-mime-insert-tagline): Always insert "Hide" or "Show" + button. + (rmail-mime-update-tagline): New function. + (rmail-mime-insert-text): Call rmail-mime-update-tagline if the + body display is changed. + (rmail-mime-toggle-button): Rename from rmail-mime-image. + (rmail-mime-image): Delete this button type. + (rmail-mime-toggle): New button type. + (rmail-mime-insert-bulk): Call rmail-mime-update-tagline if the + body display is changed. Change the save button label to "Save". + Don't process show/hide button here. + (rmail-mime-insert-multipart): Call rmail-mime-update-tagline if + the body display is changed. Unconditionally call + rmail-mime-insert for children. + (rmail-mime-handle): Update `display' vector of the just inserted + entity. + (rmail-mime-process): If mail-header-parse-content-type returns + nil, use "text/plain" as the fallback type. + (rmail-mime-insert): For raw-mode, recursively call + rmail-mim-insert for children. + (rmail-mime): Handle the case that the current buffer is not rmail + buffer (e.g. in summary buffer). + +2011-01-15 Kenichi Handa <handa@m17n.org> + + * mail/rmailmm.el (rmail-mime-next-item) + (rmail-mime-previous-item): Skip the body of a non-multipart + entity if a tagline is shown. + +2011-01-15 Stefan Monnier <monnier@iro.umontreal.ca> + + * tmm.el (tmm-get-keymap): Skip bindings without labels (bug#7721). + (tmm-prompt): Simplify. + (tmm-add-prompt): Remove unused var `win'. + + * whitespace.el (global-whitespace-newline-mode): Fix call (bug#7810) + to minor mode which used nil accidentally to mean "turn off". + +2011-01-15 Michael Albinus <michael.albinus@gmx.de> + + * net/tramp-sh.el (tramp-find-inline-compress) + (tramp-get-inline-coding): Quote command after pipe symbol for + local calls under W32. (Bug#6784) + +2011-01-15 Michael Albinus <michael.albinus@gmx.de> + + * net/tramp.el (tramp-default-method): Initialize with pscp/plink + only when running under W32. + +2011-01-15 Eli Zaretskii <eliz@gnu.org> + + * progmodes/grep.el (grep-compute-defaults): Quote the program + file name after the pipe symbol in Grep templates. (Bug#6784) + * jka-compr.el (jka-compr-partial-uncompress): Likewise. + +2011-01-15 Lennart Borgman <lennart.borgman@gmail.com> + + * buff-menu.el (Buffer-menu-buffer-list): New var. + (Buffer-menu-revert-function, list-buffers-noselect): Use it, so a + restricted buffer list is not lost on revert (Bug#7749). + +2011-01-15 Eric Hanchrow <eric.hanchrow@gmail.com> + + * net/ldap.el (ldap-search-internal): Discard stderr output. + +2011-01-15 Eli Zaretskii <eliz@gnu.org> + + * files.el (directory-abbrev-alist): Doc fix. (Bug#7777) + +2011-01-15 Stefan Monnier <monnier@iro.umontreal.ca> + + * vc-bzr.el (vc-bzr-annotate-time): Tweak previous change. + +2011-01-15 Kenichi Handa <handa@m17n.org> + + * mail/rmailmm.el (rmail-mime-insert-bulk): Display an unknown + part as a plain text. + (rmail-mime-process-multipart): Set the default content-type to + nil for unknown multipart subtypes (bug#7651). + +2011-01-14 Stefan Monnier <monnier@iro.umontreal.ca> + + * hexl.el (hexl-mode-old-*): Remove. + (hexl-mode--old-var-vals): New var to replace them. + (hexl-mode--minor-mode-p, hexl-mode--setq-local): New funs. + (hexl-mode, hexl-follow-line, hexl-activate-ruler): + Use them to set local vars (bug#7846). + (hexl-mode-exit): Use hexl-mode--old-var-vals to restore state. + (hexl-backward-short, hexl-backward-word, hexl-scroll-down) + (hexl-scroll-up, hexl-end-of-1k-page, hexl-end-of-512b-page): Simplify. + + * vc/smerge-mode.el: Resolve comment conflicts more aggressively. + (smerge-resolve--normalize-re): New var. + (smerge-resolve--extract-comment, smerge-resolve--normalize): New funs. + (smerge-resolve): Use them. + * newcomment.el (comment-only-p): New function. + (comment-or-uncomment-region): Use it. + +2011-01-14 Brent Goodrick <bgoodr@gmail.com> (tiny change) + + * abbrev.el (prepare-abbrev-list-buffer): If listing local abbrev + table, get the value before switching to the output buffer. (Bug#7733) + +2011-01-14 Stefan Monnier <monnier@iro.umontreal.ca> + + * progmodes/python.el (python-mode): Don't impose font-lock (bug#3628). + +2011-01-14 Kim F. Storm <storm@cua.dk> + + * emulation/cua-base.el (cua--init-keymaps): + Remap exchange-point-and-mark in cua-global-keymap. + +2011-01-14 Tassilo Horn <tassilo@member.fsf.org> + + * progmodes/sh-script.el (sh-other-keywords): Add ZSH's foreach + loop keyword. + +2011-01-14 Stefan Monnier <monnier@iro.umontreal.ca> + + * emacs-lisp/easymenu.el: Add :enable (bug#7754), and obey :label. + Require CL. + (easy-menu-create-menu, easy-menu-convert-item-1): + Use :label rather than nil for labels. Use `case'. + Add :enable as alias for :active. + (easy-menu-binding): Obey :label. + +2011-01-13 Stefan Monnier <monnier@iro.umontreal.ca> + + Use run-mode-hooks for major mode hooks (bug#513). + * textmodes/reftex-toc.el (reftex-toc-mode-map): + Rename from reftex-toc-map. + (reftex-toc-mode): Use define-derived-mode. + * textmodes/reftex-sel.el (reftex-select-shared-map): New map. + (reftex-select-label-mode-map, reftex-select-bib-mode-map): + Rename from reftex-select-(label|bib)-map. Move init into declaration. + (reftex-select-label-mode, reftex-select-bib-mode): + Use define-derived-mode. + * textmodes/reftex-index.el (reftex-index-phrases-mode-map) + (reftex-index-mode-map): Rename from reftex-index(-phrases)-map. + Move init into delcaration. + (reftex-index-mode, reftex-index-phrases-mode): + Use define-derived-mode. + * speedbar.el (speedbar-mode-syntax-table): Renaqme from + speedbar-syntax-table. Move init into declaration. + (speedbar-mode-map): Rename from speedbar-key-map. + Move init into declaration. + (speedbar-file-key-map): Move init into declaration. + (speedbar-mode): Use define-derived-mode. + * recentf.el (recentf-mode): Don't run hook (or message) redundantly. + * net/rcirc.el (rcirc-mode): Use run-mode-hooks. + * emacs-lisp/chart.el (chart-mode-map): Rename from chart-map. + (chart-face-list): Move initialization into declaration. + (chart-mode): Use define-derived-mode. + * calculator.el (calculator-mode-map): Move init into declaration. + (calculator-mode): Use define-derived-mode. + + * mail/mail-utils.el (mail-strip-quoted-names): Make the regexp code + work for nested comments. + + * progmodes/prolog.el: Use syntax-propertize. Further code cleanup. + (prolog-use-prolog-tokenizer-flag): Change default when + syntax-propertize can be used. + (prolog-syntax-propertize-function): New var. + (prolog-mode-variables): Move make-local-variable into `set'. + Don't make comment-column local since we don't set it. + Set comment-add (as it was in previous prolog.el). Use dolist. + Set syntax-propertize-function. + (prolog-mode, prolog-inferior-mode): + Call prolog(-inferior)-menu directly, not through the mode-hook. + (prolog-buffer-module, prolog-indent-level) + (prolog-paren-is-the-first-on-line-p, prolog-paren-balance) + (prolog-comment-limits, prolog-goto-comment-column): + Use line-(end|beginning)-position. + (prolog-build-prolog-command): Tighten up regexp. + (prolog-consult-compile): Move make-local-variable into `set'. + (prolog-consult-compile-filter, prolog-goto-next-paren) + (prolog-help-on-predicate, prolog-clause-info) + (prolog-mark-predicate): Don't let+setq. + (prolog-indent-line): Use indent-line-to. + Only call prolog-goto-comment-column if necessary. + (prolog-indent-level): Use bobp. + (prolog-first-pos-on-line): Remove, not used any more. + (prolog-in-string-or-comment): Use syntax-ppss if available. + (prolog-help-on-predicate): Use read-string. + (prolog-goto-predicate-info): Simplify. + (prolog-read-predicate): Use `default' rather than `initial'. + (prolog-temporary-file): Use make-temp-file to close a security hole. + (prolog-toggle-sicstus-sd): New command. + (prolog-electric-underscore, prolog-variables-to-anonymous): + Use dynamic-scoping as it was meant. + (prolog-menu): Move menu definitions to top-level. + Use a toggle-button for Sicstus's source debugger. + Change "Code" to the more usual "Prolog", and hence change "Prolog" + to "System". + (prolog-inferior-menu): Reuse prolog-menu's help menu. + Move other menu definition to top-level. + +2011-01-13 Tassilo Horn <tassilo@member.fsf.org> + + * doc-view.el (doc-view-open-text): Use meaningful text buffer + name. Keep original document's directory as default-directory + (bug#6446). + (doc-view-initiate-display): Fall back to normal mode when + doc-view-mode cannot be enabled, also when extracting the document + text into a separate buffer (bug#6446). + + * simple.el (shell-command): Don't error out if shell command + buffer contains text with non-nil read-only property when erasing + the buffer. + +2011-01-13 Kim F. Storm <storm@cua.dk> + + * ido.el (ido-may-cache-directory): Move "too-big" check later. + (ido-next-match, ido-prev-match): Fix stray reordering of matching + items when cycling through the matches. + +2011-01-13 Tassilo Horn <tassilo@member.fsf.org> + + * dired-x.el (dired-omit-verbose): New defcustom that allows + disabling the omit messages. + (dired-omit-expunge): Use it. + +2011-01-13 Christian Ohler <ohler@gnu.org> + + * emacs-lisp/ert.el, emacs-lisp/ert-x.el: New files. + +2011-01-13 Chong Yidong <cyd@stupidchicken.com> + + * font-lock.el (font-lock-verbose): Default to nil. + +2011-01-13 Chong Yidong <cyd@stupidchicken.com> + + * simple.el (sendmail-user-agent-compose): Move to sendmail.el. + (compose-mail): New arg RETURN-ACTION. + (compose-mail-other-window, compose-mail-other-frame): Likewise. + + * mail/sendmail.el (mail-return-action): New var. + (mail-mode): Make it buffer-local. + (mail-bury): Obey it. Move special Rmail window handling to + rmail-mail-return. + (mail, mail-setup): New arg RETURN-ACTION. + (sendmail-user-agent-compose): Move from simple.el. + + * mail/rmail.el (rmail-mail-return): New function. + (rmail-start-mail): Pass it to compose-mail. + +2011-01-12 Chong Yidong <cyd@stupidchicken.com> + + * menu-bar.el (menu-bar-custom-menu): Tweak Mule and Customize + menus. Add menu item for customize-themes. + + * cus-theme.el (customize-themes): + * emacs-lisp/package.el (package--list-packages): + Use switch-to-buffer. + +2011-01-11 Johan BockgÃ¥rd <bojohan@gnu.org> + + * emacs-lisp/unsafep.el (unsafep): Handle backquoted forms. + +2011-01-11 Stefan Monnier <monnier@iro.umontreal.ca> + + * progmodes/prolog.el: Fix up coding convention and such. + (prolog-indent-width): Use the same default as in + previous prolog.el rather than tab-width which depends on which buffer + is current when the file is loaded. + (prolog-electric-newline-flag): Only enable if electric-indent-mode + is not available. + (prolog-emacs): Remove. Use (featurep 'xemacs) instead. + (prolog-known-systems): Remove. + (prolog-mode-syntax-table, prolog-inferior-mode-map): + Move initialization into declaration. + (prolog-mode-map): Move initialization into declaration. + Remove system-specific mode-map vars, since they referred to the same + keymap anyway. + (prolog-mode-variables): Obey the user's preference w.r.t + adaptive-fill-mode. Prefer symbol-value to `eval'. + (prolog-mode-keybindings-edit): Add compatibility bindings. + (prolog-mode): Use define-derived-mode. Don't handle mercury here. + (mercury-mode-map): New var. + (mercury-mode, prolog-inferior-mode): Use define-derived-mode. + (prolog-ensure-process, prolog-process-insert-string) + (prolog-consult-compile): Use with-current-buffer. + (prolog-guess-fill-prefix): Simplify data flow. + (prolog-replace-in-string): New function to use instead of + replace-in-string. + (prolog-enable-sicstus-sd): Don't abuse `eval'. + (prolog-uncomment-region): Use `uncomment-region' when available. + (prolog-electric-colon, prolog-electric-dash): Use `eolp'. + (prolog-int-to-char, prolog-char-to-int): New functions to use instead + of int-to-char and char-to-int. + (prolog-mode-hook, prolog-inferior-mode-hook): Don't force font-lock. + +2011-01-11 Stefan Bruda <stefan@bruda.ca> + + * progmodes/prolog.el: Replace by a whole new file. + +2011-01-11 Stefan Monnier <monnier@iro.umontreal.ca> + + * subr.el (eval-after-load): Fix timing for features (bug#7769). + (declare-function, undefined, insert-for-yank) + (replace-regexp-in-string): Follow checkdoc's recommendations. + +2011-01-10 Stefan Monnier <monnier@iro.umontreal.ca> + + * calendar/diary-lib.el (diary-mode): Refresh *Calendar* after + refreshing the diary buffer. + +2011-01-10 Ken Manheimer <ken.manheimer@gmail.com> + + * allout.el: Add 2011 to the file copyright. + (allout-encrypt-string): Prevent encryption from adding an extra + newline at the end of the topic body. + (allout-version): Increment to 2.3. + +2011-01-10 Michael Albinus <michael.albinus@gmx.de> + + * net/dbus.el (dbus-unregister-service): Complete doc. + Fix call of dbus-error signal. + (dbus-register-property): Use `dont-register' keyword. + +2011-01-10 Jan Moringen <jan.moringen@uni-bielefeld.de> + + * net/dbus.el (dbus-unregister-service): Translate returned + integer into a symbol. + (dbus-register-property): Use `dbus-register-service' to do the + name registration. + +2011-01-09 Chong Yidong <cyd@stupidchicken.com> + + * progmodes/idlw-help.el (idlwave-help-link): Inherit from link face. + Suggested by Joakim Verona. + + * comint.el (comint-highlight-prompt): Inherit minibuffer-prompt. + + * wid-edit.el (visibility): Replace :on-image and :off-image + widget properties with :on-glyph and :off-glyph, for consistency + with the `visibility' widget. + (widget-toggle-value-create, widget-visibility-value-create): + Merge into a single function `widget-toggle-value-create'. + + * cus-edit.el (custom-variable-value-create, custom-visibility) + (custom-face-edit-value-create, custom-face-value-create): + Replace :on-image and :off-image widget properties with :on-glyph and + :off-glyph, for consistency with the `visibility' widget. + +2011-01-09 Andreas Schwab <schwab@linux-m68k.org> + + * net/ldap.el (ldap-search-internal): Don't use eval. + +2011-01-09 Chong Yidong <cyd@stupidchicken.com> + + * subr.el (read-char-choice): Use read-key. + + * custom.el (custom-safe-themes): Rename from + custom-safe-theme-files. Add :risky tag. + (load-theme, custom-theme-load-confirm): Save sha1 hashes to + custom-safe-themes, not filenames. Suggested by Stefan Monnier. + +2011-01-09 Chong Yidong <cyd@stupidchicken.com> + + * tool-bar.el (tool-bar-setup): Remove Help button. Remove label + from Search and add a label to Undo. + + * vc/vc-dir.el (vc-dir-tool-bar-map): Rearrange, removing + inappropriate buttons and adding :vert-only tags. + + * progmodes/compile.el (compilation-mode-tool-bar-map): Adjust to + removal of Help tool-bar button. Remove Undo button for space. + + * info.el (info-tool-bar-map): Add :vert-only tags. + +2011-01-08 Tassilo Horn <tassilo@member.fsf.org> + + * doc-view.el (doc-view-mode-p): Check for png or imagemagick + image backend support. Either of them is fine. + +2011-01-08 Chong Yidong <cyd@stupidchicken.com> + + * subr.el (y-or-n-p): Doc fix. + + * custom.el (custom-safe-theme-files): New defcustom. + (custom-theme-load-confirm): New function. + (load-theme): Load theme using `load', confirming with + custom-theme-load-confirm if necessary. + + * subr.el (read-char-choice): New function, factored out from + dired-query and hack-local-variables-confirm. + + * dired-aux.el (dired-query): + * files.el (hack-local-variables-confirm): Use it. + + * dired-aux.el (dired-compress-file): + * files.el (abort-if-file-too-large, find-alternate-file) + (set-visited-file-name, write-file, backup-buffer) + (basic-save-buffer, basic-save-buffer-2, save-some-buffers) + (delete-directory, revert-buffer, recover-file, kill-buffer-ask): + Use new format string args for y-or-n-p and yes-or-no-p. + +2011-01-08 Andreas Schwab <schwab@linux-m68k.org> + + * progmodes/compile.el (compilation-error-regexp-alist-alist) + [gcc-include]: Tighten file name match, add match for column + number. (Bug#7806) + [gnu]: Remove unused group. + +2011-01-08 Glenn Morris <rgm@gnu.org> + + * makefile.w32-in (EMACSOPT): Add --no-site-lisp. + + * makefile.w32-in (EMACSOPT): -batch implies --no-init-file. + +2011-01-07 Sam Steingold <sds@gnu.org> + + * w32-fns.el (w32-shell-name): Use `shell-file-name' instead of + the `explicit-shell-file-name' because that is the + non-interactive shell. + +2011-01-07 Chong Yidong <cyd@stupidchicken.com> + + * subr.el (y-or-n-p): Accept format string args. + +2011-01-07 Glenn Morris <rgm@gnu.org> + + * Makefile.in (EMACSOPT): Add --no-site-lisp. + +2011-01-06 Ken Manheimer <ken.manheimer@gmail.com> + + * allout.el (allout-back-to-current-heading): Ensure return to + the visible containing topic, rather than a collapsed one. + (allout-view-change-hook): Remove hook that was deprecated long ago. + (allout-exposure-change-hook): Remove documentation remarks + concerning removed allout-view-change-hook. + (allout-flag-region): Remove invocation of and documentation + remarks concerning allout-view-change-hook. + +2011-01-06 Glenn Morris <rgm@gnu.org> + + * vc/vc-bzr.el (vc-bzr-annotate-command, vc-bzr-annotate-time) + (vc-bzr-annotate-extract-revision-at-line): + Handle authors with embedded spaces. (Bug#7792) + +2011-01-05 Tassilo Horn <tassilo@member.fsf.org> + + * doc-view.el (doc-view-image-width): New variable. + (doc-view-enlarge, doc-view-insert-image): Prefer imagemagick + backend for PNG images, and do dynamic rescaling instead of + reconverting the whole doc. + +2011-01-05 Glenn Morris <rgm@gnu.org> + + * emacs-lisp/rx.el (rx-repeat): Replace CL function. + +2011-01-04 Ken Manheimer <ken.manheimer@gmail.com> + + * allout.el: Reconcile with changes in line movement behavior for + long text lines that cross more than a single physical window + line, ie when truncate-lines is nil. + (allout-next-visible-heading): Provide for change in line-move + behavior on long lines when truncate-lines is nil. In that case, + line-move can wind up on the same textual line when it moves to + the next window line, and moving to the bullet position after the + move yields zero advancement. Add logic to detect and compensate + for the lack of progress. + (allout-current-topic-collapsed-p): move-end-of-line respect for + field boundaries is different when operating with body lines + shorter than window width versus ones greater than window width, + which can yield false negatives in this function. Avoid + difference by applying move-end-of-line while field-text-motion is + inhibited. + +2011-01-04 Glenn Morris <rgm@gnu.org> + + * textmodes/rst.el (rst-compile-toolsets): + Add pdf and s5 to option alist. + +2011-01-04 Jan Moringen <jan.moringen@uni-bielefeld.de> + + * net/dbus.el (dbus-register-property): Add optional parameter + dont-register-service. Updated docstring accordingly. + +2011-01-04 Andreas Schwab <schwab@linux-m68k.org> + + * textmodes/rst.el (rst-compile-pdf-preview) + (rst-compile-slides-preview): Remove extra line. + +2011-01-04 Glenn Morris <rgm@gnu.org> + + * textmodes/rst.el (rst-compile-toolsets): Make it a defcustom. + Add `pdf' and `s5' entries. Use `prog.py' if found, otherwise + default to `prog' without a .py extension. + (rst-compile-pdf-preview, rst-compile-slides-preview): + Use program names from rst-compile-toolsets, rather than hard-coding. + (rst-portable-mark-active-p): Fix presumed typo. + +2011-01-02 Eli Zaretskii <eliz@gnu.org> + + * term/w32-win.el (dynamic-library-alist): Set up correctly for + libpng versions both before and after 1.4.0. (Bug#7716) + +2011-01-02 Eli Zaretskii <eliz@gnu.org> + + * time.el (display-time-mode): Mention display-time-interval in + the doc string. (Bug#7713) + +2011-01-02 Kenichi Handa <handa@m17n.org> + + * mail/rmailmm.el (rmail-mime-parse): Perform parsing in + condition-case and return an error message string if something + goes wrong. + (rmail-show-mime): Adjust for the above change. Insert the + header by rmail-mime-insert-header. + +2011-01-02 Kenichi Handa <handa@m17n.org> + + * mail/rmailmm.el: New key bindings for rmail-mime-next-item, + rmail-mime-previous-item, and rmail-mime-toggle-hidden. + (rmail-mime-mbox-buffer) + (rmail-mime-view-buffer, rmail-mime-coding-system): New variables. + (rmail-mime-entity): Argument changed. All codes handling an + entity object are changed. + (rmail-mime-entity-header, rmail-mime-entity-body): Adjust for + the above change. + (rmail-mime-entity-children, rmail-mime-entity-handler) + (rmail-mime-entity-tagline): New functions. + (rmail-mime-message-p): New function. + (rmail-mime-save): Bind rmail-mime-mbox-buffer. + (rmail-mime-entity-segment, rmail-mime-next-item) + (rmail-mime-previous-item, rmail-mime-shown-mode) + (rmail-mime-hidden-mode, rmail-mime-raw-mode) + (rmail-mime-toggle-raw, rmail-mime-toggle-hidden) + (rmail-mime-insert-tagline, rmail-mime-insert-header): + New functions. + (rmail-mime-text-handler): Call rmail-mime-insert-text. + (rmail-mime-insert-decoded-text): New function. + (rmail-mime-insert-text): Call rmail-mime-insert-decoded-text. + (rmail-mime-insert-image): Argument changed. Caller changed. + (rmail-mime-image): Call rmail-mime-toggle-hidden. + (rmail-mime-set-bulk-data): New funciton. + (rmail-mime-insert-bulk): Argument changed. + (rmail-mime-multipart-handler): Return t. + (rmail-mime-process-multipart): Argument changed. + Handle "multipart/alternative" here. + (rmail-mime-process): Argument changed. + (rmail-mime-parse): Bind rmail-mime-mbox-buffer. + (rmail-mime-insert): Argument changed. Handle raw display mode. + (rmail-mime): Argument changed. Handle toggling of raw display + mode. + (rmail-show-mime): Bind rmail-mime-mbox-buffer and + rmail-mime-view-buffer. + (rmail-insert-mime-forwarded-message): Likewise. + (rmail-search-mime-message): Likewise. Don't bind rmail-buffer. + + * mail/rmail.el (rmail-show-message-1): If rmail-enable-mime is + non-nil, handle the header in rmail-show-mime-function. + +2011-01-02 Leo <sdl.web@gmail.com> + + * help-fns.el (describe-variable): Fix previous change. + +2011-01-02 Juri Linkov <juri@jurta.org> + + * isearch.el (isearch-lazy-highlight-error): New variable. + (isearch-lazy-highlight-new-loop): Compare `isearch-error' and + `isearch-lazy-highlight-error'. Set `isearch-lazy-highlight-error' + to the current value of `isearch-error' (Bug#7468). + +2011-01-02 Chong Yidong <cyd@stupidchicken.com> + + * help-fns.el (describe-variable): Don't emit trailing whitespace + (Bug#7511). + +2011-01-02 Chong Yidong <cyd@stupidchicken.com> + + * textmodes/rst.el (rst-compile-pdf-preview) + (rst-compile-slides-preview): Use make-temp-file (Bug#7646). + +2011-01-02 Kevin Gallagher <Kevin.Gallagher@boeing.com> + + * emulation/edt-mapper.el: Override mapping of function keys so + that the later call to read-key-sequence works. + +2011-01-02 Eli Zaretskii <eliz@gnu.org> + + * mail/smtpmail.el (smtpmail-send-it): Write queued mail body with + Unix EOLs. (Bug#7589) + +2011-01-02 Leo <sdl.web@gmail.com> + + * eshell/em-hist.el (eshell-previous-matching-input): Signal error + if point is not behind eshell-last-output-end (Bug#7585). + +2011-01-02 Stefan Monnier <monnier@iro.umontreal.ca> + + * files.el (file-local-variables-alist): + Make permanent-local (bug#7767). + +2011-01-02 Glenn Morris <rgm@gnu.org> + + * version.el (emacs-copyright): Set short copyright year to 2011. + +2011-01-02 Mark Lillibridge <mark.lillibridge@hp.com> (tiny change) + + * mail/mail-utils.el (mail-strip-quoted-names): Avoid clobbering + an existing temp buffer. (Bug#7746) + +2011-01-02 Glenn Morris <rgm@gnu.org> + + * mail/mail-utils.el (mail-mbox-from): Handle From: headers with + multiple addresses. (Bug#7760) + +2011-01-01 Ken Manheimer <ken.manheimer@gmail.com> + + * allout.el (allout-auto-fill): Do not infinitely recurse - use + do-auto-fill if everything points back to allout-auto-fill. + (allout-mode-deactivate-hook): Declare obsolete, in favor of + standard-formed minor-mode deactivate hook, allout-mode-off-hook. + +2010-12-31 Michael Albinus <michael.albinus@gmx.de> + + * net/tramp-sh.el (tramp-methods): Add recursive options to "scpc" + and "scpx". + +2010-12-30 Tassilo Horn <tassilo@member.fsf.org> + + * doc-view.el (doc-view-set-doc-type): New function refactored + from doc-view-mode. + (doc-view-fallback-mode): New function. + (doc-view-mode): Use it. + (doc-view-mode-maybe): New function that checks if doc-view-mode + can be used and falls back to the next best mode otherwise. + + * files.el (auto-mode-alist): Use doc-view-mode-maybe for PDF, + DVI, OpenDocument, and MS Office files. + +2010-12-30 Andreas Schwab <schwab@linux-m68k.org> + + * emacs-lisp/rx.el (rx-syntax): Fix typo. + +2010-12-30 Tassilo Horn <tassilo@member.fsf.org> + + * doc-view.el (doc-view-toggle-display): Perform rassq-delete-all + on a copy of auto-mode-alist, because that deletes with side + effects. + +2010-12-30 Tassilo Horn <tassilo@member.fsf.org> + + * doc-view.el (doc-view-mode, doc-view-toggle-display): + Use normal-mode without doc-view-mode bindings in auto-mode-alist as + fallback instead of hard coding fundamental mode. + +2010-12-30 Tassilo Horn <tassilo@member.fsf.org> + + * doc-view.el (doc-view-doc->txt): Handle OpenDocument (or MS + Office) files also for searching. + +2010-12-30 Tassilo Horn <tassilo@member.fsf.org> + + * doc-view.el: Implement viewing of OpenDocument (and Microsoft + Office) files. Not yet enabled via auto-mode-list. + (doc-view-unoconv-program): New custom variable. + (doc-view-mode-p): Handle new odf document type. + (doc-view-odf->pdf): New conversion function. + (doc-view-convert-current-doc): Call it for odf files. + (doc-view-mode): Recognize newly supported file extensions. + +2010-12-30 Michael Albinus <michael.albinus@gmx.de> + + * net/tramp.el (tramp-default-method-alist) + (tramp-default-user-alist) + (tramp-local-host-regexp, tramp-prefix-domain-format) + (tramp-prefix-domain-regexp): Set tramp-autoload cookie. + + * net/tramp-ftp.el: + * net/tramp-gvfs.el: + * net/tramp-gw.el: + * net/tramp-imap.el: + * net/tramp-sh.el: + * net/tramp-smb.el: Add tramp-autoload cookie for initialisation + code of `tramp-default-method-alist' and `tramp-default-user-alist'. + +2010-12-29 Karl Fogel <kfogel@red-bean.com> + + * saveplace.el (save-place-alist-to-file): Save list sorted and + pretty-printed, so that it is mergeable by line-based text merging, + as suggested by Iain Dalton <iain.dalton {_AT_} gmail.com>. + +2010-12-28 Ken Manheimer <ken.manheimer@gmail.com> + + * allout.el (allout-v18/19-file-var-hack): Obsolete, remove. + (allout-mode): Argument "toggle" => "force". + Refine the docstring. + Remove special provisions for reactivation, besides the 'force' + argument. + Consolidate layout provisions coce directly into the activation + condition branch, now that we've removed those provisions. + (allout-unload-function): Explicitly activate the mode before + deactivating, if it's initially deactivated. + (allout-set-buffer-multibyte): Properly prevent byte-compiler + warnings for version of function used only where + set-buffer-multibyte is unavailable. + +2010-12-28 Chong Yidong <cyd@stupidchicken.com> + + * tool-bar.el (tool-bar-setup): Remove :enable conditions, which + are handled by the menu-bar entries. As before, don't use + :visibile to avoid changing the tool-bar. + +2010-12-27 Michael Albinus <michael.albinus@gmx.de> + + * net/secrets.el (secrets-delete-alias): New defun. + +2010-12-27 Michael Albinus <michael.albinus@gmx.de> + + * net/tramp.el (tramp-default-user-alist): Do not add "ssh" based + methods, otherwise ~/.ssh/config would be ignored. + +2010-12-26 Stefan Monnier <monnier@iro.umontreal.ca> + + * emacs-lisp/rx.el: Make it a superset of sregex. + (rx-constituents): Add `any => "."', mark `repeat' as taking any number + of args, add `regex' alias. + (rx-info): Add arg to distinguish head and standalone forms. + (rx-check, rx-form): Pass the corresponding arg. + (rx-**): Simplify. + (rx-repeat): Make it work for any number of args. + (rx-syntax): Make it accept syntax chars as is. + * obsolete/sregex.el: Move from emacs-lisp/. + * emacs-lisp/re-builder.el: Remove sregex support. + * emacs-lisp/edebug.el (sregexq, rx): Remove redundant defs. + +2010-12-25 Eli Zaretskii <eliz@gnu.org> + + * mouse.el (mouse-yank-primary): On MS-Windows, try the (emulated) + PRIMARY first, then the clipboard. (Bug#7699) + +2010-12-22 Stefan Monnier <monnier@iro.umontreal.ca> + + * emacs-lisp/bytecomp.el (byte-compile-output-docform): Fix up use of + print-number-table. + +2010-12-21 Chong Yidong <cyd@stupidchicken.com> + + * help-fns.el (find-lisp-object-file-name): Locate .emacs from + .emacs.elc (Bug#7530). + + * wid-edit.el (widget-image-find): Remove bogus :ascent spec from + image spec (Bug#7480). + +2010-12-21 Daiki Ueno <ueno@unixuser.org> + + * obsolete/pgg-parse.el, obsolete/pgg-pgp5.el, obsolete/pgg-pgp.el, + * obsolete/pgg-gpg.el, obsolete/pgg-def.el, obsolete/pgg.el: + Move from lisp/. + +2010-12-20 Leo <sdl.web@gmail.com> + + * dnd.el (dnd-get-local-file-name): Unhex of file name shall + always be performed (Bug#7680). + +2010-12-20 Chong Yidong <cyd@stupidchicken.com> + + * menu-bar.el (menu-bar-kill-ring-save): Make obsolete. + (menu-bar-edit-menu): Bind "Copy" to kill-ring-save. Don't use + mouse-region-match. + + * color.el: Move from gnus/. + + * vc/diff.el (diff-better-file-name): Function deleted. + abbreviating file names causes problems with shell-quote-argument. + (diff-no-select): Just use expand-file-name. + + * tool-bar.el (tool-bar--image-expression): New function. + (tool-bar-local-item, tool-bar--image-exp): Use it. + (tool-bar-setup): Initialize tool-bar-separator-image-expression. + Use :enable instead of :visible to avoid changing the tool-bar + configuration unnecessarily. + + * info.el (info-tool-bar-map): Add separators. + +2010-12-17 Ken Brown <kbrown@cornell.edu> + + * loadup.el: Use version numbers in Cygwin build. + +2010-12-17 Ryan Twitchell <metatheorem@gmail.com> (tiny change) + + * ido.el (ido-file-internal): Ask for confirmation before + overwriting an existing file (Bug#1238). + +2010-12-16 Chong Yidong <cyd@stupidchicken.com> + + * tool-bar.el (tool-bar-setup): Add separators. + + * menu-bar.el (featurep): Use menu-bar-separator. + +2010-12-16 Ken Manheimer <ken.manheimer@gmail.com> + + Migrate allout encryption provisions from pgg to epg. + + * allout.el (allout-toggle-current-subtree-encryption) + (allout-toggle-subtree-encryption): Adjust docstrings to reflect + defaulting policy and other changes. Change fetch-pass to keymode-cue, + for simpler universal argument interpretation. + (allout-toggle-subtree-encryption): Adjust docstring to describe + changed encryption provisions. Change fetch-pass to keymode-cue, for + simpler universal argument interpretation. Remove provisions for + handling key type and identity - they'll all be within + allout-encrypt-string or epg/epg or even contained all the way in gpg. + (allout-encrypt-string): Include keymode-cue, for optionally prompting + for keypair recipients (universal argument > 1) and, in addition, + associating the specified recipients with the outline (universal + argument > 4) using a file local variable setting for + 'epa-file-encrypt-to'. + Require epa, for recipients handling. + Change how regexp filtering elements are named. + Describe the problem with caching of incorrect symmetric-decryption + keys. + Use the epa-passphrase-callback-function, in case the user is using + GnuPG v1. + Support saving of the selected keypair recipients when invoked with a + keymode-cue > 4. + Remove obsolete arguments 'fetch-pass', 'target-cache-id', 'retried'. + Require 'epa. + Establish epg-context with armoring and default epg-protocol. + Remove all passphrase cache, verification, and hinting code. + (allout-passphrase-verifier-handling, allout-passphrase-hint-handling): + No longer used, delete. + (allout-mode): Adjust docstring to describe changed encryption + provisions. Describe the problem with caching of incorrect + symmetric-decryption keys. + (allout-obtain-passphrase, allout-epg-passphrase-callback-function) + (allout-make-passphrase-state, allout-passphrase-state-passphrase) + (allout-encrypted-key-info, allout-update-passphrase-mnemonic-aids) + (allout-get-encryption-passphrase-verifier, allout-verify-passphrase): + Obsolete, remove. + +2010-12-16 Daiki Ueno <ueno@unixuser.org> + + * epa-file.el (epa-file-select-keys): Accept 'silent to inhibit + key selection prompt; make 'silent as default (Bug#7487). + +2010-12-16 Leo <sdl.web@gmail.com> + + * eshell/eshell.el (eshell-directory-name): + Use locate-user-emacs-file (Bug#7578). + +2010-12-15 Glenn Morris <rgm@gnu.org> + + * loadup.el (symbol-file-load-history-loaded): Remove; unused. + +2010-12-15 Jari Aalto <jari.aalto@cante.net> + Scott Evans <gse@antisleep.com> + + * rect.el (rectange--default-line-number-format) + (rectangle-number-line-callback): New functions. + (rectangle-number-lines): New command, bound to C-x r N (Bug#4382). + +2010-12-15 Chong Yidong <cyd@stupidchicken.com> + + * rect.el (operate-on-rectangle-lines, string-rectangle-string): + Delete unused variables. + (move-to-column-force): Remove function obsolete since 21.2. + +2010-12-14 Michael Albinus <michael.albinus@gmx.de> + + * net/tramp.el (tramp-temp-buffer-file-name): Make it permanent-local. + (tramp-handle-insert-file-contents): Do not set permanent-local + property. + + * net/tramp-cache.el (tramp-persistency-file-name): + Use `locate-user-emacs-file' if fboundp. + + * net/tramp-sh.el (tramp-methods): Add "ksu". + (tramp-default-user-alist): Add "ksu". Use `regexp-opt' for + method list. + +2010-12-14 Glenn Morris <rgm@gnu.org> + + * progmodes/js.el: Doc't require font-lock, etags, or easymenu. + (find-tag-marker-ring): Declare. + (js-find-symbol): Require etags. + + * mail/sendmail.el: Don't require rmail or mailalias when compiling. + Require mail-utils. + (mail-alias-file): Don't autoload. Doc fix. + (mail-bury-selects-summary, mail-send-nonascii): Don't autoload. + (mail-mailer-swallows-blank-line): Default to nil. Doc fix. + Mark as obsolete, and risky. + (mail-setup): Simplify. + + * mail/mailalias.el (build-mail-aliases): Make it interactive. + * mail/sendmail.el (build-mail-aliases): Update autoload. + + * dired.el (dired-trivial-filenames, dired-chown-program) + (dired-auto-revert-buffer): Remove autoload cookies. + * mail/sendmail.el (mail-recover-1): Require 'dired. + + * dired.el (dired-subdir-switches, dired-chown-program) + (dired-use-ls-dired, dired-chmod-program, dired-touch-program): + Make into defcustoms. + (dired-chown-program): Simplify initialization. + + * mail/mail-utils.el: No need to require lisp-mode, it's in loadup. + +2010-12-13 Romain Francoise <romain@orebokech.com> + + * net/gnutls.el (gnutls-negotiate): Fix setting of default trustfiles. + +2010-12-13 Lars Magne Ingebrigtsen <larsi@gnus.org> + + * net/netrc.el (netrc-point-at-eol): Remove the unused + netrc-point-at-old and netrc-bound-and-true-p bindings. + (netrc-parse): Cache the netrc contents. + +2010-12-13 Eli Zaretskii <eliz@gnu.org> + + * subr.el (posn-col-row): Evaluate header-line-format in the + context of the POSITION window's buffer. + +2010-12-13 Glenn Morris <rgm@gnu.org> + + * subr.el (member-ignore-case, run-mode-hooks, insert-for-yank-1) + (with-silent-modifications): Doc fixes. + +2010-12-13 Michael Albinus <michael.albinus@gmx.de> + + * net/tramp.el (tramp-action-password, tramp-process-actions): + Revert previous from. Use `save-restriction'. + +2010-12-13 Stephen Berman <stephen.berman@gmx.net> + + * calendar/diary-lib.el (diary-list-sexp-entries): + Handle case of no newline at end of file. (Bug#7536) + +2010-12-13 Glenn Morris <rgm@gnu.org> + + * mail/smtpmail.el (smtpmail-send-it): Revert previous change. + +2010-12-13 Michael Albinus <michael.albinus@gmx.de> + + * net/tramp.el (tramp-action-password): Delete region, do not narrow. + (tramp-process-actions): Do not widen. + + * net/tramp-sh.el (tramp-sh-handle-start-file-process): + Protect buffer-modified value. (Bug#7557) + +2010-12-13 Jan Moringen <jmoringe@techfak.uni-bielefeld.de> + + * log-edit.el (log-edit-changelog-entries): + Regexp quote filename. (Bug#7505) + +2010-12-13 Tom Breton <tehom@panix.com> + + * cus-edit.el (custom-save-all): + Bind print-length and print-level to nil. (Bug#7581) + +2010-12-13 Glenn Morris <rgm@gnu.org> + + * mouse.el (mouse-menu-major-mode-map, mouse-menu-bar-map): + Run hooks to update menu contents. (Bug#7586) + + * mail/smtpmail.el (smtpmail-send-it): Avoid colons in the queued + file names, for the sake of MS Windows. (Bug#7588) + +2010-12-13 Stefan Monnier <monnier@iro.umontreal.ca> + + * diff-mode.el (diff-refine-hunk): Make it work when the hunk contains + empty lines without a leading space. + +2010-12-13 Leo <sdl.web@gmail.com> + + * dired-aux.el (dired-do-redisplay): Postpone dired-after-readin-hook + while mapping over marks (Bug#6810). + +2010-12-13 Chong Yidong <cyd@stupidchicken.com> + + * image-dired.el (image-dired-db-file) + (image-dired-temp-image-file, image-dired-gallery-dir) + (image-dired-temp-rotate-image-file): Set default values relative + to image-dired-dir (Bug#7518). + +2010-12-13 Lawrence Mitchell <wence@gmx.li> + + * format.el (format-decode-run-method): Pass args FROM and TO, not + point-min and point-max, to shell-command-on-region (Bug#7488). + +2010-12-13 Jan Djärv <jan.h.d@swipnet.se> + + * frame.el (blink-cursor-mode): Make default t for ns. + +2010-12-13 Bob Rogers <rogers-emacs@rgrjr.dyndns.org> + + * vc-dir.el (vc-dir-query-replace-regexp): Doc fix (Bug#7501). + +2010-12-13 Chong Yidong <cyd@stupidchicken.com> + + * comint.el (comint-dynamic-list-input-ring) + (comint-dynamic-complete-filename) + (comint-replace-by-expanded-filename) + (comint-dynamic-simple-complete) + (comint-dynamic-list-filename-completions) + (comint-dynamic-list-completions): Doc fix (Bug#7499). + + * subr.el (posn-x-y, posn-object-x-y, posn-object-width-height): + Doc fix (Bug#7471). + +2010-12-13 Martin Rudalics <rudalics@gmx.at> + + * dired.el (dired-pop-to-buffer): Bind pop-up-frames to nil + (Bug#7533). + +2010-12-13 W. Martin Borgert <debacle@debian.org> (tiny change) + + * files.el (auto-mode-alist): Handle .dbk (DocBook) with xml-mode. + (Bug#7491). + +2010-12-13 Eli Zaretskii <eliz@gnu.org> + + * files.el (file-relative-name): Handle UNC file names on + DOS/Windows. (Bug#4674) + +2010-12-13 Daiki Ueno <ueno@unixuser.org> + + * epg.el (epg-digest-algorithm-alist): Replace "RMD160" with + "RIPEMD160" (Bug#7490). Reported by Daniel Kahn Gillmor. + (epg-context-set-passphrase-callback): Mention that the callback + is not called when used with GnuPG 2.x. + +2010-12-13 Glenn Morris <rgm@gnu.org> + + * ps-print.el (ps-line-lengths-internal, ps-nb-pages): + Ensure ps-footer-font-size-internal is initialized. + Call ps-get-page-dimensions before trying to use ps-font-for-text. + +2010-12-13 Kenichi Handa <handa@m17n.org> + + * mail/rmailmm.el (rmail-mime-parse): Call rmail-mime-process + within condition-case. + (rmail-show-mime): Don't use condition-case. + (rmail-search-mime-message): New function. + (rmail-search-mime-message-function): Set to + rmail-search-mime-message. + +2010-12-13 Leo <sdl.web@gmail.com> + + * ido.el (ido-common-initialization): New function. (bug#3274) + (ido-mode): Use it. + (ido-completing-read): Call it. + 2010-12-12 Karl Fogel <kfogel@red-bean.com> * bookmark.el (bookmark-name-from-full-record): Rename back to @@ -437,17 +2100,15 @@ (rmail-mime-save): Handle the case that the button's `data' is a MIME entity. (rmail-mime-insert-text): New function. - (rmail-mime-insert-image): Handle the case that DATA is a MIME - entity. + (rmail-mime-insert-image): Handle the case that DATA is a MIME entity. (rmail-mime-bulk-handler): Just call rmail-mime-insert-bulk. (rmail-mime-insert-bulk): New function mostly copied from the old rmail-mime-bulk-handler. - (rmail-mime-multipart-handler): Just call - rmail-mime-process-multipart. - (rmail-mime-process-multipart): New funciton mostly copied from + (rmail-mime-multipart-handler): Just call rmail-mime-process-multipart. + (rmail-mime-process-multipart): New function mostly copied from the old rmail-mime-multipart-handler. (rmail-mime-show): Just call rmail-mime-process. - (rmail-mime-process): New funciton mostly copied from the old + (rmail-mime-process): New function mostly copied from the old rmail-mime-show. (rmail-mime-insert-multipart, rmail-mime-parse) (rmail-mime-insert, rmail-show-mime) @@ -5911,7 +7572,7 @@ 2010-07-20 Michael R. Mauger <mmaug@yahoo.com> * progmodes/sql.el: Version 2.3. - (sql-connection-alist): Changed keys from symbols to strings; + (sql-connection-alist): Change keys from symbols to strings; enhanced the widget definition. (sql-mode-menu): Add submenu to select connections. (sql-interactive-mode-menu): Add "Save Connection" item. @@ -9441,8 +11102,9 @@ Fix bug#5620: recalculate all markers on compilation buffer modifications, not on file modifications. - * progmodes/compile.el (buffer-modtime): New buffer-local variable: - the buffer modification time, for buffers not associated with files. + * progmodes/compile.el (compilation-buffer-modtime): New buffer-local + variable: the buffer modification time, for buffers not associated with + files. (compilation-mode): Create it. (compilation-filter): Update it. (compilation-next-error-function): Use it instead of @@ -19870,7 +21532,7 @@ See ChangeLog.14 for earlier changes. ;; coding: utf-8 ;; End: - Copyright (C) 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2009-2011 Free Software Foundation, Inc. This file is part of GNU Emacs. diff --git a/lisp/Makefile.in b/lisp/Makefile.in index fc7ba7120e2..374358e4aa3 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -1,6 +1,5 @@ # Maintenance productions for the Lisp directory -# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -# 2009, 2010 Free Software Foundation, Inc. +# Copyright (C) 2000-2011 Free Software Foundation, Inc. # This file is part of GNU Emacs. @@ -35,7 +34,7 @@ EMACS = ${abs_top_builddir}/src/emacs # Command line flags for Emacs. -EMACSOPT = -batch --no-site-file +EMACSOPT = -batch --no-site-file --no-site-lisp # Extra flags to pass to the byte compiler BYTE_COMPILE_EXTRA_FLAGS = diff --git a/lisp/abbrev.el b/lisp/abbrev.el index 9d0e86fbce8..fbca214a649 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el @@ -1,7 +1,6 @@ ;;; abbrev.el --- abbrev mode commands for Emacs -;; Copyright (C) 1985, 1986, 1987, 1992, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985-1987, 1992, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: abbrev convenience @@ -118,17 +117,18 @@ Otherwise display all abbrevs." found)) (defun prepare-abbrev-list-buffer (&optional local) - (with-current-buffer (get-buffer-create "*Abbrevs*") - (erase-buffer) - (if local - (insert-abbrev-table-description - (abbrev-table-name local-abbrev-table) t) - (dolist (table abbrev-table-name-list) - (insert-abbrev-table-description table t))) - (goto-char (point-min)) - (set-buffer-modified-p nil) - (edit-abbrevs-mode) - (current-buffer))) + (let ((local-table local-abbrev-table)) + (with-current-buffer (get-buffer-create "*Abbrevs*") + (erase-buffer) + (if local + (insert-abbrev-table-description + (abbrev-table-name local-table) t) + (dolist (table abbrev-table-name-list) + (insert-abbrev-table-description table t))) + (goto-char (point-min)) + (set-buffer-modified-p nil) + (edit-abbrevs-mode) + (current-buffer)))) (defun edit-abbrevs-mode () "Major mode for editing the list of abbrev definitions. diff --git a/lisp/abbrevlist.el b/lisp/abbrevlist.el index 5f9cbee2cf5..79080780005 100644 --- a/lisp/abbrevlist.el +++ b/lisp/abbrevlist.el @@ -1,7 +1,6 @@ ;;; abbrevlist.el --- list one abbrev table alphabetically ordered -;; Copyright (C) 1986, 1992, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1986, 1992, 2001-2011 Free Software Foundation, Inc. ;; Suggested by a previous version by Gildea. ;; Maintainer: FSF @@ -53,5 +52,4 @@ (provide 'abbrevlist) -;; arch-tag: 178f0638-6597-4c16-bcee-576c3d8e9217 ;;; abbrevlist.el ends here diff --git a/lisp/align.el b/lisp/align.el index 0812d362875..83e27daeced 100644 --- a/lisp/align.el +++ b/lisp/align.el @@ -1,7 +1,6 @@ ;;; align.el --- align text to a specific column, by regexp -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> ;; Maintainer: FSF @@ -1605,5 +1604,4 @@ aligner would have dealt with are." (run-hooks 'align-load-hook) -;; arch-tag: ef79cccf-1db8-4888-a8a1-d7ce2d1532f7 ;;; align.el ends here diff --git a/lisp/allout.el b/lisp/allout.el index b497c82f0b3..d965ac35338 100644 --- a/lisp/allout.el +++ b/lisp/allout.el @@ -1,12 +1,11 @@ ;;; allout.el --- extensive outline mode for use alone and with other modes -;; Copyright (C) 1992, 1993, 1994, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1992-1994, 2001-2011 Free Software Foundation, Inc. ;; Author: Ken Manheimer <ken dot manheimer at gmail dot com> ;; Maintainer: Ken Manheimer <ken dot manheimer at gmail dot com> ;; Created: Dec 1991 -- first release to usenet -;; Version: 2.2.2 +;; Version: 2.3 ;; Keywords: outlines wp languages ;; Website: http://myriadicity.net/Sundry/EmacsAllout @@ -43,9 +42,8 @@ ;; - Symmetric-key and key-pair topic encryption, plus symmetric passphrase ;; mnemonic support, with verification against an established passphrase ;; (using a stashed encrypted dummy string) and user-supplied hint -;; maintenance. (See allout-toggle-current-subtree-encryption docstring. -;; Currently only GnuPG encryption is supported, and integration -;; with gpg-agent is not yet implemented.) +;; maintenance. Encryption is via the Emacs 'epg' library. See +;; allout-toggle-current-subtree-encryption docstring. ;; - Automatic topic-number maintenance ;; - "Hot-spot" operation, for single-keystroke maneuvering and ;; exposure control (see the allout-mode docstring) @@ -84,11 +82,10 @@ ;;;_* Dependency autoloads (require 'overlay) (eval-when-compile - ;; Most of the requires here are for stuff covered by autoloads. - ;; Since just byte-compiling doesn't trigger autoloads, so that - ;; "function not found" warnings would occur without these requires. - (require 'pgg) - (require 'pgg-gpg) + ;; Most of the requires here are for stuff covered by autoloads, which + ;; byte-compiling doesn't trigger. + (require 'epg) + (require 'epa) (require 'overlay) ;; `cl' is required for `assert'. `assert' is not covered by a standard ;; autoload, but it is a macro, so that eval-when-compile is sufficient @@ -110,23 +107,39 @@ ;;;_ + Layout, Mode, and Topic Header Configuration (defvar allout-command-prefix) ; defined below -(defvar allout-mode-map) ;;;_ > allout-keybindings incidentals: -;;;_ > allout-bind-keys &optional varname value -(defun allout-bind-keys (&optional varname value) - "Rebuild the `allout-mode-map' according to the keybinding specs. - -Useful standalone, to init the map, or in customizing the +;;;_ : internal key binding stuff - in this section for load-order. +;;;_ = allout-mode-map +(defvar allout-mode-map 'allout-mode-map + "Keybindings place-holder for (allout) outline minor mode. + +Do NOT set the value of this variable. Instead, customize +`allout-command-prefix', `allout-prefixed-keybindings', and +`allout-unprefixed-keybindings'.") +;;;_ = allout-mode-map-value +(defvar allout-mode-map-value nil + "Keymap for allout outline minor mode. + +Do NOT set the value of this variable. Instead, customize +`allout-command-prefix', `allout-prefixed-keybindings', and +`allout-unprefixed-keybindings'.") +;;;_ = make allout-mode-map-value an alias for allout-mode-map: +;; this needs to be revised when the value is changed, sigh. +(defalias 'allout-mode-map allout-mode-map-value) +;;;_ > allout-compose-and-institute-keymap (&optional varname value) +(defun allout-compose-and-institute-keymap (&optional varname value) + "Create the allout keymap according to the keybinding specs, and set it. + +Useful standalone or to effect customizations of the respective allout-mode keybinding variables, `allout-command-prefix', `allout-prefixed-keybindings', and `allout-unprefixed-keybindings'" ;; Set the customization variable, if any: (when varname (set-default varname value)) - (let ((map (make-sparse-keymap)) - key) + (let ((map (make-sparse-keymap))) (when (boundp 'allout-prefixed-keybindings) - ;; Be tolerant of the moments when the variables are first being defined. + ;; tolerate first definitions of the variables: (dolist (entry allout-prefixed-keybindings) (define-key map ;; XXX vector vs non-vector key descriptions? @@ -136,9 +149,34 @@ respective allout-mode keybinding variables, `allout-command-prefix', (when (boundp 'allout-unprefixed-keybindings) (dolist (entry allout-unprefixed-keybindings) (define-key map (car (read-from-string (car entry))) (cadr entry)))) - (setq allout-mode-map map) - map - )) + (substitute-key-definition 'beginning-of-line 'allout-beginning-of-line + map global-map) + (substitute-key-definition 'move-beginning-of-line 'allout-beginning-of-line + map global-map) + (substitute-key-definition 'end-of-line 'allout-end-of-line + map global-map) + (substitute-key-definition 'move-end-of-line 'allout-end-of-line + map global-map) + (allout-institute-keymap map))) +;;;_ > allout-institute-keymap (map) +(defun allout-institute-keymap (map) + "Associate allout-mode bindings with allout as a minor mode." + ;; Architecture: + ;; allout-mode-map var is a keymap by virtue of being a defalias for + ;; allout-mode-map-value, which has the actual keymap value. + ;; allout-mode-map's symbol value is just 'allout-mode-map, so it can be + ;; used in minor-mode-map-alist to indirect to the actual + ;; allout-mode-map-var value, which can be adjusted and reassigned. + + ;; allout-mode-map-value for keymap reference in various places: + (setq allout-mode-map-value map) + ;; the function value keymap of allout-mode-map is used in + ;; minor-mode-map-alist - update it: + (fset allout-mode-map allout-mode-map-value)) +;;;_ * intialize the mode map: +;; ensure that allout-mode-map has some setting even if allout-mode hasn't +;; been invoked: +(allout-compose-and-institute-keymap) ;;;_ = allout-command-prefix (defcustom allout-command-prefix "\C-c " "Key sequence to be used as prefix for outline mode command key bindings. @@ -147,7 +185,7 @@ Default is '\C-c<space>'; just '\C-c' is more short-and-sweet, if you're willing to let allout use a bunch of \C-c keybindings." :type 'string :group 'allout-keybindings - :set 'allout-bind-keys) + :set 'allout-compose-and-institute-keymap) ;;;_ = allout-keybindings-binding (define-widget 'allout-keybindings-binding 'lazy "Structure of allout keybindings customization items." @@ -159,16 +197,16 @@ willing to let allout use a bunch of \C-c keybindings." (defcustom allout-prefixed-keybindings '(("[(control ?n)]" allout-next-visible-heading) ("[(control ?p)]" allout-previous-visible-heading) -;; ("[(control ?u)]" allout-up-current-level) + ("[(control ?u)]" allout-up-current-level) ("[(control ?f)]" allout-forward-current-level) ("[(control ?b)]" allout-backward-current-level) ("[(control ?a)]" allout-beginning-of-current-entry) ("[(control ?e)]" allout-end-of-entry) ("[(control ?i)]" allout-show-children) - ("[(control ?i)]" allout-show-children) ("[(control ?s)]" allout-show-current-subtree) ("[(control ?t)]" allout-toggle-current-subtree-exposure) - ("[(control ?h)]" allout-hide-current-subtree) +;; Let user customize if they want to preempt describe-prefix-bindings ^h use. +;; ("[(control ?h)]" allout-hide-current-subtree) ("[?h]" allout-hide-current-subtree) ("[(control ?o)]" allout-show-current-entry) ("[?!]" allout-show-all) @@ -181,9 +219,9 @@ willing to let allout use a bunch of \C-c keybindings." ("[?<]" allout-shift-out) ("[(control ?m)]" allout-rebullet-topic) ("[?*]" allout-rebullet-current-heading) - ("[?']" allout-number-siblings) + ("[?#]" allout-number-siblings) ("[(control ?k)]" allout-kill-topic) - ("[??]" allout-copy-topic-as-kill) + ("[(meta ?k)]" allout-copy-topic-as-kill) ("[?@]" allout-resolve-xref) ("[?=?c]" allout-copy-exposed-to-buffer) ("[?=?i]" allout-indented-exposed-to-buffer) @@ -207,14 +245,14 @@ multiple functions will not work - the last binding for a key prevails." :type 'allout-keybindings-binding :group 'allout-keybindings - :set 'allout-bind-keys + :set 'allout-compose-and-institute-keymap ) ;;;_ = allout-unprefixed-keybindings (defcustom allout-unprefixed-keybindings '(("[(control ?k)]" allout-kill-line) - ("[??(meta ?k)]" allout-copy-line-as-kill) + ("[(meta ?k)]" allout-copy-line-as-kill) ("[(control ?y)]" allout-yank) - ("[??(meta ?y)]" allout-yank-pop) + ("[(meta ?y)]" allout-yank-pop) ) "Allout-mode functions bound to keys without any added prefix. @@ -230,69 +268,9 @@ Use vector format for the keys: See the existing keys for examples." :type 'allout-keybindings-binding :group 'allout-keybindings - :set 'allout-bind-keys + :set 'allout-compose-and-institute-keymap ) -;;;_ = allout-preempt-trailing-ctrl-h -(defcustom allout-preempt-trailing-ctrl-h nil - "Use <prefix>-\C-h, instead of leaving it for describe-prefix-bindings?" - :type 'boolean - :group 'allout) - -;;;_ = allout-keybindings-list -;;; You have to reactivate allout-mode -- `(allout-mode t)' -- to -;;; institute changes to this var. -(defvar allout-keybindings-list () - "*List of `allout-mode' key / function bindings, for `allout-mode-map'. -String or vector key will be prefaced with `allout-command-prefix', -unless optional third, non-nil element is present.") -(setq allout-keybindings-list - '( - ; Motion commands: - ("\C-n" allout-next-visible-heading) - ("\C-p" allout-previous-visible-heading) - ("\C-u" allout-up-current-level) - ("\C-f" allout-forward-current-level) - ("\C-b" allout-backward-current-level) - ("\C-a" allout-beginning-of-current-entry) - ("\C-e" allout-end-of-entry) - ; Exposure commands: - ([(control i)] allout-show-children) ; xemacs translates "\C-i" to tab - ("\C-i" allout-show-children) ; but we still need this for hotspot - ("\C-s" allout-show-current-subtree) - ;; binding to \C-h is included if allout-preempt-trailing-ctrl-h, - ;; so user controls whether or not to preempt the conventional ^H - ;; binding to help-command. - ("\C-h" allout-hide-current-subtree) - ("\C-t" allout-toggle-current-subtree-exposure) - ("h" allout-hide-current-subtree) - ("\C-o" allout-show-current-entry) - ("!" allout-show-all) - ("x" allout-toggle-current-subtree-encryption) - ; Alteration commands: - (" " allout-open-sibtopic) - ("." allout-open-subtopic) - ("," allout-open-supertopic) - ("'" allout-shift-in) - (">" allout-shift-in) - ("<" allout-shift-out) - ("\C-m" allout-rebullet-topic) - ("*" allout-rebullet-current-heading) - ("#" allout-number-siblings) - ("\C-k" allout-kill-line t) - ([?\M-k] allout-copy-line-as-kill t) - ("\C-y" allout-yank t) - ([?\M-y] allout-yank-pop t) - ("\C-k" allout-kill-topic) - ([?\M-k] allout-copy-topic-as-kill) - ; Miscellaneous commands: - ;([?\C-\ ] allout-mark-topic) - ("@" allout-resolve-xref) - ("=c" allout-copy-exposed-to-buffer) - ("=i" allout-indented-exposed-to-buffer) - ("=t" allout-latexify-exposed) - ("=p" allout-flatten-exposed-to-buffer))) - ;;;_ = allout-auto-activation (defcustom allout-auto-activation nil "Regulates auto-activation modality of allout outlines -- see `allout-init'. @@ -572,7 +550,7 @@ themselves: `!' - exclamation point/bang -- emphatic `[' - open square bracket -- meta-note, about item instead of item's subject `\"' - double quote -- a quotation or other citation - `=' - equal sign -- an assignement, equating a name with some connotation + `=' - equal sign -- an assignment, some kind of definition `^' - carat -- relates to something above Some are more elusive, but their rationale may be recognizable: @@ -818,32 +796,6 @@ formatted copy." :type '(choice (const nil) string) :version "22.1" :group 'allout-encryption) -;;;_ = allout-passphrase-verifier-handling -(defcustom allout-passphrase-verifier-handling t - "Enable use of symmetric encryption passphrase verifier if non-nil. - -See the docstring for the `allout-enable-file-variable-adjustment' -variable for details about allout ajustment of file variables." - :type 'boolean - :version "22.1" - :group 'allout-encryption) -(make-variable-buffer-local 'allout-passphrase-verifier-handling) -;;;_ = allout-passphrase-hint-handling -(defcustom allout-passphrase-hint-handling 'always - "Dictate outline encryption passphrase reminder handling: - - always -- always show reminder when prompting - needed -- show reminder on passphrase entry failure - disabled -- never present or adjust reminder - -See the docstring for the `allout-enable-file-variable-adjustment' -variable for details about allout ajustment of file variables." - :type '(choice (const always) - (const needed) - (const disabled)) - :version "22.1" - :group 'allout-encryption) -(make-variable-buffer-local 'allout-passphrase-hint-handling) ;;;_ = allout-encrypt-unencrypted-on-saves (defcustom allout-encrypt-unencrypted-on-saves t "When saving, should topics pending encryption be encrypted? @@ -920,7 +872,7 @@ For details, see `allout-toggle-current-subtree-encryption's docstring." ;;;_ #1 Internal Outline Formatting and Configuration ;;;_ : Version ;;;_ = allout-version -(defvar allout-version "2.2.2" +(defvar allout-version "2.3" "Version of currently loaded outline package. (allout.el)") ;;;_ > allout-version (defun allout-version (&optional here) @@ -1268,36 +1220,6 @@ Also refresh various data structures that hinge on the regexp." "[^" allout-primary-bullet "]")) "\\)" )))) -;;;_ : Key bindings -;;;_ = allout-mode-map -(defvar allout-mode-map nil "Keybindings for (allout) outline minor mode.") -;;;_ > produce-allout-mode-map (keymap-alist &optional base-map) -(defun produce-allout-mode-map (keymap-list &optional base-map) - "Produce keymap for use as `allout-mode-map', from KEYMAP-LIST. - -Built on top of optional BASE-MAP, or empty sparse map if none specified. -See doc string for `allout-keybindings-list' for format of binding list." - (let ((map (or base-map (make-sparse-keymap))) - (pref (list allout-command-prefix))) - (mapc (function - (lambda (cell) - (let ((add-pref (null (cdr (cdr cell)))) - (key-suff (list (car cell)))) - (apply 'define-key - (list map - (apply 'vconcat (if add-pref - (append pref key-suff) - key-suff)) - (car (cdr cell))))))) - keymap-list) - map)) -;;;_ > allout-mode-map-adjustments (base-map) -(defun allout-mode-map-adjustments (base-map) - "Do conditional additions to specified base-map, like inclusion of \\C-h." - (if allout-preempt-trailing-ctrl-h - (cons '("\C-h" allout-hide-current-subtree) base-map) - base-map) - ) ;;;_ : Menu bar (defvar allout-mode-exposure-menu) (defvar allout-mode-editing-menu) @@ -1306,7 +1228,7 @@ See doc string for `allout-keybindings-list' for format of binding list." (defun produce-allout-mode-menubar-entries () (require 'easymenu) (easy-menu-define allout-mode-exposure-menu - allout-mode-map + allout-mode-map-value "Allout outline exposure menu." '("Exposure" ["Show Entry" allout-show-current-entry t] @@ -1317,7 +1239,7 @@ See doc string for `allout-keybindings-list' for format of binding list." "----" ["Show All" allout-show-all t])) (easy-menu-define allout-mode-editing-menu - allout-mode-map + allout-mode-map-value "Allout outline editing menu." '("Headings" ["Open Sibling" allout-open-sibtopic t] @@ -1334,7 +1256,7 @@ See doc string for `allout-keybindings-list' for format of binding list." allout-toggle-current-subtree-encryption (> (allout-current-depth) 1)])) (easy-menu-define allout-mode-navigation-menu - allout-mode-map + allout-mode-map-value "Allout outline navigation menu." '("Navigation" ["Next Visible Heading" allout-next-visible-heading t] @@ -1351,7 +1273,7 @@ See doc string for `allout-keybindings-list' for format of binding list." ["End of Entry" allout-end-of-entry t] ["End of Subtree" allout-end-of-current-subtree t])) (easy-menu-define allout-mode-misc-menu - allout-mode-map + allout-mode-map-value "Allout outlines miscellaneous bindings." '("Misc" ["Version" allout-version t] @@ -1461,17 +1383,11 @@ their settings before allout-mode was started." ;;;_ = allout-mode-deactivate-hook (defvar allout-mode-deactivate-hook nil "*Hook that's run when allout mode ends.") +(define-obsolete-variable-alias 'allout-mode-deactivate-hook + 'allout-mode-off-hook "future") ;;;_ = allout-exposure-category (defvar allout-exposure-category nil "Symbol for use as allout invisible-text overlay category.") -;;;_ x allout-view-change-hook -(defvar allout-view-change-hook nil - "*(Deprecated) A hook run after allout outline exposure changes. - -Switch to using `allout-exposure-change-hook' instead. Both hooks are -currently respected, but the other conveys the details of the exposure -change via explicit parameters, and this one will eventually be disabled in -a subsequent allout version.") ;;;_ = allout-exposure-change-hook (defvar allout-exposure-change-hook nil "*Hook that's run after allout outline subtree exposure changes. @@ -1484,10 +1400,7 @@ Functions on the hook must take three arguments: - TO -- integer indicating the point of the end of the change. - FLAG -- change mode: nil for exposure, otherwise concealment. -This hook might be invoked multiple times by a single command. - -This hook is replacing `allout-view-change-hook', which is being deprecated -and eventually will not be invoked.") +This hook might be invoked multiple times by a single command.") ;;;_ = allout-structure-added-hook (defvar allout-structure-added-hook nil "*Hook that's run after addition of items to the outline. @@ -1497,9 +1410,6 @@ Functions on the hook should take two arguments: - NEW-START -- integer indicating position of start of the first new item. - NEW-END -- integer indicating position of end of the last new item. -Some edits that introduce new items may missed by this hook: -specifically edits that native allout routines do not control. - This hook might be invoked multiple times by a single command.") ;;;_ = allout-structure-deleted-hook (defvar allout-structure-deleted-hook nil @@ -1534,11 +1444,8 @@ This hook might be invoked multiple times by a single command.") Used by allout-auto-fill to do the mandated normal-auto-fill-function wrapped within allout's automatic fill-prefix setting.") (make-variable-buffer-local 'allout-outside-normal-auto-fill-function) -;;;_ = file-var-bug hack -(defvar allout-v18/19-file-var-hack nil - "Horrible hack used to prevent invalid multiple triggering of outline -mode from prop-line file-var activation. Used by `allout-mode' function -to track repeats.") +;;;_ = prevent redundant activation by desktop mode: +(add-to-list 'desktop-minor-mode-handlers '(allout-mode . nil)) ;;;_ = allout-passphrase-verifier-string (defvar allout-passphrase-verifier-string nil "Setting used to test solicited encryption passphrases against the one @@ -1554,6 +1461,8 @@ The verifier string is retained as an Emacs file variable, as well as in the Emacs buffer state, if file variable adjustments are enabled. See `allout-enable-file-variable-adjustment' for details about that.") (make-variable-buffer-local 'allout-passphrase-verifier-string) +(make-obsolete 'allout-passphrase-verifier-string + 'allout-passphrase-verifier-string "23.3") ;;;###autoload (put 'allout-passphrase-verifier-string 'safe-local-variable 'stringp) ;;;_ = allout-passphrase-hint-string @@ -1568,6 +1477,8 @@ state, if file variable adjustments are enabled. See `allout-enable-file-variable-adjustment' for details about that.") (make-variable-buffer-local 'allout-passphrase-hint-string) (setq-default allout-passphrase-hint-string "") +(make-obsolete 'allout-passphrase-hint-string + 'allout-passphrase-hint-string "23.3") ;;;###autoload (put 'allout-passphrase-hint-string 'safe-local-variable 'stringp) ;;;_ = allout-after-save-decrypt @@ -1599,15 +1510,15 @@ substition is used against the regexp matches, a la `replace-match'.") (defvar allout-encryption-ciphertext-rejection-regexps nil "Variable for regexps matching plaintext to remove before encryption. -This is for the sake of redoing encryption in cases where the ciphertext -incidentally contains strings that would disrupt mode operation -- -for example, a line that happens to look like an allout-mode topic prefix. +This is used to detect strings in encryption results that would +register as allout mode structural elements, for exmple, as a +topic prefix. Entries must be symbols that are bound to the desired regexp values. -The encryption will be retried up to -`allout-encryption-ciphertext-rejection-limit' times, after which an error -is raised.") +Encryptions that result in matches will be retried, up to +`allout-encryption-ciphertext-rejection-limit' times, after which +an error is raised.") (make-variable-buffer-local 'allout-encryption-ciphertext-rejection-regexps) ;;;_ = allout-encryption-ciphertext-rejection-ceiling @@ -1813,24 +1724,22 @@ the following two lines in your Emacs init file: '(allout-overlay-insert-in-front-handler))) (put 'allout-exposure-category 'modification-hooks '(allout-overlay-interior-modification-handler))) -;;;_ > allout-mode (&optional toggle) +;;;_ > define-minor-mode allout-mode ;;;_ : Defun: ;;;###autoload -(defun allout-mode (&optional toggle) +(define-minor-mode allout-mode ;;;_ . Doc string: "Toggle minor mode for controlling exposure and editing of text outlines. -\\<allout-mode-map> +\\<allout-mode-map-value> -Optional prefix argument TOGGLE forces the mode to re-initialize -if it is positive, otherwise it turns the mode off. Allout -outline mode always runs as a minor mode. +Allout outline mode always runs as a minor mode. -Allout outline mode provides extensive outline oriented formatting and -manipulation. It enables structural editing of outlines, as well as -navigation and exposure. It also is specifically aimed at -accommodating syntax-sensitive text like programming languages. (For -an example, see the allout code itself, which is organized as an allout -outline.) +Allout outline mode provides extensive outline oriented +formatting and manipulation. It enables structural editing of +outlines, as well as navigation and exposure. It also is +specifically aimed at accommodating syntax-sensitive text like +programming languages. \(For example, see the allout code itself, +which is organized as an allout outline.) In addition to typical outline navigation and exposure, allout includes: @@ -1838,27 +1747,30 @@ In addition to typical outline navigation and exposure, allout includes: repositioning, promotion/demotion, cut, and paste - incremental search with dynamic exposure and reconcealment of hidden text - adjustable format, so programming code can be developed in outline-structure - - easy topic encryption and decryption + - easy topic encryption and decryption, symmetric or key-pair - \"Hot-spot\" operation, for single-keystroke maneuvering and exposure control - integral outline layout, for automatic initial exposure when visiting a file - independent extensibility, using comprehensive exposure and authoring hooks and many other features. -Below is a description of the key bindings, and then explanation of -special `allout-mode' features and terminology. See also the outline -menubar additions for quick reference to many of the features, and see -the docstring of the function `allout-init' for instructions on -priming your emacs session for automatic activation of `allout-mode'. - -The bindings are dictated by the customizable `allout-keybindings-list' -variable. We recommend customizing `allout-command-prefix' to use just -`\\C-c' as the command prefix, if the allout bindings don't conflict with -any personal bindings you have on \\C-c. In any case, outline structure -navigation and authoring is simplified by positioning the cursor on an -item's bullet character, the \"hot-spot\" -- then you can invoke allout -commands with just the un-prefixed, un-control-shifted command letters. -This is described further in the HOT-SPOT Operation section. +Below is a description of the key bindings, and then description +of special `allout-mode' features and terminology. See also the +outline menubar additions for quick reference to many of the +features, and see the docstring of the function `allout-init' for +instructions on priming your emacs session for automatic +activation of `allout-mode'. + +The bindings are those listed in `allout-prefixed-keybindings' +and `allout-unprefixed-keybindings'. We recommend customizing +`allout-command-prefix' to use just `\\C-c' as the command +prefix, if the allout bindings don't conflict with any personal +bindings you have on \\C-c. In any case, outline structure +navigation and authoring is simplified by positioning the cursor +on an item's bullet character, the \"hot-spot\" -- then you can +invoke allout commands with just the un-prefixed, +un-control-shifted command letters. This is described further in +the HOT-SPOT Operation section. Exposure Control: ---------------- @@ -1937,19 +1849,22 @@ M-x outlineify-sticky Activate outline mode for current buffer, Topic Encryption Outline mode supports gpg encryption of topics, with support for -symmetric and key-pair modes, passphrase timeout, passphrase -consistency checking, user-provided hinting for symmetric key -mode, and auto-encryption of topics pending encryption on save. +symmetric and key-pair modes, and auto-encryption of topics +pending encryption on save. Topics pending encryption are, by default, automatically -encrypted during file saves. If the contents of the topic -containing the cursor was encrypted for a save, it is -automatically decrypted for continued editing. - -The aim of these measures is reliable topic privacy while -preventing accidents like neglected encryption before saves, -forgetting which passphrase was used, and other practical -pitfalls. +encrypted during file saves, including checkpoint saves, to avoid +exposing the plain text of encrypted topics in the file system. +If the content of the topic containing the cursor was encrypted +for a save, it is automatically decrypted for continued editing. + +NOTE: A few GnuPG v2 versions improperly preserve incorrect +symmetric decryption keys, preventing entry of the correct key on +subsequent decryption attempts until the cache times-out. That +can take several minutes. \(Decryption of other entries is not +affected.) Upgrade your EasyPG version, if you can, and you can +deliberately clear your gpg-agent's cache by sending it a '-HUP' +signal. See `allout-toggle-current-subtree-encryption' function docstring and `allout-encrypt-unencrypted-on-saves' customization variable @@ -1987,7 +1902,8 @@ hooks, by which independent code can cooperate with allout without changes to the allout core. Here are key ones: `allout-mode-hook' -`allout-mode-deactivate-hook' +`allout-mode-deactivate-hook' \(deprecated) +`allout-mode-off-hook' `allout-exposure-change-hook' `allout-structure-added-hook' `allout-structure-deleted-hook' @@ -2074,76 +1990,41 @@ CONCEALED: CLOSED: A TOPIC whose immediate OFFSPRING and body-text is CONCEALED. OPEN: A TOPIC that is not CLOSED, though its OFFSPRING or BODY may be." ;;;_ . Code - (interactive "P") - - (let* ((active (and (not (equal major-mode 'outline)) - (allout-mode-p))) - ; Massage universal-arg `toggle' val: - (toggle (and toggle - (or (and (listp toggle)(car toggle)) - toggle))) - ; Activation specifically demanded? - (explicit-activation (and toggle - (or (symbolp toggle) - (and (wholenump toggle) - (not (zerop toggle)))))) - ;; allout-mode already called once during this complex command? - (same-complex-command (eq allout-v18/19-file-var-hack - (car command-history))) - (write-file-hook-var-name (cond ((boundp 'write-file-functions) - 'write-file-functions) - ((boundp 'write-file-hooks) - 'write-file-hooks) - (t 'local-write-file-hooks))) - do-layout - ) - - ; See comments below re v19.18,.19 bug. - (setq allout-v18/19-file-var-hack (car command-history)) - - (cond - - ;; Provision for v19.18, 19.19 bug -- - ;; Emacs v 19.18, 19.19 file-var code invokes prop-line-designated - ;; modes twice when file is visited. We have to avoid toggling mode - ;; off on second invocation, so we detect it as best we can, and - ;; skip everything. - ((and same-complex-command ; Still in same complex command - ; as last time `allout-mode' invoked. - active ; Already activated. - (not explicit-activation) ; Prop-line file-vars don't have args. - (string-match "^19.1[89]" ; Bug only known to be in v19.18 and - emacs-version)); 19.19. - t) - - ;; Deactivation: - ((and (not explicit-activation) - (or active toggle)) - ; Activation not explicitly - ; requested, and either in - ; active state or *de*activation - ; specifically requested: - (setq allout-explicitly-deactivated t) - - (allout-do-resumptions) - - (remove-from-invisibility-spec '(allout . t)) - (remove-hook 'pre-command-hook 'allout-pre-command-business t) - (remove-hook 'post-command-hook 'allout-post-command-business t) - (remove-hook 'before-change-functions 'allout-before-change-handler t) - (remove-hook 'isearch-mode-end-hook 'allout-isearch-end-handler t) - (remove-hook write-file-hook-var-name 'allout-write-file-hook-handler t) - (remove-hook 'auto-save-hook 'allout-auto-save-hook-handler t) - - (remove-overlays (point-min) (point-max) - 'category 'allout-exposure-category) - - (setq allout-mode nil) - (run-hooks 'allout-mode-deactivate-hook)) - - ;; Activation: - ((not active) - (setq allout-explicitly-deactivated nil) + :lighter " Allout" + :keymap 'allout-mode-map + + (let ((write-file-hook-var-name (cond ((boundp 'write-file-functions) + 'write-file-functions) + ((boundp 'write-file-hooks) + 'write-file-hooks) + (t 'local-write-file-hooks))) + (use-layout (if (listp allout-layout) + allout-layout + allout-default-layout))) + + (if (not (allout-mode-p)) + (progn + ;; Deactivation: + + ; Activation not explicitly + ; requested, and either in + ; active state or *de*activation + ; specifically requested: + (allout-do-resumptions) + + (remove-from-invisibility-spec '(allout . t)) + (remove-hook 'pre-command-hook 'allout-pre-command-business t) + (remove-hook 'post-command-hook 'allout-post-command-business t) + (remove-hook 'before-change-functions 'allout-before-change-handler t) + (remove-hook 'isearch-mode-end-hook 'allout-isearch-end-handler t) + (remove-hook write-file-hook-var-name + 'allout-write-file-hook-handler t) + (remove-hook 'auto-save-hook 'allout-auto-save-hook-handler t) + + (remove-overlays (point-min) (point-max) + 'category 'allout-exposure-category)) + + ;; Activating: (if allout-old-style-prefixes ;; Inhibit all the fancy formatting: (allout-add-resumptions '(allout-primary-bullet "*"))) @@ -2154,45 +2035,31 @@ OPEN: A TOPIC that is not CLOSED, though its OFFSPRING or BODY may be." (allout-infer-body-reindent) (set-allout-regexp) - (allout-add-resumptions - '(allout-encryption-ciphertext-rejection-regexps - allout-line-boundary-regexp - extend) - '(allout-encryption-ciphertext-rejection-regexps - allout-bob-regexp - extend)) - - ;; Produce map from current version of allout-keybindings-list: - (allout-setup-mode-map) + (allout-add-resumptions '(allout-encryption-ciphertext-rejection-regexps + allout-line-boundary-regexp + extend) + '(allout-encryption-ciphertext-rejection-regexps + allout-bob-regexp + extend)) + + (allout-compose-and-institute-keymap) (produce-allout-mode-menubar-entries) - ;; Include on minor-mode-map-alist, if not already there: - (if (not (member '(allout-mode . allout-mode-map) - minor-mode-map-alist)) - (setq minor-mode-map-alist - (cons '(allout-mode . allout-mode-map) - minor-mode-map-alist))) - (add-to-invisibility-spec '(allout . t)) (allout-add-resumptions '(line-move-ignore-invisible t)) (add-hook 'pre-command-hook 'allout-pre-command-business nil t) (add-hook 'post-command-hook 'allout-post-command-business nil t) - (add-hook 'before-change-functions 'allout-before-change-handler - nil t) + (add-hook 'before-change-functions 'allout-before-change-handler nil t) (add-hook 'isearch-mode-end-hook 'allout-isearch-end-handler nil t) (add-hook write-file-hook-var-name 'allout-write-file-hook-handler nil t) - (add-hook 'auto-save-hook 'allout-auto-save-hook-handler - nil t) + (add-hook 'auto-save-hook 'allout-auto-save-hook-handler nil t) ;; Stash auto-fill settings and adjust so custom allout auto-fill ;; func will be used if auto-fill is active or activated. (The ;; custom func respects topic headline, maintains hanging-indents, ;; etc.) - (if (and auto-fill-function (not allout-inhibit-auto-fill)) - ;; allout-auto-fill will use the stashed values and so forth. - (allout-add-resumptions '(auto-fill-function allout-auto-fill))) (allout-add-resumptions (list 'allout-former-auto-filler auto-fill-function) ;; Register allout-auto-fill to be used if @@ -2207,91 +2074,51 @@ OPEN: A TOPIC that is not CLOSED, though its OFFSPRING or BODY may be." (list 'paragraph-separate (concat paragraph-separate "\\|^\\(" allout-regexp "\\)"))) - (or (assq 'allout-mode minor-mode-alist) - (setq minor-mode-alist - (cons '(allout-mode " Allout") minor-mode-alist))) + (if (and auto-fill-function (not allout-inhibit-auto-fill)) + ;; allout-auto-fill will use the stashed values and so forth. + (allout-add-resumptions '(auto-fill-function allout-auto-fill))) (allout-setup-menubar) - (if allout-layout - (setq do-layout t)) - - (setq allout-mode t) - (run-hooks 'allout-mode-hook)) - - ;; Reactivation: - ((setq do-layout t) - (allout-infer-body-reindent)) - ) ;; end of activation-mode cases. - - ;; Do auto layout if warranted: - (let ((use-layout (if (listp allout-layout) - allout-layout - allout-default-layout))) - (if (and do-layout - allout-auto-activation - use-layout - (and (not (eq allout-auto-activation 'activate)) - (if (eq allout-auto-activation 'ask) - (if (y-or-n-p (format "Expose %s with layout '%s'? " - (buffer-name) - use-layout)) - t - (message "Skipped %s layout." (buffer-name)) - nil) - t))) - (save-excursion - (message "Adjusting '%s' exposure..." (buffer-name)) - (goto-char 0) - (allout-this-or-next-heading) - (condition-case err - (progn - (apply 'allout-expose-topic (list use-layout)) - (message "Adjusting '%s' exposure... done." (buffer-name))) - ;; Problem applying exposure -- notify user, but don't - ;; interrupt, eg, file visit: - (error (message "%s" (car (cdr err))) - (sit-for 1)))))) - allout-mode - ) ; let* - ) ; defun - -(defun allout-setup-mode-map () - "Establish allout-mode bindings." - (setq-default allout-mode-map - (produce-allout-mode-map - (allout-mode-map-adjustments allout-keybindings-list))) - (setq allout-mode-map - (produce-allout-mode-map - (allout-mode-map-adjustments allout-keybindings-list))) - (substitute-key-definition 'beginning-of-line - 'allout-beginning-of-line - allout-mode-map global-map) - (substitute-key-definition 'move-beginning-of-line - 'allout-beginning-of-line - allout-mode-map global-map) - (substitute-key-definition 'end-of-line - 'allout-end-of-line - allout-mode-map global-map) - (substitute-key-definition 'move-end-of-line - 'allout-end-of-line - allout-mode-map global-map) - (fset 'allout-mode-map allout-mode-map)) - -;; ensure that allout-mode-map has some setting even if allout-mode hasn't -;; been invoked: -(allout-setup-mode-map) - -;;;_ > allout-minor-mode + ;; Do auto layout if warranted: + (when (and allout-layout + allout-auto-activation + use-layout + (and (not (eq allout-auto-activation 'activate)) + (if (eq allout-auto-activation 'ask) + (if (y-or-n-p (format "Expose %s with layout '%s'? " + (buffer-name) + use-layout)) + t + (message "Skipped %s layout." (buffer-name)) + nil) + t))) + (save-excursion + (message "Adjusting '%s' exposure..." (buffer-name)) + (goto-char 0) + (allout-this-or-next-heading) + (condition-case err + (progn + (apply 'allout-expose-topic (list use-layout)) + (message "Adjusting '%s' exposure... done." + (buffer-name))) + ;; Problem applying exposure -- notify user, but don't + ;; interrupt, eg, file visit: + (error (message "%s" (car (cdr err))) + (sit-for 1)))) + ) ; when allout-layout + ) ; if (allout-mode-p) + ) ; let (()) + ) ; define-minor-mode +;;;_ > allout-minor-mode alias (defalias 'allout-minor-mode 'allout-mode) - ;;;_ > allout-unload-function (defun allout-unload-function () "Unload the allout outline library." (save-current-buffer (dolist (buffer (buffer-list)) (set-buffer buffer) - (when allout-mode (allout-mode -1)))) + (when (allout-mode-p) (allout-mode)))) ;; continue standard unloading nil) @@ -2360,8 +2187,8 @@ internal functions use this feature cohesively bunch changes." See `allout-overlay-interior-modification-handler' for details." - (if (and (allout-mode-p) undo-in-progress (allout-hidden-p)) - (allout-show-to-offshoot)) + (when (and (allout-mode-p) undo-in-progress (allout-hidden-p)) + (allout-show-children)) ;; allout-overlay-interior-modification-handler on an overlay handles ;; this in other emacs, via `allout-exposure-category's 'modification-hooks. @@ -3058,13 +2885,19 @@ of (before any) topics, in which case we return nil." (allout-beginning-of-current-line) (let ((bol-point (point))) - (if (allout-goto-prefix-doublechecked) - (if (<= (point) bol-point) + (when (allout-goto-prefix-doublechecked) + (if (<= (point) bol-point) + (progn + (setq bol-point (point)) + (allout-beginning-of-current-line) + (if (not (= bol-point (point))) + (if (looking-at allout-regexp) + (allout-prefix-data))) (if interactive (allout-end-of-prefix) - (point)) - (goto-char (point-min)) - nil)))) + (point))) + (goto-char (point-min)) + nil)))) ;;;_ > allout-back-to-heading () (defalias 'allout-back-to-heading 'allout-back-to-current-heading) ;;;_ > allout-pre-next-prefix () @@ -3389,6 +3222,7 @@ Move to buffer limit in indicated direction if headings are exhausted." (let* ((inhibit-field-text-motion t) (backward (if (< arg 0) (setq arg (* -1 arg)))) (step (if backward -1 1)) + (progress (allout-current-bullet-pos)) prev got) (while (> arg 0) @@ -3398,7 +3232,17 @@ Move to buffer limit in indicated direction if headings are exhausted." ;; Move, skipping over all concealed lines in one fell swoop: (prog1 (condition-case nil (or (line-move step) t) (error nil)) - (allout-beginning-of-current-line)) + (allout-beginning-of-current-line) + ;; line-move can wind up on the same line if long. + ;; when moving forward, that would yield no-progress + (when (and (not backward) + (<= (point) progress)) + ;; ensure progress by doing line-move from end-of-line: + (end-of-line) + (condition-case nil (or (line-move step) t) + (error nil)) + (allout-beginning-of-current-line) + (setq progress (point)))) ;; Deal with apparent header line: (save-match-data (if (not (looking-at allout-regexp)) @@ -3481,7 +3325,7 @@ When set, tells post-processing to reposition on topic bullet, and then unset it. Set by `allout-pre-command-business' when implementing hot-spot operation, where literal characters typed over a topic bullet are mapped to the command of the corresponding control-key on the -`allout-mode-map'.") +`allout-mode-map-value'.") (make-variable-buffer-local 'allout-post-goto-bullet) ;;;_ = allout-command-counter (defvar allout-command-counter 0 @@ -3520,11 +3364,12 @@ coordinating with allout activity.") Among other things, implements special behavior when the cursor is on the topic bullet character. -When the cursor is on the bullet character, self-insert characters are -reinterpreted as the corresponding control-character in the -`allout-mode-map'. The `allout-mode' `post-command-hook' insures that -the cursor which has moved as a result of such reinterpretation is -positioned on the bullet character of the destination topic. +When the cursor is on the bullet character, self-insert +characters are reinterpreted as the corresponding +control-character in the `allout-mode-map-value'. The +`allout-mode' `post-command-hook' insures that the cursor which +has moved as a result of such reinterpretation is positioned on +the bullet character of the destination topic. The upshot is that you can get easy, single (ie, unmodified) key outline maneuvering operations by positioning the cursor on the bullet @@ -3551,9 +3396,6 @@ this-command accordingly. Returns the qualifying command, if any, else nil." (interactive) (let* ((modified (event-modifiers last-command-event)) - (key-string (if (numberp last-command-event) - (char-to-string - (event-basic-type last-command-event)))) (key-num (cond ((numberp last-command-event) last-command-event) ;; for XEmacs character type: ((and (fboundp 'characterp) @@ -3570,16 +3412,18 @@ Returns the qualifying command, if any, else nil." (not modified) (<= 33 key-num) (setq mapped-binding - (or (and (assoc key-string allout-keybindings-list) - ;; translate literal membership on list: - (cadr (assoc key-string allout-keybindings-list))) - ;; translate as a keybinding: - (key-binding (vconcat allout-command-prefix - (vector - (if (and (<= 97 key-num) ; "a" - (>= 122 key-num)) ; "z" - (- key-num 96) key-num))) - t)))) + (or + ;; try control-modified versions of keys: + (key-binding (vconcat allout-command-prefix + (vector + (if (and (<= 97 key-num) ; "a" + (>= 122 key-num)) ; "z" + (- key-num 96) key-num))) + t) + ;; try non-modified versions of keys: + (key-binding (vconcat allout-command-prefix + (vector key-num)) + t)))) ;; Qualified as an allout command -- do hot-spot operation. (setq allout-post-goto-bullet t) ;; accept-defaults nil, or else we get allout-item-icon-key-handler. @@ -3600,7 +3444,7 @@ See `allout-init' for setup instructions." (if (and allout-auto-activation (not (allout-mode-p)) allout-layout) - (allout-mode t))) + (allout-mode))) ;;;_ - Topic Format Assessment ;;;_ > allout-solicit-alternate-bullet (depth &optional current-bullet) @@ -4047,9 +3891,13 @@ Maintains outline hanging topic indentation if (make-string (progn (allout-end-of-prefix) (current-column)) ?\ )))))) - (use-auto-fill-function (or allout-outside-normal-auto-fill-function - auto-fill-function - 'do-auto-fill))) + (use-auto-fill-function + (if (and (eq allout-outside-normal-auto-fill-function + 'allout-auto-fill) + (eq auto-fill-function 'allout-auto-fill)) + 'do-auto-fill + (or allout-outside-normal-auto-fill-function + auto-fill-function)))) (if (or allout-former-auto-filler allout-use-hanging-indents) (funcall use-auto-fill-function))))) ;;;_ > allout-reindent-body (old-depth new-depth &optional number) @@ -4914,9 +4762,7 @@ by pops to non-distinctive yanks. Bug..." "Conceal text between FROM and TO if FLAG is non-nil, else reveal it. Exposure-change hook `allout-exposure-change-hook' is run with the same -arguments as this function, after the exposure changes are made. (The old -`allout-view-change-hook' is being deprecated, and eventually will not be -invoked.)" +arguments as this function, after the exposure changes are made." ;; We use outline invisibility spec. (remove-overlays from to 'category 'allout-exposure-category) @@ -4930,7 +4776,6 @@ invoked.)" ;; as of 2008-02-27, xemacs lacks modification-hooks (overlay-put o (pop props) (pop props)) (error nil))))))) - (run-hooks 'allout-view-change-hook) (run-hook-with-args 'allout-exposure-change-hook from to flag)) ;;;_ > allout-flag-current-subtree (flag) (defun allout-flag-current-subtree (flag) @@ -5132,7 +4977,8 @@ default, they are treated as being uncollapsed." (and ;; Is the topic all on one line (allowing for trailing blank line)? (>= (progn (allout-back-to-current-heading) - (move-end-of-line 1) + (let ((inhibit-field-text-motion t)) + (move-end-of-line 1)) (point)) (allout-end-of-current-subtree (not (looking-at "\n\n")))) @@ -5999,31 +5845,39 @@ With repeat count, copy the exposed portions of entire buffer." (goto-char start-pt))) ;;;_ #8 Encryption -;;;_ > allout-toggle-current-subtree-encryption (&optional fetch-pass) -(defun allout-toggle-current-subtree-encryption (&optional fetch-pass) - "Encrypt clear or decrypt encoded text of visibly-containing topic's contents. - -Optional FETCH-PASS universal argument provokes key-pair encryption with -single universal argument. With doubled universal argument (value = 16), -it forces prompting for the passphrase regardless of availability from the -passphrase cache. With no universal argument, the appropriate passphrase -is obtained from the cache, if available, else from the user. - -Only GnuPG encryption is supported. - -\*NOTE WELL* that the encrypted text must be ascii-armored. For gnupg -encryption, include the option ``armor'' in your ~/.gnupg/gpg.conf file. - -Both symmetric-key and key-pair encryption is implemented. Symmetric is -the default, use a single (x4) universal argument for keypair mode. - -Encrypted topic's bullet is set to a `~' to signal that the contents of the -topic (body and subtopics, but not heading) is pending encryption or -encrypted. `*' asterisk immediately after the bullet signals that the body -is encrypted, its' absence means the topic is meant to be encrypted but is -not. When a file with topics pending encryption is saved, topics pending -encryption are encrypted. See allout-encrypt-unencrypted-on-saves for -auto-encryption specifics. +;;;_ > allout-toggle-current-subtree-encryption (&optional keymode-cue) +(defun allout-toggle-current-subtree-encryption (&optional keymode-cue) + "Encrypt clear or decrypt encoded topic text. + +Allout uses emacs 'epg' libary to perform encryption. Symmetric +and keypair encryption are supported. All encryption is ascii +armored. + +Entry encryption defaults to symmetric key mode unless keypair +recipients are associated with the file \(see +`epa-file-encrypt-to') or the function is invoked with a +\(KEYMODE-CUE) universal argument greater than 1. + +When encrypting, KEYMODE-CUE universal argument greater than 1 +causes prompting for recipients for public-key keypair +encryption. Selecting no recipients results in symmetric key +encryption. + +Further, encrypting with a KEYMODE-CUE universal argument greater +than 4 - eg, preceded by a doubled Ctrl-U - causes association of +the specified recipients with the file, replacing those currently +associated with it. This can be used to deassociate any +recipients with the file, by selecting no recipients in the +dialog. + +Encrypted topic's bullets are set to a `~' to signal that the +contents of the topic (body and subtopics, but not heading) is +pending encryption or encrypted. `*' asterisk immediately after +the bullet signals that the body is encrypted, its absence means +the topic is meant to be encrypted but is not currently. When a +file with topics pending encryption is saved, topics pending +encryption are encrypted. See allout-encrypt-unencrypted-on-saves +for auto-encryption specifics. \*NOTE WELL* that automatic encryption that happens during saves will default to symmetric encryption -- you must deliberately (re)encrypt key-pair @@ -6031,59 +5885,35 @@ encrypted topics if you want them to continue to use the key-pair cipher. Level-one topics, with prefix consisting solely of an `*' asterisk, cannot be encrypted. If you want to encrypt the contents of a top-level topic, use -\\[allout-shift-in] to increase its depth. - - Passphrase Caching - -The encryption passphrase is solicited if not currently available in the -passphrase cache from a recent encryption action. - -The solicited passphrase is retained for reuse in a cache, if enabled. See -`pgg-cache-passphrase' and `pgg-passphrase-cache-expiry' for details. - - Symmetric Passphrase Hinting and Verification - -If the file previously had no associated passphrase, or had a different -passphrase than specified, the user is prompted to repeat the new one for -corroboration. A random string encrypted by the new passphrase is set on -the buffer-specific variable `allout-passphrase-verifier-string', for -confirmation of the passphrase when next obtained, before encrypting or -decrypting anything with it. This helps avoid mistakenly shifting between -keys. - -If allout customization var `allout-passphrase-verifier-handling' is -non-nil, an entry for `allout-passphrase-verifier-string' and its value is -added to an Emacs 'local variables' section at the end of the file, which -is created if necessary. That setting is for retention of the passphrase -verifier across Emacs sessions. - -Similarly, `allout-passphrase-hint-string' stores a user-provided reminder -about their passphrase, and `allout-passphrase-hint-handling' specifies -when the hint is presented, or if passphrase hints are disabled. If -enabled (see the `allout-passphrase-hint-handling' docstring for details), -the hint string is stored in the local-variables section of the file, and -solicited whenever the passphrase is changed." +\\[allout-shift-in] to increase its depth." (interactive "P") (save-excursion (allout-back-to-current-heading) - (allout-toggle-subtree-encryption fetch-pass) - ) - ) -;;;_ > allout-toggle-subtree-encryption (&optional fetch-pass) -(defun allout-toggle-subtree-encryption (&optional fetch-pass) + (allout-toggle-subtree-encryption keymode-cue))) +;;;_ > allout-toggle-subtree-encryption (&optional keymode-cue) +(defun allout-toggle-subtree-encryption (&optional keymode-cue) "Encrypt clear text or decrypt encoded topic contents (body and subtopics.) -Optional FETCH-PASS universal argument provokes key-pair encryption with -single universal argument. With doubled universal argument (value = 16), -it forces prompting for the passphrase regardless of availability from the -passphrase cache. With no universal argument, the appropriate passphrase -is obtained from the cache, if available, else from the user. +Entry encryption defaults to symmetric key mode unless keypair +recipients are associated with the file \(see +`epa-file-encrypt-to') or the function is invoked with a +\(KEYMODE-CUE) universal argument greater than 1. + +When encrypting, KEYMODE-CUE universal argument greater than 1 +causes prompting for recipients for public-key keypair +encryption. Selecting no recipients results in symmetric key +encryption. -Currently only GnuPG encryption is supported, and integration -with gpg-agent is not yet implemented. +Further, encrypting with a KEYMODE-CUE universal argument greater +than 4 - eg, preceded by a doubled Ctrl-U - causes association of +the specified recipients with the file, replacing those currently +associated with it. This can be used to deassociate any +recipients with the file, by selecting no recipients in the +dialog. -\**NOTE WELL** that the encrypted text must be ascii-armored. For gnupg -encryption, include the option ``armor'' in your ~/.gnupg/gpg.conf file. +Encryption and decryption uses the emacs epg library. + +Encrypted text will be ascii-armored. See `allout-toggle-current-subtree-encryption' for more details." @@ -6121,16 +5951,6 @@ See `allout-toggle-current-subtree-encryption' for more details." (if was-encrypted "de" "en")) nil)) ;; Assess key parameters: - (key-info (or - ;; detect the type by which it is already encrypted - (and was-encrypted - (allout-encrypted-key-info subject-text)) - (and (member fetch-pass '(4 (4))) - '(keypair nil)) - '(symmetric nil))) - (for-key-type (car key-info)) - (for-key-identity (cadr key-info)) - (fetch-pass (and fetch-pass (member fetch-pass '(16 (16))))) (was-coding-system buffer-file-coding-system)) (when (not was-encrypted) @@ -6156,8 +5976,7 @@ See `allout-toggle-current-subtree-encryption' for more details." (setq result-text (allout-encrypt-string subject-text was-encrypted - (current-buffer) - for-key-type for-key-identity fetch-pass)) + (current-buffer) keymode-cue)) ;; Replace the subtree with the processed product. (allout-unprotected @@ -6188,335 +6007,173 @@ See `allout-toggle-current-subtree-encryption' for more details." (insert "*")))) (run-hook-with-args 'allout-structure-added-hook bullet-pos subtree-end)))) -;;;_ > allout-encrypt-string (text decrypt allout-buffer key-type for-key -;;; fetch-pass &optional retried verifying -;;; passphrase) -(defun allout-encrypt-string (text decrypt allout-buffer key-type for-key - fetch-pass &optional retried rejected - verifying passphrase) +;;;_ > allout-encrypt-string (text decrypt allout-buffer keymode-cue +;;; &optional rejected) +(defun allout-encrypt-string (text decrypt allout-buffer keymode-cue + &optional rejected) "Encrypt or decrypt message TEXT. -If DECRYPT is true (default false), then decrypt instead of encrypt. +Returns the resulting string, or nil if the transformation fails. -FETCH-PASS (default false) forces fresh prompting for the passphrase. +If DECRYPT is true (default false), then decrypt instead of encrypt. -KEY-TYPE, either `symmetric' or `keypair', specifies which type -of cypher to use. +ALLOUT-BUFFER identifies the buffer containing the text. -FOR-KEY is human readable identification of the first of the user's -eligible secret keys a keypair decryption targets, or else nil. +Entry encryption defaults to symmetric key mode unless keypair +recipients are associated with the file \(see +`epa-file-encrypt-to') or the function is invoked with a +\(KEYMODE-CUE) universal argument greater than 1. -Optional RETRIED is for internal use -- conveys the number of failed keys -that have been solicited in sequence leading to this current call. +When encrypting, KEYMODE-CUE universal argument greater than 1 +causes prompting for recipients for public-key keypair +encryption. Selecting no recipients results in symmetric key +encryption. -Optional PASSPHRASE enables explicit delivery of the decryption passphrase, -for verification purposes. +Further, encrypting with a KEYMODE-CUE universal argument greater +than 4 - eg, preceded by a doubled Ctrl-U - causes association of +the specified recipients with the file, replacing those currently +associated with it. This can be used to deassociate any +recipients with the file, by selecting no recipients in the +dialog. -Optional REJECTED is for internal use -- conveys the number of +Optional REJECTED is for internal use, to convey the number of rejections due to matches against `allout-encryption-ciphertext-rejection-regexps', as limited by `allout-encryption-ciphertext-rejection-ceiling'. -Returns the resulting string, or nil if the transformation fails." - - (require 'pgg) - - (if (not (fboundp 'pgg-encrypt-symmetric)) - (error "Allout encryption depends on a newer version of pgg")) - - (let* ((scheme (upcase - (format "%s" (or pgg-scheme pgg-default-scheme "GPG")))) - (for-key (and (equal key-type 'keypair) - (or for-key - (split-string (read-string - (format "%s message recipients: " - scheme)) - "[ \t,]+")))) - (target-prompt-id (if (equal key-type 'keypair) - (if (= (length for-key) 1) - (car for-key) for-key) - (buffer-name allout-buffer))) - (target-cache-id (format "%s-%s" - key-type - (if (equal key-type 'keypair) - target-prompt-id - (or (buffer-file-name allout-buffer) - target-prompt-id)))) +NOTE: A few GnuPG v2 versions improperly preserve incorrect +symmetric decryption keys, preventing entry of the correct key on +subsequent decryption attempts until the cache times-out. That +can take several minutes. \(Decryption of other entries is not +affected.) Upgrade your EasyPG version, if you can, and you can +deliberately clear your gpg-agent's cache by sending it a '-HUP' +signal." + + (require 'epg) + (require 'epa) + + (let* ((epg-context (let* ((context (epg-make-context nil t))) + (epg-context-set-passphrase-callback + context #'epa-passphrase-callback-function) + context)) (encoding (with-current-buffer allout-buffer buffer-file-coding-system)) (multibyte (with-current-buffer allout-buffer - enable-multibyte-characters)) - (strip-plaintext-regexps - (if (not decrypt) - (allout-get-configvar-values - 'allout-encryption-plaintext-sanitization-regexps))) - (reject-ciphertext-regexps - (if (not decrypt) - (allout-get-configvar-values - 'allout-encryption-ciphertext-rejection-regexps))) + enable-multibyte-characters)) + ;; "sanitization" avoids encryption results that are outline structure. + (sani-regexps 'allout-encryption-plaintext-sanitization-regexps) + (strip-plaintext-regexps (if (not decrypt) + (allout-get-configvar-values + sani-regexps))) + (rejection-regexps 'allout-encryption-ciphertext-rejection-regexps) + (reject-ciphertext-regexps (if (not decrypt) + (allout-get-configvar-values + rejection-regexps))) (rejected (or rejected 0)) (rejections-left (- allout-encryption-ciphertext-rejection-ceiling rejected)) - result-text status + (keypair-mode (cond (decrypt 'decrypting) + ((<= (prefix-numeric-value keymode-cue) 1) + 'default) + ((<= (prefix-numeric-value keymode-cue) 4) + 'prompt) + ((> (prefix-numeric-value keymode-cue) 4) + 'prompt-save))) + (keypair-message (concat "Select encryption recipients.\n" + "Symmetric encryption is done if no" + " recipients are selected. ")) + (encrypt-to (and (boundp 'epa-file-encrypt-to) epa-file-encrypt-to)) + recipients + massaged-text + result-text ) - (if (and fetch-pass (not passphrase)) - ;; Force later fetch by evicting passphrase from the cache. - (pgg-remove-passphrase-from-cache target-cache-id t)) - - (catch 'encryption-failed - - ;; We handle only symmetric-key passphrase caching. - (if (and (not passphrase) - (not (equal key-type 'keypair))) - (setq passphrase (allout-obtain-passphrase for-key - target-cache-id - target-prompt-id - key-type - allout-buffer - retried fetch-pass))) - - (with-temp-buffer - - (insert text) - - ;; convey the text characteristics of the original buffer: - (allout-set-buffer-multibyte multibyte) - (when encoding - (set-buffer-file-coding-system encoding) - (if (not decrypt) - (encode-coding-region (point-min) (point-max) encoding))) - - (when (and strip-plaintext-regexps (not decrypt)) - (dolist (re strip-plaintext-regexps) - (let ((re (if (listp re) (car re) re)) - (replacement (if (listp re) (cadr re) ""))) - (goto-char (point-min)) - (save-match-data - (while (re-search-forward re nil t) - (replace-match replacement nil nil)))))) - - (cond - - ;; symmetric: - ((equal key-type 'symmetric) - (setq status - (if decrypt - - (pgg-decrypt (point-min) (point-max) passphrase) - - (pgg-encrypt-symmetric (point-min) (point-max) - passphrase))) - - (if status - (pgg-situate-output (point-min) (point-max)) - ;; failed -- handle passphrase caching - (if verifying - (throw 'encryption-failed nil) - (pgg-remove-passphrase-from-cache target-cache-id t) - (error "Symmetric-cipher %scryption failed -- %s" - (if decrypt "de" "en") - "try again with different passphrase")))) - - ;; encrypt `keypair': - ((not decrypt) - - (setq status - - (pgg-encrypt for-key - nil (point-min) (point-max) passphrase)) - - (if status - (pgg-situate-output (point-min) (point-max)) - (error (pgg-remove-passphrase-from-cache target-cache-id t) - (error "encryption failed")))) - - ;; decrypt `keypair': - (t - - (setq status - (pgg-decrypt (point-min) (point-max) passphrase)) - - (if status - (pgg-situate-output (point-min) (point-max)) - (error (pgg-remove-passphrase-from-cache target-cache-id t) - (error "decryption failed"))))) - - (setq result-text - (buffer-substring-no-properties - 1 (- (point-max) (if decrypt 0 1)))) - ) - - ;; validate result -- non-empty - (cond ((not result-text) - (if verifying - nil - ;; transform was fruitless, retry w/new passphrase. - (pgg-remove-passphrase-from-cache target-cache-id t) - (allout-encrypt-string text decrypt allout-buffer - key-type for-key nil - (if retried (1+ retried) 1) - rejected verifying nil))) - - ;; Retry (within limit) if ciphertext contains rejections: - ((and (not decrypt) - ;; Check for disqualification of this ciphertext: - (let ((regexps reject-ciphertext-regexps) - reject-it) - (while (and regexps (not reject-it)) - (setq reject-it (string-match (car regexps) - result-text)) - (pop regexps)) - reject-it)) - (setq rejections-left (1- rejections-left)) - (if (<= rejections-left 0) - (error (concat "Ciphertext rejected too many times" - " (%s), per `%s'") - allout-encryption-ciphertext-rejection-ceiling - 'allout-encryption-ciphertext-rejection-regexps) - (allout-encrypt-string text decrypt allout-buffer - key-type for-key nil - retried (1+ rejected) - verifying passphrase))) - ;; Barf if encryption yields extraordinary control chars: - ((and (not decrypt) - (string-match "[\C-a\C-k\C-o-\C-z\C-@]" - result-text)) - (error (concat "Encryption produced non-armored text, which" - "conflicts with allout mode -- reconfigure!"))) - - ;; valid result and just verifying or non-symmetric: - ((or verifying (not (equal key-type 'symmetric))) - (if (or verifying decrypt) - (pgg-add-passphrase-to-cache target-cache-id - passphrase t)) - result-text) - - ;; valid result and regular symmetric -- "register" - ;; passphrase with mnemonic aids/cache. - (t - (set-buffer allout-buffer) - (if passphrase - (pgg-add-passphrase-to-cache target-cache-id - passphrase t)) - (allout-update-passphrase-mnemonic-aids for-key passphrase - allout-buffer) - result-text) - ) - ) - ) - ) -;;;_ > allout-obtain-passphrase (for-key cache-id prompt-id key-type -;;; allout-buffer retried fetch-pass) -(defun allout-obtain-passphrase (for-key cache-id prompt-id key-type - allout-buffer retried fetch-pass) - "Obtain passphrase for a key from the cache or else from the user. - -When obtaining from the user, symmetric-cipher passphrases are verified -against either, if available and enabled, a random string that was -encrypted against the passphrase, or else against repeated entry by the -user for corroboration. - -FOR-KEY is the key for which the passphrase is being obtained. - -CACHE-ID is the cache id of the key for the passphrase. - -PROMPT-ID is the id for use when prompting the user. - -KEY-TYPE is either `symmetric' or `keypair'. - -ALLOUT-BUFFER is the buffer containing the entry being en/decrypted. - -RETRIED is the number of this attempt to obtain this passphrase. - -FETCH-PASS causes the passphrase to be solicited from the user, regardless -of the availability of a cached copy." - - (if (not (equal key-type 'symmetric)) - ;; do regular passphrase read on non-symmetric passphrase: - (pgg-read-passphrase (format "%s passphrase%s: " - (upcase (format "%s" (or pgg-scheme - pgg-default-scheme - "GPG"))) - (if prompt-id - (format " for %s" prompt-id) - "")) - cache-id t) - - ;; Symmetric hereon: - - (with-current-buffer allout-buffer - (let* ((hint (if (and (not (string= allout-passphrase-hint-string "")) - (or (equal allout-passphrase-hint-handling 'always) - (and (equal allout-passphrase-hint-handling - 'needed) - retried))) - (format " [%s]" allout-passphrase-hint-string) - "")) - (retry-message (if retried (format " (%s retry)" retried) "")) - (prompt-sans-hint (format "'%s' symmetric passphrase%s: " - prompt-id retry-message)) - (full-prompt (format "'%s' symmetric passphrase%s%s: " - prompt-id hint retry-message)) - (prompt full-prompt) - (verifier-string (allout-get-encryption-passphrase-verifier)) - - (cached (and (not fetch-pass) - (pgg-read-passphrase-from-cache cache-id t))) - (got-pass (or cached - (pgg-read-passphrase full-prompt cache-id t))) - confirmation) - - (if (not got-pass) - nil + ;; Massage the subject text for encoding and filtering. + (with-temp-buffer + (insert text) + ;; convey the text characteristics of the original buffer: + (allout-set-buffer-multibyte multibyte) + (when encoding + (set-buffer-file-coding-system encoding) + (if (not decrypt) + (encode-coding-region (point-min) (point-max) encoding))) + + ;; remove sanitization regexps matches before encrypting: + (when (and strip-plaintext-regexps (not decrypt)) + (dolist (re strip-plaintext-regexps) + (let ((re (if (listp re) (car re) re)) + (replacement (if (listp re) (cadr re) ""))) + (goto-char (point-min)) + (save-match-data + (while (re-search-forward re nil t) + (replace-match replacement nil nil)))))) + (setq massaged-text (buffer-substring-no-properties (point-min) + (point-max)))) + ;; determine key mode and, if keypair, recipients: + (setq recipients + (case keypair-mode + + (decrypting nil) + + (default (if encrypt-to (epg-list-keys epg-context encrypt-to))) + + ((prompt prompt-save) + (save-window-excursion + (epa-select-keys epg-context keypair-message))))) + + (setq result-text + (if decrypt + (epg-decrypt-string epg-context + (encode-coding-string massaged-text + (or encoding 'utf-8))) + (replace-regexp-in-string "\n$" "" + (epg-encrypt-string epg-context + (encode-coding-string massaged-text + (or encoding 'utf-8)) + recipients)))) + + ;; validate result -- non-empty + (if (not result-text) + (error "%scryption failed." (if decrypt "De" "En"))) + + + (when (eq keypair-mode 'prompt-save) + ;; set epa-file-encrypt-to in the buffer: + (setq epa-file-encrypt-to (mapcar (lambda (key) + (epg-user-id-string + (car (epg-key-user-id-list key)))) + recipients)) + ;; change the file variable: + (allout-adjust-file-variable "epa-file-encrypt-to" epa-file-encrypt-to)) - ;; Duplicate our handle on the passphrase so it's not clobbered by - ;; deactivate-passwd memory clearing: - (setq got-pass (copy-sequence got-pass)) - - (cond (verifier-string - (save-window-excursion - (if (allout-encrypt-string verifier-string 'decrypt - allout-buffer 'symmetric - for-key nil 0 0 'verifying - (copy-sequence got-pass)) - (setq confirmation (format "%s" got-pass)))) - - (if (and (not confirmation) - (if (yes-or-no-p - (concat "Passphrase differs from established" - " -- use new one instead? ")) - ;; deactivate password for subsequent - ;; confirmation: - (progn - (pgg-remove-passphrase-from-cache cache-id t) - (setq prompt prompt-sans-hint) - nil) - t)) - (progn (pgg-remove-passphrase-from-cache cache-id t) - (error "Wrong passphrase")))) - ;; No verifier string -- force confirmation by repetition of - ;; (new) passphrase: - ((or fetch-pass (not cached)) - (pgg-remove-passphrase-from-cache cache-id t)))) - ;; confirmation vs new input -- doing pgg-read-passphrase will do the - ;; right thing, in either case: - (if (not confirmation) - (setq confirmation - (pgg-read-passphrase (concat prompt - " ... confirm spelling: ") - cache-id t))) - (prog1 - (if (equal got-pass confirmation) - confirmation - (if (yes-or-no-p (concat "spelling of original and" - " confirmation differ -- retry? ")) - (progn (setq retried (if retried (1+ retried) 1)) - (pgg-remove-passphrase-from-cache cache-id t) - ;; recurse to this routine: - (pgg-read-passphrase prompt-sans-hint cache-id t)) - (pgg-remove-passphrase-from-cache cache-id t) - (error "Confirmation failed")))))))) + (cond + ;; Retry (within limit) if ciphertext contains rejections: + ((and (not decrypt) + ;; Check for disqualification of this ciphertext: + (let ((regexps reject-ciphertext-regexps) + reject-it) + (while (and regexps (not reject-it)) + (setq reject-it (string-match (car regexps) result-text)) + (pop regexps)) + reject-it)) + (setq rejections-left (1- rejections-left)) + (if (<= rejections-left 0) + (error (concat "Ciphertext rejected too many times" + " (%s), per `%s'") + allout-encryption-ciphertext-rejection-ceiling + 'allout-encryption-ciphertext-rejection-regexps) + ;; try again (gpg-agent may have the key cached): + (allout-encrypt-string text decrypt allout-buffer keypair-mode + (1+ rejected)))) + + ;; Barf if encryption yields extraordinary control chars: + ((and (not decrypt) + (string-match "[\C-a\C-k\C-o-\C-z\C-@]" + result-text)) + (error (concat "Encryption produced non-armored text, which" + "conflicts with allout mode -- reconfigure!"))) + + (t result-text)))) ;;;_ > allout-encrypted-topic-p () (defun allout-encrypted-topic-p () "True if the current topic is encryptable and encrypted." @@ -6527,128 +6184,6 @@ of the availability of a cached copy." (save-match-data (looking-at "\\*"))) ) ) -;;;_ > allout-encrypted-key-info (text) -;; XXX gpg-specific, alas -(defun allout-encrypted-key-info (text) - "Return a pair of the key type and identity of a recipient's secret key. - -The key type is one of `symmetric' or `keypair'. - -If `keypair', and some of the user's secret keys are among those for which -the message was encoded, return the identity of the first. Otherwise, -return nil for the second item of the pair. - -An error is raised if the text is not encrypted." - (require 'pgg-parse) - (save-excursion - (with-temp-buffer - (insert text) - (let* ((parsed-armor (pgg-parse-armor-region (point-min) (point-max))) - (type (if (pgg-gpg-symmetric-key-p parsed-armor) - 'symmetric - 'keypair)) - secret-keys first-secret-key for-key-owner) - (if (equal type 'keypair) - (setq secret-keys (pgg-gpg-lookup-all-secret-keys) - first-secret-key (pgg-gpg-select-matching-key parsed-armor - secret-keys) - for-key-owner (and first-secret-key - (pgg-gpg-lookup-key-owner - first-secret-key)))) - (list type (pgg-gpg-key-id-from-key-owner for-key-owner)) - ) - ) - ) - ) -;;;_ > allout-create-encryption-passphrase-verifier (passphrase) -(defun allout-create-encryption-passphrase-verifier (passphrase) - "Encrypt random message for later validation of symmetric key's passphrase." - ;; use 20 random ascii characters, across the entire ascii range. - (random t) - (let ((spew (make-string 20 ?\0))) - (dotimes (i (length spew)) - (aset spew i (1+ (random 254)))) - (allout-encrypt-string spew nil (current-buffer) 'symmetric - nil nil 0 0 passphrase)) - ) -;;;_ > allout-update-passphrase-mnemonic-aids (for-key passphrase -;;; outline-buffer) -(defun allout-update-passphrase-mnemonic-aids (for-key passphrase - outline-buffer) - "Update passphrase verifier and hint strings if necessary. - -See `allout-passphrase-verifier-string' and `allout-passphrase-hint-string' -settings. - -PASSPHRASE is the passphrase being mnemonicized. - -OUTLINE-BUFFER is the buffer of the outline being adjusted. - -These are used to help the user keep track of the passphrase they use for -symmetric encryption in the file. - -Behavior is governed by `allout-passphrase-verifier-handling', -`allout-passphrase-hint-handling', and also, controlling whether the values -are preserved on Emacs local file variables, -`allout-enable-file-variable-adjustment'." - - ;; If passphrase doesn't agree with current verifier: - ;; - adjust the verifier - ;; - if passphrase hint handling is enabled, adjust the passphrase hint - ;; - if file var settings are enabled, adjust the file vars - - (let* ((new-verifier-needed (not (allout-verify-passphrase - for-key passphrase outline-buffer))) - (new-verifier-string - (if new-verifier-needed - ;; Collapse to a single line and enclose in string quotes: - (subst-char-in-string - ?\n ?\C-a (allout-create-encryption-passphrase-verifier - passphrase)))) - new-hint) - (when new-verifier-string - ;; do the passphrase hint first, since it's interactive - (when (and allout-passphrase-hint-handling - (not (equal allout-passphrase-hint-handling 'disabled))) - (setq new-hint - (read-from-minibuffer "Passphrase hint to jog your memory: " - allout-passphrase-hint-string)) - (when (not (string= new-hint allout-passphrase-hint-string)) - (setq allout-passphrase-hint-string new-hint) - (allout-adjust-file-variable "allout-passphrase-hint-string" - allout-passphrase-hint-string))) - (when allout-passphrase-verifier-handling - (setq allout-passphrase-verifier-string new-verifier-string) - (allout-adjust-file-variable "allout-passphrase-verifier-string" - allout-passphrase-verifier-string)) - ) - ) - ) -;;;_ > allout-get-encryption-passphrase-verifier () -(defun allout-get-encryption-passphrase-verifier () - "Return text of the encrypt passphrase verifier, unmassaged, or nil if none. - -Derived from value of `allout-passphrase-verifier-string'." - - (let ((verifier-string (and (boundp 'allout-passphrase-verifier-string) - allout-passphrase-verifier-string))) - (if verifier-string - ;; Return it uncollapsed - (subst-char-in-string ?\C-a ?\n verifier-string)) - ) - ) -;;;_ > allout-verify-passphrase (key passphrase allout-buffer) -(defun allout-verify-passphrase (key passphrase allout-buffer) - "True if passphrase successfully decrypts verifier, nil otherwise. - -\"Otherwise\" includes absence of passphrase verifier." - (with-current-buffer allout-buffer - (and (boundp 'allout-passphrase-verifier-string) - allout-passphrase-verifier-string - (allout-encrypt-string (allout-get-encryption-passphrase-verifier) - 'decrypt allout-buffer 'symmetric - key nil 0 0 'verifying passphrase) - t))) ;;;_ > allout-next-topic-pending-encryption (&optional except-mark) (defun allout-next-topic-pending-encryption (&optional except-mark) "Return the point of the next topic pending encryption, or nil if none. @@ -6772,7 +6307,8 @@ setup for auto-startup." (interactive "P") - (allout-mode t) + (if (allout-mode-p) (allout-mode)) ; deactivate so we can re-activate... + (allout-mode) (save-excursion (goto-char (point-min)) @@ -7176,13 +6712,13 @@ To ignore intangibility, bind `inhibit-point-motion-hooks' to t." ;; No docstring because xemacs defalias doesn't support it. ) ;;;_ > allout-set-buffer-multibyte -;; define as alias first, so byte compiler is happy. -(defalias 'allout-set-buffer-multibyte 'set-buffer-multibyte) -;; then supplant with definition if underlying alias absent. -(if (not (fboundp 'set-buffer-multibyte)) - (defun allout-set-buffer-multibyte (is-multibyte) - (setq enable-multibyte-characters is-multibyte)) - ) +(if (fboundp 'set-buffer-multibyte) + (defalias 'allout-set-buffer-multibyte 'set-buffer-multibyte) + (with-no-warnings + ;; this definition is used only in older or alternative emacs, where + ;; the setting is our only recourse. + (defun allout-set-buffer-multibyte (is-multibyte) + (set enable-multibyte-characters is-multibyte)))) ;;;_ > allout-select-safe-coding-system (defalias 'allout-select-safe-coding-system (if (fboundp 'select-safe-coding-system) diff --git a/lisp/ansi-color.el b/lisp/ansi-color.el index 98eeca325b2..2b43940c1bd 100644 --- a/lisp/ansi-color.el +++ b/lisp/ansi-color.el @@ -1,7 +1,6 @@ ;;; ansi-color.el --- translate ANSI escape sequences into faces -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Alex Schroeder <alex@gnu.org> ;; Maintainer: Alex Schroeder <alex@gnu.org> @@ -594,5 +593,4 @@ ESCAPE-SEQ is a SGR control sequences such as \\033[34m. The parameter (provide 'ansi-color) -;; arch-tag: 00726118-9432-44fd-b72d-d2af7591c99c ;;; ansi-color.el ends here diff --git a/lisp/apropos.el b/lisp/apropos.el index d62721e157c..459d12804fd 100644 --- a/lisp/apropos.el +++ b/lisp/apropos.el @@ -1,7 +1,6 @@ ;;; apropos.el --- apropos commands for users and programmers -;; Copyright (C) 1989, 1994, 1995, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1989, 1994-1995, 2001-2011 Free Software Foundation, Inc. ;; Author: Joe Wells <jbw@bigbird.bu.edu> ;; Daniel Pfeiffer <occitan@esperanto.org> (rewrite) @@ -1137,5 +1136,4 @@ If non-nil TEXT is a string that will be printed as a heading." (provide 'apropos) -;; arch-tag: d56fa2ac-e56b-4ce3-84ff-852f9c0dc66e ;;; apropos.el ends here diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index 4a80b74e958..131b0dcd958 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el @@ -1,7 +1,6 @@ ;;; arc-mode.el --- simple editing of archives -;; Copyright (C) 1995, 1997, 1998, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995, 1997-1998, 2001-2011 Free Software Foundation, Inc. ;; Author: Morten Welinder <terra@gnu.org> ;; Keywords: files archives msdog editing major-mode diff --git a/lisp/array.el b/lisp/array.el index 1f04e8ef724..211124964a5 100644 --- a/lisp/array.el +++ b/lisp/array.el @@ -1,7 +1,6 @@ ;;; array.el --- array editing commands for GNU Emacs -;; Copyright (C) 1987, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1987, 2000-2011 Free Software Foundation, Inc. ;; Author: David M. Brown ;; Maintainer: FSF diff --git a/lisp/autoarg.el b/lisp/autoarg.el index bb1849a85b0..378ec1318b1 100644 --- a/lisp/autoarg.el +++ b/lisp/autoarg.el @@ -1,7 +1,6 @@ ;;; autoarg.el --- make digit keys supply prefix args -;; Copyright (C) 1998, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998, 2000-2011 Free Software Foundation, Inc. ;; Author: Dave Love <fx@gnu.org> ;; Created: 1998-09-04 @@ -144,5 +143,4 @@ which invoked this function, excluding the Autoarg keymap." (provide 'autoarg) -;; arch-tag: 2ba2ab4f-d60e-402a-ae4d-37e29af723c2 ;;; autoarg.el ends here diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el index 9a8001875e0..5793c3180be 100644 --- a/lisp/autoinsert.el +++ b/lisp/autoinsert.el @@ -1,7 +1,7 @@ ;;; autoinsert.el --- automatic mode-dependent insertion of text into new files -;; Copyright (C) 1985, 1986, 1987, 1994, 1995, 1998, 2000, 2001, 2002, -;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985-1987, 1994-1995, 1998, 2000-2011 +;; Free Software Foundation, Inc. ;; Author: Charlie Martin <crm@cs.duke.edu> ;; Adapted-By: Daniel Pfeiffer <occitan@esperanto.org> @@ -410,5 +410,4 @@ insert a template for the file depending on the mode of the buffer." (provide 'autoinsert) -;; arch-tag: 5b6630ac-c735-43cf-b097-b78c622af909 ;;; autoinsert.el ends here diff --git a/lisp/autorevert.el b/lisp/autorevert.el index 99bb005d0fa..0000e29f458 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el @@ -1,7 +1,6 @@ ;;; autorevert.el --- revert buffers when files on disk change -;; Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-1999, 2001-2011 Free Software Foundation, Inc. ;; Author: Anders Lindgren <andersl@andersl.com> ;; Keywords: convenience @@ -576,5 +575,4 @@ the timer when no buffers need to be checked." (run-hooks 'auto-revert-load-hook) -;; arch-tag: f6bcb07b-4841-477e-9e44-b18678e58876 ;;; autorevert.el ends here diff --git a/lisp/avoid.el b/lisp/avoid.el index 4b713b827b6..fe47a0c4a33 100644 --- a/lisp/avoid.el +++ b/lisp/avoid.el @@ -1,7 +1,6 @@ ;;; avoid.el --- make mouse pointer stay out of the way of editing -;; Copyright (C) 1993, 1994, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993-1994, 2000-2011 Free Software Foundation, Inc. ;; Author: Boris Goldowsky <boris@gnu.org> ;; Keywords: mouse @@ -409,5 +408,4 @@ definition of \"random distance\".)" (if mouse-avoidance-mode (mouse-avoidance-mode mouse-avoidance-mode)) -;; arch-tag: 64ad4ef8-a870-4183-8d96-3aa93b7a6800 ;;; avoid.el ends here diff --git a/lisp/battery.el b/lisp/battery.el index fc5926efd17..9afe9de7b98 100644 --- a/lisp/battery.el +++ b/lisp/battery.el @@ -1,7 +1,6 @@ ;;; battery.el --- display battery status information -*- coding: iso-8859-1 -*- -;; Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-1998, 2000-2011 Free Software Foundation, Inc. ;; Author: Ralph Schleicher <rs@nunatak.allgaeu.org> ;; Keywords: hardware @@ -553,5 +552,4 @@ MATCH-NUM in the match. Otherwise, return nil." (provide 'battery) -;; arch-tag: 65916f50-4754-4b6b-ac21-0b510f545a37 ;;; battery.el ends here diff --git a/lisp/bindings.el b/lisp/bindings.el index bd4a1203364..4d9f4f09e58 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el @@ -1,7 +1,6 @@ ;;; bindings.el --- define standard key bindings and some variables -;; Copyright (C) 1985, 1986, 1987, 1992, 1993, 1994, 1995, 1996, 1999, -;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 1985-1987, 1992-1996, 1999-2011 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -1214,5 +1213,4 @@ if `inhibit-field-text-motion' is non-nil." ;; no-update-autoloads: t ;; End: -;; arch-tag: 23b5c7e6-e47b-49ed-8c6c-ed213c5fffe0 ;;; bindings.el ends here diff --git a/lisp/bookmark.el b/lisp/bookmark.el index 9c1034c636e..4c0dd64a2cf 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -1,8 +1,6 @@ ;;; bookmark.el --- set bookmarks, maybe annotate them, jump to them later -;; Copyright (C) 1993, 1994, 1995, 1996, 1997, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1993-1997, 2001-2011 Free Software Foundation, Inc. ;; Author: Karl Fogel <kfogel@red-bean.com> ;; Maintainer: Karl Fogel <kfogel@red-bean.com> diff --git a/lisp/bs.el b/lisp/bs.el index 0ce7670201d..2436bab2597 100644 --- a/lisp/bs.el +++ b/lisp/bs.el @@ -1,7 +1,6 @@ ;;; bs.el --- menu for selecting and displaying buffers -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Olaf Sylvester <Olaf.Sylvester@netsurf.de> ;; Maintainer: Olaf Sylvester <Olaf.Sylvester@netsurf.de> ;; Keywords: convenience @@ -1486,5 +1485,4 @@ name of buffer configuration." ;; Now provide feature bs (provide 'bs) -;; arch-tag: c0d9ab34-bf06-4368-ae9d-af88878e6802 ;;; bs.el ends here diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el index 21fdada22c2..1e92c08475a 100644 --- a/lisp/buff-menu.el +++ b/lisp/buff-menu.el @@ -1,7 +1,6 @@ ;;; buff-menu.el --- buffer menu main function and support functions -*- coding:utf-8 -*- -;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 2000, 2001, 2002, -;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 1985-1987, 1993-1995, 2000-2011 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -113,9 +112,15 @@ A nil value means sort by visited order (the default).") This variable determines whether reverting the buffer lists only file buffers. It affects both manual reverting and reverting by Auto Revert Mode.") - (make-variable-buffer-local 'Buffer-menu-files-only) +(defvar Buffer-menu--buffers nil + "If non-nil, list of buffers shown in the current buffer-menu. +This variable determines whether reverting the buffer lists only +this buffers. It affects both manual reverting and reverting by +Auto Revert Mode.") +(make-variable-buffer-local 'Buffer-menu--buffers) + (defvar Info-current-file) ;; from info.el (defvar Info-current-node) ;; from info.el @@ -283,7 +288,7 @@ Letters do not insert themselves; instead, they are commands. ;; interactively current buffer is correctly identified with a `.' ;; by `list-buffers-noselect'. (with-current-buffer (window-buffer) - (list-buffers-noselect Buffer-menu-files-only)) + (list-buffers-noselect Buffer-menu-files-only Buffer-menu--buffers)) (if oline (while (setq prop (next-single-property-change prop 'buffer)) (when (eq (get-text-property prop 'buffer) oline) @@ -920,6 +925,7 @@ For more information, see the function `buffer-menu'." (and desired-point (goto-char desired-point)) (setq Buffer-menu-files-only files-only) + (setq Buffer-menu--buffers buffer-list) (set-buffer-modified-p nil) (current-buffer)))) diff --git a/lisp/button.el b/lisp/button.el index c771474da3a..2e485547745 100644 --- a/lisp/button.el +++ b/lisp/button.el @@ -1,7 +1,6 @@ ;;; button.el --- clickable buttons ;; -;; Copyright (C) 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2001-2011 Free Software Foundation, Inc. ;; ;; Author: Miles Bader <miles@gnu.org> ;; Keywords: extensions @@ -38,7 +37,9 @@ ;; the button is represented by a marker or buffer-position pointing ;; somewhere in the button. In the latter case, no markers into the ;; buffer are retained, which is important for speed if there are are -;; extremely large numbers of buttons. +;; extremely large numbers of buttons. Note however that if there is +;; an existing face text-property at the site of the button, the +;; button face may not be visible. Using overlays avoids this. ;; ;; Using `define-button-type' to define default properties for buttons ;; is not necessary, but it is is encouraged, since doing so makes the @@ -290,9 +291,12 @@ button-type from which to inherit other properties; see `define-button-type'. This function is like `make-button', except that the button is actually -part of the text instead of being a property of the buffer. Creating -large numbers of buttons can also be somewhat faster using -`make-text-button'. +part of the text instead of being a property of the buffer. That is, +this function uses text properties, the other uses overlays. +Creating large numbers of buttons can also be somewhat faster +using `make-text-button'. Note, however, that if there is an existing +face property at the site of the button, the button face may not be visible. +You may want to use `make-button' in that case. BEG can also be a string, in which case it is made into a button. @@ -477,5 +481,4 @@ Returns the button found." (provide 'button) -;; arch-tag: 5f2c7627-413b-4097-b282-630f89d9c5e9 ;;; button.el ends here diff --git a/lisp/calc/README b/lisp/calc/README index b23666018e5..e1170fc6df7 100644 --- a/lisp/calc/README +++ b/lisp/calc/README @@ -1,13 +1,11 @@ -Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 - Free Software Foundation, Inc. +Copyright (C) 2001-2011 Free Software Foundation, Inc. See the end of the file for license conditions. This directory contains Calc, an advanced desk calculator for GNU Emacs. -"Calc" Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, - 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +"Calc" Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. Written by: Dave Gillespie diff --git a/lisp/calc/README.prev b/lisp/calc/README.prev index 929c913b9c3..69da211efc2 100644 --- a/lisp/calc/README.prev +++ b/lisp/calc/README.prev @@ -1,5 +1,4 @@ -Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 - Free Software Foundation, Inc. +Copyright (C) 2001-2011 Free Software Foundation, Inc. See the end of the file for license conditions. diff --git a/lisp/calc/calc-aent.el b/lisp/calc/calc-aent.el index 472133be84f..00e07aba6a5 100644 --- a/lisp/calc/calc-aent.el +++ b/lisp/calc/calc-aent.el @@ -1,7 +1,6 @@ ;;; calc-aent.el --- algebraic entry functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: Dave Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -1271,5 +1270,4 @@ If the current Calc language does not use placeholders, return nil." ;; generated-autoload-file: "calc-loaddefs.el" ;; End: -;; arch-tag: 5599e45d-e51e-44bb-9a20-9f4ed8c96c32 ;;; calc-aent.el ends here diff --git a/lisp/calc/calc-alg.el b/lisp/calc/calc-alg.el index 47cdae52a13..728acf5b0f1 100644 --- a/lisp/calc/calc-alg.el +++ b/lisp/calc/calc-alg.el @@ -1,7 +1,6 @@ ;;; calc-alg.el --- algebraic functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -1914,5 +1913,4 @@ (provide 'calc-alg) -;; arch-tag: 52e7dcdf-9688-464d-a02b-4bbe789348d0 ;;; calc-alg.el ends here diff --git a/lisp/calc/calc-arith.el b/lisp/calc/calc-arith.el index 6de2408050a..a557e5fb92d 100644 --- a/lisp/calc/calc-arith.el +++ b/lisp/calc/calc-arith.el @@ -1,7 +1,6 @@ ;;; calc-arith.el --- arithmetic functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -3067,5 +3066,4 @@ (provide 'calc-arith) -;; arch-tag: 6c396b5b-14c6-40ed-bb2a-7cc2e8111465 ;;; calc-arith.el ends here diff --git a/lisp/calc/calc-bin.el b/lisp/calc/calc-bin.el index 4ab698ea640..20b4a9db5e2 100644 --- a/lisp/calc/calc-bin.el +++ b/lisp/calc/calc-bin.el @@ -1,7 +1,6 @@ ;;; calc-bin.el --- binary functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -854,5 +853,4 @@ the size of a Calc bignum digit.") (provide 'calc-bin) -;; arch-tag: f6dba7bc-53b2-41ae-919c-c266ab0ca8b3 ;;; calc-bin.el ends here diff --git a/lisp/calc/calc-comb.el b/lisp/calc/calc-comb.el index a8174622093..da5bae69803 100644 --- a/lisp/calc/calc-comb.el +++ b/lisp/calc/calc-comb.el @@ -1,7 +1,6 @@ ;;; calc-comb.el --- combinatoric functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -1027,5 +1026,4 @@ (provide 'calc-comb) -;; arch-tag: 1d75ee9b-0815-42bd-a321-bb3dc001cc02 ;;; calc-comb.el ends here diff --git a/lisp/calc/calc-cplx.el b/lisp/calc/calc-cplx.el index 6b0075e338b..f2e0c493144 100644 --- a/lisp/calc/calc-cplx.el +++ b/lisp/calc/calc-cplx.el @@ -1,7 +1,6 @@ ;;; calc-cplx.el --- Complex number functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -355,5 +354,4 @@ (provide 'calc-cplx) -;; arch-tag: de73a331-941c-4507-ae76-46c76adc70dd ;;; calc-cplx.el ends here diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el index f14895eb426..f011d187a42 100644 --- a/lisp/calc/calc-embed.el +++ b/lisp/calc/calc-embed.el @@ -1,7 +1,6 @@ ;;; calc-embed.el --- embed Calc in a buffer -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -1382,5 +1381,4 @@ The command \\[yank] can retrieve it from there." ;; generated-autoload-file: "calc-loaddefs.el" ;; End: -;; arch-tag: 1b8f311e-fba1-40d3-b8c3-1d6f68fd26fc ;;; calc-embed.el ends here diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el index 18e63655ecf..71cd6c9d611 100644 --- a/lisp/calc/calc-ext.el +++ b/lisp/calc/calc-ext.el @@ -1,7 +1,6 @@ ;;; calc-ext.el --- various extension functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -136,8 +135,6 @@ (define-key calc-mode-map "\C-w" 'calc-kill-region) (define-key calc-mode-map "\M-w" 'calc-copy-region-as-kill) (define-key calc-mode-map "\M-\C-w" 'kill-ring-save) - (define-key calc-mode-map "\C-_" 'calc-undo) - (define-key calc-mode-map "\C-xu" 'calc-undo) (define-key calc-mode-map "\M-\C-m" 'calc-last-args) (define-key calc-mode-map "a" nil) @@ -549,6 +546,10 @@ (define-key calc-mode-map "ud" 'calc-define-unit) (define-key calc-mode-map "ue" 'calc-explain-units) (define-key calc-mode-map "ug" 'calc-get-unit-definition) + (define-key calc-mode-map "ul+" 'calc-luplus) + (define-key calc-mode-map "ul-" 'calc-luminus) + (define-key calc-mode-map "ull" 'calc-level) + (define-key calc-mode-map "ul?" 'calc-ul-prefix-help) (define-key calc-mode-map "up" 'calc-permanent-units) (define-key calc-mode-map "ur" 'calc-remove-units) (define-key calc-mode-map "us" 'calc-simplify-units) @@ -932,7 +933,8 @@ calc-store-value calc-var-name) ("calc-stuff" calc-explain-why calcFunc-clean calcFunc-pclean calcFunc-pfloat calcFunc-pfrac) - ("calc-units" calcFunc-usimplify + ("calc-units" calcFunc-usimplify calcFunc-luplus +calcFunc-luminus calcFunc-fieldlevel calcFunc-powerlevel math-build-units-table math-build-units-table-buffer math-check-unit-name math-convert-temperature math-convert-units math-extract-units math-remove-units math-simplify-units @@ -1049,7 +1051,8 @@ calc-full-help calc-g-prefix-help calc-help-prefix calc-hyperbolic-prefix-help calc-inv-hyp-prefix-help calc-option-prefix-help calc-inverse-prefix-help calc-j-prefix-help calc-k-prefix-help calc-m-prefix-help calc-r-prefix-help calc-s-prefix-help -calc-t-prefix-help calc-u-prefix-help calc-v-prefix-help) +calc-t-prefix-help calc-u-prefix-help calc-ul-prefix-help +calc-v-prefix-help) ("calc-incom" calc-begin-complex calc-begin-vector calc-comma calc-dots calc-end-complex calc-end-vector calc-semi) @@ -1156,14 +1159,14 @@ calc-trail-kill calc-trail-last calc-trail-marker calc-trail-next calc-trail-out calc-trail-previous calc-trail-scroll-left calc-trail-scroll-right calc-trail-yank) - ("calc-undo" calc-last-args calc-redo calc-undo) + ("calc-undo" calc-last-args calc-redo) ("calc-units" calc-autorange-units calc-base-units calc-convert-temperature calc-convert-units calc-define-unit calc-enter-units-table calc-explain-units calc-extract-units calc-get-unit-definition calc-permanent-units calc-quick-units calc-remove-units calc-simplify-units calc-undefine-unit -calc-view-units-table) +calc-view-units-table calc-luplus calc-luminus calc-level) ("calc-vec" calc-arrange-vector calc-build-vector calc-cnorm calc-conj-transpose calc-cons calc-cross calc-kron calc-diag @@ -3504,5 +3507,4 @@ A key may contain additional specs for Inverse, Hyperbolic, and Inv+Hyp.") ;; coding: utf-8 ;; End: -;; arch-tag: 1814ba7f-a390-49dc-9e25-a5adc205e97e ;;; calc-ext.el ends here diff --git a/lisp/calc/calc-fin.el b/lisp/calc/calc-fin.el index 6405dad5a65..2e1d072dfb8 100644 --- a/lisp/calc/calc-fin.el +++ b/lisp/calc/calc-fin.el @@ -1,7 +1,6 @@ ;;; calc-fin.el --- financial functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -410,5 +409,4 @@ (provide 'calc-fin) -;; arch-tag: 82f30ca8-d02f-4b33-84b4-bb6ecd84597b ;;; calc-fin.el ends here diff --git a/lisp/calc/calc-forms.el b/lisp/calc/calc-forms.el index 7fec46b0429..912bbc7f78d 100644 --- a/lisp/calc/calc-forms.el +++ b/lisp/calc/calc-forms.el @@ -1,7 +1,6 @@ ;;; calc-forms.el --- data format conversion functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -1922,5 +1921,4 @@ and ends on the last Sunday of October at 2 a.m." (provide 'calc-forms) -;; arch-tag: a3d8f33b-9508-4043-8060-d02b8c9c750c ;;; calc-forms.el ends here diff --git a/lisp/calc/calc-frac.el b/lisp/calc/calc-frac.el index 265f0b325b9..30894b406b5 100644 --- a/lisp/calc/calc-frac.el +++ b/lisp/calc/calc-frac.el @@ -1,7 +1,6 @@ ;;; calc-frac.el --- fraction functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -234,5 +233,4 @@ (provide 'calc-frac) -;; arch-tag: 89d65274-0b3b-42d8-aacd-eaf86da5b4ea ;;; calc-frac.el ends here diff --git a/lisp/calc/calc-funcs.el b/lisp/calc/calc-funcs.el index 5c445b75bac..e065493562e 100644 --- a/lisp/calc/calc-funcs.el +++ b/lisp/calc/calc-funcs.el @@ -1,7 +1,6 @@ ;;; calc-funcs.el --- well-known functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -1009,5 +1008,4 @@ (provide 'calc-funcs) -;; arch-tag: 421ddb7a-550f-4dda-a31c-06638ebfc43a ;;; calc-funcs.el ends here diff --git a/lisp/calc/calc-graph.el b/lisp/calc/calc-graph.el index 9fefaa73d79..d5d8f0aaf35 100644 --- a/lisp/calc/calc-graph.el +++ b/lisp/calc/calc-graph.el @@ -1,7 +1,6 @@ ;;; calc-graph.el --- graph output functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -575,16 +574,16 @@ (setq calc-graph-xstep 1) (error "%s is not a suitable basis for %s" calc-graph-xname calc-graph-yname))))) (or (math-realp calc-graph-yvalue) - (let ((arglist nil)) + (let ((math-arglist nil)) (setq calc-graph-yvalue (math-evaluate-expr calc-graph-yvalue)) (calc-default-formula-arglist calc-graph-yvalue) - (or arglist + (or math-arglist (error "%s does not contain any unassigned variables" calc-graph-yname)) - (and (cdr arglist) + (and (cdr math-arglist) (error "%s contains more than one variable: %s" - calc-graph-yname arglist)) + calc-graph-yname math-arglist)) (setq calc-graph-yvalue (math-expr-subst calc-graph-yvalue - (math-build-var-name (car arglist)) + (math-build-var-name (car math-arglist)) '(var DUMMY var-DUMMY))))) (setq calc-graph-ycache (assoc calc-graph-yvalue calc-graph-data-cache)) (delq calc-graph-ycache calc-graph-data-cache) @@ -736,17 +735,17 @@ calc-graph-zp calc-graph-yvalue calc-graph-xvec t)) (or (math-realp calc-graph-yvalue) - (let ((arglist nil)) + (let ((math-arglist nil)) (setq calc-graph-yvalue (math-evaluate-expr calc-graph-yvalue)) (calc-default-formula-arglist calc-graph-yvalue) - (setq arglist (sort arglist 'string-lessp)) - (or (cdr arglist) + (setq math-arglist (sort math-arglist 'string-lessp)) + (or (cdr math-arglist) (error "%s does not contain enough unassigned variables" calc-graph-yname)) - (and (cdr (cdr arglist)) - (error "%s contains too many variables: %s" calc-graph-yname arglist)) + (and (cdr (cdr math-arglist)) + (error "%s contains too many variables: %s" calc-graph-yname math-arglist)) (setq calc-graph-yvalue (math-multi-subst calc-graph-yvalue (mapcar 'math-build-var-name - arglist) + math-arglist) '((var DUMMY var-DUMMY) (var DUMMY2 var-DUMMY2)))))) (if (setq calc-graph-xvec (eq (car-safe calc-graph-xvalue) 'vec)) @@ -1506,5 +1505,4 @@ This \"dumb\" driver will be present in Gnuplot 3.0." (provide 'calc-graph) -;; arch-tag: e4b06a52-c386-4d54-a2bb-7c0a0ef533c2 ;;; calc-graph.el ends here diff --git a/lisp/calc/calc-help.el b/lisp/calc/calc-help.el index 47c95130641..c34c114dacf 100644 --- a/lisp/calc/calc-help.el +++ b/lisp/calc/calc-help.el @@ -1,7 +1,6 @@ ;;; calc-help.el --- help display functions for Calc, -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -663,12 +662,19 @@ C-w Describe how there is no warranty for Calc." (calc-do-prefix-help '("Simplify, Convert, Temperature-convert, Base-units" "Autorange; Remove, eXtract; Explain; View-table; 0-9" - "Define, Undefine, Get-defn, Permanent" + "Define, Undefine, Get-defn, Permanent, Logarithmic" "SHIFT + View-table-other-window" "SHIFT + stat: Mean, G-mean, Std-dev, Covar, maX, miN" "SHIFT + stat: + (sum), - (asum), * (prod), # (count)") "units/stat" ?u)) +(defun calc-ul-prefix-help () + (interactive) + (if (eq this-command last-command) + (message "ul-") + (message "logarithmic-units: + (logarithmic), - (logarithmic), Level: ul-")) + (push ?l unread-command-events) + (push ?u unread-command-events)) (defun calc-v-prefix-help () (interactive) @@ -688,5 +694,4 @@ C-w Describe how there is no warranty for Calc." (provide 'calc-help) -;; arch-tag: 2d347593-7591-449e-a64a-93dab5f2f686 ;;; calc-help.el ends here diff --git a/lisp/calc/calc-incom.el b/lisp/calc/calc-incom.el index 43811721146..a9cf89e6058 100644 --- a/lisp/calc/calc-incom.el +++ b/lisp/calc/calc-incom.el @@ -1,7 +1,6 @@ ;;; calc-incom.el --- complex data type input functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -230,5 +229,4 @@ (provide 'calc-incom) -;; arch-tag: b8001270-4dc7-481b-a3e3-a952e19b390d ;;; calc-incom.el ends here diff --git a/lisp/calc/calc-keypd.el b/lisp/calc/calc-keypd.el index f0a37ad3b74..cc10d9e993c 100644 --- a/lisp/calc/calc-keypd.el +++ b/lisp/calc/calc-keypd.el @@ -1,7 +1,6 @@ ;;; calc-keypd.el --- mouse-capable keypad input for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> diff --git a/lisp/calc/calc-lang.el b/lisp/calc/calc-lang.el index 6c0a65f5567..7e3a08a1459 100644 --- a/lisp/calc/calc-lang.el +++ b/lisp/calc/calc-lang.el @@ -1,7 +1,6 @@ ;;; calc-lang.el --- calc language functions -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -2497,5 +2496,4 @@ order to Calc's." ;; coding: utf-8 ;; End: -;; arch-tag: 483bfe15-f290-4fef-bb7d-ce65be687f2e ;;; calc-lang.el ends here diff --git a/lisp/calc/calc-macs.el b/lisp/calc/calc-macs.el index 8e98699bd0d..f922687e7fa 100644 --- a/lisp/calc/calc-macs.el +++ b/lisp/calc/calc-macs.el @@ -1,7 +1,6 @@ ;;; calc-macs.el --- important macros for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -207,5 +206,4 @@ (provide 'calc-macs) -;; arch-tag: 08ba8ec2-fcff-4b80-a079-ec661bdb057e ;;; calc-macs.el ends here diff --git a/lisp/calc/calc-map.el b/lisp/calc/calc-map.el index 36df539b74e..2ea4de20293 100644 --- a/lisp/calc/calc-map.el +++ b/lisp/calc/calc-map.el @@ -1,7 +1,6 @@ ;;; calc-map.el --- higher-order functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -572,7 +571,7 @@ (and nargs forcenargs (/= nargs forcenargs) (>= nargs 0) (error "Must be a %d-argument operator" nargs))) ((memq key '(?\$ ?\')) - (let* ((arglist nil) + (let* ((math-arglist nil) (has-args nil) (record-entry nil) (expr (if (eq key ?\$) @@ -592,13 +591,13 @@ (if (> calc-dollar-used 0) (progn (setq has-args calc-dollar-used - arglist (calc-invent-args has-args)) + math-arglist (calc-invent-args has-args)) (math-multi-subst (car func) - (reverse arglist) - arglist)) + (reverse math-arglist) + math-arglist)) (if (> calc-hashes-used 0) (setq has-args calc-hashes-used - arglist (calc-invent-args has-args))) + math-arglist (calc-invent-args has-args))) (car func)))))) (if (eq (car-safe expr) 'calcFunc-lambda) (setq oper (list "$" (- (length expr) 2) expr) @@ -607,16 +606,16 @@ (progn (calc-default-formula-arglist expr) (setq record-entry t - arglist (sort arglist 'string-lessp)) + math-arglist (sort math-arglist 'string-lessp)) (if calc-verify-arglist - (setq arglist (read-from-minibuffer + (setq math-arglist (read-from-minibuffer "Function argument list: " - (if arglist - (prin1-to-string arglist) + (if math-arglist + (prin1-to-string math-arglist) "()") minibuffer-local-map t))) - (setq arglist (mapcar (function + (setq math-arglist (mapcar (function (lambda (x) (list 'var x @@ -624,10 +623,10 @@ (concat "var-" (symbol-name x)))))) - arglist)))) + math-arglist)))) (setq oper (list "$" - (length arglist) - (append '(calcFunc-lambda) arglist + (length math-arglist) + (append '(calcFunc-lambda) math-arglist (list expr))) done t)) (if record-entry @@ -1274,5 +1273,4 @@ (provide 'calc-map) -;; arch-tag: 980eac49-00e0-4870-b72a-e726b74c7990 ;;; calc-map.el ends here diff --git a/lisp/calc/calc-math.el b/lisp/calc/calc-math.el index 67d03a6ef0e..185ed18ed42 100644 --- a/lisp/calc/calc-math.el +++ b/lisp/calc/calc-math.el @@ -1,7 +1,6 @@ ;;; calc-math.el --- mathematical functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -2165,5 +2164,4 @@ If this can't be done, return NIL." (provide 'calc-math) -;; arch-tag: c7367e8e-d0b8-4f70-8577-2fb3f31dbb4c ;;; calc-math.el ends here diff --git a/lisp/calc/calc-menu.el b/lisp/calc/calc-menu.el index 055882e9075..aaddf3e486e 100644 --- a/lisp/calc/calc-menu.el +++ b/lisp/calc/calc-menu.el @@ -1,6 +1,6 @@ ;;; calc-menu.el --- a menu for Calc -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -1461,4 +1461,3 @@ (provide 'calc-menu) -;; arch-tag: 9612c86a-cd4f-4baa-ab0b-40af7344d21f diff --git a/lisp/calc/calc-misc.el b/lisp/calc/calc-misc.el index 890e624ecb4..db86c08422e 100644 --- a/lisp/calc/calc-misc.el +++ b/lisp/calc/calc-misc.el @@ -1,7 +1,6 @@ ;;; calc-misc.el --- miscellaneous functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004 -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -963,5 +962,4 @@ doing 'M-x toggle-debug-on-error', then reproducing the bug. ;; generated-autoload-file: "calc-loaddefs.el" ;; End: -;; arch-tag: 7984d9d0-62e5-41dc-afb8-e904b975f250 ;;; calc-misc.el ends here diff --git a/lisp/calc/calc-mode.el b/lisp/calc/calc-mode.el index e76866103da..856dfad882d 100644 --- a/lisp/calc/calc-mode.el +++ b/lisp/calc/calc-mode.el @@ -1,7 +1,6 @@ ;;; calc-mode.el --- calculator modes for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -677,5 +676,4 @@ (provide 'calc-mode) -;; arch-tag: ecc70eea-c712-43f2-9085-4205e58d6ddf ;;; calc-mode.el ends here diff --git a/lisp/calc/calc-mtx.el b/lisp/calc/calc-mtx.el index c79904d13ea..9941c11ff14 100644 --- a/lisp/calc/calc-mtx.el +++ b/lisp/calc/calc-mtx.el @@ -1,7 +1,6 @@ ;;; calc-mtx.el --- matrix functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -365,5 +364,4 @@ (provide 'calc-mtx) -;; arch-tag: fc0947b1-90e1-4a23-8950-d8ead9c3a306 ;;; calc-mtx.el ends here diff --git a/lisp/calc/calc-nlfit.el b/lisp/calc/calc-nlfit.el index c43a0823506..37e6f66c1b1 100644 --- a/lisp/calc/calc-nlfit.el +++ b/lisp/calc/calc-nlfit.el @@ -1,6 +1,6 @@ ;;; calc-nlfit.el --- nonlinear curve fitting for Calc -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -818,4 +818,3 @@ (provide 'calc-nlfit) -;; arch-tag: 6eba3cd6-f48b-4a84-8174-10c15a024928 diff --git a/lisp/calc/calc-poly.el b/lisp/calc/calc-poly.el index f268a032d14..e16c26eaa19 100644 --- a/lisp/calc/calc-poly.el +++ b/lisp/calc/calc-poly.el @@ -1,7 +1,6 @@ ;;; calc-poly.el --- polynomial functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -1200,5 +1199,4 @@ If no partial fraction representation can be found, return nil." (provide 'calc-poly) -;; arch-tag: d2566c51-2ccc-45f1-8c50-f3462c2953ff ;;; calc-poly.el ends here diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el index 91017627699..0d3fbe8586a 100644 --- a/lisp/calc/calc-prog.el +++ b/lisp/calc/calc-prog.el @@ -1,7 +1,6 @@ ;;; calc-prog.el --- user programmability functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -171,17 +170,17 @@ (interactive) (calc-wrapper (let* ((form (calc-top 1)) - (arglist nil) + (math-arglist nil) (is-lambda (and (eq (car-safe form) 'calcFunc-lambda) (>= (length form) 2))) odef key keyname cmd cmd-base cmd-base-default func calc-user-formula-alist is-symb) (if is-lambda - (setq arglist (mapcar (function (lambda (x) (nth 1 x))) + (setq math-arglist (mapcar (function (lambda (x) (nth 1 x))) (nreverse (cdr (reverse (cdr form))))) form (nth (1- (length form)) form)) (calc-default-formula-arglist form) - (setq arglist (sort arglist 'string-lessp))) + (setq math-arglist (sort math-arglist 'string-lessp))) (message "Define user key: z-") (setq key (read-char)) (if (= (calc-user-function-classify key) 0) @@ -267,17 +266,17 @@ (format "%05d" (% (random) 10000))))))) (if is-lambda - (setq calc-user-formula-alist arglist) + (setq calc-user-formula-alist math-arglist) (while (progn (setq calc-user-formula-alist (read-from-minibuffer "Function argument list: " - (if arglist - (prin1-to-string arglist) + (if math-arglist + (prin1-to-string math-arglist) "()") minibuffer-local-map t)) - (and (not (calc-subsetp calc-user-formula-alist arglist)) + (and (not (calc-subsetp calc-user-formula-alist math-arglist)) (not (y-or-n-p "Okay for arguments that don't appear in formula to be ignored? ")))))) (setq is-symb (and calc-user-formula-alist @@ -328,14 +327,14 @@ (setcdr kmap (cons (cons key cmd) (cdr kmap))))))) (message ""))) -(defvar arglist) ; dynamically bound in all callers +(defvar math-arglist) ; dynamically bound in all callers (defun calc-default-formula-arglist (form) (if (consp form) (if (eq (car form) 'var) - (if (or (memq (nth 1 form) arglist) + (if (or (memq (nth 1 form) math-arglist) (math-const-var form)) () - (setq arglist (cons (nth 1 form) arglist))) + (setq math-arglist (cons (nth 1 form) math-arglist))) (calc-default-formula-arglist-step (cdr form))))) (defun calc-default-formula-arglist-step (l) @@ -394,23 +393,23 @@ (intern (concat "calcFunc-" x)))))))) (comps (get func 'math-compose-forms)) entry entry2 - (arglist nil) + (math-arglist nil) (calc-user-formula-alist nil)) (if (math-zerop comp) (if (setq entry (assq calc-language comps)) (put func 'math-compose-forms (delq entry comps))) (calc-default-formula-arglist comp) - (setq arglist (sort arglist 'string-lessp)) + (setq math-arglist (sort math-arglist 'string-lessp)) (while (progn (setq calc-user-formula-alist (read-from-minibuffer "Composition argument list: " - (if arglist - (prin1-to-string arglist) + (if math-arglist + (prin1-to-string math-arglist) "()") minibuffer-local-map t)) - (and (not (calc-subsetp calc-user-formula-alist arglist)) + (and (not (calc-subsetp calc-user-formula-alist math-arglist)) (y-or-n-p "Okay for arguments that don't appear in formula to be invisible? ")))) (or (setq entry (assq calc-language comps)) @@ -2365,5 +2364,4 @@ Redefine the corresponding command." (provide 'calc-prog) -;; arch-tag: 4c5a183b-c9e5-4632-bb3f-e41a764518b0 ;;; calc-prog.el ends here diff --git a/lisp/calc/calc-rewr.el b/lisp/calc/calc-rewr.el index 8fc983a550a..1498b622e1f 100644 --- a/lisp/calc/calc-rewr.el +++ b/lisp/calc/calc-rewr.el @@ -1,7 +1,6 @@ ;;; calc-rewr.el --- rewriting functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -2108,5 +2107,4 @@ (provide 'calc-rewr) -;; arch-tag: ca8d7b7d-bff1-4535-90f3-e2241f5e786b ;;; calc-rewr.el ends here diff --git a/lisp/calc/calc-rules.el b/lisp/calc/calc-rules.el index 7f1f33a4bbe..fa57a350729 100644 --- a/lisp/calc/calc-rules.el +++ b/lisp/calc/calc-rules.el @@ -1,7 +1,6 @@ ;;; calc-rules.el --- rules for simplifying algebraic expressions in Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -445,5 +444,4 @@ fitparam(n) = x := x ]")) (provide 'calc-rules) -;; arch-tag: 0ed54a52-38f3-4ed7-9ca7-b8ecf8f2febe ;;; calc-rules.el ends here diff --git a/lisp/calc/calc-sel.el b/lisp/calc/calc-sel.el index c485fdd168a..26834a44598 100644 --- a/lisp/calc/calc-sel.el +++ b/lisp/calc/calc-sel.el @@ -1,7 +1,6 @@ ;;; calc-sel.el --- data selection functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -876,5 +875,4 @@ (provide 'calc-sel) -;; arch-tag: e5169792-777d-428f-bff5-acca66813fa2 ;;; calc-sel.el ends here diff --git a/lisp/calc/calc-stat.el b/lisp/calc/calc-stat.el index 500620f3cc6..83ce71a2376 100644 --- a/lisp/calc/calc-stat.el +++ b/lisp/calc/calc-stat.el @@ -1,7 +1,6 @@ ;;; calc-stat.el --- statistical functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -583,5 +582,4 @@ (provide 'calc-stat) -;; arch-tag: 423858e9-8513-489c-9f35-710cd9d9c307 ;;; calc-stat.el ends here diff --git a/lisp/calc/calc-store.el b/lisp/calc/calc-store.el index b82ed08c557..2da551ee215 100644 --- a/lisp/calc/calc-store.el +++ b/lisp/calc/calc-store.el @@ -1,7 +1,6 @@ ;;; calc-store.el --- value storage functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -681,5 +680,4 @@ ;; coding: utf-8 ;; End: -;; arch-tag: 2fbfec82-a521-42ca-bcd8-4f254ae6313e ;;; calc-store.el ends here diff --git a/lisp/calc/calc-stuff.el b/lisp/calc/calc-stuff.el index 103e0bb77d4..0558d8d2285 100644 --- a/lisp/calc/calc-stuff.el +++ b/lisp/calc/calc-stuff.el @@ -1,7 +1,6 @@ ;;; calc-stuff.el --- miscellaneous functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -295,5 +294,4 @@ With a prefix, push that prefix as a number onto the stack." (provide 'calc-stuff) -;; arch-tag: 789332ef-a178-49d3-8fb7-5d7ed7e21f56 ;;; calc-stuff.el ends here diff --git a/lisp/calc/calc-trail.el b/lisp/calc/calc-trail.el index 20dc1d1b99e..eec4cd2af58 100644 --- a/lisp/calc/calc-trail.el +++ b/lisp/calc/calc-trail.el @@ -1,7 +1,6 @@ ;;; calc-trail.el --- functions for manipulating the Calc "trail" -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -181,5 +180,4 @@ (provide 'calc-trail) -;; arch-tag: 59b76655-d882-4aab-a3ee-b83870e530d0 ;;; calc-trail.el ends here diff --git a/lisp/calc/calc-undo.el b/lisp/calc/calc-undo.el index 8b805f24a99..9168d9b0947 100644 --- a/lisp/calc/calc-undo.el +++ b/lisp/calc/calc-undo.el @@ -1,7 +1,6 @@ ;;; calc-undo.el --- undo functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -32,6 +31,7 @@ ;;; Undo. +;;;###autoload (defun calc-undo (n) (interactive "p") (when calc-executing-macro @@ -148,5 +148,4 @@ (provide 'calc-undo) -;; arch-tag: eeb485d2-fb3d-454a-9d79-450af1f50d6c ;;; calc-undo.el ends here diff --git a/lisp/calc/calc-units.el b/lisp/calc/calc-units.el index 8fd1983ac6d..782d2c4662d 100644 --- a/lisp/calc/calc-units.el +++ b/lisp/calc/calc-units.el @@ -1,7 +1,6 @@ ;;; calc-units.el --- unit conversion functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -296,7 +295,10 @@ ( R0 "8.314472 J/(mol K)" "Molar gas constant" nil "8.314472 J/(mol K) (*)") ( V0 "22.710981*10^(-3) m^3/mol" "Standard volume of ideal gas" nil - "22.710981 10^-3 m^3/mol (*)"))) + "22.710981 10^-3 m^3/mol (*)") + ;; Logarithmic units + ( Np nil "*Neper") + ( dB "(ln(10)/20) Np" "decibel"))) (defvar math-additional-units nil @@ -871,6 +873,7 @@ If EXPR is nil, return nil." (or (eq (nth 1 expr) 'pi) (error "Unknown name %s in defining expression for unit %s" (nth 1 expr) (car math-fbu-entry)))) + ((equal expr '(calcFunc-ln 10))) (t (error "Malformed defining expression for unit %s" (car math-fbu-entry)))))) @@ -1551,11 +1554,127 @@ If EXPR is nil, return nil." (pop-to-buffer (get-buffer "*Units Table*")) (display-buffer (get-buffer "*Units Table*"))))) +;;; Logarithmic units functions + +(defvar math-logunits '((var dB var-dB) + (var Np var-Np))) + +(defun math-extract-logunits (expr) + (if (memq (car-safe expr) '(* /)) + (cons (car expr) + (mapcar 'math-extract-logunits (cdr expr))) + (if (memq (car-safe expr) '(^)) + (list '^ (math-extract-logunits (nth 1 expr)) (nth 2 expr)) + (if (member expr math-logunits) expr 1)))) + +(defun math-logcombine (a b neg) + (let ((aunit (math-simplify (math-extract-logunits a)))) + (if (not (eq (car-safe aunit) 'var)) + (calc-record-why "*Improper logarithmic unit" aunit) + (let* ((units (math-extract-units a)) + (acoeff (math-simplify (math-remove-units a))) + (bcoeff (math-simplify (math-to-standard-units + (list '/ b units) nil)))) + (if (math-units-in-expr-p bcoeff nil) + (calc-record-why "*Inconsistent units" nil) + (if (and neg + (or (math-lessp acoeff bcoeff) + (math-equal acoeff bcoeff))) + (calc-record-why "*Improper coefficients" nil) + (math-mul + (if (equal aunit '(var dB var-dB)) + (math-mul 10 + (calcFunc-log10 + (if neg + (math-sub + (math-pow 10 (math-div acoeff 10)) + (math-pow 10 (math-div bcoeff 10))) + (math-add + (math-pow 10 (math-div acoeff 10)) + (math-pow 10 (math-div bcoeff 10)))))) + (calcFunc-ln + (if neg + (math-sub + (calcFunc-exp acoeff) + (calcFunc-exp bcoeff)) + (math-add + (calcFunc-exp acoeff) + (calcFunc-exp bcoeff))))) + units))))))) + +(defun calcFunc-luplus (a b) + (math-logcombine a b nil)) + +(defun calcFunc-luminus (a b) + (math-logcombine a b t)) + +(defun calc-luplus (arg) + (interactive "P") + (calc-slow-wrapper + (if (calc-is-inverse) + (calc-binary-op "lu-" 'calcFunc-luminus arg) + (calc-binary-op "lu+" 'calcFunc-luplus arg)))) + +(defun calc-luminus (arg) + (interactive "P") + (calc-slow-wrapper + (if (calc-is-inverse) + (calc-binary-op "lu+" 'calcFunc-luplus arg) + (calc-binary-op "lu-" 'calcFunc-luminus arg)))) + +;(defun calcFunc-lmul (a b) + + +(defun math-logunit-level (val ref power) + (let ((lunit (math-simplify (math-extract-logunits val)))) + (if (not (eq (car-safe lunit) 'var)) + (calc-record-why "*Improper logarithmic unit" lunit) + (if (not (eq 1 (math-simplify (math-extract-units (math-div val lunit))))) + (calc-record-why "*Inappropriate units" nil) + (let ((coeff (math-simplify (math-div val lunit)))) + (if (equal lunit '(var dB var-dB)) + (math-mul + ref + (math-pow + 10 + (math-div + coeff + (if power 10 20)))) + (math-mul + ref + (calcFunc-exp + (if power + (math-mul 2 coeff) + coeff))))))))) + +(defvar calc-default-field-reference-level) +(defvar calc-default-power-reference-level) + +(defun calcFunc-fieldlevel (val &optional ref) + (unless ref + (setq ref (math-read-expr calc-default-field-reference-level))) + (math-logunit-level val ref nil)) + +(defun calcFunc-powerlevel (val &optional ref) + (unless ref + (setq ref (math-read-expr calc-default-power-reference-level))) + (math-logunit-level val ref t)) + +(defun calc-level (arg) + (interactive "P") + (calc-slow-wrapper + (if (calc-is-hyperbolic) + (if (calc-is-option) + (calc-binary-op "plvl" 'calcFunc-powerlevel arg) + (calc-unary-op "plvl" 'calcFunc-powerlevel arg)) + (if (calc-is-option) + (calc-binary-op "flvl" 'calcFunc-fieldlevel arg) + (calc-unary-op "flvl" 'calcFunc-fieldlevel arg))))) + (provide 'calc-units) ;; Local variables: ;; coding: utf-8 ;; End: -;; arch-tag: e993314f-3adc-4191-be61-4ef8874881c4 ;;; calc-units.el ends here diff --git a/lisp/calc/calc-vec.el b/lisp/calc/calc-vec.el index 5b807a55491..5dfbc2d51f5 100644 --- a/lisp/calc/calc-vec.el +++ b/lisp/calc/calc-vec.el @@ -1,7 +1,6 @@ ;;; calc-vec.el --- vector functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -1675,5 +1674,4 @@ of two matrices is a matrix." (provide 'calc-vec) -;; arch-tag: 7902a7af-ec69-440a-8635-ebb4db263402 ;;; calc-vec.el ends here diff --git a/lisp/calc/calc-yank.el b/lisp/calc/calc-yank.el index 0588f31de15..2360cf00ddc 100644 --- a/lisp/calc/calc-yank.el +++ b/lisp/calc/calc-yank.el @@ -1,7 +1,6 @@ ;;; calc-yank.el --- kill-ring functionality for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index e0560465a99..83161115970 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -1,7 +1,6 @@ ;;; calc.el --- the GNU Emacs calculator -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -435,6 +434,19 @@ by displaying the sub-formula in `calc-selected-face'." :group 'calc :type 'boolean) +(defcustom calc-default-field-reference-level + "20 uPa" + "The default reference level for logarithmic units (field)." + :group 'calc + :type '(string)) + +(defcustom calc-default-power-reference-level + "mW" + "The default reference level for logarithmic units (power)." + :group 'calc + :type '(string)) + + (defface calc-nonselected-face '((t :inherit shadow :slant italic)) @@ -1061,6 +1073,7 @@ Used by `calc-user-invocation'.") (define-key map "\C-j" 'calc-over) (define-key map "\C-y" 'calc-yank) (define-key map [mouse-2] 'calc-yank) + (define-key map [remap undo] 'calc-undo) (mapc (lambda (x) (define-key map (char-to-string x) 'undefined)) "lOW") @@ -3838,5 +3851,4 @@ See Info node `(calc)Defining Functions'." ;; coding: utf-8 ;; End: -;; arch-tag: 0c3b170c-4ce6-4eaf-8d9b-5834d1fe938f ;;; calc.el ends here diff --git a/lisp/calc/calcalg2.el b/lisp/calc/calcalg2.el index 4bee751ad41..25b51fc89f6 100644 --- a/lisp/calc/calcalg2.el +++ b/lisp/calc/calcalg2.el @@ -1,7 +1,6 @@ ;;; calcalg2.el --- more algebraic functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -3669,5 +3668,4 @@ (provide 'calcalg2) -;; arch-tag: f2932ec8-dd63-418b-a542-11a644b9d4c4 ;;; calcalg2.el ends here diff --git a/lisp/calc/calcalg3.el b/lisp/calc/calcalg3.el index addc8abd158..a9118964b46 100644 --- a/lisp/calc/calcalg3.el +++ b/lisp/calc/calcalg3.el @@ -1,7 +1,6 @@ ;;; calcalg3.el --- more algebraic functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -1928,5 +1927,4 @@ (provide 'calcalg3) -;; arch-tag: ff9f2920-8111-48b5-b3fa-b0682c3e44a6 ;;; calcalg3.el ends here diff --git a/lisp/calc/calccomp.el b/lisp/calc/calccomp.el index 6923cd7693a..fa910ce2568 100644 --- a/lisp/calc/calccomp.el +++ b/lisp/calc/calccomp.el @@ -1,7 +1,6 @@ ;;; calccomp.el --- composition functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -1675,5 +1674,4 @@ ;; coding: utf-8 ;; End: -;; arch-tag: 7c45d10a-a286-4dab-af49-7ae8989fbf78 ;;; calccomp.el ends here diff --git a/lisp/calc/calcsel2.el b/lisp/calc/calcsel2.el index e8fd20b7c27..f44da07763f 100644 --- a/lisp/calc/calcsel2.el +++ b/lisp/calc/calcsel2.el @@ -1,7 +1,6 @@ ;;; calcsel2.el --- selection functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -300,5 +299,4 @@ (provide 'calcsel2) -;; arch-tag: 7c5b8d65-b8f0-45d9-820d-9930f8ee114b ;;; calcsel2.el ends here diff --git a/lisp/calculator.el b/lisp/calculator.el index d03b2082bdb..45ed699c4f5 100644 --- a/lisp/calculator.el +++ b/lisp/calculator.el @@ -1,7 +1,6 @@ ;;; calculator.el --- a [not so] simple calculator for Emacs -;; Copyright (C) 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998, 2000-2011 Free Software Foundation, Inc. ;; Author: Eli Barzilay <eli@barzilay.org> ;; Keywords: tools, convenience @@ -382,10 +381,7 @@ Used for repeating operations in calculator-repR/L.") ;;;--------------------------------------------------------------------- ;;; Key bindings -(defvar calculator-mode-map nil - "The calculator key map.") - -(or calculator-mode-map +(defvar calculator-mode-map (let ((map (make-sparse-keymap))) (suppress-keymap map t) (define-key map "i" nil) @@ -471,113 +467,114 @@ Used for repeating operations in calculator-repR/L.") ("Binary" bin "B") ("Octal" oct "O") ("Hexadecimal" hex "H")))) - (op '(lambda (name key) - `[,name (calculator-op ,key) :keys ,key]))) + (op (lambda (name key) + `[,name (calculator-op ,key) :keys ,key]))) (easy-menu-define - calculator-menu map "Calculator menu." - `("Calculator" - ["Help" - (let ((last-command 'calculator-help)) (calculator-help)) - :keys "?"] - "---" - ["Copy" calculator-copy] - ["Paste" calculator-paste] - "---" - ["Electric mode" - (progn (calculator-quit) - (setq calculator-restart-other-mode t) - (run-with-timer 0.1 nil '(lambda () (message nil))) - ;; the message from the menu will be visible, - ;; couldn't make it go away... - (calculator)) - :active (not calculator-electric-mode)] - ["Normal mode" - (progn (setq calculator-restart-other-mode t) - (calculator-quit)) - :active calculator-electric-mode] - "---" - ("Functions" - ,(funcall op "Repeat-right" ">") - ,(funcall op "Repeat-left" "<") - "------General------" - ,(funcall op "Reciprocal" ";") - ,(funcall op "Log" "L") - ,(funcall op "Square-root" "Q") - ,(funcall op "Factorial" "!") - "------Trigonometric------" - ,(funcall op "Sinus" "S") - ,(funcall op "Cosine" "C") - ,(funcall op "Tangent" "T") - ,(funcall op "Inv-Sinus" "IS") - ,(funcall op "Inv-Cosine" "IC") - ,(funcall op "Inv-Tangent" "IT") - "------Bitwise------" - ,(funcall op "Or" "|") - ,(funcall op "Xor" "#") - ,(funcall op "And" "&") - ,(funcall op "Not" "~")) - ("Saved List" - ["Eval+Save" calculator-save-on-list] - ["Prev number" calculator-saved-up] - ["Next number" calculator-saved-down] - ["Delete current" calculator-clear - :active (and calculator-display-fragile - calculator-saved-list - (= (car calculator-stack) - (nth calculator-saved-ptr - calculator-saved-list)))] - ["Delete all" calculator-clear-saved] + calculator-menu map "Calculator menu." + `("Calculator" + ["Help" + (let ((last-command 'calculator-help)) (calculator-help)) + :keys "?"] "---" - ,(funcall op "List-total" "l") - ,(funcall op "List-average" "v")) - ("Registers" - ["Get register" calculator-get-register] - ["Set register" calculator-set-register]) - ("Modes" - ["Radians" - (progn - (and (or calculator-input-radix calculator-output-radix) - (calculator-radix-mode "D")) - (and calculator-deg (calculator-dec/deg-mode))) - :keys "D" - :style radio - :selected (not (or calculator-input-radix - calculator-output-radix - calculator-deg))] - ["Degrees" - (progn - (and (or calculator-input-radix calculator-output-radix) - (calculator-radix-mode "D")) - (or calculator-deg (calculator-dec/deg-mode))) - :keys "D" - :style radio - :selected (and calculator-deg - (not (or calculator-input-radix - calculator-output-radix)))] + ["Copy" calculator-copy] + ["Paste" calculator-paste] "---" - ,@(mapcar 'car radix-selectors) - ("Separate I/O" - ,@(mapcar (lambda (x) (nth 1 x)) radix-selectors) + ["Electric mode" + (progn (calculator-quit) + (setq calculator-restart-other-mode t) + (run-with-timer 0.1 nil '(lambda () (message nil))) + ;; the message from the menu will be visible, + ;; couldn't make it go away... + (calculator)) + :active (not calculator-electric-mode)] + ["Normal mode" + (progn (setq calculator-restart-other-mode t) + (calculator-quit)) + :active calculator-electric-mode] + "---" + ("Functions" + ,(funcall op "Repeat-right" ">") + ,(funcall op "Repeat-left" "<") + "------General------" + ,(funcall op "Reciprocal" ";") + ,(funcall op "Log" "L") + ,(funcall op "Square-root" "Q") + ,(funcall op "Factorial" "!") + "------Trigonometric------" + ,(funcall op "Sinus" "S") + ,(funcall op "Cosine" "C") + ,(funcall op "Tangent" "T") + ,(funcall op "Inv-Sinus" "IS") + ,(funcall op "Inv-Cosine" "IC") + ,(funcall op "Inv-Tangent" "IT") + "------Bitwise------" + ,(funcall op "Or" "|") + ,(funcall op "Xor" "#") + ,(funcall op "And" "&") + ,(funcall op "Not" "~")) + ("Saved List" + ["Eval+Save" calculator-save-on-list] + ["Prev number" calculator-saved-up] + ["Next number" calculator-saved-down] + ["Delete current" calculator-clear + :active (and calculator-display-fragile + calculator-saved-list + (= (car calculator-stack) + (nth calculator-saved-ptr + calculator-saved-list)))] + ["Delete all" calculator-clear-saved] + "---" + ,(funcall op "List-total" "l") + ,(funcall op "List-average" "v")) + ("Registers" + ["Get register" calculator-get-register] + ["Set register" calculator-set-register]) + ("Modes" + ["Radians" + (progn + (and (or calculator-input-radix calculator-output-radix) + (calculator-radix-mode "D")) + (and calculator-deg (calculator-dec/deg-mode))) + :keys "D" + :style radio + :selected (not (or calculator-input-radix + calculator-output-radix + calculator-deg))] + ["Degrees" + (progn + (and (or calculator-input-radix calculator-output-radix) + (calculator-radix-mode "D")) + (or calculator-deg (calculator-dec/deg-mode))) + :keys "D" + :style radio + :selected (and calculator-deg + (not (or calculator-input-radix + calculator-output-radix)))] "---" - ,@(mapcar (lambda (x) (nth 2 x)) radix-selectors))) - ("Decimal Display" - ,@(mapcar (lambda (d) - (vector (cadr d) - ;; Note: inserts actual object here - `(calculator-rotate-displayer ',d))) - calculator-displayers) + ,@(mapcar 'car radix-selectors) + ("Separate I/O" + ,@(mapcar (lambda (x) (nth 1 x)) radix-selectors) + "---" + ,@(mapcar (lambda (x) (nth 2 x)) radix-selectors))) + ("Decimal Display" + ,@(mapcar (lambda (d) + (vector (cadr d) + ;; Note: inserts actual object here + `(calculator-rotate-displayer ',d))) + calculator-displayers) + "---" + ["Change Prev Display" calculator-displayer-prev] + ["Change Next Display" calculator-displayer-next]) "---" - ["Change Prev Display" calculator-displayer-prev] - ["Change Next Display" calculator-displayer-next]) - "---" - ["Copy+Quit" calculator-save-and-quit] - ["Quit" calculator-quit])))) - (setq calculator-mode-map map))) + ["Copy+Quit" calculator-save-and-quit] + ["Quit" calculator-quit])))) + map) + "The calculator key map.") ;;;--------------------------------------------------------------------- ;;; Startup and mode stuff -(defun calculator-mode () +(define-derived-mode calculator-mode fundamental-mode "Calculator" ;; this help is also used as the major help screen "A [not so] simple calculator for Emacs. @@ -671,13 +668,7 @@ Some interesting customization variables are: See the documentation for these variables, and \"calculator.el\" for more information. -\\{calculator-mode-map}" - (interactive) - (kill-all-local-variables) - (setq major-mode 'calculator-mode) - (setq mode-name "Calculator") - (use-local-map calculator-mode-map) - (run-mode-hooks 'calculator-mode-hook)) +\\{calculator-mode-map}") (eval-when-compile (require 'electric) (require 'ehelp)) @@ -1832,5 +1823,4 @@ To use this, apply a binary operator (evaluate it), then call this." (provide 'calculator) -;; arch-tag: a1b9766c-af8a-4a74-b466-65ad8eeb0c73 ;;; calculator.el ends here diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el index d6f4f9862d6..c0f4f0f3929 100644 --- a/lisp/calendar/appt.el +++ b/lisp/calendar/appt.el @@ -1,7 +1,7 @@ ;;; appt.el --- appointment notification functions -;; Copyright (C) 1989, 1990, 1994, 1998, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1989-1990, 1994, 1998, 2001-2011 +;; Free Software Foundation, Inc. ;; Author: Neil Mager <neilm@juliet.ll.mit.edu> ;; Maintainer: Glenn Morris <rgm@gnu.org> diff --git a/lisp/calendar/cal-bahai.el b/lisp/calendar/cal-bahai.el index 7b8f61a7a84..ae5dc02862d 100644 --- a/lisp/calendar/cal-bahai.el +++ b/lisp/calendar/cal-bahai.el @@ -1,7 +1,6 @@ ;;; cal-bahai.el --- calendar functions for the Bahá'à calendar. -;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2001-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> ;; Keywords: calendar @@ -361,5 +360,4 @@ Prefix argument ARG will make the entry nonmarking." ;; coding: utf-8 ;; End: -;; arch-tag: c1cb1d67-862a-4264-a01c-41cb4df01f14 ;;; cal-bahai.el ends here diff --git a/lisp/calendar/cal-china.el b/lisp/calendar/cal-china.el index 0fc63e7eaac..fce398709ad 100644 --- a/lisp/calendar/cal-china.el +++ b/lisp/calendar/cal-china.el @@ -1,7 +1,6 @@ ;;; cal-china.el --- calendar functions for the Chinese calendar -;; Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995, 1997, 2001-2011 Free Software Foundation, Inc. ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> ;; Maintainer: Glenn Morris <rgm@gnu.org> @@ -686,5 +685,4 @@ Echo Chinese date unless NOECHO is non-nil." (provide 'cal-china) -;; arch-tag: 7e5b7e0d-676c-47e3-8696-93e7ea0ab644 ;;; cal-china.el ends here diff --git a/lisp/calendar/cal-coptic.el b/lisp/calendar/cal-coptic.el index 69612edab38..4db2743777f 100644 --- a/lisp/calendar/cal-coptic.el +++ b/lisp/calendar/cal-coptic.el @@ -1,7 +1,6 @@ ;;; cal-coptic.el --- calendar functions for the Coptic/Ethiopic calendars -;; Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995, 1997, 2001-2011 Free Software Foundation, Inc. ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> ;; Maintainer: Glenn Morris <rgm@gnu.org> @@ -269,5 +268,4 @@ Echo Ethiopic date unless NOECHO is t." (provide 'cal-coptic) -;; arch-tag: 72d49161-25df-4072-9312-b182cdca7627 ;;; cal-coptic.el ends here diff --git a/lisp/calendar/cal-dst.el b/lisp/calendar/cal-dst.el index d27bc8480a7..e915f7e2696 100644 --- a/lisp/calendar/cal-dst.el +++ b/lisp/calendar/cal-dst.el @@ -1,7 +1,6 @@ ;;; cal-dst.el --- calendar functions for daylight saving rules -;; Copyright (C) 1993, 1994, 1995, 1996, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993-1996, 2001-2011 Free Software Foundation, Inc. ;; Author: Paul Eggert <eggert@twinsun.com> ;; Edward M. Reingold <reingold@cs.uiuc.edu> @@ -474,5 +473,4 @@ Conversion to daylight saving time is done according to (provide 'cal-dst) -;; arch-tag: a141d204-213c-4ca5-bdc6-f9df3aa92aad ;;; cal-dst.el ends here diff --git a/lisp/calendar/cal-french.el b/lisp/calendar/cal-french.el index 98a118f232f..ef1ce8767ab 100644 --- a/lisp/calendar/cal-french.el +++ b/lisp/calendar/cal-french.el @@ -1,7 +1,6 @@ ;;; cal-french.el --- calendar functions for the French Revolutionary calendar -;; Copyright (C) 1988, 1989, 1992, 1994, 1995, 1997, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 1988-1989, 1992, 1994-1995, 1997, 2001-2011 ;; Free Software Foundation, Inc. ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> @@ -270,5 +269,4 @@ Echo French Revolutionary date unless NOECHO is non-nil." ;; coding: utf-8 ;; End: -;; arch-tag: 7e8045a3-8609-46b5-9cde-cf40ce541cf9 ;;; cal-french.el ends here diff --git a/lisp/calendar/cal-hebrew.el b/lisp/calendar/cal-hebrew.el index 366fb2396fc..f2dfc3c51fe 100644 --- a/lisp/calendar/cal-hebrew.el +++ b/lisp/calendar/cal-hebrew.el @@ -1,7 +1,6 @@ ;;; cal-hebrew.el --- calendar functions for the Hebrew calendar -;; Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995, 1997, 2001-2011 Free Software Foundation, Inc. ;; Author: Nachum Dershowitz <nachum@cs.uiuc.edu> ;; Edward M. Reingold <reingold@cs.uiuc.edu> diff --git a/lisp/calendar/cal-html.el b/lisp/calendar/cal-html.el index d4210027600..bd10aa176ae 100644 --- a/lisp/calendar/cal-html.el +++ b/lisp/calendar/cal-html.el @@ -1,7 +1,6 @@ ;;; cal-html.el --- functions for printing HTML calendars -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Author: Anna M. Bigatti <bigatti@dima.unige.it> ;; Keywords: calendar @@ -443,5 +442,4 @@ specified by EVENT. Note that any existing output files are overwritten." (provide 'cal-html) -;; arch-tag: 4e73377d-d2c1-46ea-a103-02c111da5f57 ;;; cal-html.el ends here diff --git a/lisp/calendar/cal-islam.el b/lisp/calendar/cal-islam.el index da631a9710a..e69a2389e6c 100644 --- a/lisp/calendar/cal-islam.el +++ b/lisp/calendar/cal-islam.el @@ -1,7 +1,6 @@ ;;; cal-islam.el --- calendar functions for the Islamic calendar -;; Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995, 1997, 2001-2011 Free Software Foundation, Inc. ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> ;; Maintainer: Glenn Morris <rgm@gnu.org> @@ -345,5 +344,4 @@ Prefix argument ARG makes the entry nonmarking." (provide 'cal-islam) -;; arch-tag: a951b6c1-6f47-48d5-bac3-1b505cd719f7 ;;; cal-islam.el ends here diff --git a/lisp/calendar/cal-iso.el b/lisp/calendar/cal-iso.el index 3c5055defb6..e745b6264e0 100644 --- a/lisp/calendar/cal-iso.el +++ b/lisp/calendar/cal-iso.el @@ -1,7 +1,6 @@ ;;; cal-iso.el --- calendar functions for the ISO calendar -;; Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995, 1997, 2001-2011 Free Software Foundation, Inc. ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> ;; Maintainer: Glenn Morris <rgm@gnu.org> @@ -155,5 +154,4 @@ Interactively, goes to the first day of the specified week." (provide 'cal-iso) -;; arch-tag: 3c0154cc-d30f-4981-9f60-42bdf7a468f6 ;;; cal-iso.el ends here diff --git a/lisp/calendar/cal-julian.el b/lisp/calendar/cal-julian.el index 0cf9388a4b0..e0f85b36d44 100644 --- a/lisp/calendar/cal-julian.el +++ b/lisp/calendar/cal-julian.el @@ -1,7 +1,6 @@ ;;; cal-julian.el --- calendar functions for the Julian calendar -;; Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995, 1997, 2001-2011 Free Software Foundation, Inc. ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> ;; Maintainer: Glenn Morris <rgm@gnu.org> @@ -218,5 +217,4 @@ Echo astronomical (Julian) day number unless NOECHO is non-nil." (provide 'cal-julian) -;; arch-tag: 0520acdd-1c60-4188-9aa8-9b8c24d856ae ;;; cal-julian.el ends here diff --git a/lisp/calendar/cal-mayan.el b/lisp/calendar/cal-mayan.el index d2e4810fa82..283c68cb32d 100644 --- a/lisp/calendar/cal-mayan.el +++ b/lisp/calendar/cal-mayan.el @@ -1,7 +1,7 @@ ;;; cal-mayan.el --- calendar functions for the Mayan calendars -;; Copyright (C) 1992, 1993, 1995, 1997, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1992-1993, 1995, 1997, 2001-2011 +;; Free Software Foundation, Inc. ;; Author: Stewart M. Clamen <clamen@cs.cmu.edu> ;; Edward M. Reingold <reingold@cs.uiuc.edu> @@ -390,5 +390,4 @@ Echo Mayan date unless NOECHO is non-nil." (provide 'cal-mayan) -;; arch-tag: 54f35144-cd0f-4873-935a-a60129de07df ;;; cal-mayan.el ends here diff --git a/lisp/calendar/cal-menu.el b/lisp/calendar/cal-menu.el index 877be9556fb..3ebb7edab3f 100644 --- a/lisp/calendar/cal-menu.el +++ b/lisp/calendar/cal-menu.el @@ -1,7 +1,6 @@ ;;; cal-menu.el --- calendar functions for menu bar and popup menu support -;; Copyright (C) 1994, 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994-1995, 2001-2011 Free Software Foundation, Inc. ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> ;; Lara Rios <lrios@coewl.cen.uiuc.edu> @@ -281,5 +280,4 @@ is non-nil." (provide 'cal-menu) -;; arch-tag: aa81cf73-ce89-48a4-97ec-9ef861e87fe9 ;;; cal-menu.el ends here diff --git a/lisp/calendar/cal-move.el b/lisp/calendar/cal-move.el index e569e8c424c..c13a9a0a73a 100644 --- a/lisp/calendar/cal-move.el +++ b/lisp/calendar/cal-move.el @@ -1,7 +1,6 @@ ;;; cal-move.el --- calendar functions for movement in the calendar -;; Copyright (C) 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1995, 2001-2011 Free Software Foundation, Inc. ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> ;; Maintainer: Glenn Morris <rgm@gnu.org> @@ -406,5 +405,4 @@ Negative DAY counts backward from end of year." (provide 'cal-move) -;; arch-tag: d0883c46-7e16-4914-8ff8-8f67e699b781 ;;; cal-move.el ends here diff --git a/lisp/calendar/cal-persia.el b/lisp/calendar/cal-persia.el index 5c624ddcf01..a8b3f180e0f 100644 --- a/lisp/calendar/cal-persia.el +++ b/lisp/calendar/cal-persia.el @@ -1,7 +1,6 @@ ;;; cal-persia.el --- calendar functions for the Persian calendar -;; Copyright (C) 1996, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-1997, 2001-2011 Free Software Foundation, Inc. ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> ;; Maintainer: Glenn Morris <rgm@gnu.org> @@ -218,5 +217,4 @@ Echo Persian date unless NOECHO is non-nil." (provide 'cal-persia) -;; arch-tag: 2832383c-e4b4-4dc2-8ee9-cfbdd53e5e2d ;;; cal-persia.el ends here diff --git a/lisp/calendar/cal-tex.el b/lisp/calendar/cal-tex.el index e6ba1ad3439..a3f71107854 100644 --- a/lisp/calendar/cal-tex.el +++ b/lisp/calendar/cal-tex.el @@ -1,7 +1,6 @@ ;;; cal-tex.el --- calendar functions for printing calendars with LaTeX -;; Copyright (C) 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995, 2001-2011 Free Software Foundation, Inc. ;; Author: Steve Fisk <fisk@bowdoin.edu> ;; Edward M. Reingold <reingold@cs.uiuc.edu> @@ -1832,5 +1831,4 @@ Add trailing COMMENT if present." (provide 'cal-tex) -;; arch-tag: ca8168a4-5a00-4508-a565-17e3bccce6d0 ;;; cal-tex.el ends here diff --git a/lisp/calendar/cal-x.el b/lisp/calendar/cal-x.el index 377646147b9..e95d284a36b 100644 --- a/lisp/calendar/cal-x.el +++ b/lisp/calendar/cal-x.el @@ -1,7 +1,6 @@ ;;; cal-x.el --- calendar windows in dedicated frames -;; Copyright (C) 1994, 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994-1995, 2001-2011 Free Software Foundation, Inc. ;; Author: Michael Kifer <kifer@cs.sunysb.edu> ;; Edward M. Reingold <reingold@cs.uiuc.edu> @@ -189,5 +188,4 @@ See `calendar-frame-setup' for more information." (provide 'cal-x) -;; arch-tag: c6dbddca-ae84-442d-87fc-244b76e38e17 ;;; cal-x.el ends here diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 24ebb19a58b..a4e53670530 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -1,8 +1,6 @@ ;;; calendar.el --- calendar functions -;; Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1997, -;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1988-1995, 1997, 2000-2011 Free Software Foundation, Inc. ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> ;; Maintainer: Glenn Morris <rgm@gnu.org> diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 231c92f417d..0bbdeccee60 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -1,7 +1,6 @@ ;;; diary-lib.el --- diary functions -;; Copyright (C) 1989, 1990, 1992, 1993, 1994, 1995, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 1989-1990, 1992-1995, 2001-2011 ;; Free Software Foundation, Inc. ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> @@ -1764,7 +1763,7 @@ best if they are non-marking." (forward-line 1) (while (looking-at "[ \t]") (forward-line 1)) - (backward-char 1) + (if (bolp) (backward-char 1)) (setq entry (buffer-substring-no-properties entry-start (point)))) (setq diary-entry (diary-sexp-entry sexp entry date) literal entry ; before evaluation @@ -2346,6 +2345,9 @@ return a font-lock pattern matching array of MONTHS and marking SYMBOL." '(diary-font-lock-keywords t)) (add-to-invisibility-spec '(diary . nil)) (add-hook 'after-save-hook 'diary-redraw-calendar nil t) + ;; In case the file was modified externally, refresh the calendar + ;; after refreshing the diary buffer. + (add-hook 'after-revert-hook 'diary-redraw-calendar nil t) (if diary-header-line-flag (setq header-line-format diary-header-line-format))) diff --git a/lisp/calendar/holidays.el b/lisp/calendar/holidays.el index 275c8a5ca29..19b893a5cf9 100644 --- a/lisp/calendar/holidays.el +++ b/lisp/calendar/holidays.el @@ -1,7 +1,6 @@ ;;; holidays.el --- holiday functions for the calendar package -;; Copyright (C) 1989, 1990, 1992, 1993, 1994, 1997, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 1989-1990, 1992-1994, 1997, 2001-2011 ;; Free Software Foundation, Inc. ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el index 0be138906b6..ca88548138b 100644 --- a/lisp/calendar/icalendar.el +++ b/lisp/calendar/icalendar.el @@ -1,7 +1,6 @@ ;;; icalendar.el --- iCalendar implementation -*-coding: utf-8 -*- -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Author: Ulf Jasper <ulf.jasper@web.de> ;; Created: August 2002 @@ -2295,5 +2294,4 @@ the entry." (provide 'icalendar) -;; arch-tag: 74fdbe8e-0451-4e38-bb61-4416e822f4fc ;;; icalendar.el ends here diff --git a/lisp/calendar/lunar.el b/lisp/calendar/lunar.el index 58111a036d1..e2ec46215be 100644 --- a/lisp/calendar/lunar.el +++ b/lisp/calendar/lunar.el @@ -1,7 +1,7 @@ ;;; lunar.el --- calendar functions for phases of the moon -;; Copyright (C) 1992, 1993, 1995, 1997, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1992-1993, 1995, 1997, 2001-2011 +;; Free Software Foundation, Inc. ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> ;; Maintainer: Glenn Morris <rgm@gnu.org> @@ -408,5 +408,4 @@ as governed by the values of `calendar-daylight-savings-starts', (provide 'lunar) -;; arch-tag: 72f0b8a4-7bcc-4a1b-b67a-ff53c4a1d222 ;;; lunar.el ends here diff --git a/lisp/calendar/parse-time.el b/lisp/calendar/parse-time.el index 71e32b9db4c..52f13c82f5a 100644 --- a/lisp/calendar/parse-time.el +++ b/lisp/calendar/parse-time.el @@ -1,7 +1,6 @@ ;;; parse-time.el --- parsing time strings -;; Copyright (C) 1996, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996, 2000-2011 Free Software Foundation, Inc. ;; Author: Erik Naggum <erik@naggum.no> ;; Keywords: util diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el index b7a728461f0..31aed0484d7 100644 --- a/lisp/calendar/solar.el +++ b/lisp/calendar/solar.el @@ -1,7 +1,7 @@ ;;; solar.el --- calendar functions for solar events -;; Copyright (C) 1992, 1993, 1995, 1997, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1992-1993, 1995, 1997, 2001-2011 +;; Free Software Foundation, Inc. ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> ;; Denis B. Roegel <Denis.Roegel@loria.fr> @@ -1065,5 +1065,4 @@ Requires floating point." (provide 'solar) -;; arch-tag: bc0ff693-df58-4666-bde4-2a7837ccb8fe ;;; solar.el ends here diff --git a/lisp/calendar/time-date.el b/lisp/calendar/time-date.el index 1bd04d7ed3b..a1bfad3a5f5 100644 --- a/lisp/calendar/time-date.el +++ b/lisp/calendar/time-date.el @@ -1,7 +1,6 @@ ;;; time-date.el --- Date and time handling functions -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Masanobu Umeda <umerin@mse.kyutech.ac.jp> diff --git a/lisp/calendar/timeclock.el b/lisp/calendar/timeclock.el index d28b0a56c3f..49c44449b0c 100644 --- a/lisp/calendar/timeclock.el +++ b/lisp/calendar/timeclock.el @@ -1,7 +1,6 @@ ;;; timeclock.el --- mode for keeping track of how much you work -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> ;; Created: 25 Mar 1999 diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el index 8fd41163eaf..4c59e2634ae 100644 --- a/lisp/calendar/todo-mode.el +++ b/lisp/calendar/todo-mode.el @@ -1,7 +1,6 @@ ;;; todo-mode.el --- major mode for editing TODO list files -;; Copyright (C) 1997, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997, 1999, 2001-2011 Free Software Foundation, Inc. ;; Author: Oliver Seidel <privat@os10000.net> ;; Maintainer: Stephen Berman <stephen.berman@gmx.net> @@ -973,5 +972,4 @@ If INCLUDE-SEP is non-nil, return point after the separator." (provide 'todo-mode) -;; arch-tag: 6fd91be5-776e-4464-a109-da4ea0e4e497 ;;; todo-mode.el ends here diff --git a/lisp/case-table.el b/lisp/case-table.el index 1e5974d7d1a..a1bb862788e 100644 --- a/lisp/case-table.el +++ b/lisp/case-table.el @@ -1,7 +1,6 @@ ;;; case-table.el --- code to extend the character set and support case tables -;; Copyright (C) 1988, 1994, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1988, 1994, 2001-2011 Free Software Foundation, Inc. ;; Author: Howard Gayle ;; Maintainer: FSF @@ -175,5 +174,4 @@ SYNTAX should be \" \", \"w\", \".\" or \"_\"." (provide 'case-table) -;; arch-tag: 3c2cf885-2c9a-449a-9972-2e269191896d ;;; case-table.el ends here diff --git a/lisp/cdl.el b/lisp/cdl.el index 01f4d9ac644..8377e7a5796 100644 --- a/lisp/cdl.el +++ b/lisp/cdl.el @@ -1,7 +1,6 @@ ;;; cdl.el --- Common Data Language (CDL) utility functions for GNU Emacs -;; Copyright (C) 1993, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993, 2001-2011 Free Software Foundation, Inc. ;; Author: ATAE@spva.physics.imperial.ac.uk (Ata Etemadi) ;; Maintainer: FSF @@ -45,5 +44,4 @@ (provide 'cdl) -;; arch-tag: b8e95a6e-2387-4077-ad9a-af54b09b8615 ;;; cdl.el ends here diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog index efe7e4d4255..b6d5cff6b51 100644 --- a/lisp/cedet/ChangeLog +++ b/lisp/cedet/ChangeLog @@ -1,3 +1,9 @@ +2011-01-13 Stefan Monnier <monnier@iro.umontreal.ca> + + * srecode/srt-mode.el (srecode-template-mode): Use define-derived-mode. + * semantic/symref/list.el (semantic-symref-results-mode): + Use run-mode-hooks. + 2010-11-12 Glenn Morris <rgm@gnu.org> * semantic/wisent/comp.el: Remove unnecessary eval-when-compiles. @@ -60,8 +66,8 @@ * semantic/db-typecache.el (semanticdb-typecache-find-default): * semantic/imenu.el (semantic-create-imenu-index): * semantic/grammar.el (semantic--grammar-macro-function-tag): - * semantic/fw.el (semanticdb-without-unloaded-file-searches): Fix - require. Suggested by David Engster. + * semantic/fw.el (semanticdb-without-unloaded-file-searches): + Fix require. Suggested by David Engster. * semantic/bovine/c-by.el: Regenerate. @@ -105,8 +111,8 @@ * srecode/texi.el (srecode-texi-insert-tag-as-doc): New function. (semantic-insert-foreign-tag): Use it. - * srecode/mode.el (srecode-bind-insert): Call - srecode-load-tables-for-mode. + * srecode/mode.el (srecode-bind-insert): + Call srecode-load-tables-for-mode. (srecode-minor-mode-templates-menu): Do not list templates that are not in the current project. (srecode-menu-bar): Add binding for srecode-macro-help. @@ -159,8 +165,8 @@ compare of built-in templates. Give built-ins lower piority. Support special variable "project". (srecode-compile-template-table): Set :project slot of new tables. - (srecode-compile-one-template-tag): Use - srecode-create-dictionaries-from-tags. + (srecode-compile-one-template-tag): + Use srecode-create-dictionaries-from-tags. 2010-09-21 Eric Ludlam <zappo@gnu.org> @@ -210,8 +216,8 @@ (autoconf-new-automake-string): Deleted. (autoconf-new-program): Use SRecode to fill an empty file. - * ede/cpp-root.el (ede-create-lots-of-projects-under-dir): New - function. + * ede/cpp-root.el (ede-create-lots-of-projects-under-dir): + New function. * ede/files.el (ede-flush-project-hash): New command. (ede-convert-path): Add optional PROJECT arg. @@ -232,8 +238,8 @@ list whether or not the vars are already in the Makefile. (ede-pmake-insert-variable-once): New macro. - * ede/project-am.el (project-am-with-makefile-current): Add - recentf-exclude. + * ede/project-am.el (project-am-with-makefile-current): + Add recentf-exclude. (project-am-load-makefile): Obey an optional suggested name. (project-am-expand-subdirlist): New function. (project-am-makefile::project-rescan): Use it. Combine SUBDIRS @@ -248,16 +254,16 @@ (project-am-extract-package-info): Fix separators. * ede/proj.el (project-run-target): New method. - (project-make-dist, project-compile-project): Use - ede-proj-automake-p to determine which kind of compile to use. + (project-make-dist, project-compile-project): + Use ede-proj-automake-p to determine which kind of compile to use. (project-rescan): Call ede-load-project-file. (ede-buffer-mine): Add more file names that belong to the project. (ede-proj-compilers): Improve error message. * ede/proj-obj.el (ede-ld-linker): Use the LDDEPS variable. (ede-source-c++): Add more C++ extensions. - (ede-proj-target-makefile-objectcode): Quote initforms. Support - lex and yacc. + (ede-proj-target-makefile-objectcode): Quote initforms. + Support lex and yacc. * ede/proj-prog.el (ede-proj-makefile-insert-rules): Removed. (ede-proj-makefile-insert-variables): New, add LDDEPS. @@ -267,8 +273,8 @@ they show up in the same order as in the command line. (ede-proj-target-makefile-program): Add ldlibs-local slot. - * ede/proj-shared.el (ede-g++-libtool-shared-compiler): Fix - inference rule to use cpp files. + * ede/proj-shared.el (ede-g++-libtool-shared-compiler): + Fix inference rule to use cpp files. (ede-proj-target-makefile-shared-object): Quote initforms. * ede/proj-misc.el (ede-proj-target-makefile-miscelaneous): @@ -327,8 +333,8 @@ (semantic-analyze-scoped-inherited-tag-map): Take the tag we are looking for as part of the scoped tags list. - * semantic/html.el (semantic-default-html-setup): Add - senator-step-at-tag-classes. + * semantic/html.el (semantic-default-html-setup): + Add senator-step-at-tag-classes. * semantic/decorate/include.el (semantic-decoration-on-unknown-includes): Change light bgcolor. @@ -355,8 +361,8 @@ * semantic/util.el (semantic-hack-search) (semantic-recursive-find-nonterminal-by-name) (semantic-current-tag-interactive): Deleted. - (semantic-describe-buffer): Fix expand-nonterminal. Add - lex-syntax-mods, type relation separator char, and command + (semantic-describe-buffer): Fix expand-nonterminal. + Add lex-syntax-mods, type relation separator char, and command separation char. (semantic-sanity-check): Only message if called interactively. @@ -372,8 +378,8 @@ * semantic/idle.el: Add breadcrumbs support. (semantic-idle-summary-current-symbol-info-default) (semantic-idle-tag-highlight) - (semantic-idle-completion-list-default): Use - semanticdb-without-unloaded-file-searches for speed, and to + (semantic-idle-completion-list-default): + Use semanticdb-without-unloaded-file-searches for speed, and to conform to the controls that specify if the idle timer is supposed to be parsing unparsed includes. (semantic-idle-symbol-highlight-face) @@ -448,8 +454,8 @@ (semantic-analyze-find-tag-sequence-default): Be robust to calculated scopes being nil. - * semantic/bovine/c.el (semantic-c-describe-environment): Add - project macro symbol array. + * semantic/bovine/c.el (semantic-c-describe-environment): + Add project macro symbol array. (semantic-c-parse-lexical-token): Add recursion limit. (semantic-ctxt-imported-packages, semanticdb-expand-nested-tag): New overrides. @@ -458,8 +464,8 @@ (semantic-expand-c-tag-namelist): Do not split out a typedef'd inline type if it is an anonymous type. (semantic-c-reconstitute-token): Use the optional initializers as - a clue that some function is probably a constructor. When - defining the type of these constructors, split the parent name, + a clue that some function is probably a constructor. + When defining the type of these constructors, split the parent name, and use only the class part, if applicable. * semantic/bovine/c-by.el: @@ -594,8 +600,8 @@ * semantic/db-find.el (semanticdb-find-translate-path-brutish-default): - * ede/make.el (ede-make-check-version): Use - with-current-buffer instead of save-excursion. + * ede/make.el (ede-make-check-version): + Use with-current-buffer instead of save-excursion. 2010-02-24 Eduard Wiebe <usenet@pusto.de> @@ -783,8 +789,8 @@ * ede.el (ede-apply-preprocessor-map): Accept lists of ede-objects as targets. - * ede/pmake.el (ede-proj-makefile-insert-variables): Output - a target's object list even if compiler vars are already in the + * ede/pmake.el (ede-proj-makefile-insert-variables): + Output a target's object list even if compiler vars are already in the Makefile. * ede/emacs.el (ede-preprocessor-map): Add config.h to the @@ -880,8 +886,8 @@ 2009-11-08 Chong Yidong <cyd@stupidchicken.com> - * semantic/ctxt.el (semantic-get-local-variables): Disable - the progress reporter entirely. + * semantic/ctxt.el (semantic-get-local-variables): + Disable the progress reporter entirely. 2009-11-03 Stefan Monnier <monnier@iro.umontreal.ca> @@ -1511,3 +1517,24 @@ * inversion.el: * mode-local.el: * pulse.el: New files. + +;; Local Variables: +;; coding: utf-8 +;; End: + + Copyright (C) 2009-2011 Free Software Foundation, Inc. + + This file is part of GNU Emacs. + + GNU Emacs is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + GNU Emacs is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. diff --git a/lisp/cedet/cedet-cscope.el b/lisp/cedet/cedet-cscope.el index 211c7fb4b01..74892533ab6 100644 --- a/lisp/cedet/cedet-cscope.el +++ b/lisp/cedet/cedet-cscope.el @@ -1,6 +1,6 @@ ;;; cedet-cscope.el --- CScope support for CEDET -;;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Package: cedet @@ -173,5 +173,4 @@ there is already a database in DIR." (provide 'cedet-cscope) -;; arch-tag: 9973f1ad-f13b-4399-bc67-7f488478d78d ;;; cedet-cscope.el ends here diff --git a/lisp/cedet/cedet-files.el b/lisp/cedet/cedet-files.el index bb7137ddad2..ae037028bf7 100644 --- a/lisp/cedet/cedet-files.el +++ b/lisp/cedet/cedet-files.el @@ -1,6 +1,6 @@ ;;; cedet-files.el --- Common routines dealing with file names. -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> ;; Package: cedet @@ -90,5 +90,4 @@ specific conversions during tests." (provide 'cedet-files) -;; arch-tag: 4884c616-82c3-475d-ac9f-039e3431a702 ;;; cedet-files.el ends here diff --git a/lisp/cedet/cedet-global.el b/lisp/cedet/cedet-global.el index da4e618a749..d2a9794ec81 100644 --- a/lisp/cedet/cedet-global.el +++ b/lisp/cedet/cedet-global.el @@ -1,6 +1,6 @@ ;;; cedet-global.el --- GNU Global support for CEDET. -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> ;; Package: cedet @@ -186,5 +186,4 @@ If a database already exists, then just update it." (provide 'cedet-global) -;; arch-tag: 0d0d3ac2-91ef-4820-bb2b-1d59ccf38392 ;;; cedet-global.el ends here diff --git a/lisp/cedet/cedet-idutils.el b/lisp/cedet/cedet-idutils.el index 627a458b657..e071265c143 100644 --- a/lisp/cedet/cedet-idutils.el +++ b/lisp/cedet/cedet-idutils.el @@ -1,6 +1,6 @@ ;;; cedet-idutils.el --- ID Utils support for CEDET. -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> ;; Version: 0.2 @@ -200,5 +200,4 @@ IDUtils must start from scratch when updating a database." (provide 'cedet-idutils) -;; arch-tag: 663ca082-5b3d-4384-8710-cc74f990b501 ;;; cedet-idutils.el ends here diff --git a/lisp/cedet/cedet.el b/lisp/cedet/cedet.el index 80a092ab9ea..d2fb066515b 100644 --- a/lisp/cedet/cedet.el +++ b/lisp/cedet/cedet.el @@ -1,7 +1,6 @@ ;;; cedet.el --- Setup CEDET environment -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Author: David Ponce <david@dponce.com> ;; Maintainer: Eric M. Ludlam <zappo@gnu.org> @@ -132,5 +131,4 @@ if the package has not been loaded." (provide 'cedet) -;; arch-tag: ad4b0b63-d1f9-4a41-b003-9bbb2feb5226 ;;; cedet.el ends here diff --git a/lisp/cedet/data-debug.el b/lisp/cedet/data-debug.el index f48de002fe3..cd910f35a6a 100644 --- a/lisp/cedet/data-debug.el +++ b/lisp/cedet/data-debug.el @@ -1,6 +1,6 @@ ;;; data-debug.el --- Datastructure Debugger -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Version: 0.2 @@ -1083,5 +1083,4 @@ If the result is a list or vector, then use the data debugger to display it." (if (featurep 'eieio) (require 'eieio-datadebug)) -;; arch-tag: 4807227d-08e7-45c4-8ea5-9e4595c3bfb1 ;;; data-debug.el ends here diff --git a/lisp/cedet/ede.el b/lisp/cedet/ede.el index 849cc05019e..67b648a44bb 100644 --- a/lisp/cedet/ede.el +++ b/lisp/cedet/ede.el @@ -1,7 +1,6 @@ ;;; ede.el --- Emacs Development Environment gloss -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2005, 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: project, make diff --git a/lisp/cedet/ede/auto.el b/lisp/cedet/ede/auto.el index 52e0e3c3cf3..09535ffce6b 100644 --- a/lisp/cedet/ede/auto.el +++ b/lisp/cedet/ede/auto.el @@ -1,6 +1,6 @@ ;;; ede/auto.el --- Autoload features for EDE -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> diff --git a/lisp/cedet/ede/autoconf-edit.el b/lisp/cedet/ede/autoconf-edit.el index 7f96699a07e..bd4a5a627a9 100644 --- a/lisp/cedet/ede/autoconf-edit.el +++ b/lisp/cedet/ede/autoconf-edit.el @@ -1,7 +1,6 @@ ;;; ede/autoconf-edit.el --- Keymap for autoconf -;; Copyright (C) 1998, 1999, 2000, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1998-2000, 2009-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: project diff --git a/lisp/cedet/ede/base.el b/lisp/cedet/ede/base.el index 4da210682f8..da36919b23a 100644 --- a/lisp/cedet/ede/base.el +++ b/lisp/cedet/ede/base.el @@ -1,6 +1,6 @@ ;;; ede/base.el --- Baseclasses for EDE. -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> diff --git a/lisp/cedet/ede/cpp-root.el b/lisp/cedet/ede/cpp-root.el index 1c850f7ad95..7586522355e 100644 --- a/lisp/cedet/ede/cpp-root.el +++ b/lisp/cedet/ede/cpp-root.el @@ -1,6 +1,6 @@ ;;; ede/cpp-root.el --- A simple way to wrap a C++ project with a single root -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -538,5 +538,4 @@ Note: This needs some work." ;; generated-autoload-load-name: "ede/cpp-root" ;; End: -;; arch-tag: c3ac8160-cba6-447e-8b9c-accb7e2d942e ;;; ede/cpp-root.el ends here diff --git a/lisp/cedet/ede/custom.el b/lisp/cedet/ede/custom.el index d823e015840..a7470547cc2 100644 --- a/lisp/cedet/ede/custom.el +++ b/lisp/cedet/ede/custom.el @@ -1,6 +1,6 @@ ;;; ede.el --- customization of EDE projects. -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> diff --git a/lisp/cedet/ede/dired.el b/lisp/cedet/ede/dired.el index 59644a03ec8..b7a98271ff3 100644 --- a/lisp/cedet/ede/dired.el +++ b/lisp/cedet/ede/dired.el @@ -1,7 +1,6 @@ ;;; ede/dired.el --- EDE extensions to dired. -;; Copyright (C) 1998, 1999, 2000, 2003, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1998-2000, 2003, 2009-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Version: 0.4 @@ -84,5 +83,4 @@ negative, force off." (provide 'ede/dired) -;; arch-tag: 95d3e0a7-a8b7-43a9-b7df-ba647e4c56f6 ;;; ede/dired.el ends here diff --git a/lisp/cedet/ede/emacs.el b/lisp/cedet/ede/emacs.el index fefd8f99415..b8759dd06ee 100644 --- a/lisp/cedet/ede/emacs.el +++ b/lisp/cedet/ede/emacs.el @@ -1,6 +1,6 @@ ;;; ede/emacs.el --- Special project for Emacs -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -299,5 +299,4 @@ Knows about how the Emacs source tree is organized." ;; generated-autoload-load-name: "ede/emacs" ;; End: -;; arch-tag: 7cd0be95-663d-4101-8799-2f8216fd8233 ;;; ede/emacs.el ends here diff --git a/lisp/cedet/ede/files.el b/lisp/cedet/ede/files.el index 87145d8c8a1..3d165c39016 100644 --- a/lisp/cedet/ede/files.el +++ b/lisp/cedet/ede/files.el @@ -1,6 +1,6 @@ ;;; ede/files.el --- Associate projects with files and directories. -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -501,5 +501,4 @@ Argument DIR is the directory to trim upwards." ;; generated-autoload-load-name: "ede/files" ;; End: -;; arch-tag: 28e17358-0208-4678-828c-23fb0e783fd6 ;;; ede/files.el ends here diff --git a/lisp/cedet/ede/generic.el b/lisp/cedet/ede/generic.el index c2d31f56a13..360b15499ca 100644 --- a/lisp/cedet/ede/generic.el +++ b/lisp/cedet/ede/generic.el @@ -1,6 +1,6 @@ ;;; ede/generic.el --- Base Support for generic build systems -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> diff --git a/lisp/cedet/ede/linux.el b/lisp/cedet/ede/linux.el index 9ae4c91a2a0..e11286c710e 100644 --- a/lisp/cedet/ede/linux.el +++ b/lisp/cedet/ede/linux.el @@ -1,6 +1,6 @@ ;;; ede/linux.el --- Special project for Linux -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -245,5 +245,4 @@ Knows about how the Linux source tree is organized." ;; generated-autoload-load-name: "ede/linux" ;; End: -;; arch-tag: 41f310c8-b169-4259-8a2d-0ff4bd0a736d ;;; ede/linux.el ends here diff --git a/lisp/cedet/ede/locate.el b/lisp/cedet/ede/locate.el index c2ca81c668b..427b87d2bc0 100644 --- a/lisp/cedet/ede/locate.el +++ b/lisp/cedet/ede/locate.el @@ -1,6 +1,6 @@ ;;; ede/locate.el --- Locate support -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -348,5 +348,4 @@ that created this EDE locate object." ;; generated-autoload-load-name: "ede/locate" ;; End: -;; arch-tag: a04cb356-d11c-4f69-bd72-5a8a2aff708c ;;; ede/locate.el ends here diff --git a/lisp/cedet/ede/make.el b/lisp/cedet/ede/make.el index 6b59f510bed..1c1bcd47d75 100644 --- a/lisp/cedet/ede/make.el +++ b/lisp/cedet/ede/make.el @@ -1,6 +1,6 @@ ;;; ede/make.el --- General information about "make" -;;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -105,5 +105,4 @@ If NOERROR is nil, then throw an error on failure. Return t otherwise." ;; generated-autoload-load-name: "ede/make" ;; End: -;; arch-tag: cc54abdb-7ca5-4902-9735-eda3c6a77852 ;;; ede/make.el ends here diff --git a/lisp/cedet/ede/makefile-edit.el b/lisp/cedet/ede/makefile-edit.el index 4331fb43310..63991c54e7f 100644 --- a/lisp/cedet/ede/makefile-edit.el +++ b/lisp/cedet/ede/makefile-edit.el @@ -1,6 +1,6 @@ ;;; makefile-edit.el --- Makefile editing/scanning commands. -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -126,5 +126,4 @@ Return nil if it isn't a variable." (provide 'ede/makefile-edit) -;; arch-tag: aba26b5f-4306-40d9-b63c-84a9590ac986 ;;; ede/makefile-edit.el ends here diff --git a/lisp/cedet/ede/pconf.el b/lisp/cedet/ede/pconf.el index 0983aeb16b8..497806c71a3 100644 --- a/lisp/cedet/ede/pconf.el +++ b/lisp/cedet/ede/pconf.el @@ -1,7 +1,6 @@ ;;; ede/pconf.el --- configure.ac maintenance for EDE -;;; Copyright (C) 1998, 1999, 2000, 2005, 2008, 2009, 2010 -;;; Free Software Foundation, Inc. +;;; Copyright (C) 1998-2000, 2005, 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: project @@ -184,5 +183,4 @@ Results in --add-missing being passed to automake." (provide 'ede/pconf) -;; arch-tag: 8d514f68-2abe-4b35-8b4e-bea4fd0c3eab ;;; ede/pconf.el ends here diff --git a/lisp/cedet/ede/pmake.el b/lisp/cedet/ede/pmake.el index b8e7c5f61a6..52a1d485324 100644 --- a/lisp/cedet/ede/pmake.el +++ b/lisp/cedet/ede/pmake.el @@ -1,7 +1,6 @@ ;;; ede-pmake.el --- EDE Generic Project Makefile code generator. -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2005, 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: project, make diff --git a/lisp/cedet/ede/proj-archive.el b/lisp/cedet/ede/proj-archive.el index 2d4620ea47c..23d3aa05000 100644 --- a/lisp/cedet/ede/proj-archive.el +++ b/lisp/cedet/ede/proj-archive.el @@ -1,6 +1,6 @@ ;;; ede/proj-archive.el --- EDE Generic Project archive support -;; Copyright (C) 1998, 1999, 2000, 2001, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2001, 2009-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: project, make @@ -61,5 +61,4 @@ This makes sure that the archive is removed with 'make clean'." (provide 'ede/proj-archive) -;; arch-tag: a0b2cfe8-0d11-4a4f-8e47-ebfb11b6ac33 ;;; ede/proj-archive.el ends here diff --git a/lisp/cedet/ede/proj-aux.el b/lisp/cedet/ede/proj-aux.el index 4f00d6ea60b..2a8f1de65e2 100644 --- a/lisp/cedet/ede/proj-aux.el +++ b/lisp/cedet/ede/proj-aux.el @@ -1,6 +1,6 @@ ;;; ede/proj-aux.el --- EDE Generic Project auxiliary file support -;; Copyright (C) 1998, 1999, 2000, 2007, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2000, 2007, 2009-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: project, make @@ -44,5 +44,4 @@ (provide 'ede/proj-aux) -;; arch-tag: 668e96e0-2b30-474e-ba3c-9fa4fa696922 ;;; ede/proj-aux.el ends here diff --git a/lisp/cedet/ede/proj-comp.el b/lisp/cedet/ede/proj-comp.el index e73d586aa15..418e70fd5e9 100644 --- a/lisp/cedet/ede/proj-comp.el +++ b/lisp/cedet/ede/proj-comp.el @@ -1,6 +1,6 @@ ;;; ede/proj-comp.el --- EDE Generic Project compiler/rule driver -;; Copyright (C) 1999, 2000, 2001, 2004, 2005, 2007, 2009, 2010 +;; Copyright (C) 1999-2001, 2004-2005, 2007, 2009-2011 ;; Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> @@ -355,5 +355,4 @@ compiler it decides to use after inserting in the rule." (provide 'ede/proj-comp) -;; arch-tag: ade67766-1a5d-467a-826a-93e95594d717 ;;; ede/proj-comp.el ends here diff --git a/lisp/cedet/ede/proj-elisp.el b/lisp/cedet/ede/proj-elisp.el index 744f345fcf8..17185b19492 100644 --- a/lisp/cedet/ede/proj-elisp.el +++ b/lisp/cedet/ede/proj-elisp.el @@ -1,7 +1,6 @@ ;;; ede-proj-elisp.el --- EDE Generic Project Emacs Lisp support -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2005, 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: project, make diff --git a/lisp/cedet/ede/proj-info.el b/lisp/cedet/ede/proj-info.el index 1e9060fe315..d943e609528 100644 --- a/lisp/cedet/ede/proj-info.el +++ b/lisp/cedet/ede/proj-info.el @@ -1,7 +1,6 @@ ;;; ede-proj-info.el --- EDE Generic Project texinfo support -;;; Copyright (C) 1998, 1999, 2000, 2001, 2004, 2007, 2008, 2009, 2010 -;;; Free Software Foundation, Inc. +;;; Copyright (C) 1998-2001, 2004, 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: project, make @@ -183,5 +182,4 @@ files in the project." (provide 'ede/proj-info) -;; arch-tag: e4b7ce51-ae46-4d7c-a5fb-073f435cdcbf ;;; ede/proj-info.el ends here diff --git a/lisp/cedet/ede/proj-misc.el b/lisp/cedet/ede/proj-misc.el index 34a10859fdd..4d68e1544a7 100644 --- a/lisp/cedet/ede/proj-misc.el +++ b/lisp/cedet/ede/proj-misc.el @@ -1,7 +1,6 @@ ;;; ede-proj-misc.el --- EDE Generic Project Emacs Lisp support -;; Copyright (C) 1998, 1999, 2000, 2001, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1998-2001, 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: project, make @@ -93,5 +92,4 @@ All listed sources are included in the distribution.") (provide 'ede/proj-misc) -;; arch-tag: e5e5f8d2-9897-4a1b-8a29-5944ec5a892d ;;; ede/proj-misc.el ends here diff --git a/lisp/cedet/ede/proj-obj.el b/lisp/cedet/ede/proj-obj.el index 6be76f1f11b..7e7d289a59a 100644 --- a/lisp/cedet/ede/proj-obj.el +++ b/lisp/cedet/ede/proj-obj.el @@ -1,7 +1,6 @@ ;;; ede/proj-obj.el --- EDE Generic Project Object code generation support -;;; Copyright (C) 1998, 1999, 2000, 2005, 2008, 2009, 2010 -;;; Free Software Foundation, Inc. +;;; Copyright (C) 1998-2000, 2005, 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: project, make @@ -320,5 +319,4 @@ Optional argument MORESOURCE is not used." (provide 'ede/proj-obj) -;; arch-tag: f521b89f-1a3f-4910-ba81-65de3f421698 ;;; ede/proj-obj.el ends here diff --git a/lisp/cedet/ede/proj-prog.el b/lisp/cedet/ede/proj-prog.el index 9b06dc007b3..f33f5327beb 100644 --- a/lisp/cedet/ede/proj-prog.el +++ b/lisp/cedet/ede/proj-prog.el @@ -1,7 +1,6 @@ ;;; ede-proj-prog.el --- EDE Generic Project program support -;; Copyright (C) 1998, 1999, 2000, 2001, 2005, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1998-2001, 2005, 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: project, make @@ -141,5 +140,4 @@ Optional COMMAND is the command to run in place of asking the user." (provide 'ede/proj-prog) -;; arch-tag: 0bfa9364-f385-4745-a846-462146a79a25 ;;; ede/proj-prog.el ends here diff --git a/lisp/cedet/ede/proj-scheme.el b/lisp/cedet/ede/proj-scheme.el index 577416dc920..2a3ea039a7a 100644 --- a/lisp/cedet/ede/proj-scheme.el +++ b/lisp/cedet/ede/proj-scheme.el @@ -1,6 +1,6 @@ ;;; ede/proj-scheme.el --- EDE Generic Project scheme (guile) support -;; Copyright (C) 1998, 1999, 2000, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2000, 2009-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: project, make, scheme @@ -46,5 +46,4 @@ (provide 'ede/proj-scheme) -;; arch-tag: 451081e6-0d45-4560-9821-8ee03e8401ab ;;; ede/proj-scheme.el ends here diff --git a/lisp/cedet/ede/proj-shared.el b/lisp/cedet/ede/proj-shared.el index e1111f9f38b..ec514194e33 100644 --- a/lisp/cedet/ede/proj-shared.el +++ b/lisp/cedet/ede/proj-shared.el @@ -1,6 +1,6 @@ ;;; ede-proj-shared.el --- EDE Generic Project shared library support -;;; Copyright (C) 1998, 1999, 2000, 2009, 2010 Free Software Foundation, Inc. +;;; Copyright (C) 1998-2000, 2009-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: project, make @@ -207,5 +207,4 @@ We need to override -program which has an LDADD element." (provide 'ede/proj-shared) -;; arch-tag: 05f22c3e-b269-4411-9425-65e8fe4ab74a ;;; ede/proj-shared.el ends here diff --git a/lisp/cedet/ede/proj.el b/lisp/cedet/ede/proj.el index 41887431d31..40e6165251c 100644 --- a/lisp/cedet/ede/proj.el +++ b/lisp/cedet/ede/proj.el @@ -1,7 +1,6 @@ ;;; ede/proj.el --- EDE Generic Project file driver -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1998-2003, 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: project, make @@ -676,5 +675,4 @@ Optional argument FORCE will force items to be regenerated." (provide 'ede/proj) -;; arch-tag: eb8a40f8-0d2c-41c4-b273-af04101d1cdf ;;; ede/proj.el ends here diff --git a/lisp/cedet/ede/project-am.el b/lisp/cedet/ede/project-am.el index ccfb1a242b4..88cf67e22ed 100644 --- a/lisp/cedet/ede/project-am.el +++ b/lisp/cedet/ede/project-am.el @@ -1,6 +1,6 @@ ;;; project-am.el --- A project management scheme based on automake files. -;; Copyright (C) 1998, 1999, 2000, 2003, 2005, 2007, 2008, 2009, 2010 +;; Copyright (C) 1998-2000, 2003, 2005, 2007-2011 ;; Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> @@ -1020,5 +1020,4 @@ per file or in .dir-locals.el or similar." (provide 'ede/project-am) -;; arch-tag: 528db935-f186-4240-b647-e305c5b784a2 ;;; ede/project-am.el ends here diff --git a/lisp/cedet/ede/shell.el b/lisp/cedet/ede/shell.el index d967a878350..194b7285a0b 100644 --- a/lisp/cedet/ede/shell.el +++ b/lisp/cedet/ede/shell.el @@ -1,6 +1,6 @@ ;;; ede/shell.el --- A shell controlled by EDE. ;; -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -79,5 +79,4 @@ COMMAND is a text string representing the thing to be run." ;; generated-autoload-load-name: "ede/shell" ;; End: -;; arch-tag: 71bb9dc4-ad1c-4ba3-a95e-531a90500ca9 ;;; ede/shell.el ends here diff --git a/lisp/cedet/ede/simple.el b/lisp/cedet/ede/simple.el index d42baa45f6a..8d77cea6529 100644 --- a/lisp/cedet/ede/simple.el +++ b/lisp/cedet/ede/simple.el @@ -1,6 +1,6 @@ ;;; ede/simple.el --- Overlay an EDE structure on an existing project -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -117,5 +117,4 @@ Each directory needs a project file to control it.") (provide 'ede/simple) -;; arch-tag: a0c4264a-89ce-4364-afab-2512acd3b22a ;;; ede/simple.el ends here diff --git a/lisp/cedet/ede/source.el b/lisp/cedet/ede/source.el index 88167de5a39..e5dc12d064f 100644 --- a/lisp/cedet/ede/source.el +++ b/lisp/cedet/ede/source.el @@ -1,6 +1,6 @@ ;; ede/source.el --- EDE source code object -;; Copyright (C) 2000, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000, 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: project, make @@ -170,5 +170,4 @@ Used to guess header files, but uses the auxsource regular expression." (provide 'ede/source) -;; arch-tag: 60165fe2-920e-4adf-8531-25655388467d ;;; ede/source.el ends here diff --git a/lisp/cedet/ede/speedbar.el b/lisp/cedet/ede/speedbar.el index 8658a654b16..252ce47df67 100644 --- a/lisp/cedet/ede/speedbar.el +++ b/lisp/cedet/ede/speedbar.el @@ -1,7 +1,7 @@ ;;; ede/speedbar.el --- Speedbar viewing of EDE projects -;; Copyright (C) 1998, 1999, 2000, 2001, 2003, 2005, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2001, 2003, 2005, 2007-2011 +;; Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: project, make, tags diff --git a/lisp/cedet/ede/srecode.el b/lisp/cedet/ede/srecode.el index 3b131dd3753..f7428bae04f 100644 --- a/lisp/cedet/ede/srecode.el +++ b/lisp/cedet/ede/srecode.el @@ -1,6 +1,6 @@ ;;; ede/srecode.el --- EDE utilities on top of SRecoder -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -91,5 +91,4 @@ Note: Just like `srecode-insert', but templates found in 'ede app." (provide 'ede/srecode) -;; arch-tag: 75bec542-7cc8-41a4-b5a0-8fb247609f03 ;;; ede/srecode.el ends here diff --git a/lisp/cedet/ede/system.el b/lisp/cedet/ede/system.el index 58af372490b..b69938af4ab 100644 --- a/lisp/cedet/ede/system.el +++ b/lisp/cedet/ede/system.el @@ -1,6 +1,6 @@ ;;; ede-system.el --- EDE working with the system (VC, FTP, ETC) -;; Copyright (C) 2001, 2002, 2003, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2001-2003, 2009-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: project, make, vc @@ -143,5 +143,4 @@ Download tramp, and use /r:machine: for names on remote sites w/out FTP access." ;; generated-autoload-load-name: "ede/system" ;; End: -;; arch-tag: a974ea44-151e-488b-b5d4-df2c05be6fe6 ;;; ede/system.el ends here diff --git a/lisp/cedet/ede/util.el b/lisp/cedet/ede/util.el index c5b735c8863..fc4536ba88a 100644 --- a/lisp/cedet/ede/util.el +++ b/lisp/cedet/ede/util.el @@ -1,6 +1,6 @@ ;;; ede/util.el --- EDE utilities -;; Copyright (C) 2000, 2005, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000, 2005, 2009-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: project, make @@ -101,5 +101,4 @@ If BUFFER isn't specified, use the current buffer." ;; generated-autoload-load-name: "ede/util" ;; End: -;; arch-tag: 3cddf449-7f6a-4c76-86dd-04142c60eba2 ;;; ede/util.el ends here diff --git a/lisp/cedet/inversion.el b/lisp/cedet/inversion.el index c79914139af..71960ddecd4 100644 --- a/lisp/cedet/inversion.el +++ b/lisp/cedet/inversion.el @@ -1,7 +1,6 @@ ;;; inversion.el --- When you need something in version XX.XX -;;; Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010 -;;; Free Software Foundation, Inc. +;;; Copyright (C) 2002-2003, 2005-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Version: 0.2 @@ -538,5 +537,4 @@ The package should have VERSION available for download." (provide 'inversion) -;; arch-tag: 7239729c-3051-4d85-bb09-dcf92363aa3b ;;; inversion.el ends here diff --git a/lisp/cedet/mode-local.el b/lisp/cedet/mode-local.el index 7943f61fee3..d077dd95f3c 100644 --- a/lisp/cedet/mode-local.el +++ b/lisp/cedet/mode-local.el @@ -1,7 +1,6 @@ ;;; mode-local.el --- Support for mode local facilities ;; -;; Copyright (C) 2004, 2005, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2005, 2007-2011 Free Software Foundation, Inc. ;; ;; Author: David Ponce <david@dponce.com> ;; Maintainer: David Ponce <david@dponce.com> diff --git a/lisp/cedet/pulse.el b/lisp/cedet/pulse.el index 593f196982b..74dc1ecde31 100644 --- a/lisp/cedet/pulse.el +++ b/lisp/cedet/pulse.el @@ -1,6 +1,6 @@ ;;; pulse.el --- Pulsing Overlays -;;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> ;; Version: 1.0 @@ -255,5 +255,4 @@ Only pulses the line if `pulse-command-advice-flag' is non-nil." (provide 'pulse) -;; arch-tag: 6e2f78c1-65b3-4164-a141-872cb1552959 ;;; pulse.el ends here diff --git a/lisp/cedet/semantic.el b/lisp/cedet/semantic.el index ede96e39183..c899988dc36 100644 --- a/lisp/cedet/semantic.el +++ b/lisp/cedet/semantic.el @@ -1,7 +1,6 @@ ;;; semantic.el --- Semantic buffer evaluator. -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: syntax tools @@ -1153,5 +1152,4 @@ minor mode is enabled." t nil) ;; (require 'semantic/load) -;; arch-tag: 31583e10-6508-41a9-be40-f83d0ae0a4ed ;;; semantic.el ends here diff --git a/lisp/cedet/semantic/analyze.el b/lisp/cedet/semantic/analyze.el index 4009685683b..8a0fbd5cc37 100644 --- a/lisp/cedet/semantic/analyze.el +++ b/lisp/cedet/semantic/analyze.el @@ -1,7 +1,6 @@ ;;; semantic/analyze.el --- Analyze semantic tags against local context -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2000-2005, 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> @@ -795,5 +794,4 @@ CONTEXT's content is described in `semantic-analyze-current-context'." ;; generated-autoload-load-name: "semantic/analyze" ;; End: -;; arch-tag: 1102143a-1c05-4631-83e8-45aafc6b4a59 ;;; semantic/analyze.el ends here diff --git a/lisp/cedet/semantic/analyze/complete.el b/lisp/cedet/semantic/analyze/complete.el index 7f0c7d8a22a..bbe87f34172 100644 --- a/lisp/cedet/semantic/analyze/complete.el +++ b/lisp/cedet/semantic/analyze/complete.el @@ -1,6 +1,6 @@ ;;; semantic/analyze/complete.el --- Smart Completions -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> @@ -276,5 +276,4 @@ FLAGS can be any number of: ;; generated-autoload-load-name: "semantic/analyze/complete" ;; End: -;; arch-tag: 97071c7e-2459-4e7a-8875-8cc5bbbc1f4d ;;; semantic/analyze/complete.el ends here diff --git a/lisp/cedet/semantic/analyze/debug.el b/lisp/cedet/semantic/analyze/debug.el index cfc41e6faf1..b02358b7243 100644 --- a/lisp/cedet/semantic/analyze/debug.el +++ b/lisp/cedet/semantic/analyze/debug.el @@ -1,6 +1,6 @@ ;;; semantic/analyze/debug.el --- Debug the analyzer -;;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> diff --git a/lisp/cedet/semantic/analyze/fcn.el b/lisp/cedet/semantic/analyze/fcn.el index 56353689ef6..eae6d013400 100644 --- a/lisp/cedet/semantic/analyze/fcn.el +++ b/lisp/cedet/semantic/analyze/fcn.el @@ -1,6 +1,6 @@ ;;; semantic/analyze/fcn.el --- Analyzer support functions. -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> @@ -334,5 +334,4 @@ SCOPE is the current scope." (provide 'semantic/analyze/fcn) -;; arch-tag: 32525305-515e-4b96-ad11-216d3a99f829 ;;; semantic/analyze/fcn.el ends here diff --git a/lisp/cedet/semantic/analyze/refs.el b/lisp/cedet/semantic/analyze/refs.el index ec903f0afcc..9a4459f037f 100644 --- a/lisp/cedet/semantic/analyze/refs.el +++ b/lisp/cedet/semantic/analyze/refs.el @@ -1,6 +1,6 @@ ;;; semantic/analyze/refs.el --- Analysis of the references between tags. -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> @@ -350,5 +350,4 @@ Only works for tags in the global namespace." ;; generated-autoload-load-name: "semantic/analyze/refs" ;; End: -;; arch-tag: f8c59a91-1829-42b3-b083-437c6881841c ;;; semantic/analyze/refs.el ends here diff --git a/lisp/cedet/semantic/bovine.el b/lisp/cedet/semantic/bovine.el index d8d077658e3..1dfbb72d416 100644 --- a/lisp/cedet/semantic/bovine.el +++ b/lisp/cedet/semantic/bovine.el @@ -1,6 +1,6 @@ ;;; semantic/bovine.el --- LL Parser/Analyzer core. -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2009, 2010 +;; Copyright (C) 1999-2004, 2006-2007, 2009-2011 ;; Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -293,5 +293,4 @@ list of semantic tokens found." ;; generated-autoload-load-name: "semantic/bovine" ;; End: -;; arch-tag: 1e820899-2a26-499a-b0c0-57301365a6b0 ;;; semantic/bovine.el ends here diff --git a/lisp/cedet/semantic/bovine/c-by.el b/lisp/cedet/semantic/bovine/c-by.el index c33f3fb67f5..8e1fe8d3617 100644 --- a/lisp/cedet/semantic/bovine/c-by.el +++ b/lisp/cedet/semantic/bovine/c-by.el @@ -1,7 +1,6 @@ ;;; semantic/bovine/c-by.el --- Generated parser support file -;;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. @@ -2194,5 +2193,4 @@ (provide 'semantic/bovine/c-by) -;; arch-tag: 27da9f71-d2ef-473f-92a7-b0006b1a8491 ;;; semantic/bovine/c-by.el ends here diff --git a/lisp/cedet/semantic/bovine/c.el b/lisp/cedet/semantic/bovine/c.el index 1b441a27d2b..0b3e6881891 100644 --- a/lisp/cedet/semantic/bovine/c.el +++ b/lisp/cedet/semantic/bovine/c.el @@ -1,7 +1,6 @@ ;;; semantic/bovine/c.el --- Semantic details for C -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> diff --git a/lisp/cedet/semantic/bovine/debug.el b/lisp/cedet/semantic/bovine/debug.el index 1d2384b953a..9ca7409e335 100644 --- a/lisp/cedet/semantic/bovine/debug.el +++ b/lisp/cedet/semantic/bovine/debug.el @@ -1,6 +1,6 @@ ;;; semantic/bovine/debug.el --- Debugger support for bovinator -;; Copyright (C) 2003, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2009-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> @@ -144,5 +144,4 @@ Argument CONDITION is the thrown error condition." (provide 'semantic/bovine/debug) -;; arch-tag: d1bf98b3-faeb-4dc3-ac34-cac6264fd94e ;;; semantic/bovine/debug.el ends here diff --git a/lisp/cedet/semantic/bovine/el.el b/lisp/cedet/semantic/bovine/el.el index ed1f74c590f..cfdd4cf6f6c 100644 --- a/lisp/cedet/semantic/bovine/el.el +++ b/lisp/cedet/semantic/bovine/el.el @@ -1,7 +1,6 @@ ;;; semantic/bovine/el.el --- Semantic details for Emacs Lisp -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2005, 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> @@ -963,5 +962,4 @@ ELisp variables can be pretty long, so track this one too.") (provide 'semantic/bovine/el) -;; arch-tag: d634cbab-9610-4510-9fce-048ae1eb7aa6 ;;; semantic/bovine/el.el ends here diff --git a/lisp/cedet/semantic/bovine/gcc.el b/lisp/cedet/semantic/bovine/gcc.el index cbc5d6dda54..acbbb13170e 100644 --- a/lisp/cedet/semantic/bovine/gcc.el +++ b/lisp/cedet/semantic/bovine/gcc.el @@ -1,6 +1,6 @@ ;;; semantic/bovine/gcc.el --- gcc querying special code for the C parser -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -221,5 +221,4 @@ It should also include other symbols GCC was compiled with.") ;; generated-autoload-load-name: "semantic/bovine/gcc" ;; End: -;; arch-tag: 7086f4a0-1ce8-48e2-9783-d750d3765186 ;;; semantic/bovine/gcc.el ends here diff --git a/lisp/cedet/semantic/bovine/make-by.el b/lisp/cedet/semantic/bovine/make-by.el index f5da66e7725..3cc4e5b23a3 100644 --- a/lisp/cedet/semantic/bovine/make-by.el +++ b/lisp/cedet/semantic/bovine/make-by.el @@ -1,7 +1,6 @@ ;;; semantic/bovine/make-by.el --- Generated parser support file -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1999-2004, 2008-2011 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. @@ -384,5 +383,4 @@ (provide 'semantic/bovine/make-by) -;; arch-tag: 8c3749b8-7b19-46e0-af01-2a4d02fd0352 ;;; semantic/bovine/make-by.el ends here diff --git a/lisp/cedet/semantic/bovine/make.el b/lisp/cedet/semantic/bovine/make.el index c4d7a6ae710..e132b48441a 100644 --- a/lisp/cedet/semantic/bovine/make.el +++ b/lisp/cedet/semantic/bovine/make.el @@ -1,7 +1,6 @@ ;;; semantic/bovine/make.el --- Makefile parsing rules. -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2000-2004, 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> @@ -238,5 +237,4 @@ Uses default implementation, and also gets a list of filenames." ;; generated-autoload-load-name: "semantic/bovine/make" ;; End: -;; arch-tag: 8122d1f5-d4b7-4f6e-b909-d61ac65ef118 ;;; semantic/bovine/make.el ends here diff --git a/lisp/cedet/semantic/bovine/scm-by.el b/lisp/cedet/semantic/bovine/scm-by.el index 7dc46742fd1..87efe747a4c 100644 --- a/lisp/cedet/semantic/bovine/scm-by.el +++ b/lisp/cedet/semantic/bovine/scm-by.el @@ -1,6 +1,6 @@ ;;; semantic-scm-by.el --- Generated parser support file -;; Copyright (C) 2001, 2003, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2001, 2003, 2009-2011 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. @@ -188,5 +188,4 @@ (provide 'semantic/bovine/scm-by) -;; arch-tag: 945749cc-a039-434f-bf95-bf2480a506c3 ;;; semantic/bovine/scm-by.el ends here diff --git a/lisp/cedet/semantic/bovine/scm.el b/lisp/cedet/semantic/bovine/scm.el index de8350a6c78..0bdd8722db1 100644 --- a/lisp/cedet/semantic/bovine/scm.el +++ b/lisp/cedet/semantic/bovine/scm.el @@ -1,7 +1,6 @@ ;;; semantic/bovine/scm.el --- Semantic details for Scheme (guile) -;;; Copyright (C) 2001, 2002, 2003, 2004, 2008, 2009, 2010 -;;; Free Software Foundation, Inc. +;;; Copyright (C) 2001-2004, 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> @@ -115,5 +114,4 @@ syntax as specified by the syntax table." ;; generated-autoload-load-name: "semantic/bovine/scm" ;; End: -;; arch-tag: 4f929838-b817-447d-848c-d47789ff140f ;;; semantic/bovine/scm.el ends here diff --git a/lisp/cedet/semantic/chart.el b/lisp/cedet/semantic/chart.el index f4ba4106a4b..1c08cb04d15 100644 --- a/lisp/cedet/semantic/chart.el +++ b/lisp/cedet/semantic/chart.el @@ -1,6 +1,6 @@ ;;; semantic/chart.el --- Utilities for use with semantic tag tables -;; Copyright (C) 1999, 2000, 2001, 2003, 2005, 2008, 2009, 2010 +;; Copyright (C) 1999-2001, 2003, 2005, 2008-2011 ;; Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> @@ -171,5 +171,4 @@ items are charted. TAGTABLE is passed to (provide 'semantic/chart) -;; arch-tag: 026573b1-f4f1-4dda-ae77-b6451283ff23 ;;; semantic/chart.el ends here diff --git a/lisp/cedet/semantic/complete.el b/lisp/cedet/semantic/complete.el index 1f8ee260ade..31e92724a00 100644 --- a/lisp/cedet/semantic/complete.el +++ b/lisp/cedet/semantic/complete.el @@ -1,7 +1,6 @@ ;;; semantic/complete.el --- Routines for performing tag completion -;; Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2003-2005, 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: syntax @@ -2159,5 +2158,4 @@ use `semantic-complete-analyze-inline' to complete." ;; generated-autoload-load-name: "semantic/complete" ;; End: -;; arch-tag: a07c8f71-e53b-416e-9704-3a99ef101b09 ;;; semantic/complete.el ends here diff --git a/lisp/cedet/semantic/ctxt.el b/lisp/cedet/semantic/ctxt.el index b158adffc14..08049201756 100644 --- a/lisp/cedet/semantic/ctxt.el +++ b/lisp/cedet/semantic/ctxt.el @@ -1,7 +1,6 @@ ;;; semantic/ctxt.el --- Context calculations for Semantic tools. -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: syntax @@ -619,5 +618,4 @@ means that the first symbol might be: ;; generated-autoload-load-name: "semantic/ctxt" ;; End: -;; arch-tag: 04f3ae3c-78bb-40ca-b112-ba77f5e4ea88 ;;; semantic/ctxt.el ends here diff --git a/lisp/cedet/semantic/db-debug.el b/lisp/cedet/semantic/db-debug.el index cfbc9c0aff7..7d1abe11dd1 100644 --- a/lisp/cedet/semantic/db-debug.el +++ b/lisp/cedet/semantic/db-debug.el @@ -1,6 +1,6 @@ ;;; semantic/db-debug.el --- Extra level debugging routines for Semantic -;;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -107,5 +107,4 @@ (provide 'semantic/db-debug) -;; arch-tag: 9bdc11bd-fb76-4a32-9545-78ed143b7184 ;;; semantic/db-debug.el ends here diff --git a/lisp/cedet/semantic/db-ebrowse.el b/lisp/cedet/semantic/db-ebrowse.el index 86602aaa95b..d719fde3174 100644 --- a/lisp/cedet/semantic/db-ebrowse.el +++ b/lisp/cedet/semantic/db-ebrowse.el @@ -1,7 +1,6 @@ ;;; semantic/db-ebrowse.el --- Semanticdb backend using ebrowse. -;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2005-2011 Free Software Foundation, Inc. ;; Authors: Eric M. Ludlam <zappo@gnu.org> ;; Joakim Verona @@ -661,5 +660,4 @@ Return a list of tags." (provide 'semantic/db-ebrowse) -;; arch-tag: e7d15223-6074-4c87-baf0-98fdd22ff873 ;;; semantic/db-ebrowse.el ends here diff --git a/lisp/cedet/semantic/db-el.el b/lisp/cedet/semantic/db-el.el index d313d1dc578..0cbff54fd1d 100644 --- a/lisp/cedet/semantic/db-el.el +++ b/lisp/cedet/semantic/db-el.el @@ -1,7 +1,6 @@ ;;; semantic/db-el.el --- Semantic database extensions for Emacs Lisp -;;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;;; Free Software Foundation, Inc. +;;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: tags @@ -343,5 +342,4 @@ Return a list of tags." (provide 'semantic/db-el) -;; arch-tag: e54f556e-fa3f-4bc5-9b15-744a659a6e65 ;;; semantic/db-el.el ends here diff --git a/lisp/cedet/semantic/db-file.el b/lisp/cedet/semantic/db-file.el index 3c96290cc93..661bc8d6841 100644 --- a/lisp/cedet/semantic/db-file.el +++ b/lisp/cedet/semantic/db-file.el @@ -1,7 +1,6 @@ ;;; semantic/db-file.el --- Save a semanticdb to a cache file. -;;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 -;;; Free Software Foundation, Inc. +;;; Copyright (C) 2000-2005, 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: tags @@ -452,5 +451,4 @@ Optional NOERROR prevents errors from being displayed." ;; generated-autoload-load-name: "semantic/db-file" ;; End: -;; arch-tag: f4a0d9de-6c25-4bf3-aff3-a10c58fd575d ;;; semantic/db-file.el ends here diff --git a/lisp/cedet/semantic/db-find.el b/lisp/cedet/semantic/db-find.el index b266fc8bdfc..a7335d642be 100644 --- a/lisp/cedet/semantic/db-find.el +++ b/lisp/cedet/semantic/db-find.el @@ -1,7 +1,6 @@ ;;; semantic/db-find.el --- Searching through semantic databases. -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: tags @@ -1369,5 +1368,4 @@ Return a table of all matching tags." ;; generated-autoload-load-name: "semantic/db-find" ;; End: -;; arch-tag: 5d4162f5-5092-46d7-beed-55c78aab4116 ;;; semantic/db-find.el ends here diff --git a/lisp/cedet/semantic/db-global.el b/lisp/cedet/semantic/db-global.el index 3d827b9ede0..7f3d616203e 100644 --- a/lisp/cedet/semantic/db-global.el +++ b/lisp/cedet/semantic/db-global.el @@ -1,7 +1,6 @@ ;;; semantic/db-global.el --- Semantic database extensions for GLOBAL -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2002-2006, 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: tags @@ -220,5 +219,4 @@ Like `semanticdb-find-tags-for-completion-method' for global." ;; generated-autoload-load-name: "semantic/db-global" ;; End: -;; arch-tag: ec0edab2-26c2-438f-a3d2-0d953364f8cc ;;; semantic/db-global.el ends here diff --git a/lisp/cedet/semantic/db-javascript.el b/lisp/cedet/semantic/db-javascript.el index a972c33f32a..213216cee1a 100644 --- a/lisp/cedet/semantic/db-javascript.el +++ b/lisp/cedet/semantic/db-javascript.el @@ -1,7 +1,6 @@ ;;; semantic/db-javascript.el --- Semantic database extensions for javascript -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Author: Joakim Verona @@ -307,5 +306,4 @@ Return a list of tags." (provide 'semantic/db-javascript) -;; arch-tag: 69cf8ad1-7ea9-41af-851c-41f24c873374 ;;; semantic/db-javascript.el ends here diff --git a/lisp/cedet/semantic/db-mode.el b/lisp/cedet/semantic/db-mode.el index 5d421012cd5..8b656592603 100644 --- a/lisp/cedet/semantic/db-mode.el +++ b/lisp/cedet/semantic/db-mode.el @@ -1,6 +1,6 @@ ;;; semantic/db-mode.el --- Semanticdb Minor Mode -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -217,5 +217,4 @@ Argument NEW-TABLE is the new table of tags." ;; generated-autoload-load-name: "semantic/db-mode" ;; End: -;; arch-tag: f5da903d-2d34-4adf-8572-e60340e1ad59 ;;; semantic/db-mode.el ends here diff --git a/lisp/cedet/semantic/db-ref.el b/lisp/cedet/semantic/db-ref.el index 8b1d65beb95..6f5489ef7ef 100644 --- a/lisp/cedet/semantic/db-ref.el +++ b/lisp/cedet/semantic/db-ref.el @@ -1,6 +1,6 @@ ;;; semantic/db-ref.el --- Handle cross-db file references -;;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -171,5 +171,4 @@ refreshed before dumping the result." (provide 'semantic/db-ref) -;; arch-tag: bea73e70-dbbe-4c30-a58d-289dc3a40172 ;;; semantic/db-ref.el ends here diff --git a/lisp/cedet/semantic/db-typecache.el b/lisp/cedet/semantic/db-typecache.el index 59ba83fe9d0..2a78576092a 100644 --- a/lisp/cedet/semantic/db-typecache.el +++ b/lisp/cedet/semantic/db-typecache.el @@ -1,6 +1,6 @@ ;;; db-typecache.el --- Manage Datatypes -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -622,5 +622,4 @@ If there isn't one, create it. ;; generated-autoload-load-name: "semantic/db-typecache" ;; End: -;; arch-tag: cd7c37a8-2006-4ead-a037-977ffe7e7624 ;;; semanticdb-typecache.el ends here diff --git a/lisp/cedet/semantic/db.el b/lisp/cedet/semantic/db.el index 3ce774b0a99..fa8de392b62 100644 --- a/lisp/cedet/semantic/db.el +++ b/lisp/cedet/semantic/db.el @@ -1,7 +1,6 @@ ;;; semantic/db.el --- Semantic tag database manager -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: tags @@ -1040,5 +1039,4 @@ If file does not have tags available, then load the file, and create them." ;; generated-autoload-load-name: "semantic/db" ;; End: -;; arch-tag: d9f75280-737d-494f-9f70-09a649d27433 ;;; semantic/db.el ends here diff --git a/lisp/cedet/semantic/debug.el b/lisp/cedet/semantic/debug.el index 23e443c1d41..ecab73a80dc 100644 --- a/lisp/cedet/semantic/debug.el +++ b/lisp/cedet/semantic/debug.el @@ -1,6 +1,6 @@ ;;; semantic/debug.el --- Language Debugger framework -;; Copyright (C) 2003, 2004, 2005, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2003-2005, 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> @@ -566,5 +566,4 @@ A frame is of the form: ;; generated-autoload-load-name: "semantic/debug" ;; End: -;; arch-tag: 6f189d2d-8a65-45a5-a7f0-9894625eb860 ;;; semantic/debug.el ends here diff --git a/lisp/cedet/semantic/decorate.el b/lisp/cedet/semantic/decorate.el index f28ce1741f1..ee356ad3a9e 100644 --- a/lisp/cedet/semantic/decorate.el +++ b/lisp/cedet/semantic/decorate.el @@ -1,6 +1,6 @@ ;;; semantic/decorate.el --- Utilities for decorating/highlighting tokens. -;;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007, 2009, 2010 +;;; Copyright (C) 1999-2003, 2005-2007, 2009-2011 ;;; Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> @@ -296,5 +296,4 @@ OVERLAY is passed in by isearch." (provide 'semantic/decorate) -;; arch-tag: 30e5b6cb-dba0-41cd-920a-bc1dce267ad8 ;;; semantic/decorate.el ends here diff --git a/lisp/cedet/semantic/decorate/include.el b/lisp/cedet/semantic/decorate/include.el index 3d6013b7339..0e0a8849d78 100644 --- a/lisp/cedet/semantic/decorate/include.el +++ b/lisp/cedet/semantic/decorate/include.el @@ -1,6 +1,6 @@ ;;; semantic/decorate/include.el --- Decoration modes for include statements -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> @@ -773,5 +773,4 @@ If TABLE is not in a buffer, do nothing." ;; generated-autoload-load-name: "semantic/decorate/include" ;; End: -;; arch-tag: c3277137-be3f-43e2-af89-3b14b9bd7479 ;;; semantic/decorate/include.el ends here diff --git a/lisp/cedet/semantic/decorate/mode.el b/lisp/cedet/semantic/decorate/mode.el index 3c7549c6d0c..ea4df472afd 100644 --- a/lisp/cedet/semantic/decorate/mode.el +++ b/lisp/cedet/semantic/decorate/mode.el @@ -1,7 +1,6 @@ ;;; semantic/decorate/mode.el --- Minor mode for decorating tags -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2005, 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: syntax @@ -520,5 +519,4 @@ Use a primary decoration." ;; generated-autoload-load-name: "semantic/decorate/mode" ;; End: -;; arch-tag: c1ac7888-e323-4467-96d6-18eb2820ed58 ;;; semantic/decorate/mode.el ends here diff --git a/lisp/cedet/semantic/dep.el b/lisp/cedet/semantic/dep.el index c05650caec7..e47f82f391f 100644 --- a/lisp/cedet/semantic/dep.el +++ b/lisp/cedet/semantic/dep.el @@ -1,6 +1,6 @@ ;;; semantic/dep.el --- Methods for tracking dependencies (include files) -;; Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2006-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: syntax @@ -231,5 +231,4 @@ provided mode, not from the current major mode." ;; generated-autoload-load-name: "semantic/dep" ;; End: -;; arch-tag: f6975d6a-845f-44c5-9a22-5dfeee46dce2 ;;; semantic/dep.el ends here diff --git a/lisp/cedet/semantic/doc.el b/lisp/cedet/semantic/doc.el index aca01bd9830..e5579d09113 100644 --- a/lisp/cedet/semantic/doc.el +++ b/lisp/cedet/semantic/doc.el @@ -1,7 +1,6 @@ ;;; semantic/doc.el --- Routines for documentation strings -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2005, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1999-2003, 2005, 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: syntax @@ -127,5 +126,4 @@ If NOSNARF is 'lex, then return the lex token." ;; generated-autoload-load-name: "semantic/doc" ;; End: -;; arch-tag: fe6e965b-4a81-4304-aab8-22ca113194ca ;;; semantic/doc.el ends here diff --git a/lisp/cedet/semantic/ede-grammar.el b/lisp/cedet/semantic/ede-grammar.el index 90c72990ca9..a4361053174 100644 --- a/lisp/cedet/semantic/ede-grammar.el +++ b/lisp/cedet/semantic/ede-grammar.el @@ -1,7 +1,6 @@ ;;; semantic/ede-grammar.el --- EDE support for Semantic Grammar Files -;; Copyright (C) 2003, 2004, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2003-2004, 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: project, make diff --git a/lisp/cedet/semantic/edit.el b/lisp/cedet/semantic/edit.el index 0f18d49b7c3..ef206fd3122 100644 --- a/lisp/cedet/semantic/edit.el +++ b/lisp/cedet/semantic/edit.el @@ -1,7 +1,6 @@ ;;; semantic/edit.el --- Edit Management for Semantic -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> @@ -966,5 +965,4 @@ lost if not transferred into NEWTAG." ;; generated-autoload-load-name: "semantic/edit" ;; End: -;; arch-tag: 91c7fbf0-a418-4220-a90a-b58c74b450e3 ;;; semantic/edit.el ends here diff --git a/lisp/cedet/semantic/find.el b/lisp/cedet/semantic/find.el index 0e4b88cd96b..c62ed818945 100644 --- a/lisp/cedet/semantic/find.el +++ b/lisp/cedet/semantic/find.el @@ -1,7 +1,6 @@ ;;; semantic/find.el --- Search routines for Semantic -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1999-2005, 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: syntax @@ -700,5 +699,4 @@ details are available of findable." ;; generated-autoload-load-name: "semantic/find" ;; End: -;; arch-tag: db00c93e-e561-4bd6-942b-96eca5aaa9a6 ;;; semantic/find.el ends here diff --git a/lisp/cedet/semantic/format.el b/lisp/cedet/semantic/format.el index fbdf343f7eb..ecd03ccec73 100644 --- a/lisp/cedet/semantic/format.el +++ b/lisp/cedet/semantic/format.el @@ -1,7 +1,6 @@ ;;; semantic/format.el --- Routines for formatting tags -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2005, 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: syntax @@ -720,5 +719,4 @@ Optional argument COLOR means highlight the prototype with font-lock colors." ;; generated-autoload-load-name: "semantic/format" ;; End: -;; arch-tag: deae500e-20b6-437e-8856-884f6c46bc3e ;;; semantic/format.el ends here diff --git a/lisp/cedet/semantic/fw.el b/lisp/cedet/semantic/fw.el index 811508377b8..ca3015c5941 100644 --- a/lisp/cedet/semantic/fw.el +++ b/lisp/cedet/semantic/fw.el @@ -1,7 +1,6 @@ ;;; semantic/fw.el --- Framework for Semantic -;;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> @@ -395,5 +394,4 @@ FILE, NOWARN, RAWFILE, and WILDCARDS are passed into `find-file-noselect'" (provide 'semantic/fw) -;; arch-tag: e7eeffbf-112b-4665-92fc-5f69479ca2c4 ;;; semantic/fw.el ends here diff --git a/lisp/cedet/semantic/grammar-wy.el b/lisp/cedet/semantic/grammar-wy.el index d50a618fd3b..acaad49f6af 100644 --- a/lisp/cedet/semantic/grammar-wy.el +++ b/lisp/cedet/semantic/grammar-wy.el @@ -1,6 +1,6 @@ ;;; semantic/grammar-wy.el --- Generated parser support file -;; Copyright (C) 2002, 2003, 2004, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2002-2004, 2009-2011 Free Software Foundation, Inc. ;; Author: David Ponce <david@dponce.com> ;; Keywords: syntax @@ -475,5 +475,4 @@ (provide 'semantic/grammar-wy) -;; arch-tag: dd050eb7-84a8-421c-b734-478dd2bd55bc ;;; semantic/grammar-wy.el ends here diff --git a/lisp/cedet/semantic/grammar.el b/lisp/cedet/semantic/grammar.el index 513c211ee75..270668e2959 100644 --- a/lisp/cedet/semantic/grammar.el +++ b/lisp/cedet/semantic/grammar.el @@ -1,7 +1,6 @@ ;;; semantic/grammar.el --- Major mode framework for Semantic grammars -;; Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2002-2005, 2007-2011 Free Software Foundation, Inc. ;; Author: David Ponce <david@dponce.com> ;; Maintainer: David Ponce <david@dponce.com> diff --git a/lisp/cedet/semantic/html.el b/lisp/cedet/semantic/html.el index 7597370dff5..80c0a0ddb95 100644 --- a/lisp/cedet/semantic/html.el +++ b/lisp/cedet/semantic/html.el @@ -1,6 +1,6 @@ ;;; semantic/html.el --- Semantic details for html files -;; Copyright (C) 2004, 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2004-2005, 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> @@ -262,5 +262,4 @@ tag with greater section value than LEVEL is found." ;; generated-autoload-load-name: "semantic/html" ;; End: -;; arch-tag: 2a088b99-4585-46d5-bce8-3a5a8ec5eb2e ;;; semantic/html.el ends here diff --git a/lisp/cedet/semantic/ia-sb.el b/lisp/cedet/semantic/ia-sb.el index 43a54d8f1ab..57067936a90 100644 --- a/lisp/cedet/semantic/ia-sb.el +++ b/lisp/cedet/semantic/ia-sb.el @@ -1,7 +1,6 @@ ;;; semantic/ia-sb.el --- Speedbar analysis display interactor -;;; Copyright (C) 2002, 2003, 2004, 2006, 2008, 2009, 2010 -;;; Free Software Foundation, Inc. +;;; Copyright (C) 2002-2004, 2006, 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: syntax @@ -367,5 +366,4 @@ TEXT TAG and INDENT are the details." ;; generated-autoload-load-name: "semantic/ia-sb" ;; End: -;; arch-tag: 4ab9f509-6978-415f-9938-9266edad9886 ;;; semantic/ia-sb.el ends here diff --git a/lisp/cedet/semantic/ia.el b/lisp/cedet/semantic/ia.el index c7e1458fa3f..69b1dba0bcf 100644 --- a/lisp/cedet/semantic/ia.el +++ b/lisp/cedet/semantic/ia.el @@ -1,7 +1,6 @@ ;;; semantic/ia.el --- Interactive Analysis functions -;;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;;; 2008, 2009, 2010 Free Software Foundation, Inc. +;;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: syntax @@ -445,5 +444,4 @@ parts of the parent classes are displayed." ;; generated-autoload-load-name: "semantic/ia" ;; End: -;; arch-tag: ceeed1f2-e5b6-4f7c-a85a-a2f8ee0193ca ;;; semantic/ia.el ends here diff --git a/lisp/cedet/semantic/idle.el b/lisp/cedet/semantic/idle.el index 585ad693dc8..f17a5471d75 100644 --- a/lisp/cedet/semantic/idle.el +++ b/lisp/cedet/semantic/idle.el @@ -1,7 +1,6 @@ ;;; idle.el --- Schedule parsing tasks in idle time -;; Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2003-2006, 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: syntax @@ -1315,5 +1314,4 @@ mouse-3: popup context menu" ;; generated-autoload-load-name: "semantic/idle" ;; End: -;; arch-tag: 4bfd54da-5023-4cc1-91ae-e1fefc1a8d1b ;;; semantic-idle.el ends here diff --git a/lisp/cedet/semantic/imenu.el b/lisp/cedet/semantic/imenu.el index 465a93a16dd..e7e1da55ce3 100644 --- a/lisp/cedet/semantic/imenu.el +++ b/lisp/cedet/semantic/imenu.el @@ -1,6 +1,6 @@ ;;; semantic/imenu.el --- Use Semantic as an imenu tag generator -;;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2010 +;;; Copyright (C) 2000-2005, 2007-2008, 2010-2011 ;; Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> diff --git a/lisp/cedet/semantic/java.el b/lisp/cedet/semantic/java.el index 099dc1b40c9..4489d0ffae5 100644 --- a/lisp/cedet/semantic/java.el +++ b/lisp/cedet/semantic/java.el @@ -1,7 +1,6 @@ ;;; semantic/java.el --- Semantic functions for Java -;;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: David Ponce <david@dponce.com> @@ -459,5 +458,4 @@ removed from the result list." (provide 'semantic/java) -;; arch-tag: ca14cb88-9343-48a9-9aa0-14d05be8d49f ;;; semantic/java.el ends here diff --git a/lisp/cedet/semantic/lex-spp.el b/lisp/cedet/semantic/lex-spp.el index 0b4fa930b1b..de4cb7a9c62 100644 --- a/lisp/cedet/semantic/lex-spp.el +++ b/lisp/cedet/semantic/lex-spp.el @@ -1,6 +1,6 @@ ;;; lex-spp.el --- Semantic Lexical Pre-processor -;; Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2006-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> @@ -1230,5 +1230,4 @@ If BUFFER is not provided, use the current buffer." ;; generated-autoload-load-name: "semantic/lex-spp" ;; End: -;; arch-tag: 8877d83e-07ea-4d86-a960-e3562138d8a5 ;;; semantic-lex-spp.el ends here diff --git a/lisp/cedet/semantic/lex.el b/lisp/cedet/semantic/lex.el index 34663727a0b..d6b8e1a8bf5 100644 --- a/lisp/cedet/semantic/lex.el +++ b/lisp/cedet/semantic/lex.el @@ -1,7 +1,6 @@ ;;; semantic/lex.el --- Lexical Analyzer builder -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> diff --git a/lisp/cedet/semantic/mru-bookmark.el b/lisp/cedet/semantic/mru-bookmark.el index b723a848c10..47915e8ad58 100644 --- a/lisp/cedet/semantic/mru-bookmark.el +++ b/lisp/cedet/semantic/mru-bookmark.el @@ -1,6 +1,6 @@ ;;; semantic/mru-bookmark.el --- Automatic bookmark tracking -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -401,5 +401,4 @@ Useful for debugging mrub problems." ;; generated-autoload-load-name: "semantic/mru-bookmark" ;; End: -;; arch-tag: 297fa190-2942-460b-941d-f117db4e1fbf ;;; semantic/mru-bookmark.el ends here diff --git a/lisp/cedet/semantic/sb.el b/lisp/cedet/semantic/sb.el index c65fcc42c65..88b0cc33d43 100644 --- a/lisp/cedet/semantic/sb.el +++ b/lisp/cedet/semantic/sb.el @@ -1,7 +1,6 @@ ;;; semantic/sb.el --- Semantic tag display for speedbar -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: syntax @@ -416,5 +415,4 @@ Returns the tag list, or t for an error." (provide 'semantic/sb) -;; arch-tag: 82aa0570-9e27-41a3-a834-2641dbb2f829 ;;; semantic/sb.el ends here diff --git a/lisp/cedet/semantic/scope.el b/lisp/cedet/semantic/scope.el index f2472ef9410..78a1fd049f0 100644 --- a/lisp/cedet/semantic/scope.el +++ b/lisp/cedet/semantic/scope.el @@ -1,6 +1,6 @@ ;;; semantic/scope.el --- Analyzer Scope Calculations -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -814,5 +814,4 @@ hits in order, with the first tag being in the closest scope." ;; generated-autoload-load-name: "semantic/scope" ;; End: -;; arch-tag: 056ab514-3e28-4d6e-84ed-9283dce5a01e ;;; semantic/scope.el ends here diff --git a/lisp/cedet/semantic/senator.el b/lisp/cedet/semantic/senator.el index 76075cfb16c..5399d4d5649 100644 --- a/lisp/cedet/semantic/senator.el +++ b/lisp/cedet/semantic/senator.el @@ -1,7 +1,6 @@ ;;; semantic/senator.el --- SEmantic NAvigaTOR -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; Author: David Ponce <david@dponce.com> ;; Maintainer: FSF @@ -861,5 +860,4 @@ Use a senator search function when semantic isearch mode is enabled." ;; generated-autoload-load-name: "semantic/senator" ;; End: -;; arch-tag: 397100d0-e2db-467e-8c19-d8d4d99d51f1 ;;; semantic/senator.el ends here diff --git a/lisp/cedet/semantic/sort.el b/lisp/cedet/semantic/sort.el index 064ef19ab9a..d62c3bb17d9 100644 --- a/lisp/cedet/semantic/sort.el +++ b/lisp/cedet/semantic/sort.el @@ -1,7 +1,6 @@ ;;; sort.el --- Utilities for sorting and re-arranging tag tables. -;;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, -;;; 2008, 2009, 2010 Free Software Foundation, Inc. +;;; Copyright (C) 1999-2005, 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: syntax @@ -566,5 +565,4 @@ See `semantic-tag-external-class' for details." ;; generated-autoload-load-name: "semantic/sort" ;; End: -;; arch-tag: 9231c8e7-ac7f-4b35-9302-651a02e5fef0 ;;; semantic-sort.el ends here diff --git a/lisp/cedet/semantic/symref.el b/lisp/cedet/semantic/symref.el index 667efede9ad..61006802c0d 100644 --- a/lisp/cedet/semantic/symref.el +++ b/lisp/cedet/semantic/symref.el @@ -1,6 +1,6 @@ ;;; semantic/symref.el --- Symbol Reference API -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> diff --git a/lisp/cedet/semantic/symref/cscope.el b/lisp/cedet/semantic/symref/cscope.el index 606570961bf..b74b0501c28 100644 --- a/lisp/cedet/semantic/symref/cscope.el +++ b/lisp/cedet/semantic/symref/cscope.el @@ -1,6 +1,6 @@ ;;; semantic/symref/cscope.el --- Semantic-symref support via cscope. -;;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> diff --git a/lisp/cedet/semantic/symref/filter.el b/lisp/cedet/semantic/symref/filter.el index 6ba7be01a34..1676e0764d9 100644 --- a/lisp/cedet/semantic/symref/filter.el +++ b/lisp/cedet/semantic/symref/filter.el @@ -1,6 +1,6 @@ ;;; semantic/symref/filter.el --- Filter symbol reference hits for accuracy. -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -137,5 +137,4 @@ Depends on the SRecode Field editing API." (provide 'semantic/symref/filter) -;; arch-tag: 14b9e795-02bf-408b-b375-c3f8ff6a4e38 ;;; semantic/symref/filter.el ends here diff --git a/lisp/cedet/semantic/symref/global.el b/lisp/cedet/semantic/symref/global.el index 89e455d592e..5af42a96581 100644 --- a/lisp/cedet/semantic/symref/global.el +++ b/lisp/cedet/semantic/symref/global.el @@ -1,6 +1,6 @@ ;;; semantic/symref/global.el --- Use GNU Global for symbol references -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -70,5 +70,4 @@ Moves cursor to end of the match." ;; generated-autoload-load-name: "semantic/symref/global" ;; End: -;; arch-tag: 1f061cc0-d8dd-44b1-9de3-3d00cb6e8abe ;;; semantic/symref/global.el ends here diff --git a/lisp/cedet/semantic/symref/grep.el b/lisp/cedet/semantic/symref/grep.el index 521babc1f6e..1571622b29a 100644 --- a/lisp/cedet/semantic/symref/grep.el +++ b/lisp/cedet/semantic/symref/grep.el @@ -1,6 +1,6 @@ ;;; semantic/symref/grep.el --- Symref implementation using find/grep -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -187,5 +187,4 @@ Moves cursor to end of the match." ;; generated-autoload-load-name: "semantic/symref/grep" ;; End: -;; arch-tag: 43d4469d-963c-4094-ac6f-99f7490973ce ;;; semantic/symref/grep.el ends here diff --git a/lisp/cedet/semantic/symref/idutils.el b/lisp/cedet/semantic/symref/idutils.el index 8ec609e9a9f..6098f0265ef 100644 --- a/lisp/cedet/semantic/symref/idutils.el +++ b/lisp/cedet/semantic/symref/idutils.el @@ -1,6 +1,6 @@ ;;; semantic/symref/idutils.el --- Symref implementation for idutils -;;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -72,5 +72,4 @@ Moves cursor to end of the match." ;; generated-autoload-load-name: "semantic/symref/idutils" ;; End: -;; arch-tag: 7e872652-cbe2-4083-a4d3-2a7c88c4c65c ;;; semantic/symref/idutils.el ends here diff --git a/lisp/cedet/semantic/symref/list.el b/lisp/cedet/semantic/symref/list.el index 9be53d90b08..a09928c7dfc 100644 --- a/lisp/cedet/semantic/symref/list.el +++ b/lisp/cedet/semantic/symref/list.el @@ -1,6 +1,6 @@ ;;; semantic/symref/list.el --- Symref Output List UI. -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -189,6 +189,7 @@ Display the references in`semantic-symref-results-mode'." "The current results in a results mode buffer.") (defun semantic-symref-results-mode (results) + ;; FIXME: Use define-derived-mode. "Major-mode for displaying Semantic Symbol Reference RESULTS. RESULTS is an object of class `semantic-symref-results'." (interactive) @@ -204,7 +205,7 @@ RESULTS is an object of class `semantic-symref-results'." (buffer-disable-undo) (set (make-local-variable 'font-lock-global-modes) nil) (font-lock-mode -1) - (run-hooks 'semantic-symref-results-mode-hook) + (run-mode-hooks 'semantic-symref-results-mode-hook) ) (defun semantic-symref-hide-buffer () diff --git a/lisp/cedet/semantic/tag-file.el b/lisp/cedet/semantic/tag-file.el index ab08ea52dd6..17fd3b45356 100644 --- a/lisp/cedet/semantic/tag-file.el +++ b/lisp/cedet/semantic/tag-file.el @@ -1,7 +1,6 @@ ;;; semantic/tag-file.el --- Routines that find files based on tags. -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2005, 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: syntax diff --git a/lisp/cedet/semantic/tag-ls.el b/lisp/cedet/semantic/tag-ls.el index 3fd02949ad7..8f54698d506 100644 --- a/lisp/cedet/semantic/tag-ls.el +++ b/lisp/cedet/semantic/tag-ls.el @@ -1,7 +1,6 @@ ;;; semantic/tag-ls.el --- Language Specific override functions for tags -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2004, 2006-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> @@ -251,5 +250,4 @@ Return the name of TAG found in the toplevel STREAM." ;; generated-autoload-load-name: "semantic/tag-ls" ;; End: -;; arch-tag: 06041439-e4bf-46f9-ab30-7805888d4464 ;;; semantic/tag-ls.el ends here diff --git a/lisp/cedet/semantic/tag-write.el b/lisp/cedet/semantic/tag-write.el index a64791e9521..d54d007f221 100644 --- a/lisp/cedet/semantic/tag-write.el +++ b/lisp/cedet/semantic/tag-write.el @@ -1,6 +1,6 @@ ;;; semantic/tag-write.el --- Write tags to a text stream -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -175,5 +175,4 @@ The VALUE is a list of tags." ;; generated-autoload-load-name: "semantic/tag-write" ;; End: -;; arch-tag: aa2301b3-f0c5-4d73-b456-43eaba5b2198 ;;; semantic/tag-write.el ends here diff --git a/lisp/cedet/semantic/tag.el b/lisp/cedet/semantic/tag.el index 0195a29b66e..cf3f5b603c8 100644 --- a/lisp/cedet/semantic/tag.el +++ b/lisp/cedet/semantic/tag.el @@ -1,7 +1,6 @@ ;;; semantic/tag.el --- tag creation and access -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2005, 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> @@ -1369,5 +1368,4 @@ and `semantic-tag-type-interfaces' instead" "23.2") ;; generated-autoload-load-name: "semantic/tag" ;; End: -;; arch-tag: f7813634-c4f0-4817-a487-cbaa84333353 ;;; semantic/tag.el ends here diff --git a/lisp/cedet/semantic/texi.el b/lisp/cedet/semantic/texi.el index 2879998a1a8..66327cbe2ff 100644 --- a/lisp/cedet/semantic/texi.el +++ b/lisp/cedet/semantic/texi.el @@ -1,7 +1,6 @@ ;;; semantic/texi.el --- Semantic details for Texinfo files -;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2001-2005, 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> @@ -688,5 +687,4 @@ If TAG is nil, it is derived from the deffn under POINT." (provide 'semantic/texi) -;; arch-tag: a8649049-46da-407b-a620-d175c1fedca6 ;;; semantic/texi.el ends here diff --git a/lisp/cedet/semantic/util-modes.el b/lisp/cedet/semantic/util-modes.el index ccfdc1c906e..a08f4a31b30 100644 --- a/lisp/cedet/semantic/util-modes.el +++ b/lisp/cedet/semantic/util-modes.el @@ -1,7 +1,6 @@ ;;; semantic/util-modes.el --- Semantic minor modes -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2000-2005, 2007-2011 Free Software Foundation, Inc. ;; Authors: Eric M. Ludlam <zappo@gnu.org> ;; David Ponce <david@dponce.com> @@ -1011,5 +1010,4 @@ function was called, move the overlay." ;; generated-autoload-load-name: "semantic/util-modes" ;; End: -;; arch-tag: 18f5a3d8-1fd7-4c17-b149-a313c126987d ;;; semantic/util-modes.el ends here diff --git a/lisp/cedet/semantic/util.el b/lisp/cedet/semantic/util.el index 2b3f53a49d3..acf5f95a217 100644 --- a/lisp/cedet/semantic/util.el +++ b/lisp/cedet/semantic/util.el @@ -1,7 +1,6 @@ ;;; semantic/util.el --- Utilities for use with semantic tag tables -;;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, -;;; 2008, 2009, 2010 Free Software Foundation, Inc. +;;; Copyright (C) 1999-2005, 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: syntax @@ -436,5 +435,4 @@ determining which symbols are considered." ;; (require 'semantic/util-modes) -;; arch-tag: eaa7808d-83b9-43fe-adf0-4fb742dcb956 ;;; semantic/util.el ends here diff --git a/lisp/cedet/semantic/wisent.el b/lisp/cedet/semantic/wisent.el index b2641939ab2..04669b99660 100644 --- a/lisp/cedet/semantic/wisent.el +++ b/lisp/cedet/semantic/wisent.el @@ -1,7 +1,6 @@ ;;; semantic/wisent.el --- Wisent - Semantic gateway -;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2001-2007, 2009-2011 Free Software Foundation, Inc. ;; Author: David Ponce <david@dponce.com> ;; Maintainer: David Ponce <david@dponce.com> @@ -343,5 +342,4 @@ the standard function `semantic-parse-region'." (provide 'semantic/wisent) -;; arch-tag: c24ddd69-d41c-4604-8221-29a93fc4fa79 ;;; semantic/wisent.el ends here diff --git a/lisp/cedet/semantic/wisent/comp.el b/lisp/cedet/semantic/wisent/comp.el index 90585399b74..c3243c12923 100644 --- a/lisp/cedet/semantic/wisent/comp.el +++ b/lisp/cedet/semantic/wisent/comp.el @@ -1,7 +1,6 @@ ;;; semantic/wisent/comp.el --- GNU Bison for Emacs - Grammar compiler -;; Copyright (C) 1984, 1986, 1989, 1992, 1995, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2009, 2010 +;; Copyright (C) 1984, 1986, 1989, 1992, 1995, 2000-2007, 2009-2011 ;; Free Software Foundation, Inc. ;; Author: David Ponce <david@dponce.com> diff --git a/lisp/cedet/semantic/wisent/java-tags.el b/lisp/cedet/semantic/wisent/java-tags.el index 4bdb6c74c74..d0647d8e271 100644 --- a/lisp/cedet/semantic/wisent/java-tags.el +++ b/lisp/cedet/semantic/wisent/java-tags.el @@ -1,7 +1,6 @@ ;;; semantic/wisent/java-tags.el --- Java LALR parser for Emacs -;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2001-2006, 2009-2011 Free Software Foundation, Inc. ;; Author: David Ponce <david@dponce.com> ;; Maintainer: David Ponce <david@dponce.com> @@ -121,5 +120,4 @@ Use the alternate LALR(1) parser." ;; generated-autoload-load-name: "semantic/wisent/java-tags" ;; End: -;; arch-tag: 4125e018-58db-4456-b878-e58c602f4add ;;; semantic/wisent/java-tags.el ends here diff --git a/lisp/cedet/semantic/wisent/javascript.el b/lisp/cedet/semantic/wisent/javascript.el index df3bbfecaa5..9b261439d1a 100644 --- a/lisp/cedet/semantic/wisent/javascript.el +++ b/lisp/cedet/semantic/wisent/javascript.el @@ -1,6 +1,6 @@ ;;; semantic/wisent/javascript.el --- javascript parser support -;; Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2005, 2009-2011 Free Software Foundation, Inc. ;; Author: Eric Ludlam <zappo@gnu.org> ;; Keywords: syntax @@ -102,5 +102,4 @@ This function overrides `get-local-variables'." ;; generated-autoload-load-name: "semantic/wisent/javascript" ;; End: -;; arch-tag: 15416a3a-84ca-4b3b-a13c-e7a1891ec3ea ;;; semantic/wisent/javascript-jv.el ends here diff --git a/lisp/cedet/semantic/wisent/javat-wy.el b/lisp/cedet/semantic/wisent/javat-wy.el index 0bd9b5ed2bb..adea4ef6932 100644 --- a/lisp/cedet/semantic/wisent/javat-wy.el +++ b/lisp/cedet/semantic/wisent/javat-wy.el @@ -1,6 +1,6 @@ ;;; semantic/wisent/javat-wy.el --- Generated parser support file -;; Copyright (C) 2002, 2007, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2007, 2009-2011 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. @@ -679,5 +679,4 @@ It ignores whitespaces, newlines and comments." (provide 'semantic/wisent/javat-wy) -;; arch-tag: b035ba00-e014-4c71-9bc7-a9dbf3d5b911 ;;; semantic/wisent/javat-wy.el ends here diff --git a/lisp/cedet/semantic/wisent/js-wy.el b/lisp/cedet/semantic/wisent/js-wy.el index abe989ace4d..e982caf4485 100644 --- a/lisp/cedet/semantic/wisent/js-wy.el +++ b/lisp/cedet/semantic/wisent/js-wy.el @@ -1,6 +1,6 @@ ;;; semantic/wisent/js-wy.el --- Generated parser support file -;; Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2005, 2009-2011 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. @@ -488,5 +488,4 @@ (provide 'semantic/wisent/js-wy) -;; arch-tag: ff9ecf05-18e6-46a6-a3bb-e7f43f04640f ;;; semantic/wisent/js-wy.el ends here diff --git a/lisp/cedet/semantic/wisent/python-wy.el b/lisp/cedet/semantic/wisent/python-wy.el index 264ebe9bb7b..3a69078b02c 100644 --- a/lisp/cedet/semantic/wisent/python-wy.el +++ b/lisp/cedet/semantic/wisent/python-wy.el @@ -1,7 +1,6 @@ ;;; semantic/wisent/python-wy.el --- Generated parser support file -;; Copyright (C) 2002, 2003, 2004, 2007, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2002-2004, 2007, 2010-2011 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. diff --git a/lisp/cedet/semantic/wisent/python.el b/lisp/cedet/semantic/wisent/python.el index 122e1bfb353..095a817f08d 100644 --- a/lisp/cedet/semantic/wisent/python.el +++ b/lisp/cedet/semantic/wisent/python.el @@ -1,7 +1,6 @@ ;;; wisent-python.el --- Semantic support for Python -;; Copyright (C) 2002, 2004, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2002, 2004, 2006-2011 Free Software Foundation, Inc. ;; Author: Richard Kim <emacs18@gmail.com> ;; Maintainer: Richard Kim <emacs18@gmail.com> diff --git a/lisp/cedet/semantic/wisent/wisent.el b/lisp/cedet/semantic/wisent/wisent.el index c34f6ab335a..8c17d4ccab4 100644 --- a/lisp/cedet/semantic/wisent/wisent.el +++ b/lisp/cedet/semantic/wisent/wisent.el @@ -1,7 +1,6 @@ ;;; semantic/wisent/wisent.el --- GNU Bison for Emacs - Runtime -;;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 -;;; Free Software Foundation, Inc. +;;; Copyright (C) 2002-2007, 2009-2011 Free Software Foundation, Inc. ;; Author: David Ponce <david@dponce.com> ;; Maintainer: David Ponce <david@dponce.com> @@ -476,5 +475,4 @@ automaton has only one entry point." (provide 'semantic/wisent/wisent) -;; arch-tag: c299c5a4-d96f-4f1c-8307-ef2af3c8bdcb ;;; semantic/wisent/wisent.el ends here diff --git a/lisp/cedet/srecode.el b/lisp/cedet/srecode.el index f27a2028b92..7b499d1a5e7 100644 --- a/lisp/cedet/srecode.el +++ b/lisp/cedet/srecode.el @@ -1,6 +1,6 @@ ;;; srecode.el --- Semantic buffer evaluator. -;;; Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;;; Copyright (C) 2005, 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: codegeneration @@ -52,5 +52,4 @@ (provide 'srecode) -;; arch-tag: 6c671a1c-40e5-4ed3-ab05-84249c3afdaf ;;; srecode.el ends here diff --git a/lisp/cedet/srecode/args.el b/lisp/cedet/srecode/args.el index bb15bf50110..d8e02f978b2 100644 --- a/lisp/cedet/srecode/args.el +++ b/lisp/cedet/srecode/args.el @@ -1,6 +1,6 @@ ;;; srecode/args.el --- Provide some simple template arguments -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -186,4 +186,3 @@ do not contain any text from preceding or following text." ;;; srecode/args.el ends here -;; arch-tag: 645fc31e-30a9-469b-9215-fb320a46ee96 diff --git a/lisp/cedet/srecode/compile.el b/lisp/cedet/srecode/compile.el index de9b6f56de3..0a117bad9bc 100644 --- a/lisp/cedet/srecode/compile.el +++ b/lisp/cedet/srecode/compile.el @@ -1,6 +1,6 @@ ;;; srecode/compile --- Compilation of srecode template files. -;; Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2005, 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: codegeneration @@ -654,5 +654,4 @@ Argument INDENT specifies the indentation level for the list." ;; generated-autoload-load-name: "srecode/compile" ;; End: -;; arch-tag: d993ffab-2704-4bb2-bd92-eafe803af3be ;;; srecode/compile.el ends here diff --git a/lisp/cedet/srecode/cpp.el b/lisp/cedet/srecode/cpp.el index 7fe2bdaa410..a46e8369c6c 100644 --- a/lisp/cedet/srecode/cpp.el +++ b/lisp/cedet/srecode/cpp.el @@ -1,6 +1,6 @@ ;;; srecode/cpp.el --- C++ specific handlers for Semantic Recoder -;; Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> ;; Jan Moringen <scymtym@users.sourceforge.net> @@ -213,5 +213,4 @@ special behavior for tag of classes include, using and function." ;; generated-autoload-load-name: "srecode/cpp" ;; End: -;; arch-tag: 4659755c-88b4-405e-818f-bb1f776a8e82 ;;; srecode/cpp.el ends here diff --git a/lisp/cedet/srecode/ctxt.el b/lisp/cedet/srecode/ctxt.el index e14cb5720d3..cae52428e75 100644 --- a/lisp/cedet/srecode/ctxt.el +++ b/lisp/cedet/srecode/ctxt.el @@ -1,6 +1,6 @@ ;;; srecode/ctxt.el --- Derive a context from the source buffer. -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -244,5 +244,4 @@ This might add the following: (provide 'srecode/ctxt) -;; arch-tag: 5a004702-28e5-4e26-9b14-8a78eae49865 ;;; srecode/ctxt.el ends here diff --git a/lisp/cedet/srecode/dictionary.el b/lisp/cedet/srecode/dictionary.el index cd97c880595..06496160b8c 100644 --- a/lisp/cedet/srecode/dictionary.el +++ b/lisp/cedet/srecode/dictionary.el @@ -1,6 +1,6 @@ ;;; srecode-dictionary.el --- Dictionary code for the semantic recoder. -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -708,5 +708,4 @@ STATE is the current compiler state." (provide 'srecode/dictionary) -;; arch-tag: c664179c-171c-4709-9b56-d5a2fd30e457 ;;; srecode/dictionary.el ends here diff --git a/lisp/cedet/srecode/document.el b/lisp/cedet/srecode/document.el index 2d551a5f768..bccc85fb82b 100644 --- a/lisp/cedet/srecode/document.el +++ b/lisp/cedet/srecode/document.el @@ -1,6 +1,6 @@ ;;; srecode/document.el --- Documentation (comment) generation -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -837,5 +837,4 @@ not account for verb parts." ;; generated-autoload-load-name: "srecode/document" ;; End: -;; arch-tag: 5ce9b30b-7862-4ab8-b3f8-a4df37a2e0fe ;;; srecode/document.el ends here diff --git a/lisp/cedet/srecode/el.el b/lisp/cedet/srecode/el.el index adce8e62897..03ea9773666 100644 --- a/lisp/cedet/srecode/el.el +++ b/lisp/cedet/srecode/el.el @@ -1,6 +1,6 @@ ;;; srecode/el.el --- Emacs Lisp specific arguments -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -109,5 +109,4 @@ Calls `srecode-semantic-apply-tag-to-dict-default' first." ;; generated-autoload-load-name: "srecode/el" ;; End: -;; arch-tag: c1852a36-d45b-4263-8f3e-03f4f3c795d9 ;;; srecode/el.el ends here diff --git a/lisp/cedet/srecode/expandproto.el b/lisp/cedet/srecode/expandproto.el index e0e70ec2684..89dc9adcefc 100644 --- a/lisp/cedet/srecode/expandproto.el +++ b/lisp/cedet/srecode/expandproto.el @@ -1,6 +1,6 @@ ;;; srecode/expandproto.el --- Expanding prototypes. -;; Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -129,5 +129,4 @@ ;; generated-autoload-load-name: "srecode/expandproto" ;; End: -;; arch-tag: f0371b5f-9bec-46a1-9b5d-8dff0e897426 ;;; srecode/expandproto.el ends here diff --git a/lisp/cedet/srecode/extract.el b/lisp/cedet/srecode/extract.el index 90eda533335..dba4b876edb 100644 --- a/lisp/cedet/srecode/extract.el +++ b/lisp/cedet/srecode/extract.el @@ -1,6 +1,6 @@ ;;; srecode/extract.el --- Extract content from previously inserted macro. -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -239,5 +239,4 @@ Return nil if nothing was extracted." (provide 'srecode/extract) -;; arch-tag: 051f5901-46ae-4319-8c84-16daf971e226 ;;; srecode/extract.el ends here diff --git a/lisp/cedet/srecode/fields.el b/lisp/cedet/srecode/fields.el index ceb5f77f87f..088781cfb53 100644 --- a/lisp/cedet/srecode/fields.el +++ b/lisp/cedet/srecode/fields.el @@ -1,6 +1,6 @@ ;;; srecode/fields.el --- Handling type-in fields in a buffer. ;; -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -447,5 +447,4 @@ PRE-LEN is used in the after mode for the length of the changed text." (provide 'srecode/fields) -;; arch-tag: 00cea6f0-42ac-4b15-b778-46e6db0bfcb5 ;;; srecode/fields.el ends here diff --git a/lisp/cedet/srecode/filters.el b/lisp/cedet/srecode/filters.el index 5fd6ebb344a..cc942e53ffd 100644 --- a/lisp/cedet/srecode/filters.el +++ b/lisp/cedet/srecode/filters.el @@ -1,6 +1,6 @@ ;;; srecode/filters.el --- Filters for use in template variables. -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -54,4 +54,3 @@ ;;; srecode/filters.el ends here -;; arch-tag: fcc95ddc-8d9a-4b15-bb51-2707ead986c7 diff --git a/lisp/cedet/srecode/find.el b/lisp/cedet/srecode/find.el index 9c5a897fc4f..fdca64a7da1 100644 --- a/lisp/cedet/srecode/find.el +++ b/lisp/cedet/srecode/find.el @@ -1,6 +1,6 @@ ;;;; srecode/find.el --- Tools for finding templates in the database. -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -278,5 +278,4 @@ DEFAULT is what to use if the user presses RET." (provide 'srecode/find) -;; arch-tag: 49d18e58-45a0-48f5-92e1-4a1dcd4e36a6 ;;; srecode/find.el ends here diff --git a/lisp/cedet/srecode/getset.el b/lisp/cedet/srecode/getset.el index a90f3a6d67a..a582d4ff59e 100644 --- a/lisp/cedet/srecode/getset.el +++ b/lisp/cedet/srecode/getset.el @@ -1,6 +1,6 @@ ;;; srecode/getset.el --- Package for inserting new get/set methods. -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -363,5 +363,4 @@ Base selection on the field related to POINT." ;; generated-autoload-load-name: "srecode/getset" ;; End: -;; arch-tag: c2098b7a-df7f-4e8a-a9e3-2be8798a7554 ;;; srecode/getset.el ends here diff --git a/lisp/cedet/srecode/insert.el b/lisp/cedet/srecode/insert.el index 843b577e1eb..931d0b3d73e 100644 --- a/lisp/cedet/srecode/insert.el +++ b/lisp/cedet/srecode/insert.el @@ -1,6 +1,6 @@ ;;; srecode/insert --- Insert srecode templates to an output stream. -;; Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2005, 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> @@ -1020,5 +1020,4 @@ template where a ^ inserter occurs." ;; generated-autoload-load-name: "srecode/insert" ;; End: -;; arch-tag: a5aa3401-924a-4617-8513-2f0f01256872 ;;; srecode/insert.el ends here diff --git a/lisp/cedet/srecode/java.el b/lisp/cedet/srecode/java.el index c4417b24999..69534e053f1 100644 --- a/lisp/cedet/srecode/java.el +++ b/lisp/cedet/srecode/java.el @@ -1,6 +1,6 @@ ;;; srecode-java.el --- Srecode Java support -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -58,5 +58,4 @@ FILENAME_AS_CLASS - file converted to a Java class name." ;; generated-autoload-load-name: "srecode/java" ;; End: -;; arch-tag: d796b86c-3a0e-457c-a346-9f1ccfdc5e2c ;;; srecode/java.el ends here diff --git a/lisp/cedet/srecode/map.el b/lisp/cedet/srecode/map.el index 3a833ca8bb3..126f41eb7f7 100644 --- a/lisp/cedet/srecode/map.el +++ b/lisp/cedet/srecode/map.el @@ -1,6 +1,6 @@ ;;; srecode/map.el --- Manage a template file map -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -415,5 +415,4 @@ Return non-nil if the map changed." ;; generated-autoload-load-name: "srecode/map" ;; End: -;; arch-tag: dc90c737-1e87-455a-bbd1-6b72cdbfb7fd ;;; srecode/map.el ends here diff --git a/lisp/cedet/srecode/mode.el b/lisp/cedet/srecode/mode.el index 32bf665d06c..6ca0cefe9a7 100644 --- a/lisp/cedet/srecode/mode.el +++ b/lisp/cedet/srecode/mode.el @@ -1,6 +1,6 @@ ;;; srecode/mode.el --- Minor mode for managing and using SRecode templates -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -396,5 +396,4 @@ programming modes." ;; generated-autoload-load-name: "srecode/mode" ;; End: -;; arch-tag: 56ad9d6b-899b-4a68-8636-1432b6bc149b ;;; srecode/mode.el ends here diff --git a/lisp/cedet/srecode/semantic.el b/lisp/cedet/srecode/semantic.el index fd8419add67..4a1a15c1d12 100644 --- a/lisp/cedet/srecode/semantic.el +++ b/lisp/cedet/srecode/semantic.el @@ -1,6 +1,6 @@ ;;; srecode/semantic.el --- Semantic specific extensions to SRecode. -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -428,5 +428,4 @@ as `function' will leave point where code might be inserted." (provide 'srecode/semantic) -;; arch-tag: b87ccbd6-bd87-48bc-8182-1043a9052d79 ;;; srecode/semantic.el ends here diff --git a/lisp/cedet/srecode/srt-mode.el b/lisp/cedet/srecode/srt-mode.el index 5fb2433b19e..5a407aad135 100644 --- a/lisp/cedet/srecode/srt-mode.el +++ b/lisp/cedet/srecode/srt-mode.el @@ -1,6 +1,6 @@ ;;; srecode/srt-mode.el --- Major mode for writing screcode macros -;; Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2005, 2007-2011 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. @@ -183,27 +183,20 @@ we can tell font lock about them.") "Keymap used in srecode mode.") ;;;###autoload -(defun srecode-template-mode () +(define-derived-mode srecode-template-mode fundamental-mode "SRecorder" "Major-mode for writing SRecode macros." - (interactive) - (kill-all-local-variables) - (setq major-mode 'srecode-template-mode - mode-name "SRecoder" - comment-start ";;" + (setq comment-start ";;" comment-end "") (set (make-local-variable 'parse-sexp-ignore-comments) t) (set (make-local-variable 'comment-start-skip) "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *") - (set-syntax-table srecode-template-mode-syntax-table) - (use-local-map srecode-template-mode-map) (set (make-local-variable 'font-lock-defaults) '(srecode-font-lock-keywords nil ;; perform string/comment fontification nil ;; keywords are case sensitive. ;; This puts _ & - as a word constituant, ;; simplifying our keywords significantly - ((?_ . "w") (?- . "w")))) - (run-hooks 'srecode-template-mode-hook)) + ((?_ . "w") (?- . "w"))))) ;;;###autoload (defalias 'srt-mode 'srecode-template-mode) @@ -747,5 +740,4 @@ When optional BUFFER is provided, search that buffer." ;; generated-autoload-load-name: "srecode/srt-mode" ;; End: -;; arch-tag: 9c613c25-d885-417a-8f0d-1824b26b22a5 ;;; srecode/srt-mode.el ends here diff --git a/lisp/cedet/srecode/srt-wy.el b/lisp/cedet/srecode/srt-wy.el index 0fa20c7e019..2fb8e7665e9 100644 --- a/lisp/cedet/srecode/srt-wy.el +++ b/lisp/cedet/srecode/srt-wy.el @@ -1,6 +1,6 @@ ;;; srecode/srt-wy.el --- Generated parser support file -;; Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2005, 2007-2011 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. @@ -274,5 +274,4 @@ It ignores whitespace, newlines and comments." (provide 'srecode/srt-wy) -;; arch-tag: 1be4c0bc-2a79-4f75-a07a-1ac518f41271 ;;; srecode/srt-wy.el ends here diff --git a/lisp/cedet/srecode/srt.el b/lisp/cedet/srecode/srt.el index 17ff30e4c93..4ea554f1def 100644 --- a/lisp/cedet/srecode/srt.el +++ b/lisp/cedet/srecode/srt.el @@ -1,6 +1,6 @@ ;;; srecode/srt.el --- argument handlers for SRT files -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -104,5 +104,4 @@ MODE - The mode of this buffer. If not declared yet, guess." (provide 'srecode/srt) -;; arch-tag: fb69da04-0bd6-48fe-b935-f8668420ecaf ;;; srecode/srt.el ends here diff --git a/lisp/cedet/srecode/table.el b/lisp/cedet/srecode/table.el index 2c95d4f6412..52a7765c857 100644 --- a/lisp/cedet/srecode/table.el +++ b/lisp/cedet/srecode/table.el @@ -1,6 +1,6 @@ ;;; srecode/table.el --- Tables of Semantic Recoders -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -259,4 +259,3 @@ Use PREDICATE is the same as for the `sort' function." ;;; srecode/table.el ends here -;; arch-tag: 547d2f1d-2694-49b3-ab13-b2cda6b25b4d diff --git a/lisp/cedet/srecode/template.el b/lisp/cedet/srecode/template.el index 36c7545da33..e0cf42b75df 100644 --- a/lisp/cedet/srecode/template.el +++ b/lisp/cedet/srecode/template.el @@ -1,6 +1,6 @@ ;;; srecode-template.el --- SRecoder template language parser support. -;; Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2005, 2007-2011 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. @@ -72,5 +72,4 @@ ;; generated-autoload-load-name: "srecode/template" ;; End: -;; arch-tag: 037fbca7-e846-4521-b801-3463f50c3080 ;;; srecode/template.el ends here diff --git a/lisp/cedet/srecode/texi.el b/lisp/cedet/srecode/texi.el index 30ba91cadf9..38d8e765d41 100644 --- a/lisp/cedet/srecode/texi.el +++ b/lisp/cedet/srecode/texi.el @@ -1,6 +1,6 @@ ;;; srecode-texi.el --- Srecode texinfo support. -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <eric@siege-engine.com> @@ -285,5 +285,4 @@ that class. ;; generated-autoload-load-name: "srecode/texi" ;; End: -;; arch-tag: 6f0e7f45-2281-49e4-b73c-680cba477094 ;;; srecode/texi.el ends here diff --git a/lisp/chistory.el b/lisp/chistory.el index 3ce1d8dc3f5..09f6e205cdd 100644 --- a/lisp/chistory.el +++ b/lisp/chistory.el @@ -1,7 +1,6 @@ ;;; chistory.el --- list command history -;; Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 2001-2011 Free Software Foundation, Inc. ;; Author: K. Shane Hartman ;; Maintainer: FSF @@ -189,5 +188,4 @@ and runs the normal hook `command-history-hook'." (provide 'chistory) -;; arch-tag: c201a0cd-89f2-4d39-a532-4cb309391dbd ;;; chistory.el ends here diff --git a/lisp/cmuscheme.el b/lisp/cmuscheme.el index 9cf5356fa67..fc1134f03db 100644 --- a/lisp/cmuscheme.el +++ b/lisp/cmuscheme.el @@ -1,7 +1,6 @@ ;;; cmuscheme.el --- Scheme process in a buffer. Adapted from tea.el -;; Copyright (C) 1988, 1994, 1997, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1988, 1994, 1997, 2001-2011 Free Software Foundation, Inc. ;; Author: Olin Shivers <olin.shivers@cs.cmu.edu> ;; Maintainer: FSF @@ -523,5 +522,4 @@ This is a good place to put keybindings." (provide 'cmuscheme) -;; arch-tag: e8795f4a-c496-45a2-97b4-8e0f2a2c57d2 ;;; cmuscheme.el ends here diff --git a/lisp/gnus/color.el b/lisp/color.el index 07044333c4b..5c95fffbfad 100644 --- a/lisp/gnus/color.el +++ b/lisp/color.el @@ -1,6 +1,6 @@ ;;; color.el --- Color manipulation laboratory routines -*- coding: utf-8; -*- -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. ;; Author: Julien Danjou <julien@danjou.info> ;; Keywords: html diff --git a/lisp/comint.el b/lisp/comint.el index b4d06cefafb..711ebce20a3 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1,8 +1,6 @@ ;;; comint.el --- general command interpreter in a window stuff -;; Copyright (C) 1988, 1990, 1992, 1993, 1994, 1995, 1996, 1997, 1998, -;; 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, -;; 2010 Free Software Foundation, Inc. +;; Copyright (C) 1988, 1990, 1992-2011 Free Software Foundation, Inc. ;; Author: Olin Shivers <shivers@cs.cmu.edu> ;; Simon Marshall <simon@gnu.org> @@ -227,9 +225,7 @@ This variable is buffer-local." :group 'comint) (defface comint-highlight-prompt - '((((min-colors 88) (background dark)) (:foreground "cyan1")) - (((background dark)) (:foreground "cyan")) - (t (:foreground "dark blue"))) + '((t :inherit minibuffer-prompt)) "Face to use to highlight prompts." :group 'comint) @@ -609,8 +605,9 @@ mode, Shell mode, etc. This can be done by setting the hooks and `comint-get-old-input' to appropriate functions, and the variable `comint-prompt-regexp' to the appropriate regular expression. -An input history is maintained of size `comint-input-ring-size', and -can be accessed with the commands \\[comint-next-input], \\[comint-previous-input], and \\[comint-dynamic-list-input-ring]. +The mode maintains an input history of size `comint-input-ring-size'. +You can access this with the commands \\[comint-next-input], +\\[comint-previous-input], and \\[comint-dynamic-list-input-ring]. Input ring history expansion can be achieved with the commands \\[comint-replace-by-expanded-history] or \\[comint-magic-space]. Input ring expansion is controlled by the variable `comint-input-autoexpand', @@ -920,41 +917,36 @@ See also `comint-input-ignoredups' and `comint-write-input-ring'." (message "Cannot read history file %s" comint-input-ring-file-name))) (t - (let* ((history-buf (get-buffer-create " *temp*")) - (file comint-input-ring-file-name) + (let* ((file comint-input-ring-file-name) (count 0) (size comint-input-ring-size) (ring (make-ring size))) - (unwind-protect - (with-current-buffer history-buf - (widen) - (erase-buffer) - (insert-file-contents file) - ;; Save restriction in case file is already visited... - ;; Watch for those date stamps in history files! - (goto-char (point-max)) - (let (start end history) - (while (and (< count size) - (re-search-backward comint-input-ring-separator - nil t) - (setq end (match-beginning 0))) - (setq start - (if (re-search-backward comint-input-ring-separator - nil t) - (match-end 0) - (point-min))) - (setq history (buffer-substring start end)) - (goto-char start) - (if (and (not (string-match comint-input-history-ignore - history)) - (or (null comint-input-ignoredups) - (ring-empty-p ring) - (not (string-equal (ring-ref ring 0) - history)))) - (progn - (ring-insert-at-beginning ring history) - (setq count (1+ count))))))) - (kill-buffer history-buf)) + (with-temp-buffer + (insert-file-contents file) + ;; Save restriction in case file is already visited... + ;; Watch for those date stamps in history files! + (goto-char (point-max)) + (let (start end history) + (while (and (< count size) + (re-search-backward comint-input-ring-separator + nil t) + (setq end (match-beginning 0))) + (setq start + (if (re-search-backward comint-input-ring-separator + nil t) + (match-end 0) + (point-min))) + (setq history (buffer-substring start end)) + (goto-char start) + (if (and (not (string-match comint-input-history-ignore + history)) + (or (null comint-input-ignoredups) + (ring-empty-p ring) + (not (string-equal (ring-ref ring 0) + history)))) + (progn + (ring-insert-at-beginning ring history) + (setq count (1+ count))))))) (setq comint-input-ring ring comint-input-ring-index nil))))) @@ -1009,7 +1001,7 @@ See also `comint-read-input-ring'." (choose-completion-string completion buffer))) (defun comint-dynamic-list-input-ring () - "List in help buffer the buffer's input history." + "Display a list of recent inputs entered into the current buffer." (interactive) (if (or (not (ring-p comint-input-ring)) (ring-empty-p comint-input-ring)) @@ -1301,7 +1293,9 @@ than the logical beginning of line." (message "Relative reference exceeds input history size")))) ((or (looking-at "!!?:?\\([0-9^$*-]+\\)") (looking-at "!!")) ;; Just a number of args from the previous input line. - (replace-match (comint-previous-input-string 0) t t) + (replace-match (comint-args (comint-previous-input-string 0) + (match-beginning 1) (match-end 1)) + t t) (message "History item: previous")) ((looking-at "!\\??\\({\\(.+\\)}\\|\\(\\sw+\\)\\)\\(:?[0-9^$*-]+\\)?") @@ -3003,7 +2997,7 @@ Completes if after a filename. See `comint-match-partial-filename' and This function is similar to `comint-replace-by-expanded-filename', except that it won't change parts of the filename already entered in the buffer; it just adds completion characters to the end of the filename. A completions listing -may be shown in a help buffer if completion is ambiguous. +may be shown in a separate buffer if completion is ambiguous. Completion is dependent on the value of `comint-completion-addsuffix', `comint-completion-recexact' and `comint-completion-fignore', and the timing of @@ -3090,11 +3084,11 @@ See `comint-dynamic-complete-filename'. Returns t if successful." (defun comint-replace-by-expanded-filename () "Dynamically expand and complete the filename at point. -Replace the filename with an expanded, canonicalized and completed replacement. -\"Expanded\" means environment variables (e.g., $HOME) and `~'s are replaced -with the corresponding directories. \"Canonicalized\" means `..' and `.' are -removed, and the filename is made absolute instead of relative. For expansion -see `expand-file-name' and `substitute-in-file-name'. For completion see +Replace the filename with an expanded, canonicalized and +completed replacement, i.e. substituting environment +variables (e.g. $HOME), `~'s, `..', and `.', and making the +filename absolute. For expansion see `expand-file-name' and +`substitute-in-file-name'. For completion see `comint-dynamic-complete-filename'." (interactive) (let ((filename (comint-match-partial-filename))) @@ -3105,15 +3099,16 @@ see `expand-file-name' and `substitute-in-file-name'. For completion see (defun comint-dynamic-simple-complete (stub candidates) "Dynamically complete STUB from CANDIDATES list. -This function inserts completion characters at point by completing STUB from -the strings in CANDIDATES. A completions listing may be shown in a help buffer -if completion is ambiguous. +This function inserts completion characters at point by +completing STUB from the strings in CANDIDATES. If completion is +ambiguous, possibly show a completions listing in a separate +buffer. -Returns nil if no completion was inserted. -Returns `sole' if completed with the only completion match. -Returns `shortest' if completed with the shortest of the completion matches. -Returns `partial' if completed as far as possible with the completion matches. -Returns `listed' if a completion listing was shown. +Return nil if no completion was inserted. +Return `sole' if completed with the only completion match. +Return `shortest' if completed with the shortest match. +Return `partial' if completed as far as possible. +Return `listed' if a completion listing was shown. See also `comint-dynamic-complete-filename'." (let* ((completion-ignore-case (memq system-type '(ms-dos windows-nt cygwin))) @@ -3161,7 +3156,7 @@ See also `comint-dynamic-complete-filename'." (defun comint-dynamic-list-filename-completions () - "List in help buffer possible completions of the filename at point." + "Display a list of possible completions for the filename at point." (interactive) (let* ((completion-ignore-case read-file-name-completion-ignore-case) ;; If we bind this, it breaks remote directory tracking in rlogin.el. @@ -3190,9 +3185,9 @@ See also `comint-dynamic-complete-filename'." (defvar comint-dynamic-list-completions-config nil) (defun comint-dynamic-list-completions (completions &optional common-substring) - "List in help buffer sorted COMPLETIONS. + "Display a list of sorted COMPLETIONS. The meaning of COMMON-SUBSTRING is the same as in `display-completion-list'. -Typing SPC flushes the help buffer." +Typing SPC flushes the completions buffer." (let ((window (get-buffer-window "*Completions*" 0))) (setq completions (sort completions 'string-lessp)) (if (and (eq last-command this-command) diff --git a/lisp/completion.el b/lisp/completion.el index 4640ed127f6..128e3a2a489 100644 --- a/lisp/completion.el +++ b/lisp/completion.el @@ -1,7 +1,7 @@ ;;; completion.el --- dynamic word-completion code -;; Copyright (C) 1990, 1993, 1995, 1997, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990, 1993, 1995, 1997, 2001-2011 +;; Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: abbrev convenience @@ -2470,5 +2470,4 @@ TYPE is the type of the wrapper to be added. Can be :before or :under." (provide 'completion) -;; arch-tag: 6990dafe-4abd-4a1f-8c42-ffb25e120f5e ;;; completion.el ends here diff --git a/lisp/composite.el b/lisp/composite.el index da7705cf9eb..878302469ec 100644 --- a/lisp/composite.el +++ b/lisp/composite.el @@ -1,7 +1,7 @@ ;;; composite.el --- support character composition ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 +;; 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 diff --git a/lisp/cus-dep.el b/lisp/cus-dep.el index 230410772ab..5e74c68978f 100644 --- a/lisp/cus-dep.el +++ b/lisp/cus-dep.el @@ -1,7 +1,6 @@ ;;; cus-dep.el --- find customization dependencies ;; -;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997, 2001-2011 Free Software Foundation, Inc. ;; ;; Author: Per Abrahamsen <abraham@dina.kvl.dk> ;; Keywords: internal @@ -172,5 +171,4 @@ Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS" -;; arch-tag: b7b6421a-bf7a-44fd-a382-6f44976bdf68 ;;; cus-dep.el ends here diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 61e6881139a..d43d2607c9a 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -1,7 +1,6 @@ ;;; cus-edit.el --- tools for customizing Emacs and Lisp packages ;; -;; Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-1997, 1999-2011 Free Software Foundation, Inc. ;; ;; Author: Per Abrahamsen <abraham@dina.kvl.dk> ;; Maintainer: FSF @@ -2551,9 +2550,9 @@ try matching its doc string against `custom-guess-doc-alist'." (push (widget-create-child-and-convert widget 'custom-visibility :help-echo "Show the value of this option." - :on-image "down" + :on-glyph "down" :on "Hide" - :off-image "right" + :off-glyph "right" :off "Show Value" :action 'custom-toggle-hide-variable nil) @@ -2573,8 +2572,8 @@ try matching its doc string against `custom-guess-doc-alist'." :help-echo "Hide the value of this option." :on "Hide" :off "Show" - :on-image "down" - :off-image "right" + :on-glyph "down" + :off-glyph "right" :action 'custom-toggle-hide-variable t) buttons) @@ -2603,8 +2602,8 @@ try matching its doc string against `custom-guess-doc-alist'." :help-echo "Hide or show this option." :on "Hide" :off "Show" - :on-image "down" - :off-image "right" + :on-glyph "down" + :off-glyph "right" :action 'custom-toggle-hide-variable t) buttons) @@ -3056,8 +3055,8 @@ to switch between two values." :pressed-face 'custom-visibility :mouse-face 'highlight :pressed-face 'highlight - :on-image nil - :off-image nil) + :on-glyph nil + :off-glyph nil) (defface custom-visibility '((t :height 0.8 :inherit link)) @@ -3120,7 +3119,7 @@ face attributes (as specified by a `default' defface entry)." :pressed-face 'custom-visibility :mouse-face 'highlight :on "Hide Unused Attributes" :off "Show All Attributes" - :on-image nil :off-image nil + :on-glyph nil :off-glyph nil :always-active t :action 'custom-face-edit-value-visibility-action show-all) @@ -3475,7 +3474,7 @@ the present value is saved to its :shown-value property instead." widget 'custom-visibility :help-echo "Hide or show this face." :on "Hide" :off "Show" - :on-image "down" :off-image "right" + :on-glyph "down" :off-glyph "right" :action 'custom-toggle-hide-face (not hiddenp)) buttons) @@ -4426,7 +4425,9 @@ if only the first line of the docstring is shown.")) (unless (eq major-mode 'emacs-lisp-mode) (emacs-lisp-mode)) - (let ((inhibit-read-only t)) + (let ((inhibit-read-only t) + (print-length nil) + (print-level nil)) (custom-save-variables) (custom-save-faces)) (let ((file-precious-flag t)) @@ -4861,5 +4862,4 @@ if that value is non-nil." (provide 'cus-edit) -;; arch-tag: 64533aa4-1b1a-48c3-8812-f9dc718e8a6f ;;; cus-edit.el ends here diff --git a/lisp/cus-face.el b/lisp/cus-face.el index ebb20012afa..0a48c0fbd68 100644 --- a/lisp/cus-face.el +++ b/lisp/cus-face.el @@ -1,7 +1,6 @@ ;;; cus-face.el --- customization support for faces ;; -;; Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-1997, 1999-2011 Free Software Foundation, Inc. ;; ;; Author: Per Abrahamsen <abraham@dina.kvl.dk> ;; Keywords: help, faces @@ -378,5 +377,4 @@ This means reset FACE to its value in FROM-THEME." (provide 'cus-face) -;; arch-tag: 9a5c4b63-0d27-4c92-a5af-f2c7ed764c2b ;;; cus-face.el ends here diff --git a/lisp/cus-start.el b/lisp/cus-start.el index 91aa3edf384..d2d99ee64fb 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el @@ -1,7 +1,6 @@ ;;; cus-start.el --- define customization properties of builtins ;; -;; Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997, 1999-2011 Free Software Foundation, Inc. ;; ;; Author: Per Abrahamsen <abraham@dina.kvl.dk> ;; Keywords: internal @@ -167,12 +166,6 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of (max-mini-window-height limits (choice (const :tag "quarter screen" nil) number) "23.1") - (stack-trace-on-error debug - (choice (const :tag "off") - (repeat :menu-tag "When" - :value (nil) - (symbol :format "%v")) - (const :tag "always" t))) (debug-on-error debug (choice (const :tag "off") (repeat :menu-tag "When" diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el index e6e286f00fa..f29dd9eb213 100644 --- a/lisp/cus-theme.el +++ b/lisp/cus-theme.el @@ -1,7 +1,6 @@ ;;; cus-theme.el -- custom theme creation user interface ;; -;; Copyright (C) 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2001-2011 Free Software Foundation, Inc. ;; ;; Author: Alex Schroeder <alex@gnu.org> ;; Maintainer: FSF @@ -541,7 +540,7 @@ Do not call this mode function yourself. It is meant for internal use." When called from Lisp, BUFFER should be the buffer to use; if omitted, a buffer named *Custom Themes* is used." (interactive) - (pop-to-buffer (get-buffer-create (or buffer "*Custom Themes*"))) + (switch-to-buffer (get-buffer-create (or buffer "*Custom Themes*"))) (let ((inhibit-read-only t)) (erase-buffer)) (custom-theme-choose-mode) @@ -663,5 +662,4 @@ Theme files are named *-theme.el in `")) (widget-toggle-action widget event) (setq custom-theme-allow-multiple-selections (widget-value widget))) -;; arch-tag: cd6919bc-63af-410e-bae2-b6702e762344 ;;; cus-theme.el ends here diff --git a/lisp/custom.el b/lisp/custom.el index bcb78e46a3c..e31948ec4b4 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -1,7 +1,6 @@ ;;; custom.el --- tools for declaring and initializing options ;; -;; Copyright (C) 1996, 1997, 1999, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-1997, 1999, 2001-2011 Free Software Foundation, Inc. ;; ;; Author: Per Abrahamsen <abraham@dina.kvl.dk> ;; Maintainer: FSF @@ -1105,15 +1104,28 @@ property `theme-feature' (which is usually a symbol created by (let ((custom-enabling-themes t)) (enable-theme 'user)))) +(defcustom custom-safe-themes '(default) + "List of themes that are considered safe to load. +Each list element should be the `sha1' hash of a theme file, or +the symbol `default', which stands for any theme in the built-in +Emacs theme directory (a directory named \"themes\" in +`data-directory')." + :type '(repeat + (choice string (const :tag "Built-in themes" default))) + :group 'customize + :risky t + :version "24.1") + (defvar safe-functions) ; From unsafep.el (defun load-theme (theme &optional no-enable) "Load a theme's settings from its file. Normally, this also enables the theme; use `disable-theme' to disable it. If optional arg NO-ENABLE is non-nil, don't enable -the theme." - ;; Note we do no check for validity of the theme here. - ;; This allows to pull in themes by a file-name convention +the theme. + +A theme file is named THEME-theme.el, where THEME is the theme name, +in one of the directories specified by `custom-theme-load-path'." (interactive (list (intern (completing-read "Load custom theme: " @@ -1129,38 +1141,74 @@ the theme." (put theme 'theme-documentation nil)) (let ((fn (locate-file (concat (symbol-name theme) "-theme.el") (custom-theme--load-path) - '("" "c")))) + '("" "c"))) + hash) (unless fn (error "Unable to find theme file for `%s'." theme)) - ;; Instead of simply loading the theme file, read it manually. (with-temp-buffer (insert-file-contents fn) - (require 'unsafep) - (let ((custom--inhibit-theme-enable no-enable) - (safe-functions (append '(custom-theme-set-variables - custom-theme-set-faces) - safe-functions)) - form scar) - (while (setq form (let ((read-circle nil)) - (condition-case nil - (read (current-buffer)) - (end-of-file nil)))) - (cond - ;; Check `deftheme' expressions. - ((eq (setq scar (car form)) 'deftheme) - (unless (eq (cadr form) theme) - (error "Incorrect theme name in `deftheme'")) - (and (symbolp (nth 1 form)) - (stringp (nth 2 form)) - (eval (list scar (nth 1 form) (nth 2 form))))) - ;; Check `provide-theme' expressions. - ((and (eq scar 'provide-theme) - (equal (cadr form) `(quote ,theme)) - (= (length form) 2)) - (eval form)) - ;; All other expressions need to be safe. - ((not (unsafep form)) - (eval form)))))))) + (setq hash (sha1 (current-buffer))) + ;; Check file safety. + (when (or (and (memq 'default custom-safe-themes) + (equal (file-name-directory fn) + (expand-file-name "themes/" data-directory))) + (member hash custom-safe-themes) + ;; If the theme is not in `custom-safe-themes', check + ;; it with unsafep. + (progn + (require 'unsafep) + (let ((safe-functions + (append '(provide-theme deftheme + custom-theme-set-variables + custom-theme-set-faces) + safe-functions)) + unsafep form) + (while (and (setq form (condition-case nil + (let ((read-circle nil)) + (read (current-buffer))) + (end-of-file nil))) + (null (setq unsafep (unsafep form))))) + (or (null unsafep) + (custom-theme-load-confirm hash))))) + (let ((custom--inhibit-theme-enable no-enable)) + (eval-buffer)))))) + +(defun custom-theme-load-confirm (hash) + "Query the user about loading a Custom theme that may not be safe. +The theme should be in the current buffer. If the user agrees, +query also about adding HASH to `custom-safe-themes'." + (if noninteractive + nil + (let ((exit-chars '(?y ?n ?\s)) + prompt char) + (save-window-excursion + (rename-buffer "*Custom Theme*" t) + (emacs-lisp-mode) + (display-buffer (current-buffer)) + (setq prompt + (format "This theme is not guaranteed to be safe. Really load? %s" + (if (< (line-number-at-pos (point-max)) + (window-body-height)) + "(y or n) " + (push ?\C-v exit-chars) + "Type y or n, or C-v to scroll: "))) + (goto-char (point-min)) + (while (null char) + (setq char (read-char-choice prompt exit-chars)) + (when (eq char ?\C-v) + (condition-case nil + (scroll-up) + (error (goto-char (point-min)))) + (setq char nil))) + (when (memq char '(?\s ?y)) + (push hash custom-safe-themes) + ;; Offer to save to `custom-safe-themes'. + (and (or custom-file user-init-file) + (y-or-n-p "Treat this theme as safe for future loads? ") + (let ((coding-system-for-read nil)) + (customize-save-variable 'custom-safe-themes + custom-safe-themes))) + t))))) (defun custom-theme-name-valid-p (name) "Return t if NAME is a valid name for a Custom theme, nil otherwise. @@ -1360,5 +1408,4 @@ This means reset VARIABLE. (The argument IGNORED is ignored)." (provide 'custom) -;; arch-tag: 041b6116-aabe-4f9a-902d-74092bc3dab2 ;;; custom.el ends here diff --git a/lisp/dabbrev.el b/lisp/dabbrev.el index 1127181dca2..00e9cd60cfe 100644 --- a/lisp/dabbrev.el +++ b/lisp/dabbrev.el @@ -1,7 +1,6 @@ ;;; dabbrev.el --- dynamic abbreviation package -;; Copyright (C) 1985, 1986, 1992, 1994, 1996, 1997, 2000, 2001, 2002, -;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 1985-1986, 1992, 1994, 1996-1997, 2000-2011 ;; Free Software Foundation, Inc. ;; Author: Don Morrison @@ -995,5 +994,4 @@ Leaves point at the location of the start of the expansion." (provide 'dabbrev) -;; arch-tag: 29e58596-f080-4306-a409-70296cf9d46f ;;; dabbrev.el ends here diff --git a/lisp/delim-col.el b/lisp/delim-col.el index d0c1223c558..009b179fa49 100644 --- a/lisp/delim-col.el +++ b/lisp/delim-col.el @@ -1,7 +1,6 @@ ;;; delim-col.el --- prettify all columns in a region or rectangle -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> @@ -477,5 +476,4 @@ START and END delimits the corners of text rectangle." (provide 'delim-col) -;; arch-tag: 1cc0c5c5-1b2a-43e4-9ba5-bf9441cfd1a9 ;;; delim-col.el ends here diff --git a/lisp/delsel.el b/lisp/delsel.el index cb5f1c49896..705b64be89d 100644 --- a/lisp/delsel.el +++ b/lisp/delsel.el @@ -1,7 +1,6 @@ ;;; delsel.el --- delete selection if you insert -;; Copyright (C) 1992, 1997, 1998, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1992, 1997-1998, 2001-2011 Free Software Foundation, Inc. ;; Author: Matthieu Devin <devin@lucid.com> ;; Maintainer: FSF @@ -177,5 +176,4 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." (provide 'delsel) -;; arch-tag: 1e388890-1b50-4ed0-9347-763b1343b6ed ;;; delsel.el ends here diff --git a/lisp/descr-text.el b/lisp/descr-text.el index 93c69e0eea5..411fef51bd9 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el @@ -1,7 +1,6 @@ ;;; descr-text.el --- describe text mode -;; Copyright (C) 1994, 1995, 1996, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994-1996, 2001-2011 Free Software Foundation, Inc. ;; Author: Boris Goldowsky <boris@gnu.org> ;; Maintainer: FSF @@ -769,5 +768,4 @@ as well as widgets, buttons, overlays, and text properties." (provide 'descr-text) -;; arch-tag: fc55a498-f3e9-4312-b5bd-98cc02480af1 ;;; descr-text.el ends here diff --git a/lisp/desktop.el b/lisp/desktop.el index b4d3dfd55c8..4ca4cec38ff 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -1,8 +1,6 @@ ;;; desktop.el --- save partial status of Emacs when killed -;; Copyright (C) 1993, 1994, 1995, 1997, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1993-1995, 1997, 2000-2011 Free Software Foundation, Inc. ;; Author: Morten Welinder <terra@diku.dk> ;; Keywords: convenience @@ -1312,5 +1310,4 @@ If there are no buffers left to create, kill the timer." (provide 'desktop) -;; arch-tag: 221907c3-1771-4fd3-9c2e-c6f700c6ede9 ;;; desktop.el ends here diff --git a/lisp/dframe.el b/lisp/dframe.el index 9ca0a260f6d..312f49f6053 100644 --- a/lisp/dframe.el +++ b/lisp/dframe.el @@ -1,8 +1,6 @@ ;;; dframe --- dedicate frame support modes -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1996-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: file, tags, tools diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 764d13f5a9c..6f33831eb38 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -1,7 +1,6 @@ ;;; dired-aux.el --- less commonly used parts of dired -;; Copyright (C) 1985, 1986, 1992, 1994, 1998, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 1985-1986, 1992, 1994, 1998, 2000-2011 ;; Free Software Foundation, Inc. ;; Author: Sebastian Kremer <sk@thp.uni-koeln.de>. @@ -889,55 +888,35 @@ Otherwise, the rule is a compression rule, and compression is done with gzip.") (downcase string) count total (dired-plural-s total)) failures))))) -(defvar dired-query-alist - '((?y . y) (?\040 . y) ; `y' or SPC means accept once - (?n . n) (?\177 . n) ; `n' or DEL skips once - (?! . yes) ; `!' accepts rest - (?q . no) (?\e . no) ; `q' or ESC skips rest - ;; None of these keys quit - use C-g for that. - )) - ;;;###autoload -(defun dired-query (qs-var qs-prompt &rest qs-args) - "Query user and return nil or t. -Store answer in symbol VAR (which must initially be bound to nil). -Format PROMPT with ARGS. -Binding variable `help-form' will help the user who types the help key." - (let* ((char (symbol-value qs-var)) - (action (cdr (assoc char dired-query-alist)))) - (cond ((eq 'yes action) - t) ; accept, and don't ask again - ((eq 'no action) - nil) ; skip, and don't ask again - (t;; no lasting effects from last time we asked - ask now - (let ((cursor-in-echo-area t) - (executing-kbd-macro executing-kbd-macro) - (qprompt (concat qs-prompt - (if help-form - (format " [Type yn!q or %s] " - (key-description - (char-to-string help-char))) - " [Type y, n, q or !] "))) - done result elt) - (while (not done) - (apply 'message qprompt qs-args) - (setq char (set qs-var (read-event))) - (if (numberp char) - (cond ((and executing-kbd-macro (= char -1)) - ;; read-event returns -1 if we are in a kbd - ;; macro and there are no more events in the - ;; macro. Attempt to get an event - ;; interactively. - (setq executing-kbd-macro nil)) - ((eq (key-binding (vector char)) 'keyboard-quit) - (keyboard-quit)) - (t - (setq done (setq elt (assoc char - dired-query-alist))))))) - ;; Display the question with the answer. - (message "%s" (concat (apply 'format qprompt qs-args) - (char-to-string char))) - (memq (cdr elt) '(t y yes))))))) +(defun dired-query (sym prompt &rest args) + "Format PROMPT with ARGS, query user, and store the result in SYM. +The return value is either nil or t. + +The user may type y or SPC to accept once; n or DEL to skip once; +! to accept this and subsequent queries; or q or ESC to decline +this and subsequent queries. + +If SYM is already bound to a non-nil value, this function may +return automatically without querying the user. If SYM is !, +return t; if SYM is q or ESC, return nil." + (let* ((char (symbol-value sym)) + (char-choices '(?y ?\s ?n ?\177 ?! ?q ?\e))) + (cond ((eq char ?!) + t) ; accept, and don't ask again + ((memq char '(?q ?\e)) + nil) ; skip, and don't ask again + (t ; no previous answer - ask now + (setq prompt + (concat (apply 'format prompt args) + (if help-form + (format " [Type yn!q or %s] " + (key-description + (char-to-string help-char))) + " [Type y, n, q or !] "))) + (set sym (setq char (read-char-choice prompt char-choices))) + (if (memq char '(?y ?\s ?!)) t))))) + ;;;###autoload (defun dired-do-compress (&optional arg) @@ -1019,10 +998,14 @@ See Info node `(emacs)Subdir switches' for more details." ;; message much faster than making dired-map-over-marks show progress (dired-uncache (if (consp dired-directory) (car dired-directory) dired-directory)) - (dired-map-over-marks (let ((fname (dired-get-filename))) + (dired-map-over-marks (let ((fname (dired-get-filename)) + ;; Postphone readin hook till we map + ;; over all marked files (Bug#6810). + (dired-after-readin-hook nil)) (message "Redisplaying... %s" fname) (dired-update-file-line fname)) arg) + (run-hooks 'dired-after-readin-hook) (dired-move-to-filename) (message "Redisplaying...done"))) diff --git a/lisp/dired-x.el b/lisp/dired-x.el index 45fdda71356..e0caae059b4 100644 --- a/lisp/dired-x.el +++ b/lisp/dired-x.el @@ -1,7 +1,6 @@ ;;; dired-x.el --- extra Dired functionality -;; Copyright (C) 1993, 1994, 1997, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993-1994, 1997, 2001-2011 Free Software Foundation, Inc. ;; Author: Sebastian Kremer <sk@thp.uni-koeln.de> ;; Lawrence R. Dodd <dodd@roebling.poly.edu> @@ -189,6 +188,12 @@ files and lock files." :type 'regexp :group 'dired-x) +(defcustom dired-omit-verbose t + "When non-nil, show messages when omitting files. +When nil, don't show messages." + :type 'boolean + :group 'dired-x) + (defcustom dired-find-subdir nil ; t is pretty near to DWIM... "If non-nil, Dired always finds a directory in a buffer of its own. If nil, Dired finds the directory as a subdirectory in some other buffer @@ -613,8 +618,9 @@ This functions works by temporarily binding `dired-marker-char' to (not dired-omit-size-limit) (< (buffer-size) dired-omit-size-limit) (progn - (message "Not omitting: directory larger than %d characters." - dired-omit-size-limit) + (when dired-omit-verbose + (message "Not omitting: directory larger than %d characters." + dired-omit-size-limit)) (setq dired-omit-mode nil) nil))) (let ((omit-re (or regexp (dired-omit-regexp))) @@ -622,12 +628,14 @@ This functions works by temporarily binding `dired-marker-char' to count) (or (string= omit-re "") (let ((dired-marker-char dired-omit-marker-char)) - (message "Omitting...") + (when dired-omit-verbose (message "Omitting...")) (if (dired-mark-unmarked-files omit-re nil nil dired-omit-localp) (progn - (setq count (dired-do-kill-lines nil "Omitted %d line%s.")) + (setq count (dired-do-kill-lines + nil + (if dired-omit-verbose "Omitted %d line%s." ""))) (force-mode-line-update)) - (message "(Nothing to omit)")))) + (when dired-omit-verbose (message "(Nothing to omit)"))))) ;; Try to preserve modified state of buffer. So `%*' doesn't appear ;; in mode-line of omitted buffers. (set-buffer-modified-p (and old-modified-p @@ -1821,5 +1829,4 @@ variables `dired-x-variable-list' in the message." ;; generated-autoload-file: "dired.el" ;; End: -;; arch-tag: 71a43ba2-7a00-4793-a028-0613dd7765ae ;;; dired-x.el ends here diff --git a/lisp/dired.el b/lisp/dired.el index 8012fcb472d..02d855a0d33 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1,7 +1,6 @@ ;;; dired.el --- directory-browsing commands -;; Copyright (C) 1985, 1986, 1992, 1993, 1994, 1995, 1996, 1997, 2000, -;; 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 1985-1986, 1992-1997, 2000-2011 ;; Free Software Foundation, Inc. ;; Author: Sebastian Kremer <sk@thp.uni-koeln.de> @@ -26,8 +25,8 @@ ;;; Commentary: -;; This is a major mode for directory browsing and editing. It is -;; documented in the Emacs manual. +;; This is a major mode for directory browsing and editing. +;; It is documented in the Emacs manual. ;; Rewritten in 1990/1991 to add tree features, file marking and ;; sorting by Sebastian Kremer <sk@thp.uni-koeln.de>. @@ -62,35 +61,41 @@ some of the `ls' switches are not supported; see the doc string of :type 'string :group 'dired) -(defvar dired-subdir-switches nil +(defcustom dired-subdir-switches nil "If non-nil, switches passed to `ls' for inserting subdirectories. -If nil, `dired-listing-switches' is used.") - -; Don't use absolute file names as /bin should be in any PATH and people -; may prefer /usr/local/gnu/bin or whatever. However, chown is -; usually not in PATH. +If nil, `dired-listing-switches' is used." + :group 'dired + :type '(choice (const :tag "Use dired-listing-switches" nil) + (string :tag "Switches"))) + +(defcustom dired-chown-program + (purecopy (cond ((executable-find "chown") "chown") + ((file-executable-p "/usr/sbin/chown") "/usr/sbin/chown") + ((file-executable-p "/etc/chown") "/etc/chown") + (t "chown"))) + "Name of chown command (usually `chown')." + :group 'dired + :type 'file) -;;;###autoload -(defvar dired-chown-program - (purecopy - (if (memq system-type '(hpux usg-unix-v irix gnu/linux cygwin)) - "chown" - (if (file-exists-p "/usr/sbin/chown") - "/usr/sbin/chown" - "/etc/chown"))) - "Name of chown command (usually `chown' or `/etc/chown').") - -(defvar dired-use-ls-dired 'unspecified +(defcustom dired-use-ls-dired 'unspecified "Non-nil means Dired should use \"ls --dired\". The special value of `unspecified' means to check explicitly, and save the result in this variable. This is performed the first -time `dired-insert-directory' is called.") +time `dired-insert-directory' is called." + :group 'dired + :type '(choice (const :tag "Check for --dired support" unspecified) + (const :tag "Do not use --dired" nil) + (other :tag "Use --dired" t))) -(defvar dired-chmod-program "chmod" - "Name of chmod command (usually `chmod').") +(defcustom dired-chmod-program "chmod" + "Name of chmod command (usually `chmod')." + :group 'dired + :type 'file) -(defvar dired-touch-program "touch" - "Name of touch command (usually `touch').") +(defcustom dired-touch-program "touch" + "Name of touch command (usually `touch')." + :group 'dired + :type 'file) (defcustom dired-ls-F-marks-symlinks nil "Informs Dired about how `ls -lF' marks symbolic links. @@ -108,7 +113,6 @@ always set this variable to t." :type 'boolean :group 'dired-mark) -;;;###autoload (defcustom dired-trivial-filenames (purecopy "^\\.\\.?$\\|^#") "Regexp of files to skip when finding first file of a directory. A value of nil means move to the subdir line. @@ -756,7 +760,6 @@ for a remote directory. This feature is used by Auto Revert Mode." buffer-read-only (dired-directory-changed-p dirname)))) -;;;###autoload (defcustom dired-auto-revert-buffer nil "Automatically revert dired buffer on revisiting. If t, revisiting an existing dired buffer automatically reverts it. @@ -1142,7 +1145,10 @@ If HDR is non-nil, insert a header line with the directory name." "Reread the dired buffer. Must also be called after `dired-actual-switches' have changed. Should not fail even on completely garbaged buffers. -Preserves old cursor, marks/flags, hidden-p." +Preserves old cursor, marks/flags, hidden-p. + +Dired sets `revert-buffer-function' to this function. The args +ARG and NOCONFIRM, passed from `revert-buffer', are ignored." (widen) ; just in case user narrowed (let ((modflag (buffer-modified-p)) (positions (dired-save-positions)) @@ -2775,7 +2781,8 @@ name, or the marker and a count of marked files." ;; that's possible. (Bug#1806) (split-window-vertically)) ;; Otherwise, try to split WINDOW sensibly. - (split-window-sensibly window))))) + (split-window-sensibly window)))) + pop-up-frames) (pop-to-buffer (get-buffer-create buf))) ;; If dired-shrink-to-fit is t, make its window fit its contents. (when dired-shrink-to-fit @@ -3557,7 +3564,7 @@ Ask means pop up a menu for the user to select one of copy, move or link." ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff -;;;;;; dired-diff) "dired-aux" "dired-aux.el" "1628b7a7d379fb4da8ae4bf29faad4b5") +;;;;;; dired-diff) "dired-aux" "dired-aux.el" "9f5fc434fa6c2607b6e66060862c9caf") ;;; Generated autoloads from dired-aux.el (autoload 'dired-diff "dired-aux" "\ @@ -3718,12 +3725,18 @@ Not documented \(fn FILE)" nil nil) (autoload 'dired-query "dired-aux" "\ -Query user and return nil or t. -Store answer in symbol VAR (which must initially be bound to nil). -Format PROMPT with ARGS. -Binding variable `help-form' will help the user who types the help key. +Format PROMPT with ARGS, query user, and store the result in SYM. +The return value is either nil or t. + +The user may type y or SPC to accept once; n or DEL to skip once; +! to accept this and subsequent queries; or q or ESC to decline +this and subsequent queries. + +If SYM is already bound to a non-nil value, this function may +return automatically without querying the user. If SYM is !, +return t; if SYM is q or ESC, return nil. -\(fn QS-VAR QS-PROMPT &rest QS-ARGS)" nil nil) +\(fn SYM PROMPT &rest ARGS)" nil nil) (autoload 'dired-do-compress "dired-aux" "\ Compress or uncompress marked (or next ARG) files. @@ -4010,7 +4023,7 @@ true then the type of the file linked to by FILE is printed instead. ;;;*** ;;;### (autoloads (dired-do-relsymlink dired-jump) "dired-x" "dired-x.el" -;;;;;; "27c312d6d5d40d8cb4ef8d62e30d5f4a") +;;;;;; "fbac6ae123aaa2b2e9df8bb2cde61ceb") ;;; Generated autoloads from dired-x.el (autoload 'dired-jump "dired-x" "\ diff --git a/lisp/dirtrack.el b/lisp/dirtrack.el index 7a43459f536..b30b7ac146f 100644 --- a/lisp/dirtrack.el +++ b/lisp/dirtrack.el @@ -1,7 +1,6 @@ ;;; dirtrack.el --- Directory Tracking by watching the prompt -;; Copyright (C) 1996, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996, 2001-2011 Free Software Foundation, Inc. ;; Author: Peter Breton <pbreton@cs.umb.edu> ;; Created: Sun Nov 17 1996 diff --git a/lisp/disp-table.el b/lisp/disp-table.el index e9bdd3d9be3..7a9043a6a0a 100644 --- a/lisp/disp-table.el +++ b/lisp/disp-table.el @@ -1,7 +1,7 @@ ;;; disp-table.el --- functions for dealing with char tables -;; Copyright (C) 1987, 1994, 1995, 1999, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1987, 1994-1995, 1999, 2001-2011 +;; Free Software Foundation, Inc. ;; Author: Erik Naggum <erik@naggum.no> ;; Based on a previous version by Howard Gayle @@ -281,5 +281,4 @@ in `.emacs'." (provide 'disp-table) -;; arch-tag: ffe4c28c-960c-47aa-b8a8-ae89d371ffc7 ;;; disp-table.el ends here diff --git a/lisp/dnd.el b/lisp/dnd.el index cbbef384436..19b95016174 100644 --- a/lisp/dnd.el +++ b/lisp/dnd.el @@ -1,7 +1,6 @@ ;;; dnd.el --- drag and drop support. -*- coding: utf-8 -*- -;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2005-2011 Free Software Foundation, Inc. ;; Author: Jan Djärv <jan.h.d@swipnet.se> ;; Maintainer: FSF @@ -135,6 +134,16 @@ Return nil if URI is not a local file." (string-equal system-name-no-dot hostname))) (concat "file://" (substring uri (+ 7 (length hostname))))))) +(defsubst dnd-unescape-uri (uri) + (replace-regexp-in-string + "%[A-Fa-f0-9][A-Fa-f0-9]" + (lambda (arg) + (let ((str (make-string 1 0))) + (aset str 0 (string-to-number (substring arg 1) 16)) + str)) + uri t t)) + +;; http://lists.gnu.org/archive/html/emacs-devel/2006-05/msg01060.html (defun dnd-get-local-file-name (uri &optional must-exist) "Return file name converted from file:/// or file: syntax. URI is the uri for the file. If MUST-EXIST is given and non-nil, @@ -144,21 +153,11 @@ Return nil if URI is not a local file." (substring uri (1- (match-end 0)))) ((string-match "^file:" uri) ; Old KDE, Motif, Sun (substring uri (match-end 0)))))) - (when (and f must-exist) - (setq f (replace-regexp-in-string - "%[A-Fa-f0-9][A-Fa-f0-9]" - (lambda (arg) - (let ((str (make-string 1 0))) - (aset str 0 (string-to-number (substring arg 1) 16)) - str)) - f t t)) - (let* ((decoded-f (decode-coding-string - f - (or file-name-coding-system - default-file-name-coding-system)))) - (setq f (cond ((file-readable-p decoded-f) decoded-f) - ((file-readable-p f) f) - (t nil))))) + (and f (setq f (decode-coding-string (dnd-unescape-uri f) + (or file-name-coding-system + default-file-name-coding-system)))) + (when (and f must-exist (not (file-readable-p f))) + (setq f nil)) f)) (defun dnd-open-local-file (uri action) @@ -227,5 +226,4 @@ TEXT is the text as a string, WINDOW is the window where the drop happened." (provide 'dnd) -;; arch-tag: 0472f6a5-2e8f-4304-9e44-1a0877c771b7 ;;; dnd.el ends here diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 4f183f4b9dc..c67205fd52b 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -1,6 +1,6 @@ ;;; doc-view.el --- View PDF/PostScript/DVI files in Emacs -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; ;; Author: Tassilo Horn <tassilo@member.fsf.org> ;; Maintainer: Tassilo Horn <tassilo@member.fsf.org> @@ -168,6 +168,12 @@ Higher values result in larger images." :type 'number :group 'doc-view) +(defcustom doc-view-image-width 850 + "Default image width. +Has only an effect if imagemagick support is compiled into emacs." + :type 'number + :group 'doc-view) + (defcustom doc-view-dvipdfm-program (executable-find "dvipdfm") "Program to convert DVI files to PDF. @@ -190,6 +196,13 @@ If this and `doc-view-dvipdfm-program' are set, :type 'file :group 'doc-view) +(defcustom doc-view-unoconv-program (executable-find "unoconv") + "Program to convert any file type readable by OpenOffice.org to PDF. + +Needed for viewing OpenOffice.org (and MS Office) files." + :type 'file + :group 'doc-view) + (defcustom doc-view-ps2pdf-program (executable-find "ps2pdf") "Program to convert PS files to PDF. @@ -604,10 +617,12 @@ It's a subdirectory of `doc-view-cache-directory'." ;;;###autoload (defun doc-view-mode-p (type) - "Return non-nil if image type TYPE is available for `doc-view'. -Image types are symbols like `dvi', `postscript' or `pdf'." + "Return non-nil if document type TYPE is available for `doc-view'. +Document types are symbols like `dvi', `ps', `pdf', or `odf' (any +OpenDocument format)." (and (display-graphic-p) - (image-type-available-p 'png) + (or (image-type-available-p 'imagemagick) + (image-type-available-p 'png)) (cond ((eq type 'dvi) (and (doc-view-mode-p 'pdf) @@ -619,6 +634,10 @@ Image types are symbols like `dvi', `postscript' or `pdf'." (eq type 'pdf)) (and doc-view-ghostscript-program (executable-find doc-view-ghostscript-program))) + ((eq type 'odf) + (and doc-view-unoconv-program + (executable-find doc-view-unoconv-program) + (doc-view-mode-p 'pdf))) (t ;; unknown image type nil)))) @@ -629,9 +648,17 @@ Image types are symbols like `dvi', `postscript' or `pdf'." (defun doc-view-enlarge (factor) "Enlarge the document." (interactive (list doc-view-shrink-factor)) - (set (make-local-variable 'doc-view-resolution) - (* factor doc-view-resolution)) - (doc-view-reconvert-doc)) + (if (eq (plist-get (cdr (doc-view-current-image)) :type) + 'imagemagick) + ;; ImageMagick supports on-the-fly-rescaling + (progn + (set (make-local-variable 'doc-view-image-width) + (ceiling (* factor doc-view-image-width))) + (doc-view-insert-image (plist-get (cdr (doc-view-current-image)) :file) + :width doc-view-image-width)) + (set (make-local-variable 'doc-view-resolution) + (ceiling (* factor doc-view-resolution))) + (doc-view-reconvert-doc))) (defun doc-view-shrink (factor) "Shrink the document." @@ -692,6 +719,13 @@ Should be invoked when the cached images aren't up-to-date." (list "-o" pdf dvi) callback))) +(defun doc-view-odf->pdf (odf callback) + "Convert ODF to PDF asynchronously and call CALLBACK when finished. +The converted PDF is put into the current cache directory, and it +is named like ODF with the extension turned to pdf." + (doc-view-start-process "odf->pdf" doc-view-unoconv-program + (list "-f" "pdf" "-o" (doc-view-current-cache-dir) odf) + callback)) (defun doc-view-pdf/ps->png (pdf-ps png) "Convert PDF-PS to PNG asynchronously." @@ -794,6 +828,12 @@ Start by converting PAGES, and then the rest." (doc-view-pdf->txt (expand-file-name "doc.pdf" (doc-view-current-cache-dir)) txt callback)) + (odf + ;; Doc is some ODF (or MS Office) doc. This means that a doc.pdf + ;; already exists in its cache subdirectory. + (doc-view-pdf->txt (expand-file-name "doc.pdf" + (doc-view-current-cache-dir)) + txt callback)) (t (error "DocView doesn't know what to do")))) (defun doc-view-ps->pdf (ps pdf callback) @@ -838,6 +878,24 @@ Those files are saved in the directory given by the function (png-file png-file)) (doc-view-dvi->pdf doc-view-buffer-file-name pdf (lambda () (doc-view-pdf/ps->png pdf png-file))))) + (odf + ;; ODF files have to be converted to PDF before Ghostscript can + ;; process it. + (lexical-let + ((pdf (expand-file-name "doc.pdf" doc-view-current-cache-dir)) + (opdf (expand-file-name (concat (file-name-sans-extension + (file-name-nondirectory doc-view-buffer-file-name)) + ".pdf") + doc-view-current-cache-dir)) + (png-file png-file)) + ;; The unoconv tool only supports a output directory, but no + ;; file name. It's named like the input file with the + ;; extension replaced by pdf. + (doc-view-odf->pdf doc-view-buffer-file-name + (lambda () + ;; Rename to doc.pdf + (rename-file opdf pdf) + (doc-view-pdf/ps->png pdf png-file))))) (pdf (let ((pages (doc-view-active-pages))) ;; Convert PDF to PNG images starting with the active pages. @@ -906,7 +964,11 @@ ARGS is a list of image descriptors." (setq doc-view-pending-cache-flush nil)) (let ((ol (doc-view-current-overlay)) (image (if (and file (file-readable-p file)) - (apply 'create-image file 'png nil args))) + (if (not (fboundp 'imagemagick-types)) + (apply 'create-image file 'png nil args) + (unless (member :width args) + (setq args (append args (list :width doc-view-image-width)))) + (apply 'create-image file 'imagemagick nil args)))) (slice (doc-view-current-slice))) (setf (doc-view-current-image) image) (move-overlay ol (point-min) (point-max)) @@ -999,12 +1061,16 @@ For now these keys are useful: (message "DocView: please wait till conversion finished.") (let ((txt (expand-file-name "doc.txt" (doc-view-current-cache-dir)))) (if (file-readable-p txt) - (find-file txt) + (let ((name (concat "Text contents of " + (file-name-nondirectory buffer-file-name))) + (dir (file-name-directory buffer-file-name))) + (with-current-buffer (find-file txt) + (rename-buffer name) + (setq default-directory dir))) (doc-view-doc->txt txt 'doc-view-open-text))))) ;;;;; Toggle between editing and viewing - (defun doc-view-toggle-display () "Toggle between editing a document as text or viewing it." (interactive) @@ -1015,11 +1081,9 @@ For now these keys are useful: (setq buffer-read-only nil) (remove-overlays (point-min) (point-max) 'doc-view t) (set (make-local-variable 'image-mode-winprops-alist) t) - ;; Switch to the previously used major mode or fall back to fundamental - ;; mode. - (if doc-view-previous-major-mode - (funcall doc-view-previous-major-mode) - (fundamental-mode)) + ;; Switch to the previously used major mode or fall back to + ;; normal mode. + (doc-view-fallback-mode) (doc-view-minor-mode 1)) ;; Switch to doc-view-mode (when (and (buffer-modified-p) @@ -1179,11 +1243,11 @@ If BACKWARD is non-nil, jump to the previous match." (concat "No PNG support is available, or some conversion utility for " (file-name-extension doc-view-buffer-file-name) " files is missing.")) - (if (and (executable-find doc-view-pdftotext-program) - (y-or-n-p - "Unable to render file. View extracted text instead? ")) - (doc-view-open-text) - (doc-view-toggle-display)))) + (when (and (executable-find doc-view-pdftotext-program) + (y-or-n-p + "Unable to render file. View extracted text instead? ")) + (doc-view-open-text)) + (doc-view-toggle-display))) (defvar bookmark-make-record-function) @@ -1206,6 +1270,41 @@ If BACKWARD is non-nil, jump to the previous match." (dolist (x l1) (if (memq x l2) (push x l))) l)) +(defun doc-view-set-doc-type () + "Figure out the current document type (`doc-view-doc-type')." + (let ((name-types + (when buffer-file-name + (cdr (assoc (file-name-extension buffer-file-name) + '( + ;; DVI + ("dvi" dvi) + ;; PDF + ("pdf" pdf) ("epdf" pdf) + ;; PostScript + ("ps" ps) ("eps" ps) + ;; OpenDocument formats + ("odt" odf) ("ods" odf) ("odp" odf) ("odg" odf) + ("odc" odf) ("odi" odf) ("odm" odf) ("ott" odf) + ("ots" odf) ("otp" odf) ("otg" odf) + ;; Microsoft Office formats (also handled + ;; by the odf conversion chain) + ("doc" odf) ("docx" odf) ("xls" odf) ("xlsx" odf) + ("ppt" odf) ("pptx" odf)))))) + (content-types + (save-excursion + (goto-char (point-min)) + (cond + ((looking-at "%!") '(ps)) + ((looking-at "%PDF") '(pdf)) + ((looking-at "\367\002") '(dvi)))))) + (set (make-local-variable 'doc-view-doc-type) + (car (or (doc-view-intersection name-types content-types) + (when (and name-types content-types) + (error "Conflicting types: name says %s but content says %s" + name-types content-types)) + name-types content-types + (error "Cannot determine the document type")))))) + ;;;###autoload (defun doc-view-mode () "Major mode in DocView buffers. @@ -1222,39 +1321,19 @@ toggle between displaying the document or editing it as text. ;; The doc is empty or doesn't exist at all, so fallback to ;; another mode. We used to also check file-exists-p, but this ;; returns nil for tar members. - (let ((auto-mode-alist (remq (rassq 'doc-view-mode auto-mode-alist) - auto-mode-alist))) - (normal-mode)) + (doc-view-fallback-mode) (let* ((prev-major-mode (if (eq major-mode 'doc-view-mode) doc-view-previous-major-mode - major-mode))) + (when (not (memq major-mode + '(doc-view-mode fundamental-mode))) + major-mode)))) (kill-all-local-variables) (set (make-local-variable 'doc-view-previous-major-mode) prev-major-mode)) ;; Figure out the document type. - (let ((name-types - (when buffer-file-name - (cdr (assoc (file-name-extension buffer-file-name) - '(("dvi" dvi) - ("pdf" pdf) - ("epdf" pdf) - ("ps" ps) - ("eps" ps)))))) - (content-types - (save-excursion - (goto-char (point-min)) - (cond - ((looking-at "%!") '(ps)) - ((looking-at "%PDF") '(pdf)) - ((looking-at "\367\002") '(dvi)))))) - (set (make-local-variable 'doc-view-doc-type) - (car (or (doc-view-intersection name-types content-types) - (when (and name-types content-types) - (error "Conflicting types: name says %s but content says %s" - name-types content-types)) - name-types content-types - (error "Cannot determine the document type"))))) + (unless doc-view-doc-type + (doc-view-set-doc-type)) (doc-view-make-safe-dir doc-view-cache-directory) ;; Handle compressed files, remote files, files inside archives @@ -1322,6 +1401,28 @@ toggle between displaying the document or editing it as text. (set (make-local-variable 'view-read-only) nil) (run-mode-hooks 'doc-view-mode-hook))) +(defun doc-view-fallback-mode () + "Fallback to the previous or next best major mode." + (if doc-view-previous-major-mode + (funcall doc-view-previous-major-mode) + (let ((auto-mode-alist (rassq-delete-all + 'doc-view-mode-maybe + (rassq-delete-all 'doc-view-mode + (copy-alist auto-mode-alist))))) + (normal-mode)))) + +;;;###autoload +(defun doc-view-mode-maybe () + "Switch to `doc-view-mode' if possible. +If the required external tools are not available, then fallback +to the next best mode." + (condition-case nil + (doc-view-set-doc-type) + (error (doc-view-fallback-mode))) + (if (doc-view-mode-p doc-view-doc-type) + (doc-view-mode) + (doc-view-fallback-mode))) + ;;;###autoload (define-minor-mode doc-view-minor-mode "Toggle Doc view minor mode. @@ -1380,5 +1481,4 @@ See the command `doc-view-mode' for more information on this mode." ;; mode: outline-minor ;; End: -;; arch-tag: 5d6e5c5e-095f-489e-b4e4-1ca90a7d79be ;;; doc-view.el ends here diff --git a/lisp/dos-fns.el b/lisp/dos-fns.el index b840319113d..5f13555e472 100644 --- a/lisp/dos-fns.el +++ b/lisp/dos-fns.el @@ -1,7 +1,7 @@ ;;; dos-fns.el --- MS-Dos specific functions -;; Copyright (C) 1991, 1993, 1995, 1996, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1991, 1993, 1995-1996, 2001-2011 +;; Free Software Foundation, Inc. ;; Maintainer: Morten Welinder <terra@diku.dk> ;; Keywords: internal @@ -313,5 +313,4 @@ that your video hardware might not support 50-line mode." (provide 'dos-fns) -;; arch-tag: 00b03579-8ebb-4a02-8762-5c5a929774ad ;;; dos-fns.el ends here diff --git a/lisp/dos-vars.el b/lisp/dos-vars.el index e153df3e743..7de2ecb75a6 100644 --- a/lisp/dos-vars.el +++ b/lisp/dos-vars.el @@ -1,7 +1,6 @@ ;;; dos-vars.el --- MS-Dos specific user options -;; Copyright (C) 1998, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: internal @@ -44,5 +43,4 @@ in `standard-display-table' as appropriate for your codepage, if :type '(hook) :version "20.3.3") -;; arch-tag: dce8a0d9-ab29-413f-84ed-8b89d6190546 ;;; dos-vars.el ends here diff --git a/lisp/dos-w32.el b/lisp/dos-w32.el index 0962ae5f13a..20b04e0db34 100644 --- a/lisp/dos-w32.el +++ b/lisp/dos-w32.el @@ -1,7 +1,6 @@ ;; dos-w32.el --- Functions shared among MS-DOS and W32 (NT/95) platforms -;; Copyright (C) 1996, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: Geoff Voelker <voelker@cs.washington.edu> ;; Keywords: internal @@ -458,5 +457,4 @@ indicates a specific program should be invoked." (provide 'dos-w32) -;; arch-tag: dcfefdd2-362f-4fbc-9141-9634f5f4d6a7 ;;; dos-w32.el ends here diff --git a/lisp/double.el b/lisp/double.el index e63b4885b87..4aa8da72af7 100644 --- a/lisp/double.el +++ b/lisp/double.el @@ -1,7 +1,6 @@ ;;; double.el --- support for keyboard remapping with double clicking -;; Copyright (C) 1994, 1997, 1998, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994, 1997-1998, 2001-2011 Free Software Foundation, Inc. ;; Author: Per Abrahamsen <abraham@dina.kvl.dk> ;; Keywords: i18n @@ -169,5 +168,4 @@ when pressed twice. See variable `double-map' for details." (provide 'double) -;; arch-tag: 2e170036-44cb-4493-bc32-ada0a4395221 ;;; double.el ends here diff --git a/lisp/dynamic-setting.el b/lisp/dynamic-setting.el index cfa1053c44d..81531c4a21f 100644 --- a/lisp/dynamic-setting.el +++ b/lisp/dynamic-setting.el @@ -1,6 +1,6 @@ ;;; dynamic-setting.el --- Support dynamic changes -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Jan Djärv <jan.h.d@swipnet.se> ;; Maintainer: FSF @@ -107,4 +107,3 @@ Changes can be (define-key special-event-map [config-changed-event] 'dynamic-setting-handle-config-changed-event) -;; arch-tag: 3a57e78f-1cd6-48b6-ab75-98f160dcc017 diff --git a/lisp/ebuff-menu.el b/lisp/ebuff-menu.el index 6b462a22d1f..dd589cb58f7 100644 --- a/lisp/ebuff-menu.el +++ b/lisp/ebuff-menu.el @@ -1,7 +1,6 @@ ;;; ebuff-menu.el --- electric-buffer-list mode -;; Copyright (C) 1985, 1986, 1994, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985-1986, 1994, 2001-2011 Free Software Foundation, Inc. ;; Author: Richard Mlynarik <mly@ai.mit.edu> ;; Maintainer: FSF diff --git a/lisp/echistory.el b/lisp/echistory.el index ef054543344..1d2c5d8a388 100644 --- a/lisp/echistory.el +++ b/lisp/echistory.el @@ -1,7 +1,6 @@ ;;; echistory.el --- Electric Command History Mode -;; Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 2001-2011 Free Software Foundation, Inc. ;; Author: K. Shane Hartman ;; Maintainer: FSF @@ -150,5 +149,4 @@ The Command History listing is recomputed each time this mode is invoked." (provide 'echistory) -;; arch-tag: 1e5018fe-190f-44a7-9109-a895dcac4c50 ;;; echistory.el ends here diff --git a/lisp/edmacro.el b/lisp/edmacro.el index f98d901ddec..769d7fceb90 100644 --- a/lisp/edmacro.el +++ b/lisp/edmacro.el @@ -1,7 +1,6 @@ ;;; edmacro.el --- keyboard macro editor -;; Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993-1994, 2001-2011 Free Software Foundation, Inc. ;; Author: Dave Gillespie <daveg@synaptics.com> ;; Maintainer: Dave Gillespie <daveg@synaptics.com> @@ -785,5 +784,4 @@ This function assumes that the events can be stored in a string." (provide 'edmacro) -;; arch-tag: 726807b4-3ae6-49de-b0ae-b9590973e0d7 ;;; edmacro.el ends here diff --git a/lisp/ehelp.el b/lisp/ehelp.el index 63ec3838d32..7745957b4c3 100644 --- a/lisp/ehelp.el +++ b/lisp/ehelp.el @@ -1,7 +1,6 @@ ;;; ehelp.el --- bindings for electric-help mode -;; Copyright (C) 1986, 1995, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1986, 1995, 2000-2011 Free Software Foundation, Inc. ;; Author: Richard Mlynarik ;; (according to ack.texi and authors.el) @@ -426,5 +425,4 @@ will select it.)" (provide 'ehelp) -;; arch-tag: e0e3037f-42c0-433e-ba18-322c5d951f46 ;;; ehelp.el ends here diff --git a/lisp/electric.el b/lisp/electric.el index 3ffd94d7e12..7682c566332 100644 --- a/lisp/electric.el +++ b/lisp/electric.el @@ -1,7 +1,6 @@ ;;; electric.el --- window maker and Command loop for `electric' modes -;; Copyright (C) 1985, 1986, 1995, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985-1986, 1995, 2001-2011 Free Software Foundation, Inc. ;; Author: K. Shane Hartman ;; Maintainer: FSF @@ -221,7 +220,8 @@ Returns nil when we can't find this char." (let ((before (copy-marker (1- pos) t))) (save-excursion (unless (memq indent-line-function - '(indent-relative indent-relative-maybe)) + '(indent-relative indent-to-left-margin + indent-relative-maybe)) ;; Don't reindent the previous line if the indentation function ;; is not a real one. (goto-char before) @@ -235,7 +235,8 @@ Returns nil when we can't find this char." ;; Remove the trailing whitespace after indentation because ;; indentation may (re)introduce the whitespace. (delete-horizontal-space t)))) - (indent-according-to-mode)))) + (unless (memq indent-line-function '(indent-to-left-margin)) + (indent-according-to-mode))))) ;;;###autoload (define-minor-mode electric-indent-mode @@ -383,5 +384,4 @@ one of those symbols.") (provide 'electric) -;; arch-tag: dae045eb-dc2d-4fb7-9f27-9cc2ce277be8 ;;; electric.el ends here diff --git a/lisp/elide-head.el b/lisp/elide-head.el index 9cf0b8aaa05..5d640f629e8 100644 --- a/lisp/elide-head.el +++ b/lisp/elide-head.el @@ -1,7 +1,6 @@ ;;; elide-head.el --- hide headers in files -;; Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2001-2011 Free Software Foundation, Inc. ;; Author: Dave Love <fx@gnu.org> ;; Keywords: outlines tools @@ -119,5 +118,4 @@ This is suitable as an entry on `find-file-hook' or appropriate mode hooks." (provide 'elide-head) -;; arch-tag: a00e6b5b-6aeb-45b1-b734-63e23df80928 ;;; elide-head.el ends here diff --git a/lisp/emacs-lisp/.gitignore b/lisp/emacs-lisp/.gitignore index 88830a1c6e8..133e79e817a 100644 --- a/lisp/emacs-lisp/.gitignore +++ b/lisp/emacs-lisp/.gitignore @@ -1,3 +1,2 @@ !*-loaddefs.el -# arch-tag: d0a60bce-b886-4817-b4c3-9a81ba0308bc diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el index 578e0877d30..915a726ae11 100644 --- a/lisp/emacs-lisp/advice.el +++ b/lisp/emacs-lisp/advice.el @@ -1,7 +1,6 @@ ;;; advice.el --- an overloading mechanism for Emacs Lisp functions -;; Copyright (C) 1993, 1994, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993-1994, 2000-2011 Free Software Foundation, Inc. ;; Author: Hans Chalupsky <hans@cs.buffalo.edu> ;; Maintainer: FSF @@ -3008,9 +3007,7 @@ in any of these classes." (setq usage (if (null usage) t (setq origdoc (cdr usage)) (car usage))) (if origdoc (setq paragraphs (list origdoc))) (unless (eq style 'plain) - (push (propertize (concat "This " origtype " is advised.") - 'face 'font-lock-warning-face) - paragraphs)) + (push (concat "This " origtype " is advised.") paragraphs)) (ad-dolist (class ad-advice-classes) (ad-dolist (advice (ad-get-enabled-advices function class)) (setq advice-docstring @@ -3966,5 +3963,4 @@ Use only in REAL emergencies." (provide 'advice) -;; arch-tag: 29f8c9a1-8c88-471f-95d7-e28541c6b7c0 ;;; advice.el ends here diff --git a/lisp/emacs-lisp/assoc.el b/lisp/emacs-lisp/assoc.el index ccab5d90c09..aa85916cc3f 100644 --- a/lisp/emacs-lisp/assoc.el +++ b/lisp/emacs-lisp/assoc.el @@ -1,7 +1,6 @@ ;;; assoc.el --- insert/delete/sort functions on association lists -;; Copyright (C) 1996, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996, 2001-2011 Free Software Foundation, Inc. ;; Author: Barry A. Warsaw <bwarsaw@cen.com> ;; Keywords: extensions @@ -138,5 +137,4 @@ extra values are ignored. Returns the created alist." (provide 'assoc) -;; arch-tag: 3e58bd89-d912-4b74-a0dc-6ed9735922bc ;;; assoc.el ends here diff --git a/lisp/emacs-lisp/authors.el b/lisp/emacs-lisp/authors.el index ae490550021..163af883334 100644 --- a/lisp/emacs-lisp/authors.el +++ b/lisp/emacs-lisp/authors.el @@ -1,7 +1,6 @@ ;;; authors.el --- utility for maintaining Emacs' AUTHORS file -*-coding: utf-8;-*- -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; Author: Gerd Moellmann <gerd@gnu.org> ;; Maintainer: Kim F. Storm <storm@cua.dk> diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 4dd1a118ebd..7b610d11b0f 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -1,8 +1,6 @@ ;; autoload.el --- maintain autoloads in loaddefs.el -;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1991-1997, 2001-2011 Free Software Foundation, Inc. ;; Author: Roland McGrath <roland@gnu.org> ;; Keywords: maint diff --git a/lisp/emacs-lisp/avl-tree.el b/lisp/emacs-lisp/avl-tree.el index cd5bae594d0..0a637da0bc1 100644 --- a/lisp/emacs-lisp/avl-tree.el +++ b/lisp/emacs-lisp/avl-tree.el @@ -1,6 +1,6 @@ ;;; avl-tree.el --- balanced binary trees, AVL-trees -;; Copyright (C) 1995, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995, 2007-2011 Free Software Foundation, Inc. ;; Author: Per Cederqvist <ceder@lysator.liu.se> ;; Inge Wallin <inge@lysator.liu.se> @@ -466,5 +466,4 @@ If there is no such element in the tree, the value is nil." (provide 'avl-tree) -;; arch-tag: 47e26701-43c9-4222-bd79-739eac6357a9 ;;; avl-tree.el ends here diff --git a/lisp/emacs-lisp/backquote.el b/lisp/emacs-lisp/backquote.el index 96e2fb41e89..34e316b2e48 100644 --- a/lisp/emacs-lisp/backquote.el +++ b/lisp/emacs-lisp/backquote.el @@ -1,7 +1,6 @@ ;;; backquote.el --- implement the ` Lisp construct -;; Copyright (C) 1990, 1992, 1994, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990, 1992, 1994, 2001-2011 Free Software Foundation, Inc. ;; Author: Rick Sladkey <jrs@world.std.com> ;; Maintainer: FSF @@ -241,5 +240,4 @@ LEVEL is only used internally and indicates the nesting level: tail)) (t (cons 'list heads))))) -;; arch-tag: 1a26206a-6b5e-4c56-8e24-2eef0f7e0e7a ;;; backquote.el ends here diff --git a/lisp/emacs-lisp/benchmark.el b/lisp/emacs-lisp/benchmark.el index 26c9b4580ce..86063c512c6 100644 --- a/lisp/emacs-lisp/benchmark.el +++ b/lisp/emacs-lisp/benchmark.el @@ -1,7 +1,6 @@ ;;; benchmark.el --- support for benchmarking code -;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2003-2011 Free Software Foundation, Inc. ;; Author: Dave Love <fx@gnu.org> ;; Keywords: lisp, extensions @@ -116,5 +115,4 @@ For non-interactive use see also `benchmark-run' and (provide 'benchmark) -;; arch-tag: be570e24-4b51-4784-adf3-fa2b56c31946 ;;; benchmark.el ends here diff --git a/lisp/emacs-lisp/bindat.el b/lisp/emacs-lisp/bindat.el index 02a16ed3128..fd98b5f41a7 100644 --- a/lisp/emacs-lisp/bindat.el +++ b/lisp/emacs-lisp/bindat.el @@ -1,6 +1,6 @@ ;;; bindat.el --- binary data structure packing and unpacking. -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Author: Kim F. Storm <storm@cua.dk> ;; Assignment name: struct.el @@ -649,5 +649,4 @@ The port (if any) is omitted. IP can be a string, as well." (provide 'bindat) -;; arch-tag: 5e6708c3-03e2-4ad7-9885-5041b779c3fb ;;; bindat.el ends here diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 24b762c9cb7..02107b0e11f 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -1,7 +1,6 @@ ;;; byte-opt.el --- the optimization passes of the emacs-lisp byte compiler -;; Copyright (C) 1991, 1994, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1991, 1994, 2000-2011 Free Software Foundation, Inc. ;; Author: Jamie Zawinski <jwz@lucid.com> ;; Hallvard Furuseth <hbf@ulrik.uio.no> diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index 0388435dbc2..524f4f1b465 100644 --- a/lisp/emacs-lisp/byte-run.el +++ b/lisp/emacs-lisp/byte-run.el @@ -1,7 +1,6 @@ ;;; byte-run.el --- byte-compiler support for inlining -;; Copyright (C) 1992, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1992, 2001-2011 Free Software Foundation, Inc. ;; Author: Jamie Zawinski <jwz@lucid.com> ;; Hallvard Furuseth <hbf@ulrik.uio.no> @@ -292,5 +291,4 @@ In interpreted code, this is entirely equivalent to `progn'." ;; (file-format emacs19))" ;; nil) -;; arch-tag: 76f8328a-1f66-4df2-9b6d-5c3666dc05e9 ;;; byte-run.el ends here diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 82b5ed3367d..be3e1ed617c 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1,7 +1,6 @@ ;;; bytecomp.el --- compilation of Lisp code into byte code -;; Copyright (C) 1985, 1986, 1987, 1992, 1994, 1998, 2000, 2001, 2002, -;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 1985-1987, 1992, 1994, 1998, 2000-2011 ;; Free Software Foundation, Inc. ;; Author: Jamie Zawinski <jwz@lucid.com> @@ -2177,9 +2176,9 @@ list that represents a doc string reference. ;; to objects already output ;; (for instance, gensyms in the arg list). (let (non-nil) - (dotimes (i (length print-number-table)) - (if (aref print-number-table i) - (setq non-nil t))) + (when (hash-table-p print-number-table) + (maphash (lambda (k v) (if v (setq non-nil t))) + print-number-table)) (not non-nil))) ;; Output the byte code and constants specially ;; for lazy dynamic loading. diff --git a/lisp/emacs-lisp/chart.el b/lisp/emacs-lisp/chart.el index 84bfd706afc..01eb1efdc3b 100644 --- a/lisp/emacs-lisp/chart.el +++ b/lisp/emacs-lisp/chart.el @@ -1,7 +1,7 @@ ;;; chart.el --- Draw charts (bar charts, etc) -;; Copyright (C) 1996, 1998, 1999, 2001, 2004, 2005, 2007, 2008, 2009, -;; 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996, 1998-1999, 2001, 2004-2005, 2007-2011 +;; Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Version: 0.2 @@ -62,17 +62,13 @@ (require 'eieio) ;;; Code: -(defvar chart-map (make-sparse-keymap) "Keymap used in chart mode.") +(defvar chart-mode-map (make-sparse-keymap) "Keymap used in chart mode.") +(define-obsolete-variable-alias 'chart-map 'chart-mode-map "24.1") (defvar chart-local-object nil "Local variable containing the locally displayed chart object.") (make-variable-buffer-local 'chart-local-object) -(defvar chart-face-list nil - "Faces used to colorize charts. -List is limited currently, which is ok since you really can't display -too much in text characters anyways.") - (defvar chart-face-color-list '("red" "green" "blue" "cyan" "yellow" "purple") "Colors to use when generating `chart-face-list'. @@ -90,41 +86,42 @@ Useful if new Emacs is used on B&W display.") :group 'eieio :type 'boolean) -(if (and (if (fboundp 'display-color-p) - (display-color-p) - window-system) - (not chart-face-list)) - (let ((cl chart-face-color-list) - (pl chart-face-pixmap-list) - nf) - (while cl - (setq nf (make-face (intern (concat "chart-" (car cl) "-" (car pl))))) - (if (condition-case nil - (> (x-display-color-cells) 4) - (error t)) - (set-face-background nf (car cl)) - (set-face-background nf "white")) - (set-face-foreground nf "black") - (if (and chart-face-use-pixmaps - pl - (fboundp 'set-face-background-pixmap)) - (condition-case nil - (set-face-background-pixmap nf (car pl)) - (error (message "Cannot set background pixmap %s" (car pl))))) - (setq chart-face-list (cons nf chart-face-list)) - (setq cl (cdr cl) - pl (cdr pl))))) - -(defun chart-mode () +(defvar chart-face-list + (if (if (fboundp 'display-color-p) + (display-color-p) + window-system) + (let ((cl chart-face-color-list) + (pl chart-face-pixmap-list) + (faces ()) + nf) + (while cl + (setq nf (make-face + (intern (concat "chart-" (car cl) "-" (car pl))))) + (set-face-background nf (if (condition-case nil + (> (x-display-color-cells) 4) + (error t)) + (car cl) + "white")) + (set-face-foreground nf "black") + (if (and chart-face-use-pixmaps + pl + (fboundp 'set-face-background-pixmap)) + (condition-case nil + (set-face-background-pixmap nf (car pl)) + (error (message "Cannot set background pixmap %s" (car pl))))) + (push nf faces) + (setq cl (cdr cl) + pl (cdr pl))) + faces)) + "Faces used to colorize charts. +List is limited currently, which is ok since you really can't display +too much in text characters anyways.") + +(define-derived-mode chart-mode fundamental-mode "CHART" "Define a mode in Emacs for displaying a chart." - (kill-all-local-variables) - (use-local-map chart-map) - (setq major-mode 'chart-mode - mode-name "CHART") (buffer-disable-undo) (set (make-local-variable 'font-lock-global-modes) nil) - (font-lock-mode -1) - (run-hooks 'chart-mode-hook) + (font-lock-mode -1) ;Isn't it off already? --Stef ) (defun chart-new-buffer (obj) diff --git a/lisp/emacs-lisp/check-declare.el b/lisp/emacs-lisp/check-declare.el index c027f31f3aa..f6ff67a90c3 100644 --- a/lisp/emacs-lisp/check-declare.el +++ b/lisp/emacs-lisp/check-declare.el @@ -1,6 +1,6 @@ ;;; check-declare.el --- Check declare-function statements -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Glenn Morris <rgm@gnu.org> ;; Keywords: lisp, tools, maint @@ -314,5 +314,4 @@ Returns non-nil if any false statements are found." (provide 'check-declare) -;; arch-tag: a4d6cdc4-deb7-4502-b327-0e4ef3d82d96 ;;; check-declare.el ends here. diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 0a3b3c94ff6..2d3b228cbd4 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -1,7 +1,6 @@ ;;; checkdoc.el --- check documentation strings for style requirements -;; Copyright (C) 1997, 1998, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-1998, 2001-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Version: 0.6.2 @@ -1798,7 +1797,9 @@ Replace with \"%s\"? " original replace) (let ((found nil) (start (point)) (msg nil) (ms nil)) (while (and (not msg) (re-search-forward - "[^-([`':a-zA-Z]\\(\\w+[:-]\\(\\w\\|\\s_\\)+\\)[^]']" + ;; Ignore manual page refereces like + ;; git-config(1). + "[^-([`':a-zA-Z]\\(\\w+[:-]\\(\\w\\|\\s_\\)+\\)[^](']" e t)) (setq ms (match-string 1)) ;; A . is a \s_ char, so we must remove periods from diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el index b7c908882ed..885424ec726 100644 --- a/lisp/emacs-lisp/cl-extra.el +++ b/lisp/emacs-lisp/cl-extra.el @@ -1,7 +1,6 @@ ;;; cl-extra.el --- Common Lisp features, part 2 -;; Copyright (C) 1993, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993, 2000-2011 Free Software Foundation, Inc. ;; Author: Dave Gillespie <daveg@synaptics.com> ;; Keywords: extensions @@ -826,5 +825,4 @@ This also does some trivial optimizations to make the form prettier." ;; generated-autoload-file: "cl-loaddefs.el" ;; End: -;; arch-tag: bcd03437-0871-43fb-a8f1-ad0e0b5427ed ;;; cl-extra.el ends here diff --git a/lisp/emacs-lisp/cl-indent.el b/lisp/emacs-lisp/cl-indent.el index 4e7ada8851f..787f276ecae 100644 --- a/lisp/emacs-lisp/cl-indent.el +++ b/lisp/emacs-lisp/cl-indent.el @@ -1,7 +1,6 @@ ;;; cl-indent.el --- enhanced lisp-indent mode -;; Copyright (C) 1987, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1987, 2000-2011 Free Software Foundation, Inc. ;; Author: Richard Mlynarik <mly@eddie.mit.edu> ;; Created: July 1987 @@ -691,5 +690,4 @@ For example, the function `case' has an indent property ;(put 'defclass 'common-lisp-indent-function '((&whole 2 &rest (&whole 2 &rest 1) &rest (&whole 2 &rest 1))) ;(put 'defgeneric 'common-lisp-indent-function 'defun) -;; arch-tag: 7914d50f-92ec-4476-93fc-0f043a380e03 ;;; cl-indent.el ends here diff --git a/lisp/emacs-lisp/cl-loaddefs.el b/lisp/emacs-lisp/cl-loaddefs.el index 74d7432bec6..05bfa0f262e 100644 --- a/lisp/emacs-lisp/cl-loaddefs.el +++ b/lisp/emacs-lisp/cl-loaddefs.el @@ -10,7 +10,7 @@ ;;;;;; ceiling* floor* isqrt lcm gcd cl-progv-before cl-set-frame-visible-p ;;;;;; cl-map-overlays cl-map-intervals cl-map-keymap-recursively ;;;;;; notevery notany every some mapcon mapcan mapl maplist map -;;;;;; cl-mapcar-many equalp coerce) "cl-extra" "cl-extra.el" "20c8c875ff1d11dd819e15a1f25afd73") +;;;;;; cl-mapcar-many equalp coerce) "cl-extra" "cl-extra.el" "60f6b85256416c5f2a0a3954a11523b6") ;;; Generated autoloads from cl-extra.el (autoload 'coerce "cl-extra" "\ @@ -282,7 +282,7 @@ Not documented ;;;;;; do-all-symbols do-symbols dotimes dolist do* do loop return-from ;;;;;; return block etypecase typecase ecase case load-time-value ;;;;;; eval-when destructuring-bind function* defmacro* defun* gentemp -;;;;;; gensym) "cl-macs" "cl-macs.el" "34ea402a8756c7d74d27cdcecf35e3c3") +;;;;;; gensym) "cl-macs" "cl-macs.el" "8b2ce9c2ec0e273606bb37c333c4bdde") ;;; Generated autoloads from cl-macs.el (autoload 'gensym "cl-macs" "\ @@ -754,7 +754,7 @@ surrounded by (block NAME ...). ;;;;;; find nsubstitute-if-not nsubstitute-if nsubstitute substitute-if-not ;;;;;; substitute-if substitute delete-duplicates remove-duplicates ;;;;;; delete-if-not delete-if delete* remove-if-not remove-if remove* -;;;;;; replace fill reduce) "cl-seq" "cl-seq.el" "7b7531276ddf8457abecdd487d3cf0b7") +;;;;;; replace fill reduce) "cl-seq" "cl-seq.el" "43e0c1183e738e1e1038cdd84fde8366") ;;; Generated autoloads from cl-seq.el (autoload 'reduce "cl-seq" "\ diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 725b98354af..bef334b544c 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -1,7 +1,6 @@ ;;; cl-macs.el --- Common Lisp macros -;; Copyright (C) 1993, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993, 2001-2011 Free Software Foundation, Inc. ;; Author: Dave Gillespie <daveg@synaptics.com> ;; Version: 2.02 diff --git a/lisp/emacs-lisp/cl-seq.el b/lisp/emacs-lisp/cl-seq.el index a5070e4acea..fcd21b73de7 100644 --- a/lisp/emacs-lisp/cl-seq.el +++ b/lisp/emacs-lisp/cl-seq.el @@ -1,7 +1,6 @@ ;;; cl-seq.el --- Common Lisp features, part 3 -;; Copyright (C) 1993, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993, 2001-2011 Free Software Foundation, Inc. ;; Author: Dave Gillespie <daveg@synaptics.com> ;; Version: 2.02 @@ -1018,5 +1017,4 @@ Atoms are compared by `eql'; cons cells are compared recursively. ;; generated-autoload-file: "cl-loaddefs.el" ;; End: -;; arch-tag: ec1cc072-9006-4225-b6ba-d6b07ed1710c ;;; cl-seq.el ends here diff --git a/lisp/emacs-lisp/cl-specs.el b/lisp/emacs-lisp/cl-specs.el index 776ce5e9ca1..7359da65e07 100644 --- a/lisp/emacs-lisp/cl-specs.el +++ b/lisp/emacs-lisp/cl-specs.el @@ -1,7 +1,6 @@ ;;; cl-specs.el --- Edebug specs for cl.el -*- no-byte-compile: t -*- -;; Copyright (C) 1993, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993, 2001-2011 Free Software Foundation, Inc. ;; Author: Daniel LaLiberte <liberte@holonexus.org> ;; Keywords: lisp, tools, maint ;; Package: emacs @@ -469,5 +468,4 @@ (def-edebug-spec loop-d-type-spec (&or (loop-d-type-spec . [&or nil loop-d-type-spec]) cl-type-spec)) -;; arch-tag: b29aa3c2-cf67-4af8-9ee1-318fea61b478 ;;; cl-specs.el ends here diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el index 9b275255b27..1d2b82f82eb 100644 --- a/lisp/emacs-lisp/cl.el +++ b/lisp/emacs-lisp/cl.el @@ -1,7 +1,6 @@ ;;; cl.el --- Common Lisp extensions for Emacs -;; Copyright (C) 1993, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993, 2001-2011 Free Software Foundation, Inc. ;; Author: Dave Gillespie <daveg@synaptics.com> ;; Version: 2.02 @@ -676,5 +675,4 @@ If ALIST is non-nil, the new pairs are prepended to it." ;; byte-compile-warnings: (not cl-functions) ;; End: -;; arch-tag: 5f07fa74-f153-4524-9303-21f5be125851 ;;; cl.el ends here diff --git a/lisp/emacs-lisp/copyright.el b/lisp/emacs-lisp/copyright.el index 43eb61b0bee..582785a0e90 100644 --- a/lisp/emacs-lisp/copyright.el +++ b/lisp/emacs-lisp/copyright.el @@ -1,7 +1,6 @@ ;;; copyright.el --- update the copyright notice in current buffer -;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1998, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1991-1995, 1998, 2001-2011 Free Software Foundation, Inc. ;; Author: Daniel Pfeiffer <occitan@esperanto.org> ;; Keywords: maint, tools @@ -47,6 +46,7 @@ This is useful for ChangeLogs." :group 'copyright :type 'boolean :version "23.1") +;;;###autoload(put 'copyright-at-end-flag 'safe-local-variable 'booleanp) (defcustom copyright-regexp "\\(©\\|@copyright{}\\|[Cc]opyright\\s *:?\\s *\\(?:(C)\\)?\ @@ -66,6 +66,11 @@ someone else or to a group for which you do not work." :group 'copyright :type 'regexp) +;; The worst that can happen is a malicious regexp that overflows in +;; the regexp matcher, a minor nuisance. It's a pain to be always +;; prompted if you want to put this in a dir-locals.el. +;;;###autoload(put 'copyright-names-regexp 'safe-local-variable 'stringp) + (defcustom copyright-years-regexp "\\(\\s *\\)\\([1-9]\\([-0-9, ';/*%#\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)" "Match additional copyright notice years. @@ -73,6 +78,19 @@ The second \\( \\) construct must match the years." :group 'copyright :type 'regexp) +;; See "Copyright Notices" in maintain.info. +;; TODO? 'end only for ranges at the end, other for all ranges. +;; Minimum limit on the size of a range? +(defcustom copyright-year-ranges nil + "Non-nil if individual consecutive years should be replaced with a range. +For example: 2005, 2006, 2007, 2008 might be replaced with 2005-2008. +If you use ranges, you should add an explanatory note in a README file. +The function `copyright-fix-year' respects this variable." + :group 'copyright + :type 'boolean + :version "24.1") + +;;;###autoload(put 'copyright-year-ranges 'safe-local-variable 'booleanp) (defcustom copyright-query 'function "If non-nil, ask user before changing copyright. @@ -120,78 +138,88 @@ When this is `function', only ask when called non-interactively." (< (point) (- (point-max) copyright-limit)) (> (point) (+ (point-min) copyright-limit))))) +(defun copyright-find-copyright () + "Return non-nil if a copyright header suitable for updating is found. +The header must match `copyright-regexp' and `copyright-names-regexp', if set. +This function sets the match-data that `copyright-update-year' uses." + (widen) + (goto-char (copyright-start-point)) + (condition-case err + ;; (1) Need the extra \\( \\) around copyright-regexp because we + ;; goto (match-end 1) below. See note (2) below. + (copyright-re-search (concat "\\(" copyright-regexp + "\\)\\([ \t]*\n\\)?.*\\(?:" + copyright-names-regexp "\\)") + (copyright-limit) + t) + ;; In case the regexp is rejected. This is useful because + ;; copyright-update is typically called from before-save-hook where + ;; such an error is very inconvenient for the user. + (error (message "Can't update copyright: %s" err) nil))) + +(defun copyright-find-end () + "Possibly adjust the search performed by `copyright-find-copyright'. +If the years continue onto multiple lines that are marked as comments, +skips to the end of all the years." + (while (save-excursion + (and (eq (following-char) ?,) + (progn (forward-char 1) t) + (progn (skip-chars-forward " \t") (eolp)) + comment-start-skip + (save-match-data + (forward-line 1) + (and (looking-at comment-start-skip) + (goto-char (match-end 0)))) + (looking-at-p copyright-years-regexp))) + (forward-line 1) + (re-search-forward comment-start-skip) + ;; (2) Need the extra \\( \\) so that the years are subexp 3, as + ;; they are at note (1) above. + (re-search-forward (format "\\(%s\\)" copyright-years-regexp)))) + (defun copyright-update-year (replace noquery) - (when - (condition-case err - ;; (1) Need the extra \\( \\) around copyright-regexp because we - ;; goto (match-end 1) below. See note (2) below. - (copyright-re-search (concat "\\(" copyright-regexp - "\\)\\([ \t]*\n\\)?.*\\(?:" - copyright-names-regexp "\\)") - (copyright-limit) - t) - ;; In case the regexp is rejected. This is useful because - ;; copyright-update is typically called from before-save-hook where - ;; such an error is very inconvenient for the user. - (error (message "Can't update copyright: %s" err) nil)) - (goto-char (match-end 1)) - ;; If the years are continued onto multiple lines - ;; that are marked as comments, skip to the end of the years anyway. - (while (save-excursion - (and (eq (following-char) ?,) - (progn (forward-char 1) t) - (progn (skip-chars-forward " \t") (eolp)) - comment-start-skip - (save-match-data - (forward-line 1) - (and (looking-at comment-start-skip) - (goto-char (match-end 0)))) - (looking-at-p copyright-years-regexp))) - (forward-line 1) - (re-search-forward comment-start-skip) - ;; (2) Need the extra \\( \\) so that the years are subexp 3, as - ;; they are at note (1) above. - (re-search-forward (format "\\(%s\\)" copyright-years-regexp))) - - ;; Note that `current-time-string' isn't locale-sensitive. - (setq copyright-current-year (substring (current-time-string) -4)) - (unless (string= (buffer-substring (- (match-end 3) 2) (match-end 3)) - (substring copyright-current-year -2)) - (if (or noquery - (save-window-excursion - (switch-to-buffer (current-buffer)) - ;; Fixes some point-moving oddness (bug#2209). - (save-excursion - (y-or-n-p (if replace - (concat "Replace copyright year(s) by " - copyright-current-year "? ") - (concat "Add " copyright-current-year - " to copyright? ")))))) - (if replace - (replace-match copyright-current-year t t nil 3) - (let ((size (save-excursion (skip-chars-backward "0-9")))) - (if (and (eq (% (- (string-to-number copyright-current-year) - (string-to-number (buffer-substring - (+ (point) size) - (point)))) - 100) - 1) - (or (eq (char-after (+ (point) size -1)) ?-) - (eq (char-after (+ (point) size -2)) ?-))) - ;; This is a range so just replace the end part. - (delete-char size) - ;; Insert a comma with the preferred number of spaces. - (insert - (save-excursion - (if (re-search-backward "[0-9]\\( *, *\\)[0-9]" - (line-beginning-position) t) - (match-string 1) - ", "))) - ;; If people use the '91 '92 '93 scheme, do that as well. - (if (eq (char-after (+ (point) size -3)) ?') - (insert ?'))) - ;; Finally insert the new year. - (insert (substring copyright-current-year size)))))))) + ;; This uses the match-data from copyright-find-copyright/end. + (goto-char (match-end 1)) + (copyright-find-end) + ;; Note that `current-time-string' isn't locale-sensitive. + (setq copyright-current-year (substring (current-time-string) -4)) + (unless (string= (buffer-substring (- (match-end 3) 2) (match-end 3)) + (substring copyright-current-year -2)) + (if (or noquery + (save-window-excursion + (switch-to-buffer (current-buffer)) + ;; Fixes some point-moving oddness (bug#2209). + (save-excursion + (y-or-n-p (if replace + (concat "Replace copyright year(s) by " + copyright-current-year "? ") + (concat "Add " copyright-current-year + " to copyright? ")))))) + (if replace + (replace-match copyright-current-year t t nil 3) + (let ((size (save-excursion (skip-chars-backward "0-9")))) + (if (and (eq (% (- (string-to-number copyright-current-year) + (string-to-number (buffer-substring + (+ (point) size) + (point)))) + 100) + 1) + (or (eq (char-after (+ (point) size -1)) ?-) + (eq (char-after (+ (point) size -2)) ?-))) + ;; This is a range so just replace the end part. + (delete-char size) + ;; Insert a comma with the preferred number of spaces. + (insert + (save-excursion + (if (re-search-backward "[0-9]\\( *, *\\)[0-9]" + (line-beginning-position) t) + (match-string 1) + ", "))) + ;; If people use the '91 '92 '93 scheme, do that as well. + (if (eq (char-after (+ (point) size -3)) ?') + (insert ?'))) + ;; Finally insert the new year. + (insert (substring copyright-current-year size))))))) ;;;###autoload (defun copyright-update (&optional arg interactivep) @@ -208,76 +236,110 @@ interactively." (and (eq copyright-query 'function) interactivep)))) (save-excursion (save-restriction - (widen) - (goto-char (copyright-start-point)) - (copyright-update-year arg noquery) - (goto-char (copyright-start-point)) - (and copyright-current-gpl-version - ;; match the GPL version comment in .el files, including the - ;; bilingual Esperanto one in two-column, and in texinfo.tex - (copyright-re-search - "\\(the Free Software Foundation;\ - either \\|; a\\^u eldono \\([0-9]+\\)a, ? a\\^u (la\\^u via \\)\ -version \\([0-9]+\\), or (at" - (copyright-limit) t) - ;; Don't update if the file is already using a more recent - ;; version than the "current" one. - (< (string-to-number (match-string 3)) - (string-to-number copyright-current-gpl-version)) - (or noquery - (save-match-data - (save-window-excursion - (switch-to-buffer (current-buffer)) - (y-or-n-p (format "Replace GPL version by %s? " - copyright-current-gpl-version))))) - (progn - (if (match-end 2) - ;; Esperanto bilingual comment in two-column.el - (replace-match copyright-current-gpl-version t t nil 2)) - (replace-match copyright-current-gpl-version t t nil 3)))) + ;; If names-regexp doesn't match, we should not mess with + ;; the years _or_ the GPL version. + ;; TODO there may be multiple copyrights we should update. + (when (copyright-find-copyright) + (copyright-update-year arg noquery) + (goto-char (copyright-start-point)) + (and copyright-current-gpl-version + ;; Match the GPL version comment in .el files. + ;; This is sensitive to line-breaks. :( + (copyright-re-search + "the Free Software Foundation[,;\n].*either version \ +\\([0-9]+\\)\\(?: of the License\\)?, or[ \n].*any later version" + (copyright-limit) t) + ;; Don't update if the file is already using a more recent + ;; version than the "current" one. + (< (string-to-number (match-string 1)) + (string-to-number copyright-current-gpl-version)) + (or noquery + (save-match-data + (goto-char (match-end 1)) + (save-window-excursion + (switch-to-buffer (current-buffer)) + (y-or-n-p + (format "Replace GPL version %s with version %s? " + (match-string-no-properties 1) + copyright-current-gpl-version))))) + (replace-match copyright-current-gpl-version t t nil 1)))) (set (make-local-variable 'copyright-update) nil))) ;; If a write-file-hook returns non-nil, the file is presumed to be written. nil)) -;; FIXME should be within 50 years of present (cf calendar). +;; FIXME heuristic should be within 50 years of present (cf calendar). ;;;###autoload (defun copyright-fix-years () "Convert 2 digit years to 4 digit years. -Uses heuristic: year >= 50 means 19xx, < 50 means 20xx." +Uses heuristic: year >= 50 means 19xx, < 50 means 20xx. +If `copyright-year-ranges' (which see) is non-nil, also +independently replaces consecutive years with a range." (interactive) - (widen) - (goto-char (copyright-start-point)) - (if (copyright-re-search copyright-regexp (copyright-limit) t) - (let ((s (match-beginning 2)) - (e (copy-marker (1+ (match-end 2)))) + ;; TODO there may be multiple copyrights we should fix. + (if (copyright-find-copyright) + (let ((s (match-beginning 3)) (p (make-marker)) - last) + ;; Not line-beg-pos, so we don't mess up leading whitespace. + (copystart (match-beginning 0)) + e last sep year prev-year first-year range-start range-end) + ;; In case years are continued over multiple, commented lines. + (goto-char (match-end 1)) + (copyright-find-end) + (setq e (copy-marker (1+ (match-end 3)))) (goto-char s) (while (re-search-forward "[0-9]+" e t) (set-marker p (point)) (goto-char (match-beginning 0)) - (let ((sep (char-before)) - (year (string-to-number (match-string 0)))) - (when (and sep - (/= (char-syntax sep) ?\s) - (/= sep ?-)) - (insert " ")) - (when (< year 100) - (insert (if (>= year 50) "19" "20")))) + (setq year (string-to-number (match-string 0))) + (and (setq sep (char-before)) + (/= (char-syntax sep) ?\s) + (/= sep ?-) + (insert " ")) + (when (< year 100) + (insert (if (>= year 50) "19" "20")) + (setq year (+ year (if (>= year 50) 1900 2000)))) (goto-char p) - (setq last p)) + (when copyright-year-ranges + ;; If the previous thing was a range, don't try to tack more on. + ;; Ie not 2000-2005 -> 2000-2005-2007 + ;; TODO should merge into existing range if possible. + (if (eq sep ?-) + (setq prev-year nil + year nil) + (if (and prev-year (= year (1+ prev-year))) + (setq range-end (point)) + (when (and first-year prev-year + (> prev-year first-year)) + (goto-char range-end) + (delete-region range-start range-end) + (insert (format "-%d" prev-year)) + (goto-char p)) + (setq first-year year + range-start (point))))) + (setq prev-year year + last p)) (when last + (when (and copyright-year-ranges + first-year prev-year + (> prev-year first-year)) + (goto-char range-end) + (delete-region range-start range-end) + (insert (format "-%d" prev-year))) (goto-char last) ;; Don't mess up whitespace after the years. (skip-chars-backward " \t") - (save-restriction - (narrow-to-region (copyright-start-point) (point)) - (let ((fill-prefix " ")) - (fill-region s last)))) + (save-restriction + (narrow-to-region copystart (point)) + ;; This is clearly wrong, eg what about comment markers? + ;;; (let ((fill-prefix " ")) + ;; TODO do not break copyright owner over lines. + (fill-region (point-min) (point-max)))) (set-marker e nil) - (set-marker p nil) - (copyright-update nil t)) + (set-marker p nil)) + ;; Simply reformatting the years is not copyrightable, so it does + ;; not seem right to call this. Also it messes with ranges. +;;; (copyright-update nil t)) (message "No copyright message"))) ;;;###autoload @@ -292,17 +354,24 @@ Uses heuristic: year >= 50 means 19xx, < 50 means 20xx." (message "Copyright extends beyond `copyright-limit' and won't be updated automatically.")) comment-end \n) +;; TODO: recurse, exclude COPYING etc. ;;;###autoload -(defun copyright-update-directory (directory match) - "Update copyright notice for all files in DIRECTORY matching MATCH." +(defun copyright-update-directory (directory match &optional fix) + "Update copyright notice for all files in DIRECTORY matching MATCH. +If FIX is non-nil, run `copyright-fix-years' instead." (interactive "DDirectory: \nMFilenames matching (regexp): ") (dolist (file (directory-files directory t match nil)) - (message "Updating file `%s'" file) - (find-file file) - (let ((copyright-query nil)) - (copyright-update)) - (save-buffer) - (kill-buffer (current-buffer)))) + (unless (file-directory-p file) + (message "Updating file `%s'" file) + (find-file file) + (let ((inhibit-read-only t) + (enable-local-variables :safe) + copyright-query) + (if fix + (copyright-fix-years) + (copyright-update))) + (save-buffer) + (kill-buffer (current-buffer))))) (provide 'copyright) @@ -311,5 +380,4 @@ Uses heuristic: year >= 50 means 19xx, < 50 means 20xx." ;; coding: utf-8 ;; End: -;; arch-tag: b4991afb-b6b1-4590-bebe-e076d9d4aee8 ;;; copyright.el ends here diff --git a/lisp/emacs-lisp/crm.el b/lisp/emacs-lisp/crm.el index 722b901be14..3848ab7e6ea 100644 --- a/lisp/emacs-lisp/crm.el +++ b/lisp/emacs-lisp/crm.el @@ -1,7 +1,6 @@ ;;; crm.el --- read multiple strings with completion -;; Copyright (C) 1985, 1986, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985-1986, 1993-2011 Free Software Foundation, Inc. ;; Author: Sen Nagata <sen@eccosys.com> ;; Keywords: completion, minibuffer, multiple elements @@ -321,5 +320,4 @@ INHERIT-INPUT-METHOD." (provide 'crm) -;; arch-tag: db1911d9-86c6-4a42-b32a-4910701b15a6 ;;; crm.el ends here diff --git a/lisp/emacs-lisp/cust-print.el b/lisp/emacs-lisp/cust-print.el index ee1a57231c1..e7f9aae1c60 100644 --- a/lisp/emacs-lisp/cust-print.el +++ b/lisp/emacs-lisp/cust-print.el @@ -1,7 +1,6 @@ ;;; cust-print.el --- handles print-level and print-circle -;; Copyright (C) 1992, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1992, 2001-2011 Free Software Foundation, Inc. ;; Author: Daniel LaLiberte <liberte@holonexus.org> ;; Adapted-By: ESR @@ -681,5 +680,4 @@ See `custom-format' for the details." (provide 'cust-print) -;; arch-tag: 3a5a8650-622c-48c4-87d8-e01bf72ec580 ;;; cust-print.el ends here diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 17fcf7ad6c5..88633eaaa46 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -1,7 +1,6 @@ ;;; debug.el --- debuggers and related commands for Emacs -;; Copyright (C) 1985, 1986, 1994, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985-1986, 1994, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: lisp, tools, maint @@ -890,5 +889,4 @@ To specify a nil argument interactively, exit with an empty minibuffer." (provide 'debug) -;; arch-tag: b6ec7047-f801-4103-9c63-d69322db9d3b ;;; debug.el ends here diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el index 3456d1a63fb..425a77ee77f 100644 --- a/lisp/emacs-lisp/derived.el +++ b/lisp/emacs-lisp/derived.el @@ -1,8 +1,7 @@ ;;; derived.el --- allow inheritance of major modes ;; (formerly mode-clone.el) -;; Copyright (C) 1993, 1994, 1999, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993-1994, 1999, 2001-2011 Free Software Foundation, Inc. ;; Author: David Megginson (dmeggins@aix1.uottawa.ca) ;; Maintainer: FSF @@ -457,5 +456,4 @@ Where the new table already has an entry, nothing is copied from the old one." (provide 'derived) -;; arch-tag: 630be248-47d1-4f02-afa0-8207de0ebea0 ;;; derived.el ends here diff --git a/lisp/emacs-lisp/disass.el b/lisp/emacs-lisp/disass.el index 18aa5fde0c8..9ee02a98e5e 100644 --- a/lisp/emacs-lisp/disass.el +++ b/lisp/emacs-lisp/disass.el @@ -1,7 +1,6 @@ ;;; disass.el --- disassembler for compiled Emacs Lisp code -;; Copyright (C) 1986, 1991, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1986, 1991, 2002-2011 Free Software Foundation, Inc. ;; Author: Doug Cutting <doug@csli.stanford.edu> ;; Jamie Zawinski <jwz@lucid.com> @@ -269,5 +268,4 @@ OBJ should be a call to BYTE-CODE generated by the byte compiler." (provide 'disass) -;; arch-tag: 89482fe4-a087-4761-8dc6-d771054e763a ;;; disass.el ends here diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 9a703c96378..46dc1f162ba 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -1,7 +1,6 @@ ;;; easy-mmode.el --- easy definition for major and minor modes -;; Copyright (C) 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997, 2000-2011 Free Software Foundation, Inc. ;; Author: Georges Brun-Cottan <Georges.Brun-Cottan@inria.fr> ;; Maintainer: Stefan Monnier <monnier@gnu.org> @@ -94,8 +93,9 @@ Optional INIT-VALUE is the initial value of the mode's variable. Optional LIGHTER is displayed in the modeline when the mode is on. Optional KEYMAP is the default keymap bound to the mode keymap. If non-nil, it should be a variable name (whose value is a keymap), - a keymap, or a list of arguments for `easy-mmode-define-keymap'. - If KEYMAP is a keymap or list, this also defines the variable MODE-map. + or an expression that returns either a keymap or a list of + arguments for `easy-mmode-define-keymap'. If KEYMAP is not a symbol, + this also defines the variable MODE-map. BODY contains code to execute each time the mode is enabled or disabled. It is executed after toggling the mode, and before running MODE-hook. @@ -274,7 +274,7 @@ With zero or negative ARG turn mode off. (let ((m ,keymap)) (cond ((keymapp m) m) ((listp m) (easy-mmode-define-keymap m)) - (t (error "Invalid keymap %S" ,keymap)))) + (t (error "Invalid keymap %S" m)))) ,(format "Keymap for `%s'." mode-name))) ,(if (not (symbolp mode)) diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el index 9992861fc3c..79573437146 100644 --- a/lisp/emacs-lisp/easymenu.el +++ b/lisp/emacs-lisp/easymenu.el @@ -1,7 +1,6 @@ ;;; easymenu.el --- support the easymenu interface for defining a menu -;; Copyright (C) 1994, 1996, 1998, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994, 1996, 1998-2011 Free Software Foundation, Inc. ;; Keywords: emulations ;; Author: Richard Stallman <rms@gnu.org> @@ -30,6 +29,8 @@ ;;; Code: +(eval-when-compile (require 'cl)) + (defvar easy-menu-precalculate-equivalent-keybindings nil "Determine when equivalent key bindings are computed for easy-menu menus. It can take some time to calculate the equivalent key bindings that are shown @@ -66,8 +67,8 @@ expression has a non-nil value. `:included' is an alias for `:visible'. :active ENABLE -ENABLE is an expression; the menu is enabled for selection -whenever this expression's value is non-nil. +ENABLE is an expression; the menu is enabled for selection whenever +this expression's value is non-nil. `:enable' is an alias for `:active'. The rest of the elements in MENU, are menu items. @@ -104,8 +105,8 @@ keyboard equivalent. :active ENABLE -ENABLE is an expression; the item is enabled for selection -whenever this expression's value is non-nil. +ENABLE is an expression; the item is enabled for selection whenever +this expression's value is non-nil. `:enable' is an alias for `:active'. :visible INCLUDE @@ -163,10 +164,13 @@ This is expected to be bound to a mouse event." (prog1 (get menu 'menu-prop) (setq menu (symbol-function menu)))))) (cons 'menu-item - (cons (or item-name - (if (keymapp menu) - (keymap-prompt menu)) - "") + (cons (if (eq :label (car props)) + (prog1 (cadr props) + (setq props (cddr props))) + (or item-name + (if (keymapp menu) + (keymap-prompt menu)) + "")) (cons menu props))))) ;;;###autoload @@ -232,15 +236,14 @@ possibly preceded by keyword pairs as described in `easy-menu-define'." (keywordp (setq keyword (car menu-items)))) (setq arg (cadr menu-items)) (setq menu-items (cddr menu-items)) - (cond - ((eq keyword :filter) + (case keyword + (:filter (setq filter `(lambda (menu) (easy-menu-filter-return (,arg menu) ,menu-name)))) - ((eq keyword :active) (setq enable (or arg ''nil))) - ((eq keyword :label) (setq label arg)) - ((eq keyword :help) (setq help arg)) - ((or (eq keyword :included) (eq keyword :visible)) - (setq visible (or arg ''nil))))) + ((:enable :active) (setq enable (or arg ''nil))) + (:label (setq label arg)) + (:help (setq help arg)) + ((:included :visible) (setq visible (or arg ''nil))))) (if (equal visible ''nil) nil ; Invisible menu entry, return nil. (if (and visible (not (easy-menu-always-true-p visible))) @@ -249,14 +252,14 @@ possibly preceded by keyword pairs as described in `easy-menu-define'." (setq prop (cons :enable (cons enable prop)))) (if filter (setq prop (cons :filter (cons filter prop)))) (if help (setq prop (cons :help (cons help prop)))) - (if label (setq prop (cons nil (cons label prop)))) - (if filter - ;; The filter expects the menu in its XEmacs form and the pre-filter - ;; form will only be passed to the filter anyway, so we'd better - ;; not convert it at all (it will be converted on the fly by - ;; easy-menu-filter-return). - (setq menu menu-items) - (setq menu (append menu (mapcar 'easy-menu-convert-item menu-items)))) + (if label (setq prop (cons :label (cons label prop)))) + (setq menu (if filter + ;; The filter expects the menu in its XEmacs form and the + ;; pre-filter form will only be passed to the filter + ;; anyway, so we'd better not convert it at all (it will + ;; be converted on the fly by easy-menu-filter-return). + menu-items + (append menu (mapcar 'easy-menu-convert-item menu-items)))) (when prop (setq menu (easy-menu-make-symbol menu 'noexp)) (put menu 'menu-prop prop)) @@ -312,7 +315,7 @@ ITEM defines an item as in `easy-menu-define'." ;; Invisible menu item. Don't insert into keymap. (setq remove t) (when (and (symbolp command) (setq prop (get command 'menu-prop))) - (when (null (car prop)) + (when (eq :label (car prop)) (setq label (cadr prop)) (setq prop (cddr prop))) (setq command (symbol-function command))))) @@ -331,30 +334,28 @@ ITEM defines an item as in `easy-menu-define'." (setq keyword (aref item count)) (setq arg (aref item (1+ count))) (setq count (+ 2 count)) - (cond - ((or (eq keyword :included) (eq keyword :visible)) - (setq visible (or arg ''nil))) - ((eq keyword :key-sequence) - (setq cache arg cache-specified t)) - ((eq keyword :keys) (setq keys arg no-name nil)) - ((eq keyword :label) (setq label arg)) - ((eq keyword :active) (setq active (or arg ''nil))) - ((eq keyword :help) (setq prop (cons :help (cons arg prop)))) - ((eq keyword :suffix) (setq suffix arg)) - ((eq keyword :style) (setq style arg)) - ((eq keyword :selected) (setq selected (or arg ''nil))))) + (case keyword + ((:included :visible) (setq visible (or arg ''nil))) + (:key-sequence (setq cache arg cache-specified t)) + (:keys (setq keys arg no-name nil)) + (:label (setq label arg)) + ((:active :enable) (setq active (or arg ''nil))) + (:help (setq prop (cons :help (cons arg prop)))) + (:suffix (setq suffix arg)) + (:style (setq style arg)) + (:selected (setq selected (or arg ''nil))))) (if suffix (setq label (if (stringp suffix) (if (stringp label) (concat label " " suffix) - (list 'concat label (concat " " suffix))) + `(concat ,label ,(concat " " suffix))) (if (stringp label) - (list 'concat (concat label " ") suffix) - (list 'concat label " " suffix))))) + `(concat ,(concat label " ") ,suffix) + `(concat ,label " " ,suffix))))) (cond ((eq style 'button) (setq label (if (stringp label) (concat "[" label "]") - (list 'concat "[" label "]")))) + `(concat "[" ,label "]")))) ((and selected (setq style (assq style easy-menu-button-prefix))) (setq prop (cons :button @@ -674,5 +675,4 @@ In some cases we use that to select between the local and global maps." (provide 'easymenu) -;; arch-tag: 2a04020d-90d2-476d-a7c6-71e072007a4a ;;; easymenu.el ends here diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 4dfccb4c5b4..7932309cff4 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -1,8 +1,6 @@ ;;; edebug.el --- a source-level debugger for Emacs Lisp -;; Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1997, -;; 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, -;; 2010 Free Software Foundation, Inc. +;; Copyright (C) 1988-1995, 1997, 1999-2011 Free Software Foundation, Inc. ;; Author: Daniel LaLiberte <liberte@holonexus.org> ;; Maintainer: FSF @@ -2131,8 +2129,6 @@ expressions; a `progn' form will be returned enclosing these forms." (def-edebug-spec with-custom-print body) -(def-edebug-spec sregexq (&rest sexp)) -(def-edebug-spec rx (&rest sexp)) ;;; The debugger itself diff --git a/lisp/emacs-lisp/eieio-base.el b/lisp/emacs-lisp/eieio-base.el index 91cb5642fb7..139f5e6a4ce 100644 --- a/lisp/emacs-lisp/eieio-base.el +++ b/lisp/emacs-lisp/eieio-base.el @@ -1,6 +1,6 @@ ;;; eieio-base.el --- Base classes for EIEIO. -;;; Copyright (C) 2000, 2001, 2002, 2004, 2005, 2007, 2008, 2009, 2010 +;;; Copyright (C) 2000-2002, 2004-2005, 2007-2011 ;;; Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> @@ -329,5 +329,4 @@ a set type." (provide 'eieio-base) -;; arch-tag: 6260571e-9e8a-41a0-880f-a937b0c2ea8b ;;; eieio-base.el ends here diff --git a/lisp/emacs-lisp/eieio-comp.el b/lisp/emacs-lisp/eieio-comp.el index e07a7b20d14..ed6fb6f1c41 100644 --- a/lisp/emacs-lisp/eieio-comp.el +++ b/lisp/emacs-lisp/eieio-comp.el @@ -1,7 +1,7 @@ ;;; eieio-comp.el -- eieio routines to help with byte compilation -;; Copyright (C) 1995,1996, 1998, 1999, 2000, 2001, 2002, 2005, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995-1996, 1998-2002, 2005, 2008-2011 +;; Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Version: 0.2 diff --git a/lisp/emacs-lisp/eieio-custom.el b/lisp/emacs-lisp/eieio-custom.el index 12ff23b311f..6fe63fcb754 100644 --- a/lisp/emacs-lisp/eieio-custom.el +++ b/lisp/emacs-lisp/eieio-custom.el @@ -1,7 +1,6 @@ ;;; eieio-custom.el -- eieio object customization -;; Copyright (C) 1999, 2000, 2001, 2005, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1999-2001, 2005, 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Version: 0.2 @@ -461,5 +460,4 @@ Return the symbol for the group, or nil" (provide 'eieio-custom) -;; arch-tag: bc122762-a771-48d5-891b-7835b16dd924 ;;; eieio-custom.el ends here diff --git a/lisp/emacs-lisp/eieio-datadebug.el b/lisp/emacs-lisp/eieio-datadebug.el index b58fbfd3f08..60510e1816c 100644 --- a/lisp/emacs-lisp/eieio-datadebug.el +++ b/lisp/emacs-lisp/eieio-datadebug.el @@ -1,6 +1,6 @@ ;;; eieio-datadebug.el --- EIEIO extensions to the data debugger. -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: OO, lisp @@ -145,5 +145,4 @@ PREBUTTONTEXT is some text between PREFIX and the object button." (provide 'eieio-datadebug) -;; arch-tag: 6c7c2890-7614-41b0-816b-c61f3f6a8130 ;;; eieio-datadebug.el ends here diff --git a/lisp/emacs-lisp/eieio-opt.el b/lisp/emacs-lisp/eieio-opt.el index ca3850562c8..ddc6616ba28 100644 --- a/lisp/emacs-lisp/eieio-opt.el +++ b/lisp/emacs-lisp/eieio-opt.el @@ -1,7 +1,7 @@ ;;; eieio-opt.el -- eieio optional functions (debug, printing, speedbar) -;; Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996, 1998-2003, 2005, 2008-2011 +;; Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Version: 0.2 @@ -693,5 +693,4 @@ INDENT is the current indentation level." (provide 'eieio-opt) -;; arch-tag: 71eab5f5-462f-4fa1-8ed1-f5ca1bf9adb6 ;;; eieio-opt.el ends here diff --git a/lisp/emacs-lisp/eieio-speedbar.el b/lisp/emacs-lisp/eieio-speedbar.el index e16c3a17438..d28ecd9615b 100644 --- a/lisp/emacs-lisp/eieio-speedbar.el +++ b/lisp/emacs-lisp/eieio-speedbar.el @@ -1,7 +1,6 @@ ;;; eieio-speedbar.el -- Classes for managing speedbar displays. -;; Copyright (C) 1999, 2000, 2001, 2002, 2005, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1999-2002, 2005, 2007-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Version: 0.2 @@ -422,5 +421,4 @@ to create a speedbar button." (provide 'eieio-speedbar) -;; arch-tag: eaac1283-10b0-4419-a929-982b87e83234 ;;; eieio-speedbar.el ends here diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el index 048093b858d..d958bfbd45c 100644 --- a/lisp/emacs-lisp/eieio.el +++ b/lisp/emacs-lisp/eieio.el @@ -1,8 +1,7 @@ ;;; eieio.el --- Enhanced Implementation of Emacs Interpreted Objects ;;; or maybe Eric's Implementation of Emacs Intrepreted Objects -;; Copyright (C) 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995-1996, 1998-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Version: 1.3 @@ -2956,5 +2955,4 @@ Optional argument NOESCAPE is passed to `prin1-to-string' when appropriate." (provide 'eieio) -;; arch-tag: c1aeab9c-2938-41a3-842b-1a38bd26e9f2 ;;; eieio ends here diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index b4845495c9e..cd9b779bee9 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -1,7 +1,6 @@ ;;; eldoc.el --- show function arglist or variable docstring in echo area -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-2011 Free Software Foundation, Inc. ;; Author: Noah Friedman <friedman@splode.com> ;; Maintainer: friedman@splode.com @@ -540,5 +539,4 @@ The words \"&rest\", \"&optional\" are returned unchanged." (provide 'eldoc) -;; arch-tag: c9a58f9d-2055-46c1-9b82-7248b71a8375 ;;; eldoc.el ends here diff --git a/lisp/emacs-lisp/elint.el b/lisp/emacs-lisp/elint.el index 39c45e82309..36c26676fe9 100644 --- a/lisp/emacs-lisp/elint.el +++ b/lisp/emacs-lisp/elint.el @@ -1,7 +1,6 @@ ;;; elint.el --- Lint Emacs Lisp -;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997, 2001-2011 Free Software Foundation, Inc. ;; Author: Peter Liljenberg <petli@lysator.liu.se> ;; Created: May 1997 diff --git a/lisp/emacs-lisp/elp.el b/lisp/emacs-lisp/elp.el index f1e70c5a57c..910eff3c78f 100644 --- a/lisp/emacs-lisp/elp.el +++ b/lisp/emacs-lisp/elp.el @@ -1,7 +1,7 @@ ;;; elp.el --- Emacs Lisp Profiler -;; Copyright (C) 1994, 1995, 1997, 1998, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994-1995, 1997-1998, 2001-2011 +;; Free Software Foundation, Inc. ;; Author: Barry A. Warsaw ;; Maintainer: FSF @@ -660,5 +660,4 @@ displayed." (provide 'elp) -;; arch-tag: c4eef311-9b3e-4bb2-8a54-3485d41b4eb1 ;;; elp.el ends here diff --git a/lisp/emacs-lisp/ert-x.el b/lisp/emacs-lisp/ert-x.el new file mode 100644 index 00000000000..39d4a4e814a --- /dev/null +++ b/lisp/emacs-lisp/ert-x.el @@ -0,0 +1,290 @@ +;;; ert-x.el --- Staging area for experimental extensions to ERT + +;; Copyright (C) 2008, 2010-2011 Free Software Foundation, Inc. + +;; Author: Lennart Borgman (lennart O borgman A gmail O com) +;; Author: Christian Ohler <ohler@gnu.org> + +;; This file is part of GNU Emacs. + +;; This program is free software: you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation, either version 3 of the +;; License, or (at your option) any later version. +;; +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see `http://www.gnu.org/licenses/'. + +;;; Commentary: + +;; This file includes some extra helper functions to use while writing +;; automated tests with ERT. These have been proposed as extensions +;; to ERT but are not mature yet and likely to change. + +;;; Code: + +(eval-when-compile + (require 'cl)) +(require 'ert) + + +;;; Test buffers. + +(defun ert--text-button (string &rest properties) + "Return a string containing STRING as a text button with PROPERTIES. + +See `make-text-button'." + (with-temp-buffer + (insert string) + (apply #'make-text-button (point-min) (point-max) properties) + (buffer-string))) + +(defun ert--format-test-buffer-name (base-name) + "Compute a test buffer name based on BASE-NAME. + +Helper function for `ert--test-buffers'." + (format "*Test buffer (%s)%s*" + (or (and (ert-running-test) + (ert-test-name (ert-running-test))) + "<anonymous test>") + (if base-name + (format ": %s" base-name) + ""))) + +(defvar ert--test-buffers (make-hash-table :weakness t) + "Table of all test buffers. Keys are the buffer objects, values are t. + +The main use of this table is for `ert-kill-all-test-buffers'. +Not all buffers in this table are necessarily live, but all live +test buffers are in this table.") + +(define-button-type 'ert--test-buffer-button + 'action #'ert--test-buffer-button-action + 'help-echo "mouse-2, RET: Pop to test buffer") + +(defun ert--test-buffer-button-action (button) + "Pop to the test buffer that BUTTON is associated with." + (pop-to-buffer (button-get button 'ert--test-buffer))) + +(defun ert--call-with-test-buffer (ert--base-name ert--thunk) + "Helper function for `ert-with-test-buffer'. + +Create a test buffer with a name based on ERT--BASE-NAME and run +ERT--THUNK with that buffer as current." + (let* ((ert--buffer (generate-new-buffer + (ert--format-test-buffer-name ert--base-name))) + (ert--button (ert--text-button (buffer-name ert--buffer) + :type 'ert--test-buffer-button + 'ert--test-buffer ert--buffer))) + (puthash ert--buffer 't ert--test-buffers) + ;; We don't use `unwind-protect' here since we want to kill the + ;; buffer only on success. + (prog1 (with-current-buffer ert--buffer + (ert-info (ert--button :prefix "Buffer: ") + (funcall ert--thunk))) + (kill-buffer ert--buffer) + (remhash ert--buffer ert--test-buffers)))) + +(defmacro* ert-with-test-buffer ((&key ((:name name-form))) + &body body) + "Create a test buffer and run BODY in that buffer. + +To be used in ERT tests. If BODY finishes successfully, the test +buffer is killed; if there is an error, the test buffer is kept +around on error for further inspection. Its name is derived from +the name of the test and the result of NAME-FORM." + (declare (debug ((form) body)) + (indent 1)) + `(ert--call-with-test-buffer ,name-form (lambda () ,@body))) + +;; We use these `put' forms in addition to the (declare (indent)) in +;; the defmacro form since the `declare' alone does not lead to +;; correct indentation before the .el/.elc file is loaded. +;; Autoloading these `put' forms solves this. +;;;###autoload +(progn + ;; TODO(ohler): Figure out what these mean and make sure they are correct. + (put 'ert-with-test-buffer 'lisp-indent-function 1)) + +;;;###autoload +(defun ert-kill-all-test-buffers () + "Kill all test buffers that are still live." + (interactive) + (let ((count 0)) + (maphash (lambda (buffer dummy) + (when (or (not (buffer-live-p buffer)) + (kill-buffer buffer)) + (incf count))) + ert--test-buffers) + (message "%s out of %s test buffers killed" + count (hash-table-count ert--test-buffers))) + ;; It could be that some test buffers were actually kept alive + ;; (e.g., due to `kill-buffer-query-functions'). I'm not sure what + ;; to do about this. For now, let's just forget them. + (clrhash ert--test-buffers) + nil) + + +;;; Simulate commands. + +(defun ert-simulate-command (command) + ;; FIXME: add unread-events + "Simulate calling COMMAND the way the Emacs command loop would call it. + +This effectively executes + + \(apply (car COMMAND) (cdr COMMAND)\) + +and returns the same value, but additionally runs hooks like +`pre-command-hook' and `post-command-hook', and sets variables +like `this-command' and `last-command'. + +COMMAND should be a list where the car is the command symbol and +the rest are arguments to the command. + +NOTE: Since the command is not called by `call-interactively' +test for `called-interactively' in the command will fail." + (assert (listp command) t) + (assert (commandp (car command)) t) + (assert (not unread-command-events) t) + (let (return-value) + ;; For the order of things here see command_loop_1 in keyboard.c. + ;; + ;; The command loop will reset the command-related variables so + ;; there is no reason to let-bind them. They are set here, + ;; however, to be able to test several commands in a row and how + ;; they affect each other. + (setq deactivate-mark nil + this-original-command (car command) + ;; remap through active keymaps + this-command (or (command-remapping this-original-command) + this-original-command)) + (run-hooks 'pre-command-hook) + (setq return-value (apply (car command) (cdr command))) + (run-hooks 'post-command-hook) + (when deferred-action-list + (run-hooks 'deferred-action-function)) + (setq real-last-command (car command) + last-command this-command) + (when (boundp 'last-repeatable-command) + (setq last-repeatable-command real-last-command)) + (when (and deactivate-mark transient-mark-mode) (deactivate-mark)) + (assert (not unread-command-events) t) + return-value)) + +(defun ert-run-idle-timers () + "Run all idle timers (from `timer-idle-list')." + (dolist (timer (copy-sequence timer-idle-list)) + (timer-event-handler timer))) + + +;;; Miscellaneous utilities. + +(defun ert-filter-string (s &rest regexps) + "Return a copy of S with all matches of REGEXPS removed. + +Elements of REGEXPS may also be two-element lists \(REGEXP +SUBEXP\), where SUBEXP is the number of a subexpression in +REGEXP. In that case, only that subexpression will be removed +rather than the entire match." + ;; Use a temporary buffer since replace-match copies strings, which + ;; would lead to N^2 runtime. + (with-temp-buffer + (insert s) + (dolist (x regexps) + (destructuring-bind (regexp subexp) (if (listp x) x `(,x nil)) + (goto-char (point-min)) + (while (re-search-forward regexp nil t) + (replace-match "" t t nil subexp)))) + (buffer-string))) + + +(defun ert-propertized-string (&rest args) + "Return a string with properties as specified by ARGS. + +ARGS is a list of strings and plists. The strings in ARGS are +concatenated to produce an output string. In the output string, +each string from ARGS will be have the preceding plist as its +property list, or no properties if there is no plist before it. + +As a simple example, + +\(ert-propertized-string \"foo \" '(face italic) \"bar\" \" baz\" nil \ +\" quux\"\) + +would return the string \"foo bar baz quux\" where the substring +\"bar baz\" has a `face' property with the value `italic'. + +None of the ARGS are modified, but the return value may share +structure with the plists in ARGS." + (with-temp-buffer + (loop with current-plist = nil + for x in args do + (etypecase x + (string (let ((begin (point))) + (insert x) + (set-text-properties begin (point) current-plist))) + (list (unless (zerop (mod (length x) 2)) + (error "Odd number of args in plist: %S" x)) + (setq current-plist x)))) + (buffer-string))) + + +(defun ert-call-with-buffer-renamed (buffer-name thunk) + "Protect the buffer named BUFFER-NAME from side-effects and run THUNK. + +Renames the buffer BUFFER-NAME to a new temporary name, creates a +new buffer named BUFFER-NAME, executes THUNK, kills the new +buffer, and renames the original buffer back to BUFFER-NAME. + +This is useful if THUNK has undesirable side-effects on an Emacs +buffer with a fixed name such as *Messages*." + (lexical-let ((new-buffer-name (generate-new-buffer-name + (format "%s orig buffer" buffer-name)))) + (with-current-buffer (get-buffer-create buffer-name) + (rename-buffer new-buffer-name)) + (unwind-protect + (progn + (get-buffer-create buffer-name) + (funcall thunk)) + (when (get-buffer buffer-name) + (kill-buffer buffer-name)) + (with-current-buffer new-buffer-name + (rename-buffer buffer-name))))) + +(defmacro* ert-with-buffer-renamed ((buffer-name-form) &body body) + "Protect the buffer named BUFFER-NAME from side-effects and run BODY. + +See `ert-call-with-buffer-renamed' for details." + (declare (indent 1)) + `(ert-call-with-buffer-renamed ,buffer-name-form (lambda () ,@body))) + + +(defun ert-buffer-string-reindented (&optional buffer) + "Return the contents of BUFFER after reindentation. + +BUFFER defaults to current buffer. Does not modify BUFFER." + (with-current-buffer (or buffer (current-buffer)) + (let ((clone nil)) + (unwind-protect + (progn + ;; `clone-buffer' doesn't work if `buffer-file-name' is non-nil. + (let ((buffer-file-name nil)) + (setq clone (clone-buffer))) + (with-current-buffer clone + (let ((inhibit-read-only t)) + (indent-region (point-min) (point-max))) + (buffer-string))) + (when clone + (let ((kill-buffer-query-functions nil)) + (kill-buffer clone))))))) + + +(provide 'ert-x) + +;;; ert-x.el ends here diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el new file mode 100644 index 00000000000..7ee81463236 --- /dev/null +++ b/lisp/emacs-lisp/ert.el @@ -0,0 +1,2544 @@ +;;; ert.el --- Emacs Lisp Regression Testing + +;; Copyright (C) 2007-2008, 2010-2011 Free Software Foundation, Inc. + +;; Author: Christian Ohler <ohler@gnu.org> +;; Keywords: lisp, tools + +;; This file is part of GNU Emacs. + +;; This program is free software: you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation, either version 3 of the +;; License, or (at your option) any later version. +;; +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see `http://www.gnu.org/licenses/'. + +;;; Commentary: + +;; ERT is a tool for automated testing in Emacs Lisp. Its main +;; features are facilities for defining and running test cases and +;; reporting the results as well as for debugging test failures +;; interactively. +;; +;; The main entry points are `ert-deftest', which is similar to +;; `defun' but defines a test, and `ert-run-tests-interactively', +;; which runs tests and offers an interactive interface for inspecting +;; results and debugging. There is also +;; `ert-run-tests-batch-and-exit' for non-interactive use. +;; +;; The body of `ert-deftest' forms resembles a function body, but the +;; additional operators `should', `should-not' and `should-error' are +;; available. `should' is similar to cl's `assert', but signals a +;; different error when its condition is violated that is caught and +;; processed by ERT. In addition, it analyzes its argument form and +;; records information that helps debugging (`assert' tries to do +;; something similar when its second argument SHOW-ARGS is true, but +;; `should' is more sophisticated). For information on `should-not' +;; and `should-error', see their docstrings. +;; +;; See ERT's info manual as well as the docstrings for more details. +;; To compile the manual, run `makeinfo ert.texinfo' in the ERT +;; directory, then C-u M-x info ert.info in Emacs to view it. +;; +;; To see some examples of tests written in ERT, see its self-tests in +;; ert-tests.el. Some of these are tricky due to the bootstrapping +;; problem of writing tests for a testing tool, others test simple +;; functions and are straightforward. + +;;; Code: + +(eval-when-compile + (require 'cl)) +(require 'button) +(require 'debug) +(require 'easymenu) +(require 'ewoc) +(require 'find-func) +(require 'help) + + +;;; UI customization options. + +(defgroup ert () + "ERT, the Emacs Lisp regression testing tool." + :prefix "ert-" + :group 'lisp) + +(defface ert-test-result-expected '((((class color) (background light)) + :background "green1") + (((class color) (background dark)) + :background "green3")) + "Face used for expected results in the ERT results buffer." + :group 'ert) + +(defface ert-test-result-unexpected '((((class color) (background light)) + :background "red1") + (((class color) (background dark)) + :background "red3")) + "Face used for unexpected results in the ERT results buffer." + :group 'ert) + + +;;; Copies/reimplementations of cl functions. + +(defun ert--cl-do-remf (plist tag) + "Copy of `cl-do-remf'. Modify PLIST by removing TAG." + (let ((p (cdr plist))) + (while (and (cdr p) (not (eq (car (cdr p)) tag))) (setq p (cdr (cdr p)))) + (and (cdr p) (progn (setcdr p (cdr (cdr (cdr p)))) t)))) + +(defun ert--remprop (sym tag) + "Copy of `cl-remprop'. Modify SYM's plist by removing TAG." + (let ((plist (symbol-plist sym))) + (if (and plist (eq tag (car plist))) + (progn (setplist sym (cdr (cdr plist))) t) + (ert--cl-do-remf plist tag)))) + +(defun ert--remove-if-not (ert-pred ert-list) + "A reimplementation of `remove-if-not'. + +ERT-PRED is a predicate, ERT-LIST is the input list." + (loop for ert-x in ert-list + if (funcall ert-pred ert-x) + collect ert-x)) + +(defun ert--intersection (a b) + "A reimplementation of `intersection'. Intersect the sets A and B. + +Elements are compared using `eql'." + (loop for x in a + if (memql x b) + collect x)) + +(defun ert--set-difference (a b) + "A reimplementation of `set-difference'. Subtract the set B from the set A. + +Elements are compared using `eql'." + (loop for x in a + unless (memql x b) + collect x)) + +(defun ert--set-difference-eq (a b) + "A reimplementation of `set-difference'. Subtract the set B from the set A. + +Elements are compared using `eq'." + (loop for x in a + unless (memq x b) + collect x)) + +(defun ert--union (a b) + "A reimplementation of `union'. Compute the union of the sets A and B. + +Elements are compared using `eql'." + (append a (ert--set-difference b a))) + +(eval-and-compile + (defvar ert--gensym-counter 0)) + +(eval-and-compile + (defun ert--gensym (&optional prefix) + "Only allows string PREFIX, not compatible with CL." + (unless prefix (setq prefix "G")) + (make-symbol (format "%s%s" + prefix + (prog1 ert--gensym-counter + (incf ert--gensym-counter)))))) + +(defun ert--coerce-to-vector (x) + "Coerce X to a vector." + (when (char-table-p x) (error "Not supported")) + (if (vectorp x) + x + (vconcat x))) + +(defun* ert--remove* (x list &key key test) + "Does not support all the keywords of remove*." + (unless key (setq key #'identity)) + (unless test (setq test #'eql)) + (loop for y in list + unless (funcall test x (funcall key y)) + collect y)) + +(defun ert--string-position (c s) + "Return the position of the first occurrence of C in S, or nil if none." + (loop for i from 0 + for x across s + when (eql x c) return i)) + +(defun ert--mismatch (a b) + "Return index of first element that differs between A and B. + +Like `mismatch'. Uses `equal' for comparison." + (cond ((or (listp a) (listp b)) + (ert--mismatch (ert--coerce-to-vector a) + (ert--coerce-to-vector b))) + ((> (length a) (length b)) + (ert--mismatch b a)) + (t + (let ((la (length a)) + (lb (length b))) + (assert (arrayp a) t) + (assert (arrayp b) t) + (assert (<= la lb) t) + (loop for i below la + when (not (equal (aref a i) (aref b i))) return i + finally (return (if (/= la lb) + la + (assert (equal a b) t) + nil))))))) + +(defun ert--subseq (seq start &optional end) + "Return a subsequence of SEQ from START to END." + (when (char-table-p seq) (error "Not supported")) + (let ((vector (substring (ert--coerce-to-vector seq) start end))) + (etypecase seq + (vector vector) + (string (concat vector)) + (list (append vector nil)) + (bool-vector (loop with result = (make-bool-vector (length vector) nil) + for i below (length vector) do + (setf (aref result i) (aref vector i)) + finally (return result))) + (char-table (assert nil))))) + +(defun ert-equal-including-properties (a b) + "Return t if A and B have similar structure and contents. + +This is like `equal-including-properties' except that it compares +the property values of text properties structurally (by +recursing) rather than with `eq'. Perhaps this is what +`equal-including-properties' should do in the first place; see +Emacs bug 6581 at URL `http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6581'." + ;; This implementation is inefficient. Rather than making it + ;; efficient, let's hope bug 6581 gets fixed so that we can delete + ;; it altogether. + (not (ert--explain-not-equal-including-properties a b))) + + +;;; Defining and locating tests. + +;; The data structure that represents a test case. +(defstruct ert-test + (name nil) + (documentation nil) + (body (assert nil)) + (most-recent-result nil) + (expected-result-type ':passed) + (tags '())) + +(defun ert-test-boundp (symbol) + "Return non-nil if SYMBOL names a test." + (and (get symbol 'ert--test) t)) + +(defun ert-get-test (symbol) + "If SYMBOL names a test, return that. Signal an error otherwise." + (unless (ert-test-boundp symbol) (error "No test named `%S'" symbol)) + (get symbol 'ert--test)) + +(defun ert-set-test (symbol definition) + "Make SYMBOL name the test DEFINITION, and return DEFINITION." + (when (eq symbol 'nil) + ;; We disallow nil since `ert-test-at-point' and related functions + ;; want to return a test name, but also need an out-of-band value + ;; on failure. Nil is the most natural out-of-band value; using 0 + ;; or "" or signalling an error would be too awkward. + ;; + ;; Note that nil is still a valid value for the `name' slot in + ;; ert-test objects. It designates an anonymous test. + (error "Attempt to define a test named nil")) + (put symbol 'ert--test definition) + definition) + +(defun ert-make-test-unbound (symbol) + "Make SYMBOL name no test. Return SYMBOL." + (ert--remprop symbol 'ert--test) + symbol) + +(defun ert--parse-keys-and-body (keys-and-body) + "Split KEYS-AND-BODY into keyword-and-value pairs and the remaining body. + +KEYS-AND-BODY should have the form of a property list, with the +exception that only keywords are permitted as keys and that the +tail -- the body -- is a list of forms that does not start with a +keyword. + +Returns a two-element list containing the keys-and-values plist +and the body." + (let ((extracted-key-accu '()) + (remaining keys-and-body)) + (while (and (consp remaining) (keywordp (first remaining))) + (let ((keyword (pop remaining))) + (unless (consp remaining) + (error "Value expected after keyword %S in %S" + keyword keys-and-body)) + (when (assoc keyword extracted-key-accu) + (warn "Keyword %S appears more than once in %S" keyword + keys-and-body)) + (push (cons keyword (pop remaining)) extracted-key-accu))) + (setq extracted-key-accu (nreverse extracted-key-accu)) + (list (loop for (key . value) in extracted-key-accu + collect key + collect value) + remaining))) + +;;;###autoload +(defmacro* ert-deftest (name () &body docstring-keys-and-body) + "Define NAME (a symbol) as a test. + +BODY is evaluated as a `progn' when the test is run. It should +signal a condition on failure or just return if the test passes. + +`should', `should-not' and `should-error' are useful for +assertions in BODY. + +Use `ert' to run tests interactively. + +Tests that are expected to fail can be marked as such +using :expected-result. See `ert-test-result-type-p' for a +description of valid values for RESULT-TYPE. + +\(fn NAME () [DOCSTRING] [:expected-result RESULT-TYPE] \ +\[:tags '(TAG...)] BODY...)" + (declare (debug (&define :name test + name sexp [&optional stringp] + [&rest keywordp sexp] def-body)) + (doc-string 3) + (indent 2)) + (let ((documentation nil) + (documentation-supplied-p nil)) + (when (stringp (first docstring-keys-and-body)) + (setq documentation (pop docstring-keys-and-body) + documentation-supplied-p t)) + (destructuring-bind ((&key (expected-result nil expected-result-supplied-p) + (tags nil tags-supplied-p)) + body) + (ert--parse-keys-and-body docstring-keys-and-body) + `(progn + (ert-set-test ',name + (make-ert-test + :name ',name + ,@(when documentation-supplied-p + `(:documentation ,documentation)) + ,@(when expected-result-supplied-p + `(:expected-result-type ,expected-result)) + ,@(when tags-supplied-p + `(:tags ,tags)) + :body (lambda () ,@body))) + ;; This hack allows `symbol-file' to associate `ert-deftest' + ;; forms with files, and therefore enables `find-function' to + ;; work with tests. However, it leads to warnings in + ;; `unload-feature', which doesn't know how to undefine tests + ;; and has no mechanism for extension. + (push '(ert-deftest . ,name) current-load-list) + ',name)))) + +;; We use these `put' forms in addition to the (declare (indent)) in +;; the defmacro form since the `declare' alone does not lead to +;; correct indentation before the .el/.elc file is loaded. +;; Autoloading these `put' forms solves this. +;;;###autoload +(progn + ;; TODO(ohler): Figure out what these mean and make sure they are correct. + (put 'ert-deftest 'lisp-indent-function 2) + (put 'ert-info 'lisp-indent-function 1)) + +(defvar ert--find-test-regexp + (concat "^\\s-*(ert-deftest" + find-function-space-re + "%s\\(\\s-\\|$\\)") + "The regexp the `find-function' mechanisms use for finding test definitions.") + + +(put 'ert-test-failed 'error-conditions '(error ert-test-failed)) +(put 'ert-test-failed 'error-message "Test failed") + +(defun ert-pass () + "Terminate the current test and mark it passed. Does not return." + (throw 'ert--pass nil)) + +(defun ert-fail (data) + "Terminate the current test and mark it failed. Does not return. +DATA is displayed to the user and should state the reason of the failure." + (signal 'ert-test-failed (list data))) + + +;;; The `should' macros. + +(defvar ert--should-execution-observer nil) + +(defun ert--signal-should-execution (form-description) + "Tell the current `should' form observer (if any) about FORM-DESCRIPTION." + (when ert--should-execution-observer + (funcall ert--should-execution-observer form-description))) + +(defun ert--special-operator-p (thing) + "Return non-nil if THING is a symbol naming a special operator." + (and (symbolp thing) + (let ((definition (indirect-function thing t))) + (and (subrp definition) + (eql (cdr (subr-arity definition)) 'unevalled))))) + +(defun ert--expand-should-1 (whole form inner-expander) + "Helper function for the `should' macro and its variants." + (let ((form + ;; If `cl-macroexpand' isn't bound, the code that we're + ;; compiling doesn't depend on cl and thus doesn't need an + ;; environment arg for `macroexpand'. + (if (fboundp 'cl-macroexpand) + ;; Suppress warning about run-time call to cl funtion: we + ;; only call it if it's fboundp. + (with-no-warnings + (cl-macroexpand form (and (boundp 'cl-macro-environment) + cl-macro-environment))) + (macroexpand form)))) + (cond + ((or (atom form) (ert--special-operator-p (car form))) + (let ((value (ert--gensym "value-"))) + `(let ((,value (ert--gensym "ert-form-evaluation-aborted-"))) + ,(funcall inner-expander + `(setq ,value ,form) + `(list ',whole :form ',form :value ,value) + value) + ,value))) + (t + (let ((fn-name (car form)) + (arg-forms (cdr form))) + (assert (or (symbolp fn-name) + (and (consp fn-name) + (eql (car fn-name) 'lambda) + (listp (cdr fn-name))))) + (let ((fn (ert--gensym "fn-")) + (args (ert--gensym "args-")) + (value (ert--gensym "value-")) + (default-value (ert--gensym "ert-form-evaluation-aborted-"))) + `(let ((,fn (function ,fn-name)) + (,args (list ,@arg-forms))) + (let ((,value ',default-value)) + ,(funcall inner-expander + `(setq ,value (apply ,fn ,args)) + `(nconc (list ',whole) + (list :form `(,,fn ,@,args)) + (unless (eql ,value ',default-value) + (list :value ,value)) + (let ((-explainer- + (and (symbolp ',fn-name) + (get ',fn-name 'ert-explainer)))) + (when -explainer- + (list :explanation + (apply -explainer- ,args))))) + value) + ,value)))))))) + +(defun ert--expand-should (whole form inner-expander) + "Helper function for the `should' macro and its variants. + +Analyzes FORM and returns an expression that has the same +semantics under evaluation but records additional debugging +information. + +INNER-EXPANDER should be a function and is called with two +arguments: INNER-FORM and FORM-DESCRIPTION-FORM, where INNER-FORM +is an expression equivalent to FORM, and FORM-DESCRIPTION-FORM is +an expression that returns a description of FORM. INNER-EXPANDER +should return code that calls INNER-FORM and performs the checks +and error signalling specific to the particular variant of +`should'. The code that INNER-EXPANDER returns must not call +FORM-DESCRIPTION-FORM before it has called INNER-FORM." + (lexical-let ((inner-expander inner-expander)) + (ert--expand-should-1 + whole form + (lambda (inner-form form-description-form value-var) + (let ((form-description (ert--gensym "form-description-"))) + `(let (,form-description) + ,(funcall inner-expander + `(unwind-protect + ,inner-form + (setq ,form-description ,form-description-form) + (ert--signal-should-execution ,form-description)) + `,form-description + value-var))))))) + +(defmacro* should (form) + "Evaluate FORM. If it returns nil, abort the current test as failed. + +Returns the value of FORM." + (ert--expand-should `(should ,form) form + (lambda (inner-form form-description-form value-var) + `(unless ,inner-form + (ert-fail ,form-description-form))))) + +(defmacro* should-not (form) + "Evaluate FORM. If it returns non-nil, abort the current test as failed. + +Returns nil." + (ert--expand-should `(should-not ,form) form + (lambda (inner-form form-description-form value-var) + `(unless (not ,inner-form) + (ert-fail ,form-description-form))))) + +(defun ert--should-error-handle-error (form-description-fn + condition type exclude-subtypes) + "Helper function for `should-error'. + +Determines whether CONDITION matches TYPE and EXCLUDE-SUBTYPES, +and aborts the current test as failed if it doesn't." + (let ((signalled-conditions (get (car condition) 'error-conditions)) + (handled-conditions (etypecase type + (list type) + (symbol (list type))))) + (assert signalled-conditions) + (unless (ert--intersection signalled-conditions handled-conditions) + (ert-fail (append + (funcall form-description-fn) + (list + :condition condition + :fail-reason (concat "the error signalled did not" + " have the expected type"))))) + (when exclude-subtypes + (unless (member (car condition) handled-conditions) + (ert-fail (append + (funcall form-description-fn) + (list + :condition condition + :fail-reason (concat "the error signalled was a subtype" + " of the expected type")))))))) + +;; FIXME: The expansion will evaluate the keyword args (if any) in +;; nonstandard order. +(defmacro* should-error (form &rest keys &key type exclude-subtypes) + "Evaluate FORM and check that it signals an error. + +The error signalled needs to match TYPE. TYPE should be a list +of condition names. (It can also be a non-nil symbol, which is +equivalent to a singleton list containing that symbol.) If +EXCLUDE-SUBTYPES is nil, the error matches TYPE if one of its +condition names is an element of TYPE. If EXCLUDE-SUBTYPES is +non-nil, the error matches TYPE if it is an element of TYPE. + +If the error matches, returns (ERROR-SYMBOL . DATA) from the +error. If not, or if no error was signalled, abort the test as +failed." + (unless type (setq type ''error)) + (ert--expand-should + `(should-error ,form ,@keys) + form + (lambda (inner-form form-description-form value-var) + (let ((errorp (ert--gensym "errorp")) + (form-description-fn (ert--gensym "form-description-fn-"))) + `(let ((,errorp nil) + (,form-description-fn (lambda () ,form-description-form))) + (condition-case -condition- + ,inner-form + ;; We can't use ,type here because we want to evaluate it. + (error + (setq ,errorp t) + (ert--should-error-handle-error ,form-description-fn + -condition- + ,type ,exclude-subtypes) + (setq ,value-var -condition-))) + (unless ,errorp + (ert-fail (append + (funcall ,form-description-fn) + (list + :fail-reason "did not signal an error"))))))))) + + +;;; Explanation of `should' failures. + +;; TODO(ohler): Rework explanations so that they are displayed in a +;; similar way to `ert-info' messages; in particular, allow text +;; buttons in explanations that give more detail or open an ediff +;; buffer. Perhaps explanations should be reported through `ert-info' +;; rather than as part of the condition. + +(defun ert--proper-list-p (x) + "Return non-nil if X is a proper list, nil otherwise." + (loop + for firstp = t then nil + for fast = x then (cddr fast) + for slow = x then (cdr slow) do + (when (null fast) (return t)) + (when (not (consp fast)) (return nil)) + (when (null (cdr fast)) (return t)) + (when (not (consp (cdr fast))) (return nil)) + (when (and (not firstp) (eq fast slow)) (return nil)))) + +(defun ert--explain-format-atom (x) + "Format the atom X for `ert--explain-not-equal'." + (typecase x + (fixnum (list x (format "#x%x" x) (format "?%c" x))) + (t x))) + +(defun ert--explain-not-equal (a b) + "Explainer function for `equal'. + +Returns a programmer-readable explanation of why A and B are not +`equal', or nil if they are." + (if (not (equal (type-of a) (type-of b))) + `(different-types ,a ,b) + (etypecase a + (cons + (let ((a-proper-p (ert--proper-list-p a)) + (b-proper-p (ert--proper-list-p b))) + (if (not (eql (not a-proper-p) (not b-proper-p))) + `(one-list-proper-one-improper ,a ,b) + (if a-proper-p + (if (not (equal (length a) (length b))) + `(proper-lists-of-different-length ,(length a) ,(length b) + ,a ,b + first-mismatch-at + ,(ert--mismatch a b)) + (loop for i from 0 + for ai in a + for bi in b + for xi = (ert--explain-not-equal ai bi) + do (when xi (return `(list-elt ,i ,xi))) + finally (assert (equal a b) t))) + (let ((car-x (ert--explain-not-equal (car a) (car b)))) + (if car-x + `(car ,car-x) + (let ((cdr-x (ert--explain-not-equal (cdr a) (cdr b)))) + (if cdr-x + `(cdr ,cdr-x) + (assert (equal a b) t) + nil)))))))) + (array (if (not (equal (length a) (length b))) + `(arrays-of-different-length ,(length a) ,(length b) + ,a ,b + ,@(unless (char-table-p a) + `(first-mismatch-at + ,(ert--mismatch a b)))) + (loop for i from 0 + for ai across a + for bi across b + for xi = (ert--explain-not-equal ai bi) + do (when xi (return `(array-elt ,i ,xi))) + finally (assert (equal a b) t)))) + (atom (if (not (equal a b)) + (if (and (symbolp a) (symbolp b) (string= a b)) + `(different-symbols-with-the-same-name ,a ,b) + `(different-atoms ,(ert--explain-format-atom a) + ,(ert--explain-format-atom b))) + nil))))) +(put 'equal 'ert-explainer 'ert--explain-not-equal) + +(defun ert--significant-plist-keys (plist) + "Return the keys of PLIST that have non-null values, in order." + (assert (zerop (mod (length plist) 2)) t) + (loop for (key value . rest) on plist by #'cddr + unless (or (null value) (memq key accu)) collect key into accu + finally (return accu))) + +(defun ert--plist-difference-explanation (a b) + "Return a programmer-readable explanation of why A and B are different plists. + +Returns nil if they are equivalent, i.e., have the same value for +each key, where absent values are treated as nil. The order of +key/value pairs in each list does not matter." + (assert (zerop (mod (length a) 2)) t) + (assert (zerop (mod (length b) 2)) t) + ;; Normalizing the plists would be another way to do this but it + ;; requires a total ordering on all lisp objects (since any object + ;; is valid as a text property key). Perhaps defining such an + ;; ordering is useful in other contexts, too, but it's a lot of + ;; work, so let's punt on it for now. + (let* ((keys-a (ert--significant-plist-keys a)) + (keys-b (ert--significant-plist-keys b)) + (keys-in-a-not-in-b (ert--set-difference-eq keys-a keys-b)) + (keys-in-b-not-in-a (ert--set-difference-eq keys-b keys-a))) + (flet ((explain-with-key (key) + (let ((value-a (plist-get a key)) + (value-b (plist-get b key))) + (assert (not (equal value-a value-b)) t) + `(different-properties-for-key + ,key ,(ert--explain-not-equal-including-properties value-a + value-b))))) + (cond (keys-in-a-not-in-b + (explain-with-key (first keys-in-a-not-in-b))) + (keys-in-b-not-in-a + (explain-with-key (first keys-in-b-not-in-a))) + (t + (loop for key in keys-a + when (not (equal (plist-get a key) (plist-get b key))) + return (explain-with-key key))))))) + +(defun ert--abbreviate-string (s len suffixp) + "Shorten string S to at most LEN chars. + +If SUFFIXP is non-nil, returns a suffix of S, otherwise a prefix." + (let ((n (length s))) + (cond ((< n len) + s) + (suffixp + (substring s (- n len))) + (t + (substring s 0 len))))) + +(defun ert--explain-not-equal-including-properties (a b) + "Explainer function for `ert-equal-including-properties'. + +Returns a programmer-readable explanation of why A and B are not +`ert-equal-including-properties', or nil if they are." + (if (not (equal a b)) + (ert--explain-not-equal a b) + (assert (stringp a) t) + (assert (stringp b) t) + (assert (eql (length a) (length b)) t) + (loop for i from 0 to (length a) + for props-a = (text-properties-at i a) + for props-b = (text-properties-at i b) + for difference = (ert--plist-difference-explanation props-a props-b) + do (when difference + (return `(char ,i ,(substring-no-properties a i (1+ i)) + ,difference + context-before + ,(ert--abbreviate-string + (substring-no-properties a 0 i) + 10 t) + context-after + ,(ert--abbreviate-string + (substring-no-properties a (1+ i)) + 10 nil)))) + ;; TODO(ohler): Get `equal-including-properties' fixed in + ;; Emacs, delete `ert-equal-including-properties', and + ;; re-enable this assertion. + ;;finally (assert (equal-including-properties a b) t) + ))) +(put 'ert-equal-including-properties + 'ert-explainer + 'ert--explain-not-equal-including-properties) + + +;;; Implementation of `ert-info'. + +;; TODO(ohler): The name `info' clashes with +;; `ert--test-execution-info'. One or both should be renamed. +(defvar ert--infos '() + "The stack of `ert-info' infos that currently apply. + +Bound dynamically. This is a list of (PREFIX . MESSAGE) pairs.") + +(defmacro* ert-info ((message-form &key ((:prefix prefix-form) "Info: ")) + &body body) + "Evaluate MESSAGE-FORM and BODY, and report the message if BODY fails. + +To be used within ERT tests. MESSAGE-FORM should evaluate to a +string that will be displayed together with the test result if +the test fails. PREFIX-FORM should evaluate to a string as well +and is displayed in front of the value of MESSAGE-FORM." + (declare (debug ((form &rest [sexp form]) body)) + (indent 1)) + `(let ((ert--infos (cons (cons ,prefix-form ,message-form) ert--infos))) + ,@body)) + + + +;;; Facilities for running a single test. + +(defvar ert-debug-on-error nil + "Non-nil means enter debugger when a test fails or terminates with an error.") + +;; The data structures that represent the result of running a test. +(defstruct ert-test-result + (messages nil) + (should-forms nil) + ) +(defstruct (ert-test-passed (:include ert-test-result))) +(defstruct (ert-test-result-with-condition (:include ert-test-result)) + (condition (assert nil)) + (backtrace (assert nil)) + (infos (assert nil))) +(defstruct (ert-test-quit (:include ert-test-result-with-condition))) +(defstruct (ert-test-failed (:include ert-test-result-with-condition))) +(defstruct (ert-test-aborted-with-non-local-exit (:include ert-test-result))) + + +(defun ert--record-backtrace () + "Record the current backtrace (as a list) and return it." + ;; Since the backtrace is stored in the result object, result + ;; objects must only be printed with appropriate limits + ;; (`print-level' and `print-length') in place. For interactive + ;; use, the cost of ensuring this possibly outweighs the advantage + ;; of storing the backtrace for + ;; `ert-results-pop-to-backtrace-for-test-at-point' given that we + ;; already have `ert-results-rerun-test-debugging-errors-at-point'. + ;; For batch use, however, printing the backtrace may be useful. + (loop + ;; 6 is the number of frames our own debugger adds (when + ;; compiled; more when interpreted). FIXME: Need to describe a + ;; procedure for determining this constant. + for i from 6 + for frame = (backtrace-frame i) + while frame + collect frame)) + +(defun ert--print-backtrace (backtrace) + "Format the backtrace BACKTRACE to the current buffer." + ;; This is essentially a reimplementation of Fbacktrace + ;; (src/eval.c), but for a saved backtrace, not the current one. + (let ((print-escape-newlines t) + (print-level 8) + (print-length 50)) + (dolist (frame backtrace) + (ecase (first frame) + ((nil) + ;; Special operator. + (destructuring-bind (special-operator &rest arg-forms) + (cdr frame) + (insert + (format " %S\n" (list* special-operator arg-forms))))) + ((t) + ;; Function call. + (destructuring-bind (fn &rest args) (cdr frame) + (insert (format " %S(" fn)) + (loop for firstp = t then nil + for arg in args do + (unless firstp + (insert " ")) + (insert (format "%S" arg))) + (insert ")\n"))))))) + +;; A container for the state of the execution of a single test and +;; environment data needed during its execution. +(defstruct ert--test-execution-info + (test (assert nil)) + (result (assert nil)) + ;; A thunk that may be called when RESULT has been set to its final + ;; value and test execution should be terminated. Should not + ;; return. + (exit-continuation (assert nil)) + ;; The binding of `debugger' outside of the execution of the test. + next-debugger + ;; The binding of `ert-debug-on-error' that is in effect for the + ;; execution of the current test. We store it to avoid being + ;; affected by any new bindings the test itself may establish. (I + ;; don't remember whether this feature is important.) + ert-debug-on-error) + +(defun ert--run-test-debugger (info debugger-args) + "During a test run, `debugger' is bound to a closure that calls this function. + +This function records failures and errors and either terminates +the test silently or calls the interactive debugger, as +appropriate. + +INFO is the ert--test-execution-info corresponding to this test +run. DEBUGGER-ARGS are the arguments to `debugger'." + (destructuring-bind (first-debugger-arg &rest more-debugger-args) + debugger-args + (ecase first-debugger-arg + ((lambda debug t exit nil) + (apply (ert--test-execution-info-next-debugger info) debugger-args)) + (error + (let* ((condition (first more-debugger-args)) + (type (case (car condition) + ((quit) 'quit) + (otherwise 'failed))) + (backtrace (ert--record-backtrace)) + (infos (reverse ert--infos))) + (setf (ert--test-execution-info-result info) + (ecase type + (quit + (make-ert-test-quit :condition condition + :backtrace backtrace + :infos infos)) + (failed + (make-ert-test-failed :condition condition + :backtrace backtrace + :infos infos)))) + ;; Work around Emacs' heuristic (in eval.c) for detecting + ;; errors in the debugger. + (incf num-nonmacro-input-events) + ;; FIXME: We should probably implement more fine-grained + ;; control a la non-t `debug-on-error' here. + (cond + ((ert--test-execution-info-ert-debug-on-error info) + (apply (ert--test-execution-info-next-debugger info) debugger-args)) + (t)) + (funcall (ert--test-execution-info-exit-continuation info))))))) + +(defun ert--run-test-internal (ert-test-execution-info) + "Low-level function to run a test according to ERT-TEST-EXECUTION-INFO. + +This mainly sets up debugger-related bindings." + (lexical-let ((info ert-test-execution-info)) + (setf (ert--test-execution-info-next-debugger info) debugger + (ert--test-execution-info-ert-debug-on-error info) ert-debug-on-error) + (catch 'ert--pass + ;; For now, each test gets its own temp buffer and its own + ;; window excursion, just to be safe. If this turns out to be + ;; too expensive, we can remove it. + (with-temp-buffer + (save-window-excursion + (let ((debugger (lambda (&rest debugger-args) + (ert--run-test-debugger info debugger-args))) + (debug-on-error t) + (debug-on-quit t) + ;; FIXME: Do we need to store the old binding of this + ;; and consider it in `ert--run-test-debugger'? + (debug-ignored-errors nil) + (ert--infos '())) + (funcall (ert-test-body (ert--test-execution-info-test info)))))) + (ert-pass)) + (setf (ert--test-execution-info-result info) (make-ert-test-passed))) + nil) + +(defun ert--force-message-log-buffer-truncation () + "Immediately truncate *Messages* buffer according to `message-log-max'. + +This can be useful after reducing the value of `message-log-max'." + (with-current-buffer (get-buffer-create "*Messages*") + ;; This is a reimplementation of this part of message_dolog() in xdisp.c: + ;; if (NATNUMP (Vmessage_log_max)) + ;; { + ;; scan_newline (Z, Z_BYTE, BEG, BEG_BYTE, + ;; -XFASTINT (Vmessage_log_max) - 1, 0); + ;; del_range_both (BEG, BEG_BYTE, PT, PT_BYTE, 0); + ;; } + (when (and (integerp message-log-max) (>= message-log-max 0)) + (let ((begin (point-min)) + (end (save-excursion + (goto-char (point-max)) + (forward-line (- message-log-max)) + (point)))) + (delete-region begin end))))) + +(defvar ert--running-tests nil + "List of tests that are currently in execution. + +This list is empty while no test is running, has one element +while a test is running, two elements while a test run from +inside a test is running, etc. The list is in order of nesting, +innermost test first. + +The elements are of type `ert-test'.") + +(defun ert-run-test (ert-test) + "Run ERT-TEST. + +Returns the result and stores it in ERT-TEST's `most-recent-result' slot." + (setf (ert-test-most-recent-result ert-test) nil) + (block error + (lexical-let ((begin-marker + (with-current-buffer (get-buffer-create "*Messages*") + (set-marker (make-marker) (point-max))))) + (unwind-protect + (lexical-let ((info (make-ert--test-execution-info + :test ert-test + :result + (make-ert-test-aborted-with-non-local-exit) + :exit-continuation (lambda () + (return-from error nil)))) + (should-form-accu (list))) + (unwind-protect + (let ((ert--should-execution-observer + (lambda (form-description) + (push form-description should-form-accu))) + (message-log-max t) + (ert--running-tests (cons ert-test ert--running-tests))) + (ert--run-test-internal info)) + (let ((result (ert--test-execution-info-result info))) + (setf (ert-test-result-messages result) + (with-current-buffer (get-buffer-create "*Messages*") + (buffer-substring begin-marker (point-max)))) + (ert--force-message-log-buffer-truncation) + (setq should-form-accu (nreverse should-form-accu)) + (setf (ert-test-result-should-forms result) + should-form-accu) + (setf (ert-test-most-recent-result ert-test) result)))) + (set-marker begin-marker nil)))) + (ert-test-most-recent-result ert-test)) + +(defun ert-running-test () + "Return the top-level test currently executing." + (car (last ert--running-tests))) + + +;;; Test selectors. + +(defun ert-test-result-type-p (result result-type) + "Return non-nil if RESULT matches type RESULT-TYPE. + +Valid result types: + +nil -- Never matches. +t -- Always matches. +:failed, :passed -- Matches corresponding results. +\(and TYPES...\) -- Matches if all TYPES match. +\(or TYPES...\) -- Matches if some TYPES match. +\(not TYPE\) -- Matches if TYPE does not match. +\(satisfies PREDICATE\) -- Matches if PREDICATE returns true when called with + RESULT." + ;; It would be easy to add `member' and `eql' types etc., but I + ;; haven't bothered yet. + (etypecase result-type + ((member nil) nil) + ((member t) t) + ((member :failed) (ert-test-failed-p result)) + ((member :passed) (ert-test-passed-p result)) + (cons + (destructuring-bind (operator &rest operands) result-type + (ecase operator + (and + (case (length operands) + (0 t) + (t + (and (ert-test-result-type-p result (first operands)) + (ert-test-result-type-p result `(and ,@(rest operands))))))) + (or + (case (length operands) + (0 nil) + (t + (or (ert-test-result-type-p result (first operands)) + (ert-test-result-type-p result `(or ,@(rest operands))))))) + (not + (assert (eql (length operands) 1)) + (not (ert-test-result-type-p result (first operands)))) + (satisfies + (assert (eql (length operands) 1)) + (funcall (first operands) result))))))) + +(defun ert-test-result-expected-p (test result) + "Return non-nil if TEST's expected result type matches RESULT." + (ert-test-result-type-p result (ert-test-expected-result-type test))) + +(defun ert-select-tests (selector universe) + "Return the tests that match SELECTOR. + +UNIVERSE specifies the set of tests to select from; it should be +a list of tests, or t, which refers to all tests named by symbols +in `obarray'. + +Returns the set of tests as a list. + +Valid selectors: + +nil -- Selects the empty set. +t -- Selects UNIVERSE. +:new -- Selects all tests that have not been run yet. +:failed, :passed -- Select tests according to their most recent result. +:expected, :unexpected -- Select tests according to their most recent result. +a string -- Selects all tests that have a name that matches the string, + a regexp. +a test -- Selects that test. +a symbol -- Selects the test that the symbol names, errors if none. +\(member TESTS...\) -- Selects TESTS, a list of tests or symbols naming tests. +\(eql TEST\) -- Selects TEST, a test or a symbol naming a test. +\(and SELECTORS...\) -- Selects the tests that match all SELECTORS. +\(or SELECTORS...\) -- Selects the tests that match any SELECTOR. +\(not SELECTOR\) -- Selects all tests that do not match SELECTOR. +\(tag TAG) -- Selects all tests that have TAG on their tags list. +\(satisfies PREDICATE\) -- Selects all tests that satisfy PREDICATE. + +Only selectors that require a superset of tests, such +as (satisfies ...), strings, :new, etc. make use of UNIVERSE. +Selectors that do not, such as \(member ...\), just return the +set implied by them without checking whether it is really +contained in UNIVERSE." + ;; This code needs to match the etypecase in + ;; `ert-insert-human-readable-selector'. + (etypecase selector + ((member nil) nil) + ((member t) (etypecase universe + (list universe) + ((member t) (ert-select-tests "" universe)))) + ((member :new) (ert-select-tests + `(satisfies ,(lambda (test) + (null (ert-test-most-recent-result test)))) + universe)) + ((member :failed) (ert-select-tests + `(satisfies ,(lambda (test) + (ert-test-result-type-p + (ert-test-most-recent-result test) + ':failed))) + universe)) + ((member :passed) (ert-select-tests + `(satisfies ,(lambda (test) + (ert-test-result-type-p + (ert-test-most-recent-result test) + ':passed))) + universe)) + ((member :expected) (ert-select-tests + `(satisfies + ,(lambda (test) + (ert-test-result-expected-p + test + (ert-test-most-recent-result test)))) + universe)) + ((member :unexpected) (ert-select-tests `(not :expected) universe)) + (string + (etypecase universe + ((member t) (mapcar #'ert-get-test + (apropos-internal selector #'ert-test-boundp))) + (list (ert--remove-if-not (lambda (test) + (and (ert-test-name test) + (string-match selector + (ert-test-name test)))) + universe)))) + (ert-test (list selector)) + (symbol + (assert (ert-test-boundp selector)) + (list (ert-get-test selector))) + (cons + (destructuring-bind (operator &rest operands) selector + (ecase operator + (member + (mapcar (lambda (purported-test) + (etypecase purported-test + (symbol (assert (ert-test-boundp purported-test)) + (ert-get-test purported-test)) + (ert-test purported-test))) + operands)) + (eql + (assert (eql (length operands) 1)) + (ert-select-tests `(member ,@operands) universe)) + (and + ;; Do these definitions of AND, NOT and OR satisfy de + ;; Morgan's laws? Should they? + (case (length operands) + (0 (ert-select-tests 't universe)) + (t (ert-select-tests `(and ,@(rest operands)) + (ert-select-tests (first operands) + universe))))) + (not + (assert (eql (length operands) 1)) + (let ((all-tests (ert-select-tests 't universe))) + (ert--set-difference all-tests + (ert-select-tests (first operands) + all-tests)))) + (or + (case (length operands) + (0 (ert-select-tests 'nil universe)) + (t (ert--union (ert-select-tests (first operands) universe) + (ert-select-tests `(or ,@(rest operands)) + universe))))) + (tag + (assert (eql (length operands) 1)) + (let ((tag (first operands))) + (ert-select-tests `(satisfies + ,(lambda (test) + (member tag (ert-test-tags test)))) + universe))) + (satisfies + (assert (eql (length operands) 1)) + (ert--remove-if-not (first operands) + (ert-select-tests 't universe)))))))) + +(defun ert--insert-human-readable-selector (selector) + "Insert a human-readable presentation of SELECTOR into the current buffer." + ;; This is needed to avoid printing the (huge) contents of the + ;; `backtrace' slot of the result objects in the + ;; `most-recent-result' slots of test case objects in (eql ...) or + ;; (member ...) selectors. + (labels ((rec (selector) + ;; This code needs to match the etypecase in `ert-select-tests'. + (etypecase selector + ((or (member nil t + :new :failed :passed + :expected :unexpected) + string + symbol) + selector) + (ert-test + (if (ert-test-name selector) + (make-symbol (format "<%S>" (ert-test-name selector))) + (make-symbol "<unnamed test>"))) + (cons + (destructuring-bind (operator &rest operands) selector + (ecase operator + ((member eql and not or) + `(,operator ,@(mapcar #'rec operands))) + ((member tag satisfies) + selector))))))) + (insert (format "%S" (rec selector))))) + + +;;; Facilities for running a whole set of tests. + +;; The data structure that contains the set of tests being executed +;; during one particular test run, their results, the state of the +;; execution, and some statistics. +;; +;; The data about results and expected results of tests may seem +;; redundant here, since the test objects also carry such information. +;; However, the information in the test objects may be more recent, it +;; may correspond to a different test run. We need the information +;; that corresponds to this run in order to be able to update the +;; statistics correctly when a test is re-run interactively and has a +;; different result than before. +(defstruct ert--stats + (selector (assert nil)) + ;; The tests, in order. + (tests (assert nil) :type vector) + ;; A map of test names (or the test objects themselves for unnamed + ;; tests) to indices into the `tests' vector. + (test-map (assert nil) :type hash-table) + ;; The results of the tests during this run, in order. + (test-results (assert nil) :type vector) + ;; The start times of the tests, in order, as reported by + ;; `current-time'. + (test-start-times (assert nil) :type vector) + ;; The end times of the tests, in order, as reported by + ;; `current-time'. + (test-end-times (assert nil) :type vector) + (passed-expected 0) + (passed-unexpected 0) + (failed-expected 0) + (failed-unexpected 0) + (start-time nil) + (end-time nil) + (aborted-p nil) + (current-test nil) + ;; The time at or after which the next redisplay should occur, as a + ;; float. + (next-redisplay 0.0)) + +(defun ert-stats-completed-expected (stats) + "Return the number of tests in STATS that had expected results." + (+ (ert--stats-passed-expected stats) + (ert--stats-failed-expected stats))) + +(defun ert-stats-completed-unexpected (stats) + "Return the number of tests in STATS that had unexpected results." + (+ (ert--stats-passed-unexpected stats) + (ert--stats-failed-unexpected stats))) + +(defun ert-stats-completed (stats) + "Number of tests in STATS that have run so far." + (+ (ert-stats-completed-expected stats) + (ert-stats-completed-unexpected stats))) + +(defun ert-stats-total (stats) + "Number of tests in STATS, regardless of whether they have run yet." + (length (ert--stats-tests stats))) + +;; The stats object of the current run, dynamically bound. This is +;; used for the mode line progress indicator. +(defvar ert--current-run-stats nil) + +(defun ert--stats-test-key (test) + "Return the key used for TEST in the test map of ert--stats objects. + +Returns the name of TEST if it has one, or TEST itself otherwise." + (or (ert-test-name test) test)) + +(defun ert--stats-set-test-and-result (stats pos test result) + "Change STATS by replacing the test at position POS with TEST and RESULT. + +Also changes the counters in STATS to match." + (let* ((tests (ert--stats-tests stats)) + (results (ert--stats-test-results stats)) + (old-test (aref tests pos)) + (map (ert--stats-test-map stats))) + (flet ((update (d) + (if (ert-test-result-expected-p (aref tests pos) + (aref results pos)) + (etypecase (aref results pos) + (ert-test-passed (incf (ert--stats-passed-expected stats) d)) + (ert-test-failed (incf (ert--stats-failed-expected stats) d)) + (null) + (ert-test-aborted-with-non-local-exit)) + (etypecase (aref results pos) + (ert-test-passed (incf (ert--stats-passed-unexpected stats) d)) + (ert-test-failed (incf (ert--stats-failed-unexpected stats) d)) + (null) + (ert-test-aborted-with-non-local-exit))))) + ;; Adjust counters to remove the result that is currently in stats. + (update -1) + ;; Put new test and result into stats. + (setf (aref tests pos) test + (aref results pos) result) + (remhash (ert--stats-test-key old-test) map) + (setf (gethash (ert--stats-test-key test) map) pos) + ;; Adjust counters to match new result. + (update +1) + nil))) + +(defun ert--make-stats (tests selector) + "Create a new `ert--stats' object for running TESTS. + +SELECTOR is the selector that was used to select TESTS." + (setq tests (ert--coerce-to-vector tests)) + (let ((map (make-hash-table :size (length tests)))) + (loop for i from 0 + for test across tests + for key = (ert--stats-test-key test) do + (assert (not (gethash key map))) + (setf (gethash key map) i)) + (make-ert--stats :selector selector + :tests tests + :test-map map + :test-results (make-vector (length tests) nil) + :test-start-times (make-vector (length tests) nil) + :test-end-times (make-vector (length tests) nil)))) + +(defun ert-run-or-rerun-test (stats test listener) + ;; checkdoc-order: nil + "Run the single test TEST and record the result using STATS and LISTENER." + (let ((ert--current-run-stats stats) + (pos (ert--stats-test-pos stats test))) + (ert--stats-set-test-and-result stats pos test nil) + ;; Call listener after setting/before resetting + ;; (ert--stats-current-test stats); the listener might refresh the + ;; mode line display, and if the value is not set yet/any more + ;; during this refresh, the mode line will flicker unnecessarily. + (setf (ert--stats-current-test stats) test) + (funcall listener 'test-started stats test) + (setf (ert-test-most-recent-result test) nil) + (setf (aref (ert--stats-test-start-times stats) pos) (current-time)) + (unwind-protect + (ert-run-test test) + (setf (aref (ert--stats-test-end-times stats) pos) (current-time)) + (let ((result (ert-test-most-recent-result test))) + (ert--stats-set-test-and-result stats pos test result) + (funcall listener 'test-ended stats test result)) + (setf (ert--stats-current-test stats) nil)))) + +(defun ert-run-tests (selector listener) + "Run the tests specified by SELECTOR, sending progress updates to LISTENER." + (let* ((tests (ert-select-tests selector t)) + (stats (ert--make-stats tests selector))) + (setf (ert--stats-start-time stats) (current-time)) + (funcall listener 'run-started stats) + (let ((abortedp t)) + (unwind-protect + (let ((ert--current-run-stats stats)) + (force-mode-line-update) + (unwind-protect + (progn + (loop for test in tests do + (ert-run-or-rerun-test stats test listener)) + (setq abortedp nil)) + (setf (ert--stats-aborted-p stats) abortedp) + (setf (ert--stats-end-time stats) (current-time)) + (funcall listener 'run-ended stats abortedp))) + (force-mode-line-update)) + stats))) + +(defun ert--stats-test-pos (stats test) + ;; checkdoc-order: nil + "Return the position (index) of TEST in the run represented by STATS." + (gethash (ert--stats-test-key test) (ert--stats-test-map stats))) + + +;;; Formatting functions shared across UIs. + +(defun ert--format-time-iso8601 (time) + "Format TIME in the variant of ISO 8601 used for timestamps in ERT." + (format-time-string "%Y-%m-%d %T%z" time)) + +(defun ert-char-for-test-result (result expectedp) + "Return a character that represents the test result RESULT. + +EXPECTEDP specifies whether the result was expected." + (let ((s (etypecase result + (ert-test-passed ".P") + (ert-test-failed "fF") + (null "--") + (ert-test-aborted-with-non-local-exit "aA")))) + (elt s (if expectedp 0 1)))) + +(defun ert-string-for-test-result (result expectedp) + "Return a string that represents the test result RESULT. + +EXPECTEDP specifies whether the result was expected." + (let ((s (etypecase result + (ert-test-passed '("passed" "PASSED")) + (ert-test-failed '("failed" "FAILED")) + (null '("unknown" "UNKNOWN")) + (ert-test-aborted-with-non-local-exit '("aborted" "ABORTED"))))) + (elt s (if expectedp 0 1)))) + +(defun ert--pp-with-indentation-and-newline (object) + "Pretty-print OBJECT, indenting it to the current column of point. +Ensures a final newline is inserted." + (let ((begin (point))) + (pp object (current-buffer)) + (unless (bolp) (insert "\n")) + (save-excursion + (goto-char begin) + (indent-sexp)))) + +(defun ert--insert-infos (result) + "Insert `ert-info' infos from RESULT into current buffer. + +RESULT must be an `ert-test-result-with-condition'." + (check-type result ert-test-result-with-condition) + (dolist (info (ert-test-result-with-condition-infos result)) + (destructuring-bind (prefix . message) info + (let ((begin (point)) + (indentation (make-string (+ (length prefix) 4) ?\s)) + (end nil)) + (unwind-protect + (progn + (insert message "\n") + (setq end (copy-marker (point))) + (goto-char begin) + (insert " " prefix) + (forward-line 1) + (while (< (point) end) + (insert indentation) + (forward-line 1))) + (when end (set-marker end nil))))))) + + +;;; Running tests in batch mode. + +(defvar ert-batch-backtrace-right-margin 70 + "*The maximum line length for printing backtraces in `ert-run-tests-batch'.") + +;;;###autoload +(defun ert-run-tests-batch (&optional selector) + "Run the tests specified by SELECTOR, printing results to the terminal. + +SELECTOR works as described in `ert-select-tests', except if +SELECTOR is nil, in which case all tests rather than none will be +run; this makes the command line \"emacs -batch -l my-tests.el -f +ert-run-tests-batch-and-exit\" useful. + +Returns the stats object." + (unless selector (setq selector 't)) + (ert-run-tests + selector + (lambda (event-type &rest event-args) + (ecase event-type + (run-started + (destructuring-bind (stats) event-args + (message "Running %s tests (%s)" + (length (ert--stats-tests stats)) + (ert--format-time-iso8601 (ert--stats-start-time stats))))) + (run-ended + (destructuring-bind (stats abortedp) event-args + (let ((unexpected (ert-stats-completed-unexpected stats)) + (expected-failures (ert--stats-failed-expected stats))) + (message "\n%sRan %s tests, %s results as expected%s (%s)%s\n" + (if (not abortedp) + "" + "Aborted: ") + (ert-stats-total stats) + (ert-stats-completed-expected stats) + (if (zerop unexpected) + "" + (format ", %s unexpected" unexpected)) + (ert--format-time-iso8601 (ert--stats-end-time stats)) + (if (zerop expected-failures) + "" + (format "\n%s expected failures" expected-failures))) + (unless (zerop unexpected) + (message "%s unexpected results:" unexpected) + (loop for test across (ert--stats-tests stats) + for result = (ert-test-most-recent-result test) do + (when (not (ert-test-result-expected-p test result)) + (message "%9s %S" + (ert-string-for-test-result result nil) + (ert-test-name test)))) + (message "%s" ""))))) + (test-started + ) + (test-ended + (destructuring-bind (stats test result) event-args + (unless (ert-test-result-expected-p test result) + (etypecase result + (ert-test-passed + (message "Test %S passed unexpectedly" (ert-test-name test))) + (ert-test-result-with-condition + (message "Test %S backtrace:" (ert-test-name test)) + (with-temp-buffer + (ert--print-backtrace (ert-test-result-with-condition-backtrace + result)) + (goto-char (point-min)) + (while (not (eobp)) + (let ((start (point)) + (end (progn (end-of-line) (point)))) + (setq end (min end + (+ start ert-batch-backtrace-right-margin))) + (message "%s" (buffer-substring-no-properties + start end))) + (forward-line 1))) + (with-temp-buffer + (ert--insert-infos result) + (insert " ") + (let ((print-escape-newlines t) + (print-level 5) + (print-length 10)) + (let ((begin (point))) + (ert--pp-with-indentation-and-newline + (ert-test-result-with-condition-condition result)))) + (goto-char (1- (point-max))) + (assert (looking-at "\n")) + (delete-char 1) + (message "Test %S condition:" (ert-test-name test)) + (message "%s" (buffer-string)))) + (ert-test-aborted-with-non-local-exit + (message "Test %S aborted with non-local exit" + (ert-test-name test))))) + (let* ((max (prin1-to-string (length (ert--stats-tests stats)))) + (format-string (concat "%9s %" + (prin1-to-string (length max)) + "s/" max " %S"))) + (message format-string + (ert-string-for-test-result result + (ert-test-result-expected-p + test result)) + (1+ (ert--stats-test-pos stats test)) + (ert-test-name test))))))))) + +;;;###autoload +(defun ert-run-tests-batch-and-exit (&optional selector) + "Like `ert-run-tests-batch', but exits Emacs when done. + +The exit status will be 0 if all test results were as expected, 1 +on unexpected results, or 2 if the tool detected an error outside +of the tests (e.g. invalid SELECTOR or bug in the code that runs +the tests)." + (unwind-protect + (let ((stats (ert-run-tests-batch selector))) + (kill-emacs (if (zerop (ert-stats-completed-unexpected stats)) 0 1))) + (unwind-protect + (progn + (message "Error running tests") + (backtrace)) + (kill-emacs 2)))) + + +;;; Utility functions for load/unload actions. + +(defun ert--activate-font-lock-keywords () + "Activate font-lock keywords for some of ERT's symbols." + (font-lock-add-keywords + nil + '(("(\\(\\<ert-deftest\\)\\>\\s *\\(\\sw+\\)?" + (1 font-lock-keyword-face nil t) + (2 font-lock-function-name-face nil t))))) + +(defun* ert--remove-from-list (list-var element &key key test) + "Remove ELEMENT from the value of LIST-VAR if present. + +This can be used as an inverse of `add-to-list'." + (unless key (setq key #'identity)) + (unless test (setq test #'equal)) + (setf (symbol-value list-var) + (ert--remove* element + (symbol-value list-var) + :key key + :test test))) + + +;;; Some basic interactive functions. + +(defun ert-read-test-name (prompt &optional default history + add-default-to-prompt) + "Read the name of a test and return it as a symbol. + +Prompt with PROMPT. If DEFAULT is a valid test name, use it as a +default. HISTORY is the history to use; see `completing-read'. +If ADD-DEFAULT-TO-PROMPT is non-nil, PROMPT will be modified to +include the default, if any. + +Signals an error if no test name was read." + (etypecase default + (string (let ((symbol (intern-soft default))) + (unless (and symbol (ert-test-boundp symbol)) + (setq default nil)))) + (symbol (setq default + (if (ert-test-boundp default) + (symbol-name default) + nil))) + (ert-test (setq default (ert-test-name default)))) + (when add-default-to-prompt + (setq prompt (if (null default) + (format "%s: " prompt) + (format "%s (default %s): " prompt default)))) + (let ((input (completing-read prompt obarray #'ert-test-boundp + t nil history default nil))) + ;; completing-read returns an empty string if default was nil and + ;; the user just hit enter. + (let ((sym (intern-soft input))) + (if (ert-test-boundp sym) + sym + (error "Input does not name a test"))))) + +(defun ert-read-test-name-at-point (prompt) + "Read the name of a test and return it as a symbol. +As a default, use the symbol at point, or the test at point if in +the ERT results buffer. Prompt with PROMPT, augmented with the +default (if any)." + (ert-read-test-name prompt (ert-test-at-point) nil t)) + +(defun ert-find-test-other-window (test-name) + "Find, in another window, the definition of TEST-NAME." + (interactive (list (ert-read-test-name-at-point "Find test definition: "))) + (find-function-do-it test-name 'ert-deftest 'switch-to-buffer-other-window)) + +(defun ert-delete-test (test-name) + "Make the test TEST-NAME unbound. + +Nothing more than an interactive interface to `ert-make-test-unbound'." + (interactive (list (ert-read-test-name-at-point "Delete test"))) + (ert-make-test-unbound test-name)) + +(defun ert-delete-all-tests () + "Make all symbols in `obarray' name no test." + (interactive) + (when (interactive-p) + (unless (y-or-n-p "Delete all tests? ") + (error "Aborted"))) + ;; We can't use `ert-select-tests' here since that gives us only + ;; test objects, and going from them back to the test name symbols + ;; can fail if the `ert-test' defstruct has been redefined. + (mapc #'ert-make-test-unbound (apropos-internal "" #'ert-test-boundp)) + t) + + +;;; Display of test progress and results. + +;; An entry in the results buffer ewoc. There is one entry per test. +(defstruct ert--ewoc-entry + (test (assert nil)) + ;; If the result of this test was expected, its ewoc entry is hidden + ;; initially. + (hidden-p (assert nil)) + ;; An ewoc entry may be collapsed to hide details such as the error + ;; condition. + ;; + ;; I'm not sure the ability to expand and collapse entries is still + ;; a useful feature. + (expanded-p t) + ;; By default, the ewoc entry presents the error condition with + ;; certain limits on how much to print (`print-level', + ;; `print-length'). The user can interactively switch to a set of + ;; higher limits. + (extended-printer-limits-p nil)) + +;; Variables local to the results buffer. + +;; The ewoc. +(defvar ert--results-ewoc) +;; The stats object. +(defvar ert--results-stats) +;; A string with one character per test. Each character represents +;; the result of the corresponding test. The string is displayed near +;; the top of the buffer and serves as a progress bar. +(defvar ert--results-progress-bar-string) +;; The position where the progress bar button begins. +(defvar ert--results-progress-bar-button-begin) +;; The test result listener that updates the buffer when tests are run. +(defvar ert--results-listener) + +(defun ert-insert-test-name-button (test-name) + "Insert a button that links to TEST-NAME." + (insert-text-button (format "%S" test-name) + :type 'ert--test-name-button + 'ert-test-name test-name)) + +(defun ert--results-format-expected-unexpected (expected unexpected) + "Return a string indicating EXPECTED expected results, UNEXPECTED unexpected." + (if (zerop unexpected) + (format "%s" expected) + (format "%s (%s unexpected)" (+ expected unexpected) unexpected))) + +(defun ert--results-update-ewoc-hf (ewoc stats) + "Update the header and footer of EWOC to show certain information from STATS. + +Also sets `ert--results-progress-bar-button-begin'." + (let ((run-count (ert-stats-completed stats)) + (results-buffer (current-buffer)) + ;; Need to save buffer-local value. + (font-lock font-lock-mode)) + (ewoc-set-hf + ewoc + ;; header + (with-temp-buffer + (insert "Selector: ") + (ert--insert-human-readable-selector (ert--stats-selector stats)) + (insert "\n") + (insert + (format (concat "Passed: %s\n" + "Failed: %s\n" + "Total: %s/%s\n\n") + (ert--results-format-expected-unexpected + (ert--stats-passed-expected stats) + (ert--stats-passed-unexpected stats)) + (ert--results-format-expected-unexpected + (ert--stats-failed-expected stats) + (ert--stats-failed-unexpected stats)) + run-count + (ert-stats-total stats))) + (insert + (format "Started at: %s\n" + (ert--format-time-iso8601 (ert--stats-start-time stats)))) + ;; FIXME: This is ugly. Need to properly define invariants of + ;; the `stats' data structure. + (let ((state (cond ((ert--stats-aborted-p stats) 'aborted) + ((ert--stats-current-test stats) 'running) + ((ert--stats-end-time stats) 'finished) + (t 'preparing)))) + (ecase state + (preparing + (insert "")) + (aborted + (cond ((ert--stats-current-test stats) + (insert "Aborted during test: ") + (ert-insert-test-name-button + (ert-test-name (ert--stats-current-test stats)))) + (t + (insert "Aborted.")))) + (running + (assert (ert--stats-current-test stats)) + (insert "Running test: ") + (ert-insert-test-name-button (ert-test-name + (ert--stats-current-test stats)))) + (finished + (assert (not (ert--stats-current-test stats))) + (insert "Finished."))) + (insert "\n") + (if (ert--stats-end-time stats) + (insert + (format "%s%s\n" + (if (ert--stats-aborted-p stats) + "Aborted at: " + "Finished at: ") + (ert--format-time-iso8601 (ert--stats-end-time stats)))) + (insert "\n")) + (insert "\n")) + (let ((progress-bar-string (with-current-buffer results-buffer + ert--results-progress-bar-string))) + (let ((progress-bar-button-begin + (insert-text-button progress-bar-string + :type 'ert--results-progress-bar-button + 'face (or (and font-lock + (ert-face-for-stats stats)) + 'button)))) + ;; The header gets copied verbatim to the results buffer, + ;; and all positions remain the same, so + ;; `progress-bar-button-begin' will be the right position + ;; even in the results buffer. + (with-current-buffer results-buffer + (set (make-local-variable 'ert--results-progress-bar-button-begin) + progress-bar-button-begin)))) + (insert "\n\n") + (buffer-string)) + ;; footer + ;; + ;; We actually want an empty footer, but that would trigger a bug + ;; in ewoc, sometimes clearing the entire buffer. (It's possible + ;; that this bug has been fixed since this has been tested; we + ;; should test it again.) + "\n"))) + + +(defvar ert-test-run-redisplay-interval-secs .1 + "How many seconds ERT should wait between redisplays while running tests. + +While running tests, ERT shows the current progress, and this variable +determines how frequently the progress display is updated.") + +(defun ert--results-update-stats-display (ewoc stats) + "Update EWOC and the mode line to show data from STATS." + ;; TODO(ohler): investigate using `make-progress-reporter'. + (ert--results-update-ewoc-hf ewoc stats) + (force-mode-line-update) + (redisplay t) + (setf (ert--stats-next-redisplay stats) + (+ (float-time) ert-test-run-redisplay-interval-secs))) + +(defun ert--results-update-stats-display-maybe (ewoc stats) + "Call `ert--results-update-stats-display' if not called recently. + +EWOC and STATS are arguments for `ert--results-update-stats-display'." + (when (>= (float-time) (ert--stats-next-redisplay stats)) + (ert--results-update-stats-display ewoc stats))) + +(defun ert--tests-running-mode-line-indicator () + "Return a string for the mode line that shows the test run progress." + (let* ((stats ert--current-run-stats) + (tests-total (ert-stats-total stats)) + (tests-completed (ert-stats-completed stats))) + (if (>= tests-completed tests-total) + (format " ERT(%s/%s,finished)" tests-completed tests-total) + (format " ERT(%s/%s):%s" + (1+ tests-completed) + tests-total + (if (null (ert--stats-current-test stats)) + "?" + (format "%S" + (ert-test-name (ert--stats-current-test stats)))))))) + +(defun ert--make-xrefs-region (begin end) + "Attach cross-references to function names between BEGIN and END. + +BEGIN and END specify a region in the current buffer." + (save-excursion + (save-restriction + (narrow-to-region begin (point)) + ;; Inhibit optimization in `debugger-make-xrefs' that would + ;; sometimes insert unrelated backtrace info into our buffer. + (let ((debugger-previous-backtrace nil)) + (debugger-make-xrefs))))) + +(defun ert--string-first-line (s) + "Return the first line of S, or S if it contains no newlines. + +The return value does not include the line terminator." + (substring s 0 (ert--string-position ?\n s))) + +(defun ert-face-for-test-result (expectedp) + "Return a face that shows whether a test result was expected or unexpected. + +If EXPECTEDP is nil, returns the face for unexpected results; if +non-nil, returns the face for expected results.." + (if expectedp 'ert-test-result-expected 'ert-test-result-unexpected)) + +(defun ert-face-for-stats (stats) + "Return a face that represents STATS." + (cond ((ert--stats-aborted-p stats) 'nil) + ((plusp (ert-stats-completed-unexpected stats)) + (ert-face-for-test-result nil)) + ((eql (ert-stats-completed-expected stats) (ert-stats-total stats)) + (ert-face-for-test-result t)) + (t 'nil))) + +(defun ert--print-test-for-ewoc (entry) + "The ewoc print function for ewoc test entries. ENTRY is the entry to print." + (let* ((test (ert--ewoc-entry-test entry)) + (stats ert--results-stats) + (result (let ((pos (ert--stats-test-pos stats test))) + (assert pos) + (aref (ert--stats-test-results stats) pos))) + (hiddenp (ert--ewoc-entry-hidden-p entry)) + (expandedp (ert--ewoc-entry-expanded-p entry)) + (extended-printer-limits-p (ert--ewoc-entry-extended-printer-limits-p + entry))) + (cond (hiddenp) + (t + (let ((expectedp (ert-test-result-expected-p test result))) + (insert-text-button (format "%c" (ert-char-for-test-result + result expectedp)) + :type 'ert--results-expand-collapse-button + 'face (or (and font-lock-mode + (ert-face-for-test-result + expectedp)) + 'button))) + (insert " ") + (ert-insert-test-name-button (ert-test-name test)) + (insert "\n") + (when (and expandedp (not (eql result 'nil))) + (when (ert-test-documentation test) + (insert " " + (propertize + (ert--string-first-line (ert-test-documentation test)) + 'font-lock-face 'font-lock-doc-face) + "\n")) + (etypecase result + (ert-test-passed + (if (ert-test-result-expected-p test result) + (insert " passed\n") + (insert " passed unexpectedly\n")) + (insert "")) + (ert-test-result-with-condition + (ert--insert-infos result) + (let ((print-escape-newlines t) + (print-level (if extended-printer-limits-p 12 6)) + (print-length (if extended-printer-limits-p 100 10))) + (insert " ") + (let ((begin (point))) + (ert--pp-with-indentation-and-newline + (ert-test-result-with-condition-condition result)) + (ert--make-xrefs-region begin (point))))) + (ert-test-aborted-with-non-local-exit + (insert " aborted\n"))) + (insert "\n"))))) + nil) + +(defun ert--results-font-lock-function (enabledp) + "Redraw the ERT results buffer after font-lock-mode was switched on or off. + +ENABLEDP is true if font-lock-mode is switched on, false +otherwise." + (ert--results-update-ewoc-hf ert--results-ewoc ert--results-stats) + (ewoc-refresh ert--results-ewoc) + (font-lock-default-function enabledp)) + +(defun ert--setup-results-buffer (stats listener buffer-name) + "Set up a test results buffer. + +STATS is the stats object; LISTENER is the results listener; +BUFFER-NAME, if non-nil, is the buffer name to use." + (unless buffer-name (setq buffer-name "*ert*")) + (let ((buffer (get-buffer-create buffer-name))) + (with-current-buffer buffer + (setq buffer-read-only t) + (let ((inhibit-read-only t)) + (buffer-disable-undo) + (erase-buffer) + (ert-results-mode) + ;; Erase buffer again in case switching out of the previous + ;; mode inserted anything. (This happens e.g. when switching + ;; from ert-results-mode to ert-results-mode when + ;; font-lock-mode turns itself off in change-major-mode-hook.) + (erase-buffer) + (set (make-local-variable 'font-lock-function) + 'ert--results-font-lock-function) + (let ((ewoc (ewoc-create 'ert--print-test-for-ewoc nil nil t))) + (set (make-local-variable 'ert--results-ewoc) ewoc) + (set (make-local-variable 'ert--results-stats) stats) + (set (make-local-variable 'ert--results-progress-bar-string) + (make-string (ert-stats-total stats) + (ert-char-for-test-result nil t))) + (set (make-local-variable 'ert--results-listener) listener) + (loop for test across (ert--stats-tests stats) do + (ewoc-enter-last ewoc + (make-ert--ewoc-entry :test test :hidden-p t))) + (ert--results-update-ewoc-hf ert--results-ewoc ert--results-stats) + (goto-char (1- (point-max))) + buffer))))) + + +(defvar ert--selector-history nil + "List of recent test selectors read from terminal.") + +;; Should OUTPUT-BUFFER-NAME and MESSAGE-FN really be arguments here? +;; They are needed only for our automated self-tests at the moment. +;; Or should there be some other mechanism? +;;;###autoload +(defun ert-run-tests-interactively (selector + &optional output-buffer-name message-fn) + "Run the tests specified by SELECTOR and display the results in a buffer. + +SELECTOR works as described in `ert-select-tests'. +OUTPUT-BUFFER-NAME and MESSAGE-FN should normally be nil; they +are used for automated self-tests and specify which buffer to use +and how to display message." + (interactive + (list (let ((default (if ert--selector-history + ;; Can't use `first' here as this form is + ;; not compiled, and `first' is not + ;; defined without cl. + (car ert--selector-history) + "t"))) + (read-from-minibuffer (if (null default) + "Run tests: " + (format "Run tests (default %s): " default)) + nil nil t 'ert--selector-history + default nil)) + nil)) + (unless message-fn (setq message-fn 'message)) + (lexical-let ((output-buffer-name output-buffer-name) + buffer + listener + (message-fn message-fn)) + (setq listener + (lambda (event-type &rest event-args) + (ecase event-type + (run-started + (destructuring-bind (stats) event-args + (setq buffer (ert--setup-results-buffer stats + listener + output-buffer-name)) + (pop-to-buffer buffer))) + (run-ended + (destructuring-bind (stats abortedp) event-args + (funcall message-fn + "%sRan %s tests, %s results were as expected%s" + (if (not abortedp) + "" + "Aborted: ") + (ert-stats-total stats) + (ert-stats-completed-expected stats) + (let ((unexpected + (ert-stats-completed-unexpected stats))) + (if (zerop unexpected) + "" + (format ", %s unexpected" unexpected)))) + (ert--results-update-stats-display (with-current-buffer buffer + ert--results-ewoc) + stats))) + (test-started + (destructuring-bind (stats test) event-args + (with-current-buffer buffer + (let* ((ewoc ert--results-ewoc) + (pos (ert--stats-test-pos stats test)) + (node (ewoc-nth ewoc pos))) + (assert node) + (setf (ert--ewoc-entry-test (ewoc-data node)) test) + (aset ert--results-progress-bar-string pos + (ert-char-for-test-result nil t)) + (ert--results-update-stats-display-maybe ewoc stats) + (ewoc-invalidate ewoc node))))) + (test-ended + (destructuring-bind (stats test result) event-args + (with-current-buffer buffer + (let* ((ewoc ert--results-ewoc) + (pos (ert--stats-test-pos stats test)) + (node (ewoc-nth ewoc pos))) + (when (ert--ewoc-entry-hidden-p (ewoc-data node)) + (setf (ert--ewoc-entry-hidden-p (ewoc-data node)) + (ert-test-result-expected-p test result))) + (aset ert--results-progress-bar-string pos + (ert-char-for-test-result result + (ert-test-result-expected-p + test result))) + (ert--results-update-stats-display-maybe ewoc stats) + (ewoc-invalidate ewoc node)))))))) + (ert-run-tests + selector + listener))) +;;;###autoload +(defalias 'ert 'ert-run-tests-interactively) + + +;;; Simple view mode for auxiliary information like stack traces or +;;; messages. Mainly binds "q" for quit. + +(define-derived-mode ert-simple-view-mode fundamental-mode "ERT-View" + "Major mode for viewing auxiliary information in ERT.") + +(loop for (key binding) in + '(("q" quit-window) + ) + do + (define-key ert-simple-view-mode-map key binding)) + + +;;; Commands and button actions for the results buffer. + +(define-derived-mode ert-results-mode fundamental-mode "ERT-Results" + "Major mode for viewing results of ERT test runs.") + +(loop for (key binding) in + '(;; Stuff that's not in the menu. + ("\t" forward-button) + ([backtab] backward-button) + ("j" ert-results-jump-between-summary-and-result) + ("q" quit-window) + ("L" ert-results-toggle-printer-limits-for-test-at-point) + ("n" ert-results-next-test) + ("p" ert-results-previous-test) + ;; Stuff that is in the menu. + ("R" ert-results-rerun-all-tests) + ("r" ert-results-rerun-test-at-point) + ("d" ert-results-rerun-test-at-point-debugging-errors) + ("." ert-results-find-test-at-point-other-window) + ("b" ert-results-pop-to-backtrace-for-test-at-point) + ("m" ert-results-pop-to-messages-for-test-at-point) + ("l" ert-results-pop-to-should-forms-for-test-at-point) + ("h" ert-results-describe-test-at-point) + ("D" ert-delete-test) + ("T" ert-results-pop-to-timings) + ) + do + (define-key ert-results-mode-map key binding)) + +(easy-menu-define ert-results-mode-menu ert-results-mode-map + "Menu for `ert-results-mode'." + '("ERT Results" + ["Re-run all tests" ert-results-rerun-all-tests] + "--" + ["Re-run test" ert-results-rerun-test-at-point] + ["Debug test" ert-results-rerun-test-at-point-debugging-errors] + ["Show test definition" ert-results-find-test-at-point-other-window] + "--" + ["Show backtrace" ert-results-pop-to-backtrace-for-test-at-point] + ["Show messages" ert-results-pop-to-messages-for-test-at-point] + ["Show `should' forms" ert-results-pop-to-should-forms-for-test-at-point] + ["Describe test" ert-results-describe-test-at-point] + "--" + ["Delete test" ert-delete-test] + "--" + ["Show execution time of each test" ert-results-pop-to-timings] + )) + +(define-button-type 'ert--results-progress-bar-button + 'action #'ert--results-progress-bar-button-action + 'help-echo "mouse-2, RET: Reveal test result") + +(define-button-type 'ert--test-name-button + 'action #'ert--test-name-button-action + 'help-echo "mouse-2, RET: Find test definition") + +(define-button-type 'ert--results-expand-collapse-button + 'action #'ert--results-expand-collapse-button-action + 'help-echo "mouse-2, RET: Expand/collapse test result") + +(defun ert--results-test-node-or-null-at-point () + "If point is on a valid ewoc node, return it; return nil otherwise. + +To be used in the ERT results buffer." + (let* ((ewoc ert--results-ewoc) + (node (ewoc-locate ewoc))) + ;; `ewoc-locate' will return an arbitrary node when point is on + ;; header or footer, or when all nodes are invisible. So we need + ;; to validate its return value here. + ;; + ;; Update: I'm seeing nil being returned in some cases now, + ;; perhaps this has been changed? + (if (and node + (>= (point) (ewoc-location node)) + (not (ert--ewoc-entry-hidden-p (ewoc-data node)))) + node + nil))) + +(defun ert--results-test-node-at-point () + "If point is on a valid ewoc node, return it; signal an error otherwise. + +To be used in the ERT results buffer." + (or (ert--results-test-node-or-null-at-point) + (error "No test at point"))) + +(defun ert-results-next-test () + "Move point to the next test. + +To be used in the ERT results buffer." + (interactive) + (ert--results-move (ewoc-locate ert--results-ewoc) 'ewoc-next + "No tests below")) + +(defun ert-results-previous-test () + "Move point to the previous test. + +To be used in the ERT results buffer." + (interactive) + (ert--results-move (ewoc-locate ert--results-ewoc) 'ewoc-prev + "No tests above")) + +(defun ert--results-move (node ewoc-fn error-message) + "Move point from NODE to the previous or next node. + +EWOC-FN specifies the direction and should be either `ewoc-prev' +or `ewoc-next'. If there are no more nodes in that direction, an +error is signalled with the message ERROR-MESSAGE." + (loop + (setq node (funcall ewoc-fn ert--results-ewoc node)) + (when (null node) + (error "%s" error-message)) + (unless (ert--ewoc-entry-hidden-p (ewoc-data node)) + (goto-char (ewoc-location node)) + (return)))) + +(defun ert--results-expand-collapse-button-action (button) + "Expand or collapse the test node BUTTON belongs to." + (let* ((ewoc ert--results-ewoc) + (node (save-excursion + (goto-char (ert--button-action-position)) + (ert--results-test-node-at-point))) + (entry (ewoc-data node))) + (setf (ert--ewoc-entry-expanded-p entry) + (not (ert--ewoc-entry-expanded-p entry))) + (ewoc-invalidate ewoc node))) + +(defun ert-results-find-test-at-point-other-window () + "Find the definition of the test at point in another window. + +To be used in the ERT results buffer." + (interactive) + (let ((name (ert-test-at-point))) + (unless name + (error "No test at point")) + (ert-find-test-other-window name))) + +(defun ert--test-name-button-action (button) + "Find the definition of the test BUTTON belongs to, in another window." + (let ((name (button-get button 'ert-test-name))) + (ert-find-test-other-window name))) + +(defun ert--ewoc-position (ewoc node) + ;; checkdoc-order: nil + "Return the position of NODE in EWOC, or nil if NODE is not in EWOC." + (loop for i from 0 + for node-here = (ewoc-nth ewoc 0) then (ewoc-next ewoc node-here) + do (when (eql node node-here) + (return i)) + finally (return nil))) + +(defun ert-results-jump-between-summary-and-result () + "Jump back and forth between the test run summary and individual test results. + +From an ewoc node, jumps to the character that represents the +same test in the progress bar, and vice versa. + +To be used in the ERT results buffer." + ;; Maybe this command isn't actually needed much, but if it is, it + ;; seems like an indication that the UI design is not optimal. If + ;; jumping back and forth between a summary at the top of the buffer + ;; and the error log in the remainder of the buffer is useful, then + ;; the summary apparently needs to be easily accessible from the + ;; error log, and perhaps it would be better to have it in a + ;; separate buffer to keep it visible. + (interactive) + (let ((ewoc ert--results-ewoc) + (progress-bar-begin ert--results-progress-bar-button-begin)) + (cond ((ert--results-test-node-or-null-at-point) + (let* ((node (ert--results-test-node-at-point)) + (pos (ert--ewoc-position ewoc node))) + (goto-char (+ progress-bar-begin pos)))) + ((and (<= progress-bar-begin (point)) + (< (point) (button-end (button-at progress-bar-begin)))) + (let* ((node (ewoc-nth ewoc (- (point) progress-bar-begin))) + (entry (ewoc-data node))) + (when (ert--ewoc-entry-hidden-p entry) + (setf (ert--ewoc-entry-hidden-p entry) nil) + (ewoc-invalidate ewoc node)) + (ewoc-goto-node ewoc node))) + (t + (goto-char progress-bar-begin))))) + +(defun ert-test-at-point () + "Return the name of the test at point as a symbol, or nil if none." + (or (and (eql major-mode 'ert-results-mode) + (let ((test (ert--results-test-at-point-no-redefinition))) + (and test (ert-test-name test)))) + (let* ((thing (thing-at-point 'symbol)) + (sym (intern-soft thing))) + (and (ert-test-boundp sym) + sym)))) + +(defun ert--results-test-at-point-no-redefinition () + "Return the test at point, or nil. + +To be used in the ERT results buffer." + (assert (eql major-mode 'ert-results-mode)) + (if (ert--results-test-node-or-null-at-point) + (let* ((node (ert--results-test-node-at-point)) + (test (ert--ewoc-entry-test (ewoc-data node)))) + test) + (let ((progress-bar-begin ert--results-progress-bar-button-begin)) + (when (and (<= progress-bar-begin (point)) + (< (point) (button-end (button-at progress-bar-begin)))) + (let* ((test-index (- (point) progress-bar-begin)) + (test (aref (ert--stats-tests ert--results-stats) + test-index))) + test))))) + +(defun ert--results-test-at-point-allow-redefinition () + "Look up the test at point, and check whether it has been redefined. + +To be used in the ERT results buffer. + +Returns a list of two elements: the test (or nil) and a symbol +specifying whether the test has been redefined. + +If a new test has been defined with the same name as the test at +point, replaces the test at point with the new test, and returns +the new test and the symbol `redefined'. + +If the test has been deleted, returns the old test and the symbol +`deleted'. + +If the test is still current, returns the test and the symbol nil. + +If there is no test at point, returns a list with two nils." + (let ((test (ert--results-test-at-point-no-redefinition))) + (cond ((null test) + `(nil nil)) + ((null (ert-test-name test)) + `(,test nil)) + (t + (let* ((name (ert-test-name test)) + (new-test (and (ert-test-boundp name) + (ert-get-test name)))) + (cond ((eql test new-test) + `(,test nil)) + ((null new-test) + `(,test deleted)) + (t + (ert--results-update-after-test-redefinition + (ert--stats-test-pos ert--results-stats test) + new-test) + `(,new-test redefined)))))))) + +(defun ert--results-update-after-test-redefinition (pos new-test) + "Update results buffer after the test at pos POS has been redefined. + +Also updates the stats object. NEW-TEST is the new test +definition." + (let* ((stats ert--results-stats) + (ewoc ert--results-ewoc) + (node (ewoc-nth ewoc pos)) + (entry (ewoc-data node))) + (ert--stats-set-test-and-result stats pos new-test nil) + (setf (ert--ewoc-entry-test entry) new-test + (aref ert--results-progress-bar-string pos) (ert-char-for-test-result + nil t)) + (ewoc-invalidate ewoc node)) + nil) + +(defun ert--button-action-position () + "The buffer position where the last button action was triggered." + (cond ((integerp last-command-event) + (point)) + ((eventp last-command-event) + (posn-point (event-start last-command-event))) + (t (assert nil)))) + +(defun ert--results-progress-bar-button-action (button) + "Jump to details for the test represented by the character clicked in BUTTON." + (goto-char (ert--button-action-position)) + (ert-results-jump-between-summary-and-result)) + +(defun ert-results-rerun-all-tests () + "Re-run all tests, using the same selector. + +To be used in the ERT results buffer." + (interactive) + (assert (eql major-mode 'ert-results-mode)) + (let ((selector (ert--stats-selector ert--results-stats))) + (ert-run-tests-interactively selector (buffer-name)))) + +(defun ert-results-rerun-test-at-point () + "Re-run the test at point. + +To be used in the ERT results buffer." + (interactive) + (destructuring-bind (test redefinition-state) + (ert--results-test-at-point-allow-redefinition) + (when (null test) + (error "No test at point")) + (let* ((stats ert--results-stats) + (progress-message (format "Running %stest %S" + (ecase redefinition-state + ((nil) "") + (redefined "new definition of ") + (deleted "deleted ")) + (ert-test-name test)))) + ;; Need to save and restore point manually here: When point is on + ;; the first visible ewoc entry while the header is updated, point + ;; moves to the top of the buffer. This is undesirable, and a + ;; simple `save-excursion' doesn't prevent it. + (let ((point (point))) + (unwind-protect + (unwind-protect + (progn + (message "%s..." progress-message) + (ert-run-or-rerun-test stats test + ert--results-listener)) + (ert--results-update-stats-display ert--results-ewoc stats) + (message "%s...%s" + progress-message + (let ((result (ert-test-most-recent-result test))) + (ert-string-for-test-result + result (ert-test-result-expected-p test result))))) + (goto-char point)))))) + +(defun ert-results-rerun-test-at-point-debugging-errors () + "Re-run the test at point with `ert-debug-on-error' bound to t. + +To be used in the ERT results buffer." + (interactive) + (let ((ert-debug-on-error t)) + (ert-results-rerun-test-at-point))) + +(defun ert-results-pop-to-backtrace-for-test-at-point () + "Display the backtrace for the test at point. + +To be used in the ERT results buffer." + (interactive) + (let* ((test (ert--results-test-at-point-no-redefinition)) + (stats ert--results-stats) + (pos (ert--stats-test-pos stats test)) + (result (aref (ert--stats-test-results stats) pos))) + (etypecase result + (ert-test-passed (error "Test passed, no backtrace available")) + (ert-test-result-with-condition + (let ((backtrace (ert-test-result-with-condition-backtrace result)) + (buffer (get-buffer-create "*ERT Backtrace*"))) + (pop-to-buffer buffer) + (setq buffer-read-only t) + (let ((inhibit-read-only t)) + (buffer-disable-undo) + (erase-buffer) + (ert-simple-view-mode) + ;; Use unibyte because `debugger-setup-buffer' also does so. + (set-buffer-multibyte nil) + (setq truncate-lines t) + (ert--print-backtrace backtrace) + (debugger-make-xrefs) + (goto-char (point-min)) + (insert "Backtrace for test `") + (ert-insert-test-name-button (ert-test-name test)) + (insert "':\n"))))))) + +(defun ert-results-pop-to-messages-for-test-at-point () + "Display the part of the *Messages* buffer generated during the test at point. + +To be used in the ERT results buffer." + (interactive) + (let* ((test (ert--results-test-at-point-no-redefinition)) + (stats ert--results-stats) + (pos (ert--stats-test-pos stats test)) + (result (aref (ert--stats-test-results stats) pos))) + (let ((buffer (get-buffer-create "*ERT Messages*"))) + (pop-to-buffer buffer) + (setq buffer-read-only t) + (let ((inhibit-read-only t)) + (buffer-disable-undo) + (erase-buffer) + (ert-simple-view-mode) + (insert (ert-test-result-messages result)) + (goto-char (point-min)) + (insert "Messages for test `") + (ert-insert-test-name-button (ert-test-name test)) + (insert "':\n"))))) + +(defun ert-results-pop-to-should-forms-for-test-at-point () + "Display the list of `should' forms executed during the test at point. + +To be used in the ERT results buffer." + (interactive) + (let* ((test (ert--results-test-at-point-no-redefinition)) + (stats ert--results-stats) + (pos (ert--stats-test-pos stats test)) + (result (aref (ert--stats-test-results stats) pos))) + (let ((buffer (get-buffer-create "*ERT list of should forms*"))) + (pop-to-buffer buffer) + (setq buffer-read-only t) + (let ((inhibit-read-only t)) + (buffer-disable-undo) + (erase-buffer) + (ert-simple-view-mode) + (if (null (ert-test-result-should-forms result)) + (insert "\n(No should forms during this test.)\n") + (loop for form-description in (ert-test-result-should-forms result) + for i from 1 do + (insert "\n") + (insert (format "%s: " i)) + (let ((begin (point))) + (ert--pp-with-indentation-and-newline form-description) + (ert--make-xrefs-region begin (point))))) + (goto-char (point-min)) + (insert "`should' forms executed during test `") + (ert-insert-test-name-button (ert-test-name test)) + (insert "':\n") + (insert "\n") + (insert (concat "(Values are shallow copies and may have " + "looked different during the test if they\n" + "have been modified destructively.)\n")) + (forward-line 1))))) + +(defun ert-results-toggle-printer-limits-for-test-at-point () + "Toggle how much of the condition to print for the test at point. + +To be used in the ERT results buffer." + (interactive) + (let* ((ewoc ert--results-ewoc) + (node (ert--results-test-node-at-point)) + (entry (ewoc-data node))) + (setf (ert--ewoc-entry-extended-printer-limits-p entry) + (not (ert--ewoc-entry-extended-printer-limits-p entry))) + (ewoc-invalidate ewoc node))) + +(defun ert-results-pop-to-timings () + "Display test timings for the last run. + +To be used in the ERT results buffer." + (interactive) + (let* ((stats ert--results-stats) + (start-times (ert--stats-test-start-times stats)) + (end-times (ert--stats-test-end-times stats)) + (buffer (get-buffer-create "*ERT timings*")) + (data (loop for test across (ert--stats-tests stats) + for start-time across (ert--stats-test-start-times stats) + for end-time across (ert--stats-test-end-times stats) + collect (list test + (float-time (subtract-time end-time + start-time)))))) + (setq data (sort data (lambda (a b) + (> (second a) (second b))))) + (pop-to-buffer buffer) + (setq buffer-read-only t) + (let ((inhibit-read-only t)) + (buffer-disable-undo) + (erase-buffer) + (ert-simple-view-mode) + (if (null data) + (insert "(No data)\n") + (insert (format "%-3s %8s %8s\n" "" "time" "cumul")) + (loop for (test time) in data + for cumul-time = time then (+ cumul-time time) + for i from 1 do + (let ((begin (point))) + (insert (format "%3s: %8.3f %8.3f " i time cumul-time)) + (ert-insert-test-name-button (ert-test-name test)) + (insert "\n")))) + (goto-char (point-min)) + (insert "Tests by run time (seconds):\n\n") + (forward-line 1)))) + +;;;###autoload +(defun ert-describe-test (test-or-test-name) + "Display the documentation for TEST-OR-TEST-NAME (a symbol or ert-test)." + (interactive (list (ert-read-test-name-at-point "Describe test"))) + (when (< emacs-major-version 24) + (error "Requires Emacs 24")) + (let (test-name + test-definition) + (etypecase test-or-test-name + (symbol (setq test-name test-or-test-name + test-definition (ert-get-test test-or-test-name))) + (ert-test (setq test-name (ert-test-name test-or-test-name) + test-definition test-or-test-name))) + (help-setup-xref (list #'ert-describe-test test-or-test-name) + (called-interactively-p 'interactive)) + (save-excursion + (with-help-window (help-buffer) + (with-current-buffer (help-buffer) + (insert (if test-name (format "%S" test-name) "<anonymous test>")) + (insert " is a test") + (let ((file-name (and test-name + (symbol-file test-name 'ert-deftest)))) + (when file-name + (insert " defined in `" (file-name-nondirectory file-name) "'") + (save-excursion + (re-search-backward "`\\([^`']+\\)'" nil t) + (help-xref-button 1 'help-function-def test-name file-name))) + (insert ".") + (fill-region-as-paragraph (point-min) (point)) + (insert "\n\n") + (unless (and (ert-test-boundp test-name) + (eql (ert-get-test test-name) test-definition)) + (let ((begin (point))) + (insert "Note: This test has been redefined or deleted, " + "this documentation refers to an old definition.") + (fill-region-as-paragraph begin (point))) + (insert "\n\n")) + (insert (or (ert-test-documentation test-definition) + "It is not documented.") + "\n"))))))) + +(defun ert-results-describe-test-at-point () + "Display the documentation of the test at point. + +To be used in the ERT results buffer." + (interactive) + (ert-describe-test (ert--results-test-at-point-no-redefinition))) + + +;;; Actions on load/unload. + +(add-to-list 'find-function-regexp-alist '(ert-deftest . ert--find-test-regexp)) +(add-to-list 'minor-mode-alist '(ert--current-run-stats + (:eval + (ert--tests-running-mode-line-indicator)))) +(add-to-list 'emacs-lisp-mode-hook 'ert--activate-font-lock-keywords) + +(defun ert--unload-function () + "Unload function to undo the side-effects of loading ert.el." + (ert--remove-from-list 'find-function-regexp-alist 'ert-deftest :key #'car) + (ert--remove-from-list 'minor-mode-alist 'ert--current-run-stats :key #'car) + (ert--remove-from-list 'emacs-lisp-mode-hook + 'ert--activate-font-lock-keywords) + nil) + +(defvar ert-unload-hook '()) +(add-hook 'ert-unload-hook 'ert--unload-function) + + +(provide 'ert) + +;;; ert.el ends here diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el index 56183fb91c8..bf9998695ee 100644 --- a/lisp/emacs-lisp/ewoc.el +++ b/lisp/emacs-lisp/ewoc.el @@ -1,7 +1,6 @@ ;;; ewoc.el --- utility to maintain a view of a list of objects in a buffer -;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1991-2011 Free Software Foundation, Inc. ;; Author: Per Cederqvist <ceder@lysator.liu.se> ;; Inge Wallin <inge@lysator.liu.se> @@ -578,5 +577,4 @@ Return nil if the buffer has been deleted." ;; eval: (put 'ewoc--set-buffer-bind-dll-let* 'lisp-indent-hook 2) ;; End: -;; arch-tag: d78915b9-9a07-44bf-aac6-04a1fc1bd6d4 ;;; ewoc.el ends here diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index 9d59337a7c7..9c4a3e9832c 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -1,7 +1,6 @@ ;;; find-func.el --- find the definition of the Emacs Lisp function near point -;; Copyright (C) 1997, 1999, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997, 1999, 2001-2011 Free Software Foundation, Inc. ;; Author: Jens Petersen <petersen@kurims.kyoto-u.ac.jp> ;; Maintainer: petersen@kurims.kyoto-u.ac.jp @@ -563,5 +562,4 @@ Set mark before moving, if the buffer already existed." (provide 'find-func) -;; arch-tag: 43ecd81c-74dc-4d9a-8f63-a61e55670d64 ;;; find-func.el ends here diff --git a/lisp/emacs-lisp/find-gc.el b/lisp/emacs-lisp/find-gc.el index 49d3a7075d4..773b8f11408 100644 --- a/lisp/emacs-lisp/find-gc.el +++ b/lisp/emacs-lisp/find-gc.el @@ -1,7 +1,6 @@ ;;; find-gc.el --- detect functions that call the garbage collector -;; Copyright (C) 1992, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1992, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF @@ -159,5 +158,4 @@ Also store it in `find-gc-unsafe'." (provide 'find-gc) -;; arch-tag: 4a26a538-a008-40d9-a1ef-23bb6dbecef4 ;;; find-gc.el ends here diff --git a/lisp/emacs-lisp/float-sup.el b/lisp/emacs-lisp/float-sup.el index 371fe8af3ad..ceb1eb3bafb 100644 --- a/lisp/emacs-lisp/float-sup.el +++ b/lisp/emacs-lisp/float-sup.el @@ -1,7 +1,6 @@ ;;; float-sup.el --- define some constants useful for floating point numbers. -;; Copyright (C) 1985, 1986, 1987, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985-1987, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: internal diff --git a/lisp/emacs-lisp/generic.el b/lisp/emacs-lisp/generic.el index 51b23c3f402..770fe01f91c 100644 --- a/lisp/emacs-lisp/generic.el +++ b/lisp/emacs-lisp/generic.el @@ -1,7 +1,6 @@ ;;; generic.el --- defining simple major modes with comment and font-lock ;; -;; Copyright (C) 1997, 1999, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997, 1999, 2001-2011 Free Software Foundation, Inc. ;; ;; Author: Peter Breton <pbreton@cs.umb.edu> ;; Created: Fri Sep 27 1996 @@ -316,5 +315,4 @@ regular expression that can be used as an element of (provide 'generic) -;; arch-tag: 239c1fc4-1303-48d9-9ac0-657d655669ea ;;; generic.el ends here diff --git a/lisp/emacs-lisp/gulp.el b/lisp/emacs-lisp/gulp.el index 9c88ba7111e..eca5470fd69 100644 --- a/lisp/emacs-lisp/gulp.el +++ b/lisp/emacs-lisp/gulp.el @@ -1,7 +1,6 @@ ;;; gulp.el --- ask for updates for Lisp packages -;; Copyright (C) 1996, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996, 2001-2011 Free Software Foundation, Inc. ;; Author: Sam Shteingold <shteingd@math.ucla.edu> ;; Maintainer: FSF @@ -175,5 +174,4 @@ That is a list of elements, each of the form (MAINTAINER PACKAGES...)." (provide 'gulp) -;; arch-tag: 42750a11-460a-4efc-829f-342d075530e5 ;;; gulp.el ends here diff --git a/lisp/emacs-lisp/helper.el b/lisp/emacs-lisp/helper.el index 6a597429328..113f5849364 100644 --- a/lisp/emacs-lisp/helper.el +++ b/lisp/emacs-lisp/helper.el @@ -1,7 +1,6 @@ ;;; helper.el --- utility help package supporting help in electric modes -;; Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 2001-2011 Free Software Foundation, Inc. ;; Author: K. Shane Hartman ;; Maintainer: FSF @@ -156,5 +155,4 @@ (provide 'helper) -;; arch-tag: a0984577-d3e9-4124-ae0d-c46fe740f6a9 ;;; helper.el ends here diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el index 7df65acb283..4d0cacf4ee1 100644 --- a/lisp/emacs-lisp/lisp-mnt.el +++ b/lisp/emacs-lisp/lisp-mnt.el @@ -1,7 +1,6 @@ ;;; lisp-mnt.el --- utility functions for Emacs Lisp maintainers -;; Copyright (C) 1992, 1994, 1997, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1992, 1994, 1997, 2000-2011 Free Software Foundation, Inc. ;; Author: Eric S. Raymond <esr@snark.thyrsus.com> ;; Maintainer: FSF @@ -616,5 +615,4 @@ Prompts for bug subject TOPIC. Leaves you in a mail buffer." (provide 'lisp-mnt) -;; arch-tag: fa3c5ab4-a37b-4e46-b7cf-b6d78b90e69e ;;; lisp-mnt.el ends here diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 2cdbd115928..37a86b7135d 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -1,7 +1,6 @@ ;;; lisp-mode.el --- Lisp mode, and its idiosyncratic commands -;; Copyright (C) 1985, 1986, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985-1986, 1999-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: lisp, languages diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index d0d1520a677..deb06f52549 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -1,7 +1,6 @@ ;;; lisp.el --- Lisp editing commands for Emacs -;; Copyright (C) 1985, 1986, 1994, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985-1986, 1994, 2000-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: lisp, languages @@ -690,5 +689,4 @@ considered." (unless (eq predicate 'fboundp) (lambda (str) (if (fboundp (intern-soft str)) " <f>")))))))) -;; arch-tag: aa7fa8a4-2e6f-4e9b-9cd9-fef06340e67e ;;; lisp.el ends here diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el index 6dfd47b4ad1..af8047256e2 100644 --- a/lisp/emacs-lisp/macroexp.el +++ b/lisp/emacs-lisp/macroexp.el @@ -1,6 +1,6 @@ ;;; macroexp.el --- Additional macro-expansion support ;; -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; ;; Author: Miles Bader <miles@gnu.org> ;; Keywords: lisp, compiler, macros @@ -182,5 +182,4 @@ definitions to shadow the loaded ones for use in file byte-compilation." (provide 'macroexp) -;; arch-tag: af9b8c24-c196-43bc-91e1-a3570790fa5a ;;; macroexp.el ends here diff --git a/lisp/emacs-lisp/map-ynp.el b/lisp/emacs-lisp/map-ynp.el index 644482a0d44..6ef26fef89c 100644 --- a/lisp/emacs-lisp/map-ynp.el +++ b/lisp/emacs-lisp/map-ynp.el @@ -1,7 +1,6 @@ ;;; map-ynp.el --- general-purpose boolean question-asker -;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1991-1995, 2000-2011 Free Software Foundation, Inc. ;; Author: Roland McGrath <roland@gnu.org> ;; Maintainer: FSF @@ -275,5 +274,4 @@ the current %s and exit." ;; Return the number of actions that were taken. actions)) -;; arch-tag: 1d0a3201-a151-4c10-b231-4da47c9e6dc3 ;;; map-ynp.el ends here diff --git a/lisp/emacs-lisp/package-x.el b/lisp/emacs-lisp/package-x.el index 38c4d5bbe35..b9994be3d39 100644 --- a/lisp/emacs-lisp/package-x.el +++ b/lisp/emacs-lisp/package-x.el @@ -1,6 +1,6 @@ ;;; package-x.el --- Package extras -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Tom Tromey <tromey@redhat.com> ;; Created: 10 Mar 2007 diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index fecddcf16ed..59964ff6b96 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1,6 +1,6 @@ ;;; package.el --- Simple package system for Emacs -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Tom Tromey <tromey@redhat.com> ;; Created: 10 Mar 2007 @@ -1663,15 +1663,15 @@ A value of nil means to display all packages.") Optional PACKAGES is a list of names of packages (symbols) to list; the default is to display everything in `package-alist'." (require 'finder-inf nil t) - (with-current-buffer (get-buffer-create "*Packages*") - (package-menu-mode) - (set (make-local-variable 'package-menu-package-list) packages) - (set (make-local-variable 'package-menu-sort-key) nil) - (package--generate-package-list) - ;; It's okay to use pop-to-buffer here. The package menu buffer - ;; has keybindings, and the user just typed `M-x list-packages', - ;; suggesting that they might want to use them. - (pop-to-buffer (current-buffer)))) + (let ((buf (get-buffer-create "*Packages*"))) + (with-current-buffer buf + (package-menu-mode) + (set (make-local-variable 'package-menu-package-list) packages) + (set (make-local-variable 'package-menu-sort-key) nil) + (package--generate-package-list)) + ;; The package menu buffer has keybindings. If the user types + ;; `M-x list-packages', that suggests it should become current. + (switch-to-buffer buf))) ;;;###autoload (defun list-packages () diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el index 5ff26b3dbc0..24ea0a3e801 100644 --- a/lisp/emacs-lisp/pcase.el +++ b/lisp/emacs-lisp/pcase.el @@ -1,6 +1,6 @@ ;;; pcase.el --- ML-style pattern-matching macro for Elisp -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> ;; Keywords: diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el index 79c52e9f1e3..2d1b8860a3c 100644 --- a/lisp/emacs-lisp/pp.el +++ b/lisp/emacs-lisp/pp.el @@ -1,7 +1,6 @@ ;;; pp.el --- pretty printer for Emacs Lisp -;; Copyright (C) 1989, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1989, 1993, 2001-2011 Free Software Foundation, Inc. ;; Author: Randal Schwartz <merlyn@stonehenge.com> ;; Keywords: lisp @@ -202,5 +201,4 @@ Ignores leading comment characters." (provide 'pp) ; so (require 'pp) works -;; arch-tag: b0f7c65b-02c7-42bb-9ee3-508a59b8fbb9 ;;; pp.el ends here diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el index 1845effd5bb..e3c030b3c60 100644 --- a/lisp/emacs-lisp/re-builder.el +++ b/lisp/emacs-lisp/re-builder.el @@ -1,7 +1,6 @@ ;;; re-builder.el --- building Regexps with visual feedback -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Detlev Zundel <dzu@gnu.org> ;; Keywords: matching, lisp, tools @@ -60,8 +59,8 @@ ;; even the auto updates go all the way. Forcing an update overrides ;; this limit allowing an easy way to see all matches. -;; Currently `re-builder' understands five different forms of input, -;; namely `read', `string', `rx', and `sregex' syntax. Read +;; Currently `re-builder' understands three different forms of input, +;; namely `read', `string', and `rx' syntax. Read ;; syntax and string syntax are both delimited by `"'s and behave ;; according to their name. With the `string' syntax there's no need ;; to escape the backslashes and double quotes simplifying the editing @@ -75,7 +74,7 @@ ;; When editing a symbolic regular expression, only the first ;; expression in the RE Builder buffer is considered, which helps ;; limiting the extent of the expression like the `"'s do for the text -;; modes. For the `sregex' syntax the function `sregex' is applied to +;; modes. For the `rx' syntax the function `rx-to-string' is applied to ;; the evaluated expression read. So you can use quoted arguments ;; with something like '("findme") or you can construct arguments to ;; your hearts delight with a valid ELisp expression. (The compiled @@ -126,11 +125,10 @@ (defcustom reb-re-syntax 'read "Syntax for the REs in the RE Builder. -Can either be `read', `string', `sregex', or `rx'." +Can either be `read', `string', or `rx'." :group 're-builder :type '(choice (const :tag "Read syntax" read) (const :tag "String syntax" string) - (const :tag "`sregex' syntax" sregex) (const :tag "`rx' syntax" rx))) (defcustom reb-auto-match-limit 200 @@ -244,7 +242,9 @@ Except for Lisp syntax this is the same as `reb-regexp'.") :help "Quit the RE Builder mode")) (define-key menu-map [rt] '(menu-item "Case sensitive" reb-toggle-case - :button (:toggle . case-fold-search) + :button (:toggle . (with-current-buffer + reb-target-buffer + (null case-fold-search))) :help "Toggle case sensitivity of searches for RE Builder target buffer")) (define-key menu-map [rb] '(menu-item "Change target buffer..." reb-change-target-buffer @@ -279,10 +279,8 @@ Except for Lisp syntax this is the same as `reb-regexp'.") emacs-lisp-mode "RE Builder Lisp" "Major mode for interactively building symbolic Regular Expressions." ;; Pull in packages as needed - (cond ((eq reb-re-syntax 'sregex) ; sregex is not autoloaded - (require 'sregex)) ; right now.. - ((eq reb-re-syntax 'rx) ; rx-to-string is autoloaded - (require 'rx))) ; require rx anyway + (cond ((memq reb-re-syntax '(sregex rx)) ; rx-to-string is autoloaded + (require 'rx))) ; require rx anyway (reb-mode-common)) ;; Use the same "\C-c" keymap as `reb-mode' and use font-locking from @@ -612,9 +610,7 @@ optional fourth argument FORCE is non-nil." (defun reb-cook-regexp (re) "Return RE after processing it according to `reb-re-syntax'." - (cond ((eq reb-re-syntax 'sregex) - (apply 'sregex (eval (car (read-from-string re))))) - ((eq reb-re-syntax 'rx) + (cond ((memq reb-re-syntax '(sregex rx)) (rx-to-string (eval (car (read-from-string re))))) (t re))) @@ -718,5 +714,4 @@ If SUBEXP is non-nil mark only the corresponding sub-expressions." (provide 're-builder) -;; arch-tag: 5c5515ac-4085-4524-a421-033f44f032e7 ;;; re-builder.el ends here diff --git a/lisp/emacs-lisp/regexp-opt.el b/lisp/emacs-lisp/regexp-opt.el index 116d7b93d90..b538a7a2943 100644 --- a/lisp/emacs-lisp/regexp-opt.el +++ b/lisp/emacs-lisp/regexp-opt.el @@ -1,7 +1,6 @@ ;;; regexp-opt.el --- generate efficient regexps to match strings -;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994-2011 Free Software Foundation, Inc. ;; Author: Simon Marshall <simon@gnu.org> ;; Maintainer: FSF @@ -293,5 +292,4 @@ Merges keywords to avoid backtracking in Emacs' regexp matcher." (provide 'regexp-opt) -;; arch-tag: 6c5a66f4-29af-4fd6-8c3b-4b554d5b4370 ;;; regexp-opt.el ends here diff --git a/lisp/emacs-lisp/regi.el b/lisp/emacs-lisp/regi.el index 78491636d78..8000dcd53dd 100644 --- a/lisp/emacs-lisp/regi.el +++ b/lisp/emacs-lisp/regi.el @@ -1,7 +1,6 @@ ;;; regi.el --- REGular expression Interpreting engine -;; Copyright (C) 1993, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993, 2001-2011 Free Software Foundation, Inc. ;; Author: 1993 Barry A. Warsaw, Century Computing, Inc. <bwarsaw@cen.com> ;; Maintainer: bwarsaw@cen.com @@ -254,5 +253,4 @@ useful information: (provide 'regi) -;; arch-tag: 804b4e45-4109-4f76-9a88-21887b881747 ;;; regi.el ends here diff --git a/lisp/emacs-lisp/ring.el b/lisp/emacs-lisp/ring.el index b961d403fa0..affaa9ce32e 100644 --- a/lisp/emacs-lisp/ring.el +++ b/lisp/emacs-lisp/ring.el @@ -1,7 +1,6 @@ ;;; ring.el --- handle rings of items -;; Copyright (C) 1992, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1992, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: extensions @@ -236,5 +235,4 @@ If SEQ is already a ring, return it." (provide 'ring) -;; arch-tag: e707682b-ed69-47c9-b20f-cf2c68cc92d2 ;;; ring.el ends here diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el index 522d452c2dc..7122de4789c 100644 --- a/lisp/emacs-lisp/rx.el +++ b/lisp/emacs-lisp/rx.el @@ -1,7 +1,6 @@ ;;; rx.el --- sexp notation for regular expressions -;; Copyright (C) 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2001-2011 Free Software Foundation, Inc. ;; Author: Gerd Moellmann <gerd@gnu.org> ;; Maintainer: FSF @@ -120,19 +119,17 @@ (nonl . not-newline) ; SRE (anything . (rx-anything 0 nil)) (any . (rx-any 1 nil rx-check-any)) ; inconsistent with SRE + (any . ".") ; sregex (in . any) (char . any) ; sregex (not-char . (rx-not-char 1 nil rx-check-any)) ; sregex (not . (rx-not 1 1 rx-check-not)) - ;; Partially consistent with sregex, whose `repeat' is like our - ;; `**'. (`repeat' with optional max arg and multiple sexp forms - ;; is ambiguous.) - (repeat . (rx-repeat 2 3)) + (repeat . (rx-repeat 2 nil)) (= . (rx-= 2 nil)) ; SRE (>= . (rx->= 2 nil)) ; SRE (** . (rx-** 2 nil)) ; SRE (submatch . (rx-submatch 1 nil)) ; SRE - (group . submatch) + (group . submatch) ; sregex (zero-or-more . (rx-kleene 1 nil)) (one-or-more . (rx-kleene 1 nil)) (zero-or-one . (rx-kleene 1 nil)) @@ -175,6 +172,7 @@ (category . (rx-category 1 1 rx-check-category)) (eval . (rx-eval 1 1)) (regexp . (rx-regexp 1 1 stringp)) + (regex . regexp) ; sregex (digit . "[[:digit:]]") (numeric . digit) ; SRE (num . digit) ; SRE @@ -295,15 +293,27 @@ regular expression strings.") `zero-or-more', and `one-or-more'. Dynamically bound.") -(defun rx-info (op) +(defun rx-info (op head) "Return parsing/code generation info for OP. If OP is the space character ASCII 32, return info for the symbol `?'. If OP is the character `?', return info for the symbol `??'. -See also `rx-constituents'." +See also `rx-constituents'. +If HEAD is non-nil, then OP is the head of a sexp, otherwise it's +a standalone symbol." (cond ((eq op ? ) (setq op '\?)) ((eq op ??) (setq op '\??))) - (while (and (not (null op)) (symbolp op)) - (setq op (cdr (assq op rx-constituents)))) + (let (old-op) + (while (and (not (null op)) (symbolp op)) + (setq old-op op) + (setq op (cdr (assq op rx-constituents))) + (when (if head (stringp op) (consp op)) + ;; We found something but of the wrong kind. Let's look for an + ;; alternate definition for the other case. + (let ((new-op + (cdr (assq old-op (cdr (memq (assq old-op rx-constituents) + rx-constituents)))))) + (if (and new-op (not (if head (stringp new-op) (consp new-op)))) + (setq op new-op)))))) op) @@ -311,7 +321,7 @@ See also `rx-constituents'." "Check FORM according to its car's parsing info." (unless (listp form) (error "rx `%s' needs argument(s)" form)) - (let* ((rx (rx-info (car form))) + (let* ((rx (rx-info (car form) 'head)) (nargs (1- (length form))) (min-args (nth 1 rx)) (max-args (nth 2 rx)) @@ -401,7 +411,7 @@ Only both edges of each range is checked." (setcdr m (1- char))))) ranges)) - + (defun rx-any-condense-range (args) "Condense by side effect ARGS as range for Rx `any'." (let (str @@ -564,7 +574,7 @@ ARG is optional." (condition-case nil (rx-form arg) (error "")))) - (eq arg 'word-boundary) + (eq arg 'word-boundary) (and (consp arg) (memq (car arg) '(not any in syntax category)))) (error "rx `not' syntax error: %s" arg)) @@ -643,14 +653,17 @@ If SKIP is non-nil, allow that number of items after the head, i.e. (defun rx-** (form) "Parse and produce code from FORM `(** N M ...)'." (rx-check form) - (setq form (cons 'repeat (cdr (rx-trans-forms form 2)))) - (rx-form form '*)) + (rx-form (cons 'repeat (cdr (rx-trans-forms form 2))) '*)) (defun rx-repeat (form) "Parse and produce code from FORM. -FORM is either `(repeat N FORM1)' or `(repeat N M FORM1)'." +FORM is either `(repeat N FORM1)' or `(repeat N M FORMS...)'." (rx-check form) + (if (> (length form) 4) + (setq form (rx-trans-forms form 2))) + (if (null (nth 2 form)) + (setq form (cons (nth 0 form) (cons (nth 1 form) (nthcdr 3 form))))) (cond ((= (length form) 3) (unless (and (integerp (nth 1 form)) (> (nth 1 form) 0)) @@ -749,15 +762,18 @@ of all atomic regexps." "Parse and produce code from FORM, which is `(syntax SYMBOL)'." (rx-check form) (let* ((sym (cadr form)) - (syntax (assq sym rx-syntax))) + (syntax (cdr (assq sym rx-syntax)))) (unless syntax ;; Try sregex compatibility. - (let ((name (symbol-name sym))) - (if (= 1 (length name)) - (setq syntax (rassq (aref name 0) rx-syntax)))) + (cond + ((characterp sym) (setq syntax sym)) + ((symbolp sym) + (let ((name (symbol-name sym))) + (if (= 1 (length name)) + (setq syntax (aref name 0)))))) (unless syntax - (error "Unknown rx syntax `%s'" (cadr form)))) - (format "\\s%c" (cdr syntax)))) + (error "Unknown rx syntax `%s'" sym))) + (format "\\s%c" syntax))) (defun rx-check-category (form) @@ -811,7 +827,7 @@ shy groups around the result and some more in other functions." (cond ((integerp form) (regexp-quote (char-to-string form))) ((symbolp form) - (let ((info (rx-info form))) + (let ((info (rx-info form nil))) (cond ((stringp info) info) ((null info) @@ -819,7 +835,7 @@ shy groups around the result and some more in other functions." (t (funcall (nth 0 info) form))))) ((consp form) - (let ((info (rx-info (car form)))) + (let ((info (rx-info (car form) 'head))) (unless (consp info) (error "Unknown rx form `%s'" (car form))) (funcall (nth 0 info) form))) @@ -1144,5 +1160,4 @@ enclosed in `(and ...)'. (provide 'rx) -;; arch-tag: 12d01a63-0008-42bb-ab8c-1c7d63be370b ;;; rx.el ends here diff --git a/lisp/emacs-lisp/shadow.el b/lisp/emacs-lisp/shadow.el index e690cbaa1bc..c5bad3bd40f 100644 --- a/lisp/emacs-lisp/shadow.el +++ b/lisp/emacs-lisp/shadow.el @@ -1,7 +1,6 @@ ;;; shadow.el --- locate Emacs Lisp file shadowings -;; Copyright (C) 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995, 2001-2011 Free Software Foundation, Inc. ;; Author: Terry Jones <terry@santafe.edu> ;; Keywords: lisp diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el index a7021b3cf7b..702e8d880ba 100644 --- a/lisp/emacs-lisp/smie.el +++ b/lisp/emacs-lisp/smie.el @@ -1,6 +1,6 @@ ;;; smie.el --- Simple Minded Indentation Engine -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> ;; Keywords: languages, lisp, internal, parsing, indentation diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el index b85399263d0..c012e48b590 100644 --- a/lisp/emacs-lisp/syntax.el +++ b/lisp/emacs-lisp/syntax.el @@ -1,7 +1,6 @@ ;;; syntax.el --- helper functions to find syntactic context -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: internal @@ -578,5 +577,4 @@ Point is at POS when this function returns." (provide 'syntax) -;; arch-tag: 302f1eeb-e77c-4680-a8c5-c543e01161a5 ;;; syntax.el ends here diff --git a/lisp/emacs-lisp/tcover-ses.el b/lisp/emacs-lisp/tcover-ses.el index 8df70f4d979..b91b96b83e5 100644 --- a/lisp/emacs-lisp/tcover-ses.el +++ b/lisp/emacs-lisp/tcover-ses.el @@ -1,7 +1,6 @@ ;;;; testcover-ses.el -- Example use of `testcover' to test "SES" -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Author: Jonathan Yavner <jyavner@engineer.com> ;; Maintainer: Jonathan Yavner <jyavner@engineer.com> @@ -722,5 +721,4 @@ spreadsheet files with invalid formatting." ;;Could do this here: (testcover-end "ses.el") (message "Done")) -;; arch-tag: 87052ba4-5cf8-46cf-9375-fe245f3360b8 ;; testcover-ses.el ends here. diff --git a/lisp/emacs-lisp/tcover-unsafep.el b/lisp/emacs-lisp/tcover-unsafep.el index 47f931bf9d3..2be026b98eb 100644 --- a/lisp/emacs-lisp/tcover-unsafep.el +++ b/lisp/emacs-lisp/tcover-unsafep.el @@ -1,6 +1,6 @@ ;;;; testcover-unsafep.el -- Use testcover to test unsafep's code coverage -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Author: Jonathan Yavner <jyavner@engineer.com> ;; Maintainer: Jonathan Yavner <jyavner@engineer.com> @@ -138,5 +138,4 @@ (testcover-end "unsafep.el") (message "Done")) -;; arch-tag: a7616c27-1998-47ae-9304-76d1439dbf29 ;; testcover-unsafep.el ends here. diff --git a/lisp/emacs-lisp/testcover.el b/lisp/emacs-lisp/testcover.el index 95262e17d5f..08f757819f2 100644 --- a/lisp/emacs-lisp/testcover.el +++ b/lisp/emacs-lisp/testcover.el @@ -1,6 +1,6 @@ ;;;; testcover.el -- Visual code-coverage tool -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Author: Jonathan Yavner <jyavner@member.fsf.org> ;; Maintainer: Jonathan Yavner <jyavner@member.fsf.org> @@ -534,5 +534,4 @@ coverage tests. This function creates many overlays." (goto-char (next-overlay-change (point))) (end-of-line)) -;; arch-tag: 72324a4a-4a2e-4142-9249-cc56d6757588 ;; testcover.el ends here. diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el index b12d9068676..5f069226aa9 100644 --- a/lisp/emacs-lisp/timer.el +++ b/lisp/emacs-lisp/timer.el @@ -1,7 +1,6 @@ ;;; timer.el --- run a function with args at some time in future -;; Copyright (C) 1996, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Package: emacs diff --git a/lisp/emacs-lisp/tq.el b/lisp/emacs-lisp/tq.el index b0643edc549..3d3b371ad5c 100644 --- a/lisp/emacs-lisp/tq.el +++ b/lisp/emacs-lisp/tq.el @@ -1,7 +1,6 @@ ;;; tq.el --- utility to maintain a transaction queue -;; Copyright (C) 1985, 1986, 1987, 1992, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985-1987, 1992, 2001-2011 Free Software Foundation, Inc. ;; Author: Scott Draves <spot@cs.cmu.edu> ;; Maintainer: FSF @@ -167,5 +166,4 @@ This produces more reliable results with some processes." (provide 'tq) -;; arch-tag: 65dea08c-4edd-4cde-83a5-e8a15b993b79 ;;; tq.el ends here diff --git a/lisp/emacs-lisp/trace.el b/lisp/emacs-lisp/trace.el index 194afe10815..22c1f0e7ea7 100644 --- a/lisp/emacs-lisp/trace.el +++ b/lisp/emacs-lisp/trace.el @@ -1,7 +1,6 @@ ;;; trace.el --- tracing facility for Emacs Lisp functions -;; Copyright (C) 1993, 1998, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1998, 2000-2011 Free Software Foundation, Inc. ;; Author: Hans Chalupsky <hans@cs.buffalo.edu> ;; Maintainer: FSF @@ -299,5 +298,4 @@ was not traced this is a noop." (provide 'trace) -;; arch-tag: cfd170a7-4932-4331-8c8b-b7151942e5a1 ;;; trace.el ends here diff --git a/lisp/emacs-lisp/unsafep.el b/lisp/emacs-lisp/unsafep.el index a62f8de4010..0f08d77d4c3 100644 --- a/lisp/emacs-lisp/unsafep.el +++ b/lisp/emacs-lisp/unsafep.el @@ -1,6 +1,6 @@ ;;;; unsafep.el -- Determine whether a Lisp form is safe to evaluate -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Author: Jonathan Yavner <jyavner@member.fsf.org> ;; Maintainer: Jonathan Yavner <jyavner@member.fsf.org> @@ -202,6 +202,9 @@ UNSAFEP-VARS is a list of symbols with local bindings." (dolist (x (nthcdr 3 form)) (setq reason (unsafep-progn (cdr x))) (if reason (throw 'unsafep reason)))))) + ((eq fun '\`) + ;; Backquoted form - safe if its expansion is. + (unsafep (cdr (backquote-process (cadr form))))) (t ;;First unsafep-function call above wasn't nil, no special case applies reason))))) @@ -258,5 +261,4 @@ If TO-BIND is t, check whether SYM is safe to bind." (local-variable-p sym))) `(global-variable ,sym)))) -;; arch-tag: 6216f98b-eb8f-467a-9c33-7a7644f50658 ;;; unsafep.el ends here diff --git a/lisp/emacs-lisp/warnings.el b/lisp/emacs-lisp/warnings.el index ba8c8ffc831..1fb8ac0c2b6 100644 --- a/lisp/emacs-lisp/warnings.el +++ b/lisp/emacs-lisp/warnings.el @@ -1,6 +1,6 @@ ;;; warnings.el --- log and display warnings -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: internal @@ -337,5 +337,4 @@ this is equivalent to `display-warning', using (provide 'warnings) -;; arch-tag: faaad1c8-7b2a-4161-af38-5ab4afde0496 ;;; warnings.el ends here diff --git a/lisp/emacs-lock.el b/lisp/emacs-lock.el index 906b899beda..22795a47d98 100644 --- a/lisp/emacs-lock.el +++ b/lisp/emacs-lock.el @@ -1,7 +1,6 @@ ;;; emacs-lock.el --- prevents you from exiting Emacs if a buffer is locked -;; Copyright (C) 1994, 1997, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc +;; Copyright (C) 1994, 1997, 2001-2011 Free Software Foundation, Inc ;; Author: Tom Wurgler <twurgler@goodyear.com> ;; Created: 12/8/94 @@ -98,5 +97,4 @@ If the buffer is locked, signal error and display its name." (provide 'emacs-lock) -;; arch-tag: 58e6cb43-7cf0-401a-bcb6-4902a0b8bdc1 ;;; emacs-lock.el ends here diff --git a/lisp/emulation/crisp.el b/lisp/emulation/crisp.el index 9be200168ea..b2806e8f8eb 100644 --- a/lisp/emulation/crisp.el +++ b/lisp/emulation/crisp.el @@ -1,7 +1,6 @@ ;;; crisp.el --- CRiSP/Brief Emacs emulator -;; Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-1999, 2001-2011 Free Software Foundation, Inc. ;; Author: Gary D. Foster <Gary.Foster@Corp.Sun.COM> ;; Keywords: emulations brief crisp @@ -381,5 +380,4 @@ With ARG, turn CRiSP mode on if ARG is positive, off otherwise." (run-hooks 'crisp-load-hook) (provide 'crisp) -;; arch-tag: e5369375-fafb-4240-b7ae-4cb460ef05ee ;;; crisp.el ends here diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index bc64608a284..3bdd9565fb5 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el @@ -1,7 +1,6 @@ ;;; cua-base.el --- emulate CUA key bindings -;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-2011 Free Software Foundation, Inc. ;; Author: Kim F. Storm <storm@cua.dk> ;; Keywords: keyboard emulations convenience cua @@ -1438,6 +1437,7 @@ If ARG is the atom `-', scroll upward by nearly full screen." (define-key cua-global-keymap [remap yank-pop] 'cua-paste-pop) ;; set mark (define-key cua-global-keymap [remap set-mark-command] 'cua-set-mark) + (define-key cua-global-keymap [remap exchange-point-and-mark] 'cua-exchange-point-and-mark) ;; scrolling (define-key cua-global-keymap [remap scroll-up] 'cua-scroll-up) @@ -1452,7 +1452,6 @@ If ARG is the atom `-', scroll upward by nearly full screen." (when cua-remap-control-v (define-key cua--cua-keys-keymap [(control v)] 'yank) (define-key cua--cua-keys-keymap [(meta v)] 'cua-repeat-replace-region)) - (define-key cua--cua-keys-keymap [remap exchange-point-and-mark] 'cua-exchange-point-and-mark) (define-key cua--prefix-override-keymap [(control x)] 'cua--prefix-override-handler) (define-key cua--prefix-override-keymap [(control c)] 'cua--prefix-override-handler) diff --git a/lisp/emulation/cua-gmrk.el b/lisp/emulation/cua-gmrk.el index 761a3d5ec24..690555e81dc 100644 --- a/lisp/emulation/cua-gmrk.el +++ b/lisp/emulation/cua-gmrk.el @@ -1,7 +1,6 @@ ;;; cua-gmrk.el --- CUA unified global mark support -;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-2011 Free Software Foundation, Inc. ;; Author: Kim F. Storm <storm@cua.dk> ;; Keywords: keyboard emulations convenience cua mark @@ -381,5 +380,4 @@ With prefix argument, don't jump to global mark when cancelling it." (provide 'cua-gmrk) -;; arch-tag: 553d8076-a91d-48ae-825d-6cb962a5f67f ;;; cua-gmrk.el ends here diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el index 2cbf4438869..62ae3ffa7d5 100644 --- a/lisp/emulation/cua-rect.el +++ b/lisp/emulation/cua-rect.el @@ -1,7 +1,6 @@ ;;; cua-rect.el --- CUA unified rectangle support -;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-2011 Free Software Foundation, Inc. ;; Author: Kim F. Storm <storm@cua.dk> ;; Keywords: keyboard emulations convenience CUA @@ -1492,5 +1491,4 @@ With prefix arg, indent to that column." (provide 'cua-rect) -;; arch-tag: b730df53-17b9-4a89-bd63-4a71ec196731 ;;; cua-rect.el ends here diff --git a/lisp/emulation/edt-lk201.el b/lisp/emulation/edt-lk201.el index e50e064077d..6132b455faf 100644 --- a/lisp/emulation/edt-lk201.el +++ b/lisp/emulation/edt-lk201.el @@ -1,7 +1,7 @@ ;;; edt-lk201.el --- enhanced EDT keypad mode emulation for LK-201 keyboards -;; Copyright (C) 1986, 1992, 1993, 1995, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1986, 1992-1993, 1995, 2001-2011 +;; Free Software Foundation, Inc. ;; Author: Kevin Gallagher <Kevin.Gallagher@boeing.com> ;; Maintainer: Kevin Gallagher <Kevin.Gallagher@boeing.com> @@ -57,5 +57,4 @@ ("HELP" . [help]) ("DO" . [menu]) ("F17" . [f17]) ("F18" . [f18]) ("F19" . [f19]) ("F20" . [f20]))) -;; arch-tag: 36f498cf-c3f6-41b0-911b-83b1348855ec ;;; edt-lk201.el ends here diff --git a/lisp/emulation/edt-mapper.el b/lisp/emulation/edt-mapper.el index 6bf50db5442..99d204692fa 100644 --- a/lisp/emulation/edt-mapper.el +++ b/lisp/emulation/edt-mapper.el @@ -1,7 +1,6 @@ ;;; edt-mapper.el --- create an EDT LK-201 map file for X-Windows Emacs -;; Copyright (C) 1994, 1995, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994-1995, 2000-2011 Free Software Foundation, Inc. ;; Author: Kevin Gallagher <Kevin.Gallagher@boeing.com> ;; Maintainer: Kevin Gallagher <Kevin.Gallagher@boeing.com> @@ -142,6 +141,48 @@ (setq edt-term (getenv "TERM"))) ;;; +;;; Implements a workaround for a feature that was added to simple.el. +;;; +;;; Many function keys have no Emacs functions assigned to them by +;;; default. A subset of these are typically assigned functions in the +;;; EDT emulation. This includes all the keypad keys and a some others +;;; like Delete. +;;; +;;; Logic in simple.el maps some of these unassigned function keys to +;;; ordinary typing keys. Where this is the case, a call to +;;; read-key-sequence, below, does not return the name of the function +;;; key pressd by the user but, instead, it returns the name of the +;;; key to which it has been mapped. It needs to know the name of the +;;; key pressed by the user. As a workaround, we assign a function to +;;; each of the unassigned function keys of interest, here. These +;;; assignments override the mapping to other keys and are only +;;; temporary since, when edt-mapper is finished executing, it causes +;;; Emacs to exit. +;;; + +(mapc + (lambda (function-key) + (if (not (lookup-key (current-global-map) function-key)) + (define-key (current-global-map) function-key 'forward-char))) + '([kp-0] [kp-1] [kp-2] [kp-3] [kp-4] + [kp-5] [kp-6] [kp-7] [kp-8] [kp-9] + [kp-space] + [kp-tab] + [kp-enter] + [kp-multiply] + [kp-add] + [kp-separator] + [kp-subtract] + [kp-decimal] + [kp-divide] + [kp-equal] + [backspace] + [delete] + [tab] + [linefeed] + [clear])) + +;;; ;;; Make sure the window is big enough to display the instructions, ;;; except where window cannot be re-sized. ;;; @@ -505,5 +546,4 @@ (sit-for 600) (kill-emacs t) -;; arch-tag: 9eea59c8-b8b7-4d66-b858-c8920624c518 ;;; edt-mapper.el ends here diff --git a/lisp/emulation/edt-pc.el b/lisp/emulation/edt-pc.el index 04128ac00b9..a51ecd34045 100644 --- a/lisp/emulation/edt-pc.el +++ b/lisp/emulation/edt-pc.el @@ -1,7 +1,6 @@ ;;; edt-pc.el --- enhanced EDT keypad mode emulation for PC 101 keyboards -;; Copyright (C) 1986, 1994, 1995, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1986, 1994-1995, 2001-2011 Free Software Foundation, Inc. ;; Author: Kevin Gallagher <Kevin.Gallagher@boeing.com> ;; Maintainer: Kevin Gallagher <Kevin.Gallagher@boeing.com> @@ -87,5 +86,4 @@ ("HELP" . "" ) ("DO" . "" ) ("F17" . "" ) ("F18" . "" ) ("F19" . "" ) ("F20" . "" ))) -;; arch-tag: 4593d053-183a-4062-97de-57b8877595ce ;;; edt-pc.el ends here diff --git a/lisp/emulation/edt-vt100.el b/lisp/emulation/edt-vt100.el index 9416a9ad48a..1dca1f19dfc 100644 --- a/lisp/emulation/edt-vt100.el +++ b/lisp/emulation/edt-vt100.el @@ -1,7 +1,7 @@ ;;; edt-vt100.el --- enhanced EDT keypad mode emulation for VT series terminals -;; Copyright (C) 1986, 1992, 1993, 1995, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1986, 1992-1993, 1995, 2002-2011 +;; Free Software Foundation, Inc. ;; Author: Kevin Gallagher <Kevin.Gallagher@boeing.com> ;; Maintainer: Kevin Gallagher <Kevin.Gallagher@boeing.com> @@ -48,5 +48,4 @@ "Set terminal width to 132 columns." (vt100-wide-mode 1)) -;; arch-tag: c9f10c95-915f-44b5-93ff-4654abca4dd4 ;;; edt-vt100.el ends here diff --git a/lisp/emulation/edt.el b/lisp/emulation/edt.el index bfed09e0df3..68550cc30e2 100644 --- a/lisp/emulation/edt.el +++ b/lisp/emulation/edt.el @@ -1,8 +1,6 @@ ;;; edt.el --- enhanced EDT keypad mode emulation for GNU Emacs -;; Copyright (C) 1986, 1992, 1993, 1994, 1995, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1986, 1992-1995, 2000-2011 Free Software Foundation, Inc. ;; Author: Kevin Gallagher <Kevin.Gallagher@boeing.com> ;; Maintainer: Kevin Gallagher <Kevin.Gallagher@boeing.com> diff --git a/lisp/emulation/keypad.el b/lisp/emulation/keypad.el index 5ec8236651d..0156e54f90f 100644 --- a/lisp/emulation/keypad.el +++ b/lisp/emulation/keypad.el @@ -1,7 +1,6 @@ ;;; keypad.el --- simplified keypad bindings -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Author: Kim F. Storm <storm@cua.dk> ;; Keywords: keyboard convenience @@ -270,5 +269,4 @@ the decimal key on the keypad is mapped to DECIMAL instead of `.'" (setq i (1+ i))))) -;; arch-tag: 0899d2bd-9e12-4b4e-9aef-d0014d3b6414 ;;; keypad.el ends here diff --git a/lisp/emulation/pc-mode.el b/lisp/emulation/pc-mode.el index 37e6cc1aa4b..c0ed1925b49 100644 --- a/lisp/emulation/pc-mode.el +++ b/lisp/emulation/pc-mode.el @@ -1,7 +1,6 @@ ;;; pc-mode.el --- emulate certain key bindings used on PCs -;; Copyright (C) 1995, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: emulations @@ -53,5 +52,4 @@ C-Escape does list-buffers." (provide 'pc-mode) -;; arch-tag: df007c05-f885-4cd0-8c1e-487d0f8dd9c9 ;;; pc-mode.el ends here diff --git a/lisp/emulation/pc-select.el b/lisp/emulation/pc-select.el index 8dcdb991ab2..76562dd75ca 100644 --- a/lisp/emulation/pc-select.el +++ b/lisp/emulation/pc-select.el @@ -2,8 +2,7 @@ ;;; (or MAC GUI or MS-windoze (bah)) look-and-feel ;;; including key bindings. -;; Copyright (C) 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995-1997, 2000-2011 Free Software Foundation, Inc. ;; Author: Michael Staats <michael@thp.Uni-Duisburg.DE> ;; Keywords: convenience emulations @@ -983,5 +982,4 @@ but before calling PC Selection mode): (setq pc-select-key-bindings-alist nil pc-select-saved-settings-alist nil)))) -;; arch-tag: 10697b70-ae07-4f3e-ad23-7814a3f418c2 ;;; pc-select.el ends here diff --git a/lisp/emulation/tpu-edt.el b/lisp/emulation/tpu-edt.el index f77cf23d81e..f86d3be0fc0 100644 --- a/lisp/emulation/tpu-edt.el +++ b/lisp/emulation/tpu-edt.el @@ -1,7 +1,6 @@ ;;; tpu-edt.el --- Emacs emulating TPU emulating EDT -;; Copyright (C) 1993, 1994, 1995, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993-1995, 2000-2011 Free Software Foundation, Inc. ;; Author: Rob Riepel <riepel@networking.stanford.edu> ;; Maintainer: Rob Riepel <riepel@networking.stanford.edu> @@ -2438,7 +2437,7 @@ If FILE is nil, try to load a default file. The default file names are ;;;### (autoloads (tpu-set-cursor-bound tpu-set-cursor-free tpu-set-scroll-margins -;;;;;; tpu-cursor-free-mode) "tpu-extras" "tpu-extras.el" "fe5b7795d6b6720a98b805ee47a08bdf") +;;;;;; tpu-cursor-free-mode) "tpu-extras" "tpu-extras.el" "0d2f0cd1c728d2eb9028a6e01b1a5df1") ;;; Generated autoloads from tpu-extras.el (autoload 'tpu-cursor-free-mode "tpu-extras" "\ @@ -2465,5 +2464,4 @@ Constrain the cursor to the flow of the text. (provide 'tpu-edt) -;; arch-tag: f3dfe61c-2cbd-4f73-b9cc-eb215020b857 ;;; tpu-edt.el ends here diff --git a/lisp/emulation/tpu-extras.el b/lisp/emulation/tpu-extras.el index 311b8e2516d..235b16e92b1 100644 --- a/lisp/emulation/tpu-extras.el +++ b/lisp/emulation/tpu-extras.el @@ -1,7 +1,6 @@ ;;; tpu-extras.el --- scroll margins and free cursor mode for TPU-edt -;; Copyright (C) 1993, 1994, 1995, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993-1995, 2000-2011 Free Software Foundation, Inc. ;; Author: Rob Riepel <riepel@networking.stanford.edu> ;; Maintainer: Rob Riepel <riepel@networking.stanford.edu> diff --git a/lisp/emulation/tpu-mapper.el b/lisp/emulation/tpu-mapper.el index b4942564eba..15417a137f8 100644 --- a/lisp/emulation/tpu-mapper.el +++ b/lisp/emulation/tpu-mapper.el @@ -1,7 +1,6 @@ ;;; tpu-mapper.el --- create a TPU-edt X-windows keymap file -;; Copyright (C) 1993, 1994, 1995, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993-1995, 2001-2011 Free Software Foundation, Inc. ;; Author: Rob Riepel <riepel@networking.stanford.edu> ;; Maintainer: Rob Riepel <riepel@networking.stanford.edu> @@ -350,5 +349,4 @@ your local X guru can try to figure out why the key is being ignored." ") (goto-char (point-min))) -;; arch-tag: bab5872f-cd3a-4c1c-aedb-047b67646f6c ;;; tpu-mapper.el ends here diff --git a/lisp/emulation/vi.el b/lisp/emulation/vi.el index a65dd44e39e..5bab9741649 100644 --- a/lisp/emulation/vi.el +++ b/lisp/emulation/vi.el @@ -1488,5 +1488,4 @@ With ARG, inserts that many newlines." (provide 'vi) -;; arch-tag: ac9bdac3-8acb-4ddd-bdae-c6dd873153b3 ;;; vi.el ends here diff --git a/lisp/emulation/vip.el b/lisp/emulation/vip.el index 0474ba7c679..328fbac9033 100644 --- a/lisp/emulation/vip.el +++ b/lisp/emulation/vip.el @@ -1,7 +1,7 @@ ;;; vip.el --- a VI Package for GNU Emacs -;; Copyright (C) 1986, 1987, 1988, 1992, 1993, 1998, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1986-1988, 1992-1993, 1998, 2001-2011 +;; Free Software Foundation, Inc. ;; Author: Masahiko Sato <ms@sail.stanford.edu> ;; Keywords: emulations @@ -3054,5 +3054,4 @@ vip-s-string" (provide 'vip) -;; arch-tag: bff623ef-48f7-41d4-9aa3-2e840c9ab415 ;;; vip.el ends here diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index 4e90889ddd0..fae249da9d3 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el @@ -1,7 +1,6 @@ ;;; viper-cmd.el --- Vi command support for Viper -;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-2011 Free Software Foundation, Inc. ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> ;; Package: viper diff --git a/lisp/emulation/viper-ex.el b/lisp/emulation/viper-ex.el index be387d7724b..93bf8251ce1 100644 --- a/lisp/emulation/viper-ex.el +++ b/lisp/emulation/viper-ex.el @@ -1,7 +1,6 @@ ;;; viper-ex.el --- functions implementing the Ex commands for Viper -;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994-1998, 2000-2011 Free Software Foundation, Inc. ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> ;; Package: viper @@ -2303,5 +2302,4 @@ Type 'mak ' (including the space) to run make with no args." -;; arch-tag: 56b80d36-f880-4d10-bd66-85ad91a295db ;;; viper-ex.el ends here diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el index 5af96922171..c069c387003 100644 --- a/lisp/emulation/viper-init.el +++ b/lisp/emulation/viper-init.el @@ -1,7 +1,6 @@ ;;; viper-init.el --- some common definitions for Viper -;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-2011 Free Software Foundation, Inc. ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> ;; Package: viper diff --git a/lisp/emulation/viper-keym.el b/lisp/emulation/viper-keym.el index d75573673d7..f3bd6bece6e 100644 --- a/lisp/emulation/viper-keym.el +++ b/lisp/emulation/viper-keym.el @@ -1,7 +1,6 @@ ;;; viper-keym.el --- Viper keymaps -;; Copyright (C) 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994-1997, 2000-2011 Free Software Foundation, Inc. ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> ;; Package: viper @@ -673,5 +672,4 @@ form ((key . function) (key . function) ... )." ;; End: -;; arch-tag: 43af4b2f-0bea-400b-889e-221ebc00acb1 ;;; viper-keym.el ends here diff --git a/lisp/emulation/viper-macs.el b/lisp/emulation/viper-macs.el index 71d565632eb..00153c1ff0e 100644 --- a/lisp/emulation/viper-macs.el +++ b/lisp/emulation/viper-macs.el @@ -1,7 +1,6 @@ ;;; viper-macs.el --- functions implementing keyboard macros for Viper -;; Copyright (C) 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994-1997, 2000-2011 Free Software Foundation, Inc. ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> ;; Package: viper @@ -932,5 +931,4 @@ name from there." (call-last-kbd-macro))) -;; arch-tag: ecd3cc5c-8cd0-4bbe-b2ec-7e75a4b7d0aa ;;; viper-macs.el ends here diff --git a/lisp/emulation/viper-mous.el b/lisp/emulation/viper-mous.el index 9bea921e167..778910017cd 100644 --- a/lisp/emulation/viper-mous.el +++ b/lisp/emulation/viper-mous.el @@ -1,7 +1,6 @@ ;;; viper-mous.el --- mouse support for Viper -;; Copyright (C) 1994, 1995, 1996, 1997, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994-1997, 2001-2011 Free Software Foundation, Inc. ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> ;; Package: viper @@ -663,5 +662,4 @@ This buffer may be different from the one where the click occurred." ;; End: -;; arch-tag: e56b2390-06c4-4dd1-96f5-c7876e2d8c2f ;;; viper-mous.el ends here diff --git a/lisp/emulation/viper-util.el b/lisp/emulation/viper-util.el index 6868a960087..4aace25fc9c 100644 --- a/lisp/emulation/viper-util.el +++ b/lisp/emulation/viper-util.el @@ -1,8 +1,6 @@ ;;; viper-util.el --- Utilities used by viper.el -;; Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1994-1997, 1999-2011 Free Software Foundation, Inc. ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> ;; Package: viper @@ -1556,5 +1554,4 @@ This option is appropriate if you like Emacs-style words." ;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun) ;; End: -;; arch-tag: 7f023fd5-dd9e-4378-a397-9c179553b0e3 ;;; viper-util.el ends here diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el index 04833a836a6..0da3345aae4 100644 --- a/lisp/emulation/viper.el +++ b/lisp/emulation/viper.el @@ -3,8 +3,7 @@ ;; and a venomous VI PERil. ;; Viper Is also a Package for Emacs Rebels. -;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994-2011 Free Software Foundation, Inc. ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> ;; Keywords: emulations @@ -1375,5 +1374,4 @@ These two lines must come in the order given. ;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun) ;; End: -;; arch-tag: 5f3e844c-c4e6-4bbd-9b73-63bdc14e7d79 ;;; viper.el ends here diff --git a/lisp/emulation/ws-mode.el b/lisp/emulation/ws-mode.el index 35f54b71d61..69f7b1d50ea 100644 --- a/lisp/emulation/ws-mode.el +++ b/lisp/emulation/ws-mode.el @@ -1,7 +1,6 @@ ;;; ws-mode.el --- WordStar emulation mode for GNU Emacs -;; Copyright (C) 1991, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1991, 2001-2011 Free Software Foundation, Inc. ;; Author: Juergen Nickelsen <nickel@cs.tu-berlin.de> ;; Version: 0.7 @@ -742,5 +741,4 @@ sWith: " ) (provide 'ws-mode) -;; arch-tag: 6dd864bf-2ccb-4d59-af6e-492eba2890a3 ;;; ws-mode.el ends here diff --git a/lisp/env.el b/lisp/env.el index b69f2d2b0e3..5e915eb3126 100644 --- a/lisp/env.el +++ b/lisp/env.el @@ -1,7 +1,6 @@ ;;; env.el --- functions to manipulate environment variables -;; Copyright (C) 1991, 1994, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1991, 1994, 2000-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: processes, unix @@ -210,5 +209,4 @@ in the environment list of the selected frame." (provide 'env) -;; arch-tag: b7d6a8f7-bc81-46db-8e39-8d721d4ed0b8 ;;; env.el ends here diff --git a/lisp/epa-dired.el b/lisp/epa-dired.el index 80ecef6f54f..db1ddd7ce56 100644 --- a/lisp/epa-dired.el +++ b/lisp/epa-dired.el @@ -1,5 +1,5 @@ ;;; epa-dired.el --- the EasyPG Assistant, dired extension -;; Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2006-2011 Free Software Foundation, Inc. ;; Author: Daiki Ueno <ueno@unixuser.org> ;; Keywords: PGP, GnuPG @@ -74,5 +74,4 @@ If no one is selected, symmetric encryption will be performed. ")) (provide 'epa-dired) -;; arch-tag: 2025700b-48d0-4684-bc94-228ad1f8e9ff ;;; epa-dired.el ends here diff --git a/lisp/epa-file.el b/lisp/epa-file.el index 95d8423020b..b0f9d2dffb2 100644 --- a/lisp/epa-file.el +++ b/lisp/epa-file.el @@ -1,5 +1,5 @@ ;;; epa-file.el --- the EasyPG Assistant, transparent file encryption -;; Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2006-2011 Free Software Foundation, Inc. ;; Author: Daiki Ueno <ueno@unixuser.org> ;; Keywords: PGP, GnuPG @@ -35,9 +35,16 @@ way." :type 'boolean :group 'epa-file) -(defcustom epa-file-select-keys nil - "If non-nil, always asks user to select recipients." - :type 'boolean +(defcustom epa-file-select-keys 'silent + "Control whether or not to pop up the key selection dialog. + +If t, always asks user to select recipients. +If nil, query user only when `epa-file-encrypt-to' is not set. +If neither t nor nil, doesn't ask user. In this case, symmetric +encryption is used." + :type '(choice (const :tag "Ask always" t) + (const :tag "Ask when recipients are not set" nil) + (const :tag "Don't ask" silent)) :group 'epa-file) (defvar epa-file-passphrase-alist nil) @@ -218,9 +225,10 @@ way." end (point-max))) (epa-file--encode-coding-string (buffer-substring start end) coding-system)) - (if (or epa-file-select-keys - (not (local-variable-p 'epa-file-encrypt-to - (current-buffer)))) + (if (or (eq epa-file-select-keys t) + (and (null epa-file-select-keys) + (not (local-variable-p 'epa-file-encrypt-to + (current-buffer))))) (epa-select-keys context "Select recipents for encryption. @@ -290,5 +298,4 @@ If no one is selected, symmetric encryption will be performed. ")))) (provide 'epa-file) -;; arch-tag: 5715152f-0eb1-4dbc-9008-07098775314d ;;; epa-file.el ends here diff --git a/lisp/epa-hook.el b/lisp/epa-hook.el index 5fb7e2c0bf3..1dbc95bb7d5 100644 --- a/lisp/epa-hook.el +++ b/lisp/epa-hook.el @@ -1,5 +1,5 @@ ;;; epa-hook.el --- preloaded code to enable epa-file.el -;; Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2006-2011 Free Software Foundation, Inc. ;; Author: Daiki Ueno <ueno@unixuser.org> ;; Keywords: PGP, GnuPG @@ -109,5 +109,4 @@ Return the new status of auto encryption (non-nil means on)." (provide 'epa-hook) -;; arch-tag: f75c8a50-d32e-4eb3-9ec6-9e940c1fc8b5 ;;; epa-hook.el ends here diff --git a/lisp/epa-mail.el b/lisp/epa-mail.el index ab47cbf60bc..6e358541118 100644 --- a/lisp/epa-mail.el +++ b/lisp/epa-mail.el @@ -1,5 +1,5 @@ ;;; epa-mail.el --- the EasyPG Assistant, minor-mode for mail composer -;; Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2006-2011 Free Software Foundation, Inc. ;; Author: Daiki Ueno <ueno@unixuser.org> ;; Keywords: PGP, GnuPG, mail, message @@ -197,5 +197,4 @@ Don't use this command in Lisp programs!" (provide 'epa-mail) -;; arch-tag: a6f82b3f-d177-4a11-af95-040da55927d2 ;;; epa-mail.el ends here diff --git a/lisp/epa.el b/lisp/epa.el index 687a31a8c3a..43e202c1b16 100644 --- a/lisp/epa.el +++ b/lisp/epa.el @@ -1,7 +1,6 @@ ;;; epa.el --- the EasyPG Assistant -;; Copyright (C) 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2006-2011 Free Software Foundation, Inc. ;; Author: Daiki Ueno <ueno@unixuser.org> ;; Keywords: PGP, GnuPG diff --git a/lisp/epg-config.el b/lisp/epg-config.el index a439fa0480e..38f7dbdaa73 100644 --- a/lisp/epg-config.el +++ b/lisp/epg-config.el @@ -1,6 +1,6 @@ ;;; epg-config.el --- configuration of the EasyPG Library -;; Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2006-2011 Free Software Foundation, Inc. ;; Author: Daiki Ueno <ueno@unixuser.org> ;; Keywords: PGP, GnuPG @@ -147,5 +147,4 @@ Note that the buffer name starts with a space." (provide 'epg-config) -;; arch-tag: 9aca7cb8-5f63-4bcb-84ee-46fd2db0763f ;;; epg-config.el ends here diff --git a/lisp/epg.el b/lisp/epg.el index a1541361b4b..c096ec6df98 100644 --- a/lisp/epg.el +++ b/lisp/epg.el @@ -1,6 +1,5 @@ ;;; epg.el --- the EasyPG Library -;; Copyright (C) 1999, 2000, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2000, 2002-2011 Free Software Foundation, Inc. ;; Author: Daiki Ueno <ueno@unixuser.org> ;; Keywords: PGP, GnuPG @@ -1562,14 +1561,14 @@ This function is for internal use only." (defun epg--status-KEYEXPIRED (context string) (epg-context-set-result-for - context 'error + context 'key (cons (list 'key-expired (cons 'expiration-time (epg--time-from-seconds string))) (epg-context-result-for context 'error)))) (defun epg--status-KEYREVOKED (context string) (epg-context-set-result-for - context 'error + context 'key (cons '(key-revoked) (epg-context-result-for context 'error)))) @@ -2650,5 +2649,4 @@ Type names are resolved using `epg-dn-type-alist'." (provide 'epg) -;; arch-tag: de8f0acc-1bcf-4c14-a09e-bfffe1b579b7 ;;; epg.el ends here diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index 210f6985dc9..879dd228562 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog @@ -1,3 +1,8 @@ +2011-01-13 Stefan Monnier <monnier@iro.umontreal.ca> + + * erc.el (erc-mode): + * erc-dcc.el (erc-dcc-chat-mode): Use define-derived-mode. + 2010-11-11 Glenn Morris <rgm@gnu.org> * erc-lang.el (erc-cmd-LANG): Fix what may have been a typo. @@ -25,17 +30,17 @@ 2010-08-14 Vivek Dasmohapatra <vivek@etla.org> * erc-join.el (erc-autojoin-timing, erc-autojoin-delay): New vars. - (erc-autojoin-channels-delayed, erc-autojoin-after-ident): New - functions. + (erc-autojoin-channels-delayed, erc-autojoin-after-ident): + New functions. (erc-autojoin-channels): Allow autojoining after ident (Bug#5521). 2010-08-08 Fran Litterio <flitterio@gmail.com> - * erc-backend.el (erc-server-filter-function): Call - erc-log-irc-protocol. + * erc-backend.el (erc-server-filter-function): + Call erc-log-irc-protocol. - * erc.el (erc-toggle-debug-irc-protocol): Bind - erc-toggle-debug-irc-protocol to t. + * erc.el (erc-toggle-debug-irc-protocol): + Bind erc-toggle-debug-irc-protocol to t. 2010-05-07 Chong Yidong <cyd@stupidchicken.com> @@ -126,7 +131,7 @@ See ChangeLog.08 for earlier changes. - Copyright (C) 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2009-2011 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -148,4 +153,3 @@ See ChangeLog.08 for earlier changes. ;; add-log-time-zone-rule: t ;; End: -;; arch-tag: d4703244-4a8d-49b1-ab34-ad0d56600ef8 diff --git a/lisp/erc/ChangeLog.01 b/lisp/erc/ChangeLog.01 index 79825684b78..962acd5bfc6 100644 --- a/lisp/erc/ChangeLog.01 +++ b/lisp/erc/ChangeLog.01 @@ -1035,7 +1035,7 @@ * erc-speak.el, erc.el: New file. - Copyright (C) 2001, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2001, 2006-2011 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -1056,4 +1056,3 @@ ;; coding: utf-8 ;; End: -;; arch-tag: 306c4b58-f9ae-4f3d-9fd9-db2d743f05a6 diff --git a/lisp/erc/ChangeLog.02 b/lisp/erc/ChangeLog.02 index 2dfb009cecd..09ab1cb3796 100644 --- a/lisp/erc/ChangeLog.02 +++ b/lisp/erc/ChangeLog.02 @@ -2596,7 +2596,7 @@ See ChangeLog.01 for earlier changes. - Copyright (C) 2002, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2002, 2006-2011 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -2617,4 +2617,3 @@ See ChangeLog.01 for earlier changes. ;; coding: utf-8 ;; End: -;; arch-tag: a6779d5e-99fa-442b-98cf-90e73eb2c272 diff --git a/lisp/erc/ChangeLog.03 b/lisp/erc/ChangeLog.03 index 6f46837ad19..7f82a9bcbe2 100644 --- a/lisp/erc/ChangeLog.03 +++ b/lisp/erc/ChangeLog.03 @@ -2140,7 +2140,7 @@ See ChangeLog.02 for earlier changes. - Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2003, 2006-2011 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -2161,4 +2161,3 @@ See ChangeLog.02 for earlier changes. ;; coding: utf-8 ;; End: -;; arch-tag: 808865e1-3cce-4c5b-9997-95a8b7a9d384 diff --git a/lisp/erc/ChangeLog.04 b/lisp/erc/ChangeLog.04 index a1cbab740be..7db040fd23f 100644 --- a/lisp/erc/ChangeLog.04 +++ b/lisp/erc/ChangeLog.04 @@ -2072,7 +2072,7 @@ See ChangeLog.03 for earlier changes. - Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2004, 2006-2011 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -2093,4 +2093,3 @@ See ChangeLog.03 for earlier changes. ;; coding: utf-8 ;; End: -;; arch-tag: cc606d2d-635b-4b36-829b-a50e3c51e2d1 diff --git a/lisp/erc/ChangeLog.05 b/lisp/erc/ChangeLog.05 index 66e2c8251d2..fd5fde00a4a 100644 --- a/lisp/erc/ChangeLog.05 +++ b/lisp/erc/ChangeLog.05 @@ -1217,7 +1217,7 @@ See ChangeLog.04 for earlier changes. - Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2005-2011 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -1238,4 +1238,3 @@ See ChangeLog.04 for earlier changes. ;; coding: utf-8 ;; End: -;; arch-tag: 70f1733a-3e2f-43c2-91c3-d9ace93f82ba diff --git a/lisp/erc/ChangeLog.06 b/lisp/erc/ChangeLog.06 index a1a196b79aa..e3026c96a4d 100644 --- a/lisp/erc/ChangeLog.06 +++ b/lisp/erc/ChangeLog.06 @@ -1430,7 +1430,7 @@ See ChangeLog.05 for earlier changes. - Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2006-2011 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -1452,4 +1452,3 @@ See ChangeLog.05 for earlier changes. ;; add-log-time-zone-rule: t ;; End: -;; arch-tag: 865a75f6-2bcb-46df-bf0c-b514dadf688a diff --git a/lisp/erc/ChangeLog.07 b/lisp/erc/ChangeLog.07 index 0a3bb3e35b6..b32155bbce4 100644 --- a/lisp/erc/ChangeLog.07 +++ b/lisp/erc/ChangeLog.07 @@ -812,7 +812,7 @@ See ChangeLog.06 for earlier changes. - Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2007-2011 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -834,4 +834,3 @@ See ChangeLog.06 for earlier changes. ;; add-log-time-zone-rule: t ;; End: -;; arch-tag: 3369b6e5-96b1-4b32-96cd-9a905c747496 diff --git a/lisp/erc/ChangeLog.08 b/lisp/erc/ChangeLog.08 index d07a707d6f4..feff487fa6e 100644 --- a/lisp/erc/ChangeLog.08 +++ b/lisp/erc/ChangeLog.08 @@ -405,7 +405,7 @@ See ChangeLog.07 for earlier changes. - Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2008-2011 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -427,4 +427,3 @@ See ChangeLog.07 for earlier changes. ;; add-log-time-zone-rule: t ;; End: -;; arch-tag: 15787dfd-e091-4c8c-8b88-747b474e1ac7 diff --git a/lisp/erc/erc-autoaway.el b/lisp/erc/erc-autoaway.el index 59215b10cd9..a15e038dddc 100644 --- a/lisp/erc/erc-autoaway.el +++ b/lisp/erc/erc-autoaway.el @@ -1,7 +1,6 @@ ;;; erc-autoaway.el --- Provides autoaway for ERC -;; Copyright (C) 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2002-2004, 2006-2011 Free Software Foundation, Inc. ;; Author: Jorgen Schaefer <forcer@forcix.cx> ;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcAutoAway @@ -286,4 +285,3 @@ activer server buffer available." ;; tab-width: 8 ;; End: -;; arch-tag: 16fc241e-8358-4b56-9fe2-116bdd0ba3bc diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index 3bc56989f4f..8a25e5f600d 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -1,6 +1,6 @@ ;;; erc-backend.el --- Backend network communication for ERC -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Filename: erc-backend.el ;; Author: Lawrence Mitchell <wence@gmx.li> @@ -1994,4 +1994,3 @@ See `erc-display-error-notice'." nil ;; indent-tabs-mode: nil ;; End: -;; arch-tag: a64e6bb7-a780-4efd-8f98-083b18c7c84a diff --git a/lisp/erc/erc-button.el b/lisp/erc/erc-button.el index 141834e490b..0b11c3bee2d 100644 --- a/lisp/erc/erc-button.el +++ b/lisp/erc/erc-button.el @@ -1,7 +1,6 @@ ;; erc-button.el --- A way of buttonizing certain things in ERC buffers -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-2004, 2006-2011 Free Software Foundation, Inc. ;; Author: Mario Lang <mlang@delysid.org> ;; Keywords: irc, button, url, regexp @@ -534,4 +533,3 @@ and `apropos' for other symbols." ;; indent-tabs-mode: nil ;; End: -;; arch-tag: 7d23bed4-2f30-4273-a03f-d7a274c605c4 diff --git a/lisp/erc/erc-capab.el b/lisp/erc/erc-capab.el index fb55988c0e2..6b76c4246ad 100644 --- a/lisp/erc/erc-capab.el +++ b/lisp/erc/erc-capab.el @@ -1,6 +1,6 @@ ;;; erc-capab.el --- support for dancer-ircd and hyperion's CAPAB -;; Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2006-2011 Free Software Foundation, Inc. ;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -202,5 +202,4 @@ PARSED is an `erc-parsed' response struct." (provide 'erc-capab) -;; arch-tag: 27b6d668-7ee5-4e47-b9f0-27d7a4362062 ;;; erc-capab.el ends here diff --git a/lisp/erc/erc-compat.el b/lisp/erc/erc-compat.el index 6bda8268577..792c8dd88b3 100644 --- a/lisp/erc/erc-compat.el +++ b/lisp/erc/erc-compat.el @@ -1,7 +1,6 @@ ;;; erc-compat.el --- ERC compatibility code for XEmacs -;; Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2002-2003, 2005-2011 Free Software Foundation, Inc. ;; Author: Alex Schroeder <alex@gnu.org> ;; URL: http://www.emacswiki.org/cgi-bin/wiki/ERC @@ -165,4 +164,3 @@ If START or END is negative, it counts from the end." ;; tab-width: 8 ;; End: -;; arch-tag: 8948ffe0-aff8-4ad8-a196-368ebbfd58ff diff --git a/lisp/erc/erc-dcc.el b/lisp/erc/erc-dcc.el index 2da4c83b7cb..88f0fe605f8 100644 --- a/lisp/erc/erc-dcc.el +++ b/lisp/erc/erc-dcc.el @@ -1,7 +1,7 @@ ;;; erc-dcc.el --- CTCP DCC module for ERC -;; Copyright (C) 1993, 1994, 1995, 1998, 2002, 2003, 2004, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993-1995, 1998, 2002-2004, 2006-2011 +;; Free Software Foundation, Inc. ;; Author: Ben A. Mesander <ben@gnu.ai.mit.edu> ;; Noah Friedman <friedman@prep.ai.mit.edu> @@ -1098,17 +1098,11 @@ Possible values are: ask, auto, ignore." map) "Keymap for `erc-dcc-mode'.") -(defun erc-dcc-chat-mode () +(define-derived-mode erc-dcc-chat-mode fundamental-mode "DCC-Chat" "Major mode for wasting time via DCC chat." - (interactive) - (kill-all-local-variables) (setq mode-line-process '(":%s") - mode-name "DCC-Chat" - major-mode 'erc-dcc-chat-mode erc-send-input-line-function 'erc-dcc-chat-send-input-line - erc-default-recipients '(dcc)) - (use-local-map erc-dcc-chat-mode-map) - (run-hooks 'erc-dcc-chat-mode-hook)) + erc-default-recipients '(dcc))) (defun erc-dcc-chat-send-input-line (recipient line &optional force) "Send LINE to the remote end. @@ -1257,4 +1251,3 @@ other client." ;; indent-tabs-mode: nil ;; End: -;; arch-tag: cda5a6b3-c510-4dbe-b699-84cccfa04edb diff --git a/lisp/erc/erc-ezbounce.el b/lisp/erc/erc-ezbounce.el index bd6ec1d6879..b480d83e283 100644 --- a/lisp/erc/erc-ezbounce.el +++ b/lisp/erc/erc-ezbounce.el @@ -1,6 +1,6 @@ ;;; erc-ezbounce.el --- Handle EZBounce bouncer commands -;; Copyright (C) 2002, 2004, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2004, 2006-2011 Free Software Foundation, Inc. ;; Author: Andreas Fuchs <asf@void.at> ;; Keywords: comm @@ -174,5 +174,4 @@ in the alist is `nil', prompt for the appropriate values." (provide 'erc-ezbounce) -;; arch-tag: e972aa7b-a9f4-4d16-a489-074ec7a1002e ;;; erc-ezbounce.el ends here diff --git a/lisp/erc/erc-fill.el b/lisp/erc/erc-fill.el index cd9a7e0f9a2..0b9a4051d65 100644 --- a/lisp/erc/erc-fill.el +++ b/lisp/erc/erc-fill.el @@ -1,7 +1,6 @@ ;;; erc-fill.el --- Filling IRC messages in various ways -;; Copyright (C) 2001, 2002, 2003, 2004, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2001-2004, 2006-2011 Free Software Foundation, Inc. ;; Author: Andreas Fuchs <asf@void.at> ;; Mario Lang <mlang@delysid.org> @@ -193,4 +192,3 @@ You can put this on `erc-insert-modify-hook' and/or `erc-send-modify-hook'." ;; indent-tabs-mode: nil ;; End: -;; arch-tag: 89224581-c2c2-4e26-92e5-e3a390dc516a diff --git a/lisp/erc/erc-goodies.el b/lisp/erc/erc-goodies.el index 00b88471334..b2cf9e35622 100644 --- a/lisp/erc/erc-goodies.el +++ b/lisp/erc/erc-goodies.el @@ -1,7 +1,6 @@ ;; erc-goodies.el --- Collection of ERC modules -;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2001-2011 Free Software Foundation, Inc. ;; Author: Jorgen Schaefer <forcer@forcix.cx> @@ -569,5 +568,4 @@ servers. If called from a program, PROC specifies the server process." (provide 'erc-goodies) -;; arch-tag: d987ae26-9e28-4c72-9596-e617309fb582 ;;; erc-goodies.el ends here diff --git a/lisp/erc/erc-hecomplete.el b/lisp/erc/erc-hecomplete.el index 22a5bb73d88..530c586d24f 100644 --- a/lisp/erc/erc-hecomplete.el +++ b/lisp/erc/erc-hecomplete.el @@ -1,6 +1,6 @@ ;;; erc-hecomplete.el --- Provides Nick name completion for ERC -;; Copyright (C) 2001, 2002, 2004, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2001-2002, 2004, 2006-2011 Free Software Foundation, Inc. ;; Author: Alex Schroeder <alex@gnu.org> ;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcCompletion @@ -220,4 +220,3 @@ Window configurations are stored in ;; tab-width: 8 ;; End: -;; arch-tag: 3be13ee8-8fdb-41ab-83c2-6582c757b91e diff --git a/lisp/erc/erc-ibuffer.el b/lisp/erc/erc-ibuffer.el index a6b4976d67b..9d658eec2f0 100644 --- a/lisp/erc/erc-ibuffer.el +++ b/lisp/erc/erc-ibuffer.el @@ -1,7 +1,6 @@ ;;; erc-ibuffer.el --- ibuffer integration with ERC -;; Copyright (C) 2002, 2004, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2002, 2004, 2006-2011 Free Software Foundation, Inc. ;; Author: Mario Lang <mlang@delysid.org> ;; Keywords: comm @@ -190,4 +189,3 @@ ;; tab-width: 8 ;; End: -;; arch-tag: fbad56a5-8595-45e0-a8c8-d8bb91e26944 diff --git a/lisp/erc/erc-identd.el b/lisp/erc/erc-identd.el index d889dbdc846..140802deff0 100644 --- a/lisp/erc/erc-identd.el +++ b/lisp/erc/erc-identd.el @@ -1,6 +1,6 @@ ;;; erc-identd.el --- RFC1413 (identd authentication protocol) server -;; Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2006-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> ;; Keywords: comm, processes @@ -118,4 +118,3 @@ The default port is specified by `erc-identd-port'." ;; tab-width: 8 ;; End: -;; arch-tag: e0b5f926-0f35-40b9-8ddb-ca06b62a7544 diff --git a/lisp/erc/erc-imenu.el b/lisp/erc/erc-imenu.el index a79a82c4258..3e6e853ff70 100644 --- a/lisp/erc/erc-imenu.el +++ b/lisp/erc/erc-imenu.el @@ -1,6 +1,6 @@ ;;; erc-imenu.el -- Imenu support for ERC -;; Copyright (C) 2001, 2002, 2004, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2001-2002, 2004, 2006-2011 Free Software Foundation, Inc. ;; Author: Mario Lang <mlang@delysid.org> ;; Keywords: comm @@ -133,4 +133,3 @@ Don't rely on this function, read it first!" ;; tab-width: 8 ;; End: -;; arch-tag: 35c69082-ca29-43f7-a050-8da5f400de81 diff --git a/lisp/erc/erc-join.el b/lisp/erc/erc-join.el index c54c2c534f3..c158c47ab64 100644 --- a/lisp/erc/erc-join.el +++ b/lisp/erc/erc-join.el @@ -1,6 +1,6 @@ ;;; erc-join.el --- autojoin channels on connect and reconnects -;; Copyright (C) 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2002-2004, 2006-2011 Free Software Foundation, Inc. ;; Author: Alex Schroeder <alex@gnu.org> ;; Keywords: irc @@ -202,4 +202,3 @@ This function is run from `erc-nickserv-identified-hook'." ;; tab-width: 8 ;; End: -;; arch-tag: d62d8b15-8e31-49d6-8a73-12f11e717414 diff --git a/lisp/erc/erc-lang.el b/lisp/erc/erc-lang.el index a7e971acc61..84a4c60816e 100644 --- a/lisp/erc/erc-lang.el +++ b/lisp/erc/erc-lang.el @@ -1,7 +1,6 @@ ;;; erc-lang.el --- provide the LANG command to ERC -;; Copyright (C) 2002, 2004, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2002, 2004, 2006-2011 Free Software Foundation, Inc. ;; Author: Alex Schroeder <alex@gnu.org> ;; Maintainer: Alex Schroeder <alex@gnu.org> diff --git a/lisp/erc/erc-list.el b/lisp/erc/erc-list.el index 8bf0d213f8e..955b654f927 100644 --- a/lisp/erc/erc-list.el +++ b/lisp/erc/erc-list.el @@ -1,6 +1,6 @@ ;;; erc-list.el --- /list support for ERC -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Tom Tromey <tromey@redhat.com> ;; Version: 0.1 @@ -223,4 +223,3 @@ to RFC and send the LIST header (#321) at start of list transmission." ;; tab-width: 8 ;; End: -;; arch-tag: 99c5f9cb-6bac-4224-86bf-e394768cd1d0 diff --git a/lisp/erc/erc-log.el b/lisp/erc/erc-log.el index 98e58a30333..24990e1e068 100644 --- a/lisp/erc/erc-log.el +++ b/lisp/erc/erc-log.el @@ -1,6 +1,6 @@ ;;; erc-log.el --- Logging facilities for ERC. -;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2003-2011 Free Software Foundation, Inc. ;; Author: Lawrence Mitchell <wence@gmx.li> ;; Keywords: IRC, chat, client, Internet, logging @@ -451,4 +451,3 @@ You can save every individual message by putting this function on ;; tab-width: 8 ;; End: -;; arch-tag: 54072f99-9f0a-4846-8908-2ccde92221de diff --git a/lisp/erc/erc-match.el b/lisp/erc/erc-match.el index 5e5d31d4344..bde51da6e3d 100644 --- a/lisp/erc/erc-match.el +++ b/lisp/erc/erc-match.el @@ -1,7 +1,6 @@ ;;; erc-match.el --- Highlight messages matching certain regexps -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Author: Andreas Fuchs <asf@void.at> ;; Keywords: comm, faces @@ -635,4 +634,3 @@ This function is meant to be called from `erc-text-matched-hook'." ;; tab-width: 8 ;; End: -;; arch-tag: 1f1f595e-abcc-4b0b-83db-598a1d3f0f82 diff --git a/lisp/erc/erc-menu.el b/lisp/erc/erc-menu.el index 793484bee65..ea4ed399a64 100644 --- a/lisp/erc/erc-menu.el +++ b/lisp/erc/erc-menu.el @@ -1,7 +1,6 @@ ;; erc-menu.el -- Menu-bar definitions for ERC -;; Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2001-2002, 2004-2011 Free Software Foundation, Inc. ;; Author: Mario Lang <mlang@delysid.org> ;; Keywords: comm, processes, menu @@ -148,4 +147,3 @@ ERC menu yet.") ;; tab-width: 8 ;; End: -;; arch-tag: 671219f2-b082-4753-a185-1d0c7e0c05bd diff --git a/lisp/erc/erc-netsplit.el b/lisp/erc/erc-netsplit.el index d16dae34f2b..d5f4ec48ba9 100644 --- a/lisp/erc/erc-netsplit.el +++ b/lisp/erc/erc-netsplit.el @@ -1,6 +1,6 @@ ;;; erc-netsplit.el --- Reduce JOIN/QUIT messages on netsplits -;; Copyright (C) 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2002-2004, 2006-2011 Free Software Foundation, Inc. ;; Author: Mario Lang <mlang@delysid.org> ;; Keywords: comm @@ -209,4 +209,3 @@ join from that split has been detected or not.") ;; tab-width: 8 ;; End: -;; arch-tag: 61a85cb0-7e7b-4312-a4f6-313c7a25a6e8 diff --git a/lisp/erc/erc-networks.el b/lisp/erc/erc-networks.el index a53968479ce..1f94ef44093 100644 --- a/lisp/erc/erc-networks.el +++ b/lisp/erc/erc-networks.el @@ -1,6 +1,6 @@ ;;; erc-networks.el --- IRC networks -;; Copyright (C) 2002, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2004-2011 Free Software Foundation, Inc. ;; Author: Mario Lang <mlang@lexx.delysid.org> ;; Keywords: comm @@ -865,4 +865,3 @@ VALUE is the options value.") ;; tab-width: 8 ;; End: -;; arch-tag: 68cccabd-f66b-456c-9abe-5f993a2dc91c diff --git a/lisp/erc/erc-notify.el b/lisp/erc/erc-notify.el index 27189ba205c..1b245ec2e33 100644 --- a/lisp/erc/erc-notify.el +++ b/lisp/erc/erc-notify.el @@ -1,6 +1,6 @@ ;;; erc-notify.el --- Online status change notification -;; Copyright (C) 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2002-2004, 2006-2011 Free Software Foundation, Inc. ;; Author: Mario Lang <mlang@lexx.delysid.org> ;; Keywords: comm @@ -251,4 +251,3 @@ with args, toggle notify status of people." ;; tab-width: 8 ;; End: -;; arch-tag: 0fb19dd0-1359-458a-89b7-81dc195a588e diff --git a/lisp/erc/erc-page.el b/lisp/erc/erc-page.el index 130a5e19e5c..5776dd6fc1a 100644 --- a/lisp/erc/erc-page.el +++ b/lisp/erc/erc-page.el @@ -1,6 +1,6 @@ ;; erc-page.el - CTCP PAGE support for ERC -;; Copyright (C) 2002, 2004, 2006, 2007, 2008, 2009, 2010 Free Software Foundation +;; Copyright (C) 2002, 2004, 2006-2011 Free Software Foundation ;; This file is part of GNU Emacs. @@ -109,4 +109,3 @@ receive pages if `erc-page-mode' is on." ;; tab-width: 8 ;; End: -;; arch-tag: 82fd2e0e-6060-4dd2-9788-8c1411e844de diff --git a/lisp/erc/erc-pcomplete.el b/lisp/erc/erc-pcomplete.el index cabec21d118..355770c5dcc 100644 --- a/lisp/erc/erc-pcomplete.el +++ b/lisp/erc/erc-pcomplete.el @@ -1,6 +1,6 @@ ;;; erc-pcomplete.el --- Provides programmable completion for ERC -;; Copyright (C) 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2002-2004, 2006-2011 Free Software Foundation, Inc. ;; Author: Sacha Chua <sacha@free.net.ph> ;; Keywords: comm, convenience @@ -279,4 +279,3 @@ up to where point is right now." ;; indent-tabs-mode: nil ;; End: -;; arch-tag: 32a7703b-be87-45a4-82f3-9eed5a628911 diff --git a/lisp/erc/erc-replace.el b/lisp/erc/erc-replace.el index a272828eed0..4d3ba1e230d 100644 --- a/lisp/erc/erc-replace.el +++ b/lisp/erc/erc-replace.el @@ -1,7 +1,6 @@ ;; erc-replace.el -- wash and massage messages inserted into the buffer -;; Copyright (C) 2001, 2002, 2004, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2001-2002, 2004, 2006-2011 Free Software Foundation, Inc. ;; Author: Andreas Fuchs <asf@void.at> ;; Maintainer: Mario Lang (mlang@delysid.org) @@ -94,4 +93,3 @@ It replaces text according to `erc-replace-alist'." ;; tab-width: 8 ;; End: -;; arch-tag: dd904a59-d8a6-47f8-ac3a-76b698289a18 diff --git a/lisp/erc/erc-ring.el b/lisp/erc/erc-ring.el index ad209ab1056..345c636fa79 100644 --- a/lisp/erc/erc-ring.el +++ b/lisp/erc/erc-ring.el @@ -1,7 +1,6 @@ ;; erc-ring.el -- Command history handling for erc using ring.el -;; Copyright (C) 2001, 2002, 2003, 2004, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2001-2004, 2006-2011 Free Software Foundation, Inc. ;; Author: Alex Schroeder <alex@gnu.org> ;; Keywords: comm @@ -144,4 +143,3 @@ containing a password." ;; indent-tabs-mode: nil ;; End: -;; arch-tag: b77924a8-a80e-489d-84cd-b351761ea5c8 diff --git a/lisp/erc/erc-services.el b/lisp/erc/erc-services.el index 50a100d6932..3acc600b425 100644 --- a/lisp/erc/erc-services.el +++ b/lisp/erc/erc-services.el @@ -1,6 +1,6 @@ ;;; erc-services.el --- Identify to NickServ -;; Copyright (C) 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2002-2004, 2006-2011 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. @@ -445,4 +445,3 @@ When called interactively, read the password using `read-passwd'." ;; tab-width: 8 ;; End: -;; arch-tag: d401c8aa-d938-4255-96a9-3efb64c47e58 diff --git a/lisp/erc/erc-sound.el b/lisp/erc/erc-sound.el index 7d55afae9f3..3253aec3386 100644 --- a/lisp/erc/erc-sound.el +++ b/lisp/erc/erc-sound.el @@ -1,6 +1,6 @@ ;;; erc-sound.el --- CTCP SOUND support for ERC -;; Copyright (C) 2002, 2003, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2002-2003, 2006-2011 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. @@ -147,4 +147,3 @@ See also `play-sound-file'." ;; tab-width: 8 ;; End: -;; arch-tag: 53657d1d-007f-4a20-91c1-588e71cf0cee diff --git a/lisp/erc/erc-speedbar.el b/lisp/erc/erc-speedbar.el index bf45061d70c..3d80371cc68 100644 --- a/lisp/erc/erc-speedbar.el +++ b/lisp/erc/erc-speedbar.el @@ -1,7 +1,6 @@ ;;; erc-speedbar.el --- Speedbar support for ERC -;; Copyright (C) 2001, 2002, 2003, 2004, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2001-2004, 2006-2011 Free Software Foundation, Inc. ;; Author: Mario Lang <mlang@delysid.org> ;; Contributor: Eric M. Ludlam <eric@siege-engine.com> @@ -366,4 +365,3 @@ The INDENT level is ignored." ;; tab-width: 8 ;; End: -;; arch-tag: 7a6558a4-3308-4bf5-a284-e1d042c933c6 diff --git a/lisp/erc/erc-spelling.el b/lisp/erc/erc-spelling.el index da0d96ac737..5bb3c877dbe 100644 --- a/lisp/erc/erc-spelling.el +++ b/lisp/erc/erc-spelling.el @@ -1,6 +1,6 @@ ;;; erc-spelling.el --- use flyspell in ERC -;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2005-2011 Free Software Foundation, Inc. ;; Author: Jorgen Schaefer <forcer@forcix.cx> ;; Keywords: irc @@ -106,5 +106,4 @@ The cadr is the beginning and the caddr is the end." (provide 'erc-spelling) -;; arch-tag: 04ae1c46-0fd1-4e1a-8b80-55bfa471c945 ;;; erc-spelling.el ends here diff --git a/lisp/erc/erc-stamp.el b/lisp/erc/erc-stamp.el index 6db2bacc6bb..cfe8616ab65 100644 --- a/lisp/erc/erc-stamp.el +++ b/lisp/erc/erc-stamp.el @@ -1,7 +1,6 @@ ;;; erc-stamp.el --- Timestamping for ERC messages -;; Copyright (C) 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2002-2004, 2006-2011 Free Software Foundation, Inc. ;; Author: Mario Lang <mlang@delysid.org> ;; Keywords: comm, processes, timestamp @@ -422,4 +421,3 @@ NOW is position of point currently." ;; tab-width: 8 ;; End: -;; arch-tag: 57aefab4-63e0-4c48-91d5-6efa145487e0 diff --git a/lisp/erc/erc-track.el b/lisp/erc/erc-track.el index 8d4f4c19a58..b15cdb023a6 100644 --- a/lisp/erc/erc-track.el +++ b/lisp/erc/erc-track.el @@ -1,7 +1,6 @@ ;;; erc-track.el --- Track modified channel buffers -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Author: Mario Lang <mlang@delysid.org> ;; Keywords: comm, faces @@ -1068,4 +1067,3 @@ switch back to the last non-ERC buffer visited. Next is defined by ;; tab-width: 8 ;; End: -;; arch-tag: 11b439f5-e5d7-4c6c-bb3f-eda98f9b0ac1 diff --git a/lisp/erc/erc-truncate.el b/lisp/erc/erc-truncate.el index 61f6eca10f0..46668508637 100644 --- a/lisp/erc/erc-truncate.el +++ b/lisp/erc/erc-truncate.el @@ -1,6 +1,6 @@ ;;; erc-truncate.el --- Functions for truncating ERC buffers -;; Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2003-2004, 2006-2011 Free Software Foundation, Inc. ;; Author: Andreas Fuchs <asf@void.at> ;; Keywords: IRC, chat, client, Internet, logging @@ -115,4 +115,3 @@ Meant to be used in hooks, like `erc-insert-post-hook'." ;; tab-width: 8 ;; End: -;; arch-tag: 22a2ea78-871f-4870-8f1e-efe534170311 diff --git a/lisp/erc/erc-xdcc.el b/lisp/erc/erc-xdcc.el index 8d900e8291e..f4f75c15206 100644 --- a/lisp/erc/erc-xdcc.el +++ b/lisp/erc/erc-xdcc.el @@ -1,6 +1,6 @@ ;;; erc-xdcc.el --- XDCC file-server support for ERC -;; Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2003-2004, 2006-2011 Free Software Foundation, Inc. ;; Author: Mario Lang <mlang@delysid.org> ;; Keywords: comm, processes @@ -136,4 +136,3 @@ being evaluated and should return strings." ;; tab-width: 8 ;; End: -;; arch-tag: a13b62fe-2399-4562-af4e-f18a8dd4b9c8 diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 54f87982f8f..110ee8d1c3f 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -1,7 +1,6 @@ ;; erc.el --- An Emacs Internet Relay Chat client -;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-2011 Free Software Foundation, Inc. ;; Author: Alexander L. Belikoff (alexander@belikoff.net) ;; Contributors: Sergey Berezin (sergey.berezin@cs.cmu.edu), @@ -1439,28 +1438,16 @@ Defaults to the server buffer." ;; Mode activation routines -(defun erc-mode () - "Major mode for Emacs IRC. -Special commands: - -\\{erc-mode-map} - -Turning on `erc-mode' runs the hook `erc-mode-hook'." - (kill-all-local-variables) - (use-local-map erc-mode-map) - (setq mode-name "ERC" - major-mode 'erc-mode - local-abbrev-table erc-mode-abbrev-table) - (set-syntax-table erc-mode-syntax-table) +(define-derived-mode erc-mode fundamental-mode "ERC" + "Major mode for Emacs IRC." + (setq local-abbrev-table erc-mode-abbrev-table) (when (boundp 'next-line-add-newlines) (set (make-local-variable 'next-line-add-newlines) nil)) (setq line-move-ignore-invisible t) (set (make-local-variable 'paragraph-separate) (concat "\C-l\\|\\(^" (regexp-quote (erc-prompt)) "\\)")) (set (make-local-variable 'paragraph-start) - (concat "\\(" (regexp-quote (erc-prompt)) "\\)")) - ;; Run the mode hooks - (run-hooks 'erc-mode-hook)) + (concat "\\(" (regexp-quote (erc-prompt)) "\\)"))) ;; activation @@ -6541,4 +6528,3 @@ Otherwise, connect to HOST:PORT as USER and /join CHANNEL." ;; tab-width: 8 ;; End: -;; arch-tag: d19587f6-627e-48c1-8d86-58595fa3eca3 diff --git a/lisp/eshell/.gitignore b/lisp/eshell/.gitignore index 8f16f9600f5..2abf84ba3ee 100644 --- a/lisp/eshell/.gitignore +++ b/lisp/eshell/.gitignore @@ -1,3 +1,2 @@ esh-groups.el -# arch-tag: 270e983f-fee5-4b6d-a00b-c1bafdee8690 diff --git a/lisp/eshell/em-alias.el b/lisp/eshell/em-alias.el index 6b24c269b30..aa138cb4dcb 100644 --- a/lisp/eshell/em-alias.el +++ b/lisp/eshell/em-alias.el @@ -1,7 +1,6 @@ ;;; em-alias.el --- creation and management of command aliases -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> @@ -279,5 +278,4 @@ These are all the command aliases which begin with NAME." ;; generated-autoload-file: "esh-groups.el" ;; End: -;; arch-tag: 8b018fc1-4e07-4ccc-aa73-c0a1ba361f82 ;;; em-alias.el ends here diff --git a/lisp/eshell/em-banner.el b/lisp/eshell/em-banner.el index 9087cae369c..b2ebde98cee 100644 --- a/lisp/eshell/em-banner.el +++ b/lisp/eshell/em-banner.el @@ -1,7 +1,6 @@ ;;; em-banner.el --- sample module that displays a login banner -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> @@ -96,5 +95,4 @@ This can be any sexp, and should end with at least two newlines." ;; generated-autoload-file: "esh-groups.el" ;; End: -;; arch-tag: e738b4ef-8671-42ae-a757-291779b92491 ;;; em-banner.el ends here diff --git a/lisp/eshell/em-basic.el b/lisp/eshell/em-basic.el index ce72f752d42..df1987e13ee 100644 --- a/lisp/eshell/em-basic.el +++ b/lisp/eshell/em-basic.el @@ -1,7 +1,6 @@ ;;; em-basic.el --- basic shell builtin commands -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> @@ -184,5 +183,4 @@ or `eshell-printn' for display." ;; generated-autoload-file: "esh-groups.el" ;; End: -;; arch-tag: 385a31b1-cb95-46f0-9829-9d352ee77db8 ;;; em-basic.el ends here diff --git a/lisp/eshell/em-cmpl.el b/lisp/eshell/em-cmpl.el index 554e010a1b3..f3f104c1ede 100644 --- a/lisp/eshell/em-cmpl.el +++ b/lisp/eshell/em-cmpl.el @@ -1,7 +1,6 @@ ;;; em-cmpl.el --- completion using the TAB key -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> @@ -455,5 +454,4 @@ to writing a completion function." ;; generated-autoload-file: "esh-groups.el" ;; End: -;; arch-tag: 0e914699-673a-45f8-8cbf-82e1dbc571bc ;;; em-cmpl.el ends here diff --git a/lisp/eshell/em-dirs.el b/lisp/eshell/em-dirs.el index f4b2575def2..64555ab15ef 100644 --- a/lisp/eshell/em-dirs.el +++ b/lisp/eshell/em-dirs.el @@ -1,7 +1,6 @@ ;;; em-dirs.el --- directory navigation commands -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> @@ -573,5 +572,4 @@ in the minibuffer: ;; generated-autoload-file: "esh-groups.el" ;; End: -;; arch-tag: 1e9c5a95-f1bd-45f8-ad36-55aac706e787 ;;; em-dirs.el ends here diff --git a/lisp/eshell/em-glob.el b/lisp/eshell/em-glob.el index 6996bdbb7a0..2a565c5c827 100644 --- a/lisp/eshell/em-glob.el +++ b/lisp/eshell/em-glob.el @@ -1,7 +1,6 @@ ;;; em-glob.el --- extended file name globbing -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> diff --git a/lisp/eshell/em-hist.el b/lisp/eshell/em-hist.el index 1f644261337..5ec529f4b8f 100644 --- a/lisp/eshell/em-hist.el +++ b/lisp/eshell/em-hist.el @@ -1,7 +1,6 @@ ;;; em-hist.el --- history list management -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> @@ -837,6 +836,8 @@ With prefix argument N, search for Nth previous match. If N is negative, find the next or Nth next match." (interactive (eshell-regexp-arg "Previous input matching (regexp): ")) (setq arg (eshell-search-arg arg)) + (if (> eshell-last-output-end (point)) + (error "Point not located after prompt")) (let ((pos (eshell-previous-matching-input-string-position regexp arg))) ;; Has a match been found? (if (null pos) @@ -844,7 +845,7 @@ If N is negative, find the next or Nth next match." (setq eshell-history-index pos) (unless (minibuffer-window-active-p (selected-window)) (message "History item: %d" (- (ring-length eshell-history-ring) pos))) - ;; Can't use kill-region as it sets this-command + ;; Can't use kill-region as it sets this-command (delete-region eshell-last-output-end (point)) (insert-and-inherit (eshell-get-history pos))))) @@ -996,5 +997,4 @@ If N is negative, search backwards for the -Nth previous match." ;; generated-autoload-file: "esh-groups.el" ;; End: -;; arch-tag: 1a847333-f864-4b96-9acd-b549d620b6c6 ;;; em-hist.el ends here diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el index 84af53efe58..7714629f2fa 100644 --- a/lisp/eshell/em-ls.el +++ b/lisp/eshell/em-ls.el @@ -1,7 +1,6 @@ ;;; em-ls.el --- implementation of ls in Lisp -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> diff --git a/lisp/eshell/em-pred.el b/lisp/eshell/em-pred.el index 2b5cb1a0dc4..33085c067fd 100644 --- a/lisp/eshell/em-pred.el +++ b/lisp/eshell/em-pred.el @@ -1,7 +1,6 @@ ;;; em-pred.el --- argument predicates and modifiers (ala zsh) -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> diff --git a/lisp/eshell/em-prompt.el b/lisp/eshell/em-prompt.el index 29e1ace26b1..448d2cdf303 100644 --- a/lisp/eshell/em-prompt.el +++ b/lisp/eshell/em-prompt.el @@ -1,7 +1,6 @@ ;;; em-prompt.el --- command prompts -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> @@ -177,5 +176,4 @@ If this takes us past the end of the current line, don't skip at all." ;; generated-autoload-file: "esh-groups.el" ;; End: -;; arch-tag: 01c1574b-ce70-4e89-bc38-e6619f61e208 ;;; em-prompt.el ends here diff --git a/lisp/eshell/em-rebind.el b/lisp/eshell/em-rebind.el index 9b208d64803..6def23e1b71 100644 --- a/lisp/eshell/em-rebind.el +++ b/lisp/eshell/em-rebind.el @@ -1,7 +1,6 @@ ;;; em-rebind.el --- rebind keys when point is at current input -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> @@ -91,7 +90,6 @@ This is default behavior of shells like bash." '(beginning-of-line-text beginning-of-line move-to-column - move-to-column-force move-to-left-margin move-to-tab-stop forward-char @@ -247,5 +245,4 @@ input." ;; generated-autoload-file: "esh-groups.el" ;; End: -;; arch-tag: 76d84f12-cc56-4d67-9b7d-c6b44ad20530 ;;; em-rebind.el ends here diff --git a/lisp/eshell/em-script.el b/lisp/eshell/em-script.el index 21a5d804073..ed4ad1c0712 100644 --- a/lisp/eshell/em-script.el +++ b/lisp/eshell/em-script.el @@ -1,7 +1,6 @@ ;;; em-script.el --- Eshell script files -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> @@ -142,5 +141,4 @@ environment, binding ARGS to $1, $2, etc.") ;; generated-autoload-file: "esh-groups.el" ;; End: -;; arch-tag: a346439d-5ba8-4faf-ac2b-3aacfeaa4647 ;;; em-script.el ends here diff --git a/lisp/eshell/em-smart.el b/lisp/eshell/em-smart.el index afe3cf826b1..2c54930e439 100644 --- a/lisp/eshell/em-smart.el +++ b/lisp/eshell/em-smart.el @@ -1,7 +1,6 @@ ;;; em-smart.el --- smart display of output -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> @@ -327,5 +326,4 @@ and the end of the buffer are still visible." ;; generated-autoload-file: "esh-groups.el" ;; End: -;; arch-tag: 8c0112c7-379c-4d54-9a1c-204d68786a4b ;;; em-smart.el ends here diff --git a/lisp/eshell/em-term.el b/lisp/eshell/em-term.el index bd27d9f262e..be394ba5b22 100644 --- a/lisp/eshell/em-term.el +++ b/lisp/eshell/em-term.el @@ -1,7 +1,6 @@ ;;; em-term.el --- running visual commands -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> @@ -267,5 +266,4 @@ allowed." ;; generated-autoload-file: "esh-groups.el" ;; End: -;; arch-tag: ab7c8fe4-3101-4257-925b-1354c6b2fe9d ;;; em-term.el ends here diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el index d4f62415084..dc5650d240e 100644 --- a/lisp/eshell/em-unix.el +++ b/lisp/eshell/em-unix.el @@ -1,7 +1,6 @@ ;;; em-unix.el --- UNIX command aliases -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> diff --git a/lisp/eshell/em-xtra.el b/lisp/eshell/em-xtra.el index 6f49bf4e0f6..50bda108e95 100644 --- a/lisp/eshell/em-xtra.el +++ b/lisp/eshell/em-xtra.el @@ -1,7 +1,6 @@ ;;; em-xtra.el --- extra alias functions -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> @@ -123,5 +122,4 @@ naturally accessible within Emacs." ;; generated-autoload-file: "esh-groups.el" ;; End: -;; arch-tag: f944cfda-a118-470c-a0d6-b41a3a5c99c7 ;;; em-xtra.el ends here diff --git a/lisp/eshell/esh-arg.el b/lisp/eshell/esh-arg.el index e6d73acd434..f42440ae4ec 100644 --- a/lisp/eshell/esh-arg.el +++ b/lisp/eshell/esh-arg.el @@ -1,7 +1,6 @@ ;;; esh-arg.el --- argument processing -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> @@ -391,5 +390,4 @@ special character that is not itself a backslash." (char-to-string (char-after))))) (goto-char end))))))) -;; arch-tag: 7f593a2b-8fc1-4def-8f84-8f51ed0198d6 ;;; esh-arg.el ends here diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el index a12d8fb7f3b..0567beb9a53 100644 --- a/lisp/eshell/esh-cmd.el +++ b/lisp/eshell/esh-cmd.el @@ -1,7 +1,6 @@ ;;; esh-cmd.el --- command invocation -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> @@ -1434,5 +1433,4 @@ messages, and errors." (provide 'esh-cmd) -;; arch-tag: 8e4f3867-a0c5-441f-96ba-ddd142d94366 ;;; esh-cmd.el ends here diff --git a/lisp/eshell/esh-ext.el b/lisp/eshell/esh-ext.el index 8a3f86a3997..f0b9a5eb083 100644 --- a/lisp/eshell/esh-ext.el +++ b/lisp/eshell/esh-ext.el @@ -1,7 +1,6 @@ ;;; esh-ext.el --- commands external to Eshell -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> @@ -306,5 +305,4 @@ line of the form #!<interp>." (cdr interp))))) (or interp (list fullname))))))) -;; arch-tag: 178d4064-7e60-4745-b81f-bab5d8d7c40f ;;; esh-ext.el ends here diff --git a/lisp/eshell/esh-io.el b/lisp/eshell/esh-io.el index 53b6fd2163e..ef8966f1d7d 100644 --- a/lisp/eshell/esh-io.el +++ b/lisp/eshell/esh-io.el @@ -1,7 +1,6 @@ ;;; esh-io.el --- I/O management -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> @@ -516,5 +515,4 @@ Returns what was actually sent, or nil if nothing was sent." (eshell-output-object-to-target object (car target)) (setq target (cdr target)))))) -;; arch-tag: 9ca2080f-d5e0-4b26-aa0b-d59194a905a2 ;;; esh-io.el ends here diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el index 4477f138478..3735ee35fd5 100644 --- a/lisp/eshell/esh-mode.el +++ b/lisp/eshell/esh-mode.el @@ -1,7 +1,6 @@ ;;; esh-mode.el --- user interface -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> @@ -1083,5 +1082,4 @@ This function could be in the list `eshell-output-filter-functions'." (custom-add-option 'eshell-output-filter-functions 'eshell-handle-ansi-color) -;; arch-tag: ec65bc2b-da14-4547-81d3-a32af3a4dc57 ;;; esh-mode.el ends here diff --git a/lisp/eshell/esh-module.el b/lisp/eshell/esh-module.el index cf66f626485..5a62c71355c 100644 --- a/lisp/eshell/esh-module.el +++ b/lisp/eshell/esh-module.el @@ -1,7 +1,6 @@ ;;; esh-module.el --- Eshell modules -;; Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2000, 2002-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> ;; Keywords: processes @@ -100,5 +99,4 @@ customization group. Example: `eshell-cmpl' for that module." (unload-feature module) (message "Unloading %s...done" (symbol-name module)))))) -;; arch-tag: 97a3fa16-9d08-40e6-bc2c-36bd70986507 ;;; esh-module.el ends here diff --git a/lisp/eshell/esh-opt.el b/lisp/eshell/esh-opt.el index 7662217237a..d7162406879 100644 --- a/lisp/eshell/esh-opt.el +++ b/lisp/eshell/esh-opt.el @@ -1,7 +1,6 @@ ;;; esh-opt.el --- command options processing -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el index ccc36ed9949..f697a400556 100644 --- a/lisp/eshell/esh-proc.el +++ b/lisp/eshell/esh-proc.el @@ -1,7 +1,6 @@ ;;; esh-proc.el --- process management -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> @@ -527,5 +526,4 @@ See the variable `eshell-kill-processes-on-exit'." (eshell-send-input nil nil t) (eshell-process-interact 'process-send-eof)) -;; arch-tag: ac477a3e-ee4d-4b44-8ec6-212010e607bb ;;; esh-proc.el ends here diff --git a/lisp/eshell/esh-test.el b/lisp/eshell/esh-test.el index 50d0a8e861c..f5c55dd8ae7 100644 --- a/lisp/eshell/esh-test.el +++ b/lisp/eshell/esh-test.el @@ -1,7 +1,6 @@ ;;; esh-test.el --- Eshell test suite -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el index 0a2ebba528f..2de147acb00 100644 --- a/lisp/eshell/esh-util.el +++ b/lisp/eshell/esh-util.el @@ -1,7 +1,6 @@ ;;; esh-util.el --- general utilities -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el index f76d1de3c8d..4c42b305ec2 100644 --- a/lisp/eshell/esh-var.el +++ b/lisp/eshell/esh-var.el @@ -1,7 +1,6 @@ ;;; esh-var.el --- handling of variables -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> @@ -653,5 +652,4 @@ For example, to retrieve the second element of a user's record in (setq pcomplete-stub (substring arg pos)) (throw 'pcomplete-completions (pcomplete-entries))))) -;; arch-tag: 393654fe-bdad-4f27-9a10-b1472ded14cf ;;; esh-var.el ends here diff --git a/lisp/eshell/eshell.el b/lisp/eshell/eshell.el index 89ec3ab9c60..7690a102a9b 100644 --- a/lisp/eshell/eshell.el +++ b/lisp/eshell/eshell.el @@ -1,7 +1,6 @@ ;;; eshell.el --- the Emacs command shell -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> ;; Version: 2.4.2 @@ -285,7 +284,8 @@ shells such as bash, zsh, rc, 4dos." "`eshell-buffer-name' is a member of `same-window-buffer-names'" (member eshell-buffer-name same-window-buffer-names)) -(defcustom eshell-directory-name (convert-standard-filename "~/.eshell/") +(defcustom eshell-directory-name + (locate-user-emacs-file "eshell/" ".eshell/") "The directory where Eshell control files should be kept." :type 'directory :group 'eshell) @@ -490,5 +490,4 @@ Emacs." (provide 'eshell) -;; arch-tag: 9d4d5214-0e4e-4e02-b349-39add640d63f ;;; eshell.el ends here diff --git a/lisp/expand.el b/lisp/expand.el index 14bc210232c..ae68c00c894 100644 --- a/lisp/expand.el +++ b/lisp/expand.el @@ -1,7 +1,6 @@ ;;; expand.el --- make abbreviations more usable -;; Copyright (C) 1995, 1996, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995-1996, 2001-2011 Free Software Foundation, Inc. ;; Author: Frederic Lepied <Frederic.Lepied@sugix.frmug.org> ;; Maintainer: Frederic Lepied <Frederic.Lepied@sugix.frmug.org> @@ -504,5 +503,4 @@ This is used only in conjunction with `expand-add-abbrevs'." ;; run load hooks (run-hooks 'expand-load-hook) -;; arch-tag: fee53e9e-30e3-4ef3-b191-9785e1f8e885 ;;; expand.el ends here diff --git a/lisp/ezimage.el b/lisp/ezimage.el index b77def76180..c0ba2474940 100644 --- a/lisp/ezimage.el +++ b/lisp/ezimage.el @@ -1,7 +1,6 @@ ;;; ezimage --- Generalized Image management -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: file, tags, tools @@ -350,5 +349,4 @@ See `ezimage-expand-image-button-alist' for details." (provide 'ezimage) -;; arch-tag: d4ea2d93-3c7a-4cb3-b5a6-c1b9178183aa ;;; sb-image.el ends here diff --git a/lisp/face-remap.el b/lisp/face-remap.el index f7f469b0ccc..9e5ab58636b 100644 --- a/lisp/face-remap.el +++ b/lisp/face-remap.el @@ -1,6 +1,6 @@ ;;; face-remap.el --- Functions for managing `face-remapping-alist' ;; -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; ;; Author: Miles Bader <miles@gnu.org> ;; Keywords: faces, face remapping, display, user commands @@ -423,5 +423,4 @@ Besides the choice of face, it is the same as `buffer-face-mode'." (provide 'face-remap) -;; arch-tag: 5c5f034b-8d58-4967-82bd-d61fd364e686 ;;; face-remap.el ends here diff --git a/lisp/facemenu.el b/lisp/facemenu.el index f2a7958d93b..e76e920a9f0 100644 --- a/lisp/facemenu.el +++ b/lisp/facemenu.el @@ -1,7 +1,6 @@ ;;; facemenu.el --- create a face menu for interactively adding fonts to text -;; Copyright (C) 1994, 1995, 1996, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994-1996, 2001-2011 Free Software Foundation, Inc. ;; Author: Boris Goldowsky <boris@gnu.org> ;; Keywords: faces @@ -910,5 +909,4 @@ Returns the non-nil value it found, or nil if all were nil." (provide 'facemenu) -;; arch-tag: 85f6d02b-9085-420e-b651-0678f0e9c7eb ;;; facemenu.el ends here diff --git a/lisp/faces.el b/lisp/faces.el index ba8535aac4f..a9d26de604b 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -1,8 +1,6 @@ ;;; faces.el --- Lisp faces -;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -;; 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1992-1996, 1998-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: internal diff --git a/lisp/ffap.el b/lisp/ffap.el index 23caae74962..97105ed422b 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -1,7 +1,6 @@ ;;; ffap.el --- find file (or url) at point -;; Copyright (C) 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995-1997, 2000-2011 Free Software Foundation, Inc. ;; Author: Michelangelo Grigni <mic@mathcs.emory.edu> ;; Maintainer: FSF @@ -1960,5 +1959,4 @@ Of course if you do not like these bindings, just roll your own!") (provide 'ffap) -;; arch-tag: 9dd3e88a-5dec-4607-bd57-60ae9ede8ebc ;;; ffap.el ends here diff --git a/lisp/filecache.el b/lisp/filecache.el index 51b7ce59b1e..ef41fb41907 100644 --- a/lisp/filecache.el +++ b/lisp/filecache.el @@ -1,7 +1,6 @@ ;;; filecache.el --- find files using a pre-loaded cache -;; Copyright (C) 1996, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996, 2000-2011 Free Software Foundation, Inc. ;; Author: Peter Breton <pbreton@cs.umb.edu> ;; Created: Sun Nov 10 1996 diff --git a/lisp/files-x.el b/lisp/files-x.el index 222141bd357..a3cb5331e67 100644 --- a/lisp/files-x.el +++ b/lisp/files-x.el @@ -1,6 +1,6 @@ ;;; files-x.el --- extended file handling commands -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Juri Linkov <juri@jurta.org> ;; Maintainer: FSF @@ -461,5 +461,4 @@ from the MODE alist ignoring the input argument VALUE." (provide 'files-x) -;; arch-tag: 949d263c-30a8-4b49-af26-cda97c7c5477 ;;; files-x.el ends here diff --git a/lisp/files.el b/lisp/files.el index 460b005b9ef..7abf5361bb4 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1,8 +1,6 @@ ;;; files.el --- file input and output commands for Emacs -;; Copyright (C) 1985, 1986, 1987, 1992, 1993, 1994, 1995, 1996, -;; 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985-1987, 1992-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Package: emacs @@ -57,7 +55,10 @@ when it has unsaved changes." A list of elements of the form (FROM . TO), each meaning to replace FROM with TO when it appears in a directory name. This replacement is done when setting up the default directory of a newly visited file. -*Every* FROM string should start with \"\\\\`\". + +FROM is matched against directory names anchored at the first +character, so it should start with a \"\\\\`\", or, if directory +names cannot have embedded newlines, with a \"^\". FROM and TO should be equivalent names, which refer to the same directory. Do not use `~' in the TO strings; @@ -1556,7 +1557,7 @@ killed." (error "Aborted")) (when (and (buffer-modified-p) buffer-file-name) (if (yes-or-no-p (format "Buffer %s is modified; save it first? " - (buffer-name))) + (buffer-name))) (save-buffer) (unless (yes-or-no-p "Kill and replace the buffer without saving it? ") (error "Aborted")))) @@ -1758,12 +1759,11 @@ When nil, never request confirmation." "If file SIZE larger than `large-file-warning-threshold', allow user to abort. OP-TYPE specifies the file operation being performed (for message to user)." (when (and large-file-warning-threshold size - (> size large-file-warning-threshold) - (not (y-or-n-p - (format "File %s is large (%dMB), really %s? " - (file-name-nondirectory filename) - (/ size 1048576) op-type)))) - (error "Aborted"))) + (> size large-file-warning-threshold) + (not (y-or-n-p (format "File %s is large (%dMB), really %s? " + (file-name-nondirectory filename) + (/ size 1048576) op-type)))) + (error "Aborted"))) (defun find-file-noselect (filename &optional nowarn rawfile wildcards) "Read file FILENAME into a buffer and return the buffer. @@ -2337,6 +2337,7 @@ ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\|7Z\\)\\'" . archive-mode) ("\\.oak\\'" . scheme-mode) ("\\.sgml?\\'" . sgml-mode) ("\\.x[ms]l\\'" . xml-mode) + ("\\.dbk\\'" . xml-mode) ("\\.dtd\\'" . sgml-mode) ("\\.ds\\(ss\\)?l\\'" . dsssl-mode) ("\\.js\\'" . js-mode) ; javascript-mode would be better @@ -2371,7 +2372,7 @@ ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\|7Z\\)\\'" . archive-mode) ("\\.\\(diffs?\\|patch\\|rej\\)\\'" . diff-mode) ("\\.\\(dif\\|pat\\)\\'" . diff-mode) ; for MSDOG ("\\.[eE]?[pP][sS]\\'" . ps-mode) - ("\\.\\(?:PDF\\|DVI\\|pdf\\|dvi\\)\\'" . doc-view-mode) + ("\\.\\(?:PDF\\|DVI\\|OD[FGPST]\\|DOCX?\\|XLSX?\\|PPTX?\\|pdf\\|dvi\\|od[fgpst]\\|docx?\\|xlsx?\\|pptx?\\)\\'" . doc-view-mode-maybe) ("configure\\.\\(ac\\|in\\)\\'" . autoconf-mode) ("\\.s\\(v\\|iv\\|ieve\\)\\'" . sieve-mode) ("BROWSE\\'" . ebrowse-tree-mode) @@ -2875,6 +2876,7 @@ is a file-local variable (a symbol) and VALUE is the value specified. The actual value in the buffer may differ from VALUE, if it is changed by the major or minor modes, or by the user.") (make-variable-buffer-local 'file-local-variables-alist) +(put 'file-local-variables-alist 'permanent-local t) (defvar dir-local-variables-alist nil "Alist of directory-local variable settings in the current buffer. @@ -2904,91 +2906,80 @@ DIR-NAME is a directory name if these settings come from directory-local variables, or nil otherwise." (if noninteractive nil - (let ((name (or dir-name - (if buffer-file-name - (file-name-nondirectory buffer-file-name) - (concat "buffer " (buffer-name))))) - (offer-save (and (eq enable-local-variables t) unsafe-vars)) - prompt char) - (save-window-excursion - (let ((buf (get-buffer-create "*Local Variables*"))) - (pop-to-buffer buf) - (set (make-local-variable 'cursor-type) nil) - (erase-buffer) - (if unsafe-vars - (insert "The local variables list in " name - "\ncontains values that may not be safe (*)" - (if risky-vars - ", and variables that are risky (**)." - ".")) - (if risky-vars - (insert "The local variables list in " name - "\ncontains variables that are risky (**).") - (insert "A local variables list is specified in " name "."))) - (insert "\n\nDo you want to apply it? You can type + (save-window-excursion + (let* ((name (or dir-name + (if buffer-file-name + (file-name-nondirectory buffer-file-name) + (concat "buffer " (buffer-name))))) + (offer-save (and (eq enable-local-variables t) + unsafe-vars)) + (exit-chars + (if offer-save '(?! ?y ?n ?\s ?\C-g) '(?y ?n ?\s ?\C-g))) + (buf (pop-to-buffer "*Local Variables*")) + prompt char) + (set (make-local-variable 'cursor-type) nil) + (erase-buffer) + (cond + (unsafe-vars + (insert "The local variables list in " name + "\ncontains values that may not be safe (*)" + (if risky-vars + ", and variables that are risky (**)." + "."))) + (risky-vars + (insert "The local variables list in " name + "\ncontains variables that are risky (**).")) + (t + (insert "A local variables list is specified in " name "."))) + (insert "\n\nDo you want to apply it? You can type y -- to apply the local variables list. n -- to ignore the local variables list.") - (if offer-save - (insert " + (if offer-save + (insert " ! -- to apply the local variables list, and permanently mark these values (*) as safe (in the future, they will be set automatically.)\n\n") - (insert "\n\n")) - (dolist (elt all-vars) - (cond ((member elt unsafe-vars) - (insert " * ")) - ((member elt risky-vars) - (insert " ** ")) - (t - (insert " "))) - (princ (car elt) buf) - (insert " : ") - ;; Make strings with embedded whitespace easier to read. - (let ((print-escape-newlines t)) - (prin1 (cdr elt) buf)) - (insert "\n")) - (setq prompt - (format "Please type %s%s: " - (if offer-save "y, n, or !" "y or n") - (if (< (line-number-at-pos) (window-body-height)) - "" - ", or C-v to scroll"))) - (goto-char (point-min)) - (let ((cursor-in-echo-area t) - (executing-kbd-macro executing-kbd-macro) - (exit-chars - (if offer-save '(?! ?y ?n ?\s ?\C-g) '(?y ?n ?\s ?\C-g))) - done) - (while (not done) - (message "%s" prompt) - (setq char (read-event)) - (if (numberp char) - (cond ((eq char ?\C-v) - (condition-case nil - (scroll-up) - (error (goto-char (point-min))))) - ;; read-event returns -1 if we are in a kbd - ;; macro and there are no more events in the - ;; macro. In that case, attempt to get an - ;; event interactively. - ((and executing-kbd-macro (= char -1)) - (setq executing-kbd-macro nil)) - (t (setq done (memq (downcase char) exit-chars))))))) - (setq char (downcase char)) - (when (and offer-save (= char ?!) unsafe-vars) - (dolist (elt unsafe-vars) - (add-to-list 'safe-local-variable-values elt)) - ;; When this is called from desktop-restore-file-buffer, - ;; coding-system-for-read may be non-nil. Reset it before - ;; writing to .emacs. - (if (or custom-file user-init-file) - (let ((coding-system-for-read nil)) - (customize-save-variable - 'safe-local-variable-values - safe-local-variable-values)))) - (kill-buffer buf) - (or (= char ?!) - (= char ?\s) - (= char ?y))))))) + (insert "\n\n")) + (dolist (elt all-vars) + (cond ((member elt unsafe-vars) + (insert " * ")) + ((member elt risky-vars) + (insert " ** ")) + (t + (insert " "))) + (princ (car elt) buf) + (insert " : ") + ;; Make strings with embedded whitespace easier to read. + (let ((print-escape-newlines t)) + (prin1 (cdr elt) buf)) + (insert "\n")) + (setq prompt + (format "Please type %s%s: " + (if offer-save "y, n, or !" "y or n") + (if (< (line-number-at-pos) (window-body-height)) + "" + (push ?\C-v exit-chars) + ", or C-v to scroll"))) + (goto-char (point-min)) + (while (null char) + (setq char (read-char-choice prompt exit-chars t)) + (when (eq char ?\C-v) + (condition-case nil + (scroll-up) + (error (goto-char (point-min)))) + (setq char nil))) + (kill-buffer buf) + (when (and offer-save (= char ?!) unsafe-vars) + (dolist (elt unsafe-vars) + (add-to-list 'safe-local-variable-values elt)) + ;; When this is called from desktop-restore-file-buffer, + ;; coding-system-for-read may be non-nil. Reset it before + ;; writing to .emacs. + (if (or custom-file user-init-file) + (let ((coding-system-for-read nil)) + (customize-save-variable + 'safe-local-variable-values + safe-local-variable-values)))) + (memq char '(?! ?\s ?y)))))) (defun hack-local-variables-prop-line (&optional mode-only) "Return local variables specified in the -*- line. @@ -3592,7 +3583,7 @@ the old visited file has been renamed to the new name FILENAME." (and buffer (not (eq buffer (current-buffer))) (not no-query) (not (y-or-n-p (format "A buffer is visiting %s; proceed? " - filename))) + filename))) (error "Aborted"))) (or (equal filename buffer-file-name) (progn @@ -3785,10 +3776,9 @@ BACKUPNAME is the backup file name, which is the old file renamed." (rename-file real-file-name backupname t) (setq setmodes (list modes context backupname))) (file-error - ;; If trouble writing the backup, write it in ~. - (setq backupname (expand-file-name - (convert-standard-filename - "~/%backup%~"))) + ;; If trouble writing the backup, write it in + ;; .emacs.d/%backup%. + (setq backupname (locate-user-emacs-file "%backup%~")) (message "Cannot write backup file; backing up in %s" backupname) (sleep-for 1) @@ -4167,11 +4157,29 @@ on a DOS/Windows machine, it returns FILENAME in expanded form." (dremote (file-remote-p directory))) (if ;; Conditions for separate trees (or - ;; Test for different drives on DOS/Windows + ;; Test for different filesystems on DOS/Windows (and ;; Should `cygwin' really be included here? --stef (memq system-type '(ms-dos cygwin windows-nt)) - (not (eq t (compare-strings filename 0 2 directory 0 2)))) + (or + ;; Test for different drive letters + (not (eq t (compare-strings filename 0 2 directory 0 2))) + ;; Test for UNCs on different servers + (not (eq t (compare-strings + (progn + (if (string-match "\\`//\\([^:/]+\\)/" filename) + (match-string 1 filename) + ;; Windows file names cannot have ? in + ;; them, so use that to detect when + ;; neither FILENAME nor DIRECTORY is a + ;; UNC. + "?")) + 0 nil + (progn + (if (string-match "\\`//\\([^:/]+\\)/" directory) + (match-string 1 directory) + "?")) + 0 nil t))))) ;; Test for different remote file system identification (not (equal fremote dremote))) filename @@ -4328,8 +4336,9 @@ Before and after saving the buffer, this function runs (or (verify-visited-file-modtime (current-buffer)) (not (file-exists-p buffer-file-name)) (yes-or-no-p - (format "%s has changed since visited or saved. Save anyway? " - (file-name-nondirectory buffer-file-name))) + (format + "%s has changed since visited or saved. Save anyway? " + (file-name-nondirectory buffer-file-name))) (error "Save not confirmed")) (save-restriction (widen) @@ -4406,9 +4415,10 @@ Before and after saving the buffer, this function runs (if (not (file-exists-p buffer-file-name)) (error "Directory %s write-protected" dir) (if (yes-or-no-p - (format "File %s is write-protected; try to save anyway? " - (file-name-nondirectory - buffer-file-name))) + (format + "File %s is write-protected; try to save anyway? " + (file-name-nondirectory + buffer-file-name))) (setq tempsetmodes t) (error "Attempt to save to a file which you aren't allowed to write")))))) (or buffer-backed-up @@ -4599,8 +4609,7 @@ change the additional actions you can take on files." (progn (if (or arg (eq save-abbrevs 'silently) - (y-or-n-p (format "Save abbrevs in %s? " - abbrev-file-name))) + (y-or-n-p (format "Save abbrevs in %s? " abbrev-file-name))) (write-abbrev-file nil)) ;; Don't keep bothering user if he says no. (setq abbrevs-changed nil) @@ -5216,10 +5225,10 @@ This command is used in the special Dired buffer created by (defun kill-buffer-ask (buffer) "Kill BUFFER if confirmed." - (when (yes-or-no-p - (format "Buffer %s %s. Kill? " (buffer-name buffer) - (if (buffer-modified-p buffer) - "HAS BEEN EDITED" "is unmodified"))) + (when (yes-or-no-p (format "Buffer %s %s. Kill? " + (buffer-name buffer) + (if (buffer-modified-p buffer) + "HAS BEEN EDITED" "is unmodified"))) (kill-buffer buffer))) (defun kill-some-buffers (&optional list) @@ -6107,8 +6116,7 @@ only these files will be asked to be saved." (substitute-in-file-name identity) ;; `add' means add "/:" to the result. (file-truename add 0) - ;; `quote' means add "/:" to buffer-file-name. - (insert-file-contents quote 0) + (insert-file-contents insert-file-contents 0) ;; `unquote-then-quote' means set buffer-file-name ;; temporarily to unquoted filename. (verify-visited-file-modtime unquote-then-quote) @@ -6139,20 +6147,18 @@ only these files will be asked to be saved." "/" (substring (car pair) 2))))) (setq file-arg-indices (cdr file-arg-indices)))) - (cond ((eq method 'identity) - (car arguments)) - ((eq method 'add) - (concat "/:" (apply operation arguments))) - ((eq method 'quote) - (unwind-protect + (case method + (identity (car arguments)) + (add (concat "/:" (apply operation arguments))) + (insert-file-contents + (let ((visit (nth 1 arguments))) + (prog1 (apply operation arguments) - (setq buffer-file-name (concat "/:" buffer-file-name)))) - ((eq method 'unquote-then-quote) - (let (res) - (setq buffer-file-name (substring buffer-file-name 2)) - (setq res (apply operation arguments)) - (setq buffer-file-name (concat "/:" buffer-file-name)) - res)) + (when (and visit buffer-file-name) + (setq buffer-file-name (concat "/:" buffer-file-name)))))) + (unquote-then-quote + (let ((buffer-file-name (substring buffer-file-name 2))) + (apply operation arguments))) (t (apply operation arguments))))) diff --git a/lisp/filesets.el b/lisp/filesets.el index d530269bae3..269ee331fb2 100644 --- a/lisp/filesets.el +++ b/lisp/filesets.el @@ -1,7 +1,6 @@ ;;; filesets.el --- handle group of files -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Author: Thomas Link <sanobast-emacs@yahoo.de> ;; Maintainer: FSF @@ -2534,5 +2533,4 @@ Set up hooks, load the cache file -- if existing -- and build the menu." ;; sentence-end-double-space:t ;; End: -;; arch-tag: 2c03f85f-c3df-4cec-b0a3-b46fd5592d70 ;;; filesets.el ends here diff --git a/lisp/find-cmd.el b/lisp/find-cmd.el index 11b64b04717..8b0c1eb522a 100644 --- a/lisp/find-cmd.el +++ b/lisp/find-cmd.el @@ -1,6 +1,6 @@ ;;; find-cmd.el --- Build a valid find(1) command with sexps -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Philip Jackson <phil@shellarchive.co.uk> ;; Version: 0.6 @@ -240,5 +240,4 @@ them into valid switches. The result is -and(ed) together." (provide 'find-cmd) -;; arch-tag: 9687fd9e-4e90-4022-864a-f904526e2046 ;;; find-cmd.el ends here diff --git a/lisp/find-dired.el b/lisp/find-dired.el index 0c8229c8f7a..144d6633be4 100644 --- a/lisp/find-dired.el +++ b/lisp/find-dired.el @@ -1,7 +1,6 @@ ;;; find-dired.el --- run a `find' command and dired the output -;; Copyright (C) 1992, 1994, 1995, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1992, 1994-1995, 2000-2011 Free Software Foundation, Inc. ;; Author: Roland McGrath <roland@gnu.org>, ;; Sebastian Kremer <sk@thp.uni-koeln.de> @@ -312,5 +311,4 @@ Thus ARG can also contain additional grep options." (provide 'find-dired) -;; arch-tag: 8edece95-af00-4221-bc74-a4bd2f75f9b0 ;;; find-dired.el ends here diff --git a/lisp/find-file.el b/lisp/find-file.el index 80a77182772..7ace6ce01dc 100644 --- a/lisp/find-file.el +++ b/lisp/find-file.el @@ -4,8 +4,7 @@ ;; Maintainer: FSF ;; Keywords: c, matching, tools -;; Copyright (C) 1994, 1995, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994-1995, 2001-2011 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. @@ -968,5 +967,4 @@ That name was previously determined by `ff-which-function-are-we-in'." (provide 'find-file) -;; arch-tag: 5a2fc49e-3b0a-4708-9acf-fb14e471a97a ;;; find-file.el ends here diff --git a/lisp/find-lisp.el b/lisp/find-lisp.el index 1e1b0d0cb79..cacfd57e9fb 100644 --- a/lisp/find-lisp.el +++ b/lisp/find-lisp.el @@ -4,8 +4,7 @@ ;; Created: Fri Mar 26 1999 ;; Keywords: unix -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. @@ -356,5 +355,4 @@ It is a function which takes two arguments, the directory and its parent." (provide 'find-lisp) -;; arch-tag: a711374c-f12a-46f6-aa18-ba7d77b9602a ;;; find-lisp.el ends here diff --git a/lisp/finder.el b/lisp/finder.el index 655ad5383b0..784de0a4d4c 100644 --- a/lisp/finder.el +++ b/lisp/finder.el @@ -1,7 +1,6 @@ ;;; finder.el --- topic & keyword-based code finder -;; Copyright (C) 1992, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1992, 1997-1999, 2001-2011 Free Software Foundation, Inc. ;; Author: Eric S. Raymond <esr@snark.thyrsus.com> ;; Created: 16 Jun 1992 @@ -428,5 +427,4 @@ Delete the window and kill all Finder-related buffers." (provide 'finder) -;; arch-tag: ec85ff49-8cb8-41f5-a63f-9131d53ce2c5 ;;; finder.el ends here diff --git a/lisp/flow-ctrl.el b/lisp/flow-ctrl.el index 0225880e954..a025f0a184c 100644 --- a/lisp/flow-ctrl.el +++ b/lisp/flow-ctrl.el @@ -1,7 +1,6 @@ ;;; flow-ctrl.el --- help for lusers on cu(1) or ttys with wired-in ^S/^Q flow control -;; Copyright (C) 1990, 1991, 1994, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1991, 1994, 2001-2011 Free Software Foundation, Inc. ;; Author: Kevin Gallagher ;; Maintainer: FSF @@ -122,5 +121,4 @@ to get the effect of a C-q." (provide 'flow-ctrl) -;; arch-tag: 0eb7b19e-0d93-4e0b-9ea2-72b574076a56 ;;; flow-ctrl.el ends here diff --git a/lisp/foldout.el b/lisp/foldout.el index 4c7ef29a072..b0eaf753d60 100644 --- a/lisp/foldout.el +++ b/lisp/foldout.el @@ -1,7 +1,6 @@ ;;; foldout.el --- folding extensions for outline-mode and outline-minor-mode -;; Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994, 2001-2011 Free Software Foundation, Inc. ;; Author: Kevin Broadey <KevinB@bartley.demon.co.uk> ;; Maintainer: FSF @@ -565,5 +564,4 @@ Valid modifiers are shift, control, meta, alt, hyper and super.") (provide 'foldout) -;; arch-tag: 19d095a2-1f09-42a7-a5ac-e2a3078cfe95 ;;; foldout.el ends here diff --git a/lisp/follow.el b/lisp/follow.el index fa8d3f8a814..7e6d4e7ee35 100644 --- a/lisp/follow.el +++ b/lisp/follow.el @@ -1,7 +1,6 @@ ;;; follow.el --- synchronize windows showing the same buffer -;; Copyright (C) 1995, 1996, 1997, 1999, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995-1997, 1999, 2001-2011 Free Software Foundation, Inc. ;; Author: Anders Lindgren <andersl@andersl.com> ;; Maintainer: FSF (Anders' email bounces, Sep 2005) @@ -2122,5 +2121,4 @@ This prevents `mouse-drag-region' from messing things up." ;; | save it". -- Douglas Adams, "Last Chance to See" | ;; \------------------------------------------------------------------------/ -;; arch-tag: 7b16bb1a-808c-4991-a8cc-66d3822936d0 ;;; follow.el ends here diff --git a/lisp/font-core.el b/lisp/font-core.el index 5f8af5a5215..fcaaf33b718 100644 --- a/lisp/font-core.el +++ b/lisp/font-core.el @@ -1,8 +1,6 @@ ;;; font-core.el --- Core interface to font-lock -;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -;; 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1992-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: languages, faces diff --git a/lisp/font-lock.el b/lisp/font-lock.el index fe873297dc2..b7b617fcffe 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -1,8 +1,6 @@ ;;; font-lock.el --- Electric font lock mode -;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, -;; 2010 Free Software Foundation, Inc. +;; Copyright (C) 1992-2011 Free Software Foundation, Inc. ;; Author: Jamie Zawinski ;; Richard Stallman @@ -276,13 +274,14 @@ decoration for buffers in C++ mode, and level 1 decoration otherwise." (integer :tag "level" 1))))) :group 'font-lock) -(defcustom font-lock-verbose 0 +(defcustom font-lock-verbose nil "If non-nil, means show status messages for buffer fontification. If a number, only buffers greater than this size have fontification messages." :type '(choice (const :tag "never" nil) (other :tag "always" t) (integer :tag "size")) - :group 'font-lock) + :group 'font-lock + :version "24.1") ;; Originally these variable values were face names such as `bold' etc. diff --git a/lisp/format-spec.el b/lisp/format-spec.el index d177a43cc1f..68d57b73db1 100644 --- a/lisp/format-spec.el +++ b/lisp/format-spec.el @@ -1,7 +1,6 @@ ;;; format-spec.el --- functions for formatting arbitrary formatting strings -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: tools diff --git a/lisp/format.el b/lisp/format.el index 0436187d984..c5b48173e35 100644 --- a/lisp/format.el +++ b/lisp/format.el @@ -1,7 +1,7 @@ ;;; format.el --- read and save files in multiple formats -;; Copyright (C) 1994, 1995, 1997, 1999, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994-1995, 1997, 1999, 2001-2011 +;; Free Software Foundation, Inc. ;; Author: Boris Goldowsky <boris@gnu.org> ;; Package: emacs @@ -181,8 +181,7 @@ it should be a Lisp function. Decoding is done for the given BUFFER." ;; We should perhaps go via a temporary buffer and copy it ;; back, in case of errors. (if (and (zerop (save-window-excursion - (shell-command-on-region (point-min) (point-max) - method t t + (shell-command-on-region from to method t t error-buff))) ;; gzip gives zero exit status with bad args, for instance. (zerop (with-current-buffer error-buff @@ -1088,5 +1087,4 @@ OLD and NEW are the values." (provide 'format) -;; arch-tag: c387e9c7-a93d-47bf-89bc-8ca67e96755a ;;; format.el ends here diff --git a/lisp/forms-d2.el b/lisp/forms-d2.el index 98c0466740f..12cd5d7d570 100644 --- a/lisp/forms-d2.el +++ b/lisp/forms-d2.el @@ -1,7 +1,6 @@ ;;; forms-d2.el --- demo forms-mode -*- no-byte-compile: t -*- -;; Copyright (C) 1991, 1994, 1995, 1996, 1997, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1991, 1994-1997, 2001-2011 Free Software Foundation, Inc. ;; Author: Johan Vromans <jvromans@squirrel.nl> ;; Created: 1989 @@ -101,5 +100,4 @@ used to fill to the column." ;; That's all, folks! -;; arch-tag: 8e5d5dac-7abf-4722-ab5e-03eb749beaca ;;; forms-d2.el ends here diff --git a/lisp/forms-pass.el b/lisp/forms-pass.el index 431dca58786..b635c965cf0 100644 --- a/lisp/forms-pass.el +++ b/lisp/forms-pass.el @@ -30,5 +30,4 @@ "Shell: " 7 "\n")) -;; arch-tag: 74801012-1a2d-4173-b9e4-fcfa241e2305 ;;; forms-pass.el ends here diff --git a/lisp/forms.el b/lisp/forms.el index 50f7ac9f506..9ae824131ec 100644 --- a/lisp/forms.el +++ b/lisp/forms.el @@ -1,7 +1,6 @@ ;;; forms.el --- Forms mode: edit a file as a form to fill in -;; Copyright (C) 1991, 1994, 1995, 1996, 1997, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1991, 1994-1997, 2001-2011 Free Software Foundation, Inc. ;; Author: Johan Vromans <jvromans@squirrel.nl> @@ -2055,5 +2054,4 @@ Usage: (setq forms-number-of-fields (goto-char (point-max)) (insert ret))))) -;; arch-tag: 4a6695c7-d47a-4a21-809b-5cec7f8ec7a1 ;;; forms.el ends here diff --git a/lisp/frame.el b/lisp/frame.el index b133851b440..050bd49f458 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -1,7 +1,6 @@ ;;; frame.el --- multi-frame management independent of window systems -;; Copyright (C) 1993, 1994, 1996, 1997, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 1993-1994, 1996-1997, 2000-2011 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -1545,7 +1544,7 @@ cursor display. On a text-only terminal, this is not implemented." :init-value (not (or noninteractive no-blinking-cursor (eq system-type 'ms-dos) - (not (memq window-system '(x w32))))) + (not (memq window-system '(x w32 ns))))) :initialize 'custom-initialize-delay :group 'cursor :global t diff --git a/lisp/fringe.el b/lisp/fringe.el index 6f5f496e907..7d009b03e76 100644 --- a/lisp/fringe.el +++ b/lisp/fringe.el @@ -1,7 +1,6 @@ ;;; fringe.el --- fringe setup and control -*- coding: utf-8 -*- -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Author: Simon Josefsson <simon@josefsson.org> ;; Maintainer: FSF @@ -269,5 +268,4 @@ SIDE must be the symbol `left' or `right'." (provide 'fringe) -;; arch-tag: 6611ef60-0869-47ed-8b93-587ee7d3ff5d ;;; fringe.el ends here diff --git a/lisp/generic-x.el b/lisp/generic-x.el index 8c2e8b4bc99..e23af4dff78 100644 --- a/lisp/generic-x.el +++ b/lisp/generic-x.el @@ -1,7 +1,6 @@ ;;; generic-x.el --- A collection of generic modes -;; Copyright (C) 1997, 1998, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-1998, 2001-2011 Free Software Foundation, Inc. ;; Author: Peter Breton <pbreton@cs.umb.edu> ;; Created: Tue Oct 08 1996 @@ -1992,5 +1991,4 @@ like an INI file. You can add this hook to `find-file-hook'." (provide 'generic-x) -;; arch-tag: cde692a5-9ff6-4506-9999-c67999c2bdb5 ;;; generic-x.el ends here diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 2ff18436ed6..f9bcd902cd9 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,612 @@ +2011-01-31 Lars Ingebrigtsen <larsi@gnus.org> + + * gnus-art.el (article-transform-date): Rewrite to still work when + there are several rfc2822 parts. + (article-transform-date): Fix infinite recursion. + (article-date-ut): Replace infinitely many Date headers with a single + one when called interactively. + + * nnimap.el (nnimap-wait-for-response): Wait for results in a more + secure manner. + + * gnus-art.el (article-update-date-lapsed): Try to avoid having point + move around by not using save-window-excursion. It seems to work... + +2011-01-31 Katsumi Yamaoka <yamaoka@jpl.org> + + * gnus-art.el (article-make-date-line): Work for user-defined format. + +2011-01-31 Lars Ingebrigtsen <larsi@gnus.org> + + * nntp.el (nntp-retrieve-group-data-early) + (nntp-finish-retrieve-group-infos): Implement the asynchronous data + fetching functions. + + * gnus-start.el (gnus-read-active-for-groups): Read the active files + thoroughly for all backends that have no known groups. This should + allow new nnml methods to retrieve mail. + + * gnus-group.el (gnus-group-jump-to-group): Allow jumping to groups + that Gnus doesn't know exists again. + + * gnus-art.el (gnus-article-date-lapsed-new-header): Removed. + (gnus-treat-date-ut): Ditto. + (gnus-article-update-date-header): Renamed. + (gnus-treat-date-local): Removed. + (gnus-treat-date-english): Removed. + (gnus-treat-date-lapsed): Removed. + (gnus-treat-date-combined-lapsed): Removed. + (gnus-treat-date-original): Removed. + (gnus-treat-date-iso8601): Removed. + (gnus-treat-date-user-defined): Removed. + (gnus-article-date-headers): New variable to control all the date + header options. + (article-date-ut): Rewrite to allow using the new way to format date + headers(s). + +2011-01-30 Lars Ingebrigtsen <larsi@gnus.org> + + * nnmail.el (nnmail-article-group): Check for a direct fancy split + method. + (nnmail-article-group): A better test for fanciness. + + * nnimap.el (nnimap-request-head): Protect against not finding the + article by Message-ID. + +2011-01-29 Lars Ingebrigtsen <larsi@gnus.org> + + * gnus-art.el (article-update-date-lapsed): Try a better way to really + keep point at the "same place". + +2011-01-28 Lars Ingebrigtsen <larsi@gnus.org> + + * gnus-sum.el (gnus-select-newsgroup): Don't try to alter the active + data if the group is unactivated. + +2011-01-28 Julien Danjou <julien@danjou.info> + + * gnus-win.el: Remove dead function gnus-window-configuration-element. + (gnus-all-windows-visible-p): Remove old compatibility code. + (gnus-window-top-edge): Add docstring. + + * gnus-group.el (gnus-group-jump-to-group): Set must match to t. + +2011-01-28 Lars Ingebrigtsen <larsi@gnus.org> + + * gnus-int.el (gnus-request-marks): Call *-request-marks instead of the + older request-update-info. + + * gnus-art.el (article-make-date-line): Limit the length a bit more. + +2011-01-28 Daiki Ueno <ueno@unixuser.org> + + * mml2015.el (mml2015-epg-sign, mml2015-epg-encrypt): Give + mml2015-signers higher precedence over mml2015-sign-with-sender. + +2011-01-27 Lars Ingebrigtsen <larsi@gnus.org> + + * gnus-group.el (gnus-group-refresh-group): Refresh even non-visible + groups. This makes the nndraft:queue group pop up if it's not already + there. + + * gnus-sum.el (gnus-summary-read-group-1): Fix the "contains no + messages" logic, which was reversed. + + * gnus-art.el (article-update-date-lapsed): Ensure that point stays at + the "same place" even if point is on the line being replaced. + (article-update-date-lapsed): Allow updating both the combined lapsed + and the lapsed headers. + (article-update-date-lapsed): Skip past all the X-Sent/Date headers. + (article-make-date-line): Limit the number of segments dynamically to + avoid too-long lines. + +2011-01-27 Julien Danjou <julien@danjou.info> + + * mml2015.el (mml2015-epg-sign): Add and use mml2015-sign-with-sender. + (mml2015-epg-encrypt): Use mml2015-sign-with-sender. + +2011-01-27 Katsumi Yamaoka <yamaoka@jpl.org> + + * shr.el (shr-expand-newlines, shr-previous-newline-padding-width): + Use plist-get instead of the cl function getf. + +2011-01-27 Glenn Morris <rgm@gnu.org> + + * gnus-util.el (float-time): Get rid of compiler warning, again. + +2011-01-27 Lars Ingebrigtsen <larsi@gnus.org> + + * shr.el (shr-put-color): Special-case background colours: Do put them + at the blank parts at the front of the lines. + + * gnus-draft.el (gnus-draft-clear-marks): New function to be run as an + exit hook to nix out all data on readedness on group exit. + + * gnus-util.el (float-time): If float-time is bound, always use it on + all Emacsen. It's unclear why the subrp check was there. + (time-date): Require to make some autoload issues on XEmacs go away. + + * shr.el (shr-put-color): Don't do the box padding in tables, since + they're already padded. + +2011-01-26 Lars Ingebrigtsen <larsi@gnus.org> + + * gnus-art.el (gnus-article-next-page): When the last line of the + article is displayed, scroll down once more instead of going to the + next article at once. + (article-lapsed-string): Refactor out and allow specifying how many + segments you want. + (gnus-article-setup-buffer): Start updating the lapsed header directly. + (gnus-article-update-lapsed-header): New variable. + + * shr.el: Revert change that made headings use different-sized faces. + The Emacs display engine isn't advanced enough that, for instance, + tables can comfortably use differntly-sized faces. + +2011-01-25 Lars Ingebrigtsen <larsi@gnus.org> + + * nnimap.el (nnimap-open-connection-1): Store the actual stream type + used. + (nnimap-login): Prefer plain LOGIN if it's enabled (since it requires + fewer round trips than CRAM-MD5, and it's less likely to be buggy), and + we're using an encrypted connection. + + * proto-stream.el: Alter the interface functions to also return the + actual stream type used: network or tls. + +2011-01-25 Julien Danjou <julien@danjou.info> + + * mm-view.el (mm-display-shell-script-inline): Fix typo in docstring. + (mm-display-javascript-inline): New function. + + * mm-decode.el (mm-inline-media-tests): Add application/javascript + viewing function. + +2011-01-25 Katsumi Yamaoka <yamaoka@jpl.org> + + * shr.el (shr-expand-newlines): Fix variable name. + +2011-01-25 Lars Ingebrigtsen <larsi@gnus.org> + + * shr.el (shr-expand-newlines): Make nested boxes work. + +2011-01-24 Lars Ingebrigtsen <larsi@gnus.org> + + * shr.el (shr-expand-newlines): Proof of concept implemantation of boxy + backgrounds. + (shr-expand-newlines): Switch to using overlays to enable kill'n'yank + in a more sensible manner. + +2011-01-24 Teodor Zlatanov <tzz@lifelogs.com> + + * mml-smime.el (mml-smime-use): Make it a defcustom and default to 'epg + if EPG is loaded. + +2011-01-24 Julien Danjou <julien@danjou.info> + + * shr.el: Use defface to create shr-tag-h[1-6] faces to fontify h[1-6] + tags. + +2011-01-24 Lars Ingebrigtsen <larsi@gnus.org> + + * gnus-art.el (gnus-article-read-summary-keys): Don't call disabled + commands. + + * gnus-gravatar.el (gnus-gravatar-insert): Don't move point around + in the article buffer. + (gnus-gravatar-insert): Use blank space from the current buffer to + avoid breaking text properties. This makes X-Sent updating work again. + + * gravatar.el (gravatar-retrieve): Be silent when retrieving. + +2011-01-23 Lars Ingebrigtsen <larsi@gnus.org> + + * gnus-html.el (gnus-html-image-fetched): Kill the buffer anyway, and + fix the bug in url-http.el instead. + + * shr.el (shr-image-fetched): Ditto. + + * shr.el (shr-image-fetched): Avoid having point move in the article + buffer. + + * gnus-html.el (gnus-html-image-fetched): Don't kill the temporary + buffer after being called. It's apparently being killed by url.el, and + killing it made point move to end-of-buffer in a random buffer. + + * shr.el (shr-image-fetched): Ditto. + +2011-01-23 Julien Danjou <julien@danjou.info> + + * mm-decode.el (mm-inline-media-tests): Change text/org to text/x-org. + + * mm-uu.el (mm-uu-org-src-code-block-extract): Change text/org to + text/x-org. + +2011-01-22 Lars Ingebrigtsen <larsi@gnus.org> + + * gnus-sum.el (gnus-summary-move-article): Protect against backends + (i.e., nnimap) returning nil as the article number. + +2011-01-22 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change) + + * flow-fill.el (fill-flowed): Make `delete-space' option correspond to + "DelSp" parameter in RFC3676. + +2011-01-22 Lars Ingebrigtsen <larsi@gnus.org> + + * message.el (message-check-recipients): Display the encoded version of + the bogus address if they differ. + + * gnus-draft.el (gnus-group-send-queue): Really refresh the queue group + after sending. + + * gnus-agent.el (gnus-agent-send-mail): Ditto. + + * gnus-group.el (gnus-group-refresh-group): New convenience function. + + * gnus-draft.el (gnus-group-send-queue): Update the queue group in the + group buffer after sending the queue. + + * gnus-agent.el (gnus-agent-send-mail): Ditto. + +2011-01-22 Julien Danjou <julien@danjou.info> + + * mailcap.el (mailcap-mime-extensions): Rename text/org to text/x-org. + +2011-01-22 Lars Ingebrigtsen <larsi@gnus.org> + + * mm-decode.el (mm-preferred-alternative-precedence): Don't bug out on + nested related parts. + + * nnfolder.el (nnfolder-request-expire-articles): Return the list of + unexpired articles. This fixes the regression that led expiry marks to + disappear from nnfolder groups. + +2011-01-21 Stefan Monnier <monnier@iro.umontreal.ca> + + * gnus-art.el (gnus-button-alist, gnus-button-handle-info-keystrokes): + Don't confuse the "ret" of "retrograde" with RET. + +2011-01-21 Julien Danjou <julien@danjou.info> + + * gnus-art.el (gnus-mime-display-single): Use mm-display-inline rather + than mm-insert-inline. + +2011-01-21 Katsumi Yamaoka <yamaoka@jpl.org> + + * gnus-art.el (gnus-article-remove-images, gnus-article-show-images): + Widen article buffer. + +2011-01-20 Stefan Monnier <monnier@iro.umontreal.ca> + + * mm-util.el (mm-find-buffer-file-coding-system): Don't forget to kill + the temp buffer. + * message.el (message-mailer-swallows-blank-line): Use with-temp-buffer. + +2011-01-20 Julien Danjou <julien@danjou.info> + + * mm-decode.el (mm-inline-media-tests): Add text/x-sh. + + * gnus-art.el (gnus-mime-inline-part): Use mm-display-inline rather + than mm-insert-inline to insert inline part: this respect + mm-inline-media-tests displayers. + + * mm-view.el (mm-display-shell-script-inline): New function. + + * mm-decode.el (mm-inline-media-tests): Add x-shellscript and x-sh. + + * mm-uu.el (mm-uu-type-alist): Add org block. + (mm-uu-org-src-code-block-extract): New function. + + * mm-view.el (mm-display-org-inline): New function. + + * mm-decode.el (mm-automatic-display): Add text/org. + + * mailcap.el (mailcap-mime-extensions): Add .org. + +2011-01-19 Katsumi Yamaoka <yamaoka@jpl.org> + + * gnus-art.el (gnus-article-highlight): Remove argument passed to + gnus-article-add-buttons. + +2011-01-19 Tom Rauchenwald <sehnsucht.nach.unendlichkeit@quantentunnel.de> (tiny change) + + * spam.el (spam-spamassassin-register-with-sa-learn): Insert a full + From header with a date and "nobody" as the sender. + +2011-01-19 Julien Danjou <julien@danjou.info> + + * gnus-art.el (gnus-article-add-buttons): Simplify condition. + (gnus-button-push): Remove gnus-button-entry function, it fails heavily + if you have the same regexp several times. + (gnus-button-push): Fix matching when regexp is symbol. + +2011-01-15 Glenn Morris <rgm@gnu.org> + + * message.el (message-mail): A compose-mail function should + accept headers as strings. + +2011-01-13 Chong Yidong <cyd@stupidchicken.com> + + * message.el (message-tool-bar-gnome): Tweak tool-bar items. + Add :vert-only tags. + (message-mail): New arg RETURN-ACTION. + (message-return-action): New var. + (message-bury): Use it. + (message-mode): Make it buffer-local. + (message-send-and-exit): Always call message-bury. + + * gnus-msg.el (gnus-msg-mail): New arg RETURN-ACTION. Pass it to + message-mail. + +2011-01-11 Lars Magne Ingebrigtsen <larsi@gnus.org> + + * nnimap.el (nnimap-convert-partial-article): Protect against + zero-length body parts. + + * mm-decode.el (mm-preferred-alternative-precedence): + Discourage showing empty parts. + + * gnus-int.el (gnus-request-accept-article): Don't try to update marks + and stuff if the backend didn't return the article number. This fixes + an Exchange-related nnimap bug. + + * gnus-sum.el (gnus-summary-next-article): Remove hack to reselect + group window, because it does the wrong thing when a separate frame + displays the group buffer. + + * proto-stream.el (open-protocol-stream): Protect against the low-level + transport functions returning nil. + +2011-01-07 Daiki Ueno <ueno@unixuser.org> + + * mml2015.el (epg-sub-key-fingerprint): Autoload. + (mml2015-epg-find-usable-secret-key): New function. + (mml2015-epg-sign): Use mml2015-epg-find-usable-secret-key instead of + mml2015-epg-find-usable-key (Bug#7797). + (mml2015-epg-encrypt): Ditto. + +2011-01-03 Lars Magne Ingebrigtsen <larsi@gnus.org> + + * flow-fill.el (fill-flowed-encode): Do encoding citation-aware. + +2011-01-03 Glenn Morris <rgm@gnu.org> + + * sieve-manage.el (sieve-manage-open): Correctly set sieve-manage-port. + + * sieve.el (sieve-open-server): Give a more explicit error if + sieve-manage-open returns nil. (Bug#7720) + +2011-01-02 Karl Fogel <kfogel@red-bean.com> + + * gnus-msg.el (gnus-message-replyencrypt): Default to `t'. + +2011-01-02 Lars Magne Ingebrigtsen <larsi@gnus.org> + + * nnimap.el (nnimap-login): Prefer AUTH=CRAM-MD5, if it's available. + This avoids sending passwords in plain text over non-encrypted + channels. + + * shr.el (shr-rescale-image): Display all GIF images as animated images. + + * nnimap.el (nnimap-login): Refactored out into own function, and + implement CRAM-MD5. + (nnimap-wait-for-line): Refactored out. + + * mm-view.el (mml-smime): Require. + +2010-12-20 David Engster <deng@eml.cc> + + * mm-view.el (mm-view-pkcs7-decrypt): If mml-smime-use is set to 'epg, + use EPG to decrypt S/MIME messages instead of openssl. + +2011-01-02 Lars Magne Ingebrigtsen <larsi@gnus.org> + + * nnimap.el (nnimap-request-group): Avoid double SELECT on `M-g'. + + * gnus-group.el (gnus-group-kill-group): Don't try to update the group + status is the group clearly is unreachable. + + * auth-source.el (auth-source-create): Add the optional second + parameter to `local-variable-p' to be compatible with XEmacs. + +2011-01-02 Wang Diancheng <dcwang@kingbase.com.cn> (tiny change) + + * nnml.el (nnml-request-article): Allow requesting by Message-ID to + work when using a compressed nnml folder. + +2011-01-02 Lars Magne Ingebrigtsen <larsi@gnus.org> + + * gnus-sum.el (gnus-select-newsgroup): Don't propagate marks to + backends after sanitising on entry, because this never makes sense: + If the articles have gone missing, then the data no longer exists on + the backend, and if they haven't, then Gnus is wrong, and shouldn't + overwrite anything anyway. + + * shr.el (shr-insert-document): Bind shr-width dynamically to + window-width if it's nil. + +2010-12-30 Tassilo Horn <tassilo@member.fsf.org> + + * shr.el (shr-width, shr-insert-document): Allow nil as shr-width value + with the meaning of using the full emacs window width for rendering. + +2010-12-27 Daiki Ueno <ueno@unixuser.org> + + * mml2015.el (mml2015-epg-sign, mml2015-epg-encrypt): Take care the + case when sender is not given. + +2010-12-23 Julien Danjou <julien@danjou.info> + + * gnus-gravatar.el (gnus-gravatar-transform-address): Set + `mail-extr-ignore-realname-equals-mailbox-name' to nil when extracting + the addresses, otherwise we might misplaced the gravatar. + +2010-12-21 Daiki Ueno <ueno@unixuser.org> + + * mml1991.el (pgg-sign-region, pgg-encrypt-region): + * gnus-art.el (pgg-snarf-keys-region): Autoload since PGG is now + obsolete in Emacs. + +2010-12-20 Julien Danjou <julien@danjou.info> + + * gnus-util.el (gnus-rescale-image): Revert last change. + +2010-12-17 Lars Magne Ingebrigtsen <larsi@gnus.org> + + * gnus-group.el (gnus-group-delete-articles): New command. + +2010-12-17 Andrew Cohen <cohen@andy.bu.edu> + + * nnir.el (nnir-mode): Make sure 'gnus-registry-install is bound. + +2010-12-17 Lars Magne Ingebrigtsen <larsi@gnus.org> + + * gnus-sum.el (gnus-get-newsgroup-headers): Revert the last change + here, since it's up to the backends to do CRLF removal if their + protocol has it. + + * nnimap.el (nnimap-retrieve-headers): Remove CRLF from the headers. + +2010-12-17 Julien Danjou <julien@danjou.info> + + * gnus-util.el (gnus-rescale-image): Allow to resize images even if + they are from file. Can also scale up. + +2010-12-17 Andrew Cohen <cohen@andy.bu.edu> + + * gnus-sum.el (gnus-summary-refer-thread): Simplify code. Restore + gnus-use-agent. + (gnus-get-newsgroup-headers): Avoid unwanted spaces at eol. + + * nnir.el (nnir-get-active): Ignore nnir-ignored-newsgroups if null. + +2010-12-17 Julien Danjou <julien@danjou.info> + + * gravatar.el (gravatar-retrieve-synchronously): New function. + (gravatar-get-data): Make more robust. + +2010-12-16 Lars Magne Ingebrigtsen <larsi@gnus.org> + + * nnimap.el (nnimap-wait-for-response): Fix the end-point calculation + to really consider the last line. + +2010-12-16 Daiki Ueno <ueno@unixuser.org> + + * auth-source.el (auth-source-gpg-encrypt-to): New variable to set the + list of recipient keys, or use symmetric encryption if not a list. + (auth-source-create): Use it to make `epa-file-encrypt-to' local for an + EPA override, replacing the call to `netrc-store-data'. + +2010-12-16 Dan Davison <dandavison7@gmail.com> (tiny change) + + * gnus-srvr.el: Avoid passing nil regexp argument to + delete-matching-lines. + +2010-12-16 Lars Magne Ingebrigtsen <larsi@gnus.org> + + * gnus-html.el (gnus-html-schedule-image-fetching): Make sure the HTML + fetching stops when Gnus exits. + + * nnfolder.el (nnfolder-save-all-buffers): Refactor out into its own + function. + (nnfolder-request-expire-articles): Save all the buffers after doing + expiry. + + * nnmail.el (nnmail-expiry-target-group): Revert the "all articles are + the last article", since that led to serious performance regressions + when expiring nnml groups. + +2010-12-16 Andrew Cohen <cohen@andy.bu.edu> + + * nnir.el: Improve customizations. + +2010-12-16 Lars Magne Ingebrigtsen <larsi@gnus.org> + + * gnus-start.el (gnus-subscribe-newsgroup): Notify the backend. + + * gnus-group.el (gnus-group-kill-group): Notify the backend that the + group has been killed. + (gnus-group-yank-group): Ditto. + + * gnus-srvr.el (gnus-browse-unsubscribe-group): Ditto. + + * nnimap.el (nnimap-request-update-group-status): New function. + + * gnus-int.el (gnus-request-update-group-status): New interface + function. + + * gnus-sum.el (gnus-summary-push-marks-to-backend): Fix the logic for + copying read-ness to the backends. + + * nnimap.el (nnimap-quirk): New function. + (nnimap-retrieve-group-data-early): Use it. + (nnimap-quirks): New alist. + +2010-12-16 Katsumi Yamaoka <yamaoka@jpl.org> + + * shr.el (shr-insert): Set shr-start after deleting trailing space; + don't delete it within indentation. + +2010-12-16 Lars Magne Ingebrigtsen <larsi@gnus.org> + + * nnimap.el (nnimap-wait-for-response): Always look (at least) at the + previous line. + +2010-12-15 Lars Magne Ingebrigtsen <larsi@gnus.org> + + * nnimap.el (nnimap-retrieve-group-data-early): Fix the syntax of the + QRESYNC command by deleting a superfluous space which broke Cyrus + servers. This change will break other servers that are buggy the other + way around. + +2010-12-14 Teodor Zlatanov <tzz@lifelogs.com> + + * spam.el: Reindent and fix long lines. + (spam-copy-or-move-routine): Exclude invalid move destinations. + +2010-12-14 Andrew Cohen <cohen@andy.bu.edu> + + * nnir.el (nnir-mode): Don't install registry hooks if user hasn't + installed the registry. + +2010-12-13 Andrew Cohen <cohen@andy.bu.edu> + + * nnir.el (nnir-run-gmane): Better check for gmane groups: error out if + groupname doesn't contain "gmane". + +2010-12-13 Lars Magne Ingebrigtsen <larsi@gnus.org> + + * gnus-start.el (gnus-matches-options-n): Fix typo in last change. + (gnus-1): Don't create the nndrafts group twice. + (gnus-setup-news): There's no need to read the active file here, since + that's done again later on a per-backend basis. + (gnus-start-draft-setup): Make sure that the new group is started out + empty. + + * gnus-agent.el (gnus-agentize): Don't create the queue group + automatically on startup. It'll be created later, if needed. + + * gnus-start.el (gnus-auto-subscribed-groups): Add nnimap to the list + of automatically subscribed groups. + (gnus-auto-subscribed-categories): New variable. + (gnus-matches-options-n): Use it. + (gnus-default-subscribed-newsgroups): Remove unused variable. + (gnus-start-draft-setup): Message a bit less. + +2010-12-13 Andrew Cohen <cohen@andy.bu.edu> + + * nnir.el (nnir-run-imap): Return article list in order of increasing + UID. + +2010-12-13 Lars Magne Ingebrigtsen <larsi@gnus.org> + + * gnus-sum.el (gnus-summary-enter-digest-group): + Mention gnus-auto-select-on-ephemeral-exit. + + * proto-stream.el (proto-stream-open-network-only): Fix the calling + convention of the network-only option. + 2010-12-10 Lars Magne Ingebrigtsen <larsi@gnus.org> * proto-stream.el (proto-stream-open-network-only): New function to @@ -232,8 +841,8 @@ (nnir-mode): Install nnir-specific hooks for updating the registry. * gnus-sum.el - (gnus-article-original-subject,gnus-newsgroup-original-name): Remove - obsolete variables. + (gnus-article-original-subject,gnus-newsgroup-original-name): + Remove obsolete variables. (gnus-summary-move-article): Remove use of obsolete variables. (gnus-summary-local-variables): Make move and delete hooks local to summary buffers. @@ -349,7 +958,7 @@ * nntp.el (nntp-open-connection): Report what the connection error is. - * proto-stream.el (open-protocol-stream): Renamed from + * proto-stream.el (open-protocol-stream): Rename from open-proto-stream. 2010-11-27 Lars Magne Ingebrigtsen <larsi@gnus.org> @@ -630,8 +1239,8 @@ * shr.el (shr-parse-style): Replace \n with space in style parsing. - * shr-color.el (shr-color-hsl-to-rgb-fractions): Use - shr-color-hue-to-rgb. + * shr-color.el (shr-color-hsl-to-rgb-fractions): + Use shr-color-hue-to-rgb. (shr-color->hexadecimal): Call shr-color-hsl-to-rgb-fractions. 2010-11-23 Lars Magne Ingebrigtsen <larsi@gnus.org> @@ -18750,8 +19359,7 @@ See ChangeLog.2 for earlier changes. - Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 - Free Software Foundation, Inc. + Copyright (C) 2004-2011 Free Software Foundation, Inc. This file is part of GNU Emacs. diff --git a/lisp/gnus/ChangeLog.1 b/lisp/gnus/ChangeLog.1 index 520b3a4b735..7448808b20f 100644 --- a/lisp/gnus/ChangeLog.1 +++ b/lisp/gnus/ChangeLog.1 @@ -3708,8 +3708,7 @@ * gnus.el: Quassia Gnus v0.1 is released. - Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 1997-2011 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -3725,5 +3724,3 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. - -;;; arch-tag: c2f4e9c8-94fb-4c63-bdfd-4ab680cc9db7 diff --git a/lisp/gnus/ChangeLog.2 b/lisp/gnus/ChangeLog.2 index 767b50bbe09..381ae544b24 100644 --- a/lisp/gnus/ChangeLog.2 +++ b/lisp/gnus/ChangeLog.2 @@ -18553,8 +18553,7 @@ See ChangeLog.1 for earlier changes. - Copyright (C) 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009, 2010 - Free Software Foundation, Inc. + Copyright (C) 2000-2002, 2004-2011 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -18574,5 +18573,3 @@ See ChangeLog.1 for earlier changes. ;; Local Variables: ;; coding: iso-2022-7bit ;; End: - -;; arch-tag: 956fd310-042f-4fca-8dca-a01dbe06acff diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el index 20e4af189d9..e94cfb137b0 100644 --- a/lisp/gnus/auth-source.el +++ b/lisp/gnus/auth-source.el @@ -1,6 +1,6 @@ ;;; auth-source.el --- authentication sources for Gnus and Emacs -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Ted Zlatanov <tzz@lifelogs.com> ;; Keywords: news @@ -159,6 +159,15 @@ can get pretty complex." (const :tag "Any" t) (string :tag "Specific user name")))))))) +(defcustom auth-source-gpg-encrypt-to t + "List of recipient keys that `authinfo.gpg' encrypted to. +If the value is not a list, symmetric encryption will be used." + :group 'auth-source + :version "23.2" ;; No Gnus + :type '(choice (const :tag "Symmetric encryption" t) + (repeat :tag "Recipient public keys" + (string :tag "Recipient public key")))) + ;; temp for debugging ;; (unintern 'auth-source-protocols) ;; (unintern 'auth-sources) @@ -352,9 +361,28 @@ Return structure as specified by MODE." ;; netrc interface. (when (y-or-n-p (format "Do you want to save this password in %s? " source)) - (netrc-store-data source host prot - (or user (cdr (assoc "login" result))) - (cdr (assoc "password" result)))))) + ;; the code below is almost same as `netrc-store-data' except + ;; the `epa-file-encrypt-to' hack (see bug#7487). + (with-temp-buffer + (when (file-exists-p source) + (insert-file-contents source)) + (when auth-source-gpg-encrypt-to + ;; making `epa-file-encrypt-to' local to this buffer lets + ;; epa-file skip the key selection query (see the + ;; `local-variable-p' check in `epa-file-write-region'). + (unless (local-variable-p 'epa-file-encrypt-to (current-buffer)) + (make-local-variable 'epa-file-encrypt-to)) + (if (listp auth-source-gpg-encrypt-to) + (setq epa-file-encrypt-to auth-source-gpg-encrypt-to))) + (goto-char (point-max)) + (unless (bolp) + (insert "\n")) + (insert (format "machine %s login %s password %s port %s\n" + host + (or user (cdr (assoc "login" result))) + (cdr (assoc "password" result)) + prot)) + (write-region (point-min) (point-max) source nil 'silent))))) (if (consp mode) (mapcar #'cdr result) (cdar result)))) diff --git a/lisp/gnus/canlock.el b/lisp/gnus/canlock.el index 4298bc901cd..5727bef37ef 100644 --- a/lisp/gnus/canlock.el +++ b/lisp/gnus/canlock.el @@ -1,7 +1,6 @@ ;;; canlock.el --- functions for Cancel-Lock feature -;; Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-1999, 2001-2011 Free Software Foundation, Inc. ;; Author: Katsumi Yamaoka <yamaoka@jpl.org> ;; Keywords: news, cancel-lock, hmac, sha1, rfc2104 diff --git a/lisp/gnus/compface.el b/lisp/gnus/compface.el index 8c26341a6e2..2a2383777cb 100644 --- a/lisp/gnus/compface.el +++ b/lisp/gnus/compface.el @@ -1,6 +1,6 @@ ;;; compface.el --- functions for converting X-Face headers -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news diff --git a/lisp/gnus/deuglify.el b/lisp/gnus/deuglify.el index 60f8c95bb2e..1e2a566f72d 100644 --- a/lisp/gnus/deuglify.el +++ b/lisp/gnus/deuglify.el @@ -1,7 +1,6 @@ ;;; deuglify.el --- deuglify broken Outlook (Express) articles -;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2001-2011 Free Software Foundation, Inc. ;; Author: Raymond Scholz <rscholz@zonix.de> ;; Thomas Steffen diff --git a/lisp/gnus/ecomplete.el b/lisp/gnus/ecomplete.el index 1f705674962..6a47b119f10 100644 --- a/lisp/gnus/ecomplete.el +++ b/lisp/gnus/ecomplete.el @@ -1,7 +1,6 @@ ;;; ecomplete.el --- electric completion of addresses and the like -;; Copyright (C) 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2006-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: mail diff --git a/lisp/gnus/flow-fill.el b/lisp/gnus/flow-fill.el index 2420577ea45..cdaebbd6837 100644 --- a/lisp/gnus/flow-fill.el +++ b/lisp/gnus/flow-fill.el @@ -1,7 +1,6 @@ ;;; flow-fill.el --- interpret RFC2646 "flowed" text -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; Author: Simon Josefsson <jas@pdc.kth.se> ;; Keywords: mail @@ -82,19 +81,38 @@ RFC 2646 suggests 66 characters for readability." ;; Go through each paragraph, filling it and adding SPC ;; as the last character on each line. (while (setq end (text-property-any start (point-max) 'hard 't)) - (let ((fill-column (eval fill-flowed-encode-column))) - (fill-region start end t 'nosqueeze 'to-eop)) - (goto-char start) - ;; `fill-region' probably distorted end. - (setq end (text-property-any start (point-max) 'hard 't)) - (while (and (< (point) end) - (re-search-forward "$" (1- end) t)) - (insert " ") - (setq end (1+ end)) - (forward-char)) - (goto-char (setq start (1+ end))))) + (save-restriction + (narrow-to-region start end) + (let ((fill-column (eval fill-flowed-encode-column))) + (fill-flowed-fill-buffer)) + (goto-char (point-min)) + (while (re-search-forward "\n" nil t) + (replace-match " \n" t t)) + (goto-char (setq start (1+ (point-max))))))) t))) +(defun fill-flowed-fill-buffer () + (let ((prefix nil) + (prev-prefix nil) + (start (point-min))) + (goto-char (point-min)) + (while (not (eobp)) + (setq prefix (and (looking-at "[> ]+") + (match-string 0))) + (if (equal prefix prev-prefix) + (forward-line 1) + (save-restriction + (narrow-to-region start (point)) + (let ((fill-prefix prev-prefix)) + (fill-region (point-min) (point-max) t 'nosqueeze 'to-eop)) + (goto-char (point-max))) + (setq prev-prefix prefix + start (point)))) + (save-restriction + (narrow-to-region start (point)) + (let ((fill-prefix prev-prefix)) + (fill-region (point-min) (point-max) t 'nosqueeze 'to-eop))))) + ;;;###autoload (defun fill-flowed (&optional buffer delete-space) (with-current-buffer (or (current-buffer) buffer) @@ -105,8 +123,6 @@ RFC 2646 suggests 66 characters for readability." (forward-line 1)) (goto-char (point-min)) (while (re-search-forward " $" nil t) - (when delete-space - (delete-char -1)) (when (save-excursion (beginning-of-line) (looking-at "^\\(>*\\)\\( ?\\)")) @@ -134,6 +150,8 @@ RFC 2646 suggests 66 characters for readability." (replace-match (if (string= (match-string 2) " ") "" "\\2"))) (backward-delete-char -1) + (when delete-space + (delete-char -1)) (end-of-line)) (unless sig (condition-case nil diff --git a/lisp/gnus/gmm-utils.el b/lisp/gnus/gmm-utils.el index e16fc5efa63..8deb27379a3 100644 --- a/lisp/gnus/gmm-utils.el +++ b/lisp/gnus/gmm-utils.el @@ -1,7 +1,6 @@ ;;; gmm-utils.el --- Utility functions for Gnus, Message and MML -;; Copyright (C) 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2006-2011 Free Software Foundation, Inc. ;; Author: Reiner Steib <reiner.steib@gmx.de> ;; Keywords: news diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el index 8edfecde152..204d63d37e4 100644 --- a/lisp/gnus/gnus-agent.el +++ b/lisp/gnus/gnus-agent.el @@ -1,7 +1,6 @@ ;;; gnus-agent.el --- unplugged support for Gnus -;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; This file is part of GNU Emacs. @@ -203,8 +202,7 @@ queue. Otherwise, queue if and only if unplugged." (const :format "When unplugged" t))) (defcustom gnus-agent-prompt-send-queue nil - "If non-nil, `gnus-group-send-queue' will prompt if called when -unplugged." + "If non-nil, `gnus-group-send-queue' will prompt if called when unplugged." :version "22.1" :group 'gnus-agent :type 'boolean) @@ -685,7 +683,6 @@ This will modify the `gnus-setup-news-hook', and minor mode in all Gnus buffers." (interactive) (gnus-open-agent) - (add-hook 'gnus-setup-news-hook 'gnus-agent-queue-setup) (unless gnus-agent-send-mail-function (setq gnus-agent-send-mail-function (or message-send-mail-real-function @@ -732,7 +729,8 @@ Optional arg GROUP-NAME allows to specify another group." (concat "^" (regexp-quote mail-header-separator) "\n")) (replace-match "\n") (gnus-agent-insert-meta-information 'mail) - (gnus-request-accept-article "nndraft:queue" nil t t))) + (gnus-request-accept-article "nndraft:queue" nil t t) + (gnus-group-refresh-group "nndraft:queue"))) (defun gnus-agent-insert-meta-information (type &optional method) "Insert meta-information into the message that says how it's to be posted. @@ -1514,7 +1512,7 @@ downloaded into the agent." "Fetch ARTICLES from GROUP and put them into the Agent." (when articles (gnus-agent-load-alist group) - (let* ((alist gnus-agent-article-alist) + (let* ((alist gnus-agent-article-alist) (headers (if (< (length articles) 2) nil gnus-newsgroup-headers)) (selected-sets (list nil)) (current-set-size 0) @@ -1556,9 +1554,9 @@ downloaded into the agent." ;; 65 char/line. If the line count ;; is missing, arbitrarily assume a ;; size of 1000 characters. - (max (* 65 (mail-header-lines - (car headers))) - 1000) + (max (* 65 (mail-header-lines + (car headers))) + 1000) char-size)) 0)))) (setcar selected-sets (nreverse (car selected-sets))) diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 8d8aaa0e36e..a76a71be649 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -1,7 +1,6 @@ ;;; gnus-art.el --- article mode commands for Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news @@ -169,7 +168,7 @@ If `gnus-visible-headers' is non-nil, this variable will be ignored." :group 'gnus-article-hiding) (defcustom gnus-visible-headers - "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^Followup-To:\\|^Reply-To:\\|^Organization:\\|^Summary:\\|^Keywords:\\|^To:\\|^[BGF]?Cc:\\|^Posted-To:\\|^Mail-Copies-To:\\|^Mail-Followup-To:\\|^Apparently-To:\\|^Gnus-Warning:\\|^Resent-From:\\|^X-Sent:" + "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^Followup-To:\\|^Reply-To:\\|^Organization:\\|^Summary:\\|^Keywords:\\|^To:\\|^[BGF]?Cc:\\|^Posted-To:\\|^Mail-Copies-To:\\|^Mail-Followup-To:\\|^Apparently-To:\\|^Gnus-Warning:\\|^Resent-From:" "*All headers that do not match this regexp will be hidden. This variable can also be a list of regexp of headers to remain visible. If this variable is non-nil, `gnus-ignored-headers' will be ignored." @@ -1015,14 +1014,55 @@ on parts -- for instance, adding Vcard info to a database." :group 'gnus-article-mime :type '(repeat (cons :format "%v" (string :tag "MIME type") function))) -(defcustom gnus-article-date-lapsed-new-header nil - "Whether the X-Sent and Date headers can coexist. -When using `gnus-treat-date-lapsed', the \"X-Sent:\" header will -either replace the old \"Date:\" header (if this variable is nil), or -be added below it (otherwise)." - :version "21.1" +(defcustom gnus-article-date-headers + (let ((types '(ut local english lapsed combined-lapsed + iso8601 original user-defined)) + default) + ;; Try to respect the legacy `gnus-treat-date-*' variables, if + ;; they're set. + (dolist (type types) + (let ((variable (intern (format "gnus-treat-date-%s" type)))) + (when (and (boundp variable) + (symbol-value variable)) + (push type default)))) + (when (and (or (not (boundp (intern "gnus-article-date-lapsed-new-header"))) + (not (symbol-value (intern "gnus-article-date-lapsed-new-header")))) + (memq 'lapsed default)) + (setq default (delq 'lapsed default))) + (or default + ;; If they weren't set, we default to `combined-lapsed'. + '(combined-lapsed))) + "A list of Date header formats to display. +Valid formats are `ut' (universal time), `local' (local time +zone), `english' (readable English), `lapsed' (elapsed time), +`combined-lapsed' (both the original date and the elapsed time), +`original' (the original date header), `iso8601' (ISO8601 +format), and `user-defined' (a user-defined format defined by the +`gnus-article-time-format' variable). + +You have as many date headers as you want in the article buffer. +Some of these headers are updated automatically. See +`gnus-article-update-date-headers' for details." + :version "24.1" :group 'gnus-article-headers - :type 'boolean) + :type '(repeat + (item :tag "Universal time (UT)" :value 'ut) + (item :tag "Local time zone" :value 'local) + (item :tag "Readable English" :value 'english) + (item :tag "Elapsed time" :value 'lapsed) + (item :tag "Original and elapsed time" :value 'combined-lapsed) + (item :tag "Original date header" :value 'original) + (item :tag "ISO8601 format" :value 'iso8601) + (item :tag "User-defined" :value 'user-defined))) + +(defcustom gnus-article-update-date-headers 1 + "How often to update the date header. +If nil, don't update it at all." + :version "24.1" + :group 'gnus-article-headers + :type '(choice + (item :tag "Don't update" :value nil) + integer)) (defcustom gnus-article-mime-match-handle-function 'undisplayed-alternative "Function called with a MIME handle as the argument. @@ -1127,6 +1167,15 @@ predicate. See Info node `(gnus)Customizing Articles'." :type gnus-article-treat-head-custom) (put 'gnus-treat-buttonize-head 'highlight t) +(defcustom gnus-treat-date 'head + "Display dates according to the `gnus-article-date-headers' variable. +Valid values are nil, t, `head', `first', `last', an integer or a +predicate. See Info node `(gnus)Customizing Articles'." + :version "24.1" + :group 'gnus-article-treat + :link '(custom-manual "(gnus)Customizing Articles") + :type gnus-article-treat-head-custom) + (defcustom gnus-treat-emphasize 50000 "Emphasize text. Valid values are nil, t, `head', `first', `last', an integer or a @@ -1258,65 +1307,6 @@ predicate. See Info node `(gnus)Customizing Articles'." :type gnus-article-treat-custom) (put 'gnus-treat-highlight-citation 'highlight t) -(defcustom gnus-treat-date-ut nil - "Display the Date in UT (GMT). -Valid values are nil, t, `head', `first', `last', an integer or a -predicate. See Info node `(gnus)Customizing Articles'." - :group 'gnus-article-treat - :link '(custom-manual "(gnus)Customizing Articles") - :type gnus-article-treat-head-custom) - -(defcustom gnus-treat-date-local nil - "Display the Date in the local timezone. -Valid values are nil, t, `head', `first', `last', an integer or a -predicate. See Info node `(gnus)Customizing Articles'." - :group 'gnus-article-treat - :link '(custom-manual "(gnus)Customizing Articles") - :type gnus-article-treat-head-custom) - -(defcustom gnus-treat-date-english nil - "Display the Date in a format that can be read aloud in English. -Valid values are nil, t, `head', `first', `last', an integer or a -predicate. See Info node `(gnus)Customizing Articles'." - :version "22.1" - :group 'gnus-article-treat - :link '(custom-manual "(gnus)Customizing Articles") - :type gnus-article-treat-head-custom) - -(defcustom gnus-treat-date-lapsed nil - "Display the Date header in a way that says how much time has elapsed. -Valid values are nil, t, `head', `first', `last', an integer or a -predicate. See Info node `(gnus)Customizing Articles'." - :group 'gnus-article-treat - :link '(custom-manual "(gnus)Customizing Articles") - :type gnus-article-treat-head-custom) - -(defcustom gnus-treat-date-original nil - "Display the date in the original timezone. -Valid values are nil, t, `head', `first', `last', an integer or a -predicate. See Info node `(gnus)Customizing Articles'." - :group 'gnus-article-treat - :link '(custom-manual "(gnus)Customizing Articles") - :type gnus-article-treat-head-custom) - -(defcustom gnus-treat-date-iso8601 nil - "Display the date in the ISO8601 format. -Valid values are nil, t, `head', `first', `last', an integer or a -predicate. See Info node `(gnus)Customizing Articles'." - :version "21.1" - :group 'gnus-article-treat - :link '(custom-manual "(gnus)Customizing Articles") - :type gnus-article-treat-head-custom) - -(defcustom gnus-treat-date-user-defined nil - "Display the date in a user-defined format. -The format is defined by the `gnus-article-time-format' variable. -Valid values are nil, t, `head', `first', `last', an integer or a -predicate. See Info node `(gnus)Customizing Articles'." - :group 'gnus-article-treat - :link '(custom-manual "(gnus)Customizing Articles") - :type gnus-article-treat-head-custom) - (defcustom gnus-treat-strip-headers-in-body t "Strip the X-No-Archive header line from the beginning of the body. Valid values are nil, t, `head', `first', `last', an integer or a @@ -1594,6 +1584,7 @@ predicate. See Info node `(gnus)Customizing Articles'." "Fill long lines. Valid values are nil, t, `head', `first', `last', an integer or a predicate. See Info node `(gnus)Customizing Articles'." + :version "24.1" :group 'gnus-article-treat :link '(custom-manual "(gnus)Customizing Articles") :type gnus-article-treat-custom) @@ -1673,13 +1664,6 @@ regexp." (gnus-treat-fill-long-lines gnus-article-fill-cited-long-lines) (gnus-treat-strip-cr gnus-article-remove-cr) (gnus-treat-unsplit-urls gnus-article-unsplit-urls) - (gnus-treat-date-ut gnus-article-date-ut) - (gnus-treat-date-local gnus-article-date-local) - (gnus-treat-date-english gnus-article-date-english) - (gnus-treat-date-original gnus-article-date-original) - (gnus-treat-date-user-defined gnus-article-date-user) - (gnus-treat-date-iso8601 gnus-article-date-iso8601) - (gnus-treat-date-lapsed gnus-article-date-lapsed) (gnus-treat-display-x-face gnus-article-display-x-face) (gnus-treat-display-face gnus-article-display-face) (gnus-treat-hide-headers gnus-article-maybe-hide-headers) @@ -1691,6 +1675,7 @@ regexp." (gnus-treat-mail-picon gnus-treat-mail-picon) (gnus-treat-newsgroups-picon gnus-treat-newsgroups-picon) (gnus-treat-strip-pem gnus-article-hide-pem) + (gnus-treat-date gnus-article-treat-date) (gnus-treat-from-gravatar gnus-treat-from-gravatar) (gnus-treat-mail-gravatar gnus-treat-mail-gravatar) (gnus-treat-highlight-headers gnus-article-highlight-headers) @@ -2274,19 +2259,23 @@ unfolded." "Remove all images from the article buffer." (interactive) (gnus-with-article-buffer - (dolist (elem gnus-article-image-alist) - (gnus-delete-images (car elem))))) + (save-restriction + (widen) + (dolist (elem gnus-article-image-alist) + (gnus-delete-images (car elem)))))) (defun gnus-article-show-images () "Show any images that are in the HTML-rendered article buffer. This only works if the article in question is HTML." (interactive) (gnus-with-article-buffer - (dolist (region (gnus-find-text-property-region (point-min) (point-max) - 'image-displayer)) - (destructuring-bind (start end function) region - (funcall function (get-text-property start 'image-url) - start end))))) + (save-restriction + (widen) + (dolist (region (gnus-find-text-property-region (point-min) (point-max) + 'image-displayer)) + (destructuring-bind (start end function) region + (funcall function (get-text-property start 'image-url) + start end)))))) (defun gnus-article-treat-fold-newsgroups () "Unfold folded message headers. @@ -3419,84 +3408,70 @@ lines forward." (forward-line 1) (setq ended t))))) -(defun article-date-ut (&optional type highlight) - "Convert DATE date to universal time in the current article. -If TYPE is `local', convert to local time; if it is `lapsed', output -how much time has lapsed since DATE. For `lapsed', the value of -`gnus-article-date-lapsed-new-header' says whether the \"X-Sent:\" header -should replace the \"Date:\" one, or should be added below it." +(defun article-treat-date () + (article-date-ut gnus-article-date-headers t)) + +(defun article-date-ut (&optional type highlight date-position) + "Convert DATE date to TYPE in the current article. +The default type is `ut'. See `gnus-article-date-headers' for +possible values." (interactive (list 'ut t)) - (let* ((tdate-regexp "^Date:[ \t]\\|^X-Sent:[ \t]") - (date-regexp (cond ((not gnus-article-date-lapsed-new-header) - tdate-regexp) - ((eq type 'lapsed) - "^X-Sent:[ \t]") - (article-lapsed-timer - "^Date:[ \t]") - (t - tdate-regexp))) - (case-fold-search t) + (let* ((case-fold-search t) (inhibit-read-only t) (inhibit-point-motion-hooks t) + (first t) pos date bface eface) (save-excursion (save-restriction - (widen) (goto-char (point-min)) - (while (or (setq date (get-text-property (setq pos (point)) - 'original-date)) - (when (setq pos (next-single-property-change - (point) 'original-date)) - (setq date (get-text-property pos 'original-date)) - t)) - (narrow-to-region - pos (if (setq pos (text-property-any pos (point-max) - 'original-date nil)) - (progn - (goto-char pos) - (if (or (bolp) (eobp)) - (point) - (1+ (point)))) - (point-max))) - (goto-char (point-min)) - (when (re-search-forward tdate-regexp nil t) - (setq bface (get-text-property (point-at-bol) 'face) - eface (get-text-property (1- (point-at-eol)) 'face))) - (goto-char (point-min)) - (setq pos nil) - ;; Delete any old Date headers. - (while (re-search-forward date-regexp nil t) - (if pos - (delete-region (point-at-bol) (progn - (gnus-article-forward-header) - (point))) - (delete-region (point-at-bol) (progn - (gnus-article-forward-header) - (forward-char -1) - (point))) - (setq pos (point)))) - (when (and (not pos) - (re-search-forward tdate-regexp nil t)) - (forward-line 1)) - (gnus-goto-char pos) - (insert (article-make-date-line date (or type 'ut))) - (unless pos - (insert "\n") - (forward-line -1)) - ;; Do highlighting. - (beginning-of-line) - (when (looking-at "\\([^:]+\\): *\\(.*\\)$") - (put-text-property (match-beginning 1) (1+ (match-end 1)) - 'face bface) - (put-text-property (match-beginning 2) (match-end 2) - 'face eface)) - (put-text-property (point-min) (1- (point-max)) 'original-date date) - (goto-char (point-max)) - (widen)))))) + (when (re-search-forward "^Date:" nil t) + (setq bface (get-text-property (point-at-bol) 'face) + eface (get-text-property (1- (point-at-eol)) 'face))) + (goto-char (point-min)) + ;; Delete any old Date headers. + (if date-position + (progn + (goto-char date-position) + (setq date (get-text-property (point) 'original-date)) + (delete-region (point) + (progn + (gnus-article-forward-header) + (point))) + (article-transform-date date type bface eface)) + (while (re-search-forward "^Date:" nil t) + (setq date (get-text-property (match-beginning 0) 'original-date)) + (delete-region (point-at-bol) (progn + (gnus-article-forward-header) + (point)))) + (article-transform-date date type bface eface)))))) + +(defun article-transform-date (date type bface eface) + (dolist (this-type (cond + ((null type) + (list 'ut)) + ((atom type) + (list type)) + (t + type))) + (insert (article-make-date-line date (or this-type 'ut)) "\n") + (forward-line -1) + (beginning-of-line) + (put-text-property (point) (1+ (point)) + 'original-date date) + (put-text-property (point) (1+ (point)) + 'gnus-date-type this-type) + ;; Do highlighting. + (when (looking-at "\\([^:]+\\): *\\(.*\\)$") + (put-text-property (match-beginning 1) (1+ (match-end 1)) + 'face bface) + (put-text-property (match-beginning 2) (match-end 2) + 'face eface)) + (forward-line 1))) (defun article-make-date-line (date type) "Return a DATE line of TYPE." - (unless (memq type '(local ut original user iso8601 lapsed english)) + (unless (memq type '(local ut original user-defined iso8601 lapsed english + combined-lapsed)) (error "Unknown conversion type: %s" type)) (condition-case () (let ((time (date-to-time date))) @@ -3524,7 +3499,7 @@ should replace the \"Date:\" one, or should be added below it." (substring date 0 (match-beginning 0)) date))) ;; Let the user define the format. - ((eq type 'user) + ((eq type 'user-defined) (let ((format (or (condition-case nil (with-current-buffer gnus-summary-buffer gnus-article-time-format) @@ -3542,49 +3517,25 @@ should replace the \"Date:\" one, or should be added below it." (format "%s%02d%02d" (if (> tz 0) "+" "-") (/ (abs tz) 3600) (/ (% (abs tz) 3600) 60))))) - ;; Do an X-Sent lapsed format. + ;; Do a lapsed format. ((eq type 'lapsed) - ;; If the date is seriously mangled, the timezone functions are - ;; liable to bug out, so we ignore all errors. - (let* ((now (current-time)) - (real-time (subtract-time now time)) - (real-sec (and real-time - (+ (* (float (car real-time)) 65536) - (cadr real-time)))) - (sec (and real-time (abs real-sec))) - num prev) - (cond - ((null real-time) - "X-Sent: Unknown") - ((zerop sec) - "X-Sent: Now") - (t - (concat - "X-Sent: " - ;; This is a bit convoluted, but basically we go - ;; through the time units for years, weeks, etc, - ;; and divide things to see whether that results - ;; in positive answers. - (mapconcat - (lambda (unit) - (if (zerop (setq num (ffloor (/ sec (cdr unit))))) - ;; The (remaining) seconds are too few to - ;; be divided into this time unit. - "" - ;; It's big enough, so we output it. - (setq sec (- sec (* num (cdr unit)))) - (prog1 - (concat (if prev ", " "") (int-to-string - (floor num)) - " " (symbol-name (car unit)) - (if (> num 1) "s" "")) - (setq prev t)))) - article-time-units "") - ;; If dates are odd, then it might appear like the - ;; article was sent in the future. - (if (> real-sec 0) - " ago" - " in the future")))))) + (concat "Date: " (article-lapsed-string time))) + ;; A combined date/lapsed format. + ((eq type 'combined-lapsed) + (let ((date-string (article-make-date-line date 'original)) + (segments 3) + lapsed-string) + (while (and + (setq lapsed-string + (concat " (" (article-lapsed-string time segments) ")")) + (> (+ (length date-string) + (length lapsed-string)) + (+ fill-column 6)) + (> segments 0)) + (setq segments (1- segments))) + (if (> segments 0) + (concat date-string lapsed-string) + date-string))) ;; Display the date in proper English ((eq type 'english) (let ((dtime (decode-time time))) @@ -3606,9 +3557,56 @@ should replace the \"Date:\" one, or should be added below it." (format "%02d" (nth 2 dtime)) ":" (format "%02d" (nth 1 dtime))))))) - (error + (foo (format "Date: %s (from Gnus)" date)))) +(defun article-lapsed-string (time &optional max-segments) + ;; If the date is seriously mangled, the timezone functions are + ;; liable to bug out, so we ignore all errors. + (let* ((now (current-time)) + (real-time (subtract-time now time)) + (real-sec (and real-time + (+ (* (float (car real-time)) 65536) + (cadr real-time)))) + (sec (and real-time (abs real-sec))) + (segments 0) + num prev) + (unless max-segments + (setq max-segments (length article-time-units))) + (cond + ((null real-time) + "Unknown") + ((zerop sec) + "Now") + (t + (concat + ;; This is a bit convoluted, but basically we go + ;; through the time units for years, weeks, etc, + ;; and divide things to see whether that results + ;; in positive answers. + (mapconcat + (lambda (unit) + (if (or (zerop (setq num (ffloor (/ sec (cdr unit))))) + (>= segments max-segments)) + ;; The (remaining) seconds are too few to + ;; be divided into this time unit. + "" + ;; It's big enough, so we output it. + (setq sec (- sec (* num (cdr unit)))) + (prog1 + (concat (if prev ", " "") (int-to-string + (floor num)) + " " (symbol-name (car unit)) + (if (> num 1) "s" "")) + (setq prev t + segments (1+ segments))))) + article-time-units "") + ;; If dates are odd, then it might appear like the + ;; article was sent in the future. + (if (> real-sec 0) + " ago" + " in the future")))))) + (defun article-date-local (&optional highlight) "Convert the current article date to the local timezone." (interactive (list t)) @@ -3631,26 +3629,42 @@ function and want to see what the date was before converting." (interactive (list t)) (article-date-ut 'lapsed highlight)) +(defun article-date-combined-lapsed (&optional highlight) + "Convert the current article date to time lapsed since it was sent." + (interactive (list t)) + (article-date-ut 'combined-lapsed highlight)) + (defun article-update-date-lapsed () "Function to be run from a timer to update the lapsed time line." (save-match-data - (let (deactivate-mark) - (save-excursion - (ignore-errors - (walk-windows - (lambda (w) - (set-buffer (window-buffer w)) - (when (eq major-mode 'gnus-article-mode) - (let ((mark (point-marker))) - (goto-char (point-min)) - (when (re-search-forward "^X-Sent:" nil t) - (article-date-lapsed t)) - (goto-char (marker-position mark)) - (move-marker mark nil)))) - nil 'visible)))))) + (let ((buffer (current-buffer))) + (ignore-errors + (walk-windows + (lambda (w) + (set-buffer (window-buffer w)) + (when (eq major-mode 'gnus-article-mode) + (let ((old-line (count-lines (point-min) (point))) + (old-column (current-column))) + (goto-char (point-min)) + (while (re-search-forward "^Date:" nil t) + (let ((type (get-text-property (match-beginning 0) 'gnus-date-type))) + (when (memq type '(lapsed combined-lapsed user-format)) + (save-excursion + (article-date-ut type t (match-beginning 0))) + (forward-line 1)))) + (goto-char (point-min)) + (when (> old-column 0) + (setq old-line (1- old-line))) + (forward-line old-line) + (end-of-line) + (when (> (current-column) old-column) + (beginning-of-line) + (forward-char old-column))))) + nil 'visible)) + (set-buffer buffer)))) (defun gnus-start-date-timer (&optional n) - "Start a timer to update the X-Sent header in the article buffers. + "Start a timer to update the Date headers in the article buffers. The numerical prefix says how frequently (in seconds) the function is to run." (interactive "p") @@ -3661,7 +3675,7 @@ is to run." (run-at-time 1 n 'article-update-date-lapsed))) (defun gnus-stop-date-timer () - "Stop the X-Sent timer." + "Stop the Date timer." (interactive) (when article-lapsed-timer (nnheader-cancel-timer article-lapsed-timer) @@ -4286,12 +4300,14 @@ If variable `gnus-use-long-file-name' is non-nil, it is article-date-english article-date-iso8601 article-date-original + article-treat-date article-date-ut article-decode-mime-words article-decode-charset article-decode-encoded-words article-date-user article-date-lapsed + article-date-combined-lapsed article-emphasize article-treat-dumbquotes article-treat-non-ascii @@ -4412,7 +4428,6 @@ commands: (gnus-update-format-specifications nil 'article-mode) (set (make-local-variable 'page-delimiter) gnus-page-delimiter) (set (make-local-variable 'gnus-page-broken) nil) - (make-local-variable 'gnus-button-marker-list) (make-local-variable 'gnus-article-current-summary) (make-local-variable 'gnus-article-mime-handles) (make-local-variable 'gnus-article-decoded-p) @@ -4435,10 +4450,6 @@ commands: (mm-enable-multibyte) (gnus-run-mode-hooks 'gnus-article-mode-hook)) -(defvar gnus-button-marker-list nil - "Regexp matching any of the regexps from `gnus-button-alist'. -Internal variable.") - (defun gnus-article-setup-buffer () "Initialize the article buffer." (let* ((name (if gnus-single-article-buffer "*Article*" @@ -4482,8 +4493,6 @@ Internal variable.") (setq gnus-article-mime-handle-alist nil) (buffer-disable-undo) (setq buffer-read-only t) - ;; This list just keeps growing if we don't reset it. - (setq gnus-button-marker-list nil) (unless (eq major-mode 'gnus-article-mode) (gnus-article-mode)) (setq truncate-lines gnus-article-truncate-lines) @@ -4495,6 +4504,9 @@ Internal variable.") (setq gnus-summary-buffer (gnus-summary-buffer-name gnus-newsgroup-name)) (gnus-summary-set-local-parameters gnus-newsgroup-name) + (when (and gnus-article-update-date-headers + (not article-lapsed-timer)) + (gnus-start-date-timer gnus-article-update-date-headers)) (current-buffer))))) ;; Set article window start at LINE, where LINE is the number of lines @@ -5255,15 +5267,7 @@ Compressed files like .gz and .bz2 are decompressed." (if (mm-handle-undisplayer handle) (mm-remove-part handle)))) (forward-line 2) - (mm-insert-inline - handle - (if (or coding-system - (and charset - (setq coding-system - (mm-charset-to-coding-system charset)) - (not (eq coding-system 'ascii)))) - (mm-decode-coding-string contents coding-system) - (mm-string-to-multibyte contents))) + (mm-display-inline handle) (goto-char b))))) (defun gnus-mime-set-charset-parameters (handle charset) @@ -5907,18 +5911,7 @@ If displaying \"text/html\" is discouraged \(see (forward-line -1) (setq beg (point))) (gnus-article-insert-newline) - (mm-insert-inline - handle - (let ((charset (or (mail-content-type-get (mm-handle-type handle) - 'charset) - (and (equal type "text/calendar") 'utf-8)))) - (cond ((not charset) - (mm-string-as-multibyte (mm-get-part handle))) - ((eq charset 'gnus-decoded) - (with-current-buffer (mm-handle-buffer handle) - (buffer-string))) - (t - (mm-decode-string (mm-get-part handle) charset))))) + (mm-display-inline handle) (goto-char (point-max)))) ;; Do highlighting. (save-excursion @@ -6289,7 +6282,7 @@ Argument LINES specifies lines to be scrolled up." (save-excursion (end-of-line) (and (pos-visible-in-window-p) ;Not continuation line. - (>= (1+ (point)) (point-max))))) ;Allow for trailing newline. + (>= (point) (point-max))))) ;; Nothing in this page. (if (or (not gnus-page-broken) (save-excursion @@ -6453,6 +6446,8 @@ not have a face in `gnus-article-boring-faces'." (ding) (unless (member keys nosave-in-article) (set-buffer gnus-article-current-summary)) + (when (get func 'disabled) + (error "Function %s disabled" func)) (call-interactively func) (setq new-sum-point (point))) (when (member keys nosave-but-article) @@ -6481,8 +6476,11 @@ not have a face in `gnus-article-boring-faces'." (select-window win)))) (setq in-buffer (current-buffer)) ;; We disable the pick minor mode commands. - (if (and (setq func (let (gnus-pick-mode) - (key-binding keys t))) + (setq func (let (gnus-pick-mode) + (key-binding keys t))) + (when (get func 'disabled) + (error "Function %s disabled" func)) + (if (and func (functionp func) (condition-case code (progn @@ -7489,17 +7487,17 @@ positives are possible." ;; Info links like `C-h i d m Gnus RET' or `C-h i d m Gnus RET i partial RET' 0 (>= gnus-button-emacs-level 1) gnus-button-handle-info-keystrokes 0) ;; This is custom - ("M-x[ \t\n]\\(customize-[^ ]+\\)[ \t\n]RET[ \t\n]\\([^ ]+\\)[ \t\n]RET" 0 + ("M-x[ \t\n]\\(customize-[^ ]+\\)[ \t\n]RET[ \t\n]\\([^ ]+\\)[ \t\n]RET\\>" 0 (>= gnus-button-emacs-level 1) gnus-button-handle-custom 1 2) ;; Emacs help commands - ("M-x[ \t\n]+apropos[ \t\n]+RET[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET" + ("M-x[ \t\n]+apropos[ \t\n]+RET[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET\\>" ;; regexp doesn't match arguments containing ` '. 0 (>= gnus-button-emacs-level 1) gnus-button-handle-apropos 1) - ("M-x[ \t\n]+apropos-command[ \t\n]+RET[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET" + ("M-x[ \t\n]+apropos-command[ \t\n]+RET[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET\\>" 0 (>= gnus-button-emacs-level 1) gnus-button-handle-apropos-command 1) - ("M-x[ \t\n]+apropos-variable[ \t\n]+RET[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET" + ("M-x[ \t\n]+apropos-variable[ \t\n]+RET[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET\\>" 0 (>= gnus-button-emacs-level 1) gnus-button-handle-apropos-variable 1) - ("M-x[ \t\n]+apropos-documentation[ \t\n]+RET[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET" + ("M-x[ \t\n]+apropos-documentation[ \t\n]+RET[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET\\>" 0 (>= gnus-button-emacs-level 1) gnus-button-handle-apropos-documentation 1) ;; The following entries may lead to many false positives so don't enable ;; them by default (use a high button level). @@ -7514,11 +7512,11 @@ positives are possible." 0 (>= gnus-button-emacs-level 9) gnus-button-handle-symbol 1) ("(setq[ \t\n]+\\([a-z][a-z0-9]+-[-a-z0-9]+\\)[ \t\n]+.+)" 1 (>= gnus-button-emacs-level 7) gnus-button-handle-describe-variable 1) - ("\\bM-x[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET" + ("\\bM-x[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET\\>" 1 (>= gnus-button-emacs-level 7) gnus-button-handle-describe-function 1) - ("\\b\\(C-h\\|<?[Ff]1>?\\)[ \t\n]+f[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET" + ("\\b\\(C-h\\|<?[Ff]1>?\\)[ \t\n]+f[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET\\>" 0 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-function 2) - ("\\b\\(C-h\\|<?[Ff]1>?\\)[ \t\n]+v[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET" + ("\\b\\(C-h\\|<?[Ff]1>?\\)[ \t\n]+v[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET\\>" 0 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-variable 2) ("`\\(\\(C-h\\|<?[Ff]1>?\\)[ \t\n]+k[ \t\n]+\\([^']+\\)\\)'" ;; Unlike the other regexps we really have to require quoting @@ -7657,7 +7655,7 @@ do the highlighting. See the documentation for those functions." (gnus-article-highlight-headers) (gnus-article-highlight-citation force) (gnus-article-highlight-signature) - (gnus-article-add-buttons force) + (gnus-article-add-buttons) (gnus-article-add-buttons-to-head)) (defun gnus-article-highlight-some (&optional force) @@ -7725,28 +7723,16 @@ It does this by highlighting everything after "Say whether PROP exists in the region." (text-property-not-all b e prop nil)) -(defun gnus-article-add-buttons (&optional force) +(defun gnus-article-add-buttons () "Find external references in the article and make buttons of them. \"External references\" are things like Message-IDs and URLs, as specified by `gnus-button-alist'." - (interactive (list 'force)) + (interactive) (gnus-with-article-buffer (let ((inhibit-point-motion-hooks t) (case-fold-search t) (alist gnus-button-alist) beg entry regexp) - ;; Remove all old markers. - (let (marker entry new-list) - (while (setq marker (pop gnus-button-marker-list)) - (if (or (< marker (point-min)) (>= marker (point-max))) - (push marker new-list) - (goto-char marker) - (when (setq entry (gnus-button-entry)) - (put-text-property (match-beginning (nth 1 entry)) - (match-end (nth 1 entry)) - 'gnus-callback nil)) - (set-marker marker nil))) - (setq gnus-button-marker-list new-list)) ;; We skip the headers. (article-goto-body) (setq beg (point)) @@ -7757,18 +7743,16 @@ specified by `gnus-button-alist'." (let ((start (match-beginning (nth 1 entry))) (end (match-end (nth 1 entry))) (from (match-beginning 0))) - (when (and (or (eq t (nth 2 entry)) - (eval (nth 2 entry))) + (when (and (eval (nth 2 entry)) (not (gnus-button-in-region-p start end 'gnus-callback))) ;; That optional form returned non-nil, so we add the ;; button. (setq from (set-marker (make-marker) from)) - (push from gnus-button-marker-list) (unless (and (eq (car entry) 'gnus-button-url-regexp) (gnus-article-extend-url-button from start end)) (gnus-article-add-button start end - 'gnus-button-push from) + 'gnus-button-push (list from entry)) (gnus-put-text-property start end 'gnus-string (buffer-substring-no-properties @@ -7915,41 +7899,38 @@ url is put as the `gnus-button-url' overlay property on the button." (let ((gnus-article-mime-handle-alist-1 gnus-article-mime-handle-alist)) (gnus-set-mode-line 'article)))) -(defun gnus-button-entry () - ;; Return the first entry in `gnus-button-alist' matching this place. - (let ((alist gnus-button-alist) - (entry nil)) - (while alist - (setq entry (pop alist)) - (if (looking-at (eval (car entry))) - (setq alist nil) - (setq entry nil))) - entry)) - -(defun gnus-button-push (marker) +(defun gnus-button-push (marker-and-entry) ;; Push button starting at MARKER. (save-excursion - (goto-char marker) - (let* ((entry (gnus-button-entry)) - (inhibit-point-motion-hooks t) - (fun (nth 3 entry)) - (args (or (and (eq (car entry) 'gnus-button-url-regexp) - (get-char-property marker 'gnus-button-url)) - (mapcar (lambda (group) - (let ((string (match-string group))) - (set-text-properties - 0 (length string) nil string) - string)) - (nthcdr 4 entry))))) - (cond - ((fboundp fun) - (apply fun args)) - ((and (boundp fun) - (fboundp (symbol-value fun))) - (apply (symbol-value fun) args)) - (t - (gnus-message 1 "You must define `%S' to use this button" - (cons fun args))))))) + (let* ((marker (car marker-and-entry)) + (entry (cadr marker-and-entry)) + (regexp (car entry)) + (inhibit-point-motion-hooks t)) + (goto-char marker) + ;; This is obviously true, or something bad is happening :) + ;; But we need it to have the match-data + (when (looking-at (or (if (symbolp regexp) + (symbol-value regexp) + regexp))) + (let ((fun (nth 3 entry)) + (args (or (and (eq (car entry) 'gnus-button-url-regexp) + (get-char-property marker 'gnus-button-url)) + (mapcar (lambda (group) + (let ((string (match-string group))) + (set-text-properties + 0 (length string) nil string) + string)) + (nthcdr 4 entry))))) + + (cond + ((fboundp fun) + (apply fun args)) + ((and (boundp fun) + (fboundp (symbol-value fun))) + (apply (symbol-value fun) args)) + (t + (gnus-message 1 "You must define `%S' to use this button" + (cons fun args))))))))) (defun gnus-parse-news-url (url) (let (scheme server port group message-id articles) @@ -8060,7 +8041,7 @@ url is put as the `gnus-button-url' overlay property on the button." (if (string-match (concat "\\b\\(C-h\\|<?[Ff]1>?\\)[ \t\n]+i[ \t\n]+d?[ \t\n]?m[ \t\n]+" "\\([^ ]+ ?[^ ]+\\)[ \t\n]+RET" - "\\([ \t\n]+i[ \t\n]+[^ ]+ ?[^ ]+[ \t\n]+RET" + "\\([ \t\n]+i[ \t\n]+[^ ]+ ?[^ ]+[ \t\n]+RET\\>" "\\(?:[ \t\n,]*\\)\\)?") url) (setq node (match-string 2 url) @@ -8070,7 +8051,7 @@ url is put as the `gnus-button-url' overlay property on the button." (Info-directory) (Info-menu node) (when (> (length indx) 0) - (string-match (concat "[ \t\n]+i[ \t\n]+\\([^ ]+ ?[^ ]+\\)[ \t\n]+RET" + (string-match (concat "[ \t\n]+i[ \t\n]+\\([^ ]+ ?[^ ]+\\)[ \t\n]+RET\\>" "\\([ \t\n,]*\\)") indx) (setq comma (match-string 2 indx)) @@ -8086,6 +8067,7 @@ url is put as the `gnus-button-url' overlay property on the button." (Info-index-next 1))) nil))) +(autoload 'pgg-snarf-keys-region "pgg") ;; Called after pgg-snarf-keys-region, which autoloads pgg.el. (declare-function pgg-display-output-buffer "pgg" (start end status)) diff --git a/lisp/gnus/gnus-async.el b/lisp/gnus/gnus-async.el index 9bb28f3a05d..b7e24b8dcfd 100644 --- a/lisp/gnus/gnus-async.el +++ b/lisp/gnus/gnus-async.el @@ -1,7 +1,6 @@ ;;; gnus-async.el --- asynchronous support for Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news diff --git a/lisp/gnus/gnus-bcklg.el b/lisp/gnus/gnus-bcklg.el index 68233328802..d3fee3538b8 100644 --- a/lisp/gnus/gnus-bcklg.el +++ b/lisp/gnus/gnus-bcklg.el @@ -1,7 +1,6 @@ ;;; gnus-bcklg.el --- backlog functions for Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news diff --git a/lisp/gnus/gnus-bookmark.el b/lisp/gnus/gnus-bookmark.el index 1fcbf352f14..f86c94571a7 100644 --- a/lisp/gnus/gnus-bookmark.el +++ b/lisp/gnus/gnus-bookmark.el @@ -1,7 +1,6 @@ ;;; gnus-bookmark.el --- Bookmarks in Gnus -;; Copyright (C) 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2006-2011 Free Software Foundation, Inc. ;; Author: Bastien Guerry <bzg AT altern DOT org> ;; Keywords: news diff --git a/lisp/gnus/gnus-cache.el b/lisp/gnus/gnus-cache.el index 50ab1c64a23..203368f76e2 100644 --- a/lisp/gnus/gnus-cache.el +++ b/lisp/gnus/gnus-cache.el @@ -1,7 +1,6 @@ ;;; gnus-cache.el --- cache interface for Gnus -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news diff --git a/lisp/gnus/gnus-cite.el b/lisp/gnus/gnus-cite.el index aa719076e36..d205437b811 100644 --- a/lisp/gnus/gnus-cite.el +++ b/lisp/gnus/gnus-cite.el @@ -1,7 +1,6 @@ ;;; gnus-cite.el --- parse citations in articles for Gnus -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995-2011 Free Software Foundation, Inc. ;; Author: Per Abhiddenware diff --git a/lisp/gnus/gnus-cus.el b/lisp/gnus/gnus-cus.el index 6da91bdc266..2f99abba22c 100644 --- a/lisp/gnus/gnus-cus.el +++ b/lisp/gnus/gnus-cus.el @@ -1,7 +1,6 @@ ;;; gnus-cus.el --- customization commands for Gnus -;; Copyright (C) 1996, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996, 1999-2011 Free Software Foundation, Inc. ;; Author: Per Abrahamsen <abraham@dina.kvl.dk> ;; Keywords: news diff --git a/lisp/gnus/gnus-delay.el b/lisp/gnus/gnus-delay.el index a257e5495a7..a06a510ecdd 100644 --- a/lisp/gnus/gnus-delay.el +++ b/lisp/gnus/gnus-delay.el @@ -1,7 +1,6 @@ ;;; gnus-delay.el --- Delayed posting of articles -;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2001-2011 Free Software Foundation, Inc. ;; Author: Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> ;; Keywords: mail, news, extensions diff --git a/lisp/gnus/gnus-demon.el b/lisp/gnus/gnus-demon.el index ad40117b446..2a45b9363f4 100644 --- a/lisp/gnus/gnus-demon.el +++ b/lisp/gnus/gnus-demon.el @@ -1,7 +1,6 @@ ;;; gnus-demon.el --- daemonic Gnus behavior -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news diff --git a/lisp/gnus/gnus-diary.el b/lisp/gnus/gnus-diary.el index c2b95c7099b..0b5a7ebf1f9 100644 --- a/lisp/gnus/gnus-diary.el +++ b/lisp/gnus/gnus-diary.el @@ -1,7 +1,6 @@ ;;; gnus-diary.el --- Wrapper around the NNDiary Gnus back end -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Didier Verna <didier@xemacs.org> ;; Maintainer: Didier Verna <didier@xemacs.org> diff --git a/lisp/gnus/gnus-dired.el b/lisp/gnus/gnus-dired.el index 8b6d3911e11..c38b0cd3606 100644 --- a/lisp/gnus/gnus-dired.el +++ b/lisp/gnus/gnus-dired.el @@ -1,7 +1,6 @@ ;;; gnus-dired.el --- utility functions where gnus and dired meet -;; Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-1999, 2001-2011 Free Software Foundation, Inc. ;; Authors: Benjamin Rutt <brutt@bloomington.in.us>, ;; Shenghuo Zhu <zsh@cs.rochester.edu> diff --git a/lisp/gnus/gnus-draft.el b/lisp/gnus/gnus-draft.el index e397a701da8..78ef713c404 100644 --- a/lisp/gnus/gnus-draft.el +++ b/lisp/gnus/gnus-draft.el @@ -1,7 +1,6 @@ ;;; gnus-draft.el --- draft message support for Gnus -;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news @@ -69,7 +68,8 @@ (gnus-draft-mode ;; Set up the menu. (when (gnus-visual-p 'draft-menu 'menu) - (gnus-draft-make-menu-bar))))) + (gnus-draft-make-menu-bar)) + (add-hook 'gnus-summary-prepare-exit-hook 'gnus-draft-clear-marks t t)))) ;;; Commands @@ -221,7 +221,8 @@ Obeys the standard process/prefix convention." (let ((message-sending-message (format "Sending message %d of %d..." (- total (length articles)) total))) - (gnus-draft-send article)))))))) + (gnus-draft-send article)))))) + (gnus-group-refresh-group "nndraft:queue"))) ;;;###autoload (defun gnus-draft-reminder () @@ -325,6 +326,12 @@ Obeys the standard process/prefix convention." (pop-to-buffer buff t))) (error "The draft %s is under edit" file))))) +(defun gnus-draft-clear-marks () + (setq gnus-newsgroup-reads nil + gnus-newsgroup-marked nil + gnus-newsgroup-unreads + (gnus-uncompress-range (gnus-active gnus-newsgroup-name)))) + (provide 'gnus-draft) ;;; gnus-draft.el ends here diff --git a/lisp/gnus/gnus-dup.el b/lisp/gnus/gnus-dup.el index be909ccd798..eaecc07d767 100644 --- a/lisp/gnus/gnus-dup.el +++ b/lisp/gnus/gnus-dup.el @@ -1,7 +1,6 @@ ;;; gnus-dup.el --- suppression of duplicate articles in Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news diff --git a/lisp/gnus/gnus-eform.el b/lisp/gnus/gnus-eform.el index 96b645686e9..4075e7a7625 100644 --- a/lisp/gnus/gnus-eform.el +++ b/lisp/gnus/gnus-eform.el @@ -1,7 +1,6 @@ ;;; gnus-eform.el --- a mode for editing forms for Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news diff --git a/lisp/gnus/gnus-ems.el b/lisp/gnus/gnus-ems.el index d7d90767124..bc85e4960d4 100644 --- a/lisp/gnus/gnus-ems.el +++ b/lisp/gnus/gnus-ems.el @@ -1,7 +1,6 @@ ;;; gnus-ems.el --- functions for making Gnus work under different Emacsen -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news diff --git a/lisp/gnus/gnus-fun.el b/lisp/gnus/gnus-fun.el index 0f28bf5e5ea..cb495623af2 100644 --- a/lisp/gnus/gnus-fun.el +++ b/lisp/gnus/gnus-fun.el @@ -1,6 +1,6 @@ ;;; gnus-fun.el --- various frivolous extension functions to Gnus -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news diff --git a/lisp/gnus/gnus-gravatar.el b/lisp/gnus/gnus-gravatar.el index 1bd64e9533f..7208889a163 100644 --- a/lisp/gnus/gnus-gravatar.el +++ b/lisp/gnus/gnus-gravatar.el @@ -1,6 +1,6 @@ ;;; gnus-gravatar.el --- Gnus Gravatar support -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. ;; Author: Julien Danjou <julien@danjou.info> ;; Keywords: news @@ -54,9 +54,10 @@ If nil, default to `gravatar-size'." (defun gnus-gravatar-transform-address (header category &optional force) (gnus-with-article-headers (let* ((mail-extr-disable-voodoo t) + (mail-extr-ignore-realname-equals-mailbox-name nil) (addresses (mail-extract-address-components (or (mail-fetch-field header) "") t)) - (gravatar-size gnus-gravatar-size) + (gravatar-size (or gnus-gravatar-size gravatar-size)) name) (dolist (address addresses) (when (and (setq name (car address)) @@ -79,37 +80,44 @@ If nil, default to `gravatar-size'." "Insert GRAVATAR for ADDRESS in HEADER in current article buffer. Set image category to CATEGORY." (unless (eq gravatar 'error) - (gnus-with-article-headers - ;; The buffer can be gone at this time - (when (buffer-live-p (current-buffer)) - (gnus-article-goto-header header) - (mail-header-narrow-to-field) - (let ((real-name (car address)) - (mail-address (cadr address))) - (when (if real-name - (re-search-forward - (concat (gnus-replace-in-string - (regexp-quote real-name) "[\t ]+" "[\t\n ]+") - "\\|" - (regexp-quote mail-address)) - nil t) - (search-forward mail-address nil t)) - (goto-char (1- (match-beginning 0))) - ;; If we're on the " quoting the name, go backward - (when (looking-at "[\"<]") - (goto-char (1- (point)))) - ;; Do not do anything if there's already a gravatar. This can - ;; happens if the buffer has been regenerated in the mean time, for - ;; example we were fetching someaddress, and then we change to - ;; another mail with the same someaddress. - (unless (memq 'gnus-gravatar (text-properties-at (point))) - (let ((point (point))) - (unless (featurep 'xemacs) - (setq gravatar (append gravatar gnus-gravatar-properties))) - (gnus-put-image gravatar nil category) - (put-text-property point (point) 'gnus-gravatar address) - (gnus-add-wash-type category) - (gnus-add-image category gravatar))))))))) + (with-current-buffer gnus-article-buffer + (let ((mark (point-marker)) + (inhibit-read-only t) + (inhibit-point-motion-hooks t) + (case-fold-search t)) + (save-restriction + (article-narrow-to-head) + ;; The buffer can be gone at this time + (when (buffer-live-p (current-buffer)) + (gnus-article-goto-header header) + (mail-header-narrow-to-field) + (let ((real-name (car address)) + (mail-address (cadr address))) + (when (if real-name + (re-search-forward + (concat (gnus-replace-in-string + (regexp-quote real-name) "[\t ]+" "[\t\n ]+") + "\\|" + (regexp-quote mail-address)) + nil t) + (search-forward mail-address nil t)) + (goto-char (1- (match-beginning 0))) + ;; If we're on the " quoting the name, go backward + (when (looking-at "[\"<]") + (goto-char (1- (point)))) + ;; Do not do anything if there's already a gravatar. This can + ;; happens if the buffer has been regenerated in the mean time, for + ;; example we were fetching someaddress, and then we change to + ;; another mail with the same someaddress. + (unless (memq 'gnus-gravatar (text-properties-at (point))) + (let ((point (point))) + (unless (featurep 'xemacs) + (setq gravatar (append gravatar gnus-gravatar-properties))) + (gnus-put-image gravatar (buffer-substring (point) (1+ point)) category) + (put-text-property point (point) 'gnus-gravatar address) + (gnus-add-wash-type category) + (gnus-add-image category gravatar))))))) + (goto-char (marker-position mark)))))) ;;;###autoload (defun gnus-treat-from-gravatar (&optional force) diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 5ece1457163..30cd1275e7b 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -1,7 +1,6 @@ ;;; gnus-group.el --- group mode commands for Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news @@ -1677,6 +1676,13 @@ and ends at END." " ")) " ")) + +(defun gnus-group-refresh-group (group) + (gnus-activate-group group) + (gnus-get-unread-articles-in-group (gnus-get-info group) + (gnus-active group)) + (gnus-group-update-group group)) + (defun gnus-group-update-group (group &optional visible-only) "Update all lines where GROUP appear. If VISIBLE-ONLY is non-nil, the group won't be displayed if it isn't @@ -2461,7 +2467,7 @@ If PROMPT (the prefix) is a number, use the prompt specified in `gnus-group-jump-to-group-prompt'." (interactive (list (gnus-group-completing-read - nil nil (gnus-read-active-file-p) + nil nil nil (if current-prefix-arg (cdr (assq current-prefix-arg gnus-group-jump-to-group-prompt)) (or (and (stringp gnus-group-jump-to-group-prompt) @@ -2734,6 +2740,15 @@ server." (lambda (group) (gnus-group-delete-group group nil t)))))) +(defun gnus-group-delete-articles (group) + "Delete all articles in the current group." + (interactive (list (gnus-group-group-name))) + (let ((articles (gnus-uncompress-range (gnus-active group)))) + (when (gnus-yes-or-no-p + (format "Do you really want to delete these %d articles forever? " + (length articles))) + (gnus-request-expire-articles articles group 'force)))) + (defun gnus-group-delete-group (group &optional force no-prompt) "Delete the current group. Only meaningful with editable groups. If FORCE (the prefix) is non-nil, all the articles in the group will @@ -3781,6 +3796,8 @@ of groups killed." gnus-list-of-killed-groups)) (gnus-group-change-level (if entry entry group) gnus-level-killed (if entry nil level)) + (when (numberp (gnus-group-unread group)) + (gnus-request-update-group-status group 'unsubscribe)) (message "Killed group %s" (gnus-group-decoded-name group))) ;; If there are lots and lots of groups to be killed, we use ;; this thing instead. @@ -3803,7 +3820,9 @@ of groups killed." (setq gnus-zombie-list (delete group gnus-zombie-list)))) ;; There may be more than one instance displayed. (while (gnus-group-goto-group group) - (gnus-delete-line))) + (gnus-delete-line)) + (when (numberp (gnus-group-unread group)) + (gnus-request-update-group-status group 'unsubscribe))) (gnus-make-hashtable-from-newsrc-alist)) (gnus-group-position-point) @@ -3831,6 +3850,7 @@ yanked) a list of yanked groups is returned." (and prev (gnus-group-entry prev)) t) (gnus-group-insert-group-line-info group) + (gnus-request-update-group-status group 'subscribe) (gnus-undo-register `(when (gnus-group-goto-group ,group) (gnus-group-kill-group 1)))) diff --git a/lisp/gnus/gnus-html.el b/lisp/gnus/gnus-html.el index 63a14b204fb..7c0d63fb246 100644 --- a/lisp/gnus/gnus-html.el +++ b/lisp/gnus/gnus-html.el @@ -1,6 +1,6 @@ ;;; gnus-html.el --- Render HTML in a buffer. -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: html, web @@ -395,7 +395,7 @@ Use ALT-TEXT for the image string." 4) (setq args (nconc args (list t)))) (ignore-errors - (apply #'url-retrieve args)))) + (push (apply #'url-retrieve args) gnus-buffers)))) (defun gnus-html-image-fetched (status buffer image) "Callback function called when image has been fetched." diff --git a/lisp/gnus/gnus-int.el b/lisp/gnus/gnus-int.el index 43284540125..a67063bb970 100644 --- a/lisp/gnus/gnus-int.el +++ b/lisp/gnus/gnus-int.el @@ -1,7 +1,6 @@ ;;; gnus-int.el --- backend interface functions for Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news @@ -473,6 +472,18 @@ If FETCH-OLD, retrieve all headers (or some subset thereof) in the group." (funcall (gnus-get-function gnus-command-method 'request-type) (gnus-group-real-name group) article)))) +(defun gnus-request-update-group-status (group status) + "Change the status of a group. +Valid statuses include `subscribe' and `unsubscribe'." + (let ((gnus-command-method (gnus-find-method-for-group group))) + (if (not (gnus-check-backend-function + 'request-update-group-status (car gnus-command-method))) + nil + (funcall + (gnus-get-function gnus-command-method 'request-update-group-status) + (gnus-group-real-name group) status + (nth 1 gnus-command-method))))) + (defun gnus-request-set-mark (group action) "Set marks on articles in the back end." (let ((gnus-command-method (gnus-find-method-for-group group))) @@ -627,8 +638,7 @@ If GROUP is nil, all groups on GNUS-COMMAND-METHOD are scanned." (when (gnus-check-backend-function 'request-marks (car gnus-command-method)) (let ((group (gnus-info-group info))) - (and (funcall (gnus-get-function gnus-command-method - 'request-update-info) + (and (funcall (gnus-get-function gnus-command-method 'request-marks) (gnus-group-real-name group) info (nth 1 gnus-command-method)) ;; If the minimum article number is greater than 1, then all @@ -699,7 +709,9 @@ If GROUP is nil, all groups on GNUS-COMMAND-METHOD are scanned." (if (stringp group) (gnus-group-real-name group) group) (cadr gnus-command-method) last))) - (when (and gnus-agent (gnus-agent-method-p gnus-command-method)) + (when (and gnus-agent + (gnus-agent-method-p gnus-command-method) + (cdr result)) (gnus-agent-regenerate-group group (list (cdr result)))) result)) diff --git a/lisp/gnus/gnus-kill.el b/lisp/gnus/gnus-kill.el index 17a6266c9b9..fdbe125ff10 100644 --- a/lisp/gnus/gnus-kill.el +++ b/lisp/gnus/gnus-kill.el @@ -1,7 +1,6 @@ ;;; gnus-kill.el --- kill commands for Gnus -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995-2011 Free Software Foundation, Inc. ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet> ;; Lars Magne Ingebrigtsen <larsi@gnus.org> diff --git a/lisp/gnus/gnus-logic.el b/lisp/gnus/gnus-logic.el index 9637ebfb387..51b44e6052d 100644 --- a/lisp/gnus/gnus-logic.el +++ b/lisp/gnus/gnus-logic.el @@ -1,7 +1,6 @@ ;;; gnus-logic.el --- advanced scoring code for Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news diff --git a/lisp/gnus/gnus-mh.el b/lisp/gnus/gnus-mh.el index 7df4b466292..1c9d31ab6c4 100644 --- a/lisp/gnus/gnus-mh.el +++ b/lisp/gnus/gnus-mh.el @@ -1,7 +1,6 @@ ;;; gnus-mh.el --- mh-e interface for Gnus -;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994-2011 Free Software Foundation, Inc. ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet> ;; Lars Magne Ingebrigtsen <larsi@gnus.org> diff --git a/lisp/gnus/gnus-ml.el b/lisp/gnus/gnus-ml.el index 5c42ef515fa..d99680f5924 100644 --- a/lisp/gnus/gnus-ml.el +++ b/lisp/gnus/gnus-ml.el @@ -1,7 +1,6 @@ ;;; gnus-ml.el --- Mailing list minor mode for Gnus -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; Author: Julien Gilles <jgilles@free.fr> ;; Keywords: news, mail diff --git a/lisp/gnus/gnus-mlspl.el b/lisp/gnus/gnus-mlspl.el index 509e391480c..ccc145b7e29 100644 --- a/lisp/gnus/gnus-mlspl.el +++ b/lisp/gnus/gnus-mlspl.el @@ -1,7 +1,6 @@ ;;; gnus-mlspl.el --- a group params-based mail splitting mechanism -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Alexandre Oliva <oliva@lsd.ic.unicamp.br> ;; Keywords: news, mail diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index d77abfa1c61..08fef2327ad 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el @@ -1,7 +1,6 @@ ;;; gnus-msg.el --- mail and post interface for Gnus -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995-2011 Free Software Foundation, Inc. ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet> ;; Lars Magne Ingebrigtsen <larsi@gnus.org> @@ -243,10 +242,10 @@ See also the `mml-default-sign-method' variable." :group 'gnus-message :type 'boolean) -(defcustom gnus-message-replyencrypt - nil +(defcustom gnus-message-replyencrypt t "Automatically encrypt replies to encrypted messages. See also the `mml-default-encrypt-method' variable." + :version "24.1" :group 'gnus-message :type 'boolean) @@ -476,7 +475,7 @@ Thank you for your help in stamping out bugs. ;;;###autoload (defun gnus-msg-mail (&optional to subject other-headers continue - switch-action yank-action send-actions) + switch-action yank-action send-actions return-action) "Start editing a mail message to be sent. Like `message-mail', but with Gnus paraphernalia, particularly the Gcc: header for archiving purposes." @@ -485,7 +484,7 @@ Gcc: header for archiving purposes." mail-buf) (gnus-setup-message 'message (message-mail to subject other-headers continue - nil yank-action send-actions)) + nil yank-action send-actions return-action)) (when switch-action (setq mail-buf (current-buffer)) (switch-to-buffer buf) diff --git a/lisp/gnus/gnus-picon.el b/lisp/gnus/gnus-picon.el index d24f04e0215..dc6feeec0ab 100644 --- a/lisp/gnus/gnus-picon.el +++ b/lisp/gnus/gnus-picon.el @@ -1,7 +1,6 @@ ;;; gnus-picon.el --- displaying pretty icons in Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news xpm annotation glyph faces diff --git a/lisp/gnus/gnus-range.el b/lisp/gnus/gnus-range.el index a4262df5328..794d1642cdd 100644 --- a/lisp/gnus/gnus-range.el +++ b/lisp/gnus/gnus-range.el @@ -1,7 +1,6 @@ ;;; gnus-range.el --- range and sequence functions for Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el index 79080f21b7a..cef173ce1ec 100644 --- a/lisp/gnus/gnus-registry.el +++ b/lisp/gnus/gnus-registry.el @@ -1,7 +1,6 @@ ;;; gnus-registry.el --- article registry for Gnus -;;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;;; Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Author: Ted Zlatanov <tzz@lifelogs.com> ;; Keywords: news registry diff --git a/lisp/gnus/gnus-salt.el b/lisp/gnus/gnus-salt.el index a72d594a386..43a8eba4bed 100644 --- a/lisp/gnus/gnus-salt.el +++ b/lisp/gnus/gnus-salt.el @@ -1,7 +1,6 @@ ;;; gnus-salt.el --- alternate summary mode interfaces for Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-1999, 2001-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el index a9c666e246e..e376b7a7b6e 100644 --- a/lisp/gnus/gnus-score.el +++ b/lisp/gnus/gnus-score.el @@ -1,7 +1,6 @@ ;;; gnus-score.el --- scoring code for Gnus -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995-2011 Free Software Foundation, Inc. ;; Author: Per Abrahamsen <amanda@iesd.auc.dk> ;; Lars Magne Ingebrigtsen <larsi@gnus.org> diff --git a/lisp/gnus/gnus-setup.el b/lisp/gnus/gnus-setup.el index d5578ff6933..bd7c3a77c36 100644 --- a/lisp/gnus/gnus-setup.el +++ b/lisp/gnus/gnus-setup.el @@ -1,7 +1,6 @@ ;;; gnus-setup.el --- Initialization & Setup for Gnus 5 -;; Copyright (C) 1995, 1996, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995-1996, 2000-2011 Free Software Foundation, Inc. ;; Author: Steven L. Baur <steve@miranova.com> ;; Keywords: news diff --git a/lisp/gnus/gnus-sieve.el b/lisp/gnus/gnus-sieve.el index a7ddbf08f7f..376dd4277a0 100644 --- a/lisp/gnus/gnus-sieve.el +++ b/lisp/gnus/gnus-sieve.el @@ -1,6 +1,6 @@ ;;; gnus-sieve.el --- Utilities to manage sieve scripts for Gnus -;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2001-2011 Free Software Foundation, Inc. ;; Author: NAGY Andras <nagya@inf.elte.hu>, ;; Simon Josefsson <simon@josefsson.org> diff --git a/lisp/gnus/gnus-spec.el b/lisp/gnus/gnus-spec.el index 31e440e22dd..4682f512476 100644 --- a/lisp/gnus/gnus-spec.el +++ b/lisp/gnus/gnus-spec.el @@ -1,7 +1,6 @@ ;;; gnus-spec.el --- format spec functions for Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el index 19fd5fe6636..9bf2d37a3e4 100644 --- a/lisp/gnus/gnus-srvr.el +++ b/lisp/gnus/gnus-srvr.el @@ -1,7 +1,6 @@ ;;; gnus-srvr.el --- virtual server support for Gnus -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news @@ -766,7 +765,8 @@ claim them." (with-current-buffer nntp-server-buffer (let ((cur (current-buffer))) (goto-char (point-min)) - (unless (string= gnus-ignored-newsgroups "") + (unless (or (null gnus-ignored-newsgroups) + (string= gnus-ignored-newsgroups "")) (delete-matching-lines gnus-ignored-newsgroups)) ;; We treat NNTP as a special case to avoid problems with ;; garbage group names like `"foo' that appear in some badly @@ -992,7 +992,8 @@ how new groups will be entered into the group buffer." ;; mechanism for new group subscription. (gnus-call-subscribe-functions gnus-browse-subscribe-newsgroup-method - group))) + group) + (gnus-request-update-group-status group 'subscribe))) (delete-char 1) (insert (let ((lvl (gnus-group-level group))) (cond diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index 8663d67fd0a..3879df3c4b6 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -1,7 +1,6 @@ ;;; gnus-start.el --- startup functions for Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news @@ -86,14 +85,6 @@ If a file with the `.el' or `.elc' suffixes exists, it will be read instead." :group 'gnus-start :type '(choice file (const nil))) -(defcustom gnus-default-subscribed-newsgroups nil - "List of newsgroups to subscribe, when a user runs Gnus the first time. -The value should be a list of strings. -If it is t, Gnus will not do anything special the first time it is -started; it'll just use the normal newsgroups subscription methods." - :group 'gnus-start - :type '(choice (repeat string) (const :tag "Nothing special" t))) - (defcustom gnus-use-dribble-file t "*Non-nil means that Gnus will use a dribble file to store user updates. If Emacs should crash without saving the .newsrc files, complete @@ -341,8 +332,17 @@ hierarchy in its entirety." :group 'gnus-group-new :type 'boolean) +(defcustom gnus-auto-subscribed-categories '(mail post-mail) + "*New groups from methods of these categories will be subscribed automatically. +Note that this variable only deals with new groups. It has no +effect whatsoever on old groups. The default is to automatically +subscribe all groups from mail-like backends." + :version "24.1" + :group 'gnus-group-new + :type '(repeat symbol)) + (defcustom gnus-auto-subscribed-groups - "^nnml\\|^nnfolder\\|^nnmbox\\|^nnmh\\|^nnbabyl\\|^nnmaildir" + "^nnml\\|^nnfolder\\|^nnmbox\\|^nnmh\\|^nnbabyl\\|^nnmaildir\\|^nnimap" "*All new groups that match this regexp will be subscribed automatically. Note that this variable only deals with new groups. It has no effect whatsoever on old groups. @@ -644,6 +644,7 @@ the first newsgroup." (gnus-group-change-level newsgroup gnus-level-default-subscribed gnus-level-killed (gnus-group-entry (or next "dummy.group"))) + (gnus-request-update-group-status newsgroup 'subscribe) (gnus-message 5 "Subscribe newsgroup: %s" newsgroup) (run-hook-with-args 'gnus-subscribe-newsgroup-hooks newsgroup) t)) @@ -784,10 +785,9 @@ prompt the user for the name of an NNTP server to use." (gnus-start-news-server (and arg (not level)))))) (if (and (not dont-connect) (not did-connect)) + ;; Couldn't connect to the server, so bail out. (gnus-group-quit) (gnus-run-hooks 'gnus-startup-hook) - ;; NNTP server is successfully open. - ;; Find the current startup file name. (setq gnus-current-startup-file (gnus-make-newsrc-file gnus-startup-file)) @@ -797,11 +797,10 @@ prompt the user for the name of an NNTP server to use." (gnus-dribble-read-file)) ;; Do the actual startup. - (if gnus-agent - (gnus-request-create-group "queue" '(nndraft ""))) - (gnus-request-create-group "drafts" '(nndraft "")) (gnus-setup-news nil level dont-connect) (gnus-run-hooks 'gnus-setup-news-hook) + (when gnus-agent + (gnus-request-create-group "queue" '(nndraft ""))) (gnus-start-draft-setup) ;; Generate the group buffer. (gnus-group-list-groups level) @@ -816,10 +815,10 @@ prompt the user for the name of an NNTP server to use." (gnus-request-create-group "drafts" '(nndraft "")) (unless (gnus-group-entry "nndraft:drafts") (let ((gnus-level-default-subscribed 1)) - (gnus-subscribe-group "nndraft:drafts" nil '(nndraft "")))) + (gnus-subscribe-group "nndraft:drafts" nil '(nndraft ""))) + (setcar (gnus-group-entry "nndraft:drafts") 0)) (unless (equal (gnus-group-get-parameter "nndraft:drafts" 'gnus-dummy t) '((gnus-draft-mode))) - (gnus-message 3 "Setting up drafts group") (gnus-group-set-parameter "nndraft:drafts" 'gnus-dummy '((gnus-draft-mode))))) @@ -996,27 +995,8 @@ If LEVEL is non-nil, the news will be set up at level LEVEL." (when (or (null gnus-read-active-file) (eq gnus-read-active-file 'some)) (gnus-update-active-hashtb-from-killed)) - - ;; Validate agent covered methods now that gnus-server-alist has - ;; been initialized. - ;; NOTE: This is here for one purpose only. By validating the - ;; agentized server's, it converts the old 5.10.3, and earlier, - ;; format to the current format. That enables the agent code - ;; within gnus-read-active-file to function correctly. - (if gnus-agent - (gnus-agent-read-servers-validate)) - - ;; Read the active file and create `gnus-active-hashtb'. - ;; If `gnus-read-active-file' is nil, then we just create an empty - ;; hash table. The partial filling out of the hash table will be - ;; done in `gnus-get-unread-articles'. - (and gnus-read-active-file - (not level) - (gnus-read-active-file nil dont-connect)) - (unless gnus-active-hashtb (setq gnus-active-hashtb (gnus-make-hashtable 4096))) - ;; Initialize the cache. (when gnus-use-cache (gnus-cache-open)) @@ -1158,6 +1138,12 @@ for new groups, and subscribe the new groups as zombies." ((and gnus-options-subscribe (string-match gnus-options-subscribe group)) 'subscribe) + ((let ((do-subscribe nil)) + (dolist (category gnus-auto-subscribed-categories) + (when (gnus-member-of-valid category group) + (setq do-subscribe t))) + do-subscribe) + 'subscribe) ((and gnus-auto-subscribed-groups (string-match gnus-auto-subscribed-groups group)) 'subscribe) @@ -1522,7 +1508,7 @@ If SCAN, request a scan of that group as well." (gnus-info-group info))))) (gnus-activate-group (gnus-info-group info) nil t)) - ;; Allow backends to update marks, + ;; Allow backends to update marks, (when gnus-use-backend-marks (let ((method (inline (gnus-find-method-for-group (gnus-info-group info))))) @@ -1757,11 +1743,13 @@ If SCAN, request a scan of that group as well." (cond ((and (gnus-check-backend-function 'finish-retrieve-group-infos (car method)) + infos (or (not (gnus-agent-method-p method)) (gnus-online method))) (gnus-finish-retrieve-group-infos method infos early-data) (gnus-agent-save-active method)) - ((gnus-check-backend-function 'retrieve-groups (car method)) + ((and (gnus-check-backend-function 'retrieve-groups (car method)) + infos) (when (gnus-check-backend-function 'request-scan (car method)) (gnus-request-scan nil method)) (let (groups) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 1bb4b4a6895..3b003b74626 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -1,7 +1,6 @@ ;;; gnus-sum.el --- summary mode commands for Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news @@ -360,7 +359,7 @@ first subject), `unread' (place point on the subject line of the first unread article), `best' (place point on the subject line of the higest-scored article), `unseen' (place point on the subject line of the first unseen article), `unseen-or-unread' (place point on the subject -line of the first unseen article or, if all article have been seen, on the +line of the first unseen article or, if all articles have been seen, on the subject line of the first unread article), or a function to be called to place point on some subject line." :version "24.1" @@ -3940,11 +3939,9 @@ If NO-DISPLAY, don't generate a summary buffer." (gnus-group-jump-to-group group) (gnus-group-next-unread-group 1)) (gnus-handle-ephemeral-exit quit-config))) - (let ((grpinfo (gnus-get-info group))) - (if (null (gnus-info-read grpinfo)) - (gnus-message 3 "Group %s contains no messages" - (gnus-group-decoded-name group)) - (gnus-message 3 "Can't select group"))) + (if (null (gnus-list-of-unread-articles group)) + (gnus-message 3 "Group %s contains no messages" group) + (gnus-message 3 "Can't select group")) nil) ;; The user did a `C-g' while prompting for number of articles, ;; so we exit this group. @@ -5545,7 +5542,8 @@ If SELECT-ARTICLES, only select those articles from GROUP." (mm-decode-coding-string group charset) (mm-decode-coding-string (gnus-status-message group) charset))) - (when gnus-agent + (when (and gnus-agent + (gnus-active group)) (gnus-agent-possibly-alter-active group (gnus-active group) info) (setq gnus-summary-use-undownloaded-faces @@ -5603,7 +5601,7 @@ If SELECT-ARTICLES, only select those articles from GROUP." (setq gnus-newsgroup-processable nil) - (gnus-update-read-articles group gnus-newsgroup-unreads) + (gnus-update-read-articles group gnus-newsgroup-unreads t) ;; Adjust and set lists of article marks. (when info @@ -7687,9 +7685,6 @@ If BACKWARD, the previous article is selected instead of the next." (if (eq gnus-keep-same-level 'best) (gnus-summary-best-group gnus-newsgroup-name) (gnus-summary-search-group backward gnus-keep-same-level)))) - ;; For some reason, the group window gets selected. We change - ;; it back. - (select-window (get-buffer-window (current-buffer))) ;; Select next unread newsgroup automagically. (cond ((or (not gnus-auto-select-next) @@ -8868,30 +8863,27 @@ fetch what's specified by the `gnus-refer-thread-limit' variable." (interactive "P") (gnus-warp-to-article) - (let ((id (mail-header-id (gnus-summary-article-header))) - (gnus-inhibit-demon t) - (gnus-agent nil) - (gnus-summary-ignore-duplicates t) - (gnus-read-all-available-headers t) - (limit (if limit (prefix-numeric-value limit) - gnus-refer-thread-limit))) + (let* ((header (gnus-summary-article-header)) + (id (mail-header-id header)) + (gnus-inhibit-demon t) + (gnus-summary-ignore-duplicates t) + (gnus-read-all-available-headers t) + (limit (if limit (prefix-numeric-value limit) + gnus-refer-thread-limit))) (setq gnus-newsgroup-headers (gnus-merge 'list gnus-newsgroup-headers (if (gnus-check-backend-function 'request-thread gnus-newsgroup-name) - (gnus-request-thread (gnus-summary-article-header)) + (gnus-request-thread header) (let* ((last (if (numberp limit) - (min (+ (mail-header-number - (gnus-summary-article-header)) + (min (+ (mail-header-number header) limit) gnus-newsgroup-highest) gnus-newsgroup-highest)) (subject (gnus-simplify-subject - (mail-header-subject - (gnus-summary-article-header)))) - (refs (split-string (or (mail-header-references - (gnus-summary-article-header)) + (mail-header-subject header))) + (refs (split-string (or (mail-header-references header) ""))) (gnus-parse-headers-hook (lambda () (goto-char (point-min)) @@ -8982,8 +8974,11 @@ variable." (defun gnus-summary-enter-digest-group (&optional force) "Enter an nndoc group based on the current article. -If FORCE, force a digest interpretation. If not, try -to guess what the document format is." +If FORCE, force a digest interpretation. If not, try to guess +what the document format is. + +To control what happens when you exit the group, see the +`gnus-auto-select-on-ephemeral-exit' variable." (interactive "P") (let ((conf gnus-current-window-configuration)) (save-window-excursion @@ -9839,7 +9834,8 @@ ACTION can be either `move' (the default), `crosspost' or `copy'." (unless (member to-group to-groups) (push to-group to-groups)) - (unless (memq article gnus-newsgroup-unreads) + (when (and (not (memq article gnus-newsgroup-unreads)) + (cdr art-group)) (push 'read to-marks) (gnus-info-set-read info (gnus-add-to-range (gnus-info-read info) @@ -9856,14 +9852,16 @@ ACTION can be either `move' (the default), `crosspost' or `copy'." ;; Enter the article into the cache in the new group, ;; if that is required. - (when gnus-use-cache + (when (and to-article + gnus-use-cache) (gnus-cache-possibly-enter-article to-group to-article (memq article gnus-newsgroup-marked) (memq article gnus-newsgroup-dormant) (memq article gnus-newsgroup-unreads))) - (when gnus-preserve-marks + (when (and gnus-preserve-marks + to-article) ;; Copy any marks over to the new group. (when (and (equal to-group gnus-newsgroup-name) (not (memq article gnus-newsgroup-unreads))) @@ -9955,7 +9953,7 @@ ACTION can be either `move' (the default), `crosspost' or `copy'." (defun gnus-summary-push-marks-to-backend (article) (let ((set nil) (marks gnus-article-mark-lists)) - (when (memq article gnus-newsgroup-unreads) + (unless (memq article gnus-newsgroup-unreads) (push 'read set)) (while marks (when (and (eq (gnus-article-mark-to-type (cdar marks)) 'list) diff --git a/lisp/gnus/gnus-sync.el b/lisp/gnus/gnus-sync.el index 8a492e8d2c3..892b10a0d0e 100644 --- a/lisp/gnus/gnus-sync.el +++ b/lisp/gnus/gnus-sync.el @@ -1,6 +1,6 @@ ;;; gnus-sync.el --- synchronization facility for Gnus -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. ;; Author: Ted Zlatanov <tzz@lifelogs.com> ;; Keywords: news synchronization nntp nnrss diff --git a/lisp/gnus/gnus-topic.el b/lisp/gnus/gnus-topic.el index e4afc7c2fb4..f1a2ed43e26 100644 --- a/lisp/gnus/gnus-topic.el +++ b/lisp/gnus/gnus-topic.el @@ -1,7 +1,6 @@ ;;; gnus-topic.el --- a folding minor mode for Gnus group buffers -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995-2011 Free Software Foundation, Inc. ;; Author: Ilja Weis <kult@uni-paderborn.de> ;; Lars Magne Ingebrigtsen <larsi@gnus.org> diff --git a/lisp/gnus/gnus-undo.el b/lisp/gnus/gnus-undo.el index 5c45d3241d3..5530c3d9a34 100644 --- a/lisp/gnus/gnus-undo.el +++ b/lisp/gnus/gnus-undo.el @@ -1,7 +1,6 @@ ;;; gnus-undo.el --- minor mode for undoing in Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index fa4bf076a30..d298c715443 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -1,7 +1,6 @@ ;;; gnus-util.el --- utility functions for Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news @@ -39,6 +38,8 @@ (eval-when-compile (require 'cl)) +(require 'time-date) + (defcustom gnus-completing-read-function 'gnus-emacs-completing-read "Function use to do completing read." :version "24.1" @@ -332,10 +333,11 @@ Symbols are also allowed; their print names are used instead." (and (= (car fdate) (car date)) (> (nth 1 fdate) (nth 1 date)))))) +;; Every version of Emacs Gnus supports has built-in float-time. +;; The featurep test silences an irritating compiler warning. (eval-and-compile (if (or (featurep 'emacs) - (and (fboundp 'float-time) - (subrp (symbol-function 'float-time)))) + (fboundp 'float-time)) (defalias 'gnus-float-time 'float-time) (defun gnus-float-time (&optional time) "Convert time value TIME to a floating point number. diff --git a/lisp/gnus/gnus-uu.el b/lisp/gnus/gnus-uu.el index d4f382a0c29..d6aad539029 100644 --- a/lisp/gnus/gnus-uu.el +++ b/lisp/gnus/gnus-uu.el @@ -1,7 +1,7 @@ ;;; gnus-uu.el --- extract (uu)encoded files in Gnus -;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, -;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985-1987, 1993-1998, 2000-2011 +;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Created: 2 Oct 1993 diff --git a/lisp/gnus/gnus-vm.el b/lisp/gnus/gnus-vm.el index 9ca7813702c..522f03c43c1 100644 --- a/lisp/gnus/gnus-vm.el +++ b/lisp/gnus/gnus-vm.el @@ -1,7 +1,6 @@ ;;; gnus-vm.el --- vm interface for Gnus -;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994-2011 Free Software Foundation, Inc. ;; Author: Per Persson <pp@gnu.ai.mit.edu> ;; Keywords: news, mail diff --git a/lisp/gnus/gnus-win.el b/lisp/gnus/gnus-win.el index 652d9fda94c..156f9a020fd 100644 --- a/lisp/gnus/gnus-win.el +++ b/lisp/gnus/gnus-win.el @@ -1,7 +1,6 @@ ;;; gnus-win.el --- window configuration functions for Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news @@ -39,9 +38,6 @@ :group 'gnus-windows :type 'boolean) -(defvar gnus-window-configuration nil - "Obsolete variable. See `gnus-buffer-configuration'.") - (defcustom gnus-window-min-width 2 "*Minimum width of Gnus buffers." :group 'gnus-windows @@ -222,12 +218,6 @@ See the Gnus manual for an explanation of the syntax used.") (delete-frame (car gnus-created-frames)))) (pop gnus-created-frames))) -(defun gnus-window-configuration-element (list) - (while (and list - (not (assq (car list) gnus-window-configuration))) - (pop list)) - (cadr (assq (car list) gnus-window-configuration))) - ;;;###autoload (defun gnus-add-configuration (conf) "Add the window configuration CONF to `gnus-buffer-configuration'." @@ -447,11 +437,7 @@ should have point." type buffer win buf) (while (and (setq split (pop stack)) all-visible) - ;; Be backwards compatible. - (when (vectorp split) - (setq split (append split nil))) - (when (or (consp (car split)) - (vectorp (car split))) + (when (consp (car split)) (push 1.0 split) (push 'vertical split)) ;; The SPLIT might be something that is to be evaled to @@ -483,6 +469,7 @@ should have point." all-visible))) (defun gnus-window-top-edge (&optional window) + "Return the top coordinate of WINDOW." (nth 1 (window-edges window))) (defun gnus-remove-some-windows () diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index b4f7f836189..47b772b78dd 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el @@ -1,8 +1,7 @@ ;;; gnus.el --- a newsreader for GNU Emacs -;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, 1995, 1996, 1997, -;; 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, -;; 2010 Free Software Foundation, Inc. +;; Copyright (C) 1987-1990, 1993-1998, 2000-2011 +;; Free Software Foundation, Inc. ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet> ;; Lars Magne Ingebrigtsen <larsi@gnus.org> diff --git a/lisp/gnus/gravatar.el b/lisp/gnus/gravatar.el index 50b0ba1d636..0c97080d847 100644 --- a/lisp/gnus/gravatar.el +++ b/lisp/gnus/gravatar.el @@ -1,6 +1,6 @@ ;;; gravatar.el --- Get Gravatars -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. ;; Author: Julien Danjou <julien@danjou.info> ;; Keywords: news @@ -78,10 +78,11 @@ (defun gravatar-get-data () "Get data from current buffer." - (when (string-match "^HTTP/.+ 200 OK$" - (buffer-substring (point-min) (line-end-position))) - (when (search-forward "\n\n" nil t) - (buffer-substring (point) (point-max))))) + (save-excursion + (goto-char (point-min)) + (when (re-search-forward "^HTTP/.+ 200 OK$" nil (line-end-position)) + (when (search-forward "\n\n" nil t) + (buffer-substring (point) (point-max)))))) (eval-and-compile (cond ((featurep 'xemacs) @@ -98,7 +99,7 @@ If no image available, return 'error." (let ((data (gravatar-get-data))) (if data - (gravatar-create-image data nil t) + (gravatar-create-image data nil t) 'error))) ;;;###autoload @@ -107,9 +108,15 @@ If no image available, return 'error." You can provide a list of argument to pass to CB in CBARGS." (let ((url (gravatar-build-url mail-address))) (if (gravatar-cache-expired url) - (url-retrieve url - 'gravatar-retrieved - (list cb (when cbargs cbargs))) + (let ((args (list url + 'gravatar-retrieved + (list cb (when cbargs cbargs))))) + (when (> (length (if (featurep 'xemacs) + (cdr (split-string (function-arglist 'url-retrieve))) + (help-function-arglist 'url-retrieve))) + 4) + (setq args (nconc args (list t)))) + (apply #'url-retrieve args)) (apply cb (with-temp-buffer (mm-disable-multibyte) @@ -117,6 +124,23 @@ You can provide a list of argument to pass to CB in CBARGS." (gravatar-data->image)) cbargs)))) +;;;###autoload +(defun gravatar-retrieve-synchronously (mail-address) + "Retrieve MAIL-ADDRESS gravatar and returns it." + (let ((url (gravatar-build-url mail-address))) + (if (gravatar-cache-expired url) + (with-current-buffer (url-retrieve-synchronously url) + (when gravatar-automatic-caching + (url-store-in-cache (current-buffer))) + (let ((data (gravatar-data->image))) + (kill-buffer (current-buffer)) + data)) + (with-temp-buffer + (mm-disable-multibyte) + (url-cache-extract (url-cache-create-filename url)) + (gravatar-data->image))))) + + (defun gravatar-retrieved (status cb &optional cbargs) "Callback function used by `gravatar-retrieve'." ;; Store gravatar? diff --git a/lisp/gnus/html2text.el b/lisp/gnus/html2text.el index 6411eb62564..0635ab0afc6 100644 --- a/lisp/gnus/html2text.el +++ b/lisp/gnus/html2text.el @@ -1,6 +1,6 @@ ;;; html2text.el --- a simple html to plain text converter -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Author: Joakim Hove <hove@phys.ntnu.no> diff --git a/lisp/gnus/ietf-drums.el b/lisp/gnus/ietf-drums.el index f72b09c572c..4d99cea7608 100644 --- a/lisp/gnus/ietf-drums.el +++ b/lisp/gnus/ietf-drums.el @@ -1,7 +1,6 @@ ;;; ietf-drums.el --- Functions for parsing RFC822bis headers -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; This file is part of GNU Emacs. diff --git a/lisp/gnus/legacy-gnus-agent.el b/lisp/gnus/legacy-gnus-agent.el index 3b55220ace5..6c6d119c0c5 100644 --- a/lisp/gnus/legacy-gnus-agent.el +++ b/lisp/gnus/legacy-gnus-agent.el @@ -1,6 +1,6 @@ ;;; gnus-agent.el --- Legacy unplugged support for Gnus -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Kevin Greiner <kgreiner@xpediantsolutions.com> ;; Keywords: news diff --git a/lisp/gnus/mail-parse.el b/lisp/gnus/mail-parse.el index 53094960e18..06aac776486 100644 --- a/lisp/gnus/mail-parse.el +++ b/lisp/gnus/mail-parse.el @@ -1,7 +1,6 @@ ;;; mail-parse.el --- Interface functions for parsing mail -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; This file is part of GNU Emacs. diff --git a/lisp/gnus/mail-prsvr.el b/lisp/gnus/mail-prsvr.el index fb63e58a04a..b87656dab4d 100644 --- a/lisp/gnus/mail-prsvr.el +++ b/lisp/gnus/mail-prsvr.el @@ -1,7 +1,6 @@ ;;; mail-prsvr.el --- Interface variables for parsing mail -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; This file is part of GNU Emacs. diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el index 137a18f27eb..f98c195eada 100644 --- a/lisp/gnus/mail-source.el +++ b/lisp/gnus/mail-source.el @@ -1,7 +1,6 @@ ;;; mail-source.el --- functions for fetching mail -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news, mail diff --git a/lisp/gnus/mailcap.el b/lisp/gnus/mailcap.el index 36a710d58c9..dffb279daba 100644 --- a/lisp/gnus/mailcap.el +++ b/lisp/gnus/mailcap.el @@ -1,7 +1,6 @@ ;;; mailcap.el --- MIME media types configuration -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: William M. Perry <wmperry@aventail.com> ;; Lars Magne Ingebrigtsen <larsi@gnus.org> @@ -910,7 +909,8 @@ If NO-DECODE is non-nil, don't decode STRING." (".zip" . "application/zip") (".ai" . "application/postscript") (".jpe" . "image/jpeg") - (".jpeg" . "image/jpeg")) + (".jpeg" . "image/jpeg") + (".org" . "text/x-org")) "An alist of file extensions and corresponding MIME content-types. This exists for you to customize the information in Lisp. It is merged with values from mailcap files by `mailcap-parse-mimetypes'.") diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 78652fb2ee0..e7783ba0136 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -1,7 +1,6 @@ ;;; message.el --- composing mail and news messages -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: mail, news @@ -1120,6 +1119,8 @@ It is a vector of the following headers: (defvar message-checksum nil) (defvar message-send-actions nil "A list of actions to be performed upon successful sending of a message.") +(defvar message-return-action nil + "Action to return to the caller after sending or postphoning a message.") (defvar message-exit-actions nil "A list of actions to be performed upon exiting after sending a message.") (defvar message-kill-actions nil @@ -1182,14 +1183,11 @@ called and its result is inserted." (if (and (string-match "sparc-sun-sunos\\(\\'\\|[^5]\\)" system-configuration) (file-readable-p "/etc/sendmail.cf") - (let ((buffer (get-buffer-create " *temp*"))) - (unwind-protect - (with-current-buffer buffer - (insert-file-contents "/etc/sendmail.cf") - (goto-char (point-min)) - (let ((case-fold-search nil)) - (re-search-forward "^OR\\>" nil t))) - (kill-buffer buffer)))) + (with-temp-buffer + (insert-file-contents "/etc/sendmail.cf") + (goto-char (point-min)) + (let ((case-fold-search nil)) + (re-search-forward "^OR\\>" nil t)))) ;; According to RFC822, "The field-name must be composed of printable ;; ASCII characters (i. e., characters that have decimal values between ;; 33 and 126, except colon)", i. e., any chars except ctl chars, @@ -2863,6 +2861,7 @@ M-RET `message-newline-and-reformat' (break the line and reformat)." (set (make-local-variable 'message-reply-buffer) nil) (set (make-local-variable 'message-inserted-headers) nil) (set (make-local-variable 'message-send-actions) nil) + (set (make-local-variable 'message-return-action) nil) (set (make-local-variable 'message-exit-actions) nil) (set (make-local-variable 'message-kill-actions) nil) (set (make-local-variable 'message-postpone-actions) nil) @@ -3955,11 +3954,9 @@ The text will also be indented the normal way." (actions message-exit-actions)) (when (and (message-send arg) (buffer-name buf)) + (message-bury buf) (if message-kill-buffer-on-exit - (kill-buffer buf) - (bury-buffer buf) - (when (eq buf (current-buffer)) - (message-bury buf))) + (kill-buffer buf)) (message-do-actions actions) t))) @@ -4009,9 +4006,8 @@ Instead, just auto-save the buffer and then bury it." "Bury this mail BUFFER." (let ((newbuf (other-buffer buffer))) (bury-buffer buffer) - (if (and (window-dedicated-p (selected-window)) - (not (null (delq (selected-frame) (visible-frame-list))))) - (delete-frame (selected-frame)) + (if message-return-action + (apply (car message-return-action) (cdr message-return-action)) (switch-to-buffer newbuf)))) (defun message-send (&optional arg) @@ -4131,7 +4127,6 @@ not have PROP." (nreverse regions))) (defcustom message-bogus-addresses - ;; '("noreply" "nospam" "invalid") '("noreply" "nospam" "invalid" "@@" "[^[:ascii:]].*@" "[ \t]") "List of regexps of potentially bogus mail addresses. See `message-check-recipients' how to setup checking. @@ -4297,7 +4292,17 @@ This function could be useful in `message-setup-hook'." (and bog (not (y-or-n-p (format - "Address `%s' might be bogus. Continue? " bog))) + "Address `%s'%s might be bogus. Continue? " + bog + ;; If the encoded version of the email address + ;; is different from the unencoded version, + ;; then we likely have invisible characters or + ;; the like. Display the encoded version, + ;; too. + (let ((encoded (rfc2047-encode-string bog))) + (if (string= encoded bog) + "" + (format " (%s)" encoded)))))) (error "Bogus address")))))))) (custom-add-option 'message-setup-hook 'message-check-recipients) @@ -6304,11 +6309,11 @@ between beginning of field and beginning of line." ;; YANK-ACTION, if non-nil, can be a buffer or a yank action of the ;; form (FUNCTION . ARGS). (defun message-setup (headers &optional yank-action actions - continue switch-function) + continue switch-function return-action) (let ((mua (message-mail-user-agent)) subject to field) (if (not (and message-this-is-mail mua)) - (message-setup-1 headers yank-action actions) + (message-setup-1 headers yank-action actions return-action) (setq headers (copy-sequence headers)) (setq field (assq 'Subject headers)) (when field @@ -6356,11 +6361,12 @@ are not included." (push header result))) (nreverse result))) -(defun message-setup-1 (headers &optional yank-action actions) +(defun message-setup-1 (headers &optional yank-action actions return-action) (dolist (action actions) (condition-case nil (add-to-list 'message-send-actions `(apply ',(car action) ',(cdr action))))) + (setq message-return-action return-action) (setq message-reply-buffer (if (and (consp yank-action) (eq (car yank-action) 'insert-buffer)) @@ -6489,9 +6495,9 @@ are not included." ;;; ;;;###autoload -(defun message-mail (&optional to subject - other-headers continue switch-function - yank-action send-actions) +(defun message-mail (&optional to subject other-headers continue + switch-function yank-action send-actions + return-action &rest ignored) "Start editing a mail message to be sent. OTHER-HEADERS is an alist of header/value pairs. CONTINUE says whether to continue editing a message already being composed. SWITCH-FUNCTION @@ -6511,8 +6517,15 @@ is a function used to switch to and display the mail buffer." (message-setup (nconc `((To . ,(or to "")) (Subject . ,(or subject ""))) - (when other-headers other-headers)) - yank-action send-actions continue switch-function) + ;; C-h f compose-mail says that headers should be specified as + ;; (string . value); however all the rest of message expects + ;; headers to be symbols, not strings (eg message-header-format-alist). + ;; http://lists.gnu.org/archive/html/emacs-devel/2011-01/msg00337.html + ;; We need to convert any string input, eg from rmail-start-mail. + (dolist (h other-headers other-headers) + (if (stringp (car h)) (setcar h (intern (capitalize (car h))))))) + yank-action send-actions continue switch-function + return-action) ;; FIXME: Should return nil if failure. t)) @@ -7642,24 +7655,22 @@ Pre-defined symbols include `message-tool-bar-gnome' and (defcustom message-tool-bar-gnome '((ispell-message "spell" nil + :vert-only t :visible (or (not (boundp 'flyspell-mode)) (not flyspell-mode))) (flyspell-buffer "spell" t + :vert-only t :visible (and (boundp 'flyspell-mode) flyspell-mode) :help "Flyspell whole buffer") - (gmm-ignore "separator") - (message-send-and-exit "mail/send") + (message-send-and-exit "mail/send" t :label "Send") (message-dont-send "mail/save-draft") - (message-kill-buffer "close") ;; stock_cancel - (mml-attach-file "attach" mml-mode-map) + (mml-attach-file "attach" mml-mode-map :vert-only t) (mml-preview "mail/preview" mml-mode-map) (mml-secure-message-sign-encrypt "lock" mml-mode-map :visible nil) (message-insert-importance-high "important" nil :visible nil) (message-insert-importance-low "unimportant" nil :visible nil) - (message-insert-disposition-notification-to "receipt" nil :visible nil) - (gmm-customize-mode "preferences" t :help "Edit mode preferences") - (message-info "help" t :help "Message manual")) + (message-insert-disposition-notification-to "receipt" nil :visible nil)) "List of items for the message tool bar (GNOME style). See `gmm-tool-bar-from-list' for details on the format of the list." diff --git a/lisp/gnus/messcompat.el b/lisp/gnus/messcompat.el index de67d8ce7ed..c0c5125aeea 100644 --- a/lisp/gnus/messcompat.el +++ b/lisp/gnus/messcompat.el @@ -1,7 +1,6 @@ ;;; messcompat.el --- making message mode compatible with mail mode -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: mail, news diff --git a/lisp/gnus/mm-bodies.el b/lisp/gnus/mm-bodies.el index 5a70f33d95f..9952f410f0d 100644 --- a/lisp/gnus/mm-bodies.el +++ b/lisp/gnus/mm-bodies.el @@ -1,7 +1,6 @@ ;;; mm-bodies.el --- Functions for decoding MIME things -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; MORIOKA Tomohiko <morioka@jaist.ac.jp> diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index 216ed6624d9..d7bc882a844 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -1,7 +1,6 @@ ;;; mm-decode.el --- Functions for decoding MIME things -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; MORIOKA Tomohiko <morioka@jaist.ac.jp> @@ -237,7 +236,12 @@ before the external MIME handler is invoked." (lambda (handle) (fboundp 'diff-mode))) ("application/emacs-lisp" mm-display-elisp-inline identity) ("application/x-emacs-lisp" mm-display-elisp-inline identity) + ("application/x-shellscript" mm-display-shell-script-inline identity) + ("application/x-sh" mm-display-shell-script-inline identity) + ("text/x-sh" mm-display-shell-script-inline identity) + ("application/javascript" mm-display-javascript-inline identity) ("text/dns" mm-display-dns-inline identity) + ("text/x-org" mm-display-org-inline identity) ("text/html" mm-inline-text-html (lambda (handle) @@ -313,7 +317,8 @@ when selecting a different article." "application/pkcs7-signature" "application/x-pkcs7-mime" "application/pkcs7-mime" ;; Mutt still uses this even though it has already been withdrawn. - "application/pgp\\'") + "application/pgp\\'" + "text/x-org") "A list of MIME types to be displayed automatically." :type '(repeat regexp) :group 'mime-display) @@ -1367,13 +1372,19 @@ Use CMD as the process." (defun mm-preferred-alternative-precedence (handles) "Return the precedence based on HANDLES and `mm-discouraged-alternatives'." - (let ((seq (nreverse (mapcar #'mm-handle-media-type - handles)))) - (dolist (disc (reverse mm-discouraged-alternatives)) - (dolist (elem (copy-sequence seq)) - (when (string-match disc elem) - (setq seq (nconc (delete elem seq) (list elem)))))) - seq)) + (setq handles (reverse handles)) + (dolist (disc (reverse mm-discouraged-alternatives)) + (dolist (handle (copy-sequence handles)) + (when (string-match disc (mm-handle-media-type handle)) + (setq handles (nconc (delete handle handles) (list handle)))))) + ;; Remove empty parts. + (dolist (handle (copy-sequence handles)) + (when (and (bufferp (mm-handle-buffer handle)) + (not (with-current-buffer (mm-handle-buffer handle) + (goto-char (point-min)) + (re-search-forward "[^ \t\n]" nil t)))) + (setq handles (nconc (delete handle handles) (list handle))))) + (mapcar #'mm-handle-media-type handles)) (defun mm-get-content-id (id) "Return the handle(s) referred to by ID." diff --git a/lisp/gnus/mm-encode.el b/lisp/gnus/mm-encode.el index 296a24351bb..055ba475b8e 100644 --- a/lisp/gnus/mm-encode.el +++ b/lisp/gnus/mm-encode.el @@ -1,7 +1,6 @@ ;;; mm-encode.el --- Functions for encoding MIME things -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; MORIOKA Tomohiko <morioka@jaist.ac.jp> diff --git a/lisp/gnus/mm-extern.el b/lisp/gnus/mm-extern.el index 92de6117388..5f4a9a85fc6 100644 --- a/lisp/gnus/mm-extern.el +++ b/lisp/gnus/mm-extern.el @@ -1,7 +1,6 @@ ;;; mm-extern.el --- showing message/external-body -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu> ;; Keywords: message external-body diff --git a/lisp/gnus/mm-partial.el b/lisp/gnus/mm-partial.el index 6509b648fe7..017b604e9bb 100644 --- a/lisp/gnus/mm-partial.el +++ b/lisp/gnus/mm-partial.el @@ -1,7 +1,6 @@ ;;; mm-partial.el --- showing message/partial -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu> ;; Keywords: message partial diff --git a/lisp/gnus/mm-url.el b/lisp/gnus/mm-url.el index 0c2b80c9ca7..498d0612519 100644 --- a/lisp/gnus/mm-url.el +++ b/lisp/gnus/mm-url.el @@ -1,7 +1,6 @@ ;;; mm-url.el --- a wrapper of url functions/commands for Gnus -;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2001-2011 Free Software Foundation, Inc. ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu> diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el index c07d0bf6e87..435c3bba00f 100644 --- a/lisp/gnus/mm-util.el +++ b/lisp/gnus/mm-util.el @@ -1,7 +1,6 @@ ;;; mm-util.el --- Utility functions for Mule and low level things -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; MORIOKA Tomohiko <morioka@jaist.ac.jp> @@ -1604,7 +1603,7 @@ gzip, bzip2, etc. are allowed." (insert decomp) (setq filename (file-name-sans-extension filename))) (goto-char (point-min)) - (prog1 + (unwind-protect (cond ((boundp 'set-auto-coding-function) ;; Emacs (if filename diff --git a/lisp/gnus/mm-uu.el b/lisp/gnus/mm-uu.el index a10700ee3d9..7f96f449da9 100644 --- a/lisp/gnus/mm-uu.el +++ b/lisp/gnus/mm-uu.el @@ -1,7 +1,6 @@ ;;; mm-uu.el --- Return uu stuff as mm handles -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu> ;; Keywords: postscript uudecode binhex shar forward gnatsweb pgp @@ -186,7 +185,15 @@ This can be either \"inline\" or \"attachment\".") "^\\\\end{document}" mm-uu-latex-extract nil - mm-uu-latex-test)) + mm-uu-latex-test) + (org-src-code-block + "^[ \t]*#\\+begin_" + "^[ \t]*#\\+end_" + mm-uu-org-src-code-block-extract) + (org-meta-line + "^[ \t]*#\\+[[:alpha:]]+: " + "$" + mm-uu-org-src-code-block-extract)) "A list of specifications for non-MIME attachments. Each element consist of the following entries: label, start-regexp, end-regexp, extract-function, test-function. @@ -383,6 +390,10 @@ apply the face `mm-uu-extract'." (list mm-dissect-disposition (cons 'filename file-name)))) +(defun mm-uu-org-src-code-block-extract () + (mm-make-handle (mm-uu-copy-to-buffer start-point end-point) + '("text/x-org"))) + (defvar gnus-newsgroup-name) (defun mm-uu-emacs-sources-test () diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el index 083781b0f9d..d63d20239dc 100644 --- a/lisp/gnus/mm-view.el +++ b/lisp/gnus/mm-view.el @@ -1,7 +1,6 @@ ;;; mm-view.el --- functions for viewing MIME objects -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; This file is part of GNU Emacs. @@ -32,6 +31,7 @@ (require 'mm-bodies) (require 'mm-decode) (require 'smime) +(require 'mml-smime) (autoload 'gnus-completing-read "gnus-util") (autoload 'gnus-window-inside-pixel-edges "gnus-ems") @@ -631,6 +631,18 @@ (defun mm-display-dns-inline (handle) (mm-display-inline-fontify handle 'dns-mode)) +(defun mm-display-org-inline (handle) + "Show an Org mode text from HANDLE inline." + (mm-display-inline-fontify handle 'org-mode)) + +(defun mm-display-shell-script-inline (handle) + "Show a shell script from HANDLE inline." + (mm-display-inline-fontify handle 'shell-script-mode)) + +(defun mm-display-javascript-inline (handle) + "Show JavsScript code from HANDLE inline." + (mm-display-inline-fontify handle 'javascript-mode)) + ;; id-signedData OBJECT IDENTIFIER ::= { iso(1) member-body(2) ;; us(840) rsadsi(113549) pkcs(1) pkcs7(7) 2 } (defvar mm-pkcs7-signed-magic @@ -683,17 +695,23 @@ (defun mm-view-pkcs7-decrypt (handle &optional from) (insert-buffer-substring (mm-handle-buffer handle)) (goto-char (point-min)) - (insert "MIME-Version: 1.0\n") - (mm-insert-headers "application/pkcs7-mime" "base64" "smime.p7m") - (smime-decrypt-region - (point-min) (point-max) - (if (= (length smime-keys) 1) - (cadar smime-keys) - (smime-get-key-by-email - (gnus-completing-read - "Decipher using key" - smime-keys nil nil nil (car-safe (car-safe smime-keys))))) - from) + (if (eq mml-smime-use 'epg) + ;; Use EPG/gpgsm + (let ((part (base64-decode-string (buffer-string)))) + (erase-buffer) + (insert (epg-decrypt-string (epg-make-context 'CMS) part))) + ;; Use openssl + (insert "MIME-Version: 1.0\n") + (mm-insert-headers "application/pkcs7-mime" "base64" "smime.p7m") + (smime-decrypt-region + (point-min) (point-max) + (if (= (length smime-keys) 1) + (cadar smime-keys) + (smime-get-key-by-email + (gnus-completing-read + "Decipher using key" + smime-keys nil nil nil (car-safe (car-safe smime-keys))))) + from)) (goto-char (point-min)) (while (search-forward "\r\n" nil t) (replace-match "\n")) diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el index 267f6483d24..1c6405b2b38 100644 --- a/lisp/gnus/mml-sec.el +++ b/lisp/gnus/mml-sec.el @@ -1,7 +1,6 @@ ;;; mml-sec.el --- A package with security functions for MML documents -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; Author: Simon Josefsson <simon@josefsson.org> diff --git a/lisp/gnus/mml-smime.el b/lisp/gnus/mml-smime.el index 33050fecaee..43c91604ec5 100644 --- a/lisp/gnus/mml-smime.el +++ b/lisp/gnus/mml-smime.el @@ -1,7 +1,6 @@ ;;; mml-smime.el --- S/MIME support for MML -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; Author: Simon Josefsson <simon@josefsson.org> ;; Keywords: Gnus, MIME, S/MIME, MML @@ -37,7 +36,12 @@ (autoload 'message-narrow-to-headers "message") (autoload 'message-fetch-field "message") -(defvar mml-smime-use 'openssl) +(defcustom mml-smime-use (if (featurep 'epg) 'epg 'openssl) + "Whether to use OpenSSL or EPG to decrypt S/MIME messages. +Defaults to EPG if it's loaded." + :group 'mime-security + :type '(choice (const :tag "EPG" epg) + (const :tag "OpenSSL" openssl))) (defvar mml-smime-function-alist '((openssl mml-smime-openssl-sign diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el index 7dc6b76afae..8b196fa26fc 100644 --- a/lisp/gnus/mml.el +++ b/lisp/gnus/mml.el @@ -1,7 +1,6 @@ ;;; mml.el --- A package for parsing and validating MML documents -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; This file is part of GNU Emacs. diff --git a/lisp/gnus/mml1991.el b/lisp/gnus/mml1991.el index 98e7903b015..0ce74b1d765 100644 --- a/lisp/gnus/mml1991.el +++ b/lisp/gnus/mml1991.el @@ -1,7 +1,6 @@ ;;; mml1991.el --- Old PGP message format (RFC 1991) support for MML -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Sascha Lüdecke <sascha@meta-x.de>, ;; Simon Josefsson <simon@josefsson.org> (Mailcrypt interface, Gnus glue) @@ -168,6 +167,9 @@ Whether the passphrase is cached at all is controlled by ;; pgg wrapper +(autoload 'pgg-sign-region "pgg") +(autoload 'pgg-encrypt-region "pgg") + (defvar pgg-default-user-id) (defvar pgg-errors-buffer) (defvar pgg-output-buffer) diff --git a/lisp/gnus/mml2015.el b/lisp/gnus/mml2015.el index e247abbb476..1271168fffc 100644 --- a/lisp/gnus/mml2015.el +++ b/lisp/gnus/mml2015.el @@ -1,7 +1,6 @@ ;;; mml2015.el --- MIME Security with Pretty Good Privacy (PGP) -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu> ;; Keywords: PGP MIME MML @@ -117,10 +116,17 @@ Whether the passphrase is cached at all is controlled by :type 'integer) (defcustom mml2015-signers nil - "A list of your own key ID which will be used to sign a message." + "A list of your own key ID which will be used to sign a message. +If set, it overrides the setting of `mml2015-sign-with-sender'." :group 'mime-security :type '(repeat (string :tag "Key ID"))) +(defcustom mml2015-sign-with-sender nil + "If t, use message sender so find a key to sign with." + :group 'mime-security + :type 'boolean + :version "24.1") + (defcustom mml2015-encrypt-to-self nil "If t, add your own key ID to recipient list when encryption." :group 'mime-security @@ -742,6 +748,7 @@ Whether the passphrase is cached at all is controlled by (autoload 'epg-key-sub-key-list "epg") (autoload 'epg-sub-key-capability "epg") (autoload 'epg-sub-key-validity "epg") +(autoload 'epg-sub-key-fingerprint "epg") (autoload 'epg-configuration "epg-config") (autoload 'epg-expand-group "epg-config") (autoload 'epa-select-keys "epa") @@ -784,6 +791,24 @@ Whether the passphrase is cached at all is controlled by (setq pointer (cdr pointer)))) (setq keys (cdr keys))))) +;; XXX: since gpg --list-secret-keys does not return validity of each +;; key, `mml2015-epg-find-usable-key' defined above is not enough for +;; secret keys. The function `mml2015-epg-find-usable-secret-key' +;; below looks at appropriate public keys to check usability. +(defun mml2015-epg-find-usable-secret-key (context name usage) + (let ((secret-keys (epg-list-keys context name t)) + secret-key) + (while (and (not secret-key) secret-keys) + (if (mml2015-epg-find-usable-key + (epg-list-keys context (epg-sub-key-fingerprint + (car (epg-key-sub-key-list + (car secret-keys))))) + usage) + (setq secret-key (car secret-keys) + secret-keys nil) + (setq secret-keys (cdr secret-keys)))) + secret-key)) + (defun mml2015-epg-decrypt (handle ctl) (catch 'error (let ((inhibit-redisplay t) @@ -942,6 +967,9 @@ Whether the passphrase is cached at all is controlled by (context (epg-make-context)) (boundary (mml-compute-boundary cont)) (sender (message-options-get 'message-sender)) + (signer-names (or mml2015-signers + (if (and mml2015-sign-with-sender sender) + (list (concat "<" sender ">"))))) signer-key (signers (or (message-options-get 'mml2015-epg-signers) @@ -951,14 +979,15 @@ Whether the passphrase is cached at all is controlled by (epa-select-keys context "\ Select keys for signing. If no one is selected, default secret key is used. " - (cons sender mml2015-signers) t) + signer-names + t) (if (or sender mml2015-signers) (delq nil (mapcar (lambda (signer) - (setq signer-key (mml2015-epg-find-usable-key - (epg-list-keys context signer t) - 'sign)) + (setq signer-key + (mml2015-epg-find-usable-secret-key + context signer 'sign)) (unless (or signer-key (y-or-n-p (format @@ -966,7 +995,7 @@ If no one is selected, default secret key is used. " signer))) (error "No secret key for %s" signer)) signer-key) - (cons sender mml2015-signers)))))))) + signer-names))))))) signature micalg) (epg-context-set-armor context t) (epg-context-set-textmode context t) @@ -1006,14 +1035,18 @@ If no one is selected, default secret key is used. " (goto-char (point-max)))) (defun mml2015-epg-encrypt (cont &optional sign) - (let ((inhibit-redisplay t) - (context (epg-make-context)) - (config (epg-configuration)) - (sender (message-options-get 'message-sender)) - (recipients (message-options-get 'mml2015-epg-recipients)) - cipher signers - (boundary (mml-compute-boundary cont)) - recipient-key signer-key) + (let* ((inhibit-redisplay t) + (context (epg-make-context)) + (boundary (mml-compute-boundary cont)) + (config (epg-configuration)) + (recipients (message-options-get 'mml2015-epg-recipients)) + cipher + (sender (message-options-get 'message-sender)) + (signer-names (or mml2015-signers + (if (and mml2015-sign-with-sender sender) + (list (concat "<" sender ">"))))) + signers + recipient-key signer-key) (unless recipients (setq recipients (apply #'nconc @@ -1027,9 +1060,9 @@ If no one is selected, default secret key is used. " (read-string "Recipients: "))) "[ \f\t\n\r\v,]+")))) (when mml2015-encrypt-to-self - (unless (or sender mml2015-signers) - (error "Message sender and mml2015-signers not set")) - (setq recipients (nconc recipients (cons sender mml2015-signers)))) + (unless signer-names + (error "Neither message sender nor mml2015-signers are set")) + (setq recipients (nconc recipients signer-names))) (if (eq mm-encrypt-option 'guided) (setq recipients (epa-select-keys context "\ @@ -1062,14 +1095,15 @@ If no one is selected, symmetric encryption will be performed. " (epa-select-keys context "\ Select keys for signing. If no one is selected, default secret key is used. " - (cons sender mml2015-signers) t) + signer-names + t) (if (or sender mml2015-signers) (delq nil (mapcar (lambda (signer) - (setq signer-key (mml2015-epg-find-usable-key - (epg-list-keys context signer t) - 'sign)) + (setq signer-key + (mml2015-epg-find-usable-secret-key + context signer 'sign)) (unless (or signer-key (y-or-n-p (format @@ -1077,7 +1111,7 @@ If no one is selected, default secret key is used. " signer))) (error "No secret key for %s" signer)) signer-key) - (cons sender mml2015-signers)))))))) + signer-names))))))) (epg-context-set-signers context signers)) (epg-context-set-armor context t) (epg-context-set-textmode context t) diff --git a/lisp/gnus/nnagent.el b/lisp/gnus/nnagent.el index 9f75b00bbca..f6f0d6c1434 100644 --- a/lisp/gnus/nnagent.el +++ b/lisp/gnus/nnagent.el @@ -1,7 +1,6 @@ ;;; nnagent.el --- offline backend for Gnus -;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news, mail diff --git a/lisp/gnus/nnbabyl.el b/lisp/gnus/nnbabyl.el index 6e91517baab..e10620683c9 100644 --- a/lisp/gnus/nnbabyl.el +++ b/lisp/gnus/nnbabyl.el @@ -1,8 +1,6 @@ ;;; nnbabyl.el --- rmail mbox access for Gnus -;; Copyright (C) 1995, 1996, 1997, 1998, 1099, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1995-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet> diff --git a/lisp/gnus/nndiary.el b/lisp/gnus/nndiary.el index e634b9cada3..db7ac1b44f8 100644 --- a/lisp/gnus/nndiary.el +++ b/lisp/gnus/nndiary.el @@ -1,7 +1,6 @@ ;;; nndiary.el --- A diary back end for Gnus -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Didier Verna <didier@xemacs.org> ;; Maintainer: Didier Verna <didier@xemacs.org> diff --git a/lisp/gnus/nndir.el b/lisp/gnus/nndir.el index b6de7afa019..736f37c1fa5 100644 --- a/lisp/gnus/nndir.el +++ b/lisp/gnus/nndir.el @@ -1,7 +1,6 @@ ;;; nndir.el --- single directory newsgroup access for Gnus -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news diff --git a/lisp/gnus/nndoc.el b/lisp/gnus/nndoc.el index 0dee06d2937..f900e02eb08 100644 --- a/lisp/gnus/nndoc.el +++ b/lisp/gnus/nndoc.el @@ -1,7 +1,6 @@ ;;; nndoc.el --- single file access for Gnus -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet> diff --git a/lisp/gnus/nndraft.el b/lisp/gnus/nndraft.el index 98c14d4cab2..006348869ef 100644 --- a/lisp/gnus/nndraft.el +++ b/lisp/gnus/nndraft.el @@ -1,7 +1,6 @@ ;;; nndraft.el --- draft article access for Gnus -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news diff --git a/lisp/gnus/nneething.el b/lisp/gnus/nneething.el index 2de2dca82b9..7f4fab0a991 100644 --- a/lisp/gnus/nneething.el +++ b/lisp/gnus/nneething.el @@ -1,7 +1,6 @@ ;;; nneething.el --- arbitrary file access for Gnus -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet> diff --git a/lisp/gnus/nnfolder.el b/lisp/gnus/nnfolder.el index 5de8653948f..dd11ff71dd3 100644 --- a/lisp/gnus/nnfolder.el +++ b/lisp/gnus/nnfolder.el @@ -1,7 +1,6 @@ ;;; nnfolder.el --- mail folder access for Gnus -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995-2011 Free Software Foundation, Inc. ;; Author: Simon Josefsson <simon@josefsson.org> (adding MARKS) ;; ShengHuo Zhu <zsh@cs.rochester.edu> (adding NOV) @@ -322,20 +321,20 @@ the group. Then the marks file will be regenerated properly by Gnus.") (when nnfolder-get-new-mail (nnfolder-possibly-change-group group server) (nnmail-get-new-mail - 'nnfolder - (lambda () - (let ((bufs nnfolder-buffer-alist)) - (save-excursion - (while bufs - (if (not (gnus-buffer-live-p (nth 1 (car bufs)))) - (setq nnfolder-buffer-alist - (delq (car bufs) nnfolder-buffer-alist)) - (set-buffer (nth 1 (car bufs))) - (nnfolder-save-buffer) - (kill-buffer (current-buffer))) - (setq bufs (cdr bufs)))))) - nnfolder-directory - group))) + 'nnfolder 'nnfolder-save-all-buffers + nnfolder-directory group))) + +(defun nnfolder-save-all-buffers () + (let ((bufs nnfolder-buffer-alist)) + (save-excursion + (while bufs + (if (not (gnus-buffer-live-p (nth 1 (car bufs)))) + (setq nnfolder-buffer-alist + (delq (car bufs) nnfolder-buffer-alist)) + (set-buffer (nth 1 (car bufs))) + (nnfolder-save-buffer) + (kill-buffer (current-buffer))) + (setq bufs (cdr bufs)))))) ;; Don't close the buffer if we're not shutting down the server. This way, ;; we can keep the buffer in the group buffer cache, and not have to grovel @@ -488,6 +487,7 @@ the group. Then the marks file will be regenerated properly by Gnus.") (nnfolder-save-buffer) (nnfolder-adjust-min-active newsgroup) (nnfolder-save-active nnfolder-group-alist nnfolder-active-file) + (nnfolder-save-all-buffers) (gnus-sorted-difference articles (nreverse deleted-articles))))) (deffoo nnfolder-request-move-article (article group server accept-form diff --git a/lisp/gnus/nngateway.el b/lisp/gnus/nngateway.el index 1c0d7753eff..994cefc9d08 100644 --- a/lisp/gnus/nngateway.el +++ b/lisp/gnus/nngateway.el @@ -1,7 +1,6 @@ ;;; nngateway.el --- posting news via mail gateways -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news, mail diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el index cc2706eaf2a..20cdeb557de 100644 --- a/lisp/gnus/nnheader.el +++ b/lisp/gnus/nnheader.el @@ -1,8 +1,7 @@ ;;; nnheader.el --- header access macros for Gnus and its backends -;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, -;; 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1987-1990, 1993-1998, 2000-2011 +;; Free Software Foundation, Inc. ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet> ;; Lars Magne Ingebrigtsen <larsi@gnus.org> diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 0462cf946eb..005f60b5c7d 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -1,6 +1,6 @@ ;;; nnimap.el --- IMAP interface for Gnus -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Simon Josefsson <simon@josefsson.org> @@ -124,7 +124,7 @@ textual parts.") (defstruct nnimap group process commands capabilities select-result newlinep server - last-command-time greeting examined) + last-command-time greeting examined stream-type) (defvar nnimap-object nil) @@ -139,6 +139,9 @@ textual parts.") (download "gnus-download") (forward "gnus-forward"))) +(defvar nnimap-quirks + '(("QRESYNC" "Zimbra" "QRESYNC "))) + (defun nnimap-buffer () (nnimap-find-process-buffer nntp-server-buffer)) @@ -164,7 +167,8 @@ textual parts.") (nnimap-article-ranges (gnus-compress-sequence articles)) (nnimap-header-parameters)) t) - (nnimap-transform-headers)) + (nnimap-transform-headers) + (nnheader-remove-cr-followed-by-lf)) (insert-buffer-substring (nnimap-find-process-buffer (current-buffer)))) 'headers)) @@ -346,7 +350,7 @@ textual parts.") login-result credentials) (when nnimap-server-port (setq ports (append ports (list nnimap-server-port)))) - (destructuring-bind (stream greeting capabilities) + (destructuring-bind (stream greeting capabilities stream-type) (open-protocol-stream "*nnimap*" (current-buffer) nnimap-address (car (last ports)) :type nnimap-stream @@ -358,6 +362,7 @@ textual parts.") (when (gnus-string-match-p "STARTTLS" capabilities) "1 STARTTLS\r\n"))) (setf (nnimap-process nnimap-object) stream) + (setf (nnimap-stream-type nnimap-object) stream-type) (if (not stream) (progn (nnheader-report 'nnimap "Unable to contact %s:%s via %s" @@ -386,17 +391,7 @@ textual parts.") (nnimap-credentials nnimap-address ports))))) (setq nnimap-object nil) (setq login-result - (if (and (nnimap-capability "AUTH=PLAIN") - (nnimap-capability "LOGINDISABLED")) - (nnimap-command - "AUTHENTICATE PLAIN %s" - (base64-encode-string - (format "\000%s\000%s" - (nnimap-quote-specials (car credentials)) - (nnimap-quote-specials (cadr credentials))))) - (nnimap-command "LOGIN %S %S" - (car credentials) - (cadr credentials)))) + (nnimap-login (car credentials) (cadr credentials))) (unless (car login-result) ;; If the login failed, then forget the credentials ;; that are now possibly cached. @@ -413,6 +408,39 @@ textual parts.") (nnimap-command "ENABLE QRESYNC")) (nnimap-process nnimap-object)))))))) +(autoload 'rfc2104-hash "rfc2104") + +(defun nnimap-login (user password) + (cond + ;; Prefer plain LOGIN if it's enabled (since it requires fewer + ;; round trips than CRAM-MD5, and it's less likely to be buggy), + ;; and we're using an encrypted connection. + ((and (not (nnimap-capability "LOGINDISABLED")) + (eq (nnimap-stream-type nnimap-object) 'tls)) + (nnimap-command "LOGIN %S %S" user password)) + ((nnimap-capability "AUTH=CRAM-MD5") + (erase-buffer) + (let ((sequence (nnimap-send-command "AUTHENTICATE CRAM-MD5")) + (challenge (nnimap-wait-for-line "^\\+\\(.*\\)\n"))) + (process-send-string + (get-buffer-process (current-buffer)) + (concat + (base64-encode-string + (concat user " " + (rfc2104-hash 'md5 64 16 password + (base64-decode-string challenge)))) + "\r\n")) + (nnimap-wait-for-response sequence))) + ((not (nnimap-capability "LOGINDISABLED")) + (nnimap-command "LOGIN %S %S" user password)) + ((nnimap-capability "AUTH=PLAIN") + (nnimap-command + "AUTHENTICATE PLAIN %s" + (base64-encode-string + (format "\000%s\000%s" + (nnimap-quote-specials user) + (nnimap-quote-specials password))))))) + (defun nnimap-quote-specials (string) (with-temp-buffer (insert string) @@ -491,15 +519,17 @@ textual parts.") (with-current-buffer (nnimap-buffer) (when (stringp article) (setq article (nnimap-find-article-by-message-id group article))) - (nnimap-get-whole-article - article (format "UID FETCH %%d %s" - (nnimap-header-parameters))) - (let ((buffer (current-buffer))) - (with-current-buffer (or to-buffer nntp-server-buffer) - (erase-buffer) - (insert-buffer-substring buffer) - (nnheader-ms-strip-cr) - (cons group article)))))) + (if (null article) + nil + (nnimap-get-whole-article + article (format "UID FETCH %%d %s" + (nnimap-header-parameters))) + (let ((buffer (current-buffer))) + (with-current-buffer (or to-buffer nntp-server-buffer) + (erase-buffer) + (insert-buffer-substring buffer) + (nnheader-ms-strip-cr) + (cons group article))))))) (defun nnimap-get-whole-article (article &optional command) (let ((result @@ -561,7 +591,7 @@ textual parts.") ;; Collect all the body parts. (while (looking-at ".*BODY\\[\\([.0-9]+\\)\\]") (setq id (match-string 1) - bytes (nnimap-get-length)) + bytes (or (nnimap-get-length) 0)) (beginning-of-line) (delete-region (point) (progn (forward-line 1) (point))) (push (list id (buffer-substring (point) (+ (point) bytes))) @@ -635,7 +665,7 @@ textual parts.") (let ((result (nnimap-possibly-change-group ;; Don't SELECT the group if we're going to select it ;; later, anyway. - (if (and dont-check + (if (and (not dont-check) (assoc group nnimap-current-infos)) nil group) @@ -897,6 +927,16 @@ textual parts.") (push flag flags))) flags)) +(deffoo nnimap-request-update-group-status (group status &optional server) + (when (nnimap-possibly-change-group nil server) + (let ((command (assoc + status + '((subscribe "SUBSCRIBE") + (unsubscribe "UNSUBSCRIBE"))))) + (when command + (with-current-buffer (nnimap-buffer) + (nnimap-command "%s %S" (cadr command) (utf7-encode group t))))))) + (deffoo nnimap-request-set-mark (group actions &optional server) (when (nnimap-possibly-change-group group server) (let (sequence) @@ -1080,8 +1120,9 @@ textual parts.") uidvalidity modseq) (push - (list (nnimap-send-command "EXAMINE %S (QRESYNC (%s %s))" + (list (nnimap-send-command "EXAMINE %S (%s (%s %s))" (utf7-encode group t) + (nnimap-quirk "QRESYNC") uidvalidity modseq) 'qresync nil group 'qresync) @@ -1107,6 +1148,15 @@ textual parts.") sequences)))) sequences)))) +(defun nnimap-quirk (command) + (let ((quirk (assoc command nnimap-quirks))) + ;; If this server is of a type that matches a quirk, then return + ;; the "quirked" command instead of the proper one. + (if (or (null quirk) + (not (string-match (nth 1 quirk) (nnimap-greeting nnimap-object)))) + command + (nth 2 quirk)))) + (deffoo nnimap-finish-retrieve-group-infos (server infos sequences) (when (and sequences (nnimap-possibly-change-group nil server)) @@ -1517,8 +1567,9 @@ textual parts.") (nnimap-parse-response)) (defun nnimap-wait-for-connection (&optional regexp) - (unless regexp - (setq regexp "^[*.] .*\n")) + (nnimap-wait-for-line (or regexp "^[*.] .*\n") "[*.] \\([A-Z0-9]+\\)")) + +(defun nnimap-wait-for-line (regexp &optional response-regexp) (let ((process (get-buffer-process (current-buffer)))) (goto-char (point-min)) (while (and (memq (process-status process) @@ -1527,7 +1578,7 @@ textual parts.") (nnheader-accept-process-output process) (goto-char (point-min))) (forward-line -1) - (and (looking-at "[*.] \\([A-Z0-9]+\\)") + (and (looking-at (or response-regexp regexp)) (match-string 1)))) (defun nnimap-wait-for-response (sequence &optional messagep) @@ -1538,12 +1589,14 @@ textual parts.") (goto-char (point-max)) (while (and (setq openp (memq (process-status process) '(open run))) - (not (re-search-backward - (format "^%d .*\n" sequence) - (if nnimap-streaming - (max (point-min) (- (point) 500)) - (point-min)) - t))) + (progn + ;; Skip past any "*" lines that the server has + ;; output. + (while (and (not (bobp)) + (progn + (forward-line -1) + (looking-at "\\*")))) + (not (looking-at (format "%d " sequence))))) (when messagep (nnheader-message 7 "nnimap read %dk" (/ (buffer-size) 1000))) (nnheader-accept-process-output process) diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el index 3b1d3246c01..8e91c68b391 100644 --- a/lisp/gnus/nnir.el +++ b/lisp/gnus/nnir.el @@ -1,7 +1,6 @@ ;;; nnir.el --- search mail with various search engines -*- coding: iso-8859-1 -*- -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Kai Großjohann <grossjohann@ls6.cs.uni-dortmund.de> ;; Swish-e and Swish++ backends by: @@ -289,7 +288,9 @@ is `(valuefunc member)'." (autoload 'nnimap-buffer "nnimap") (autoload 'nnimap-command "nnimap") (autoload 'nnimap-possibly-change-group "nnimap") - (autoload 'gnus-registry-action "gnus-registry")) + (autoload 'gnus-registry-action "gnus-registry") + (defvar gnus-registry-install)) + (nnoo-declare nnir) (nnoo-define-basics nnir) @@ -303,13 +304,6 @@ is `(valuefunc member)'." "Search groups in Gnus with assorted seach engines." :group 'gnus) -(defcustom nnir-method-default-engines - '((nnimap . imap) - (nntp . gmane)) - "*Alist of default search engines keyed by server method." - :type '(alist) - :group 'nnir) - (defcustom nnir-ignored-newsgroups "" "*A regexp to match newsgroups in the active file that should be skipped when searching." @@ -327,7 +321,7 @@ with three items unique to nnir summary buffers: %g Article original short group name (string) If nil this will use `gnus-summary-line-format'." - :type '(regexp) + :type '(string) :group 'nnir) (defcustom nnir-retrieve-headers-override-function nil @@ -345,7 +339,8 @@ result, `gnus-retrieve-headers' will be called instead." "*The default IMAP search key for an nnir search. Must be one of the keys in `nnir-imap-search-arguments'. To use raw imap queries by default set this to \"Imap\"." - :type '(string) + :type `(choice ,@(mapcar (lambda (elem) (list 'const (car elem))) + nnir-imap-search-arguments)) :group 'nnir) (defcustom nnir-swish++-configuration-file @@ -544,6 +539,18 @@ needs the variables `nnir-namazu-program', Add an entry here when adding a new search engine.") +(defcustom nnir-method-default-engines + '((nnimap . imap) + (nntp . gmane)) + "*Alist of default search engines keyed by server method." + :type `(repeat (cons (choice (const nnimap) (const nttp) (const nnspool) + (const nneething) (const nndir) (const nnmbox) + (const nnml) (const nnmh) (const nndraft) + (const nnfolder) (const nnmaildir)) + (choice + ,@(mapcar (lambda (elem) (list 'const (car elem))) + nnir-engines)))) + :group 'nnir) ;; Gnus glue. @@ -804,7 +811,7 @@ details on the language and supported extensions" (message "Searching %s... %d matches" group arts))) (message "Searching %s...done" group)) (quit nil)) - artlist)) + (nreverse artlist))) groups))))) (defun nnir-imap-make-query (criteria qstring) @@ -1397,14 +1404,15 @@ Tested with Namazu 2.0.6 on a GNU/Linux system." ;; gmane interface (defun nnir-run-gmane (query srv &optional groups) "Run a search against a gmane back-end server." - (if (gnus-string-match-p "gmane" srv) (let* ((case-fold-search t) (qstring (cdr (assq 'query query))) (server (cadr (gnus-server-to-method srv))) (groupspec (mapconcat (lambda (x) - (format "group:%s" (gnus-group-short-name x))) - groups " ")) + (if (gnus-string-match-p "gmane" x) + (format "group:%s" (gnus-group-short-name x)) + (error "Can't search non-gmane groups: %s" x))) + groups " ")) (authorspec (if (assq 'author query) (format "author:%s" (cdr (assq 'author query))) "")) @@ -1439,9 +1447,7 @@ Tested with Namazu 2.0.6 on a GNU/Linux system." (string-to-number (match-string 2 xref)) xscore) artlist))))) (forward-line 1))) - (apply 'vector (nreverse (mm-delete-duplicates artlist)))) - (message "Can't search non-gmane nntp groups") - nil)) + (apply 'vector (nreverse (mm-delete-duplicates artlist))))) ;;; Util Code: @@ -1536,7 +1542,8 @@ server is of form 'backend:name'." (let ((cur (current-buffer)) name) (goto-char (point-min)) - (unless (string= nnir-ignored-newsgroups "") + (unless (or (null nnir-ignored-newsgroups) + (string= nnir-ignored-newsgroups "")) (delete-matching-lines nnir-ignored-newsgroups)) (if (eq (car method) 'nntp) (while (not (eobp)) @@ -1582,12 +1589,14 @@ server is of form 'backend:name'." (when (eq (car (gnus-find-method-for-group gnus-newsgroup-name)) 'nnir) (setq gnus-summary-line-format (or nnir-summary-line-format gnus-summary-line-format)) - (remove-hook 'gnus-summary-article-delete-hook 'gnus-registry-action t) - (remove-hook 'gnus-summary-article-move-hook 'gnus-registry-action t) - (remove-hook 'gnus-summary-article-expire-hook 'gnus-registry-action t) - (add-hook 'gnus-summary-article-delete-hook 'nnir-registry-action t t) - (add-hook 'gnus-summary-article-move-hook 'nnir-registry-action t t) - (add-hook 'gnus-summary-article-expire-hook 'nnir-registry-action t t))) + (when (and (boundp 'gnus-registry-install) + (eq gnus-registry-install t)) + (remove-hook 'gnus-summary-article-delete-hook 'gnus-registry-action t) + (remove-hook 'gnus-summary-article-move-hook 'gnus-registry-action t) + (remove-hook 'gnus-summary-article-expire-hook 'gnus-registry-action t) + (add-hook 'gnus-summary-article-delete-hook 'nnir-registry-action t t) + (add-hook 'gnus-summary-article-move-hook 'nnir-registry-action t t) + (add-hook 'gnus-summary-article-expire-hook 'nnir-registry-action t t)))) diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el index 06b464c0b29..b2336e13b64 100644 --- a/lisp/gnus/nnmail.el +++ b/lisp/gnus/nnmail.el @@ -1,8 +1,6 @@ ;;; nnmail.el --- mail support functions for the Gnus mail backends -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1995-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news, mail @@ -1150,6 +1148,7 @@ FUNC will be called with the group name to determine the article number." (setq nnmail-split-trace nil)) (if (or (and (symbolp nnmail-split-methods) (fboundp nnmail-split-methods)) + (not (consp (car-safe nnmail-split-methods))) (and (listp nnmail-split-methods) ;; Not a regular split method, so it has to be a ;; fancy one. @@ -1915,7 +1914,7 @@ If TIME is nil, then return the cutoff time for oldness instead." (unless (eq target 'delete) (when (or (gnus-request-group target) (gnus-request-create-group target)) - (let ((group-art (gnus-request-accept-article target nil t t))) + (let ((group-art (gnus-request-accept-article target nil nil t))) (when (and (consp group-art) (cdr group-art)) (gnus-group-mark-article-read target (cdr group-art)))))))) diff --git a/lisp/gnus/nnmairix.el b/lisp/gnus/nnmairix.el index 7ea2437b956..b82d6c2ee7b 100644 --- a/lisp/gnus/nnmairix.el +++ b/lisp/gnus/nnmairix.el @@ -1,6 +1,6 @@ ;;; nnmairix.el --- Mairix back end for Gnus, the Emacs newsreader -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: David Engster <dengste@eml.cc> ;; Keywords: mail searching diff --git a/lisp/gnus/nnmbox.el b/lisp/gnus/nnmbox.el index 003c424f58d..aac5a064a7f 100644 --- a/lisp/gnus/nnmbox.el +++ b/lisp/gnus/nnmbox.el @@ -1,7 +1,6 @@ ;;; nnmbox.el --- mail mbox access for Gnus -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet> diff --git a/lisp/gnus/nnmh.el b/lisp/gnus/nnmh.el index 984144e0d9a..5fa1a89cf48 100644 --- a/lisp/gnus/nnmh.el +++ b/lisp/gnus/nnmh.el @@ -1,7 +1,6 @@ ;;; nnmh.el --- mhspool access for Gnus -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet> diff --git a/lisp/gnus/nnml.el b/lisp/gnus/nnml.el index 46a6d903f7e..399008cec1b 100644 --- a/lisp/gnus/nnml.el +++ b/lisp/gnus/nnml.el @@ -1,7 +1,7 @@ ;;; nnml.el --- mail spool access for Gnus -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995-2011 Free Software +;; Foundation, Inc. ;; Authors: Didier Verna <didier@xemacs.org> (adding compaction) ;; Simon Josefsson <simon@josefsson.org> (adding MARKS) @@ -235,7 +235,11 @@ non-nil.") (nnheader-article-to-file-alist (setq gpath (nnml-group-pathname (car group-num) nil server)))))) - (setq path (concat gpath (int-to-string (cdr group-num))))) + (nnml-update-file-alist) + (setq path (concat gpath (if nnml-use-compressed-files + (cdr (assq (cdr group-num) + nnml-article-file-alist)) + (number-to-string (cdr group-num)))))) (setq path (nnml-article-to-file id))) (cond ((not path) diff --git a/lisp/gnus/nnoo.el b/lisp/gnus/nnoo.el index 083bedc6e19..bbe47fcf5c0 100644 --- a/lisp/gnus/nnoo.el +++ b/lisp/gnus/nnoo.el @@ -1,7 +1,6 @@ ;;; nnoo.el --- OO Gnus Backends -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news diff --git a/lisp/gnus/nnregistry.el b/lisp/gnus/nnregistry.el index 03ff5e716aa..947ba4b236b 100644 --- a/lisp/gnus/nnregistry.el +++ b/lisp/gnus/nnregistry.el @@ -1,7 +1,7 @@ ;;; nnregistry.el --- access to articles via Gnus' message-id registry ;;; -*- coding: utf-8 -*- -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. ;; Authors: Ludovic Courtès <ludo@gnu.org> ;; Keywords: news, mail diff --git a/lisp/gnus/nnrss.el b/lisp/gnus/nnrss.el index 9a02c26073d..b12700fac64 100644 --- a/lisp/gnus/nnrss.el +++ b/lisp/gnus/nnrss.el @@ -1,7 +1,6 @@ ;;; nnrss.el --- interfacing with RSS -;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2001-2011 Free Software Foundation, Inc. ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu> ;; Keywords: RSS diff --git a/lisp/gnus/nnspool.el b/lisp/gnus/nnspool.el index 1916c1ac9ad..6c23f41132f 100644 --- a/lisp/gnus/nnspool.el +++ b/lisp/gnus/nnspool.el @@ -1,7 +1,6 @@ ;;; nnspool.el --- spool access for GNU Emacs -;; Copyright (C) 1988, 1989, 1990, 1993, 1994, 1995, 1996, 1997, 1998, -;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 1988-1990, 1993-1998, 2000-2011 ;; Free Software Foundation, Inc. ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet> diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index c0072a6ef2a..cae0150dd17 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el @@ -1,8 +1,7 @@ ;;; nntp.el --- nntp access for Gnus -;; Copyright (C) 1987, 1988, 1989, 1990, 1992, 1993, 1994, 1995, 1996, -;; 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1987-1990, 1992-1998, 2000-2011 +;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news @@ -775,6 +774,62 @@ command whose response triggered the error." (nntp-copy-to-buffer nntp-server-buffer (point-min) (point-max)) 'headers))))) +(deffoo nntp-retrieve-group-data-early (server infos) + "Retrieve group info on INFOS." + (nntp-with-open-group nil server + (when (nntp-find-connection-buffer nntp-server-buffer) + ;; The first time this is run, this variable is `try'. So we + ;; try. + (when (eq nntp-server-list-active-group 'try) + (nntp-try-list-active (gnus-group-real-name (gnus-info-group (car infos))))) + (with-current-buffer (nntp-find-connection-buffer nntp-server-buffer) + (erase-buffer) + (let ((nntp-inhibit-erase t) + (command (if nntp-server-list-active-group + "LIST ACTIVE" "GROUP"))) + (dolist (info infos) + (nntp-send-command + nil command (gnus-group-real-name (gnus-info-group info))))) + (length infos))))) + +(deffoo nntp-finish-retrieve-group-infos (server infos count) + (nntp-with-open-group nil server + (let ((buf (nntp-find-connection-buffer nntp-server-buffer)) + (method (gnus-find-method-for-group + (gnus-info-group (car infos)) + (car infos))) + (received 0) + (last-point 1)) + (when buf + (with-current-buffer buf + (while (and (gnus-buffer-live-p buf) + (progn + (goto-char last-point) + ;; Count replies. + (while (re-search-forward "^[0-9]" nil t) + (incf received)) + (setq last-point (point)) + (< received count))) + (nntp-accept-response)) + ;; We now have all the entries. Remove CRs. + (goto-char (point-min)) + (while (search-forward "\r" nil t) + (replace-match "" t t)) + + (if (not nntp-server-list-active-group) + (progn + (nntp-copy-to-buffer nntp-server-buffer + (point-min) (point-max)) + (gnus-groups-to-gnus-format method gnus-active-hashtb t)) + ;; We have read active entries, so we just delete the + ;; superfluous gunk. + (goto-char (point-min)) + (while (re-search-forward "^[.2-5]" nil t) + (delete-region (match-beginning 0) + (progn (forward-line 1) (point)))) + (nntp-copy-to-buffer nntp-server-buffer (point-min) (point-max)) + (gnus-active-to-gnus-format method gnus-active-hashtb nil t))))))) + (deffoo nntp-retrieve-groups (groups &optional server) "Retrieve group info on GROUPS." (nntp-with-open-group diff --git a/lisp/gnus/nnvirtual.el b/lisp/gnus/nnvirtual.el index 88ff852e854..0cc53ad2332 100644 --- a/lisp/gnus/nnvirtual.el +++ b/lisp/gnus/nnvirtual.el @@ -1,7 +1,6 @@ ;;; nnvirtual.el --- virtual newsgroups access for Gnus -;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994-2011 Free Software Foundation, Inc. ;; Author: David Moore <dmoore@ucsd.edu> ;; Lars Magne Ingebrigtsen <larsi@gnus.org> diff --git a/lisp/gnus/nnweb.el b/lisp/gnus/nnweb.el index ac643f9ed1f..f190bb7cffa 100644 --- a/lisp/gnus/nnweb.el +++ b/lisp/gnus/nnweb.el @@ -1,7 +1,6 @@ ;;; nnweb.el --- retrieving articles via web search engines -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news diff --git a/lisp/gnus/pop3.el b/lisp/gnus/pop3.el index eef53c2797d..08cd7cd4ef1 100644 --- a/lisp/gnus/pop3.el +++ b/lisp/gnus/pop3.el @@ -1,7 +1,6 @@ ;;; pop3.el --- Post Office Protocol (RFC 1460) interface -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-2011 Free Software Foundation, Inc. ;; Author: Richard L. Pieri <ratinox@peorth.gweep.net> ;; Maintainer: FSF diff --git a/lisp/gnus/proto-stream.el b/lisp/gnus/proto-stream.el index e8df945b946..9117ac9f4e3 100644 --- a/lisp/gnus/proto-stream.el +++ b/lisp/gnus/proto-stream.el @@ -1,6 +1,6 @@ ;;; proto-stream.el --- negotiating TLS, STARTTLS and other connections -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: network @@ -101,17 +101,28 @@ command to switch on STARTTLS otherwise." (setq type 'network)) ((eq type 'ssl) (setq type 'tls))) - (destructuring-bind (stream greeting capabilities) - (funcall (intern (format "proto-stream-open-%s" type) obarray) - name buffer host service parameters) - (list (and stream - (memq (process-status stream) - '(open run)) - stream) - greeting capabilities)))) + (let ((open-result + (funcall (intern (format "proto-stream-open-%s" type) obarray) + name buffer host service parameters))) + (if (null open-result) + (list nil nil nil type) + (let ((stream (car open-result))) + (list (and stream + (memq (process-status stream) + '(open run)) + stream) + (nth 1 open-result) + (nth 2 open-result) + (nth 3 open-result))))))) (defun proto-stream-open-network-only (name buffer host service parameters) - (open-network-stream name buffer host service)) + (let ((start (with-current-buffer buffer (point))) + (stream (open-network-stream name buffer host service))) + (list stream + (proto-stream-get-response + stream start (proto-stream-eoc parameters)) + nil + 'network))) (defun proto-stream-open-network (name buffer host service parameters) (let* ((start (with-current-buffer buffer (point))) @@ -122,7 +133,7 @@ command to switch on STARTTLS otherwise." (greeting (proto-stream-get-response stream start eoc)) success) (if (not capability-command) - (list stream greeting nil) + (list stream greeting nil 'network) (let* ((capabilities (proto-stream-command stream capability-command eoc)) (starttls-command @@ -140,7 +151,7 @@ command to switch on STARTTLS otherwise." (delete-process stream) nil) ;; Otherwise, just return this plain network connection. - (list stream greeting capabilities))) + (list stream greeting capabilities 'network))) ;; We have some kind of STARTTLS support, so we try to ;; upgrade the connection opportunistically. ((or (fboundp 'open-gnutls-stream) @@ -168,7 +179,7 @@ command to switch on STARTTLS otherwise." (progn (delete-process stream) nil) - (list stream greeting capabilities))) + (list stream greeting capabilities 'network))) ;; The server said it was OK to start doing STARTTLS negotiations. (if (fboundp 'open-gnutls-stream) (gnutls-negotiate stream nil) @@ -185,7 +196,7 @@ command to switch on STARTTLS otherwise." ;; Re-get the capabilities, since they may have changed ;; after switching to TLS. (list stream greeting - (proto-stream-command stream capability-command eoc)))) + (proto-stream-command stream capability-command eoc) 'tls))) ;; We don't have STARTTLS support available, but the caller ;; requested a STARTTLS connection, so we give up. ((eq (cadr (memq :type parameters)) 'starttls) @@ -193,7 +204,7 @@ command to switch on STARTTLS otherwise." nil) ;; Fall back on using a plain network stream. (t - (list stream greeting capabilities))))))) + (list stream greeting capabilities 'network))))))) (defun proto-stream-command (stream command eoc) (let ((start (with-current-buffer (process-buffer stream) (point-max)))) @@ -234,7 +245,7 @@ command to switch on STARTTLS otherwise." (when (re-search-forward (proto-stream-eoc parameters) nil t) (goto-char (match-beginning 0)) (delete-region (point-min) (line-beginning-position)))) - (proto-stream-capability-open start stream parameters))))) + (proto-stream-capability-open start stream parameters 'tls))))) (defun proto-stream-open-shell (name buffer host service parameters) (proto-stream-capability-open @@ -247,16 +258,17 @@ command to switch on STARTTLS otherwise." (format-spec-make ?s host ?p service)))) - parameters)) + parameters 'network)) -(defun proto-stream-capability-open (start stream parameters) +(defun proto-stream-capability-open (start stream parameters stream-type) (let ((capability-command (cadr (memq :capability-command parameters))) (greeting (proto-stream-get-response stream start (proto-stream-eoc parameters)))) (list stream greeting (and capability-command (proto-stream-command - stream capability-command (proto-stream-eoc parameters)))))) + stream capability-command (proto-stream-eoc parameters))) + stream-type))) (defun proto-stream-eoc (parameters) (or (cadr (memq :end-of-command parameters)) diff --git a/lisp/gnus/qp.el b/lisp/gnus/qp.el index 90975c48cd3..584e24177af 100644 --- a/lisp/gnus/qp.el +++ b/lisp/gnus/qp.el @@ -1,7 +1,6 @@ ;;; qp.el --- Quoted-Printable functions -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: mail, extensions diff --git a/lisp/gnus/rfc1843.el b/lisp/gnus/rfc1843.el index 87fcde60138..019dc6ed8a2 100644 --- a/lisp/gnus/rfc1843.el +++ b/lisp/gnus/rfc1843.el @@ -1,7 +1,6 @@ ;;; rfc1843.el --- HZ (rfc1843) decoding -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu> ;; Keywords: news HZ HZ+ mail i18n diff --git a/lisp/gnus/rfc2045.el b/lisp/gnus/rfc2045.el index 0263129c20a..d9aaf88b046 100644 --- a/lisp/gnus/rfc2045.el +++ b/lisp/gnus/rfc2045.el @@ -1,7 +1,6 @@ ;;; rfc2045.el --- Functions for decoding rfc2045 headers -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; This file is part of GNU Emacs. diff --git a/lisp/gnus/rfc2047.el b/lisp/gnus/rfc2047.el index 51eef88dadc..e82192b91d6 100644 --- a/lisp/gnus/rfc2047.el +++ b/lisp/gnus/rfc2047.el @@ -1,7 +1,6 @@ ;;; rfc2047.el --- functions for encoding and decoding rfc2047 messages -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; MORIOKA Tomohiko <morioka@jaist.ac.jp> diff --git a/lisp/gnus/rfc2104.el b/lisp/gnus/rfc2104.el index c1d07231978..158cf4bae22 100644 --- a/lisp/gnus/rfc2104.el +++ b/lisp/gnus/rfc2104.el @@ -1,7 +1,6 @@ ;;; rfc2104.el --- RFC2104 Hashed Message Authentication Codes -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Simon Josefsson <jas@pdc.kth.se> ;; Keywords: mail diff --git a/lisp/gnus/rfc2231.el b/lisp/gnus/rfc2231.el index 0b028a08b83..306b67cd7c1 100644 --- a/lisp/gnus/rfc2231.el +++ b/lisp/gnus/rfc2231.el @@ -1,7 +1,6 @@ ;;; rfc2231.el --- Functions for decoding rfc2231 headers -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; This file is part of GNU Emacs. diff --git a/lisp/gnus/rtree.el b/lisp/gnus/rtree.el index 04079b1ba8b..869ca4f0069 100644 --- a/lisp/gnus/rtree.el +++ b/lisp/gnus/rtree.el @@ -1,6 +1,6 @@ ;;; rtree.el --- functions for manipulating range trees -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> diff --git a/lisp/gnus/score-mode.el b/lisp/gnus/score-mode.el index 04eae85bac5..a7ed6bc0cb8 100644 --- a/lisp/gnus/score-mode.el +++ b/lisp/gnus/score-mode.el @@ -1,7 +1,6 @@ ;;; score-mode.el --- mode for editing Gnus score files -;; Copyright (C) 1996, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996, 2001-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news, mail diff --git a/lisp/gnus/shr-color.el b/lisp/gnus/shr-color.el index afb56ae38a7..4b885d9dbf8 100644 --- a/lisp/gnus/shr-color.el +++ b/lisp/gnus/shr-color.el @@ -1,6 +1,6 @@ ;;; shr-color.el --- Simple HTML Renderer color management -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. ;; Author: Julien Danjou <julien@danjou.info> ;; Keywords: html diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el index 692d1262348..f3c75ccd6a3 100644 --- a/lisp/gnus/shr.el +++ b/lisp/gnus/shr.el @@ -1,6 +1,6 @@ ;;; shr.el --- Simple HTML Renderer -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: html @@ -74,8 +74,12 @@ fit these criteria." :type 'character) (defcustom shr-width fill-column - "Frame width to use for rendering." - :type 'integer + "Frame width to use for rendering. +May either be an integer specifying a fixed width in characters, +or nil, meaning that the full width of the window should be +used." + :type '(choice (integer :tag "Fixed width in characters") + (const :tag "Use the width of the window" nil)) :group 'shr) (defvar shr-content-function nil @@ -113,7 +117,8 @@ cid: URL as the argument.") (defun shr-insert-document (dom) (setq shr-content-cache nil) (let ((shr-state nil) - (shr-start nil)) + (shr-start nil) + (shr-width (or shr-width (window-width)))) (shr-descend (shr-transform-dom dom)))) (defun shr-copy-url () @@ -253,16 +258,12 @@ redirects somewhere else." (when (and (bolp) (> shr-indentation 0)) (shr-indent)) - ;; The shr-start is a special variable that is used to pass - ;; upwards the first point in the buffer where the text really - ;; starts. - (unless shr-start - (setq shr-start (point))) ;; No space is needed behind a wide character categorized as ;; kinsoku-bol, between characters both categorized as nospace, ;; or at the beginning of a line. (let (prev) - (when (and (eq (preceding-char) ? ) + (when (and (> (current-column) shr-indentation) + (eq (preceding-char) ? ) (or (= (line-beginning-position) (1- (point))) (and (shr-char-breakable-p (setq prev (char-after (- (point) 2)))) @@ -270,6 +271,11 @@ redirects somewhere else." (and (shr-char-nospace-p prev) (shr-char-nospace-p (aref elem 0))))) (delete-char -1))) + ;; The shr-start is a special variable that is used to pass + ;; upwards the first point in the buffer where the text really + ;; starts. + (unless shr-start + (setq shr-start (point))) (insert elem) (let (found) (while (and (> (current-column) shr-width) @@ -456,11 +462,12 @@ redirects somewhere else." (search-forward "\r\n\r\n" nil t)) (let ((data (buffer-substring (point) (point-max)))) (with-current-buffer buffer - (let ((alt (buffer-substring start end)) - (inhibit-read-only t)) - (delete-region start end) - (goto-char start) - (shr-put-image data alt)))))) + (save-excursion + (let ((alt (buffer-substring start end)) + (inhibit-read-only t)) + (delete-region start end) + (goto-char start) + (shr-put-image data alt))))))) (kill-buffer (current-buffer))) (defun shr-put-image (data alt) @@ -501,6 +508,9 @@ redirects somewhere else." (create-image data 'imagemagick t :width window-width) image))) + (when (and (fboundp 'create-animated-image) + (eq (image-type data nil t) 'gif)) + (setq image (create-animated-image data 'gif t))) image))) ;; url-cache-extract autoloads url-cache. @@ -602,13 +612,67 @@ ones, in case fg and bg are nil." (save-excursion (goto-char start) (while (< (point) end) - (when (bolp) + (when (and (bolp) + (not (eq type :background))) (skip-chars-forward " ")) (when (> (line-end-position) (point)) (shr-put-color-1 (point) (min (line-end-position) end) type color)) (if (< (line-end-position) end) (forward-line 1) - (goto-char end))))) + (goto-char end))) + (when (and (eq type :background) + (= shr-table-depth 0)) + (shr-expand-newlines start end color)))) + +(defun shr-expand-newlines (start end color) + (save-restriction + ;; Skip past all white space at the start and ends. + (goto-char start) + (skip-chars-forward " \t\n") + (beginning-of-line) + (setq start (point)) + (goto-char end) + (skip-chars-backward " \t\n") + (forward-line 1) + (setq end (point)) + (narrow-to-region start end) + (let ((width (shr-natural-width)) + column) + (goto-char (point-min)) + (while (not (eobp)) + (end-of-line) + (when (and (< (setq column (current-column)) width) + (< (setq column (shr-previous-newline-padding-width column)) + width)) + (let ((overlay (make-overlay (point) (1+ (point))))) + (overlay-put overlay 'before-string + (concat + (mapconcat + (lambda (overlay) + (let ((string (plist-get + (overlay-properties overlay) + 'before-string))) + (if (not string) + "" + (overlay-put overlay 'before-string "") + string))) + (overlays-at (point)) + "") + (propertize (make-string (- width column) ? ) + 'face (list :background color)))))) + (forward-line 1))))) + +(defun shr-previous-newline-padding-width (width) + (let ((overlays (overlays-at (point))) + (previous-width 0)) + (if (null overlays) + width + (dolist (overlay overlays) + (setq previous-width + (+ previous-width + (length (plist-get (overlay-properties overlay) + 'before-string))))) + (+ width previous-width)))) (defun shr-put-color-1 (start end type color) (let* ((old-props (get-text-property start 'face)) diff --git a/lisp/gnus/sieve-manage.el b/lisp/gnus/sieve-manage.el index a3647061d15..d115f40528b 100644 --- a/lisp/gnus/sieve-manage.el +++ b/lisp/gnus/sieve-manage.el @@ -1,7 +1,6 @@ ;;; sieve-manage.el --- Implementation of the managesive protocol in elisp -;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, -;; 2010 Free Software Foundation, Inc. +;; Copyright (C) 2001-2011 Free Software Foundation, Inc. ;; Author: Simon Josefsson <simon@josefsson.org> @@ -390,13 +389,14 @@ Optional argument AUTH indicates authenticator to use, see If nil, chooses the best stream the server is capable of. Optional argument BUFFER is buffer (buffer, or string naming buffer) to work in." - (setq buffer (or buffer (format " *sieve* %s:%s" server (or port sieve-manage-default-port)))) + (or port (setq port sieve-manage-default-port)) + (setq buffer (or buffer (format " *sieve* %s:%s" server port))) (with-current-buffer (get-buffer-create buffer) (mapc 'make-local-variable sieve-manage-local-variables) (sieve-manage-disable-multibyte) (buffer-disable-undo) (setq sieve-manage-server (or server sieve-manage-server)) - (setq sieve-manage-port (or port sieve-manage-port)) + (setq sieve-manage-port port) (setq sieve-manage-stream (or stream sieve-manage-stream)) (message "sieve: Connecting to %s..." sieve-manage-server) (if (let ((sieve-manage-stream diff --git a/lisp/gnus/sieve-mode.el b/lisp/gnus/sieve-mode.el index 78927009fc6..efd28affacb 100644 --- a/lisp/gnus/sieve-mode.el +++ b/lisp/gnus/sieve-mode.el @@ -1,7 +1,6 @@ ;;; sieve-mode.el --- Sieve code editing commands for Emacs -;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, -;; 2010 Free Software Foundation, Inc. +;; Copyright (C) 2001-2011 Free Software Foundation, Inc. ;; Author: Simon Josefsson <simon@josefsson.org> diff --git a/lisp/gnus/sieve.el b/lisp/gnus/sieve.el index ca181c2e7b3..31b2665a644 100644 --- a/lisp/gnus/sieve.el +++ b/lisp/gnus/sieve.el @@ -1,6 +1,6 @@ ;;; sieve.el --- Utilities to manage sieve scripts -;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2001-2011 Free Software Foundation, Inc. ;; Author: Simon Josefsson <simon@josefsson.org> @@ -322,9 +322,10 @@ Server : " server ":" (or port "2000") " (defun sieve-open-server (server &optional port) "Open SERVER (on PORT) and authenticate." (with-current-buffer - ;; open server - (set (make-local-variable 'sieve-manage-buffer) - (sieve-manage-open server)) + (or ;; open server + (set (make-local-variable 'sieve-manage-buffer) + (sieve-manage-open server)) + (error "Error opening server %s" server)) (sieve-manage-authenticate))) (defun sieve-refresh-scriptlist () diff --git a/lisp/gnus/smiley.el b/lisp/gnus/smiley.el index afffc64f12f..2f5c74220ea 100644 --- a/lisp/gnus/smiley.el +++ b/lisp/gnus/smiley.el @@ -1,7 +1,6 @@ ;;; smiley.el --- displaying smiley faces -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; Author: Dave Love <fx@gnu.org> ;; Keywords: news mail multimedia diff --git a/lisp/gnus/smime.el b/lisp/gnus/smime.el index 27db3e35e20..5a7079883e6 100644 --- a/lisp/gnus/smime.el +++ b/lisp/gnus/smime.el @@ -1,7 +1,6 @@ ;;; smime.el --- S/MIME support library -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; Author: Simon Josefsson <simon@josefsson.org> ;; Keywords: SMIME X.509 PEM OpenSSL diff --git a/lisp/gnus/spam-report.el b/lisp/gnus/spam-report.el index 30e0ae58f05..95b5fb578f4 100644 --- a/lisp/gnus/spam-report.el +++ b/lisp/gnus/spam-report.el @@ -1,7 +1,6 @@ ;;; spam-report.el --- Reporting spam -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Author: Ted Zlatanov <tzz@lifelogs.com> ;; Keywords: network, spam, mail, gmane, report diff --git a/lisp/gnus/spam-stat.el b/lisp/gnus/spam-stat.el index d6b20df78b8..b56d0c416ef 100644 --- a/lisp/gnus/spam-stat.el +++ b/lisp/gnus/spam-stat.el @@ -1,7 +1,6 @@ ;;; spam-stat.el --- detecting spam based on statistics -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, -;; 2010 Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Author: Alex Schroeder <alex@gnu.org> ;; Keywords: network diff --git a/lisp/gnus/spam-wash.el b/lisp/gnus/spam-wash.el index d201c9eddf9..88e2037f5e7 100644 --- a/lisp/gnus/spam-wash.el +++ b/lisp/gnus/spam-wash.el @@ -1,6 +1,6 @@ ;;; spam-wash.el --- wash spam before analysis -;; Copyright (C) 2004, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2004, 2007-2011 Free Software Foundation, Inc. ;; Author: Andrew Cohen <cohen@andy.bu.edu> ;; Keywords: mail diff --git a/lisp/gnus/spam.el b/lisp/gnus/spam.el index 097299f30c4..2ebf0ba1e1d 100644 --- a/lisp/gnus/spam.el +++ b/lisp/gnus/spam.el @@ -1,7 +1,6 @@ ;;; spam.el --- Identifying spam -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Maintainer: Ted Zlatanov <tzz@lifelogs.com> @@ -45,9 +44,9 @@ (eval-when-compile (require 'cl)) -(require 'message) ;for the message-fetch-field functions +(require 'message) ;for the message-fetch-field functions (require 'gnus-sum) -(require 'gnus-uu) ; because of key prefix issues +(require 'gnus-uu) ; because of key prefix issues ;;; for the definitions of group content classification and spam processors (require 'gnus) @@ -93,12 +92,16 @@ Populated by `spam-install-backend-super'.") "Exit behavior at the time of summary exit. Note that setting the `spam-use-move' or `spam-use-copy' backends on a group through group/topic parameters overrides this mechanism." - :type '(choice (const 'default :tag - "Move spam out of all groups. Move ham out of spam groups.") - (const 'move-all :tag - "Move spam out of all groups. Move ham out of all groups.") - (const 'move-none :tag - "Never move spam or ham out of any groups.")) + :type '(choice + (const + 'default + :tag "Move spam out of all groups and ham out of spam groups.") + (const + 'move-all + :tag "Move spam out of all groups and ham out of all groups.") + (const + 'move-none + :tag "Never move spam or ham out of any groups.")) :group 'spam) (defcustom spam-directory (nnheader-concat gnus-directory "spam/") @@ -296,27 +299,27 @@ them." :group 'spam) (defcustom spam-install-hooks (or - spam-use-dig - spam-use-gmane-xref - spam-use-blacklist - spam-use-whitelist - spam-use-whitelist-exclusive - spam-use-blackholes - spam-use-hashcash - spam-use-regex-headers - spam-use-regex-body - spam-use-bogofilter - spam-use-bogofilter-headers - spam-use-spamassassin - spam-use-spamassassin-headers - spam-use-bsfilter - spam-use-bsfilter-headers - spam-use-BBDB - spam-use-BBDB-exclusive - spam-use-ifile - spam-use-stat - spam-use-spamoracle - spam-use-crm114) + spam-use-dig + spam-use-gmane-xref + spam-use-blacklist + spam-use-whitelist + spam-use-whitelist-exclusive + spam-use-blackholes + spam-use-hashcash + spam-use-regex-headers + spam-use-regex-body + spam-use-bogofilter + spam-use-bogofilter-headers + spam-use-spamassassin + spam-use-spamassassin-headers + spam-use-bsfilter + spam-use-bsfilter-headers + spam-use-BBDB + spam-use-BBDB-exclusive + spam-use-ifile + spam-use-stat + spam-use-spamoracle + spam-use-crm114) "Whether the spam hooks should be installed. Default to t if one of the spam-use-* variables is set." :group 'spam @@ -330,8 +333,8 @@ Default to t if one of the spam-use-* variables is set." ;;; TODO: deprecate this variable, it's confusing since it's a list of strings, ;;; not regular expressions (defcustom spam-junk-mailgroups (cons - spam-split-group - '("mail.junk" "poste.pourriel")) + spam-split-group + '("mail.junk" "poste.pourriel")) "Mailgroups with spam contents. All unmarked article in such group receive the spam mark on group entry." :type '(repeat (string :tag "Group")) @@ -345,7 +348,7 @@ Only meaningful if you enable `spam-use-gmane-xref'." :group 'spam) (defcustom spam-blackhole-servers '("bl.spamcop.net" "relays.ordb.org" - "dev.null.dk" "relays.visi.com") + "dev.null.dk" "relays.visi.com") "List of blackhole servers. Only meaningful if you enable `spam-use-blackholes'." :type '(repeat (string :tag "Server")) @@ -405,9 +408,9 @@ Only meaningful if you enable `spam-use-regex-body'." (defcustom spam-summary-score-preferred-header nil "Preferred header to use for `spam-summary-score'." :type '(choice :tag "Header name" - (symbol :tag "SpamAssassin etc" X-Spam-Status) - (symbol :tag "Bogofilter" X-Bogosity) - (const :tag "No preference, take best guess." nil)) + (symbol :tag "SpamAssassin etc" X-Spam-Status) + (symbol :tag "Bogofilter" X-Bogosity) + (const :tag "No preference, take best guess." nil)) :group 'spam) (defgroup spam-ifile nil @@ -419,7 +422,7 @@ Only meaningful if you enable `spam-use-regex-body'." (defcustom spam-ifile-program (executable-find "ifile") "Name of the ifile program." :type '(choice (file :tag "Location of ifile") - (const :tag "ifile is not installed")) + (const :tag "ifile is not installed")) :group 'spam-ifile) (make-obsolete-variable 'spam-ifile-database-path 'spam-ifile-database @@ -427,7 +430,7 @@ Only meaningful if you enable `spam-use-regex-body'." (defcustom spam-ifile-database nil "File name of the ifile database." :type '(choice (file :tag "Location of the ifile database") - (const :tag "Use the default")) + (const :tag "Use the default")) :group 'spam-ifile) (defcustom spam-ifile-spam-category "spam" @@ -439,7 +442,7 @@ Only meaningful if you enable `spam-use-regex-body'." "Name of the ham ifile category. If nil, the current group name will be used." :type '(choice (string :tag "Use a fixed category") - (const :tag "Use the current group name")) + (const :tag "Use the current group name")) :group 'spam-ifile) (defcustom spam-ifile-all-categories nil @@ -458,7 +461,7 @@ your main source of newsgroup names." (defcustom spam-bogofilter-program (executable-find "bogofilter") "Name of the Bogofilter program." :type '(choice (file :tag "Location of bogofilter") - (const :tag "Bogofilter is not installed")) + (const :tag "Bogofilter is not installed")) :group 'spam-bogofilter) (defvar spam-bogofilter-valid 'unknown "Is the bogofilter version valid?") @@ -497,8 +500,8 @@ your main source of newsgroup names." "Location of the Bogofilter database. When nil, use the default location." :type '(choice (directory - :tag "Location of the Bogofilter database directory") - (const :tag "Use the default")) + :tag "Location of the Bogofilter database directory") + (const :tag "Use the default")) :group 'spam-bogofilter) (defgroup spam-bsfilter nil @@ -510,7 +513,7 @@ When nil, use the default location." (defcustom spam-bsfilter-program (executable-find "bsfilter") "Name of the Bsfilter program." :type '(choice (file :tag "Location of bsfilter") - (const :tag "Bsfilter is not installed")) + (const :tag "Bsfilter is not installed")) :group 'spam-bsfilter) (defcustom spam-bsfilter-header "X-Spam-Flag" @@ -546,8 +549,8 @@ When nil, use the default location." (defcustom spam-bsfilter-database-directory nil "Directory path of the Bsfilter databases." :type '(choice (directory - :tag "Location of the Bsfilter database directory") - (const :tag "Use the default")) + :tag "Location of the Bsfilter database directory") + (const :tag "Use the default")) :group 'spam-bsfilter) (defgroup spam-spamoracle nil @@ -558,13 +561,13 @@ When nil, use the default location." "Location of spamoracle database file. When nil, use the default spamoracle database." :type '(choice (directory :tag "Location of spamoracle database file.") - (const :tag "Use the default")) + (const :tag "Use the default")) :group 'spam-spamoracle) (defcustom spam-spamoracle-binary (executable-find "spamoracle") "Location of the spamoracle binary." :type '(choice (directory :tag "Location of the spamoracle binary") - (const :tag "Use the default")) + (const :tag "Use the default")) :group 'spam-spamoracle) (defgroup spam-spamassassin nil @@ -578,7 +581,7 @@ When nil, use the default spamoracle database." Hint: set this to \"spamc\" if you have spamd running. See the spamc and spamd man pages for more information on these programs." :type '(choice (file :tag "Location of spamc") - (const :tag "spamassassin is not installed")) + (const :tag "spamassassin is not installed")) :group 'spam-spamassassin) (defcustom spam-spamassassin-arguments () @@ -608,7 +611,7 @@ identification" (defcustom spam-sa-learn-program (executable-find "sa-learn") "Name of the sa-learn program." :type '(choice (file :tag "Location of spamassassin") - (const :tag "spamassassin is not installed")) + (const :tag "spamassassin is not installed")) :group 'spam-spamassassin) (defcustom spam-sa-learn-rebuild t @@ -642,7 +645,7 @@ order for SpamAssassin to recognize the new registered spam." (defcustom spam-crm114-program (executable-find "mailfilter.crm") "File path of the CRM114 Mailfilter executable program." :type '(choice (file :tag "Location of CRM114 Mailfilter") - (const :tag "CRM114 Mailfilter is not installed")) + (const :tag "CRM114 Mailfilter is not installed")) :group 'spam-crm114) (defcustom spam-crm114-header "X-CRM114-Status" @@ -678,8 +681,8 @@ order for SpamAssassin to recognize the new registered spam." (defcustom spam-crm114-database-directory nil "Directory path of the CRM114 Mailfilter databases." :type '(choice (directory - :tag "Location of the CRM114 Mailfilter database directory") - (const :tag "Use the default")) + :tag "Location of the CRM114 Mailfilter database directory") + (const :tag "Use the default")) :group 'spam-crm114) ;;; Key bindings for spam control. @@ -696,8 +699,8 @@ order for SpamAssassin to recognize the new registered spam." "Whether spam.el will try to cache lookups using `spam-caches'.") (defvar spam-caches (make-hash-table - :size 10 - :test 'equal) + :size 10 + :test 'equal) "Cache of spam detection entries.") (defvar spam-old-articles nil @@ -736,11 +739,11 @@ When either list is nil, the other is returned." (if (and list1 list2) ;; we have two non-nil lists (progn - (dolist (item (append list1 list2)) - (when (and (memq item list1) (memq item list2)) - (setq list1 (delq item list1)) - (setq list2 (delq item list2)))) - (append list1 list2)) + (dolist (item (append list1 list2)) + (when (and (memq item list1) (memq item list2)) + (setq list1 (delq item list1)) + (setq list2 (delq item list2)))) + (append list1 list2)) ;; if either of the lists was nil, return the other one (if list1 list1 list2))) @@ -748,9 +751,9 @@ When either list is nil, the other is returned." "Checks if MARK is considered a ham mark in GROUP." (when (stringp group) (let* ((marks (spam-group-ham-marks group spam)) - (marks (if (symbolp mark) - marks - (mapcar 'symbol-value marks)))) + (marks (if (symbolp mark) + marks + (mapcar 'symbol-value marks)))) (memq mark marks)))) (defun spam-group-spam-mark-p (group mark) @@ -761,10 +764,10 @@ When either list is nil, the other is returned." "In GROUP, get all the ham marks." (when (stringp group) (let* ((marks (if spam - (gnus-parameter-spam-marks group) - (gnus-parameter-ham-marks group))) - (marks (car marks)) - (marks (if (listp (car marks)) (car marks) marks))) + (gnus-parameter-spam-marks group) + (gnus-parameter-ham-marks group))) + (marks (car marks)) + (marks (if (listp (car marks)) (car marks) marks))) marks))) (defun spam-group-spam-marks (group) @@ -775,15 +778,15 @@ When either list is nil, the other is returned." "Is GROUP a spam group?" (if (and (stringp group) (< 0 (length group))) (or (member group spam-junk-mailgroups) - (memq 'gnus-group-spam-classification-spam - (gnus-parameter-spam-contents group))) + (memq 'gnus-group-spam-classification-spam + (gnus-parameter-spam-contents group))) nil)) (defun spam-group-ham-contents-p (group) "Is GROUP a ham group?" (if (stringp group) (memq 'gnus-group-spam-classification-ham - (gnus-parameter-spam-contents group)) + (gnus-parameter-spam-contents group)) nil)) (defun spam-classifications () @@ -812,20 +815,20 @@ When either list is nil, the other is returned." (defun spam-list-articles (articles classification) (let ((mark-check (if (eq classification 'spam) - 'spam-group-spam-mark-p - 'spam-group-ham-mark-p)) - alist mark-cache-yes mark-cache-no) + 'spam-group-spam-mark-p + 'spam-group-ham-mark-p)) + alist mark-cache-yes mark-cache-no) (dolist (article articles) (let ((mark (gnus-summary-article-mark article))) - (unless (or (memq mark mark-cache-yes) - (memq mark mark-cache-no)) - (if (funcall mark-check - gnus-newsgroup-name - mark) - (push mark mark-cache-yes) - (push mark mark-cache-no))) - (when (memq mark mark-cache-yes) - (push article alist)))) + (unless (or (memq mark mark-cache-yes) + (memq mark mark-cache-no)) + (if (funcall mark-check + gnus-newsgroup-name + mark) + (push mark mark-cache-yes) + (push mark mark-cache-no))) + (when (memq mark mark-cache-yes) + (push article alist)))) alist)) ;;}}} @@ -841,13 +844,13 @@ backend is STATISTICAL." (setq spam-backends (add-to-list 'spam-backends backend)) (while properties (let ((property (pop properties)) - (value (pop properties))) + (value (pop properties))) (if (spam-backend-property-valid-p property) - (put backend property value) - (gnus-error - 5 - "spam-install-backend-super got an invalid property %s" - property))))) + (put backend property value) + (gnus-error + 5 + "spam-install-backend-super got an invalid property %s" + property))))) (defun spam-backend-list (&optional type) "Return a list of all the backend symbols, constrained by TYPE. @@ -856,16 +859,16 @@ When TYPE is 'mover, only mover backends are returned." (let (list) (dolist (backend spam-backends) (when (or - (null type) ;either no type was requested - ;; or the type is 'mover and the backend is a mover - (and - (eq type 'mover) - (spam-backend-mover-p backend)) - ;; or the type is 'non-mover and the backend is not a mover - (and - (eq type 'non-mover) - (not (spam-backend-mover-p backend)))) - (push backend list))) + (null type) ;either no type was requested + ;; or the type is 'mover and the backend is a mover + (and + (eq type 'mover) + (spam-backend-mover-p backend)) + ;; or the type is 'non-mover and the backend is not a mover + (and + (eq type 'non-mover) + (not (spam-backend-mover-p backend)))) + (push backend list))) list)) (defun spam-backend-check (backend) @@ -889,16 +892,16 @@ that the message is definitely a spam." "Return information about BACKEND." (if (spam-backend-valid-p backend) (let (info) - (setq info (format "Backend %s has the following properties:\n" - backend)) - (dolist (property (spam-backend-properties)) - (setq info (format "%s%s=%s\n" - info - property - (get backend property)))) - info) + (setq info (format "Backend %s has the following properties:\n" + backend)) + (dolist (property (spam-backend-properties)) + (setq info (format "%s%s=%s\n" + info + property + (get backend property)))) + info) (gnus-error 5 "spam-backend-info was asked about an invalid backend %s" - backend))) + backend))) (defun spam-backend-function (backend classification type) "Get the BACKEND function for CLASSIFICATION and TYPE. @@ -908,11 +911,11 @@ CLASSIFICATION is 'ham or 'spam." (spam-classification-valid-p classification) (spam-backend-function-type-valid-p type)) (let ((retrieval - (intern - (format "spam-backend-%s-%s-function" - classification - type)))) - (funcall retrieval backend)) + (intern + (format "spam-backend-%s-%s-function" + classification + type)))) + (funcall retrieval backend)) (gnus-error 5 "%s was passed invalid backend %s, classification %s, or type %s" @@ -922,15 +925,15 @@ CLASSIFICATION is 'ham or 'spam." type))) (defun spam-backend-article-list-property (classification - &optional unregister) + &optional unregister) "Property name of article list with CLASSIFICATION and UNREGISTER." (let* ((r (if unregister "unregister" "register")) - (prop (format "%s-%s" classification r))) + (prop (format "%s-%s" classification r))) prop)) (defun spam-backend-get-article-todo-list (backend - classification - &optional unregister) + classification + &optional unregister) "Get the articles to be processed for BACKEND and CLASSIFICATION. With UNREGISTER, get articles to be unregistered. This is a temporary storage function - nothing here persists." @@ -938,7 +941,8 @@ This is a temporary storage function - nothing here persists." backend (intern (spam-backend-article-list-property classification unregister)))) -(defun spam-backend-put-article-todo-list (backend classification list &optional unregister) +(defun spam-backend-put-article-todo-list (backend classification list + &optional unregister) "Set the LIST of articles to be processed for BACKEND and CLASSIFICATION. With UNREGISTER, set articles to be unregistered. This is a temporary storage function - nothing here persists." @@ -1036,125 +1040,125 @@ backends)." ;;{{{ backend installations (spam-install-checkonly-backend 'spam-use-blackholes - 'spam-check-blackholes) + 'spam-check-blackholes) (spam-install-checkonly-backend 'spam-use-hashcash - 'spam-check-hashcash) + 'spam-check-hashcash) (spam-install-checkonly-backend 'spam-use-spamassassin-headers - 'spam-check-spamassassin-headers) + 'spam-check-spamassassin-headers) (spam-install-checkonly-backend 'spam-use-bogofilter-headers - 'spam-check-bogofilter-headers) + 'spam-check-bogofilter-headers) (spam-install-checkonly-backend 'spam-use-bsfilter-headers - 'spam-check-bsfilter-headers) + 'spam-check-bsfilter-headers) (spam-install-checkonly-backend 'spam-use-gmane-xref - 'spam-check-gmane-xref) + 'spam-check-gmane-xref) (spam-install-checkonly-backend 'spam-use-regex-headers - 'spam-check-regex-headers) + 'spam-check-regex-headers) (spam-install-statistical-checkonly-backend 'spam-use-regex-body - 'spam-check-regex-body) + 'spam-check-regex-body) -;; TODO: NOTE: spam-use-ham-copy is now obsolete, use (ham spam-use-copy) instead +;; TODO: NOTE: spam-use-ham-copy is now obsolete, use (ham spam-use-copy) (spam-install-mover-backend 'spam-use-move - 'spam-move-ham-routine - 'spam-move-spam-routine - nil - nil) + 'spam-move-ham-routine + 'spam-move-spam-routine + nil + nil) (spam-install-nocheck-backend 'spam-use-copy - 'spam-copy-ham-routine - 'spam-copy-spam-routine - nil - nil) + 'spam-copy-ham-routine + 'spam-copy-spam-routine + nil + nil) (spam-install-nocheck-backend 'spam-use-gmane - 'spam-report-gmane-unregister-routine - 'spam-report-gmane-register-routine - 'spam-report-gmane-register-routine - 'spam-report-gmane-unregister-routine) + 'spam-report-gmane-unregister-routine + 'spam-report-gmane-register-routine + 'spam-report-gmane-register-routine + 'spam-report-gmane-unregister-routine) (spam-install-nocheck-backend 'spam-use-resend - 'spam-report-resend-register-ham-routine - 'spam-report-resend-register-routine - nil - nil) + 'spam-report-resend-register-ham-routine + 'spam-report-resend-register-routine + nil + nil) (spam-install-backend 'spam-use-BBDB - 'spam-check-BBDB - 'spam-BBDB-register-routine - nil - 'spam-BBDB-unregister-routine - nil) + 'spam-check-BBDB + 'spam-BBDB-register-routine + nil + 'spam-BBDB-unregister-routine + nil) (spam-install-backend-alias 'spam-use-BBDB 'spam-use-BBDB-exclusive) (spam-install-backend 'spam-use-blacklist - 'spam-check-blacklist - nil - 'spam-blacklist-register-routine - nil - 'spam-blacklist-unregister-routine) + 'spam-check-blacklist + nil + 'spam-blacklist-register-routine + nil + 'spam-blacklist-unregister-routine) (spam-install-backend 'spam-use-whitelist - 'spam-check-whitelist - 'spam-whitelist-register-routine - nil - 'spam-whitelist-unregister-routine - nil) + 'spam-check-whitelist + 'spam-whitelist-register-routine + nil + 'spam-whitelist-unregister-routine + nil) (spam-install-statistical-backend 'spam-use-ifile - 'spam-check-ifile - 'spam-ifile-register-ham-routine - 'spam-ifile-register-spam-routine - 'spam-ifile-unregister-ham-routine - 'spam-ifile-unregister-spam-routine) + 'spam-check-ifile + 'spam-ifile-register-ham-routine + 'spam-ifile-register-spam-routine + 'spam-ifile-unregister-ham-routine + 'spam-ifile-unregister-spam-routine) (spam-install-statistical-backend 'spam-use-spamoracle - 'spam-check-spamoracle - 'spam-spamoracle-learn-ham - 'spam-spamoracle-learn-spam - 'spam-spamoracle-unlearn-ham - 'spam-spamoracle-unlearn-spam) + 'spam-check-spamoracle + 'spam-spamoracle-learn-ham + 'spam-spamoracle-learn-spam + 'spam-spamoracle-unlearn-ham + 'spam-spamoracle-unlearn-spam) (spam-install-statistical-backend 'spam-use-stat - 'spam-check-stat - 'spam-stat-register-ham-routine - 'spam-stat-register-spam-routine - 'spam-stat-unregister-ham-routine - 'spam-stat-unregister-spam-routine) + 'spam-check-stat + 'spam-stat-register-ham-routine + 'spam-stat-register-spam-routine + 'spam-stat-unregister-ham-routine + 'spam-stat-unregister-spam-routine) (spam-install-statistical-backend 'spam-use-spamassassin - 'spam-check-spamassassin - 'spam-spamassassin-register-ham-routine - 'spam-spamassassin-register-spam-routine - 'spam-spamassassin-unregister-ham-routine - 'spam-spamassassin-unregister-spam-routine) + 'spam-check-spamassassin + 'spam-spamassassin-register-ham-routine + 'spam-spamassassin-register-spam-routine + 'spam-spamassassin-unregister-ham-routine + 'spam-spamassassin-unregister-spam-routine) (spam-install-statistical-backend 'spam-use-bogofilter - 'spam-check-bogofilter - 'spam-bogofilter-register-ham-routine - 'spam-bogofilter-register-spam-routine - 'spam-bogofilter-unregister-ham-routine - 'spam-bogofilter-unregister-spam-routine) + 'spam-check-bogofilter + 'spam-bogofilter-register-ham-routine + 'spam-bogofilter-register-spam-routine + 'spam-bogofilter-unregister-ham-routine + 'spam-bogofilter-unregister-spam-routine) (spam-install-statistical-backend 'spam-use-bsfilter - 'spam-check-bsfilter - 'spam-bsfilter-register-ham-routine - 'spam-bsfilter-register-spam-routine - 'spam-bsfilter-unregister-ham-routine - 'spam-bsfilter-unregister-spam-routine) + 'spam-check-bsfilter + 'spam-bsfilter-register-ham-routine + 'spam-bsfilter-register-spam-routine + 'spam-bsfilter-unregister-ham-routine + 'spam-bsfilter-unregister-spam-routine) (spam-install-statistical-backend 'spam-use-crm114 - 'spam-check-crm114 - 'spam-crm114-register-ham-routine - 'spam-crm114-register-spam-routine - 'spam-crm114-unregister-ham-routine - 'spam-crm114-unregister-spam-routine) + 'spam-check-crm114 + 'spam-crm114-register-ham-routine + 'spam-crm114-register-spam-routine + 'spam-crm114-unregister-ham-routine + 'spam-crm114-unregister-spam-routine) ;;}}} ;;{{{ scoring and summary formatting @@ -1162,31 +1166,31 @@ backends)." "Return the extra headers spam.el thinks are necessary." (let (list) (when (or spam-use-spamassassin - spam-use-spamassassin-headers - spam-use-regex-headers) + spam-use-spamassassin-headers + spam-use-regex-headers) (push 'X-Spam-Status list)) (when (or spam-use-bogofilter - spam-use-regex-headers) + spam-use-regex-headers) (push 'X-Bogosity list)) (when (or spam-use-crm114 - spam-use-regex-headers) + spam-use-regex-headers) (push 'X-CRM114-Status list)) list)) (defun spam-user-format-function-S (headers) (when headers (format "%3.2f" - (spam-summary-score headers spam-summary-score-preferred-header)))) + (spam-summary-score headers spam-summary-score-preferred-header)))) (defun spam-article-sort-by-spam-status (h1 h2) "Sort articles by score." (let (result) (dolist (header (spam-necessary-extra-headers)) (let ((s1 (spam-summary-score h1 header)) - (s2 (spam-summary-score h2 header))) + (s2 (spam-summary-score h2 header))) (unless (= s1 s2) - (setq result (< s1 s2)) - (return)))) + (setq result (< s1 s2)) + (return)))) result)) (defvar spam-spamassassin-score-regexp @@ -1223,13 +1227,13 @@ With SPECIFIC-HEADER, returns only that header's score. Will not return a nil score." (let (score) (dolist (header - (if specific-header - (list specific-header) - (spam-necessary-extra-headers))) + (if specific-header + (list specific-header) + (spam-necessary-extra-headers))) (setq score - (spam-extra-header-to-number header headers)) + (spam-extra-header-to-number header headers)) (when score - (return))) + (return))) (or score 0))) (defun spam-generic-score (&optional recheck) @@ -1256,15 +1260,15 @@ Will not return a nil score." (let (found) (dolist (backend (spam-backend-list)) (when (and (spam-backend-statistical-p backend) - (or (symbol-value backend) - (memq backend force-symbols))) - (setq found backend))) + (or (symbol-value backend) + (memq backend force-symbols))) + (setq found backend))) found)) (defvar spam-list-of-processors ;; note the nil processors are not defined in gnus.el '((gnus-group-spam-exit-processor-bogofilter spam spam-use-bogofilter) - (gnus-group-spam-exit-processor-bsfilter spam spam-use-bsfilter) + (gnus-group-spam-exit-processor-bsfilter spam spam-use-bsfilter) (gnus-group-spam-exit-processor-blacklist spam spam-use-blacklist) (gnus-group-spam-exit-processor-ifile spam spam-use-ifile) (gnus-group-spam-exit-processor-stat spam spam-use-stat) @@ -1296,38 +1300,38 @@ gnus.el and in spam-list-of-processors. In the case of mover backends, checks the setting of `spam-summary-exit-behavior' in addition to the set values for the group." (if (and (stringp group) - (symbolp backend)) + (symbolp backend)) (let ((old-style (assq backend spam-list-of-processors)) - (parameters (nth 0 (gnus-parameter-spam-process group))) - found) - (if old-style ; old-style processor - (spam-group-processor-p group (nth 2 old-style) (nth 1 old-style)) - ;; now search for the parameter - (dolist (parameter parameters) - (when (and (null found) - (listp parameter) - (eq classification (nth 0 parameter)) - (eq backend (nth 1 parameter))) - (setq found t))) - - ;; now, if the parameter was not found, do the - ;; spam-summary-exit-behavior-logic for mover backends - (unless found - (when (spam-backend-mover-p backend) - (setq - found - (cond - ((eq spam-summary-exit-behavior 'move-all) t) - ((eq spam-summary-exit-behavior 'move-none) nil) - ((eq spam-summary-exit-behavior 'default) - (or (eq classification 'spam) ;move spam out of all groups - ;; move ham out of spam groups - (and (eq classification 'ham) - (spam-group-spam-contents-p group)))) - (t (gnus-error 5 "Unknown spam-summary-exit-behavior: %s" - spam-summary-exit-behavior)))))) - - found)) + (parameters (nth 0 (gnus-parameter-spam-process group))) + found) + (if old-style ; old-style processor + (spam-group-processor-p group (nth 2 old-style) (nth 1 old-style)) + ;; now search for the parameter + (dolist (parameter parameters) + (when (and (null found) + (listp parameter) + (eq classification (nth 0 parameter)) + (eq backend (nth 1 parameter))) + (setq found t))) + + ;; now, if the parameter was not found, do the + ;; spam-summary-exit-behavior-logic for mover backends + (unless found + (when (spam-backend-mover-p backend) + (setq + found + (cond + ((eq spam-summary-exit-behavior 'move-all) t) + ((eq spam-summary-exit-behavior 'move-none) nil) + ((eq spam-summary-exit-behavior 'default) + (or (eq classification 'spam) ;move spam out of all groups + ;; move ham out of spam groups + (and (eq classification 'ham) + (spam-group-spam-contents-p group)))) + (t (gnus-error 5 "Unknown spam-summary-exit-behavior: %s" + spam-summary-exit-behavior)))))) + + found)) nil)) ;;}}} @@ -1339,21 +1343,21 @@ addition to the set values for the group." ;; group parameters (when (spam-group-spam-contents-p gnus-newsgroup-name) (gnus-message 6 "Marking %s articles as spam" - (if spam-mark-only-unseen-as-spam - "unseen" - "unread")) + (if spam-mark-only-unseen-as-spam + "unseen" + "unread")) (let ((articles (if spam-mark-only-unseen-as-spam - gnus-newsgroup-unseen - gnus-newsgroup-unreads))) + gnus-newsgroup-unseen + gnus-newsgroup-unreads))) (if spam-mark-new-messages-in-spam-group-as-spam - (dolist (article articles) - (gnus-summary-mark-article article gnus-spam-mark)) - (gnus-message 9 "Did not mark new messages as spam."))))) + (dolist (article articles) + (gnus-summary-mark-article article gnus-spam-mark)) + (gnus-message 9 "Did not mark new messages as spam."))))) (defun spam-summary-prepare () (setq spam-old-articles - (list (cons 'ham (spam-list-articles gnus-newsgroup-articles 'ham)) - (cons 'spam (spam-list-articles gnus-newsgroup-articles 'spam)))) + (list (cons 'ham (spam-list-articles gnus-newsgroup-articles 'ham)) + (cons 'spam (spam-list-articles gnus-newsgroup-articles 'spam)))) (spam-mark-junk-as-spam-routine)) ;; The spam processors are invoked for any group, spam or ham or neither @@ -1369,46 +1373,46 @@ addition to the set values for the group." ;; we have to iterate over the processors, or else we'll be too slow (dolist (classification (spam-classifications)) (let* ((old-articles (cdr-safe (assq classification spam-old-articles))) - (new-articles (spam-list-articles - gnus-newsgroup-articles - classification)) - (changed-articles (spam-set-difference new-articles old-articles))) - ;; now that we have the changed articles, we go through the processors - (dolist (backend (spam-backend-list)) - (let (unregister-list) - (dolist (article changed-articles) - (let ((id (spam-fetch-field-message-id-fast article))) - (when (spam-log-unregistration-needed-p - id 'process classification backend) - (push article unregister-list)))) - ;; call spam-register-routine with specific articles to unregister, - ;; when there are articles to unregister and the check is enabled - (when (and unregister-list (symbol-value backend)) - (spam-backend-put-article-todo-list backend - classification - unregister-list - t)))))) + (new-articles (spam-list-articles + gnus-newsgroup-articles + classification)) + (changed-articles (spam-set-difference new-articles old-articles))) + ;; now that we have the changed articles, we go through the processors + (dolist (backend (spam-backend-list)) + (let (unregister-list) + (dolist (article changed-articles) + (let ((id (spam-fetch-field-message-id-fast article))) + (when (spam-log-unregistration-needed-p + id 'process classification backend) + (push article unregister-list)))) + ;; call spam-register-routine with specific articles to unregister, + ;; when there are articles to unregister and the check is enabled + (when (and unregister-list (symbol-value backend)) + (spam-backend-put-article-todo-list backend + classification + unregister-list + t)))))) ;; do the non-moving backends first, then the moving ones (dolist (backend-type '(non-mover mover)) (dolist (classification (spam-classifications)) - (dolist (backend (spam-backend-list backend-type)) - (when (spam-group-processor-p - gnus-newsgroup-name - backend - classification) - (spam-backend-put-article-todo-list backend - classification - (spam-list-articles - gnus-newsgroup-articles - classification)))))) + (dolist (backend (spam-backend-list backend-type)) + (when (spam-group-processor-p + gnus-newsgroup-name + backend + classification) + (spam-backend-put-article-todo-list backend + classification + (spam-list-articles + gnus-newsgroup-articles + classification)))))) (spam-resolve-registrations-routine) ; do the registrations now ;; we mark all the leftover spam articles as expired at the end (dolist (article (spam-list-articles - gnus-newsgroup-articles - 'spam)) + gnus-newsgroup-articles + 'spam)) (gnus-summary-mark-article article gnus-expirable-mark))) (setq spam-old-articles nil)) @@ -1429,67 +1433,94 @@ addition to the set values for the group." (gnus-summary-kill-process-mark) (let ((backend-supports-deletions - (gnus-check-backend-function - 'request-move-article gnus-newsgroup-name)) - (respool-method (gnus-find-method-for-group gnus-newsgroup-name)) - article mark deletep respool) + (gnus-check-backend-function + 'request-move-article gnus-newsgroup-name)) + (respool-method (gnus-find-method-for-group gnus-newsgroup-name)) + article mark deletep respool valid-move-destinations) (when (member 'respool groups) - (setq respool t) ; boolean for later + (setq respool t) ; boolean for later (setq groups '("fake"))) ; when respooling, groups are dynamic so fake it + ;; exclude invalid move destinations + (dolist (group groups) + (unless + (or + (and + (eq classification 'spam) + (spam-group-spam-contents-p gnus-newsgroup-name) + (spam-group-spam-contents-p group) + (gnus-message + 3 + "Sorry, can't move spam from spam group %s to spam group %s" + gnus-newsgroup-name + group)) + (and + (eq classification 'ham) + (spam-group-ham-contents-p gnus-newsgroup-name) + (spam-group-ham-contents-p group) + (gnus-message + 3 + "Sorry, can't move ham from ham group %s to ham group %s" + gnus-newsgroup-name + group))) + (push group valid-move-destinations))) + + (setq groups (nreverse valid-move-destinations)) + ;; now do the actual move (dolist (group groups) + (when (and articles (stringp group)) - ;; first, mark the article with the process mark and, if needed, - ;; the unread or expired mark (for ham and spam respectively) + ;; first, mark the article with the process mark and, if needed, + ;; the unread or expired mark (for ham and spam respectively) + (dolist (article articles) + (when (and (eq classification 'ham) + spam-mark-ham-unread-before-move-from-spam-group) + (gnus-message 9 "Marking ham article %d unread before move" + article) + (gnus-summary-mark-article article gnus-unread-mark)) + (when (and (eq classification 'spam) + (not copy)) + (gnus-message 9 "Marking spam article %d expirable before move" + article) + (gnus-summary-mark-article article gnus-expirable-mark)) + (gnus-summary-set-process-mark article) + + (if respool ; respooling is with a "fake" group + (let ((spam-split-disabled + (or spam-split-disabled + (and (eq classification 'ham) + spam-disable-spam-split-during-ham-respool)))) + (gnus-message 9 "Respooling article %d with method %s" + article respool-method) + (gnus-summary-respool-article nil respool-method)) + ;; else, we are not respooling + (if (or (not backend-supports-deletions) + (> (length groups) 1)) + (progn ; if copying, copy and set deletep + (gnus-message 9 "Copying article %d to group %s" + article group) + (gnus-summary-copy-article nil group) + (setq deletep t)) + (gnus-message 9 "Moving article %d to group %s" + article group) + (gnus-summary-move-article nil group)))))) ; else move articles + + ;; now delete the articles, unless a) copy is t, and there was a copy done + ;; b) a move was done to a single group + ;; c) backend-supports-deletions is nil + (unless copy + (when (and deletep backend-supports-deletions) (dolist (article articles) - (when (and (eq classification 'ham) - spam-mark-ham-unread-before-move-from-spam-group) - (gnus-message 9 "Marking ham article %d unread before move" - article) - (gnus-summary-mark-article article gnus-unread-mark)) - (when (and (eq classification 'spam) - (not copy)) - (gnus-message 9 "Marking spam article %d expirable before move" - article) - (gnus-summary-mark-article article gnus-expirable-mark)) (gnus-summary-set-process-mark article) - - (if respool ; respooling is with a "fake" group - (let ((spam-split-disabled - (or spam-split-disabled - (and (eq classification 'ham) - spam-disable-spam-split-during-ham-respool)))) - (gnus-message 9 "Respooling article %d with method %s" - article respool-method) - (gnus-summary-respool-article nil respool-method)) - (if (or (not backend-supports-deletions) ; else, we are not respooling - (> (length groups) 1)) - (progn ; if copying, copy and set deletep - (gnus-message 9 "Copying article %d to group %s" - article group) - (gnus-summary-copy-article nil group) - (setq deletep t)) - (gnus-message 9 "Moving article %d to group %s" - article group) - (gnus-summary-move-article nil group))))) ; else move articles - - ;; now delete the articles, unless a) copy is t, and there was a copy done - ;; b) a move was done to a single group - ;; c) backend-supports-deletions is nil - (unless copy - (when (and deletep backend-supports-deletions) - (dolist (article articles) - (gnus-summary-set-process-mark article) - (gnus-message 9 "Deleting article %d" article)) - (when articles - (let ((gnus-novice-user nil)) ; don't ask me if I'm sure - (gnus-summary-delete-article nil))))) - - (gnus-summary-yank-process-mark) - (length articles)))) + (gnus-message 9 "Deleting article %d" article)) + (when articles + (let ((gnus-novice-user nil)) ; don't ask me if I'm sure + (gnus-summary-delete-article nil))))) + (gnus-summary-yank-process-mark) + (length articles))) (defun spam-copy-spam-routine (articles) (spam-copy-or-move-routine @@ -1537,44 +1568,44 @@ addition to the set values for the group." ;; (nnml-possibly-change-directory ;; (gnus-group-real-name gnus-newsgroup-name)) ;; (setq article-filename (expand-file-name -;; (int-to-string article) nnml-current-directory))) +;; (int-to-string article) nnml-current-directory))) ;; (if (file-exists-p article-filename) -;; article-filename +;; article-filename ;; nil))) (defun spam-fetch-field-fast (article field &optional prepared-data-header) - "Fetch a FIELD for ARTICLE quickly, using the internal gnus-data-list function. + "Fetch a FIELD for ARTICLE with the internal `gnus-data-list' function. When PREPARED-DATA-HEADER is given, don't look in the Gnus data. When FIELD is 'number, ARTICLE can be any number (since we want to find it out)." (when (numberp article) (let* ((data-header (or prepared-data-header - (spam-fetch-article-header article)))) + (spam-fetch-article-header article)))) (if (arrayp data-header) - (cond - ((equal field 'number) - (mail-header-number data-header)) - ((equal field 'from) - (mail-header-from data-header)) - ((equal field 'message-id) - (mail-header-message-id data-header)) - ((equal field 'subject) - (mail-header-subject data-header)) - ((equal field 'references) - (mail-header-references data-header)) - ((equal field 'date) - (mail-header-date data-header)) - ((equal field 'xref) - (mail-header-xref data-header)) - ((equal field 'extra) - (mail-header-extra data-header)) - (t - (gnus-error - 5 - "spam-fetch-field-fast: unknown field %s requested" - field) - nil)) - (gnus-message 6 "Article %d has a nil data header" article))))) + (cond + ((equal field 'number) + (mail-header-number data-header)) + ((equal field 'from) + (mail-header-from data-header)) + ((equal field 'message-id) + (mail-header-message-id data-header)) + ((equal field 'subject) + (mail-header-subject data-header)) + ((equal field 'references) + (mail-header-references data-header)) + ((equal field 'date) + (mail-header-date data-header)) + ((equal field 'xref) + (mail-header-xref data-header)) + ((equal field 'extra) + (mail-header-extra data-header)) + (t + (gnus-error + 5 + "spam-fetch-field-fast: unknown field %s requested" + field) + nil)) + (gnus-message 6 "Article %d has a nil data header" article))))) (defun spam-fetch-field-from-fast (article &optional prepared-data-header) (spam-fetch-field-fast article 'from prepared-data-header)) @@ -1588,19 +1619,19 @@ to find it out)." (defun spam-generate-fake-headers (article) (let ((dh (spam-fetch-article-header article))) (if dh - (concat - (format - ;; 80-character limit makes for strange constructs - (concat "From: %s\nSubject: %s\nMessage-ID: %s\n" - "Date: %s\nReferences: %s\nXref: %s\n") - (spam-fetch-field-fast article 'from dh) - (spam-fetch-field-fast article 'subject dh) - (spam-fetch-field-fast article 'message-id dh) - (spam-fetch-field-fast article 'date dh) - (spam-fetch-field-fast article 'references dh) - (spam-fetch-field-fast article 'xref dh)) - (when (spam-fetch-field-fast article 'extra dh) - (format "%s\n" (spam-fetch-field-fast article 'extra dh)))) + (concat + (format + ;; 80-character limit makes for strange constructs + (concat "From: %s\nSubject: %s\nMessage-ID: %s\n" + "Date: %s\nReferences: %s\nXref: %s\n") + (spam-fetch-field-fast article 'from dh) + (spam-fetch-field-fast article 'subject dh) + (spam-fetch-field-fast article 'message-id dh) + (spam-fetch-field-fast article 'date dh) + (spam-fetch-field-fast article 'references dh) + (spam-fetch-field-fast article 'xref dh)) + (when (spam-fetch-field-fast article 'extra dh) + (format "%s\n" (spam-fetch-field-fast article 'extra dh)))) (gnus-message 5 "spam-generate-fake-headers: article %d didn't have a valid header" @@ -1627,122 +1658,122 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." (unless spam-split-disabled (let ((spam-split-group-choice spam-split-group)) (dolist (check specific-checks) - (when (stringp check) - (setq spam-split-group-choice check) - (setq specific-checks (delq check specific-checks)))) + (when (stringp check) + (setq spam-split-group-choice check) + (setq specific-checks (delq check specific-checks)))) (let ((spam-split-group spam-split-group-choice) - (widening-needed-check (spam-widening-needed-p specific-checks))) - (save-excursion - (save-restriction - (when widening-needed-check - (widen) - (gnus-message 8 "spam-split: widening the buffer (%s requires it)" - widening-needed-check)) - (let ((backends (spam-backend-list)) - decision) - (while (and backends (not decision)) - (let* ((backend (pop backends)) - (check-function (spam-backend-check backend)) - (spam-split-group (if spam-split-symbolic-return - 'spam - spam-split-group))) - (when (or - ;; either, given specific checks, this is one of them - (memq backend specific-checks) - ;; or, given no specific checks, spam-use-CHECK is set - (and (null specific-checks) (symbol-value backend))) - (gnus-message 6 "spam-split: calling the %s function" - check-function) - (setq decision (funcall check-function)) - ;; if we got a decision at all, save the current check - (when decision - (setq spam-split-last-successful-check backend)) - - (when (eq decision 'spam) - (unless spam-split-symbolic-return - (gnus-error - 5 - (format "spam-split got %s but %s is nil" - decision - spam-split-symbolic-return))))))) - (if (eq decision t) - (if spam-split-symbolic-return-positive 'ham nil) - decision)))))))) + (widening-needed-check (spam-widening-needed-p specific-checks))) + (save-excursion + (save-restriction + (when widening-needed-check + (widen) + (gnus-message 8 "spam-split: widening the buffer (%s requires it)" + widening-needed-check)) + (let ((backends (spam-backend-list)) + decision) + (while (and backends (not decision)) + (let* ((backend (pop backends)) + (check-function (spam-backend-check backend)) + (spam-split-group (if spam-split-symbolic-return + 'spam + spam-split-group))) + (when (or + ;; either, given specific checks, this is one of them + (memq backend specific-checks) + ;; or, given no specific checks, spam-use-CHECK is set + (and (null specific-checks) (symbol-value backend))) + (gnus-message 6 "spam-split: calling the %s function" + check-function) + (setq decision (funcall check-function)) + ;; if we got a decision at all, save the current check + (when decision + (setq spam-split-last-successful-check backend)) + + (when (eq decision 'spam) + (unless spam-split-symbolic-return + (gnus-error + 5 + (format "spam-split got %s but %s is nil" + decision + spam-split-symbolic-return))))))) + (if (eq decision t) + (if spam-split-symbolic-return-positive 'ham nil) + decision)))))))) (defun spam-find-spam () "Detect spam in the current newsgroup using `spam-split'." (interactive) (let* ((group gnus-newsgroup-name) - (autodetect (gnus-parameter-spam-autodetect group)) - (methods (gnus-parameter-spam-autodetect-methods group)) - (first-method (nth 0 methods)) - (articles (if spam-autodetect-recheck-messages - gnus-newsgroup-articles - gnus-newsgroup-unseen)) - article-cannot-be-faked) + (autodetect (gnus-parameter-spam-autodetect group)) + (methods (gnus-parameter-spam-autodetect-methods group)) + (first-method (nth 0 methods)) + (articles (if spam-autodetect-recheck-messages + gnus-newsgroup-articles + gnus-newsgroup-unseen)) + article-cannot-be-faked) (dolist (backend methods) (when (spam-backend-statistical-p backend) - (setq article-cannot-be-faked t) - (return))) + (setq article-cannot-be-faked t) + (return))) (when (memq 'default methods) (setq article-cannot-be-faked t)) (when (and autodetect - (not (equal first-method 'none))) + (not (equal first-method 'none))) (mapcar (lambda (article) - (let ((id (spam-fetch-field-message-id-fast article)) - (subject (spam-fetch-field-subject-fast article)) - (sender (spam-fetch-field-from-fast article)) - registry-lookup) - - (unless id - (gnus-message 6 "Article %d has no message ID!" article)) - - (when (and id spam-log-to-registry) - (setq registry-lookup (spam-log-registration-type id 'incoming)) - (when registry-lookup - (gnus-message - 9 - "spam-find-spam: message %s was already registered incoming" - id))) - - (let* ((spam-split-symbolic-return t) - (spam-split-symbolic-return-positive t) - (fake-headers (spam-generate-fake-headers article)) - (split-return - (or registry-lookup - (with-temp-buffer - (if article-cannot-be-faked - (gnus-request-article-this-buffer - article - group) - ;; else, we fake the article - (when fake-headers (insert fake-headers))) - (if (or (null first-method) - (equal first-method 'default)) - (spam-split) - (apply 'spam-split methods)))))) - (if (equal split-return 'spam) - (gnus-summary-mark-article article gnus-spam-mark)) - - (when (and id split-return spam-log-to-registry) - (when (zerop (gnus-registry-group-count id)) - (gnus-registry-add-group - id group subject sender)) - - (unless registry-lookup - (spam-log-processing-to-registry - id - 'incoming - split-return - spam-split-last-successful-check - group)))))) + (let ((id (spam-fetch-field-message-id-fast article)) + (subject (spam-fetch-field-subject-fast article)) + (sender (spam-fetch-field-from-fast article)) + registry-lookup) + + (unless id + (gnus-message 6 "Article %d has no message ID!" article)) + + (when (and id spam-log-to-registry) + (setq registry-lookup (spam-log-registration-type id 'incoming)) + (when registry-lookup + (gnus-message + 9 + "spam-find-spam: message %s was already registered incoming" + id))) + + (let* ((spam-split-symbolic-return t) + (spam-split-symbolic-return-positive t) + (fake-headers (spam-generate-fake-headers article)) + (split-return + (or registry-lookup + (with-temp-buffer + (if article-cannot-be-faked + (gnus-request-article-this-buffer + article + group) + ;; else, we fake the article + (when fake-headers (insert fake-headers))) + (if (or (null first-method) + (equal first-method 'default)) + (spam-split) + (apply 'spam-split methods)))))) + (if (equal split-return 'spam) + (gnus-summary-mark-article article gnus-spam-mark)) + + (when (and id split-return spam-log-to-registry) + (when (zerop (gnus-registry-group-count id)) + (gnus-registry-add-group + id group subject sender)) + + (unless registry-lookup + (spam-log-processing-to-registry + id + 'incoming + split-return + spam-split-last-successful-check + group)))))) articles)))) ;;}}} @@ -1754,104 +1785,104 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." (dolist (backend-type '(non-mover mover)) (dolist (classification (spam-classifications)) (dolist (backend (spam-backend-list backend-type)) - (let ((rlist (spam-backend-get-article-todo-list - backend classification)) - (ulist (spam-backend-get-article-todo-list - backend classification t)) - (delcount 0)) - - ;; clear the old lists right away - (spam-backend-put-article-todo-list backend - classification - nil - nil) - (spam-backend-put-article-todo-list backend - classification - nil - t) - - ;; eliminate duplicates - (dolist (article (copy-sequence ulist)) - (when (memq article rlist) - (incf delcount) - (setq rlist (delq article rlist)) - (setq ulist (delq article ulist)))) - - (unless (zerop delcount) - (gnus-message - 9 - "%d messages were saved the trouble of unregistering and then registering" - delcount)) - - ;; unregister articles - (unless (zerop (length ulist)) - (let ((num (spam-unregister-routine classification backend ulist))) - (when (> num 0) - (gnus-message - 6 - "%d %s messages were unregistered by backend %s." - num - classification - backend)))) - - ;; register articles - (unless (zerop (length rlist)) - (let ((num (spam-register-routine classification backend rlist))) - (when (> num 0) - (gnus-message - 6 - "%d %s messages were registered by backend %s." - num - classification - backend))))))))) + (let ((rlist (spam-backend-get-article-todo-list + backend classification)) + (ulist (spam-backend-get-article-todo-list + backend classification t)) + (delcount 0)) + + ;; clear the old lists right away + (spam-backend-put-article-todo-list backend + classification + nil + nil) + (spam-backend-put-article-todo-list backend + classification + nil + t) + + ;; eliminate duplicates + (dolist (article (copy-sequence ulist)) + (when (memq article rlist) + (incf delcount) + (setq rlist (delq article rlist)) + (setq ulist (delq article ulist)))) + + (unless (zerop delcount) + (gnus-message + 9 + "%d messages did not have to unregister and then register" + delcount)) + + ;; unregister articles + (unless (zerop (length ulist)) + (let ((num (spam-unregister-routine classification backend ulist))) + (when (> num 0) + (gnus-message + 6 + "%d %s messages were unregistered by backend %s." + num + classification + backend)))) + + ;; register articles + (unless (zerop (length rlist)) + (let ((num (spam-register-routine classification backend rlist))) + (when (> num 0) + (gnus-message + 6 + "%d %s messages were registered by backend %s." + num + classification + backend))))))))) (defun spam-unregister-routine (classification - backend - specific-articles) + backend + specific-articles) (spam-register-routine classification backend specific-articles t)) (defun spam-register-routine (classification - backend - specific-articles - &optional unregister) + backend + specific-articles + &optional unregister) (when (and (spam-classification-valid-p classification) - (spam-backend-valid-p backend)) + (spam-backend-valid-p backend)) (let* ((register-function - (spam-backend-function backend classification 'registration)) - (unregister-function - (spam-backend-function backend classification 'unregistration)) - (run-function (if unregister - unregister-function - register-function)) - (log-function (if unregister - 'spam-log-undo-registration - 'spam-log-processing-to-registry)) - article articles) + (spam-backend-function backend classification 'registration)) + (unregister-function + (spam-backend-function backend classification 'unregistration)) + (run-function (if unregister + unregister-function + register-function)) + (log-function (if unregister + 'spam-log-undo-registration + 'spam-log-processing-to-registry)) + article articles) (when run-function - ;; make list of articles, using specific-articles if given - (setq articles (or specific-articles - (spam-list-articles - gnus-newsgroup-articles - classification))) - ;; process them + ;; make list of articles, using specific-articles if given + (setq articles (or specific-articles + (spam-list-articles + gnus-newsgroup-articles + classification))) + ;; process them (when (> (length articles) 0) - (gnus-message 5 "%s %d %s articles as %s using backend %s" - (if unregister "Unregistering" "Registering") - (length articles) - (if specific-articles "specific" "") - classification - backend) - (funcall run-function articles) - ;; now log all the registrations (or undo them, depending on - ;; unregister) - (dolist (article articles) - (funcall log-function - (spam-fetch-field-message-id-fast article) - 'process - classification - backend - gnus-newsgroup-name)))) + (gnus-message 5 "%s %d %s articles as %s using backend %s" + (if unregister "Unregistering" "Registering") + (length articles) + (if specific-articles "specific" "") + classification + backend) + (funcall run-function articles) + ;; now log all the registrations (or undo them, depending on + ;; unregister) + (dolist (article articles) + (funcall log-function + (spam-fetch-field-message-id-fast article) + 'process + classification + backend + gnus-newsgroup-name)))) ;; return the number of articles processed (length articles)))) @@ -1859,50 +1890,51 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." (defun spam-log-processing-to-registry (id type classification backend group) (when spam-log-to-registry (if (and (stringp id) - (stringp group) - (spam-process-type-valid-p type) - (spam-classification-valid-p classification) - (spam-backend-valid-p backend)) - (let ((cell-list (cdr-safe (gnus-registry-fetch-extra id type))) - (cell (list classification backend group))) - (push cell cell-list) - (gnus-registry-store-extra-entry - id - type - cell-list)) + (stringp group) + (spam-process-type-valid-p type) + (spam-classification-valid-p classification) + (spam-backend-valid-p backend)) + (let ((cell-list (cdr-safe (gnus-registry-fetch-extra id type))) + (cell (list classification backend group))) + (push cell cell-list) + (gnus-registry-store-extra-entry + id + type + cell-list)) (gnus-error 7 - (format "%s call with bad ID, type, classification, spam-backend, or group" - "spam-log-processing-to-registry"))))) + (format + "%s call with bad ID, type, classification, spam-backend, or group" + "spam-log-processing-to-registry"))))) ;;; check if a ham- or spam-processor registration has been done (defun spam-log-registered-p (id type) (when spam-log-to-registry (if (and (stringp id) - (spam-process-type-valid-p type)) - (cdr-safe (gnus-registry-fetch-extra id type)) + (spam-process-type-valid-p type)) + (cdr-safe (gnus-registry-fetch-extra id type)) (progn - (gnus-error - 7 - (format "%s called with bad ID, type, classification, or spam-backend" - "spam-log-registered-p")) - nil)))) + (gnus-error + 7 + (format "%s called with bad ID, type, classification, or spam-backend" + "spam-log-registered-p")) + nil)))) ;;; check what a ham- or spam-processor registration says ;;; returns nil if conflicting registrations are found (defun spam-log-registration-type (id type) (let ((count 0) - decision) + decision) (dolist (reg (spam-log-registered-p id type)) (let ((classification (nth 0 reg))) - (when (spam-classification-valid-p classification) - (when (and decision - (not (eq classification decision))) - (setq count (+ 1 count))) - (setq decision classification)))) + (when (spam-classification-valid-p classification) + (when (and decision + (not (eq classification decision))) + (setq count (+ 1 count))) + (setq decision classification)))) (if (< 0 count) - nil + nil decision))) @@ -1910,47 +1942,49 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." (defun spam-log-unregistration-needed-p (id type classification backend) (when spam-log-to-registry (if (and (stringp id) - (spam-process-type-valid-p type) - (spam-classification-valid-p classification) - (spam-backend-valid-p backend)) - (let ((cell-list (cdr-safe (gnus-registry-fetch-extra id type))) - found) - (dolist (cell cell-list) - (unless found - (when (and (eq classification (nth 0 cell)) - (eq backend (nth 1 cell))) - (setq found t)))) - found) + (spam-process-type-valid-p type) + (spam-classification-valid-p classification) + (spam-backend-valid-p backend)) + (let ((cell-list (cdr-safe (gnus-registry-fetch-extra id type))) + found) + (dolist (cell cell-list) + (unless found + (when (and (eq classification (nth 0 cell)) + (eq backend (nth 1 cell))) + (setq found t)))) + found) (progn - (gnus-error - 7 - (format "%s called with bad ID, type, classification, or spam-backend" - "spam-log-unregistration-needed-p")) - nil)))) + (gnus-error + 7 + (format "%s called with bad ID, type, classification, or spam-backend" + "spam-log-unregistration-needed-p")) + nil)))) ;;; undo a ham- or spam-processor registration (the group is not used) -(defun spam-log-undo-registration (id type classification backend &optional group) +(defun spam-log-undo-registration (id type classification backend + &optional group) (when (and spam-log-to-registry - (spam-log-unregistration-needed-p id type classification backend)) + (spam-log-unregistration-needed-p id type classification backend)) (if (and (stringp id) - (spam-process-type-valid-p type) - (spam-classification-valid-p classification) - (spam-backend-valid-p backend)) - (let ((cell-list (cdr-safe (gnus-registry-fetch-extra id type))) - new-cell-list found) - (dolist (cell cell-list) - (unless (and (eq classification (nth 0 cell)) - (eq backend (nth 1 cell))) - (push cell new-cell-list))) - (gnus-registry-store-extra-entry - id - type - new-cell-list)) + (spam-process-type-valid-p type) + (spam-classification-valid-p classification) + (spam-backend-valid-p backend)) + (let ((cell-list (cdr-safe (gnus-registry-fetch-extra id type))) + new-cell-list found) + (dolist (cell cell-list) + (unless (and (eq classification (nth 0 cell)) + (eq backend (nth 1 cell))) + (push cell new-cell-list))) + (gnus-registry-store-extra-entry + id + type + new-cell-list)) (progn - (gnus-error 7 (format "%s call with bad ID, type, spam-backend, or group" - "spam-log-undo-registration")) - nil)))) + (gnus-error 7 (format + "%s call with bad ID, type, spam-backend, or group" + "spam-log-undo-registration")) + nil)))) ;;}}} @@ -1959,12 +1993,12 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." ;;{{{ Gmane xrefs (defun spam-check-gmane-xref () (let ((header (or - (message-fetch-field "Xref") - (message-fetch-field "Newsgroups")))) - (when header ; return nil when no header + (message-fetch-field "Xref") + (message-fetch-field "Newsgroups")))) + (when header ; return nil when no header (when (string-match spam-gmane-xref-spam-group - header) - spam-split-group)))) + header) + spam-split-group)))) ;;}}} @@ -1972,7 +2006,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." (defun spam-check-regex-body () (let ((spam-regex-headers-ham spam-regex-body-ham) - (spam-regex-headers-spam spam-regex-body-spam)) + (spam-regex-headers-spam spam-regex-body-spam)) (spam-check-regex-headers t))) ;;}}} @@ -1981,20 +2015,20 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." (defun spam-check-regex-headers (&optional body) (let ((type (if body "body" "header")) - ret found) + ret found) (dolist (h-regex spam-regex-headers-ham) (unless found - (goto-char (point-min)) - (when (re-search-forward h-regex nil t) - (message "Ham regex %s search positive." type) - (setq found t)))) + (goto-char (point-min)) + (when (re-search-forward h-regex nil t) + (message "Ham regex %s search positive." type) + (setq found t)))) (dolist (s-regex spam-regex-headers-spam) (unless found - (goto-char (point-min)) - (when (re-search-forward s-regex nil t) - (message "Spam regex %s search positive." type) - (setq found t) - (setq ret spam-split-group)))) + (goto-char (point-min)) + (when (re-search-forward s-regex nil t) + (message "Spam regex %s search positive." type) + (setq found t) + (setq ret spam-split-group)))) ret)) ;;}}} @@ -2004,44 +2038,44 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." (defun spam-reverse-ip-string (ip) (when (stringp ip) (mapconcat 'identity - (nreverse (split-string ip "\\.")) - "."))) + (nreverse (split-string ip "\\.")) + "."))) (defun spam-check-blackholes () "Check the Received headers for blackholed relays." (let ((headers (message-fetch-field "received")) - ips matches) + ips matches) (when headers (with-temp-buffer - (insert headers) - (goto-char (point-min)) - (gnus-message 6 "Checking headers for relay addresses") - (while (re-search-forward - "\\([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+\\)" nil t) - (gnus-message 9 "Blackhole search found host IP %s." (match-string 1)) - (push (spam-reverse-ip-string (match-string 1)) - ips))) + (insert headers) + (goto-char (point-min)) + (gnus-message 6 "Checking headers for relay addresses") + (while (re-search-forward + "\\([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+\\)" nil t) + (gnus-message 9 "Blackhole search found host IP %s." (match-string 1)) + (push (spam-reverse-ip-string (match-string 1)) + ips))) (dolist (server spam-blackhole-servers) - (dolist (ip ips) - (unless (and spam-blackhole-good-server-regex - ;; match the good-server-regex against the reversed (again) IP string - (string-match - spam-blackhole-good-server-regex - (spam-reverse-ip-string ip))) - (unless matches - (let ((query-string (concat ip "." server))) - (if spam-use-dig - (let ((query-result (query-dig query-string))) - (when query-result - (gnus-message 6 "(DIG): positive blackhole check '%s'" - query-result) - (push (list ip server query-result) - matches))) - ;; else, if not using dig.el - (when (dns-query query-string) - (gnus-message 6 "positive blackhole check") - (push (list ip server (dns-query query-string 'TXT)) - matches))))))))) + (dolist (ip ips) + (unless (and spam-blackhole-good-server-regex + ;; match against the reversed (again) IP string + (string-match + spam-blackhole-good-server-regex + (spam-reverse-ip-string ip))) + (unless matches + (let ((query-string (concat ip "." server))) + (if spam-use-dig + (let ((query-result (query-dig query-string))) + (when query-result + (gnus-message 6 "(DIG): positive blackhole check '%s'" + query-result) + (push (list ip server query-result) + matches))) + ;; else, if not using dig.el + (when (dns-query query-string) + (gnus-message 6 "positive blackhole check") + (push (list ip server (dns-query query-string 'TXT)) + matches))))))))) (when matches spam-split-group))) ;;}}} @@ -2050,7 +2084,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." (defun spam-check-hashcash () "Check the headers for hashcash payments." - (ignore-errors (mail-check-payment))) ;mail-check-payment returns a boolean + (ignore-errors (mail-check-payment))) ;mail-check-payment returns a boolean ;;}}} @@ -2071,16 +2105,16 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." (eval-and-compile (when (condition-case nil - (progn - (require 'bbdb) - (require 'bbdb-com)) - (file-error - ;; `bbdb-records' should not be bound as an autoload function - ;; before loading bbdb because of `bbdb-hashtable-size'. - (defalias 'bbdb-records 'ignore) - (defalias 'spam-BBDB-register-routine 'ignore) - (defalias 'spam-enter-ham-BBDB 'ignore) - nil)) + (progn + (require 'bbdb) + (require 'bbdb-com)) + (file-error + ;; `bbdb-records' should not be bound as an autoload function + ;; before loading bbdb because of `bbdb-hashtable-size'. + (defalias 'bbdb-records 'ignore) + (defalias 'spam-BBDB-register-routine 'ignore) + (defalias 'spam-enter-ham-BBDB 'ignore) + nil)) ;; when the BBDB changes, we want to clear out our cache (defun spam-clear-cache-BBDB (&rest immaterial) @@ -2091,32 +2125,32 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." (defun spam-enter-ham-BBDB (addresses &optional remove) "Enter an address into the BBDB; implies ham (non-spam) sender" (dolist (from addresses) - (when (stringp from) - (let* ((parsed-address (gnus-extract-address-components from)) - (name (or (nth 0 parsed-address) "Ham Sender")) - (remove-function (if remove - 'bbdb-delete-record-internal - 'ignore)) - (net-address (nth 1 parsed-address)) - (record (and net-address - (bbdb-search-simple nil net-address)))) - (when net-address - (gnus-message 6 "%s address %s %s BBDB" - (if remove "Deleting" "Adding") - from - (if remove "from" "to")) - (if record - (funcall remove-function record) - (bbdb-create-internal name nil net-address nil nil - "ham sender added by spam.el"))))))) + (when (stringp from) + (let* ((parsed-address (gnus-extract-address-components from)) + (name (or (nth 0 parsed-address) "Ham Sender")) + (remove-function (if remove + 'bbdb-delete-record-internal + 'ignore)) + (net-address (nth 1 parsed-address)) + (record (and net-address + (bbdb-search-simple nil net-address)))) + (when net-address + (gnus-message 6 "%s address %s %s BBDB" + (if remove "Deleting" "Adding") + from + (if remove "from" "to")) + (if record + (funcall remove-function record) + (bbdb-create-internal name nil net-address nil nil + "ham sender added by spam.el"))))))) (defun spam-BBDB-register-routine (articles &optional unregister) (let (addresses) - (dolist (article articles) - (when (stringp (spam-fetch-field-from-fast article)) - (push (spam-fetch-field-from-fast article) addresses))) - ;; now do the register/unregister action - (spam-enter-ham-BBDB addresses unregister))) + (dolist (article articles) + (when (stringp (spam-fetch-field-from-fast article)) + (push (spam-fetch-field-from-fast article) addresses))) + ;; now do the register/unregister action + (spam-enter-ham-BBDB addresses unregister))) (defun spam-BBDB-unregister-routine (articles) (spam-BBDB-register-routine articles t)) @@ -2124,32 +2158,32 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." (defun spam-check-BBDB () "Mail from people in the BBDB is classified as ham or non-spam" (let ((who (message-fetch-field "from")) - bbdb-cache bbdb-hashtable) - (when spam-cache-lookups - (setq bbdb-cache (gethash 'spam-use-BBDB spam-caches)) - (unless bbdb-cache - (setq bbdb-cache (make-vector 17 0)) ; a good starting hash value - ;; this is based on the expanded (bbdb-hashtable) macro - ;; without the debugging support - (with-current-buffer (bbdb-buffer) - (save-excursion - (save-window-excursion - (bbdb-records nil t) - (mapatoms - (lambda (symbol) - (intern (downcase (symbol-name symbol)) bbdb-cache)) - bbdb-hashtable)))) - (puthash 'spam-use-BBDB bbdb-cache spam-caches))) - (when who - (setq who (nth 1 (gnus-extract-address-components who))) - (if - (if spam-cache-lookups - (intern-soft (downcase who) bbdb-cache) - (bbdb-search-simple nil who)) - t - (if spam-use-BBDB-exclusive - spam-split-group - nil))))))) + bbdb-cache bbdb-hashtable) + (when spam-cache-lookups + (setq bbdb-cache (gethash 'spam-use-BBDB spam-caches)) + (unless bbdb-cache + (setq bbdb-cache (make-vector 17 0)) ; a good starting hash value + ;; this is based on the expanded (bbdb-hashtable) macro + ;; without the debugging support + (with-current-buffer (bbdb-buffer) + (save-excursion + (save-window-excursion + (bbdb-records nil t) + (mapatoms + (lambda (symbol) + (intern (downcase (symbol-name symbol)) bbdb-cache)) + bbdb-hashtable)))) + (puthash 'spam-use-BBDB bbdb-cache spam-caches))) + (when who + (setq who (nth 1 (gnus-extract-address-components who))) + (if + (if spam-cache-lookups + (intern-soft (downcase who) bbdb-cache) + (bbdb-search-simple nil who)) + t + (if spam-use-BBDB-exclusive + spam-split-group + nil))))))) ;;}}} @@ -2169,44 +2203,44 @@ See `spam-ifile-database'." (defun spam-check-ifile () "Check the ifile backend for the classification of this message." (let ((article-buffer-name (buffer-name)) - category return) + category return) (with-temp-buffer (let ((temp-buffer-name (buffer-name)) - (db-param (spam-get-ifile-database-parameter))) - (with-current-buffer article-buffer-name - (apply 'call-process-region - (point-min) (point-max) spam-ifile-program - nil temp-buffer-name nil "-c" - (if db-param `(,db-param "-q") `("-q")))) - ;; check the return now (we're back in the temp buffer) - (goto-char (point-min)) - (if (not (eobp)) - (setq category (buffer-substring (point) (point-at-eol)))) - (when (not (zerop (length category))) ; we need a category here - (if spam-ifile-all-categories - (setq return category) - ;; else, if spam-ifile-all-categories is not set... - (when (string-equal spam-ifile-spam-category category) - (setq return spam-split-group)))))) ; note return is nil otherwise + (db-param (spam-get-ifile-database-parameter))) + (with-current-buffer article-buffer-name + (apply 'call-process-region + (point-min) (point-max) spam-ifile-program + nil temp-buffer-name nil "-c" + (if db-param `(,db-param "-q") `("-q")))) + ;; check the return now (we're back in the temp buffer) + (goto-char (point-min)) + (if (not (eobp)) + (setq category (buffer-substring (point) (point-at-eol)))) + (when (not (zerop (length category))) ; we need a category here + (if spam-ifile-all-categories + (setq return category) + ;; else, if spam-ifile-all-categories is not set... + (when (string-equal spam-ifile-spam-category category) + (setq return spam-split-group)))))) ; note return is nil otherwise return)) (defun spam-ifile-register-with-ifile (articles category &optional unregister) "Register an article, given as a string, with a category. Uses `gnus-newsgroup-name' if category is nil (for ham registration)." (let ((category (or category gnus-newsgroup-name)) - (add-or-delete-option (if unregister "-d" "-i")) - (db (spam-get-ifile-database-parameter)) - parameters) + (add-or-delete-option (if unregister "-d" "-i")) + (db (spam-get-ifile-database-parameter)) + parameters) (with-temp-buffer (dolist (article articles) - (let ((article-string (spam-get-article-as-string article))) - (when (stringp article-string) - (insert article-string)))) + (let ((article-string (spam-get-article-as-string article))) + (when (stringp article-string) + (insert article-string)))) (apply 'call-process-region - (point-min) (point-max) spam-ifile-program - nil nil nil - add-or-delete-option category - (if db `(,db "-h") `("-h")))))) + (point-min) (point-max) spam-ifile-program + nil nil nil + add-or-delete-option category + (if db `(,db "-h") `("-h")))))) (defun spam-ifile-register-spam-routine (articles &optional unregister) (spam-ifile-register-with-ifile articles spam-ifile-spam-category unregister)) @@ -2235,40 +2269,40 @@ Uses `gnus-newsgroup-name' if category is nil (for ham registration)." (eval-and-compile (when (condition-case nil - (let ((spam-stat-install-hooks nil)) - (require 'spam-stat)) - (file-error - (defalias 'spam-stat-register-ham-routine 'ignore) - (defalias 'spam-stat-register-spam-routine 'ignore) - nil)) + (let ((spam-stat-install-hooks nil)) + (require 'spam-stat)) + (file-error + (defalias 'spam-stat-register-ham-routine 'ignore) + (defalias 'spam-stat-register-spam-routine 'ignore) + nil)) (defun spam-check-stat () "Check the spam-stat backend for the classification of this message" (let ((spam-stat-split-fancy-spam-group spam-split-group) ; override - (spam-stat-buffer (buffer-name)) ; stat the current buffer - category return) - (spam-stat-split-fancy))) + (spam-stat-buffer (buffer-name)) ; stat the current buffer + category return) + (spam-stat-split-fancy))) (defun spam-stat-register-spam-routine (articles &optional unregister) (dolist (article articles) - (let ((article-string (spam-get-article-as-string article))) - (with-temp-buffer - (insert article-string) - (if unregister - (spam-stat-buffer-change-to-non-spam) - (spam-stat-buffer-is-spam)))))) + (let ((article-string (spam-get-article-as-string article))) + (with-temp-buffer + (insert article-string) + (if unregister + (spam-stat-buffer-change-to-non-spam) + (spam-stat-buffer-is-spam)))))) (defun spam-stat-unregister-spam-routine (articles) (spam-stat-register-spam-routine articles t)) (defun spam-stat-register-ham-routine (articles &optional unregister) (dolist (article articles) - (let ((article-string (spam-get-article-as-string article))) - (with-temp-buffer - (insert article-string) - (if unregister - (spam-stat-buffer-change-to-spam) - (spam-stat-buffer-is-non-spam)))))) + (let ((article-string (spam-get-article-as-string article))) + (with-temp-buffer + (insert article-string) + (if unregister + (spam-stat-buffer-change-to-spam) + (spam-stat-buffer-is-non-spam)))))) (defun spam-stat-unregister-ham-routine (articles) (spam-stat-register-ham-routine articles t)) @@ -2321,34 +2355,34 @@ With a non-nil REMOVE, remove the ADDRESSES." (with-current-buffer (find-file-noselect file) (dolist (a addresses) - (when (stringp a) - (goto-char (point-min)) - (if (re-search-forward (regexp-quote a) nil t) - ;; found the address - (when remove - (spam-kill-whole-line)) - ;; else, the address was not found - (unless remove - (goto-char (point-max)) - (unless (bobp) - (insert "\n")) - (insert a "\n"))))) + (when (stringp a) + (goto-char (point-min)) + (if (re-search-forward (regexp-quote a) nil t) + ;; found the address + (when remove + (spam-kill-whole-line)) + ;; else, the address was not found + (unless remove + (goto-char (point-max)) + (unless (bobp) + (insert "\n")) + (insert a "\n"))))) (save-buffer)))) (defun spam-filelist-build-cache (type) (let ((cache (if (eq type 'spam-use-blacklist) - spam-blacklist-cache - spam-whitelist-cache)) - parsed-cache) + spam-blacklist-cache + spam-whitelist-cache)) + parsed-cache) (unless (gethash type spam-caches) (while cache - (let ((address (pop cache))) - (unless (zerop (length address)) ; 0 for a nil address too - (setq address (regexp-quote address)) - ;; fix regexp-quote's treatment of user-intended regexes - (while (string-match "\\\\\\*" address) - (setq address (replace-match ".*" t t address)))) - (push address parsed-cache))) + (let ((address (pop cache))) + (unless (zerop (length address)) ; 0 for a nil address too + (setq address (regexp-quote address)) + ;; fix regexp-quote's treatment of user-intended regexes + (while (string-match "\\\\\\*" address) + (setq address (replace-match ".*" t t address)))) + (push address parsed-cache))) (puthash type parsed-cache spam-caches)))) (defun spam-filelist-check-cache (type from) @@ -2356,9 +2390,9 @@ With a non-nil REMOVE, remove the ADDRESSES." (spam-filelist-build-cache type) (let (found) (dolist (address (gethash type spam-caches)) - (when (and address (string-match address from)) - (setq found t) - (return))) + (when (and address (string-match address from)) + (setq found t) + (return))) found))) ;;; returns t if the sender is in the whitelist, nil or @@ -2370,7 +2404,7 @@ With a non-nil REMOVE, remove the ADDRESSES." (if (spam-from-listed-p 'spam-use-whitelist) t (if spam-use-whitelist-exclusive - spam-split-group + spam-split-group nil))) (defun spam-check-blacklist () @@ -2384,59 +2418,60 @@ With a non-nil REMOVE, remove the ADDRESSES." (when (file-readable-p file) (let (contents address) (with-temp-buffer - (insert-file-contents file) - (while (not (eobp)) - (setq address (buffer-substring (point) (point-at-eol))) - (forward-line 1) - ;; insert the e-mail address if detected, otherwise the raw data - (unless (zerop (length address)) - (let ((pure-address (nth 1 (gnus-extract-address-components address)))) - (push (or pure-address address) contents))))) + (insert-file-contents file) + (while (not (eobp)) + (setq address (buffer-substring (point) (point-at-eol))) + (forward-line 1) + ;; insert the e-mail address if detected, otherwise the raw data + (unless (zerop (length address)) + (let ((pure-address + (nth 1 (gnus-extract-address-components address)))) + (push (or pure-address address) contents))))) (nreverse contents)))) (defun spam-from-listed-p (type) (let ((from (message-fetch-field "from")) - found) + found) (spam-filelist-check-cache type from))) (defun spam-filelist-register-routine (articles blacklist &optional unregister) (let ((de-symbol (if blacklist 'spam-use-whitelist 'spam-use-blacklist)) - (declassification (if blacklist 'ham 'spam)) - (enter-function - (if blacklist 'spam-enter-blacklist 'spam-enter-whitelist)) - (remove-function - (if blacklist 'spam-enter-whitelist 'spam-enter-blacklist)) - from addresses unregister-list article-unregister-list) + (declassification (if blacklist 'ham 'spam)) + (enter-function + (if blacklist 'spam-enter-blacklist 'spam-enter-whitelist)) + (remove-function + (if blacklist 'spam-enter-whitelist 'spam-enter-blacklist)) + from addresses unregister-list article-unregister-list) (dolist (article articles) (let ((from (spam-fetch-field-from-fast article)) - (id (spam-fetch-field-message-id-fast article)) - sender-ignored) - (when (stringp from) - (dolist (ignore-regex spam-blacklist-ignored-regexes) - (when (and (not sender-ignored) - (stringp ignore-regex) - (string-match ignore-regex from)) - (setq sender-ignored t))) - ;; remember the messages we need to unregister, unless remove is set - (when (and - (null unregister) - (spam-log-unregistration-needed-p - id 'process declassification de-symbol)) - (push article article-unregister-list) - (push from unregister-list)) - (unless sender-ignored - (push from addresses))))) + (id (spam-fetch-field-message-id-fast article)) + sender-ignored) + (when (stringp from) + (dolist (ignore-regex spam-blacklist-ignored-regexes) + (when (and (not sender-ignored) + (stringp ignore-regex) + (string-match ignore-regex from)) + (setq sender-ignored t))) + ;; remember the messages we need to unregister, unless remove is set + (when (and + (null unregister) + (spam-log-unregistration-needed-p + id 'process declassification de-symbol)) + (push article article-unregister-list) + (push from unregister-list)) + (unless sender-ignored + (push from addresses))))) (if unregister - (funcall enter-function addresses t) ; unregister all these addresses + (funcall enter-function addresses t) ; unregister all these addresses ;; else, register normally and unregister what we need to (funcall remove-function unregister-list t) (dolist (article article-unregister-list) - (spam-log-undo-registration - (spam-fetch-field-message-id-fast article) - 'process - declassification - de-symbol)) + (spam-log-undo-registration + (spam-fetch-field-message-id-fast article) + 'process + declassification + de-symbol)) (funcall enter-function addresses nil)))) (defun spam-blacklist-unregister-routine (articles) @@ -2467,9 +2502,9 @@ With a non-nil REMOVE, remove the ADDRESSES." (defun spam-report-resend-register-routine (articles &optional ham) (let* ((resend-to-gp - (if ham - (gnus-parameter-ham-resend-to gnus-newsgroup-name) - (gnus-parameter-spam-resend-to gnus-newsgroup-name))) + (if ham + (gnus-parameter-ham-resend-to gnus-newsgroup-name) + (gnus-parameter-spam-resend-to gnus-newsgroup-name))) (spam-report-resend-to (or (car-safe resend-to-gp) spam-report-resend-to))) (spam-report-resend articles ham))) @@ -2479,15 +2514,15 @@ With a non-nil REMOVE, remove the ADDRESSES." ;;{{{ Bogofilter (defun spam-check-bogofilter-headers (&optional score) (let ((header (message-fetch-field spam-bogofilter-header))) - (when header ; return nil when no header - (if score ; scoring mode - (if (string-match "spamicity=\\([0-9.]+\\)" header) - (match-string 1 header) - "0") - ;; spam detection mode - (when (string-match spam-bogofilter-bogosity-positive-spam-header - header) - spam-split-group))))) + (when header ; return nil when no header + (if score ; scoring mode + (if (string-match "spamicity=\\([0-9.]+\\)" header) + (match-string 1 header) + "0") + ;; spam detection mode + (when (string-match spam-bogofilter-bogosity-positive-spam-header + header) + spam-split-group))))) ;; return something sensible if the score can't be determined (defun spam-bogofilter-score (&optional recheck) @@ -2497,8 +2532,8 @@ With a non-nil REMOVE, remove the ADDRESSES." (gnus-summary-show-article t) (set-buffer gnus-article-buffer) (let ((score (or (unless recheck - (spam-check-bogofilter-headers t)) - (spam-check-bogofilter t)))) + (spam-check-bogofilter-headers t)) + (spam-check-bogofilter t)))) (gnus-summary-show-article) (message "Spamicity score %s" score) (or score "0")))) @@ -2507,53 +2542,53 @@ With a non-nil REMOVE, remove the ADDRESSES." "Verify the Bogofilter version is sufficient." (when (eq spam-bogofilter-valid 'unknown) (setq spam-bogofilter-valid - (not (string-match "^bogofilter version 0\\.\\([0-9]\\|1[01]\\)\\." - (shell-command-to-string - (format "%s -V" spam-bogofilter-program)))))) + (not (string-match "^bogofilter version 0\\.\\([0-9]\\|1[01]\\)\\." + (shell-command-to-string + (format "%s -V" spam-bogofilter-program)))))) spam-bogofilter-valid) (defun spam-check-bogofilter (&optional score) "Check the Bogofilter backend for the classification of this message." (if (spam-verify-bogofilter) (let ((article-buffer-name (buffer-name)) - (db spam-bogofilter-database-directory) - return) - (with-temp-buffer - (let ((temp-buffer-name (buffer-name))) - (with-current-buffer article-buffer-name - (apply 'call-process-region - (point-min) (point-max) - spam-bogofilter-program - nil temp-buffer-name nil - (if db `("-d" ,db "-v") `("-v")))) - (setq return (spam-check-bogofilter-headers score)))) - return) + (db spam-bogofilter-database-directory) + return) + (with-temp-buffer + (let ((temp-buffer-name (buffer-name))) + (with-current-buffer article-buffer-name + (apply 'call-process-region + (point-min) (point-max) + spam-bogofilter-program + nil temp-buffer-name nil + (if db `("-d" ,db "-v") `("-v")))) + (setq return (spam-check-bogofilter-headers score)))) + return) (gnus-error 5 "`spam.el' doesn't support obsolete bogofilter versions"))) (defun spam-bogofilter-register-with-bogofilter (articles - spam - &optional unregister) + spam + &optional unregister) "Register an article, given as a string, as spam or non-spam." (if (spam-verify-bogofilter) (dolist (article articles) - (let ((article-string (spam-get-article-as-string article)) - (db spam-bogofilter-database-directory) - (switch (if unregister - (if spam - spam-bogofilter-spam-strong-switch - spam-bogofilter-ham-strong-switch) - (if spam - spam-bogofilter-spam-switch - spam-bogofilter-ham-switch)))) - (when (stringp article-string) - (with-temp-buffer - (insert article-string) - - (apply 'call-process-region - (point-min) (point-max) - spam-bogofilter-program - nil nil nil switch - (if db `("-d" ,db "-v") `("-v"))))))) + (let ((article-string (spam-get-article-as-string article)) + (db spam-bogofilter-database-directory) + (switch (if unregister + (if spam + spam-bogofilter-spam-strong-switch + spam-bogofilter-ham-strong-switch) + (if spam + spam-bogofilter-spam-switch + spam-bogofilter-ham-switch)))) + (when (stringp article-string) + (with-temp-buffer + (insert article-string) + + (apply 'call-process-region + (point-min) (point-max) + spam-bogofilter-program + nil nil nil switch + (if db `("-d" ,db "-v") `("-v"))))))) (gnus-error 5 "`spam.el' doesn't support obsolete bogofilter versions"))) (defun spam-bogofilter-register-spam-routine (articles &optional unregister) @@ -2577,45 +2612,45 @@ With a non-nil REMOVE, remove the ADDRESSES." (let ((article-buffer-name (buffer-name))) (with-temp-buffer (let ((temp-buffer-name (buffer-name))) - (with-current-buffer article-buffer-name - (let ((status - (apply 'call-process-region - (point-min) (point-max) - spam-spamoracle-binary - nil temp-buffer-name nil - (if spam-spamoracle-database - `("-f" ,spam-spamoracle-database "mark") - '("mark"))))) - (if (eq 0 status) - (progn - (set-buffer temp-buffer-name) - (goto-char (point-min)) - (when (re-search-forward "^X-Spam: yes;" nil t) - spam-split-group)) - (error "Error running spamoracle: %s" status)))))))) + (with-current-buffer article-buffer-name + (let ((status + (apply 'call-process-region + (point-min) (point-max) + spam-spamoracle-binary + nil temp-buffer-name nil + (if spam-spamoracle-database + `("-f" ,spam-spamoracle-database "mark") + '("mark"))))) + (if (eq 0 status) + (progn + (set-buffer temp-buffer-name) + (goto-char (point-min)) + (when (re-search-forward "^X-Spam: yes;" nil t) + spam-split-group)) + (error "Error running spamoracle: %s" status)))))))) (defun spam-spamoracle-learn (articles article-is-spam-p &optional unregister) "Run spamoracle in training mode." (with-temp-buffer (let ((temp-buffer-name (buffer-name))) (save-excursion - (goto-char (point-min)) - (dolist (article articles) - (insert (spam-get-article-as-string article))) - (let* ((arg (if (spam-xor unregister article-is-spam-p) - "-spam" - "-good")) - (status - (apply 'call-process-region - (point-min) (point-max) - spam-spamoracle-binary - nil temp-buffer-name nil - (if spam-spamoracle-database - `("-f" ,spam-spamoracle-database - "add" ,arg) - `("add" ,arg))))) - (unless (eq 0 status) - (error "Error running spamoracle: %s" status))))))) + (goto-char (point-min)) + (dolist (article articles) + (insert (spam-get-article-as-string article))) + (let* ((arg (if (spam-xor unregister article-is-spam-p) + "-spam" + "-good")) + (status + (apply 'call-process-region + (point-min) (point-max) + spam-spamoracle-binary + nil temp-buffer-name nil + (if spam-spamoracle-database + `("-f" ,spam-spamoracle-database + "add" ,arg) + `("add" ,arg))))) + (unless (eq 0 status) + (error "Error running spamoracle: %s" status))))))) (defun spam-spamoracle-learn-ham (articles &optional unregister) (spam-spamoracle-learn articles nil unregister)) @@ -2635,31 +2670,31 @@ With a non-nil REMOVE, remove the ADDRESSES." ;;; based mostly on the bogofilter code (defun spam-check-spamassassin-headers (&optional score) "Check the SpamAssassin headers for the classification of this message." - (if score ; scoring mode + (if score ; scoring mode (let ((header (message-fetch-field spam-spamassassin-spam-status-header))) - (when header - (if (string-match spam-spamassassin-score-regexp header) - (match-string 1 header) - "0"))) + (when header + (if (string-match spam-spamassassin-score-regexp header) + (match-string 1 header) + "0"))) ;; spam detection mode (let ((header (message-fetch-field spam-spamassassin-spam-flag-header))) - (when header ; return nil when no header - (when (string-match spam-spamassassin-positive-spam-flag-header - header) - spam-split-group))))) + (when header ; return nil when no header + (when (string-match spam-spamassassin-positive-spam-flag-header + header) + spam-split-group))))) (defun spam-check-spamassassin (&optional score) "Check the SpamAssassin backend for the classification of this message." (let ((article-buffer-name (buffer-name))) (with-temp-buffer (let ((temp-buffer-name (buffer-name))) - (with-current-buffer article-buffer-name - (apply 'call-process-region - (point-min) (point-max) spam-assassin-program - nil temp-buffer-name nil spam-spamassassin-arguments)) - ;; check the return now (we're back in the temp buffer) - (goto-char (point-min)) - (spam-check-spamassassin-headers score))))) + (with-current-buffer article-buffer-name + (apply 'call-process-region + (point-min) (point-max) spam-assassin-program + nil temp-buffer-name nil spam-spamassassin-arguments)) + ;; check the return now (we're back in the temp buffer) + (goto-char (point-min)) + (spam-check-spamassassin-headers score))))) ;; return something sensible if the score can't be determined (defun spam-spamassassin-score (&optional recheck) @@ -2669,40 +2704,39 @@ With a non-nil REMOVE, remove the ADDRESSES." (gnus-summary-show-article t) (set-buffer gnus-article-buffer) (let ((score (or (unless recheck - (spam-check-spamassassin-headers t)) - (spam-check-spamassassin t)))) + (spam-check-spamassassin-headers t)) + (spam-check-spamassassin t)))) (gnus-summary-show-article) (message "SpamAssassin score %s" score) (or score "0")))) (defun spam-spamassassin-register-with-sa-learn (articles spam - &optional unregister) + &optional unregister) "Register articles with spamassassin's sa-learn as spam or non-spam." (if articles (let ((action (if unregister spam-sa-learn-unregister-switch - (if spam spam-sa-learn-spam-switch - spam-sa-learn-ham-switch))) - (summary-buffer-name (buffer-name))) - (with-temp-buffer - ;; group the articles into mbox format - (dolist (article articles) - (let (article-string) - (with-current-buffer summary-buffer-name - (setq article-string (spam-get-article-as-string article))) - (when (stringp article-string) - (insert "From \n") ; mbox separator (sa-learn only checks the - ; first five chars, so we can get away with - ; a bogus line)) - (insert article-string) - (insert "\n")))) - ;; call sa-learn on all messages at the same time - (apply 'call-process-region - (point-min) (point-max) - spam-sa-learn-program - nil nil nil "--mbox" - (if spam-sa-learn-rebuild - (list action) - `("--no-rebuild" ,action))))))) + (if spam spam-sa-learn-spam-switch + spam-sa-learn-ham-switch))) + (summary-buffer-name (buffer-name))) + (with-temp-buffer + ;; group the articles into mbox format + (dolist (article articles) + (let (article-string) + (with-current-buffer summary-buffer-name + (setq article-string (spam-get-article-as-string article))) + (when (stringp article-string) + ;; mbox separator + (insert (concat "From nobody " (current-time-string) "\n")) + (insert article-string) + (insert "\n")))) + ;; call sa-learn on all messages at the same time + (apply 'call-process-region + (point-min) (point-max) + spam-sa-learn-program + nil nil nil "--mbox" + (if spam-sa-learn-rebuild + (list action) + `("--no-rebuild" ,action))))))) (defun spam-spamassassin-register-spam-routine (articles &optional unregister) (spam-spamassassin-register-with-sa-learn articles t unregister)) @@ -2723,11 +2757,11 @@ With a non-nil REMOVE, remove the ADDRESSES." (defun spam-check-bsfilter-headers (&optional score) (if score (or (nnmail-fetch-field spam-bsfilter-probability-header) - "0") + "0") (let ((header (nnmail-fetch-field spam-bsfilter-header))) (when header ; return nil when no header - (when (string-match "YES" header) - spam-split-group))))) + (when (string-match "YES" header) + spam-split-group))))) ;; return something sensible if the score can't be determined (defun spam-bsfilter-score (&optional recheck) @@ -2737,8 +2771,8 @@ With a non-nil REMOVE, remove the ADDRESSES." (gnus-summary-show-article t) (set-buffer gnus-article-buffer) (let ((score (or (unless recheck - (spam-check-bsfilter-headers t)) - (spam-check-bsfilter t)))) + (spam-check-bsfilter-headers t)) + (spam-check-bsfilter t)))) (gnus-summary-show-article) (message "Spamicity score %s" score) (or score "0")))) @@ -2746,47 +2780,47 @@ With a non-nil REMOVE, remove the ADDRESSES." (defun spam-check-bsfilter (&optional score) "Check the Bsfilter backend for the classification of this message." (let ((article-buffer-name (buffer-name)) - (dir spam-bsfilter-database-directory) - return) + (dir spam-bsfilter-database-directory) + return) (with-temp-buffer (let ((temp-buffer-name (buffer-name))) - (with-current-buffer article-buffer-name - (apply 'call-process-region - (point-min) (point-max) - spam-bsfilter-program - nil temp-buffer-name nil - "--pipe" - "--insert-flag" - "--insert-probability" - (when dir - (list "--homedir" dir)))) - (setq return (spam-check-bsfilter-headers score)))) + (with-current-buffer article-buffer-name + (apply 'call-process-region + (point-min) (point-max) + spam-bsfilter-program + nil temp-buffer-name nil + "--pipe" + "--insert-flag" + "--insert-probability" + (when dir + (list "--homedir" dir)))) + (setq return (spam-check-bsfilter-headers score)))) return)) (defun spam-bsfilter-register-with-bsfilter (articles - spam - &optional unregister) + spam + &optional unregister) "Register an article, given as a string, as spam or non-spam." (dolist (article articles) (let ((article-string (spam-get-article-as-string article)) - (switch (if unregister - (if spam - spam-bsfilter-spam-strong-switch - spam-bsfilter-ham-strong-switch) - (if spam - spam-bsfilter-spam-switch - spam-bsfilter-ham-switch)))) + (switch (if unregister + (if spam + spam-bsfilter-spam-strong-switch + spam-bsfilter-ham-strong-switch) + (if spam + spam-bsfilter-spam-switch + spam-bsfilter-ham-switch)))) (when (stringp article-string) - (with-temp-buffer - (insert article-string) - (apply 'call-process-region - (point-min) (point-max) - spam-bsfilter-program - nil nil nil switch - "--update" - (when spam-bsfilter-database-directory - (list "--homedir" - spam-bsfilter-database-directory)))))))) + (with-temp-buffer + (insert article-string) + (apply 'call-process-region + (point-min) (point-max) + spam-bsfilter-program + nil nil nil switch + "--update" + (when spam-bsfilter-database-directory + (list "--homedir" + spam-bsfilter-database-directory)))))))) (defun spam-bsfilter-register-spam-routine (articles &optional unregister) (spam-bsfilter-register-with-bsfilter articles t unregister)) @@ -2805,15 +2839,15 @@ With a non-nil REMOVE, remove the ADDRESSES." ;;{{{ CRM114 Mailfilter (defun spam-check-crm114-headers (&optional score) (let ((header (message-fetch-field spam-crm114-header))) - (when header ; return nil when no header - (if score ; scoring mode - (if (string-match "( pR: \\([0-9.-]+\\)" header) - (match-string 1 header) - "0") - ;; spam detection mode - (when (string-match spam-crm114-positive-spam-header - header) - spam-split-group))))) + (when header ; return nil when no header + (if score ; scoring mode + (if (string-match "( pR: \\([0-9.-]+\\)" header) + (match-string 1 header) + "0") + ;; spam detection mode + (when (string-match spam-crm114-positive-spam-header + header) + spam-split-group))))) ;; return something sensible if the score can't be determined (defun spam-crm114-score () @@ -2823,7 +2857,7 @@ With a non-nil REMOVE, remove the ADDRESSES." (gnus-summary-show-article t) (set-buffer gnus-article-buffer) (let ((score (or (spam-check-crm114-headers t) - (spam-check-crm114 t)))) + (spam-check-crm114 t)))) (gnus-summary-show-article) (message "pR: %s" score) (or score "0")))) @@ -2831,41 +2865,41 @@ With a non-nil REMOVE, remove the ADDRESSES." (defun spam-check-crm114 (&optional score) "Check the CRM114 Mailfilter backend for the classification of this message." (let ((article-buffer-name (buffer-name)) - (db spam-crm114-database-directory) - return) + (db spam-crm114-database-directory) + return) (with-temp-buffer (let ((temp-buffer-name (buffer-name))) - (with-current-buffer article-buffer-name - (apply 'call-process-region - (point-min) (point-max) - spam-crm114-program - nil temp-buffer-name nil + (with-current-buffer article-buffer-name + (apply 'call-process-region + (point-min) (point-max) + spam-crm114-program + nil temp-buffer-name nil (when db (list (concat "--fileprefix=" db))))) - (setq return (spam-check-crm114-headers score)))) + (setq return (spam-check-crm114-headers score)))) return)) (defun spam-crm114-register-with-crm114 (articles - spam - &optional unregister) + spam + &optional unregister) "Register an article, given as a string, as spam or non-spam." (dolist (article articles) (let ((article-string (spam-get-article-as-string article)) - (db spam-crm114-database-directory) - (switch (if unregister - (if spam - spam-crm114-spam-strong-switch - spam-crm114-ham-strong-switch) - (if spam - spam-crm114-spam-switch - spam-crm114-ham-switch)))) + (db spam-crm114-database-directory) + (switch (if unregister + (if spam + spam-crm114-spam-strong-switch + spam-crm114-ham-strong-switch) + (if spam + spam-crm114-spam-switch + spam-crm114-ham-switch)))) (when (stringp article-string) - (with-temp-buffer - (insert article-string) + (with-temp-buffer + (insert article-string) - (apply 'call-process-region - (point-min) (point-max) - spam-crm114-program - nil nil nil + (apply 'call-process-region + (point-min) (point-max) + spam-crm114-program + nil nil nil (when db (list switch (concat "--fileprefix=" db))))))))) (defun spam-crm114-register-spam-routine (articles &optional unregister) @@ -2905,7 +2939,7 @@ installed through `spam-necessary-extra-headers'." (setq spam-install-hooks t) ;; TODO: How do we redo this every time the `spam' face is customized? (push '((eq mark gnus-spam-mark) . spam) - gnus-summary-highlight) + gnus-summary-highlight) ;; Add hooks for loading and saving the spam stats (add-hook 'gnus-save-newsrc-hook 'spam-maybe-spam-stat-save) (add-hook 'gnus-get-top-new-news-hook 'spam-maybe-spam-stat-load) diff --git a/lisp/gnus/starttls.el b/lisp/gnus/starttls.el index a4d33b81bb5..4b4839a4df2 100644 --- a/lisp/gnus/starttls.el +++ b/lisp/gnus/starttls.el @@ -1,7 +1,6 @@ ;;; starttls.el --- STARTTLS functions -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Daiki Ueno <ueno@unixuser.org> ;; Author: Simon Josefsson <simon@josefsson.org> diff --git a/lisp/gnus/utf7.el b/lisp/gnus/utf7.el index 47c3b0f4c5d..f362931dcd0 100644 --- a/lisp/gnus/utf7.el +++ b/lisp/gnus/utf7.el @@ -1,7 +1,6 @@ ;;; utf7.el --- UTF-7 encoding/decoding for Emacs -*-coding: iso-8859-1;-*- -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Jon K Hellan <hellan@acm.org> ;; Maintainer: bugs@gnus.org diff --git a/lisp/gnus/yenc.el b/lisp/gnus/yenc.el index 9fdf62d43b3..c21dfbdb438 100644 --- a/lisp/gnus/yenc.el +++ b/lisp/gnus/yenc.el @@ -1,6 +1,6 @@ ;;; yenc.el --- elisp native yenc decoder -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Author: Jesper Harder <harder@ifa.au.dk> ;; Keywords: yenc news diff --git a/lisp/gs.el b/lisp/gs.el index ab5cfab86e7..2eba7af71ae 100644 --- a/lisp/gs.el +++ b/lisp/gs.el @@ -1,7 +1,6 @@ ;;; gs.el --- interface to Ghostscript -;; Copyright (C) 1998, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: internal @@ -221,5 +220,4 @@ the form \"WINDOW-ID PIXMAP-ID\". Value is non-nil if successful." (provide 'gs) -;; arch-tag: 06ab51b8-4932-4cfe-9f60-b924a8edb3f0 ;;; gs.el ends here diff --git a/lisp/help-at-pt.el b/lisp/help-at-pt.el index 8bac48424f5..d9012bdcad3 100644 --- a/lisp/help-at-pt.el +++ b/lisp/help-at-pt.el @@ -1,6 +1,6 @@ ;;; help-at-pt.el --- local help through the keyboard -;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2003-2011 Free Software Foundation, Inc. ;; Author: Luc Teirlinck <teirllm@auburn.edu> ;; Keywords: help @@ -350,5 +350,4 @@ different regions. With numeric argument ARG, behaves like (provide 'help-at-pt) -;; arch-tag: d0b8b86d-d23f-45d0-a82d-208d6205a583 ;;; help-at-pt.el ends here diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 65bcdbcb8f8..ed266c71a59 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -1,7 +1,6 @@ ;;; help-fns.el --- Complex help functions -;; Copyright (C) 1985, 1986, 1993, 1994, 1998, 1999, 2000, 2001, 2002, -;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 1985-1986, 1993-1994, 1998-2011 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -291,13 +290,19 @@ suitable file is found, return nil." ((not (stringp file-name)) ;; If we don't have a file-name string by now, we lost. nil) + ;; Now, `file-name' should have become an absolute file name. + ;; For files loaded from ~/.emacs.elc, try ~/.emacs. + ((let (fn) + (and (string-equal file-name + (expand-file-name ".emacs.elc" "~")) + (file-readable-p (setq fn (expand-file-name ".emacs" "~"))) + fn))) + ;; When the Elisp source file can be found in the install + ;; directory, return the name of that file. ((let ((lib-name (if (string-match "[.]elc\\'" file-name) (substring-no-properties file-name 0 -1) file-name))) - ;; When the Elisp source file can be found in the install - ;; directory return the name of that file - `file-name' should - ;; have become an absolute file name ny now. (or (and (file-readable-p lib-name) lib-name) ;; The library might be compressed. (and (file-readable-p (concat lib-name ".gz")) lib-name)))) @@ -658,19 +663,16 @@ it is displayed along with the global value." (if valvoid (princ " is void as a variable.") (princ "'s ")))) - (if valvoid - nil + (unless valvoid (with-current-buffer standard-output (setq val-start-pos (point)) (princ "value is ") - (terpri) (let ((from (point))) + (terpri) (pp val) - ;; Hyperlinks in variable's value are quite frequently - ;; inappropriate e.g C-h v <RET> features <RET> - ;; (help-xref-on-pp from (point)) - (if (< (point) (+ from 20)) - (delete-region (1- from) from)) + (if (< (point) (+ 68 (line-beginning-position 0))) + (delete-region from (1+ from)) + (delete-region (1- from) from)) (let* ((sv (get variable 'standard-value)) (origval (and (consp sv) (condition-case nil @@ -685,7 +687,6 @@ it is displayed along with the global value." (if (< (point) (+ from 20)) (delete-region (1- from) from))))))) (terpri) - (when locus (if (bufferp locus) (princ (format "%socal in buffer %s; " diff --git a/lisp/help-macro.el b/lisp/help-macro.el index 2e0f7fad539..8efb99d42d8 100644 --- a/lisp/help-macro.el +++ b/lisp/help-macro.el @@ -1,7 +1,6 @@ ;;; help-macro.el --- makes command line help such as help-for-help -;; Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993-1994, 2001-2011 Free Software Foundation, Inc. ;; Author: Lynn Slater <lrs@indetech.com> ;; Maintainer: FSF @@ -202,5 +201,4 @@ and then returns." (provide 'help-macro) -;; arch-tag: 59fee949-1686-485a-8a05-83418073e257 ;;; help-macro.el ends here diff --git a/lisp/help-mode.el b/lisp/help-mode.el index 9f54ff08c0b..826145d7af0 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el @@ -1,7 +1,7 @@ ;;; help-mode.el --- `help-mode' used by *Help* buffers -;; Copyright (C) 1985, 1986, 1993, 1994, 1998, 1999, 2000, 2001, 2002, -;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985-1986, 1993-1994, 1998-2011 +;; Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: help, internal @@ -325,6 +325,15 @@ Commands: ;; View mode's read-only status of existing *Help* buffer is lost ;; by with-output-to-temp-buffer. (toggle-read-only 1) + + (save-excursion + (goto-char (point-min)) + (let ((inhibit-read-only t)) + (when (re-search-forward "^This \\w+ is advised.$" nil t) + (put-text-property (match-beginning 0) + (match-end 0) + 'face 'font-lock-warning-face)))) + (help-make-xrefs (current-buffer)))) ;; Grokking cross-reference information in doc strings and @@ -829,5 +838,4 @@ help buffer by other means." (provide 'help-mode) -;; arch-tag: 850954ae-3725-4cb4-8e91-0bf6d52d6b0b ;;; help-mode.el ends here diff --git a/lisp/help.el b/lisp/help.el index 6c6bd76ec4b..9fcb06c559f 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -1,7 +1,6 @@ ;;; help.el --- help commands for Emacs -;; Copyright (C) 1985, 1986, 1993, 1994, 1998, 1999, 2000, 2001, 2002, -;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 1985-1986, 1993-1994, 1998-2011 ;; Free Software Foundation, Inc. ;; Maintainer: FSF diff --git a/lisp/hex-util.el b/lisp/hex-util.el index 932a7fe3543..c5ef6ac906a 100644 --- a/lisp/hex-util.el +++ b/lisp/hex-util.el @@ -1,7 +1,6 @@ ;;; hex-util.el --- Functions to encode/decode hexadecimal string. -;; Copyright (C) 1999, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2001-2011 Free Software Foundation, Inc. ;; Author: Shuhei KOBAYASHI <shuhei@aqua.ocn.ne.jp> ;; Keywords: data diff --git a/lisp/hexl.el b/lisp/hexl.el index 8e000e72ecd..dd142f7cda4 100644 --- a/lisp/hexl.el +++ b/lisp/hexl.el @@ -1,7 +1,6 @@ ;;; hexl.el --- edit a file in a hex dump format using the hexl filter -;; Copyright (C) 1989, 1994, 1998, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1989, 1994, 1998, 2001-2011 Free Software Foundation, Inc. ;; Author: Keith Gabryelski <ag@wheaties.ai.mit.edu> ;; Maintainer: FSF @@ -199,20 +198,8 @@ Quoting cannot be used, so the arguments cannot themselves contain spaces." (defvar hl-line-face) ;; Variables where the original values are stored to. -(defvar hexl-mode-old-hl-line-mode) -(defvar hexl-mode-old-hl-line-range-function) -(defvar hexl-mode-old-hl-line-face) -(defvar hexl-mode-old-local-map) -(defvar hexl-mode-old-mode-name) -(defvar hexl-mode-old-major-mode) -(defvar hexl-mode-old-ruler-mode) -(defvar hexl-mode-old-ruler-function) -(defvar hexl-mode-old-isearch-search-fun-function) -(defvar hexl-mode-old-require-final-newline) -(defvar hexl-mode-old-syntax-table) -(defvar hexl-mode-old-font-lock-keywords) -(defvar hexl-mode-old-eldoc-documentation-function) -(defvar hexl-mode-old-revert-buffer-function) +(defvar hexl-mode--old-var-vals ()) +(make-variable-buffer-local 'hexl-mode--old-var-vals) (defvar hexl-ascii-overlay nil "Overlay used to highlight ASCII element corresponding to current point.") @@ -229,6 +216,25 @@ Quoting cannot be used, so the arguments cannot themselves contain spaces." (put 'hexl-mode 'mode-class 'special) + +(defun hexl-mode--minor-mode-p (var) + (memq var '(ruler-mode hl-line-mode))) + +(defun hexl-mode--setq-local (var val) + ;; `var' can be either a symbol or a pair, in which case the `car' + ;; is the getter function and the `cdr' is the corresponding setter. + (unless (or (member var hexl-mode--old-var-vals) + (assoc var hexl-mode--old-var-vals)) + (push (if (or (consp var) (boundp var)) + (cons var + (if (consp var) (funcall (car var)) (symbol-value var))) + var) + hexl-mode--old-var-vals)) + (cond + ((consp var) (funcall (cdr var) val)) + ((hexl-mode--minor-mode-p var) (funcall var (if val 1 -1))) + (t (set (make-local-variable var) val)))) + ;;;###autoload (defun hexl-mode (&optional arg) "\\<hexl-mode-map>A mode for editing binary files in hex dump format. @@ -334,58 +340,31 @@ You can use \\[hexl-find-file] to visit a file in Hexl mode. ;; We do not turn off the old major mode; instead we just ;; override most of it. That way, we can restore it perfectly. - (make-local-variable 'hexl-mode-old-local-map) - (setq hexl-mode-old-local-map (current-local-map)) - (use-local-map hexl-mode-map) - - (make-local-variable 'hexl-mode-old-mode-name) - (setq hexl-mode-old-mode-name mode-name) - (setq mode-name "Hexl") - (set (make-local-variable 'hexl-mode-old-isearch-search-fun-function) - isearch-search-fun-function) - (set (make-local-variable 'isearch-search-fun-function) - 'hexl-isearch-search-function) + (hexl-mode--setq-local '(current-local-map . use-local-map) hexl-mode-map) - (make-local-variable 'hexl-mode-old-major-mode) - (setq hexl-mode-old-major-mode major-mode) - (setq major-mode 'hexl-mode) + (hexl-mode--setq-local 'mode-name "Hexl") + (hexl-mode--setq-local 'isearch-search-fun-function + 'hexl-isearch-search-function) + (hexl-mode--setq-local 'major-mode 'hexl-mode) - (make-local-variable 'hexl-mode-old-ruler-mode) - (setq hexl-mode-old-ruler-mode - (and (boundp 'ruler-mode) ruler-mode)) - - (make-local-variable 'hexl-mode-old-hl-line-mode) - (setq hexl-mode-old-hl-line-mode - (and (boundp 'hl-line-mode) hl-line-mode)) - - (make-local-variable 'hexl-mode-old-syntax-table) - (setq hexl-mode-old-syntax-table (syntax-table)) - (set-syntax-table (standard-syntax-table)) + (hexl-mode--setq-local '(syntax-table . set-syntax-table) + (standard-syntax-table)) (add-hook 'write-contents-functions 'hexl-save-buffer nil t) - (make-local-variable 'hexl-mode-old-require-final-newline) - (setq hexl-mode-old-require-final-newline require-final-newline) - (make-local-variable 'require-final-newline) - (setq require-final-newline nil) + (hexl-mode--setq-local 'require-final-newline nil) - (make-local-variable 'hexl-mode-old-font-lock-keywords) - (setq hexl-mode-old-font-lock-keywords font-lock-defaults) - (setq font-lock-defaults '(hexl-font-lock-keywords t)) + + (hexl-mode--setq-local 'font-lock-defaults '(hexl-font-lock-keywords t)) - (make-local-variable 'hexl-mode-old-revert-buffer-function) - (setq hexl-mode-old-revert-buffer-function revert-buffer-function) - (setq revert-buffer-function 'hexl-revert-buffer-function) + (hexl-mode--setq-local 'revert-buffer-function + #'hexl-revert-buffer-function) (add-hook 'change-major-mode-hook 'hexl-maybe-dehexlify-buffer nil t) ;; Set a callback function for eldoc. - (make-local-variable 'hexl-mode-old-eldoc-documentation-function) - (setq hexl-mode-old-eldoc-documentation-function - (bound-and-true-p eldoc-documentation-function)) - - (set (make-local-variable 'eldoc-documentation-function) - 'hexl-print-current-point-info) + (hexl-mode--setq-local 'eldoc-documentation-function + #'hexl-print-current-point-info) (eldoc-add-command-completions "hexl-") (eldoc-remove-command "hexl-save-buffer" "hexl-current-address") @@ -498,30 +477,22 @@ With arg, don't unhexlify buffer." (remove-hook 'post-command-hook 'hexl-follow-ascii-find t) (setq hexl-ascii-overlay nil) - (if (and (boundp 'ruler-mode) ruler-mode (not hexl-mode-old-ruler-mode)) - (ruler-mode 0)) - (when (boundp 'hexl-mode-old-ruler-function) - (setq ruler-mode-ruler-function hexl-mode-old-ruler-function)) - - (if (and (boundp 'hl-line-mode) hl-line-mode (not hexl-mode-old-hl-line-mode)) - (hl-line-mode 0)) - (when (boundp 'hexl-mode-old-hl-line-range-function) - (setq hl-line-range-function hexl-mode-old-hl-line-range-function)) - (when (boundp 'hexl-mode-old-hl-line-face) - (setq hl-line-face hexl-mode-old-hl-line-face)) - - (when (boundp 'hexl-mode-old-eldoc-documentation-function) - (setq eldoc-documentation-function - hexl-mode-old-eldoc-documentation-function)) - - (setq require-final-newline hexl-mode-old-require-final-newline) - (setq mode-name hexl-mode-old-mode-name) - (setq isearch-search-fun-function hexl-mode-old-isearch-search-fun-function) - (use-local-map hexl-mode-old-local-map) - (set-syntax-table hexl-mode-old-syntax-table) - (setq font-lock-defaults hexl-mode-old-font-lock-keywords) - (setq major-mode hexl-mode-old-major-mode) - (setq revert-buffer-function hexl-mode-old-revert-buffer-function) + (let ((mms ())) + (dolist (varval hexl-mode--old-var-vals) + (let* ((bound (consp varval)) + (var (if bound (car varval) varval)) + (val (cdr-safe varval))) + (cond + ((consp var) (funcall (cdr var) val)) + ((hexl-mode--minor-mode-p var) (push (cons var val) mms)) + (bound (set (make-local-variable var) val)) + (t (kill-local-variable var))))) + (kill-local-variable 'hexl-mode--old-var-vals) + ;; Enable/disable minor modes. Do it after having reset the other vars, + ;; since some of them may affect the minor modes. + (dolist (mm mms) + (funcall (car mm) (if (cdr mm) 1 -1)))) + (force-mode-line-update)) (defun hexl-maybe-dehexlify-buffer () @@ -620,23 +591,21 @@ Signal error if HEX-ADDRESS is out of range." (progn (setq arg (- arg)) (while (> arg 0) - (if (not (equal address (logior address 3))) - (if (> address hexl-max-address) - (progn - (message "End of buffer.") - (setq address hexl-max-address)) - (setq address (logior address 3))) - (if (> address hexl-max-address) - (progn - (message "End of buffer.") - (setq address hexl-max-address)) - (setq address (+ address 4)))) + (setq address + (if (> address hexl-max-address) + (progn + (message "End of buffer.") + hexl-max-address) + (if (equal address (logior address 3)) + (+ address 4) + (logior address 3)))) (setq arg (1- arg))) - (if (> address hexl-max-address) - (progn - (message "End of buffer.") - (setq address hexl-max-address)) - (setq address (logior address 3)))) + (setq address + (if (> address hexl-max-address) + (progn + (message "End of buffer.") + hexl-max-address) + (logior address 3)))) (while (> arg 0) (if (not (equal address (logand address -4))) (setq address (logand address -4)) @@ -659,23 +628,21 @@ Signal error if HEX-ADDRESS is out of range." (progn (setq arg (- arg)) (while (> arg 0) - (if (not (equal address (logior address 7))) - (if (> address hexl-max-address) - (progn - (message "End of buffer.") - (setq address hexl-max-address)) - (setq address (logior address 7))) - (if (> address hexl-max-address) - (progn - (message "End of buffer.") - (setq address hexl-max-address)) - (setq address (+ address 8)))) + (setq address + (if (> address hexl-max-address) + (progn + (message "End of buffer.") + hexl-max-address) + (if (equal address (logior address 7)) + (+ address 8) + (logior address 7)))) (setq arg (1- arg))) - (if (> address hexl-max-address) - (progn - (message "End of buffer.") - (setq address hexl-max-address)) - (setq address (logior address 7)))) + (setq address + (if (> address hexl-max-address) + (progn + (message "End of buffer.") + hexl-max-address) + (logior address 7)))) (while (> arg 0) (if (not (equal address (logand address -8))) (setq address (logand address -8)) @@ -746,18 +713,18 @@ With prefix arg N, puts point N bytes of the way from the true beginning." (defun hexl-scroll-down (arg) "Scroll hexl buffer window upward ARG lines; or near full window if no ARG." (interactive "P") - (if (null arg) - (setq arg (1- (window-height))) - (setq arg (prefix-numeric-value arg))) + (setq arg (if (null arg) + (1- (window-height)) + (prefix-numeric-value arg))) (hexl-scroll-up (- arg))) (defun hexl-scroll-up (arg) "Scroll hexl buffer window upward ARG lines; or near full window if no ARG. If there's no byte at the target address, move to the first or last line." (interactive "P") - (if (null arg) - (setq arg (1- (window-height))) - (setq arg (prefix-numeric-value arg))) + (setq arg (if (null arg) + (1- (window-height)) + (prefix-numeric-value arg))) (let* ((movement (* arg 16)) (address (hexl-current-address)) (dest (+ address movement))) @@ -785,10 +752,8 @@ If there's no byte at the target address, move to the first or last line." (defun hexl-end-of-1k-page () "Go to end of 1KB boundary." (interactive) - (hexl-goto-address (let ((address (logior (hexl-current-address) 1023))) - (if (> address hexl-max-address) - (setq address hexl-max-address)) - address))) + (hexl-goto-address + (max hexl-max-address (logior (hexl-current-address) 1023)))) (defun hexl-beginning-of-512b-page () "Go to beginning of 512 byte boundary." @@ -798,10 +763,8 @@ If there's no byte at the target address, move to the first or last line." (defun hexl-end-of-512b-page () "Go to end of 512 byte boundary." (interactive) - (hexl-goto-address (let ((address (logior (hexl-current-address) 511))) - (if (> address hexl-max-address) - (setq address hexl-max-address)) - address))) + (hexl-goto-address + (max hexl-max-address (logior (hexl-current-address) 511)))) (defun hexl-quoted-insert (arg) "Read next input character and insert it. @@ -1056,27 +1019,17 @@ Customize the variable `hexl-follow-ascii' to disable this feature." (defun hexl-activate-ruler () "Activate `ruler-mode'." (require 'ruler-mode) - (unless (boundp 'hexl-mode-old-ruler-function) - (set (make-local-variable 'hexl-mode-old-ruler-function) - ruler-mode-ruler-function)) - (set (make-local-variable 'ruler-mode-ruler-function) - 'hexl-mode-ruler) - (ruler-mode 1)) + (hexl-mode--setq-local 'ruler-mode-ruler-function + #'hexl-mode-ruler) + (hexl-mode--setq-local 'ruler-mode t)) (defun hexl-follow-line () "Activate `hl-line-mode'." (require 'hl-line) - (unless (boundp 'hexl-mode-old-hl-line-range-function) - (set (make-local-variable 'hexl-mode-old-hl-line-range-function) - hl-line-range-function)) - (unless (boundp 'hexl-mode-old-hl-line-face) - (set (make-local-variable 'hexl-mode-old-hl-line-face) - hl-line-face)) - (set (make-local-variable 'hl-line-range-function) - 'hexl-highlight-line-range) - (set (make-local-variable 'hl-line-face) - 'highlight) - (hl-line-mode 1)) + (hexl-mode--setq-local 'hl-line-range-function + #'hexl-highlight-line-range) + (hexl-mode--setq-local 'hl-line-face 'highlight) + (hexl-mode--setq-local 'hl-line-mode t)) (defun hexl-highlight-line-range () "Return the range of address region for the point. @@ -1158,5 +1111,4 @@ This function is assumed to be used as callback function for `hl-line-mode'." (provide 'hexl) -;; arch-tag: d5a7aa8a-9bce-480b-bcff-6c4c7ca5ea4a ;;; hexl.el ends here diff --git a/lisp/hfy-cmap.el b/lisp/hfy-cmap.el index 7aefc36224b..7bf1da2bdd9 100644 --- a/lisp/hfy-cmap.el +++ b/lisp/hfy-cmap.el @@ -1,6 +1,6 @@ ;;; hfy-cmap.el --- Fallback colour name -> rgb mapping for `htmlfontify' -;; Copyright (C) 2002, 2003, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2002-2003, 2009-2011 Free Software Foundation, Inc. ;; Emacs Lisp Archive Entry ;; Package: htmlfontify @@ -850,5 +850,4 @@ Loads the variable `hfy-rgb-txt-colour-map', which is used by ;; generated-autoload-file: "htmlfontify.el" ;; End: -;; arch-tag: dff7feea-add4-48ba-937c-e79ac40cec9b ;;; hfy-cmap.el ends here diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el index 0273de14edd..d2c45e11321 100644 --- a/lisp/hi-lock.el +++ b/lisp/hi-lock.el @@ -1,7 +1,6 @@ ;;; hi-lock.el --- minor mode for interactive automatic highlighting -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; Author: David M. Koppelman <koppel@ece.lsu.edu> ;; Keywords: faces, minor-mode, matching, display @@ -665,5 +664,4 @@ A string is considered new if it had not previously been used in a call to (provide 'hi-lock) -;; arch-tag: d2e8fd07-4cc9-4c6f-a200-1e729bc54066 ;;; hi-lock.el ends here diff --git a/lisp/hilit-chg.el b/lisp/hilit-chg.el index 956cfc1c597..859f1288c81 100644 --- a/lisp/hilit-chg.el +++ b/lisp/hilit-chg.el @@ -1,7 +1,6 @@ ;;; hilit-chg.el --- minor mode displaying buffer changes with special face -;; Copyright (C) 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998, 2000-2011 Free Software Foundation, Inc. ;; Author: Richard Sharman <rsharman@pobox.com> ;; Keywords: faces diff --git a/lisp/hippie-exp.el b/lisp/hippie-exp.el index 2533587bcc5..75bc1f9743c 100644 --- a/lisp/hippie-exp.el +++ b/lisp/hippie-exp.el @@ -1,7 +1,6 @@ ;;; hippie-exp.el --- expand text trying various ways to find its expansion -;; Copyright (C) 1992, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1992, 2001-2011 Free Software Foundation, Inc. ;; Author: Anders Holst <aho@sans.kth.se> ;; Last change: 3 March 1998 diff --git a/lisp/hl-line.el b/lisp/hl-line.el index 9a791076002..55704dccb33 100644 --- a/lisp/hl-line.el +++ b/lisp/hl-line.el @@ -1,7 +1,6 @@ ;;; hl-line.el --- highlight the current line -;; Copyright (C) 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998, 2000-2011 Free Software Foundation, Inc. ;; Author: Dave Love <fx@gnu.org> ;; Maintainer: FSF @@ -219,5 +218,4 @@ the line including the point by OVERLAY." (provide 'hl-line) -;; arch-tag: ac806940-0876-4959-8c89-947563ee2833 ;;; hl-line.el ends here diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el index 0a4bec2248f..0b02daf6969 100644 --- a/lisp/htmlfontify.el +++ b/lisp/htmlfontify.el @@ -1,7 +1,6 @@ ;;; htmlfontify.el --- htmlise a buffer/source tree with optional hyperlinks -;; Copyright (C) 2002, 2003, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2002-2003, 2009-2011 Free Software Foundation, Inc. ;; Emacs Lisp Archive Entry ;; Package: htmlfontify @@ -109,13 +108,13 @@ `htmlfontify-load-rgb-file' `htmlfontify-unload-rgb-file'\n In order to:\n -fontify a file you have open: M-x htmlfontify-buffer -prepare the etags map for a directory: M-x htmlfontify-run-etags -copy a directory, fontifying as you go: M-x htmlfontify-copy-and-link-dir\n +fontify a file you have open: \\[htmlfontify-buffer] +prepare the etags map for a directory: \\[htmlfontify-run-etags] +copy a directory, fontifying as you go: \\[htmlfontify-copy-and-link-dir]\n The following might be useful when running non-windowed or in batch mode: \(note that they shouldn't be necessary - we have a built in map)\n -load an X11 style rgb.txt file: M-x htmlfontify-load-rgb-file -unload the current rgb.txt file: M-x htmlfontify-unload-rgb-file\n +load an X11 style rgb.txt file: \\[htmlfontify-load-rgb-file] +unload the current rgb.txt file: \\[htmlfontify-unload-rgb-file]\n And here's a programmatic example:\n \(defun rtfm-build-page-header (file style) (format \"#define TEMPLATE red+black.html @@ -151,10 +150,12 @@ main-content <=MAIN_CONTENT;\\n\" rtfm-section file style rtfm-section file)) :prefix "hfy-") (defcustom hfy-page-header 'hfy-default-header - "Function called with two arguments (the filename relative to the top + "Function called to build the header of the html source. +This is called with two arguments (the filename relative to the top level source directory being etag'd and fontified), and a string containing -the <style>...</style> text to embed in the document- the string returned will -be used as the header for the htmlfontified version of the source file.\n +the <style>...</style> text to embed in the document. +It should return the string returned will be used as the header for the +htmlfontified version of the source file.\n See also `hfy-page-footer'." :group 'htmlfontify ;; FIXME: Why place such a :tag everywhere? Isn't it imposing your @@ -163,16 +164,17 @@ See also `hfy-page-footer'." :type '(function)) (defcustom hfy-split-index nil - "Whether or not to split the index `hfy-index-file' alphabetically -on the first letter of each tag. Useful when the index would otherwise + "Whether or not to split the index `hfy-index-file' alphabetically. +If non-nil, the index is split on the first letter of each tag. +Useful when the index would otherwise be large and take a long time to render or be difficult to navigate." :group 'htmlfontify :tag "split-index" :type '(boolean)) (defcustom hfy-page-footer 'hfy-default-footer - "As `hfy-page-header', but generates the output footer -\(and takes only one argument, the filename)." + "As `hfy-page-header', but generates the output footer. +It takes only one argument, the filename." :group 'htmlfontify :tag "page-footer" :type '(function)) @@ -205,7 +207,8 @@ code using this should fall back to `hfy-extn'." :type '(choice string (const nil))) (defcustom hfy-link-style-fun 'hfy-link-style-string - "Set this to a function, which will be called with one argument + "Function to customize the appearance of hyperlinks. +Set this to a function, which will be called with one argument \(a \"{ foo: bar; ...}\" CSS style-string) - it should return a copy of its argument, altered so as to make any changes you want made for text which is a hyperlink, in addition to being in the class to which that style would @@ -228,7 +231,7 @@ fontification-and-hyperlinking." :tag "instance-file" :type '(string)) -(defcustom hfy-html-quote-regex "\\(<\\|\"\\|&\\|>\\)" +(defcustom hfy-html-quote-regex "\\([<\"&>]\\)" "Regex to match (with a single back-reference per match) strings in HTML which should be quoted with `hfy-html-quote' (and `hfy-html-quote-map') to make them safe." @@ -556,7 +559,8 @@ therefore no longer care about) will be invalid at any time.\n (while sa (setq elt (car sa) sa (cdr sa)) - (if (memq elt set-b) (setq interq (cons elt interq)))) interq)) + (if (memq elt set-b) (setq interq (cons elt interq)))) + interq)) (defun hfy-colour-vals (colour) "Where COLOUR is a color name or #XXXXXX style triplet, return a @@ -587,7 +591,8 @@ in a windowing system - try to trick it..." (setq cperl-syntaxify-by-font-lock t))) (setq hfy-cperl-mode-kludged-p t))) ) -(defun hfy-opt (symbol) "Is option SYMBOL set." (memq symbol hfy-optimisations)) +(defun hfy-opt (symbol) "Is option SYMBOL set." + (memq symbol hfy-optimisations)) (defun hfy-default-header (file style) "Default value for `hfy-page-header'. @@ -718,7 +723,8 @@ of the variable `hfy-src-doc-link-style', removing text matching the regex (concat (replace-match hfy-src-doc-link-style 'fixed-case 'literal - style-string) " }") style-string)) + style-string) " }") + style-string)) ;; utility functions - cast emacs style specification values into their ;; css2 equivalents: @@ -836,11 +842,11 @@ VAL is ignored here." "Return a `defface' style alist of possible specifications for FACE. Entries resulting from customization (`custom-set-faces') will take precedence." - (let ((spec nil)) - (setq spec (append (or (get face 'saved-face) (list)) - (or (get face 'face-defface-spec) (list)))) - (if (and hfy-display-class hfy-default-face-def (eq face 'default)) - (setq spec (append hfy-default-face-def spec))) spec)) + (append + (if (and hfy-display-class hfy-default-face-def (eq face 'default)) + hfy-default-face-def) + (get face 'saved-face) + (get face 'face-defface-spec))) (defun hfy-face-attr-for-class (face &optional class) "Return the face attributes for FACE. @@ -1046,10 +1052,9 @@ haven't encountered them yet. Returns a `hfy-style-assoc'." and return a `hfy-style-assoc'.\n See also `hfy-face-to-style-i', `hfy-flatten-style'." ;;(message "hfy-face-to-style");;DBUG - (let ((face-def (hfy-face-resolve-face fn)) - (final-style nil)) - - (setq final-style (hfy-flatten-style (hfy-face-to-style-i face-def))) + (let* ((face-def (hfy-face-resolve-face fn)) + (final-style + (hfy-flatten-style (hfy-face-to-style-i face-def)))) ;;(message "%S" final-style) (if (not (assoc "text-decoration" final-style)) (progn (setq final-style @@ -1091,8 +1096,9 @@ See also `hfy-face-to-style-i', `hfy-flatten-style'." (string-match "^[Ii]nfo-\\(.*\\)" face-name)) (progn (setq face-name (match-string 1 face-name)) - (if (string-match "\\(.*\\)-face$" face-name) - (setq face-name (match-string 1 face-name))) face-name) + (if (string-match "\\(.*\\)-face\\'" face-name) + (setq face-name (match-string 1 face-name))) + face-name) face-name)) ) ;; construct an assoc of (stripped-name . "{ css-stuff-here }") pairs @@ -1102,91 +1108,45 @@ See also `hfy-face-to-style-i', `hfy-flatten-style'." and return a CSS style specification.\n See also `hfy-face-to-style'." ;;(message "hfy-face-to-css");;DBUG - (let ((css-list nil) - (css-text nil) - (seen nil)) - ;;(message "(hfy-face-to-style %S)" fn) - (setq css-list (hfy-face-to-style fn)) - (setq css-text + (let* ((css-list (hfy-face-to-style fn)) + (seen nil) + (css-text (mapcar (lambda (E) (if (car E) (unless (member (car E) seen) (push (car E) seen) (format " %s: %s; " (car E) (cdr E))))) - css-list)) + css-list))) (cons (hfy-css-name fn) (format "{%s}" (apply 'concat css-text)))) ) -;; extract a face from a list of char properties, if there is one: -(defun hfy-p-to-face (props) - "Given PROPS, a list of text properties, return the value of the face -property, or nil." - (if props - (if (string= (car props) "face") - (let ((propval (cadr props))) - (if (and (listp propval) (not (cdr propval))) - (car propval) - propval)) - (hfy-p-to-face (cddr props))) - nil)) - -(defun hfy-p-to-face-lennart (props) - "Given PROPS, a list of text properties, return the value of the face -property, or nil." - (when props - (let ((face (plist-get props 'face)) - (font-lock-face (plist-get props 'font-lock-face)) - (button (plist-get props 'button)) - ;;(face-rec (memq 'face props)) - ;;(button-rec (memq 'button props))) - ) - (if button - (let* ((category (plist-get props 'category)) - (face (when category (plist-get (symbol-plist category) 'face)))) - face) - (or font-lock-face - face))))) - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (defun hfy-get-face-at (pos) -;; ;; (let ((face (get-char-property-and-overlay pos 'face))) -;; ;; (when (and face (listp face)) (setq face (car face))) -;; ;; (unless (listp face) -;; ;; face))) -;; ;;(get-char-property pos 'face) -;; ;; Overlays are handled later -;; (if (or (not show-trailing-whitespace) -;; (not (get-text-property pos 'hfy-show-trailing-whitespace))) -;; (get-text-property pos 'face) -;; (list 'trailing-whitespace (get-text-property pos 'face))) -;; ) - -(defun hfy-prop-invisible-p (prop) - "Is text property PROP an active invisibility property?" - (or (and (eq buffer-invisibility-spec t) prop) - (or (memq prop buffer-invisibility-spec) - (assq prop buffer-invisibility-spec)))) +(defalias 'hfy-prop-invisible-p + (if (fboundp 'invisible-p) #'invisible-p + (lambda (prop) + "Is text property PROP an active invisibility property?" + (or (and (eq buffer-invisibility-spec t) prop) + (or (memq prop buffer-invisibility-spec) + (assq prop buffer-invisibility-spec)))))) (defun hfy-find-invisible-ranges () "Return a list of (start-point . end-point) cons cells of invisible regions." - (let (invisible p i e s) ;; return-value pos invisible end start - (save-excursion + (save-excursion + (let (invisible p i s) ;; return-value pos invisible end start (setq p (goto-char (point-min))) (when (invisible-p p) (setq s p i t)) (while (< p (point-max)) (if i ;; currently invisible (when (not (invisible-p p)) ;; but became visible - (setq e p - i nil - invisible (cons (cons s e) invisible))) + (setq i nil + invisible (cons (cons s p) invisible))) ;; currently visible: (when (invisible-p p) ;; but have become invisible (setq s p i t))) (setq p (next-char-property-change p))) ;; still invisible at buffer end? (when i - (setq e (point-max) - invisible (cons (cons s e) invisible))) ) invisible)) + (setq invisible (cons (cons s (point-max)) invisible))) + invisible))) (defun hfy-invisible-name (point map) "Generate a CSS style name for an invisible section of the buffer. @@ -1216,9 +1176,7 @@ return a `defface' style list of face properties instead of a face symbol." ;; not sure why we'd want to remove face-name? -- v (let ((overlay-data nil) (base-face nil) - ;; restored hfy-p-to-face as it handles faces like (bold) as - ;; well as face like 'bold - hfy-get-face-at doesn't dtrt -- v - (face-name (hfy-p-to-face (text-properties-at p))) + (face-name (get-text-property p 'face)) ;; (face-name (hfy-get-face-at p)) (prop-seen nil) (extra-props nil) @@ -1334,9 +1292,9 @@ return a `defface' style list of face properties instead of a face symbol." extra-props (cons p (cons v extra-props)))))))))) ;;(message "+ %d: %s; %S" p face-name extra-props) (if extra-props - (if (listp face-name) - (nconc extra-props face-name) - (nconc extra-props (face-attr-construct face-name))) + (nconc extra-props (if (listp face-name) + face-name + (face-attr-construct face-name))) face-name)) )) (defun hfy-overlay-props-at (p) @@ -1379,7 +1337,8 @@ variable `font-lock-mode' and variable `font-lock-fontified' for truth." (goto-char pt) (while (and (< pt (point-max)) (not face-name)) (setq face-name (hfy-face-at pt)) - (setq pt (next-char-property-change pt)))) face-name) + (setq pt (next-char-property-change pt)))) + face-name) font-lock-mode))) ;; remember, the map is in reverse point order: @@ -1442,12 +1401,13 @@ Returns a modified copy of FACE-MAP." ;; Fix-me: save table for multi-buffer "Compile and return a `hfy-facemap-assoc' for the current buffer." ;;(message "hfy-compile-face-map");;DBUG - (let ((pt (point-min)) - (pt-narrow 1) - (fn nil) - (map nil) - (prev-tag nil)) ;; t if the last tag-point was a span-start - ;; nil if it was a span-stop + (let* ((pt (point-min)) + (pt-narrow (save-restriction (widen) (point-min))) + (offset (- pt pt-narrow)) + (fn nil) + (map nil) + (prev-tag nil)) ;; t if the last tag-point was a span-start + ;; nil if it was a span-stop (save-excursion (goto-char pt) (while (< pt (point-max)) @@ -1458,7 +1418,7 @@ Returns a modified copy of FACE-MAP." (if prev-tag (push (cons pt-narrow 'end) map)) (setq prev-tag nil)) (setq pt (next-char-property-change pt)) - (setq pt-narrow (1+ (- pt (point-min))))) + (setq pt-narrow (+ offset pt))) (if (and map (not (eq 'end (cdar map)))) (push (cons (- (point-max) (point-min)) 'end) map))) (if (hfy-opt 'merge-adjacent-tags) (hfy-merge-adjacent-spans map) map))) @@ -1475,7 +1435,7 @@ Otherwise a plausible filename is constructed from `default-directory', (with-current-buffer buf (setq buffer-file-name (if src (concat src hfy-extn) - (expand-file-name (if (string-match "^.*/\\([^/]*\\)$" name) + (expand-file-name (if (string-match "^.*/\\([^/]*\\)\\'" name) (match-string 1 name) name)))) buf))) @@ -1493,23 +1453,22 @@ Uses `hfy-link-style-fun' to do this." (defun hfy-sprintf-stylesheet (css file) "Return the inline CSS style sheet for FILE as a string." - (let ((stylesheet nil)) - (setq stylesheet - (concat - hfy-meta-tags - "\n<style type=\"text/css\"><!-- \n" - ;; Fix-me: Add handling of page breaks here + scan for ^L - ;; where appropriate. - (format "body %s\n" (cddr (assq 'default css))) - (apply 'concat - (mapcar - (lambda (style) - (format - "span.%s %s\nspan.%s a %s\n" - (cadr style) (cddr style) - (cadr style) (hfy-link-style (cddr style)))) - css)) - " --></style>\n")) + (let ((stylesheet + (concat + hfy-meta-tags + "\n<style type=\"text/css\"><!-- \n" + ;; Fix-me: Add handling of page breaks here + scan for ^L + ;; where appropriate. + (format "body %s\n" (cddr (assq 'default css))) + (apply 'concat + (mapcar + (lambda (style) + (format + "span.%s %s\nspan.%s a %s\n" + (cadr style) (cddr style) + (cadr style) (hfy-link-style (cddr style)))) + css)) + " --></style>\n"))) (funcall hfy-page-header file stylesheet))) ;; tag all the dangerous characters we want to escape @@ -1699,33 +1658,32 @@ FILE, if set, is the file name." ;; (message "checking to see whether we should link...") (if (and srcdir file) (let ((lp 'hfy-link) - (pt nil) + (pt (point-min)) (pr nil) (rr nil)) ;; (message " yes we should.") - ;; translate 'hfy-anchor properties to anchors - (setq pt (point-min)) - (while (setq pt (next-single-property-change pt 'hfy-anchor)) - (if (setq pr (get-text-property pt 'hfy-anchor)) - (progn (goto-char pt) - (remove-text-properties pt (1+ pt) '(hfy-anchor nil)) - (insert (concat "<a name=\"" pr "\"></a>"))))) - ;; translate alternate 'hfy-link and 'hfy-endl props to opening - ;; and closing links. (this should avoid those spurious closes - ;; we sometimes get by generating only paired tags) - (setq pt (point-min)) - (while (setq pt (next-single-property-change pt lp)) - (if (not (setq pr (get-text-property pt lp))) nil - (goto-char pt) - (remove-text-properties pt (1+ pt) (list lp nil)) - (case lp - (hfy-link - (if (setq rr (get-text-property pt 'hfy-inst)) - (insert (format "<a name=\"%s\"></a>" rr))) - (insert (format "<a href=\"%s\">" pr)) - (setq lp 'hfy-endl)) - (hfy-endl - (insert "</a>") (setq lp 'hfy-link)) ))) )) + ;; translate 'hfy-anchor properties to anchors + (while (setq pt (next-single-property-change pt 'hfy-anchor)) + (if (setq pr (get-text-property pt 'hfy-anchor)) + (progn (goto-char pt) + (remove-text-properties pt (1+ pt) '(hfy-anchor nil)) + (insert (concat "<a name=\"" pr "\"></a>"))))) + ;; translate alternate 'hfy-link and 'hfy-endl props to opening + ;; and closing links. (this should avoid those spurious closes + ;; we sometimes get by generating only paired tags) + (setq pt (point-min)) + (while (setq pt (next-single-property-change pt lp)) + (if (not (setq pr (get-text-property pt lp))) nil + (goto-char pt) + (remove-text-properties pt (1+ pt) (list lp nil)) + (case lp + (hfy-link + (if (setq rr (get-text-property pt 'hfy-inst)) + (insert (format "<a name=\"%s\"></a>" rr))) + (insert (format "<a href=\"%s\">" pr)) + (setq lp 'hfy-endl)) + (hfy-endl + (insert "</a>") (setq lp 'hfy-link)) ))) )) ;; ##################################################################### ;; transform the dangerous chars. This changes character positions @@ -1791,7 +1749,7 @@ hyperlinks as appropriate." ;; pick up the file name in case we didn't receive it (if (not file) (progn (setq file (or (buffer-file-name) (buffer-name))) - (if (string-match "/\\([^/]*\\)$" file) + (if (string-match "/\\([^/]*\\)\\'" file) (setq file (match-string 1 file)))) ) (if (not (hfy-opt 'skip-refontification)) @@ -1834,7 +1792,7 @@ Hardly bombproof, but good enough in the context in which it is being used." "Is SRCDIR/FILE text? Uses `hfy-istext-command' to determine this." (let* ((cmd (format hfy-istext-command (expand-file-name file srcdir))) (rsp (shell-command-to-string cmd))) - (if (string-match "text" rsp) t nil))) + (string-match "text" rsp))) ;; open a file, check fontification, if fontified, write a fontified copy ;; to the destination directory, otherwise just copy the file: @@ -1867,18 +1825,17 @@ adding an extension of `hfy-extn'. Fontification is actually done by (kill-buffer source)) )) ;; list of tags in file in srcdir -(defun hfy-tags-for-file (srcdir file) +(defun hfy-tags-for-file (cache-hash file) "List of etags tags that have definitions in this FILE. -Looks up the tags cache in `hfy-tags-cache' using SRCDIR as the key." +CACHE-HASH is the tags cache." ;;(message "hfy-tags-for-file");;DBUG - (let ((cache-entry (assoc srcdir hfy-tags-cache)) - (cache-hash nil) - (tag-list nil)) - (if (setq cache-hash (cadr cache-entry)) + (let* ((tag-list nil)) + (if cache-hash (maphash (lambda (K V) (if (assoc file V) - (setq tag-list (cons K tag-list)))) cache-hash)) + (setq tag-list (cons K tag-list)))) + cache-hash)) tag-list)) ;; mark the tags native to this file for anchors @@ -1886,9 +1843,9 @@ Looks up the tags cache in `hfy-tags-cache' using SRCDIR as the key." "Mark tags in FILE (lookup SRCDIR in `hfy-tags-cache') with the `hfy-anchor' property, with a value of \"tag.line-number\"." ;;(message "(hfy-mark-tag-names %s %s)" srcdir file);;DBUG - (let ((cache-entry (assoc srcdir hfy-tags-cache)) - (cache-hash nil)) - (if (setq cache-hash (cadr cache-entry)) + (let* ((cache-entry (assoc srcdir hfy-tags-cache)) + (cache-hash (cadr cache-entry))) + (if cache-hash (mapcar (lambda (TAG) (mapcar @@ -1901,7 +1858,7 @@ property, with a value of \"tag.line-number\"." (+ 2 chr) 'hfy-anchor link)))) (gethash TAG cache-hash))) - (hfy-tags-for-file srcdir file))))) + (hfy-tags-for-file cache-hash file))))) (defun hfy-relstub (file &optional start) "Return a \"../\" stub of the appropriate length for the current source @@ -1910,7 +1867,8 @@ START is the offset at which to start looking for the / character in FILE." ;;(message "hfy-relstub");;DBUG (let ((c "")) (while (setq start (string-match "/" file start)) - (setq start (1+ start)) (setq c (concat c "../"))) c)) + (setq start (1+ start)) (setq c (concat c "../"))) + c)) (defun hfy-href-stub (this-file def-files tag) "Return an href stub for a tag href in THIS-FILE. @@ -2184,7 +2142,9 @@ SRCDIR and DSTDIR are the source and output directories respectively." dstdir hfy-index-file stub) - index-list)) ))) cache-hash) ) index-list))) + index-list)) ))) + cache-hash) ) + index-list))) (defun hfy-prepare-tag-map (srcdir dstdir) "Prepare the counterpart(s) to the index buffer(s) - a list of buffers @@ -2216,7 +2176,9 @@ See also `hfy-prepare-index', `hfy-split-index'." hfy-instance-file stub hfy-tags-rmap) - index-list)) ))) cache-hash) ) index-list))) + index-list)) ))) + cache-hash) ) + index-list))) (defun hfy-subtract-maps (srcdir) "Internal function - strips definitions of tags from the instance map. @@ -2243,8 +2205,7 @@ See also `hfy-tags-cache', `hfy-tags-rmap'." "Load the etags cache for SRCDIR. See also `hfy-load-tags-cache'." (interactive "D source directory: ") - (setq srcdir (directory-file-name srcdir)) - (hfy-load-tags-cache srcdir)) + (hfy-load-tags-cache (directory-file-name srcdir))) ;;(defun hfy-test-read-args (foo bar) ;; (interactive "D source directory: \nD target directory: ") @@ -2297,7 +2258,7 @@ You may also want to set `hfy-page-header' and `hfy-page-footer'." ;; (defalias 'hfy-set-hooks 'custom-set-variables) ;; (defun hfy-pp-hook (H) -;; (and (string-match "-hook$" (symbol-name H)) +;; (and (string-match "-hook\\'" (symbol-name H)) ;; (boundp H) ;; (symbol-value H) ;; (insert (format "\n '(%S %S)" H (symbol-value H))) @@ -2350,7 +2311,7 @@ You may also want to set `hfy-page-header' and `hfy-page-footer'." ;;;### (autoloads (hfy-fallback-colour-values htmlfontify-load-rgb-file) -;;;;;; "hfy-cmap" "hfy-cmap.el" "7e622e4b131ea5efbe9d258f719822d6") +;;;;;; "hfy-cmap" "hfy-cmap.el" "8dce008297f15826cc6ab82203c46fa6") ;;; Generated autoloads from hfy-cmap.el (autoload 'htmlfontify-load-rgb-file "hfy-cmap" "\ diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el index 33cb9a80bab..55375f1e066 100644 --- a/lisp/ibuf-ext.el +++ b/lisp/ibuf-ext.el @@ -1,7 +1,6 @@ ;;; ibuf-ext.el --- extensions for ibuffer -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; Author: Colin Walters <walters@verbum.org> ;; Maintainer: John Paul Wallington <jpw@gnu.org> diff --git a/lisp/ibuf-macs.el b/lisp/ibuf-macs.el index 684cfe8f51b..9965e0ccfb2 100644 --- a/lisp/ibuf-macs.el +++ b/lisp/ibuf-macs.el @@ -1,7 +1,6 @@ ;;; ibuf-macs.el --- macros for ibuffer -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; Author: Colin Walters <walters@verbum.org> ;; Maintainer: John Paul Wallington <jpw@gnu.org> @@ -301,5 +300,4 @@ bound to the current value of the filter. (provide 'ibuf-macs) -;; arch-tag: 2748edce-82c9-4cd9-9d9d-bd73e43c20c5 ;;; ibuf-macs.el ends here diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 2dab58fb365..3e5b301cbfb 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -1,7 +1,6 @@ ;;; ibuffer.el --- operate on buffers like dired -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; Author: Colin Walters <walters@verbum.org> ;; Maintainer: John Paul Wallington <jpw@gnu.org> @@ -2639,7 +2638,7 @@ will be inserted before the group at point." ;;;;;; ibuffer-backward-filter-group ibuffer-forward-filter-group ;;;;;; ibuffer-toggle-filter-group ibuffer-mouse-toggle-filter-group ;;;;;; ibuffer-interactive-filter-by-mode ibuffer-mouse-filter-by-mode -;;;;;; ibuffer-auto-mode) "ibuf-ext" "ibuf-ext.el" "3840d79a044995c846fe8bbaa9565a2b") +;;;;;; ibuffer-auto-mode) "ibuf-ext" "ibuf-ext.el" "f163e17664a89a6f0aa2b15bfaaa65a4") ;;; Generated autoloads from ibuf-ext.el (autoload 'ibuffer-auto-mode "ibuf-ext" "\ @@ -3015,5 +3014,4 @@ defaults to one. ;; coding: iso-8859-1 ;; End: -;; arch-tag: 72581688-0603-4954-b8cf-837c700f62e8 ;;; ibuffer.el ends here diff --git a/lisp/icomplete.el b/lisp/icomplete.el index 645981539d4..490b2b2ebfc 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el @@ -1,7 +1,7 @@ ;;; icomplete.el --- minibuffer completion incremental feedback -;; Copyright (C) 1992, 1993, 1994, 1997, 1999, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1992-1994, 1997, 1999, 2001-2011 +;; Free Software Foundation, Inc. ;; Author: Ken Manheimer <klm@i.am> ;; Maintainer: Ken Manheimer <klm@i.am> @@ -376,5 +376,4 @@ are exhibited within the square braces.)" ;;allout-layout: (-2 :) ;;End: -;; arch-tag: 339ec25a-0741-4eb6-be63-997532e89b0f ;;; icomplete.el ends here diff --git a/lisp/ido.el b/lisp/ido.el index 2df9b8666af..d1f2cea83f8 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -1,7 +1,6 @@ ;;; ido.el --- interactively do things with buffers and files. -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-2011 Free Software Foundation, Inc. ;; Author: Kim F. Storm <storm@cua.dk> ;; Based on: iswitchb by Stephen Eglen <stephen@cns.ed.ac.uk> @@ -1289,8 +1288,6 @@ Only used if `ido-use-virtual-buffers' is non-nil.") (defun ido-may-cache-directory (&optional dir) (setq dir (or dir ido-current-directory)) (cond - ((ido-directory-too-big-p dir) - nil) ((and (ido-is-root-directory dir) (or ido-enable-tramp-completion (memq system-type '(windows-nt ms-dos)))) @@ -1299,6 +1296,8 @@ Only used if `ido-use-virtual-buffers' is non-nil.") (ido-cache-unc-valid)) ((ido-is-ftp-directory dir) (ido-cache-ftp-valid)) + ((ido-directory-too-big-p dir) + nil) (t t))) (defun ido-pp (list &optional sep) @@ -1467,6 +1466,11 @@ Removes badly formatted data and ignored directories." ;; ido kill emacs hook (ido-save-history)) +(defun ido-common-initialization () + (ido-init-completion-maps) + (add-hook 'minibuffer-setup-hook 'ido-minibuffer-setup) + (add-hook 'choose-completion-string-functions 'ido-choose-completion-string)) + (define-minor-mode ido-everywhere "Toggle using ido speed-ups everywhere file and directory names are read. With ARG, turn ido speed-up on if arg is positive, off otherwise." @@ -1510,12 +1514,9 @@ This function also adds a hook to the minibuffer." (t nil))) (ido-everywhere (if ido-everywhere 1 -1)) - (when ido-mode - (ido-init-completion-maps)) (when ido-mode - (add-hook 'minibuffer-setup-hook 'ido-minibuffer-setup) - (add-hook 'choose-completion-string-functions 'ido-choose-completion-string) + (ido-common-initialization) (ido-load-history) (add-hook 'kill-emacs-hook 'ido-kill-emacs-hook) @@ -2428,7 +2429,7 @@ If cursor is not at the end of the user input, move to end of input." (ido-record-command 'write-file filename) (add-to-history 'file-name-history filename) (ido-record-work-directory) - (write-file filename)) + (write-file filename t)) ((eq method 'read-only) (ido-record-work-file filename) @@ -3070,8 +3071,8 @@ If repeated, insert text from buffer instead." (if ido-matches (let ((next (cadr ido-matches))) (setq ido-cur-list (ido-chop ido-cur-list next)) - (setq ido-rescan t) - (setq ido-rotate t)))) + (setq ido-matches (ido-chop ido-matches next)) + (setq ido-rescan nil)))) (defun ido-prev-match () "Put last element of `ido-matches' at the front of the list." @@ -3079,8 +3080,8 @@ If repeated, insert text from buffer instead." (if ido-matches (let ((prev (car (last ido-matches)))) (setq ido-cur-list (ido-chop ido-cur-list prev)) - (setq ido-rescan t) - (setq ido-rotate t)))) + (setq ido-matches (ido-chop ido-matches prev)) + (setq ido-rescan nil)))) (defun ido-next-match-dir () "Find next directory in match list. @@ -4759,6 +4760,8 @@ DEF, if non-nil, is the default value." (ido-directory-too-big nil) (ido-context-switch-command 'ignore) (ido-choice-list choices)) + ;; Initialize ido before invoking ido-read-internal + (ido-common-initialization) (ido-read-internal 'list prompt hist def require-match initial-input))) (defun ido-unload-function () @@ -4770,5 +4773,4 @@ DEF, if non-nil, is the default value." (provide 'ido) -;; arch-tag: b63a3500-1735-41bd-8a01-05373f0864da ;;; ido.el ends here diff --git a/lisp/ielm.el b/lisp/ielm.el index e1f8dc78d32..a1057303743 100644 --- a/lisp/ielm.el +++ b/lisp/ielm.el @@ -1,7 +1,6 @@ ;;; ielm.el --- interaction mode for Emacs Lisp -;; Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994, 2001-2011 Free Software Foundation, Inc. ;; Author: David Smith <maa036@lancaster.ac.uk> ;; Maintainer: FSF @@ -561,5 +560,4 @@ Switches to the buffer `*ielm*', or creates it if it does not exist." (provide 'ielm) -;; arch-tag: ef60e4c0-9c4f-4bdb-8402-271313329790 ;;; ielm.el ends here diff --git a/lisp/iimage.el b/lisp/iimage.el index ca300bf9fb2..61347c5024c 100644 --- a/lisp/iimage.el +++ b/lisp/iimage.el @@ -1,7 +1,6 @@ ;;; iimage.el --- Inline image minor mode. -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: KOSEKI Yoshinori <kose@meadowy.org> ;; Maintainer: KOSEKI Yoshinori <kose@meadowy.org> diff --git a/lisp/image-dired.el b/lisp/image-dired.el index a74ddd312d5..8c26b699568 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -1,6 +1,6 @@ ;;; image-dired.el --- use dired to browse and manipulate your images ;; -;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2005-2011 Free Software Foundation, Inc. ;; ;; Version: 0.4.11 ;; Keywords: multimedia @@ -187,19 +187,19 @@ that allows sharing of thumbnails across different programs." :group 'image-dired) (defcustom image-dired-db-file - (locate-user-emacs-file "image-dired/.image-dired_db") + (expand-file-name ".image-dired_db" image-dired-dir) "Database file where file names and their associated tags are stored." :type 'string :group 'image-dired) (defcustom image-dired-temp-image-file - (locate-user-emacs-file "image-dired/.image-dired_temp") + (expand-file-name ".image-dired_temp" image-dired-dir) "Name of temporary image file used by various commands." :type 'string :group 'image-dired) (defcustom image-dired-gallery-dir - (locate-user-emacs-file "image-dired/.image-dired_gallery") + (expand-file-name ".image-dired_gallery" image-dired-dir) "Directory to store generated gallery html pages. This path needs to be \"shared\" to the public so that it can access the index.html page that image-dired creates." @@ -344,7 +344,7 @@ original image file name and %t which is replaced by :group 'image-dired) (defcustom image-dired-temp-rotate-image-file - (locate-user-emacs-file "image-dired/.image-dired_rotate_temp") + (expand-file-name ".image-dired_rotate_temp" image-dired-dir) "Temporary file for rotate operations." :type 'string :group 'image-dired) @@ -2622,5 +2622,4 @@ tags to their respective image file. Internal function used by (provide 'image-dired) -;; arch-tag: 9d11411d-331f-4380-8b44-8adfe3a0343e ;;; image-dired.el ends here diff --git a/lisp/image-file.el b/lisp/image-file.el index 04420eb722a..bd1c101d529 100644 --- a/lisp/image-file.el +++ b/lisp/image-file.el @@ -1,7 +1,6 @@ ;;; image-file.el --- support for visiting image files ;; -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; ;; Author: Miles Bader <miles@gnu.org> ;; Keywords: multimedia @@ -202,5 +201,4 @@ Image files are those whose name has an extension in (provide 'image-file) -;; arch-tag: 04cafe36-f7ba-4c80-9f47-4cb656520ce1 ;;; image-file.el ends here diff --git a/lisp/image-mode.el b/lisp/image-mode.el index 5f43f390c2a..74fd96e8ade 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el @@ -1,6 +1,6 @@ ;;; image-mode.el --- support for visiting image files ;; -;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2005-2011 Free Software Foundation, Inc. ;; ;; Author: Richard Stallman <rms@gnu.org> ;; Keywords: multimedia @@ -118,13 +118,16 @@ A winprops object has the shape (WINDOW . ALIST)." (declare-function image-size "image.c" (spec &optional pixels frame)) (defun image-display-size (spec &optional pixels frame) - "Wrapper around `image-size', to handle slice display properties. -If SPEC is an image display property, call `image-size' with the -given arguments. -If SPEC is a list of properties containing `image' and `slice' -properties, calculate the display size from the slice property. -If SPEC contains `image' but not `slice', call `image-size' with -the specified image." + "Wrapper around `image-size', handling slice display properties. +Like `image-size', the return value is (WIDTH . HEIGHT). +WIDTH and HEIGHT are in canonical character units if PIXELS is +nil, and in pixel units if PIXELS is non-nil. + +If SPEC is an image display property, this function is equivalent +to `image-size'. If SPEC is a list of properties containing +`image' and `slice' properties, return the display size taking +the slice property into account. If the list contains `image' +but not `slice', return the `image-size' of the specified image." (if (eq (car spec) 'image) (image-size spec pixels frame) (let ((image (assoc 'image spec)) @@ -628,5 +631,4 @@ indicates a scaling factor. nil indicates scale to 100%. " (provide 'image-mode) -;; arch-tag: b5b2b7e6-26a7-4b79-96e3-1546b5c4c6cb ;;; image-mode.el ends here diff --git a/lisp/image.el b/lisp/image.el index f93fd03fba3..627d4c69e44 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -1,7 +1,6 @@ ;;; image.el --- image API -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: multimedia @@ -725,5 +724,4 @@ shall be displayed." (provide 'image) -;; arch-tag: 8e76a07b-eb48-4f3e-a7a0-1a7ba9f096b3 ;;; image.el ends here diff --git a/lisp/imenu.el b/lisp/imenu.el index cf055b38550..6be6b85af8a 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el @@ -1,7 +1,6 @@ ;;; imenu.el --- framework for mode-specific buffer indexes -;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994-1998, 2001-2011 Free Software Foundation, Inc. ;; Author: Ake Stenhoff <etxaksf@aom.ericsson.se> ;; Lars Lindberg <lli@sypro.cap.se> @@ -1066,5 +1065,4 @@ for more information." (provide 'imenu) -;; arch-tag: 98a2f5f5-4b91-4704-b18c-3aacf77d77a7 ;;; imenu.el ends here diff --git a/lisp/indent.el b/lisp/indent.el index e57d6068ef5..b9f008d46aa 100644 --- a/lisp/indent.el +++ b/lisp/indent.el @@ -1,7 +1,6 @@ ;;; indent.el --- indentation commands for Emacs -;; Copyright (C) 1985, 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1995, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Package: emacs @@ -595,5 +594,4 @@ Use \\[edit-tab-stops] to edit them interactively." (define-key ctl-x-map "\t" 'indent-rigidly) (define-key esc-map "i" 'tab-to-tab-stop) -;; arch-tag: f402b2a7-e44f-492f-b5b8-38996020b7c3 ;;; indent.el ends here diff --git a/lisp/info-look.el b/lisp/info-look.el index 5d696954fd8..6baed1c422d 100644 --- a/lisp/info-look.el +++ b/lisp/info-look.el @@ -1,8 +1,7 @@ ;;; info-look.el --- major-mode-sensitive Info index lookup facility ;; An older version of this was known as libc.el. -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995-1999, 2001-2011 Free Software Foundation, Inc. ;; Author: Ralph Schleicher <rs@nunatak.allgaeu.org> ;; (did not show signs of life (Nov 2001) -stef) @@ -999,5 +998,4 @@ Return nil if there is nothing appropriate in the buffer near point." (provide 'info-look) -;; arch-tag: 0f1e3ea3-32a2-4461-bbab-3cff93539a74 ;;; info-look.el ends here diff --git a/lisp/info-xref.el b/lisp/info-xref.el index 92e76345936..c56db2c94bb 100644 --- a/lisp/info-xref.el +++ b/lisp/info-xref.el @@ -1,10 +1,10 @@ ;;; info-xref.el --- check external references in an Info document -;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2003-2011 Free Software Foundation, Inc. ;; Author: Kevin Ryde <user42@zip.com.au> ;; Keywords: docs +;; Version: 3 ;; This file is part of GNU Emacs. @@ -23,56 +23,259 @@ ;;; Commentary: -;; This file implements some simple checking of external cross references in -;; info files, by attempting to visit the nodes specified. +;; This is some simple checking of external cross references in info files, +;; docstrings and custom-links by attempting to visit the nodes specified. ;; -;; "makeinfo" checks references internal to a document, but not external -;; references, which makes it rather easy for mistakes to creep in or node -;; name changes to go unnoticed. `Info-validate' doesn't check external -;; references either. +;; `M-x info-xref-check' checks a single info file. See the docstring for +;; details. ;; -;; `M-x info-xref-check' checks one file. When invoked from an Info-mode or -;; texinfo-mode buffer, the current info file is the default at the prompt. +;; `M-x info-xref-check-all' checks all info files in Info-directory-list. +;; This is a good way to check the consistency of the whole system. ;; -;; `M-x info-xref-check-all' looks at everything in the normal info path. -;; This might be a lot of files but it's a good way to check the consistency -;; of the whole system. +;; `M-x info-xref-check-all-custom' loads up all defcustom variables and +;; checks any info references in them. ;; -;; Results are shown in a buffer. The format is a bit rough, but hopefully -;; there won't be too many problems normally, and correcting them is a -;; manual process anyway, a case of finding the right spot in the original -;; .texi and finding what node it ought to point to. -;; -;; When a target info file doesn't exist there's clearly no way to validate -;; node references within it. A message is given for missing target files -;; (once per source document), it could be simply that the target hasn't -;; been installed, or it could be a mistake in the reference. -;; -;; Indirect info files are understood, just pass the top-level foo.info to -;; `info-xref-check' and it traverses all sub-files. Compressed info files -;; are accepted too, as usual for `Info-mode'. -;; -;; `info-xref-check-all' is rather permissive in what it considers an info -;; file. It has to be since info files don't necessarily have a ".info" -;; suffix (eg. this is usual for the emacs manuals). One consequence of -;; this is that if for instance there's a source code directory in -;; `Info-directory-list' then a lot of extraneous files might be read, which -;; will be time consuming but should be harmless. -;; -;; `M-x info-xref-check-all-custom' is a related command, it goes through -;; all info document references in customizable variables, checking them -;; like info file cross references. +;; `M-x info-xref-docstrings' checks docstring "Info node ..." hyperlinks in +;; source files (and other files). + +;;; History: + +;; Version 3 - new M-x info-xref-docstrings, use compilation-mode ;;; Code: (require 'info) +(eval-when-compile + (require 'cl)) ;; for `incf' + +;;----------------------------------------------------------------------------- +;; vaguely generic + +(defun info-xref-lock-file-p (filename) + "Return non-nil if FILENAME is an Emacs lock file. +A lock file is \".#foo.txt\" etc per `lock-buffer'." + (string-match "\\(\\`\\|\\/\\)\\.#" filename)) + +(defun info-xref-subfile-p (filename) + "Return t if FILENAME is an info subfile. +If removing the last \"-<NUM>\" from the filename gives a file +which exists, then consider FILENAME a subfile. This is an +imperfect test, probably ought to open up the purported top file +and see what subfiles it says." + (and (string-match "\\`\\(\\([^-]*-\\)*[^-]*\\)-[0-9]+\\(.*\\)\\'" filename) + (file-exists-p (concat (match-string 1 filename) + (match-string 3 filename))))) + +(defmacro info-xref-with-file (filename &rest body) + ;; checkdoc-params: (filename body) + "Evaluate BODY in a buffer containing the contents of FILENAME. +If FILENAME is already in a buffer then that's used, otherwise a +temporary buffer. + +The current implementation uses `insert-file-contents' rather +than `find-file-noselect' so as not to be held up by queries +about local variables or possible weirdness in a major mode. +`lm-with-file' does a similar thing, but it sets +`emacs-lisp-mode' which is not wanted here." + + (declare (debug t) (indent 1)) + `(let* ((info-xref-with-file--filename ,filename) + (info-xref-with-file--body (lambda () ,@body)) + (info-xref-with-file--existing + (find-buffer-visiting info-xref-with-file--filename))) + (if info-xref-with-file--existing + (with-current-buffer info-xref-with-file--existing + (save-excursion + (funcall info-xref-with-file--body))) + (with-temp-buffer + (insert-file-contents ,filename) + (funcall info-xref-with-file--body))))) + + +;;----------------------------------------------------------------------------- +;; output buffer -(defconst info-xref-results-buffer "*info-xref results*" +(defconst info-xref-output-buffer "*info-xref results*" "Name of the buffer for info-xref results.") +(defvar info-xref-good 0 + "Count of good cross references, during info-xref processing.") +(defvar info-xref-bad 0 + "Count of bad cross references, during info-xref processing.") +(defvar info-xref-unavail 0 + "Count of unavailable cross references, during info-xref processing.") + +(defvar info-xref-output-heading "" + "A heading string, during info-xref processing. +This is shown if there's an error, but not if successful.") + +(defvar info-xref-filename nil + "The current buffer's filename, during info-xref processing. +When looking at file contents in a temp buffer there's no +`buffer-file-name', hence this variable.") + +(defvar info-xref-xfile-alist nil + "Info files found or not found, during info-xref processing. +Key is \"(foo)\" etc and value nil or t according to whether info +manual \"(foo)\" exists or not. This is used to suppress +duplicate messages about foo not being available. (Duplicates +within one top-level file that is.)") + +(defvar info-xref-in-progress nil) +(defmacro info-xref-with-output (&rest body) + "Run BODY with an info-xref output buffer. +This is meant to nest, so you can wrap it around a set of +different info-xref checks and have them write to the one output +buffer created by the outermost `info-xref-with-output', with an +overall good/bad count summary inserted at the very end." + + (declare (debug t)) + `(save-excursion + (unless info-xref-in-progress + (display-buffer (get-buffer-create info-xref-output-buffer)) + (set-buffer info-xref-output-buffer) + (setq buffer-read-only nil) + (fundamental-mode) + (erase-buffer) + (insert ";; info-xref output -*- mode: compilation -*-\n\n") + (compilation-mode) + (setq info-xref-good 0 + info-xref-bad 0 + info-xref-unavail 0 + info-xref-xfile-alist nil)) + + (let ((info-xref-in-progress t) + (info-xref-output-heading "")) + ,@body) + + (unless info-xref-in-progress + (info-xref-output "done, %d good, %d bad, %d unavailable" + info-xref-good info-xref-bad info-xref-unavail)))) + +(defun info-xref-output (fmt &rest args) + "Emit a `format'-ed message FMT+ARGS to the `info-xref-output-buffer'." + (with-current-buffer info-xref-output-buffer + (save-excursion + (goto-char (point-max)) + (let ((inhibit-read-only t)) + (insert info-xref-output-heading + (apply 'format fmt args) + "\n"))) + (setq info-xref-output-heading "") + ;; all this info-xref can be pretty slow, display now so the user sees + ;; some progress + (sit-for 0))) +(put 'info-xref-output 'byte-compile-format-like t) + +(defun info-xref-output-error (fmt &rest args) + "Emit a `format'-ed error FMT+ARGS to the `info-xref-output-buffer'. +The error is attributed to `info-xref-filename' and the current +buffer's line and column of point." + (apply 'info-xref-output + (concat "%s:%s:%s: " fmt) + info-xref-filename + (1+ (count-lines (point-min) (line-beginning-position))) + (1+ (current-column)) + args)) +(put 'info-xref-output-error 'byte-compile-format-like t) + + +;;----------------------------------------------------------------------------- +;; node checking + +;; When asking Info-goto-node to fork, *info* needs to be the current +;; buffer, otherwise it seems to clone the current buffer but then do the +;; goto-node in plain *info*. +;; +;; We only fork if *info* already exists, if it doesn't then can create and +;; destroy just that instead of a new name. +;; +;; If Info-goto-node can't find the file, then no new buffer is created. If +;; it finds the file but not the node, then a buffer is created. Handle +;; this difference by checking before killing. +;; +(defun info-xref-goto-node-p (node) + "Return t if it's possible to go to the given NODE." + (let ((oldbuf (current-buffer))) + (save-excursion + (save-window-excursion + (prog1 + (condition-case err + (progn + (Info-goto-node node + (when (get-buffer "*info*") + (set-buffer "*info*") + "xref - temporary")) + t) + (error nil)) + (unless (equal (current-buffer) oldbuf) + (kill-buffer))))))) + +(defun info-xref-check-node (node) + + ;; Collapse spaces as per info.el and `help-make-xrefs'. + ;; Note defcustom :info-link nodes don't get this whitespace collapsing, + ;; they should be the exact node name ready to visit. + ;; `info-xref-check-all-custom' uses `info-xref-goto-node-p' and so + ;; doesn't come through here. + ;; + ;; Could use "[\t\n ]+" but try to avoid uselessly replacing " " with " ". + (setq node (replace-regexp-in-string "[\t\n][\t\n ]*\\| [\t\n ]+" " " + node t t)) + + (if (not (string-match "\\`([^)]*)" node)) + (info-xref-output-error "no `(file)' part at start of node: %s\n" node) + (let ((file (match-string 0 node))) + + (if (string-equal "()" file) + (info-xref-output-error "empty filename part: %s" node) + + ;; see if the file exists, if haven't looked before + (unless (assoc file info-xref-xfile-alist) + (let ((found (info-xref-goto-node-p file))) + (push (cons file found) info-xref-xfile-alist) + (unless found + (info-xref-output-error "not available to check: %s\n (this reported once per file)" file)))) + + ;; if the file exists, try the node + (cond ((not (cdr (assoc file info-xref-xfile-alist))) + (incf info-xref-unavail)) + ((info-xref-goto-node-p node) + (incf info-xref-good)) + (t + (incf info-xref-bad) + (info-xref-output-error "no such node: %s" node))))))) + + +;;----------------------------------------------------------------------------- + ;;;###autoload (defun info-xref-check (filename) - "Check external references in FILENAME, an info document." + "Check external references in FILENAME, an info document. +Interactively from an `Info-mode' or `texinfo-mode' buffer the +current info file is the default. + +Results are shown in a `compilation-mode' buffer. The format is +a bit rough, but there shouldn't be many problems normally. The +file:line:column: is the info document, but of course normally +any correction should be made in the original .texi file. +Finding the right place in the .texi is a manual process. + +When a target info file doesn't exist there's obviously no way to +validate node references within it. A message is given for +missing target files once per source document. It could be +simply that you don't have the target installed, or it could be a +mistake in the reference. + +Indirect info files are understood, just pass the top-level +foo.info to `info-xref-check' and it traverses all sub-files. +Compressed info files are accepted too as usual for `Info-mode'. + +\"makeinfo\" checks references internal to an info document, but +not external references, which makes it rather easy for mistakes +to creep in or node name changes to go unnoticed. +`Info-validate' doesn't check external references either." + (interactive (list (let* ((default-filename @@ -90,98 +293,80 @@ (format "Info file (%s): " default-filename) "Info file: "))) (read-file-name prompt nil default-filename t)))) + (info-xref-check-list (list filename))) ;;;###autoload (defun info-xref-check-all () - "Check external references in all info documents in the usual path. -The usual path is `Info-directory-list' and `Info-additional-directory-list'." + "Check external references in all info documents in the info path. +`Info-directory-list' and `Info-additional-directory-list' are +the info paths. See `info-xref-check' for how each file is +checked. + +The search for \"all\" info files is rather permissive, since +info files don't necessarily have a \".info\" extension and in +particular the Emacs manuals normally don't. If you have a +source code directory in `Info-directory-list' then a lot of +extraneous files might be read. This will be time consuming but +should be harmless." + (interactive) (info-xref-check-list (info-xref-all-info-files))) -;; An alternative to trying to get only top-level files here would be to -;; simply return all files, and have info-xref-check-list not follow -;; Indirect:. The current way seems a bit nicer though, because it gets the -;; proper top-level filename into the error messages, and suppresses -;; duplicate "not available" messages for all subfiles of a single document. +;; An alternative for geting only top-level files here would be to simply +;; return all files and have info-xref-check-list not follow "Indirect:". +;; The current way seems better because it (potentially) gets the proper +;; top-level filename into the error messages, and suppresses duplicate "not +;; available" messages for all subfiles of a single document. (defun info-xref-all-info-files () "Return a list of all available info files. -Only top-level files are returned, subfiles are excluded. +Only top level files are returned, subfiles are excluded. -Since info files don't have to have a .info suffix, all files in the -relevant directories are considered, which might mean a lot of extraneous -things are returned if for instance a source code directory is in the path." +Since info files don't have to have a .info suffix, all files in +the relevant directories are considered, which might mean a lot +of extraneous things if for instance a source code directory is +in the path." (info-initialize) ;; establish Info-directory-list (apply 'nconc (mapcar (lambda (dir) (let ((result nil)) - (dolist (name (directory-files dir t)) - (unless (or (file-directory-p name) (info-xref-subfile-p name)) + (dolist (name (directory-files + dir + t ;; absolute filenames + "\\`[^.]")) ;; not dotfiles, nor .# lockfiles + (when (and (file-exists-p name) ;; ignore broken symlinks + (not (string-match "\\.te?xi\\'" name)) ;; not .texi + (not (backup-file-name-p name)) + (not (file-directory-p name)) + (not (info-xref-subfile-p name))) (push name result))) (nreverse result))) (append Info-directory-list Info-additional-directory-list)))) -(defun info-xref-subfile-p (filename) - "Return t if FILENAME is an info subfile. -If removing the last \"-<NUM>\" from the filename gives a file that exists, -then consider FILENAME a subfile. This is an imperfect test, we probably -should open up the purported top file and see what subfiles it says." - (and (string-match "\\`\\(\\([^-]*-\\)*[^-]*\\)-[0-9]+\\(.*\\)\\'" filename) - (file-exists-p (concat (match-string 1 filename) - (match-string 3 filename))))) - - -;; Some dynamic variables are used to share information with sub-functions -;; below. -;; -;; info-xref-filename-header - a heading message for the current top-level -;; filename, or "" when it's been printed. -;; -(defvar info-xref-xfile-alist) -;; -;; info-xref-good - count of good cross references. -;; -(defvar info-xref-good) -;; -;; info-xref-bad - count of bad cross references. -;; -(defvar info-xref-bad) -;; -;; info-xref-xfile-alist - indexed by "(foo)" with value nil or t according -;; to whether "(foo)" exists or not. This is used to suppress duplicate -;; messages about foo not being available. (Duplicates within one -;; top-level file that is.) -;; -(defvar info-xref-filename-heading) - (defun info-xref-check-list (filename-list) "Check external references in info documents in FILENAME-LIST." - (pop-to-buffer info-xref-results-buffer t) - (erase-buffer) - (let ((info-xref-good 0) - (info-xref-bad 0)) + (info-xref-with-output (dolist (info-xref-filename filename-list) - (let ((info-xref-filename-heading - (format "In file %s:\n" info-xref-filename)) - (info-xref-xfile-alist nil)) + (setq info-xref-xfile-alist nil) + (let ((info-xref-output-heading + (format "Info file %s\n" info-xref-filename))) (with-temp-message (format "Looking at %s" info-xref-filename) (with-temp-buffer (info-insert-file-contents info-xref-filename) (goto-char (point-min)) - (if (re-search-forward "\^_\nIndirect:\n" nil t) + (if (search-forward "\^_\nIndirect:\n" nil t) (let ((dir (file-name-directory info-xref-filename))) (while (looking-at "\\(.*\\): [0-9]+\n") - (let ((subfile (match-string 1))) + (let ((info-xref-filename + (expand-file-name (match-string 1) dir))) (with-temp-buffer - (info-insert-file-contents - (expand-file-name subfile dir)) + (info-insert-file-contents info-xref-filename) (info-xref-check-buffer))) (forward-line))) - (info-xref-check-buffer)))))) - (insert (format "done, %d good, %d bad\n" info-xref-good info-xref-bad)))) + (info-xref-check-buffer)))))))) (defun info-xref-check-buffer () "Check external references in the info file in the current buffer. @@ -190,129 +375,155 @@ This should be the raw file contents, not `Info-mode'." (while (re-search-forward "\\*[Nn]ote[ \n\t]+[^:]*:[ \n\t]+\\(\\(([^)]*)\\)[^.,]+\\)[.,]" nil t) - (let* ((file (match-string 2)) - (node ;; Canonicalize spaces: we could use "[\t\n ]+" but - ;; we try to avoid uselessly replacing " " with " ". - (replace-regexp-in-string "[\t\n][\t\n ]*\\| [\t\n ]+" " " - (match-string 1) t t))) - (if (string-equal "()" file) - (info-xref-output "Empty filename part: %s\n" node) - ;; see if the file exists, if we haven't tried it before - (unless (assoc file info-xref-xfile-alist) - (let ((found (info-xref-goto-node-p file))) - (push (cons file found) info-xref-xfile-alist) - (unless found - (info-xref-output "Not available to check: %s\n" file)))) - ;; if the file exists, try the node - (when (cdr (assoc file info-xref-xfile-alist)) - (if (info-xref-goto-node-p node) - (setq info-xref-good (1+ info-xref-good)) - (setq info-xref-bad (1+ info-xref-bad)) - (info-xref-output "No such node: %s\n" node))))))) - -(defun info-xref-output (str &rest args) - "Emit a `format'-ed message STR+ARGS to the info-xref output buffer." - (with-current-buffer info-xref-results-buffer - (insert info-xref-filename-heading - (apply 'format str args)) - (setq info-xref-filename-heading "") - ;; all this info-xref can be pretty slow, display now so the user can - ;; see some progress - (sit-for 0))) - -;; When asking Info-goto-node to fork, *info* needs to be the current -;; buffer, otherwise it seems to clone the current buffer but then do the -;; goto-node in plain *info*. -;; -;; We only fork if *info* already exists, if it doesn't then we can create -;; and destroy just that instead of a new name. -;; -;; If Info-goto-node can't find the file, then no new buffer is created. If -;; it finds the file but not the node, then a buffer is created. Handle -;; this difference by checking before killing. -;; -(defun info-xref-goto-node-p (node) - "Return t if it's possible to go to the given NODE." - (let ((oldbuf (current-buffer))) (save-excursion - (save-window-excursion - (prog1 - (condition-case err - (progn - (Info-goto-node node - (when (get-buffer "*info*") - (set-buffer "*info*") - "xref - temporary")) - t) - (error nil)) - (unless (equal (current-buffer) oldbuf) - (kill-buffer (current-buffer)))))))) + (goto-char (match-beginning 1)) ;; start of nodename as error position + (info-xref-check-node (match-string 1))))) + +(defvar viper-mode) ;; quieten the byte compiler +(defvar gnus-registry-install) ;;;###autoload (defun info-xref-check-all-custom () "Check info references in all customize groups and variables. -`custom-manual' and `info-link' entries in the `custom-links' list are checked. +Info references can be in `custom-manual' or `info-link' entries +of the `custom-links' for a variable. -`custom-load' autoloads for all symbols are loaded in order to get all the -link information. This will be a lot of lisp packages loaded, and can take -quite a while." +Any `custom-load' autoloads in variables are loaded in order to +get full link information. This will be a lot of Lisp packages +and can take a long time." (interactive) - (pop-to-buffer info-xref-results-buffer t) - (erase-buffer) - (let ((info-xref-filename-heading "")) - - ;; `custom-load-symbol' is not used, since it quietly ignores errors, - ;; but we want to show them (since they may mean incomplete checking). - ;; - ;; Just one pass through mapatoms is made. There shouldn't be any new - ;; custom-loads setup by packages loaded. - ;; - (info-xref-output "Loading custom-load autoloads ...\n") - (require 'cus-start) - (require 'cus-load) - (let ((viper-mode nil)) ;; tell viper.el not to ask about viperizing - (mapatoms - (lambda (symbol) - (dolist (load (get symbol 'custom-loads)) - (cond ((symbolp load) - (condition-case cause (require load) - (error - (info-xref-output "Symbol `%s': cannot require '%s: %s\n" - symbol load cause)))) - ;; skip if previously loaded - ((assoc load load-history)) - ((assoc (locate-library load) load-history)) - (t - (condition-case cause (load load) - (error - (info-xref-output "Symbol `%s': cannot load \"%s\": %s\n" - symbol load cause))))))))) - - ;; Don't bother to check whether the info file exists as opposed to just - ;; a missing node. If you have the lisp then you should have the - ;; documentation, so missing node name will be the usual fault. - ;; - (info-xref-output "\nChecking custom-links references ...\n") - (let ((good 0) - (bad 0)) - (mapatoms - (lambda (symbol) - (dolist (link (get symbol 'custom-links)) - (when (memq (car link) '(custom-manual info-link)) - ;; skip :tag part of (custom-manual :tag "Foo" "(foo)Node") - (if (eq :tag (cadr link)) - (setq link (cddr link))) - (if (info-xref-goto-node-p (cadr link)) - (setq good (1+ good)) - (setq bad (1+ bad)) - ;; symbol-file gives nil for preloaded variables, would need - ;; to copy what describe-variable does to show the right place - (info-xref-output "Symbol `%s' (in %s): cannot goto node: %s\n" - symbol (symbol-file symbol) (cadr link))))))) - (info-xref-output "%d good, %d bad\n" good bad)))) + (info-xref-with-output + + ;; `custom-load-symbol' is not used, since it quietly ignores errors, but + ;; we want to show them since they mean incomplete checking. + ;; + ;; Just one pass through mapatoms is made. There shouldn't be any new + ;; custom-loads setup by packages loaded. + ;; + (info-xref-output "Loading custom-load autoloads ...") + (require 'cus-start) + (require 'cus-load) + + ;; These are `setq' rather than `let' since a let would unbind the + ;; variables after viper.el/gnus-registry.el have loaded, defeating the + ;; defvars in those files. Of course it'd be better if those files + ;; didn't make interactive queries on loading at all, to allow for + ;; programmatic loading like here. + (unless (boundp 'viper-mode) + (setq viper-mode nil)) ;; avoid viper.el ask about viperizing + (unless (boundp 'gnus-registry-install) + (setq gnus-registry-install nil)) ;; avoid gnus-registery.el querying + + (mapatoms + (lambda (symbol) + (dolist (load (get symbol 'custom-loads)) + (cond ((symbolp load) + (condition-case cause (require load) + (error + (info-xref-output "Symbol `%s': cannot require '%s: %s" + symbol load cause)))) + ;; skip if previously loaded + ((assoc load load-history)) + ((assoc (locate-library load) load-history)) + (t + (condition-case err + (load load) + (error + (info-xref-output "Symbol `%s': cannot load \"%s\": %s" + symbol load + (error-message-string err))))))))) + + ;; Don't bother to check whether the info file exists as opposed to just + ;; a missing node. If you have the code then you should have the + ;; documentation, so a wrong node name will be the usual fault. + ;; + (info-xref-output "\nChecking custom-links references ...") + (mapatoms + (lambda (symbol) + (dolist (link (get symbol 'custom-links)) + (when (memq (car link) '(custom-manual info-link)) + ;; skip :tag part of (custom-manual :tag "Foo" "(foo)Node") + (if (eq :tag (cadr link)) + (setq link (cddr link))) + (if (info-xref-goto-node-p (cadr link)) + (incf info-xref-good) + (incf info-xref-bad) + ;; symbol-file gives nil for preloaded variables, would need + ;; to copy what describe-variable does to show the right place + (info-xref-output "Symbol `%s' (file %s): cannot goto node: %s" + symbol + (symbol-file symbol 'defvar) + (cadr link))))))))) + +;;;###autoload +(defun info-xref-docstrings (filename-list) + ;; checkdoc-params: (filename-list) + "Check docstring info node references in source files. +The given files are searched for docstring hyperlinks like + + Info node `(elisp)Documentation Tips' + +and those links checked by attempting to visit the target nodes +as per `info-xref-check' does. + +Interactively filenames are read as a wildcard pattern like +\"foo*.el\", with the current file as a default. Usually this +will be lisp sources, but anything with such hyperlinks can be +checked, including the Emacs .c sources (or the etc/DOC file of +all builtins). + +Because info node hyperlinks are found by a simple regexp search +in the files, the Lisp code checked doesn't have to be loaded, +and links can be in the file commentary or elsewhere too. Even +.elc files can usually be checked successfully if you don't have +the sources handy." + (interactive + (let* ((default (and buffer-file-name + (file-relative-name buffer-file-name))) + (prompt (if default + (format "Filename with wildcards (%s): " + default) + "Filename with wildcards: ")) + (pattern (read-file-name prompt nil default)) + ;; absolute filenames + (filename-list (file-expand-wildcards pattern t)) + newlist) + (setq filename-list + (dolist (file filename-list (nreverse newlist)) + (or (info-xref-lock-file-p file) + (file-directory-p file) + (push file newlist)))) + (unless filename-list + (error "No files: %S" pattern)) + (list filename-list))) + + (eval-and-compile + (require 'help-mode)) ;; for `help-xref-info-regexp' + + (info-xref-with-output + (dolist (info-xref-filename filename-list) + (setq info-xref-xfile-alist nil) ;; "not found"s once per file + + (info-xref-with-file info-xref-filename + (goto-char (point-min)) + (while (re-search-forward help-xref-info-regexp nil t) + (let ((node (match-string 2))) + (save-excursion + (goto-char (match-beginning 2)) ;; start of node as error position + + ;; skip nodes with "%" as probably `format' strings such as in + ;; info-look.el + (unless (string-match "%" node) + + ;; "(emacs)" is the default manual for docstring hyperlinks, + ;; per `help-make-xrefs' + (unless (string-match "\\`(" node) + (setq node (concat "(emacs)" node))) + + (info-xref-check-node node))))))))) + (provide 'info-xref) -;; arch-tag: 69d4d528-69ed-4cc2-8eb4-c666a0c1d5ac ;;; info-xref.el ends here diff --git a/lisp/info.el b/lisp/info.el index 7c0333f6b8e..bc2062e72b2 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -1,8 +1,6 @@ ;; info.el --- info package for Emacs -;; Copyright (C) 1985, 1986, 1992, 1993, 1994, 1995, 1996, 1997, 1998, -;; 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, -;; 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985-1986, 1992-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: help @@ -3769,18 +3767,24 @@ If FORK is non-nil, it is passed to `Info-goto-node'." :rtl "left-arrow" :label "Forward" :vert-only t) + (define-key-after map [separator-1] menu-bar-separator) (tool-bar-local-item-from-menu 'Info-prev "prev-node" map Info-mode-map :rtl "next-node") (tool-bar-local-item-from-menu 'Info-next "next-node" map Info-mode-map :rtl "prev-node") (tool-bar-local-item-from-menu 'Info-up "up-node" map Info-mode-map :vert-only t) - (tool-bar-local-item-from-menu 'Info-top-node "home" map Info-mode-map) + (define-key-after map [separator-2] menu-bar-separator) + (tool-bar-local-item-from-menu 'Info-top-node "home" map Info-mode-map + :vert-only t) (tool-bar-local-item-from-menu 'Info-goto-node "jump-to" map Info-mode-map) + (define-key-after map [separator-3] menu-bar-separator) (tool-bar-local-item-from-menu 'Info-index "index" map Info-mode-map - :label "Index Search") - (tool-bar-local-item-from-menu 'Info-search "search" map Info-mode-map) - (tool-bar-local-item-from-menu 'Info-exit "exit" map Info-mode-map) + :label "Index") + (tool-bar-local-item-from-menu 'Info-search "search" map Info-mode-map + :vert-only t) + (tool-bar-local-item-from-menu 'Info-exit "exit" map Info-mode-map + :vert-only t) map)) (defvar Info-menu-last-node nil) diff --git a/lisp/informat.el b/lisp/informat.el index 7c8ea3b3379..77ead94123a 100644 --- a/lisp/informat.el +++ b/lisp/informat.el @@ -1,7 +1,6 @@ ;;; informat.el --- info support functions package for Emacs -;; Copyright (C) 1986, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1986, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: help @@ -511,5 +510,4 @@ For example, invoke \"emacs -batch -f batch-info-validate $info/ ~/*.info\"" (provide 'informat) -;; arch-tag: 581c440e-5be1-4f31-b005-2d5824bbf569 ;;; informat.el ends here diff --git a/lisp/international/ccl.el b/lisp/international/ccl.el index 4dc54859ec5..2cae1262521 100644 --- a/lisp/international/ccl.el +++ b/lisp/international/ccl.el @@ -1,9 +1,8 @@ ;;; ccl.el --- CCL (Code Conversion Language) compiler -;; Copyright (C) 1997, 1998, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-1998, 2001-2011 Free Software Foundation, Inc. ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 +;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 @@ -1559,5 +1558,4 @@ See the documentation of `define-ccl-program' for the detail of CCL program." (provide 'ccl) -;; arch-tag: 836bcd27-63a1-4a56-b232-1145ecf823fb ;;; ccl.el ends here diff --git a/lisp/international/characters.el b/lisp/international/characters.el index db5fe7e86ba..455cbe697d6 100644 --- a/lisp/international/characters.el +++ b/lisp/international/characters.el @@ -1,9 +1,8 @@ ;;; characters.el --- set syntax and category for multibyte characters -;; Copyright (C) 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1997, 2000-2011 Free Software Foundation, Inc. ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 +;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 ;; Copyright (C) 2003 @@ -1414,5 +1413,4 @@ METHOD must be one of these symbols: ;; coding: utf-8 ;; End: -;; arch-tag: 85889c35-9f4d-4912-9bf5-82de31b0d42d ;;; characters.el ends here diff --git a/lisp/international/cp51932.el b/lisp/international/cp51932.el index a648bfcefc4..d4a347d43aa 100644 --- a/lisp/international/cp51932.el +++ b/lisp/international/cp51932.el @@ -469,4 +469,3 @@ map) (define-translation-table 'cp51932-encode map)) -;; arch-tag: d21c06e5-a548-4dda-8802-c2922ff19da3 diff --git a/lisp/international/eucjp-ms.el b/lisp/international/eucjp-ms.el index 060692f31a5..a16848a0c7c 100644 --- a/lisp/international/eucjp-ms.el +++ b/lisp/international/eucjp-ms.el @@ -2086,4 +2086,3 @@ map) (define-translation-table 'eucjp-ms-encode map)) -;; arch-tag: c4191096-288a-4f13-9b2a-ee7a1f11eb4a diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el index 07557aacc88..777779e5ec5 100644 --- a/lisp/international/fontset.el +++ b/lisp/international/fontset.el @@ -1,9 +1,8 @@ ;;; fontset.el --- commands for handling fontset -;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-2011 Free Software Foundation, Inc. ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 +;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 ;; Copyright (C) 2003, 2006 @@ -1152,5 +1151,4 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.") ;; (provide 'fontset) -;; arch-tag: bb53e629-0234-403c-950e-551e61554849 ;;; fontset.el ends here diff --git a/lisp/international/isearch-x.el b/lisp/international/isearch-x.el index 27912c10449..cb6856964c0 100644 --- a/lisp/international/isearch-x.el +++ b/lisp/international/isearch-x.el @@ -1,9 +1,8 @@ ;;; isearch-x.el --- extended isearch handling commands -;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1997, 2001-2011 Free Software Foundation, Inc. ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 +;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 @@ -141,5 +140,4 @@ (isearch-update))) (isearch-process-search-char last-char))) -;; arch-tag: 1a90a6cf-2cb2-477a-814a-9ff895852822 ;;; isearch-x.el ends here diff --git a/lisp/international/iso-ascii.el b/lisp/international/iso-ascii.el index fab96f9a682..491a7c02ba4 100644 --- a/lisp/international/iso-ascii.el +++ b/lisp/international/iso-ascii.el @@ -1,7 +1,6 @@ ;;; iso-ascii.el --- set up char tables for ISO 8859/1 on ASCII terminals -;; Copyright (C) 1987, 1995, 1998, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1987, 1995, 1998, 2001-2011 Free Software Foundation, Inc. ;; Author: Howard Gayle ;; Maintainer: FSF @@ -171,5 +170,4 @@ (provide 'iso-ascii) -;; arch-tag: 687edf0d-f792-471e-b50e-be805938359a ;;; iso-ascii.el ends here diff --git a/lisp/international/iso-cvt.el b/lisp/international/iso-cvt.el index 8798a4894fb..6ccd1c21739 100644 --- a/lisp/international/iso-cvt.el +++ b/lisp/international/iso-cvt.el @@ -1,8 +1,7 @@ ;;; iso-cvt.el --- translate ISO 8859-1 from/to various encodings -*- coding: iso-latin-1 -*- ;; This file was formerly called gm-lingo.el. -;; Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001, -;; 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993-1998, 2000-2011 Free Software Foundation, Inc. ;; Author: Michael Gschwind <mike@vlsivie.tuwien.ac.at> ;; Keywords: tex, iso, latin, i18n @@ -904,5 +903,4 @@ Optional arg BUFFER is ignored (for use in `format-alist')." (provide 'iso-cvt) -;; arch-tag: 64ae843f-ed0e-43e1-ba50-ffd581b90840 ;;; iso-cvt.el ends here diff --git a/lisp/international/iso-transl.el b/lisp/international/iso-transl.el index b11a7a2930d..49b1f6ef231 100644 --- a/lisp/international/iso-transl.el +++ b/lisp/international/iso-transl.el @@ -1,7 +1,6 @@ ;;; iso-transl.el --- keyboard input definitions for ISO 8859-1 -*- coding: iso-8859-1 -*- -;; Copyright (C) 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 -;; 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1987, 1993-1999, 2001-2011 Free Software Foundation, Inc. ;; Author: Howard Gayle ;; Maintainer: FSF @@ -291,5 +290,4 @@ sequence VECTOR. (VECTOR is normally one character long.)") (provide 'iso-transl) -;; arch-tag: 034cfedf-7ebd-461d-bcd0-5c79e6dc0b61 ;;; iso-transl.el ends here diff --git a/lisp/international/ja-dic-cnv.el b/lisp/international/ja-dic-cnv.el index e3a5f6721dc..7e317ea09c0 100644 --- a/lisp/international/ja-dic-cnv.el +++ b/lisp/international/ja-dic-cnv.el @@ -1,7 +1,7 @@ ;;; ja-dic-cnv.el --- convert a Japanese dictionary (SKK-JISYO.L) to Emacs Lisp ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 +;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 @@ -545,5 +545,4 @@ To get complete usage, invoke: ;; coding: iso-2022-7bit ;; End: -;; arch-tag: dec06fb0-8118-45b1-80d7-dc360b6fd3b2 ;;; ja-dic-cnv.el ends here diff --git a/lisp/international/ja-dic-utl.el b/lisp/international/ja-dic-utl.el index ba92f434b6b..8400c473afa 100644 --- a/lisp/international/ja-dic-utl.el +++ b/lisp/international/ja-dic-utl.el @@ -1,7 +1,7 @@ ;;; ja-dic-utl.el --- utilities for handling Japanese dictionary (SKK-JISYO.L) ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 +;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 @@ -222,5 +222,4 @@ LEIM is available from the same ftp directory as Emacs.")) ;; coding: iso-2022-7bit ;; End: -;; arch-tag: df2218fa-469c-40f6-bace-7f89a053f9c0 ;;; ja-dic-utl.el ends here diff --git a/lisp/international/kinsoku.el b/lisp/international/kinsoku.el index ef9dbf1535e..b0ca522dee4 100644 --- a/lisp/international/kinsoku.el +++ b/lisp/international/kinsoku.el @@ -1,9 +1,8 @@ ;;; kinsoku.el --- `Kinsoku' processing funcs -*- coding: iso-2022-7bit; -*- -;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1997, 2001-2011 Free Software Foundation, Inc. ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 +;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 @@ -183,5 +182,4 @@ the context of text formatting." (aref (char-category-set (preceding-char)) ?<)) (kinsoku-shorter linebeg)))) -;; arch-tag: e6b036bc-9e5b-4e9f-a22c-4ed04e37777e ;;; kinsoku.el ends here diff --git a/lisp/international/kkc.el b/lisp/international/kkc.el index 976b0a6d167..03e5202438f 100644 --- a/lisp/international/kkc.el +++ b/lisp/international/kkc.el @@ -1,9 +1,8 @@ ;;; kkc.el --- Kana Kanji converter -*- coding: iso-2022-7bit; -*- -;; Copyright (C) 1997, 1998, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-1998, 2001-2011 Free Software Foundation, Inc. ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 +;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 @@ -658,5 +657,4 @@ and change the current conversion to the last one in the group." ;; (provide 'kkc) -;; arch-tag: 3cbfd56e-74e6-4f60-bb46-ba7c2d366fbf ;;; kkc.el ends here diff --git a/lisp/international/latexenc.el b/lisp/international/latexenc.el index b7b0d387710..d5a7713dbec 100644 --- a/lisp/international/latexenc.el +++ b/lisp/international/latexenc.el @@ -1,6 +1,6 @@ ;;; latexenc.el --- guess correct coding system in LaTeX files -*-coding: iso-2022-7bit -*- -;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2005-2011 Free Software Foundation, Inc. ;; Author: Arne J,Ax(Brgensen <arne@arnested.dk> ;; Keywords: mule, coding system, latex @@ -186,5 +186,4 @@ coding system names is determined from `latex-inputenc-coding-alist'." (provide 'latexenc) -;; arch-tag: f971bc3e-1fec-4609-8f2f-73dd41ab22e1 ;;; latexenc.el ends here diff --git a/lisp/international/latin1-disp.el b/lisp/international/latin1-disp.el index a32c66d389a..1c9b06beab8 100644 --- a/lisp/international/latin1-disp.el +++ b/lisp/international/latin1-disp.el @@ -1,7 +1,6 @@ ;;; latin1-disp.el --- display tables for other ISO 8859 on Latin-1 terminals -*-coding: iso-2022-7bit;-*- -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; Author: Dave Love <fx@gnu.org> ;; Keywords: i18n @@ -3196,5 +3195,4 @@ isn't changed if the display can render Unicode characters." (provide 'latin1-disp) -;; arch-tag: 68b2872e-d667-4f48-8e2f-ec2ba2d29406 ;;; latin1-disp.el ends here diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 4701e7e5718..d610da0aab6 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -1,9 +1,8 @@ ;;; mule-cmds.el --- commands for multilingual environment -*-coding: iso-2022-7bit -*- -;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-2011 Free Software Foundation, Inc. ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 +;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 ;; Copyright (C) 2003 @@ -2979,5 +2978,4 @@ properties are sticky." (define-key ctl-x-map "8\r" 'ucs-insert) -;; arch-tag: b382c432-4b36-460e-bf4c-05efd0bb18dc ;;; mule-cmds.el ends here diff --git a/lisp/international/mule-conf.el b/lisp/international/mule-conf.el index 9ee8d22463a..9ba95e4d11a 100644 --- a/lisp/international/mule-conf.el +++ b/lisp/international/mule-conf.el @@ -1,8 +1,7 @@ ;;; mule-conf.el --- configure multilingual environment -;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. -;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 1997-2011 Free Software Foundation, Inc. +;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 ;; Copyright (C) 2003 @@ -1555,5 +1554,4 @@ for decoding and encoding files, process I/O, etc." ;; code. (provide 'code-pages) -;; arch-tag: 7d5fed55-b6df-42f6-8d3d-0011190551f5 ;;; mule-conf.el ends here diff --git a/lisp/international/mule-diag.el b/lisp/international/mule-diag.el index ed2f7e33a4c..349430f0cd9 100644 --- a/lisp/international/mule-diag.el +++ b/lisp/international/mule-diag.el @@ -1,9 +1,8 @@ ;;; mule-diag.el --- show diagnosis of multilingual environment (Mule) -;; Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-1998, 2000-2011 Free Software Foundation, Inc. ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 +;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 ;; Copyright (C) 2003 @@ -1169,5 +1168,4 @@ The default is 20. If LIMIT is negative, do not limit the listing." (provide 'mule-diag) -;; arch-tag: cd3b607c-2893-45a0-a4fa-a6535754dbee ;;; mule-diag.el ends here diff --git a/lisp/international/mule-util.el b/lisp/international/mule-util.el index 5f4af36be35..59496266eaf 100644 --- a/lisp/international/mule-util.el +++ b/lisp/international/mule-util.el @@ -1,9 +1,8 @@ ;;; mule-util.el --- utility functions for multilingual environment (mule) -;; Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-1998, 2000-2011 Free Software Foundation, Inc. ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 +;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 ;; Copyright (C) 2003 @@ -405,5 +404,4 @@ per-character basis, this may not be accurate." ;; coding: iso-2022-7bit ;; End: -;; arch-tag: 5bdb52b6-a3a5-4529-b7a0-37d01b0e570b ;;; mule-util.el ends here diff --git a/lisp/international/mule.el b/lisp/international/mule.el index df362d96c07..4a387a233a0 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -1,10 +1,8 @@ ;;; mule.el --- basic commands for multilingual environment -;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1997-2011 Free Software Foundation, Inc. ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 +;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 ;; Copyright (C) 2003 @@ -1611,7 +1609,7 @@ in-place." (set-buffer (generate-new-buffer " *temp")) (set-buffer-multibyte (multibyte-string-p from)) (insert from) - (setq from 1 to (point-max))) + (setq from (point-min) to (point-max))) (save-restriction (narrow-to-region from to) (goto-char from) @@ -2444,5 +2442,4 @@ added by processing software." ;;; (provide 'mule) -;; arch-tag: 9aebaa6e-0e8a-40a9-b857-cb5d04a39e7c ;;; mule.el ends here diff --git a/lisp/international/ogonek.el b/lisp/international/ogonek.el index 750d47629e3..0da6cc614fd 100644 --- a/lisp/international/ogonek.el +++ b/lisp/international/ogonek.el @@ -1,7 +1,6 @@ ;;; ogonek.el --- change the encoding of Polish diacritics -;; Copyright (C) 1997, 1998, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-1998, 2001-2011 Free Software Foundation, Inc. ;; Author: W{\l}odek Bzyl ;; Ryszard Kubiak @@ -500,5 +499,4 @@ followed by a non-Polish character, that is one not listed in the (provide 'ogonek) -;; arch-tag: 672d7744-28ac-412b-965e-06a27e50d1d7 ;;; ogonek.el ends here diff --git a/lisp/international/quail.el b/lisp/international/quail.el index 621f314bf70..c5842740dbf 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el @@ -1,9 +1,8 @@ ;;; quail.el --- provides simple input method for multilingual text -;; Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-1998, 2000-2011 Free Software Foundation, Inc. ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 +;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 @@ -3077,5 +3076,4 @@ call it with one argument STRING." ;; (provide 'quail) -;; arch-tag: 46d7db54-5467-42c4-a2a9-53ca90a1e886 ;;; quail.el ends here diff --git a/lisp/international/robin.el b/lisp/international/robin.el index 7a9eeb0f623..7e98a507f93 100644 --- a/lisp/international/robin.el +++ b/lisp/international/robin.el @@ -1,6 +1,6 @@ ;;; robin.el --- yet another input method (smaller than quail) -;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number: H15PRO110 @@ -571,5 +571,4 @@ used." ;; coding: utf-8-emacs ;; End: -;; arch-tag: ba995140-7436-4a57-b875-747fc340f605 ;;; robin.el ends here diff --git a/lisp/international/titdic-cnv.el b/lisp/international/titdic-cnv.el index 92b4251b49c..935d66c613b 100644 --- a/lisp/international/titdic-cnv.el +++ b/lisp/international/titdic-cnv.el @@ -1,9 +1,8 @@ ;;; titdic-cnv.el --- convert cxterm dictionary (TIT format) to Quail package -*- coding:iso-2022-7bit; -*- -;; Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-1998, 2000-2011 Free Software Foundation, Inc. ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 +;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 ;; Copyright (C) 2003 @@ -1210,5 +1209,4 @@ to store generated Quail packages." ;; coding: iso-2022-7bit ;; End: -;; arch-tag: 8ad478b2-a985-4da2-b47f-d8ee5d7c24a3 ;;; titdic-cnv.el ends here diff --git a/lisp/international/ucs-normalize.el b/lisp/international/ucs-normalize.el index 59850621388..f83e0f7588f 100644 --- a/lisp/international/ucs-normalize.el +++ b/lisp/international/ucs-normalize.el @@ -1,7 +1,6 @@ ;;; ucs-normalize.el --- Unicode normalization NFC/NFD/NFKD/NFKC -;; Copyright (C) 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Taichi Kawabata <kawabata.taichi@gmail.com> ;; Keywords: unicode, normalization @@ -628,5 +627,4 @@ be decomposed." ;; coding: utf-8 ;; End: -;; arch-tag: cef65ae7-71ad-4e19-8da8-56ab4d42aaa4 ;;; ucs-normalize.el ends here diff --git a/lisp/international/utf-7.el b/lisp/international/utf-7.el index c2cd6346745..e27bf26e17d 100644 --- a/lisp/international/utf-7.el +++ b/lisp/international/utf-7.el @@ -1,7 +1,6 @@ ;;; utf-7.el --- utf-7 coding system -;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2003-2011 Free Software Foundation, Inc. ;; Author: Dave Love <fx@gnu.org> ;; Keywords: i18n, mail @@ -127,5 +126,4 @@ ESC and SKIP-CHARS are adjusted for the normal and IMAP versions." (provide 'utf-7) -;; arch-tag: 975ee403-90a4-4286-97d2-4ed1323f4ef9 ;;; utf-7.el ends here diff --git a/lisp/isearch.el b/lisp/isearch.el index ebe2e8fa009..5aadac4a3b1 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -1,8 +1,6 @@ ;;; isearch.el --- incremental search minor mode -;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, -;; 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1992-1997, 1999-2011 Free Software Foundation, Inc. ;; Author: Daniel LaLiberte <liberte@cs.uiuc.edu> ;; Maintainer: FSF @@ -1244,9 +1242,9 @@ Use `isearch-exit' to quit without signaling." (interactive) ;; (ding) signal instead below, if quitting (discard-input) - (if isearch-success - ;; If search is successful, move back to starting point - ;; and really do quit. + (if (and isearch-success (not isearch-error)) + ;; If search is successful and has no incomplete regexp, + ;; move back to starting point and really do quit. (progn (setq isearch-success nil) (isearch-cancel)) @@ -2581,6 +2579,7 @@ since they have special meaning in a regexp." (defvar isearch-lazy-highlight-regexp nil) (defvar isearch-lazy-highlight-space-regexp nil) (defvar isearch-lazy-highlight-forward nil) +(defvar isearch-lazy-highlight-error nil) (defun lazy-highlight-cleanup (&optional force) "Stop lazy highlighting and remove extra highlighting from current buffer. @@ -2622,9 +2621,13 @@ by other Emacs features." (not (= (window-end) ; Window may have been split/joined. isearch-lazy-highlight-window-end)) (not (eq isearch-forward - isearch-lazy-highlight-forward)))) + isearch-lazy-highlight-forward)) + ;; In case we are recovering from an error. + (not (equal isearch-error + isearch-lazy-highlight-error)))) ;; something important did indeed change (lazy-highlight-cleanup t) ;kill old loop & remove overlays + (setq isearch-lazy-highlight-error isearch-error) (when (not isearch-error) (setq isearch-lazy-highlight-start-limit beg isearch-lazy-highlight-end-limit end) @@ -2762,5 +2765,4 @@ CASE-FOLD non-nil means the search was case-insensitive." (isearch-search) (isearch-update)) -;; arch-tag: 74850515-f7d8-43a6-8a2c-ca90a4c1e675 ;;; isearch.el ends here diff --git a/lisp/isearchb.el b/lisp/isearchb.el index d58b0952fc5..721fce8ef9a 100644 --- a/lisp/isearchb.el +++ b/lisp/isearchb.el @@ -1,7 +1,6 @@ ;;; isearchb --- a marriage between iswitchb and isearch -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> ;; Maintainer: FSF @@ -223,5 +222,4 @@ accessed via isearchb." (provide 'isearchb) -;; arch-tag: 9277523f-a624-4aa0-ba10-b89eeb7b6e99 ;;; isearchb.el ends here diff --git a/lisp/iswitchb.el b/lisp/iswitchb.el index 48f0edb49e0..fd6cff0faa0 100644 --- a/lisp/iswitchb.el +++ b/lisp/iswitchb.el @@ -1,7 +1,6 @@ ;;; iswitchb.el --- switch between buffers using substrings -;; Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-1997, 2000-2011 Free Software Foundation, Inc. ;; Author: Stephen Eglen <stephen@gnu.org> ;; Maintainer: Stephen Eglen <stephen@gnu.org> @@ -1437,5 +1436,4 @@ This mode enables switching between buffers using substrings. See (provide 'iswitchb) -;; arch-tag: d74198ae-753f-44f2-b34f-0c515398d90a ;;; iswitchb.el ends here diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el index cc250567ad8..b65b186b4e2 100644 --- a/lisp/jit-lock.el +++ b/lisp/jit-lock.el @@ -1,7 +1,6 @@ ;;; jit-lock.el --- just-in-time fontification -;; Copyright (C) 1998, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998, 2000-2011 Free Software Foundation, Inc. ;; Author: Gerd Moellmann <gerd@gnu.org> ;; Keywords: faces files @@ -591,5 +590,4 @@ will take place when text is fontified stealthily." (provide 'jit-lock) -;; arch-tag: 56b5de6e-f581-453b-bb97-49c39372ff9e ;;; jit-lock.el ends here diff --git a/lisp/jka-cmpr-hook.el b/lisp/jka-cmpr-hook.el index aba9dac1434..fda9804bbb8 100644 --- a/lisp/jka-cmpr-hook.el +++ b/lisp/jka-cmpr-hook.el @@ -1,7 +1,7 @@ ;;; jka-cmpr-hook.el --- preloaded code to enable jka-compr.el -;; Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993-1995, 1997, 1999-2000, 2002-2011 +;; Free Software Foundation, Inc. ;; Author: jka@ece.cmu.edu (Jay K. Adams) ;; Maintainer: FSF @@ -365,5 +365,4 @@ Return the new status of auto compression (non-nil means on)." (provide 'jka-cmpr-hook) -;; arch-tag: 4bd73429-f400-45fe-a065-270a113e31a8 ;;; jka-cmpr-hook.el ends here diff --git a/lisp/jka-compr.el b/lisp/jka-compr.el index 3f0ff542212..6fb3ffdd719 100644 --- a/lisp/jka-compr.el +++ b/lisp/jka-compr.el @@ -1,7 +1,6 @@ ;;; jka-compr.el --- reading/writing/loading compressed files -;; Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993-1995, 1997, 1999-2011 Free Software Foundation, Inc. ;; Author: jka@ece.cmu.edu (Jay K. Adams) ;; Maintainer: FSF @@ -166,8 +165,11 @@ to keep: LEN chars starting BEG chars from the beginning." (unwind-protect (or (memq (call-process jka-compr-shell infile t nil "-c" + ;; Windows shells need the program file name + ;; after the pipe symbol be quoted if they use + ;; forward slashes as directory separators. (format - "%s %s 2> %s | %s bs=%d skip=%d %s 2> %s" + "%s %s 2> %s | \"%s\" bs=%d skip=%d %s 2> %s" prog (mapconcat 'identity args " ") err-file @@ -701,5 +703,4 @@ by `jka-compr-installed'." (provide 'jka-compr) -;; arch-tag: 3f15b630-e9a7-46c4-a22a-94afdde86ebc ;;; jka-compr.el ends here diff --git a/lisp/json.el b/lisp/json.el index 6228b99f3e2..47448f4702a 100644 --- a/lisp/json.el +++ b/lisp/json.el @@ -1,6 +1,6 @@ ;;; json.el --- JavaScript Object Notation parser / generator -;; Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2006-2011 Free Software Foundation, Inc. ;; Author: Edward O'Connor <ted@oconnor.cx> ;; Version: 1.2 @@ -526,5 +526,4 @@ Advances point just past JSON object." (provide 'json) -;; arch-tag: 15f6e4c8-b831-4172-8749-bbc680c50ea1 ;;; json.el ends here diff --git a/lisp/kermit.el b/lisp/kermit.el index 12f80c14524..b91dbb00cfa 100644 --- a/lisp/kermit.el +++ b/lisp/kermit.el @@ -1,7 +1,6 @@ ;;; kermit.el --- additions to shell mode for use with kermit -;; Copyright (C) 1988, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1988, 2001-2011 Free Software Foundation, Inc. ;; Author: Jeff Norden <jeff@colgate.csnet> ;; Maintainer: FSF @@ -148,5 +147,4 @@ command `kermit | tr -d '\\015''." (provide 'kermit) -;; arch-tag: 6633215d-6c47-4e66-9f27-16fba02a8dce ;;; kermit.el ends here diff --git a/lisp/kmacro.el b/lisp/kmacro.el index 439c7383223..689120c0f8f 100644 --- a/lisp/kmacro.el +++ b/lisp/kmacro.el @@ -1,7 +1,6 @@ ;;; kmacro.el --- enhanced keyboard macros -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Author: Kim F. Storm <storm@cua.dk> ;; Keywords: keyboard convenience @@ -1270,5 +1269,4 @@ To customize possible responses, change the \"bindings\" in `kmacro-step-edit-ma (provide 'kmacro) -;; arch-tag: d3fe0b24-ae41-47de-a4d6-41a77d5559f0 ;;; kmacro.el ends here diff --git a/lisp/language/burmese.el b/lisp/language/burmese.el index a53320b5430..9fce0583161 100644 --- a/lisp/language/burmese.el +++ b/lisp/language/burmese.el @@ -1,6 +1,6 @@ ;;; burmese.el --- support for Burmese -*- coding: utf-8; no-byte-compile: t -*- -;; Copyright (C) 2008, 2009, 2010 +;; Copyright (C) 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H13PRO009 @@ -57,4 +57,3 @@ (set-char-table-range composition-function-table '(#x1000 . #x107F) elt) (set-char-table-range composition-function-table '(#xAA60 . #xAA7B) elt)) -;; arch-tag: 8ba5f4cd-ef89-4008-b784-397edd0cb32e diff --git a/lisp/language/cham.el b/lisp/language/cham.el index ac543bd073c..d1ddfb512a9 100644 --- a/lisp/language/cham.el +++ b/lisp/language/cham.el @@ -1,6 +1,6 @@ ;;; cham.el --- support for Cham -*- coding: utf-8; no-byte-compile: t -*- -;; Copyright (C) 2008, 2009, 2010 +;; Copyright (C) 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H13PRO009 @@ -42,4 +42,3 @@ ;; coding: utf-8 ;; End: -;; arch-tag: a393ea52-445b-4e22-a967-c244afc88cf6 diff --git a/lisp/language/china-util.el b/lisp/language/china-util.el index cbfebc866f9..9f79dd087bb 100644 --- a/lisp/language/china-util.el +++ b/lisp/language/china-util.el @@ -1,9 +1,8 @@ ;;; china-util.el --- utilities for Chinese -*- coding: iso-2022-7bit -*- -;; Copyright (C) 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1995, 2001-2011 Free Software Foundation, Inc. ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 +;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 ;; Copyright (C) 2003 @@ -191,5 +190,4 @@ Return the length of resulting text." ;; (provide 'china-util) -;; arch-tag: 5a47b084-b9ac-420e-8191-70c5b3a14836 ;;; china-util.el ends here diff --git a/lisp/language/chinese.el b/lisp/language/chinese.el index 31960108c2a..c44dc44581d 100644 --- a/lisp/language/chinese.el +++ b/lisp/language/chinese.el @@ -1,9 +1,8 @@ ;;; chinese.el --- support for Chinese -*- coding: iso-2022-7bit; -*- -;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2001-2011 Free Software Foundation, Inc. ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 +;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 ;; Copyright (C) 2003 @@ -287,5 +286,4 @@ converted to CNS).")) (provide 'chinese) -;; arch-tag: b82fcf7a-84f6-4e0b-b38c-1742dac0e09f ;;; chinese.el ends here diff --git a/lisp/language/cyril-util.el b/lisp/language/cyril-util.el index 0968746642c..e833bb7ab04 100644 --- a/lisp/language/cyril-util.el +++ b/lisp/language/cyril-util.el @@ -1,7 +1,6 @@ ;;; cyril-util.el --- utilities for Cyrillic scripts -;; Copyright (C) 1997, 1998, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-1998, 2001-2011 Free Software Foundation, Inc. ;; Keywords: mule, multilingual, Cyrillic @@ -192,5 +191,4 @@ If the argument is nil, we return the display table to its standard state." ;; coding: iso-2022-7bit ;; End: -;; arch-tag: f6d9dd5d-685c-45d6-a5d8-1e2178228b7e ;;; cyril-util.el ends here diff --git a/lisp/language/cyrillic.el b/lisp/language/cyrillic.el index b293ad1ff0b..8fb7fae720d 100644 --- a/lisp/language/cyrillic.el +++ b/lisp/language/cyrillic.el @@ -1,9 +1,8 @@ ;;; cyrillic.el --- support for Cyrillic -*- coding: iso-2022-7bit; -*- -;; Copyright (C) 1997, 1998, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1997-1998, 2001-2011 Free Software Foundation, Inc. ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 +;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 ;; Copyright (C) 2003 @@ -272,5 +271,4 @@ Support for Russian using koi8-r and the russian-computer input method.") (provide 'cyrillic) -;; arch-tag: bda71ae0-ba41-4cb6-a6e0-1dff542313d3 ;;; cyrillic.el ends here diff --git a/lisp/language/czech.el b/lisp/language/czech.el index 59833c78ef5..2325699e30e 100644 --- a/lisp/language/czech.el +++ b/lisp/language/czech.el @@ -1,7 +1,6 @@ ;;; czech.el --- support for Czech -*- coding: iso-2022-7bit; no-byte-compile: t -*- -;; Copyright (C) 1998, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation. +;; Copyright (C) 1998, 2001-2011 Free Software Foundation, Inc. ;; Author: Milan Zamazal <pdm@zamazal.org> ;; Maintainer: Pavel Jan,Am(Bk <Pavel@Janik.cz> @@ -45,5 +44,4 @@ and selects the Czech tutorial.")) (provide 'czech) -;; arch-tag: 45ac0d83-ca13-4b5e-9e82-821e44080c24 ;;; czech.el ends here diff --git a/lisp/language/english.el b/lisp/language/english.el index 38448702e8a..dd96d38a197 100644 --- a/lisp/language/english.el +++ b/lisp/language/english.el @@ -1,9 +1,8 @@ ;;; english.el --- support for English -*- no-byte-compile: t -*- -;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1997, 2001-2011 Free Software Foundation, Inc. ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 +;; 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 ;; Copyright (C) 2003 @@ -67,5 +66,4 @@ Nothing special is needed to handle English.") (set-language-info-alist "ASCII" (cdr (assoc "English" language-info-alist))) -;; arch-tag: e440bdb0-91b0-4fb4-ae38-425780f8f745 ;;; english.el ends here diff --git a/lisp/language/ethio-util.el b/lisp/language/ethio-util.el index ee5073d308f..bb242a50acc 100644 --- a/lisp/language/ethio-util.el +++ b/lisp/language/ethio-util.el @@ -1,9 +1,8 @@ ;;; ethio-util.el --- utilities for Ethiopic -*- coding: utf-8; -*- -;; Copyright (C) 1997, 1998, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1997-1998, 2002-2011 Free Software Foundation, Inc. ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 +;; 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 ;; Copyright (C) 2005, 2006 @@ -2073,5 +2072,4 @@ mark." ;;; ethio-util.el ends here -;; arch-tag: c8feb3d6-39bf-4b0a-b6ef-26f03fbc8140 ;;; ethio-util.el ends here diff --git a/lisp/language/ethiopic.el b/lisp/language/ethiopic.el index 2da833f4357..22ccd56dab3 100644 --- a/lisp/language/ethiopic.el +++ b/lisp/language/ethiopic.el @@ -1,9 +1,8 @@ ;;; ethiopic.el --- support for Ethiopic -*- coding: utf-8-emacs; -*- -;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1997, 2001-2011 Free Software Foundation, Inc. ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 +;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 @@ -85,5 +84,4 @@ (provide 'ethiopic) -;; arch-tag: e81329d9-1286-43ba-92fd-54ce5c7b213c ;;; ethiopic.el ends here diff --git a/lisp/language/european.el b/lisp/language/european.el index 1a386fb2a66..6dfc03d0f5f 100644 --- a/lisp/language/european.el +++ b/lisp/language/european.el @@ -1,9 +1,8 @@ ;;; european.el --- support for European languages -*- coding: iso-2022-7bit; -*- -;; Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-1998, 2000-2011 Free Software Foundation, Inc. ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 +;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 ;; Copyright (C) 2003 @@ -639,5 +638,4 @@ method and applying Turkish case rules for the characters i, I, $(D)E(B, $(D* (provide 'european) -;; arch-tag: 9e018b12-fb02-4120-907b-9adeaf84b5c2 ;;; european.el ends here diff --git a/lisp/language/georgian.el b/lisp/language/georgian.el index e5c1c85efc0..be6da8cba17 100644 --- a/lisp/language/georgian.el +++ b/lisp/language/georgian.el @@ -1,7 +1,6 @@ ;;; georgian.el --- language support for Georgian -*- no-byte-compile: t -*- -;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2001-2011 Free Software Foundation, Inc. ;; Author: Dave Love <fx@gnu.org> ;; Keywords: i18n @@ -48,5 +47,4 @@ (provide 'georgian) -;; arch-tag: 15499fbb-26d4-4a13-9d78-135eef7d32f5 ;;; georgian.el ends here diff --git a/lisp/language/greek.el b/lisp/language/greek.el index 18196a575ba..e4d239cdf27 100644 --- a/lisp/language/greek.el +++ b/lisp/language/greek.el @@ -2,7 +2,7 @@ ;; Copyright (C) 2002 Free Software Foundation, Inc. ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 +;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 @@ -83,5 +83,4 @@ (provide 'greek) -;; arch-tag: 9ba48d79-84bc-45e1-9318-685dc3921410 ;;; greek.el ends here diff --git a/lisp/language/hanja-util.el b/lisp/language/hanja-util.el index ceca5346727..bd661083406 100644 --- a/lisp/language/hanja-util.el +++ b/lisp/language/hanja-util.el @@ -1,6 +1,6 @@ ;;; hanja-util.el --- Korean Hanja util module -*- coding: utf-8 -*- -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Jihyun Cho <jihyun.jo@gmail.com> ;; Keywords: multilingual, input method, Korean, Hanja @@ -6591,5 +6591,4 @@ The value is a hanja character that is selected interactively." (provide 'hanja-util) -;; arch-tag: 3358afb4-c63f-472f-989a-5249129924d1 ;;; hanja-util.el ends here diff --git a/lisp/language/hebrew.el b/lisp/language/hebrew.el index bcc3d625d68..fd3e16b307a 100644 --- a/lisp/language/hebrew.el +++ b/lisp/language/hebrew.el @@ -1,9 +1,8 @@ ;;; hebrew.el --- support for Hebrew -*- coding: utf-8 -*- -;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2001-2011 Free Software Foundation, Inc. ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 +;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 @@ -259,5 +258,4 @@ Bidirectional editing is supported."))) (provide 'hebrew) -;; arch-tag: 3ca04f32-3f1e-498e-af46-8267498ba5d9 ;;; hebrew.el ends here diff --git a/lisp/language/ind-util.el b/lisp/language/ind-util.el index 76796e125bc..56893af1479 100644 --- a/lisp/language/ind-util.el +++ b/lisp/language/ind-util.el @@ -1,7 +1,6 @@ ;;; ind-util.el --- Transliteration and Misc. Tools for Indian Languages -*- coding: iso-2022-7bit; -*- -;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2001-2011 Free Software Foundation, Inc. ;; Maintainer: KAWABATA, Taichi <kawabata@m17n.org> ;; Keywords: multilingual, Indian, Devanagari @@ -1213,5 +1212,4 @@ Returns new end position." (provide 'ind-util) -;; arch-tag: 59aacd71-46c2-4cb3-bb26-e12bbad55545 ;;; ind-util.el ends here diff --git a/lisp/language/indian.el b/lisp/language/indian.el index 84998f9cec8..8203213d8eb 100644 --- a/lisp/language/indian.el +++ b/lisp/language/indian.el @@ -1,8 +1,7 @@ ;;; indian.el --- Indian languages support -*- coding: utf-8; -*- -;; Copyright (C) 1997, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 1997, 1999, 2001-2011 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 @@ -389,5 +388,4 @@ South Indian language Malayalam is supported in this language environment.")) (provide 'indian) -;; arch-tag: 83aa8fc7-7ee2-4364-a6e5-498f5e3b8c2f ;;; indian.el ends here diff --git a/lisp/language/japan-util.el b/lisp/language/japan-util.el index d8b61fa2363..dcf3dc0f90e 100644 --- a/lisp/language/japan-util.el +++ b/lisp/language/japan-util.el @@ -1,9 +1,8 @@ ;;; japan-util.el --- utilities for Japanese -*- coding: iso-2022-7bit; -*- -;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2001-2011 Free Software Foundation, Inc. ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 +;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 @@ -325,5 +324,4 @@ If non-nil, second arg INITIAL-INPUT is a string to insert before reading." ;; (provide 'japan-util) -;; arch-tag: b579595c-c9ad-4b57-9314-98cd8b214f89 ;;; japan-util.el ends here diff --git a/lisp/language/japanese.el b/lisp/language/japanese.el index 2a5e4517412..bf8a4d8d5c2 100644 --- a/lisp/language/japanese.el +++ b/lisp/language/japanese.el @@ -1,9 +1,8 @@ ;;; japanese.el --- support for Japanese -*- coding: iso-2022-7bit; no-byte-compile: t -*- -;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1997, 2001-2011 Free Software Foundation, Inc. ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 +;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 ;; Copyright (C) 2003 @@ -274,5 +273,4 @@ and the second is a glyph for a variation selector." (provide 'japanese) -;; arch-tag: 450f5537-9d53-4d5e-b731-4cf116d8cbc9 ;;; japanese.el ends here diff --git a/lisp/language/khmer.el b/lisp/language/khmer.el index d6ede9e4b08..d01fa3b33bd 100644 --- a/lisp/language/khmer.el +++ b/lisp/language/khmer.el @@ -1,6 +1,6 @@ ;;; khmer.el --- support for Khmer -*- coding: utf-8; no-byte-compile: t -*- -;; Copyright (C) 2008, 2009, 2010 +;; Copyright (C) 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H13PRO009 @@ -35,5 +35,4 @@ (set-char-table-range composition-function-table '(#x1780 . #x17FF) val) (set-char-table-range composition-function-table '(#x19E0 . #x19FF) val)) -;; arch-tag: 032890e4-a936-4584-ad44-79eb5f8bc98e ;; khmer.el ends here diff --git a/lisp/language/korea-util.el b/lisp/language/korea-util.el index deea6084239..e2367cf0f7e 100644 --- a/lisp/language/korea-util.el +++ b/lisp/language/korea-util.el @@ -1,9 +1,8 @@ ;;; korea-util.el --- utilities for Korean -;; Copyright (C) 1997, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1997, 1999, 2001-2011 Free Software Foundation, Inc. ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 +;; 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 @@ -143,5 +142,4 @@ ;; (provide 'korea-util) -;; arch-tag: b17d0981-05da-4577-99f8-1db87fff8b44 ;;; korea-util.el ends here diff --git a/lisp/language/korean.el b/lisp/language/korean.el index cff885a4d47..acb9fea268d 100644 --- a/lisp/language/korean.el +++ b/lisp/language/korean.el @@ -1,9 +1,8 @@ ;;; korean.el --- support for Korean -*- coding: iso-2022-7bit; no-byte-compile: t -*- -;; Copyright (C) 1998, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1998, 2001-2011 Free Software Foundation, Inc. ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 +;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 ;; Copyright (C) 2003 @@ -87,5 +86,4 @@ and the following key bindings are available within Korean input methods: (provide 'korean) -;; arch-tag: ca7c7348-5ca3-4623-887a-7fd33d725d0e ;;; korean.el ends here diff --git a/lisp/language/lao-util.el b/lisp/language/lao-util.el index 175338bc997..81c5577fa57 100644 --- a/lisp/language/lao-util.el +++ b/lisp/language/lao-util.el @@ -1,9 +1,8 @@ ;;; lao-util.el --- utilities for Lao -*- coding: iso-2022-7bit; -*- -;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2001-2011 Free Software Foundation, Inc. ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 +;; 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 ;; Copyright (C) 2003 @@ -516,5 +515,4 @@ syllable. In that case, FROM and TO are indexes to STR." ;; (provide 'lao-util) -;; arch-tag: 1f828781-3cb8-4695-88af-8f33222338ce ;;; lao-util.el ends here diff --git a/lisp/language/lao.el b/lisp/language/lao.el index f7a9ddfa419..c09c6f8a0ef 100644 --- a/lisp/language/lao.el +++ b/lisp/language/lao.el @@ -1,9 +1,8 @@ ;;; lao.el --- support for Lao -*- coding: utf-8; no-byte-compile: t -*- -;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2001-2011 Free Software Foundation, Inc. ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 +;; 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 ;; Copyright (C) 2003 @@ -83,5 +82,4 @@ (provide 'lao) -;; arch-tag: ba540fd9-6352-4449-a9cd-669afd21fa57 ;;; lao.el ends here diff --git a/lisp/language/misc-lang.el b/lisp/language/misc-lang.el index e2e4f29dd9e..6fa54ff5c80 100644 --- a/lisp/language/misc-lang.el +++ b/lisp/language/misc-lang.el @@ -1,7 +1,7 @@ ;;; misc-lang.el --- support for miscellaneous languages (characters) -*- no-byte-compile: t -*- ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 +;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 @@ -74,5 +74,4 @@ and Italian."))) (provide 'misc-lang) -;; arch-tag: 6953585c-1a1a-4c09-be82-a2518afb6074 ;;; misc-lang.el ends here diff --git a/lisp/language/romanian.el b/lisp/language/romanian.el index 316293ea827..b9c250fd700 100644 --- a/lisp/language/romanian.el +++ b/lisp/language/romanian.el @@ -1,7 +1,6 @@ ;;; romanian.el --- support for Romanian -*- coding: iso-latin-2; no-byte-compile: t -*- -;; Copyright (C) 1998, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation. +;; Copyright (C) 1998, 2001-2011 Free Software Foundation, Inc. ;; Author: Dan Nicolaescu <done@ece.arizona.edu> ;; Keywords: multilingual, Romanian, i18n @@ -52,5 +51,4 @@ An environment for generic Latin-10 encoding is also available.")) (provide 'romanian) -;; arch-tag: a0bf93ee-2f02-4678-a477-c08acc35366b ;;; romanian.el ends here diff --git a/lisp/language/sinhala.el b/lisp/language/sinhala.el index 37a7bc6b465..ea8a6a34cd8 100644 --- a/lisp/language/sinhala.el +++ b/lisp/language/sinhala.el @@ -1,6 +1,6 @@ ;;; sinhala.el --- support for Sinhala -*- coding: utf-8; no-byte-compile: t -*- -;; Copyright (C) 2008, 2009, 2010 +;; Copyright (C) 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H13PRO009 @@ -45,5 +45,4 @@ "[\u0D80-\u0DFF]") 0 'font-shape-gstring))) -;; arch-tag: 87b9ad3b-5090-422f-b942-eb85b9d52e7c ;; sinhala.el ends here diff --git a/lisp/language/slovak.el b/lisp/language/slovak.el index 620fc1af8d5..94aa5fdc94c 100644 --- a/lisp/language/slovak.el +++ b/lisp/language/slovak.el @@ -1,7 +1,6 @@ ;;; slovak.el --- support for Slovak -*- coding: iso-2022-7bit; no-byte-compile: t -*- -;; Copyright (C) 1998, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation. +;; Copyright (C) 1998, 2001-2011 Free Software Foundation, Inc. ;; Authors: Tibor ,B)(Bimko <tibor.simko@fmph.uniba.sk>, ;; Milan Zamazal <pdm@zamazal.org> @@ -46,5 +45,4 @@ and selects the Slovak tutorial.")) (provide 'slovak) -;; arch-tag: 1bae098a-33b2-4426-8c29-59e44fe05484 ;;; slovak.el ends here diff --git a/lisp/language/tai-viet.el b/lisp/language/tai-viet.el index 25ac901a642..f6e525b0d25 100644 --- a/lisp/language/tai-viet.el +++ b/lisp/language/tai-viet.el @@ -1,9 +1,9 @@ ;;; tai-viet.el --- support for Tai Viet -*- coding: utf-8; no-byte-compile: t -*- -;; Copyright (C) 2007, 2008, 2009, 2010 +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. +;; Copyright (C) 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H13PRO009 -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. ;; Keywords: multilingual, Tai Viet, i18n @@ -61,5 +61,3 @@ is available at this web page: ;; Local Variables: ;; coding: utf-8 ;; End: - -;; arch-tag: db4e3377-2ba7-47a0-b173-e44420d540c3 diff --git a/lisp/language/thai-util.el b/lisp/language/thai-util.el index ddde5b29bac..b7dbcc1a956 100644 --- a/lisp/language/thai-util.el +++ b/lisp/language/thai-util.el @@ -1,11 +1,10 @@ ;;; thai-util.el --- utilities for Thai -*- coding: utf-8; -*- +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 +;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. ;; Keywords: mule, multilingual, Thai, i18n @@ -282,5 +281,4 @@ The commands affected are \\[forward-word], \\[backward-word], \\[kill-word], \\ ;; (provide 'thai-util) -;; arch-tag: 59425d6a-8cf9-4e06-a6ab-8ab7dc7a7a97 ;;; thai-util.el ends here diff --git a/lisp/language/thai-word.el b/lisp/language/thai-word.el index 3e382e34fc2..5cb13e08fd6 100644 --- a/lisp/language/thai-word.el +++ b/lisp/language/thai-word.el @@ -1,6 +1,6 @@ ;;; thai-word.el -- find Thai word boundaries -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 @@ -11077,4 +11077,3 @@ With argument, do this that many times." ;; end of thai-word.el -;; arch-tag: 29927f02-e177-4224-a270-7e67210b038a diff --git a/lisp/language/thai.el b/lisp/language/thai.el index f61e0968ad0..dd28ec77edb 100644 --- a/lisp/language/thai.el +++ b/lisp/language/thai.el @@ -1,14 +1,13 @@ ;;; thai.el --- support for Thai -*- coding: iso-2022-7bit; no-byte-compile: t -*- +;; Copyright (C) 1997-1998, 2000-2011 Free Software Foundation, Inc. ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 +;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H13PRO009 ;; Copyright (C) 2005 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 -;; Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. ;; Keywords: multilingual, Thai, i18n @@ -85,5 +84,4 @@ This is the same as `thai-tis620' with the addition of no-break-space." (provide 'thai) -;; arch-tag: c7eb0e91-4db0-4619-81f8-8762e7d51e15 ;;; thai.el ends here diff --git a/lisp/language/tibet-util.el b/lisp/language/tibet-util.el index 303ea61e1dc..8458974e753 100644 --- a/lisp/language/tibet-util.el +++ b/lisp/language/tibet-util.el @@ -1,9 +1,8 @@ ;;; tibet-util.el --- utilities for Tibetan -*- coding: iso-2022-7bit; -*- -;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1997, 2001-2011 Free Software Foundation, Inc. ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 +;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 @@ -421,5 +420,4 @@ before writing buffer in Unicode. See also (provide 'tibet-util) -;; arch-tag: 7a7333e8-1584-446c-b39c-a02b9def265d ;;; tibet-util.el ends here diff --git a/lisp/language/tibetan.el b/lisp/language/tibetan.el index f7e71eae16f..a23645bae1f 100644 --- a/lisp/language/tibetan.el +++ b/lisp/language/tibetan.el @@ -1,9 +1,8 @@ ;;; tibetan.el --- support for Tibetan language -*- coding: iso-2022-7bit; -*- -;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997, 2001-2011 Free Software Foundation, Inc. ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 +;; 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 ;; Copyright (C) 2003 @@ -611,5 +610,4 @@ This also matches some punctuation characters which need conversion.") (provide 'tibetan) -;; arch-tag: 8d37c8d7-f95d-450f-9ec2-819e61fc79a7 ;;; tibetan.el ends here diff --git a/lisp/language/tv-util.el b/lisp/language/tv-util.el index 67ed6327971..400856d1aa3 100644 --- a/lisp/language/tv-util.el +++ b/lisp/language/tv-util.el @@ -1,6 +1,6 @@ ;;; tv-util.el --- support for Tai Viet -*- coding: utf-8 -*- -;; Copyright (C) 2007, 2008, 2009, 2010 +;; Copyright (C) 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H13PRO009 @@ -139,4 +139,3 @@ ;; (provide 'tai-viet-util) -;; arch-tag: a45ac3fc-07d0-44d5-8841-2ebea7e11f5b diff --git a/lisp/language/utf-8-lang.el b/lisp/language/utf-8-lang.el index 7ecaffcfabe..dd840772218 100644 --- a/lisp/language/utf-8-lang.el +++ b/lisp/language/utf-8-lang.el @@ -1,7 +1,6 @@ ;;; utf-8-lang.el --- generic UTF-8 language environment -*- no-byte-compile: t -*- -;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2001-2011 Free Software Foundation, Inc. ;; Author: Dave Love <fx@gnu.org> ;; Keywords: i18n @@ -52,5 +51,4 @@ encoded in UTF-8.")) (provide 'utf-8-lang) -;; arch-tag: dfa339e1-296f-4b1e-9fe8-2b65279ec813 ;;; utf-8-lang.el ends here diff --git a/lisp/language/viet-util.el b/lisp/language/viet-util.el index 9a2ccc14371..ea601c041e4 100644 --- a/lisp/language/viet-util.el +++ b/lisp/language/viet-util.el @@ -1,9 +1,8 @@ ;;; viet-util.el --- utilities for Vietnamese -*- coding: iso-2022-7bit; -*- -;; Copyright (C) 1998, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1998, 2001-2011 Free Software Foundation, Inc. ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 +;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 ;; Copyright (C) 2003 @@ -296,5 +295,4 @@ positions (integers or markers) specifying the stretch of the region." ;;; (provide 'viet-util) -;; arch-tag: 082a4d3b-168f-45b4-b3e1-82bfa1b5a194 ;;; viet-util.el ends here diff --git a/lisp/language/vietnamese.el b/lisp/language/vietnamese.el index 43bb5c5845f..97d5037f3c5 100644 --- a/lisp/language/vietnamese.el +++ b/lisp/language/vietnamese.el @@ -1,9 +1,8 @@ ;;; vietnamese.el --- support for Vietnamese -*- coding: iso-2022-7bit; -*- -;; Copyright (C) 1998, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1998, 2001-2011 Free Software Foundation, Inc. ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 +;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 ;; Copyright (C) 2003 @@ -110,5 +109,4 @@ Telex, VIQR is the default setting."))) (provide 'vietnamese) -;; arch-tag: 5bd4f1aa-2d4e-4f33-b7d8-0679c6a19ee6 ;;; vietnamese.el ends here diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index 7d7e0fdb6bd..df19537688e 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -1945,7 +1945,7 @@ a reflection. ;;;;;; bookmark-save bookmark-write bookmark-delete bookmark-insert ;;;;;; bookmark-rename bookmark-insert-location bookmark-relocate ;;;;;; bookmark-jump-other-window bookmark-jump bookmark-set) "bookmark" -;;;;;; "bookmark.el" (19714 43298)) +;;;;;; "bookmark.el" (19717 39999)) ;;; Generated autoloads from bookmark.el (define-key ctl-x-r-map "b" 'bookmark-jump) (define-key ctl-x-r-map "m" 'bookmark-set) @@ -2529,24 +2529,6 @@ columns on its right towards the left. ;;;*** -;;;### (autoloads (list-buffers) "buff-menu" "buff-menu.el" (19714 -;;;;;; 43298)) -;;; Generated autoloads from buff-menu.el - -(define-key ctl-x-map "" 'list-buffers) - -(autoload 'list-buffers "buff-menu" "\ -Display a list of names of existing buffers. -The list is displayed in a buffer named `*Buffer List*'. -Note that buffers with names starting with spaces are omitted. -Non-null optional arg FILES-ONLY means mention only file buffers. - -For more information, see the function `buffer-menu'. - -\(fn &optional FILES-ONLY)" t nil) - -;;;*** - ;;;### (autoloads (bug-reference-prog-mode bug-reference-mode) "bug-reference" ;;;;;; "progmodes/bug-reference.el" (19562 42953)) ;;; Generated autoloads from progmodes/bug-reference.el @@ -2569,7 +2551,7 @@ Like `bug-reference-mode', but only buttonize in comments and strings. ;;;;;; batch-byte-compile-if-not-done display-call-tree byte-compile ;;;;;; compile-defun byte-compile-file byte-recompile-directory ;;;;;; byte-force-recompile byte-compile-enable-warning byte-compile-disable-warning) -;;;;;; "bytecomp" "emacs-lisp/bytecomp.el" (19714 43298)) +;;;;;; "bytecomp" "emacs-lisp/bytecomp.el" (19737 17936)) ;;; Generated autoloads from emacs-lisp/bytecomp.el (put 'byte-compile-dynamic 'safe-local-variable 'booleanp) (put 'byte-compile-disable-print-circle 'safe-local-variable 'booleanp) @@ -2930,7 +2912,7 @@ Obsoletes `c-forward-into-nomenclature'. ;;;*** ;;;### (autoloads (c-guess-basic-syntax) "cc-engine" "progmodes/cc-engine.el" -;;;;;; (19640 47194)) +;;;;;; (19717 39999)) ;;; Generated autoloads from progmodes/cc-engine.el (autoload 'c-guess-basic-syntax "cc-engine" "\ @@ -4204,42 +4186,6 @@ Enable dynamic word-completion. ;;;*** -;;;### (autoloads (global-auto-composition-mode auto-composition-mode -;;;;;; encode-composition-rule) "composite" "composite.el" (19714 -;;;;;; 43298)) -;;; Generated autoloads from composite.el - -(autoload 'encode-composition-rule "composite" "\ -Encode composition rule RULE into an integer value. -RULE is a cons of global and new reference point symbols -\(see `reference-point-alist'). - -\(fn RULE)" nil nil) - -(autoload 'auto-composition-mode "composite" "\ -Toggle Auto Composition mode. -With ARG, turn Auto Composition mode off if and only if ARG is a non-positive -number; if ARG is nil, toggle Auto Composition mode; anything else turns Auto -Composition on. - -When Auto Composition is enabled, text characters are automatically composed -by functions registered in `composition-function-table' (which see). - -You can use `global-auto-composition-mode' to turn on -Auto Composition mode in all buffers (this is the default). - -\(fn &optional ARG)" t nil) - -(autoload 'global-auto-composition-mode "composite" "\ -Toggle Auto-Composition mode in every possible buffer. -With prefix arg, turn Global-Auto-Composition mode on if and only if arg -is positive. -See `auto-composition-mode' for more information on Auto-Composition mode. - -\(fn &optional ARG)" t nil) - -;;;*** - ;;;### (autoloads (conf-xdefaults-mode conf-ppd-mode conf-colon-mode ;;;;;; conf-space-keywords conf-space-mode conf-javaprop-mode conf-windows-mode ;;;;;; conf-unix-mode conf-mode) "conf-mode" "textmodes/conf-mode.el" @@ -7256,7 +7202,7 @@ an EDE controlled project. ;;;### (autoloads (edebug-all-forms edebug-all-defs edebug-eval-top-level-form ;;;;;; edebug-basic-spec edebug-all-forms edebug-all-defs) "edebug" -;;;;;; "emacs-lisp/edebug.el" (19714 43298)) +;;;;;; "emacs-lisp/edebug.el" (19720 57265)) ;;; Generated autoloads from emacs-lisp/edebug.el (defvar edebug-all-defs nil "\ @@ -7571,13 +7517,6 @@ Not documented ;;;*** -;;;### (autoloads nil "ediff-hook" "vc/ediff-hook.el" (19598 13691)) -;;; Generated autoloads from vc/ediff-hook.el - -(if (featurep 'xemacs) (progn (defun ediff-xemacs-init-menus nil (when (featurep 'menubar) (add-submenu '("Tools") ediff-menu "OO-Browser...") (add-submenu '("Tools") ediff-merge-menu "OO-Browser...") (add-submenu '("Tools") epatch-menu "OO-Browser...") (add-submenu '("Tools") ediff-misc-menu "OO-Browser...") (add-menu-button '("Tools") "-------" "OO-Browser..."))) (defvar ediff-menu '("Compare" ["Two Files..." ediff-files t] ["Two Buffers..." ediff-buffers t] ["Three Files..." ediff-files3 t] ["Three Buffers..." ediff-buffers3 t] "---" ["Two Directories..." ediff-directories t] ["Three Directories..." ediff-directories3 t] "---" ["File with Revision..." ediff-revision t] ["Directory Revisions..." ediff-directory-revisions t] "---" ["Windows Word-by-word..." ediff-windows-wordwise t] ["Windows Line-by-line..." ediff-windows-linewise t] "---" ["Regions Word-by-word..." ediff-regions-wordwise t] ["Regions Line-by-line..." ediff-regions-linewise t])) (defvar ediff-merge-menu '("Merge" ["Files..." ediff-merge-files t] ["Files with Ancestor..." ediff-merge-files-with-ancestor t] ["Buffers..." ediff-merge-buffers t] ["Buffers with Ancestor..." ediff-merge-buffers-with-ancestor t] "---" ["Directories..." ediff-merge-directories t] ["Directories with Ancestor..." ediff-merge-directories-with-ancestor t] "---" ["Revisions..." ediff-merge-revisions t] ["Revisions with Ancestor..." ediff-merge-revisions-with-ancestor t] ["Directory Revisions..." ediff-merge-directory-revisions t] ["Directory Revisions with Ancestor..." ediff-merge-directory-revisions-with-ancestor t])) (defvar epatch-menu '("Apply Patch" ["To a file..." ediff-patch-file t] ["To a buffer..." ediff-patch-buffer t])) (defvar ediff-misc-menu '("Ediff Miscellanea" ["Ediff Manual" ediff-documentation t] ["Customize Ediff" ediff-customize t] ["List Ediff Sessions" ediff-show-registry t] ["Use separate frame for Ediff control buffer" ediff-toggle-multiframe :style toggle :selected (if (and (featurep 'ediff-util) (boundp 'ediff-window-setup-function)) (eq ediff-window-setup-function 'ediff-setup-windows-multiframe))] ["Use a toolbar with Ediff control buffer" ediff-toggle-use-toolbar :style toggle :selected (if (featurep 'ediff-tbar) (ediff-use-toolbar-p))])) (if (and (featurep 'menubar) (not (featurep 'infodock)) (not (featurep 'ediff-hook))) (ediff-xemacs-init-menus))) (defvar menu-bar-ediff-misc-menu (make-sparse-keymap "Ediff Miscellanea")) (fset 'menu-bar-ediff-misc-menu (symbol-value 'menu-bar-ediff-misc-menu)) (defvar menu-bar-epatch-menu (make-sparse-keymap "Apply Patch")) (fset 'menu-bar-epatch-menu (symbol-value 'menu-bar-epatch-menu)) (defvar menu-bar-ediff-merge-menu (make-sparse-keymap "Merge")) (fset 'menu-bar-ediff-merge-menu (symbol-value 'menu-bar-ediff-merge-menu)) (defvar menu-bar-ediff-menu (make-sparse-keymap "Compare")) (fset 'menu-bar-ediff-menu (symbol-value 'menu-bar-ediff-menu)) (define-key menu-bar-ediff-menu [ediff-misc] `(menu-item ,(purecopy "Ediff Miscellanea") menu-bar-ediff-misc-menu)) (define-key menu-bar-ediff-menu [separator-ediff-misc] menu-bar-separator) (define-key menu-bar-ediff-menu [window] `(menu-item ,(purecopy "This Window and Next Window") compare-windows :help ,(purecopy "Compare the current window and the next window"))) (define-key menu-bar-ediff-menu [ediff-windows-linewise] `(menu-item ,(purecopy "Windows Line-by-line...") ediff-windows-linewise :help ,(purecopy "Compare windows line-wise"))) (define-key menu-bar-ediff-menu [ediff-windows-wordwise] `(menu-item ,(purecopy "Windows Word-by-word...") ediff-windows-wordwise :help ,(purecopy "Compare windows word-wise"))) (define-key menu-bar-ediff-menu [separator-ediff-windows] menu-bar-separator) (define-key menu-bar-ediff-menu [ediff-regions-linewise] `(menu-item ,(purecopy "Regions Line-by-line...") ediff-regions-linewise :help ,(purecopy "Compare regions line-wise"))) (define-key menu-bar-ediff-menu [ediff-regions-wordwise] `(menu-item ,(purecopy "Regions Word-by-word...") ediff-regions-wordwise :help ,(purecopy "Compare regions word-wise"))) (define-key menu-bar-ediff-menu [separator-ediff-regions] menu-bar-separator) (define-key menu-bar-ediff-menu [ediff-dir-revision] `(menu-item ,(purecopy "Directory Revisions...") ediff-directory-revisions :help ,(purecopy "Compare directory files with their older versions"))) (define-key menu-bar-ediff-menu [ediff-revision] `(menu-item ,(purecopy "File with Revision...") ediff-revision :help ,(purecopy "Compare file with its older versions"))) (define-key menu-bar-ediff-menu [separator-ediff-directories] menu-bar-separator) (define-key menu-bar-ediff-menu [ediff-directories3] `(menu-item ,(purecopy "Three Directories...") ediff-directories3 :help ,(purecopy "Compare files common to three directories simultaneously"))) (define-key menu-bar-ediff-menu [ediff-directories] `(menu-item ,(purecopy "Two Directories...") ediff-directories :help ,(purecopy "Compare files common to two directories simultaneously"))) (define-key menu-bar-ediff-menu [separator-ediff-files] menu-bar-separator) (define-key menu-bar-ediff-menu [ediff-buffers3] `(menu-item ,(purecopy "Three Buffers...") ediff-buffers3 :help ,(purecopy "Compare three buffers simultaneously"))) (define-key menu-bar-ediff-menu [ediff-files3] `(menu-item ,(purecopy "Three Files...") ediff-files3 :help ,(purecopy "Compare three files simultaneously"))) (define-key menu-bar-ediff-menu [ediff-buffers] `(menu-item ,(purecopy "Two Buffers...") ediff-buffers :help ,(purecopy "Compare two buffers simultaneously"))) (define-key menu-bar-ediff-menu [ediff-files] `(menu-item ,(purecopy "Two Files...") ediff-files :help ,(purecopy "Compare two files simultaneously"))) (define-key menu-bar-ediff-merge-menu [ediff-merge-dir-revisions-with-ancestor] `(menu-item ,(purecopy "Directory Revisions with Ancestor...") ediff-merge-directory-revisions-with-ancestor :help ,(purecopy "Merge versions of the files in the same directory by comparing the files with common ancestors"))) (define-key menu-bar-ediff-merge-menu [ediff-merge-dir-revisions] `(menu-item ,(purecopy "Directory Revisions...") ediff-merge-directory-revisions :help ,(purecopy "Merge versions of the files in the same directory (without using ancestor information)"))) (define-key menu-bar-ediff-merge-menu [ediff-merge-revisions-with-ancestor] `(menu-item ,(purecopy "Revisions with Ancestor...") ediff-merge-revisions-with-ancestor :help ,(purecopy "Merge versions of the same file by comparing them with a common ancestor"))) (define-key menu-bar-ediff-merge-menu [ediff-merge-revisions] `(menu-item ,(purecopy "Revisions...") ediff-merge-revisions :help ,(purecopy "Merge versions of the same file (without using ancestor information)"))) (define-key menu-bar-ediff-merge-menu [separator-ediff-merge] menu-bar-separator) (define-key menu-bar-ediff-merge-menu [ediff-merge-directories-with-ancestor] `(menu-item ,(purecopy "Directories with Ancestor...") ediff-merge-directories-with-ancestor :help ,(purecopy "Merge files common to a pair of directories by comparing the files with common ancestors"))) (define-key menu-bar-ediff-merge-menu [ediff-merge-directories] `(menu-item ,(purecopy "Directories...") ediff-merge-directories :help ,(purecopy "Merge files common to a pair of directories"))) (define-key menu-bar-ediff-merge-menu [separator-ediff-merge-dirs] menu-bar-separator) (define-key menu-bar-ediff-merge-menu [ediff-merge-buffers-with-ancestor] `(menu-item ,(purecopy "Buffers with Ancestor...") ediff-merge-buffers-with-ancestor :help ,(purecopy "Merge buffers by comparing their contents with a common ancestor"))) (define-key menu-bar-ediff-merge-menu [ediff-merge-buffers] `(menu-item ,(purecopy "Buffers...") ediff-merge-buffers :help ,(purecopy "Merge buffers (without using ancestor information)"))) (define-key menu-bar-ediff-merge-menu [ediff-merge-files-with-ancestor] `(menu-item ,(purecopy "Files with Ancestor...") ediff-merge-files-with-ancestor :help ,(purecopy "Merge files by comparing them with a common ancestor"))) (define-key menu-bar-ediff-merge-menu [ediff-merge-files] `(menu-item ,(purecopy "Files...") ediff-merge-files :help ,(purecopy "Merge files (without using ancestor information)"))) (define-key menu-bar-epatch-menu [ediff-patch-buffer] `(menu-item ,(purecopy "To a Buffer...") ediff-patch-buffer :help ,(purecopy "Apply a patch to the contents of a buffer"))) (define-key menu-bar-epatch-menu [ediff-patch-file] `(menu-item ,(purecopy "To a File...") ediff-patch-file :help ,(purecopy "Apply a patch to a file"))) (define-key menu-bar-ediff-misc-menu [emultiframe] `(menu-item ,(purecopy "Use separate control buffer frame") ediff-toggle-multiframe :help ,(purecopy "Switch between the single-frame presentation mode and the multi-frame mode"))) (define-key menu-bar-ediff-misc-menu [eregistry] `(menu-item ,(purecopy "List Ediff Sessions") ediff-show-registry :help ,(purecopy "List all active Ediff sessions; it is a convenient way to find and resume such a session"))) (define-key menu-bar-ediff-misc-menu [ediff-cust] `(menu-item ,(purecopy "Customize Ediff") ediff-customize :help ,(purecopy "Change some of the parameters that govern the behavior of Ediff"))) (define-key menu-bar-ediff-misc-menu [ediff-doc] `(menu-item ,(purecopy "Ediff Manual") ediff-documentation :help ,(purecopy "Bring up the Ediff manual")))) - -;;;*** - ;;;### (autoloads (ediff-show-registry) "ediff-mult" "vc/ediff-mult.el" ;;;;;; (19598 13691)) ;;; Generated autoloads from vc/ediff-mult.el @@ -10658,13 +10597,6 @@ in your `~/.emacs' file, replacing [f7] by your favourite key: ;;;*** -;;;### (autoloads nil "font-core" "font-core.el" (19640 47194)) -;;; Generated autoloads from font-core.el - -(put 'font-lock-defaults 'risky-local-variable t) - -;;;*** - ;;;### (autoloads (footnote-mode) "footnote" "mail/footnote.el" (19562 ;;;;;; 42953)) ;;; Generated autoloads from mail/footnote.el @@ -10679,13 +10611,6 @@ started, play around with the following keys: ;;;*** -;;;### (autoloads nil "format" "format.el" (19598 13691)) -;;; Generated autoloads from format.el - -(put 'format-alist 'risky-local-variable t) - -;;;*** - ;;;### (autoloads (forms-find-file-other-window forms-find-file forms-mode) ;;;;;; "forms" "forms.el" (19562 42953)) ;;; Generated autoloads from forms.el @@ -11403,7 +11328,7 @@ FILE should be a PNG file that's 48x48 and smaller than or equal to ;;;*** ;;;### (autoloads (gnus-treat-mail-gravatar gnus-treat-from-gravatar) -;;;;;; "gnus-gravatar" "gnus/gnus-gravatar.el" (19714 43298)) +;;;;;; "gnus-gravatar" "gnus/gnus-gravatar.el" (19717 39999)) ;;; Generated autoloads from gnus/gnus-gravatar.el (autoload 'gnus-treat-from-gravatar "gnus-gravatar" "\ @@ -14035,7 +13960,7 @@ DEF, if non-nil, is the default value. ;;;*** -;;;### (autoloads (ielm) "ielm" "ielm.el" (19591 62571)) +;;;### (autoloads (ielm) "ielm" "ielm.el" (19720 64949)) ;;; Generated autoloads from ielm.el (add-hook 'same-window-buffer-names (purecopy "*ielm*")) @@ -16850,20 +16775,13 @@ Returns non-nil if the new state is enabled. ;;;*** -;;;### (autoloads nil "menu-bar" "menu-bar.el" (19714 43298)) -;;; Generated autoloads from menu-bar.el - -(put 'menu-bar-mode 'standard-value '(t)) - -;;;*** - ;;;### (autoloads (message-unbold-region message-bold-region message-news-other-frame ;;;;;; message-news-other-window message-mail-other-frame message-mail-other-window ;;;;;; message-bounce message-resend message-insinuate-rmail message-forward-rmail-make-body ;;;;;; message-forward-make-body message-forward message-recover ;;;;;; message-supersede message-cancel-news message-followup message-wide-reply ;;;;;; message-reply message-news message-mail message-mode) "message" -;;;;;; "gnus/message.el" (19714 43298)) +;;;;;; "gnus/message.el" (19717 39999)) ;;; Generated autoloads from gnus/message.el (define-mail-user-agent 'message-user-agent 'message-mail 'message-send-and-exit 'message-kill-buffer 'message-send-hook) @@ -17766,14 +17684,6 @@ different buffer menu using the function `msb'. ;;;*** -;;;### (autoloads nil "mule-cmds" "international/mule-cmds.el" (19714 -;;;;;; 43298)) -;;; Generated autoloads from international/mule-cmds.el - -(put 'input-method-alist 'risky-local-variable t) - -;;;*** - ;;;### (autoloads (font-show-log mule-diag list-input-methods list-fontsets ;;;;;; describe-fontset describe-font list-coding-categories list-coding-systems ;;;;;; describe-current-coding-system describe-current-coding-system-briefly @@ -18633,12 +18543,13 @@ the variable `nxml-enabled-unicode-blocks'. ;;;;;; org-babel-next-src-block org-babel-goto-named-result org-babel-goto-named-src-block ;;;;;; org-babel-goto-src-block-head org-babel-hide-result-toggle-maybe ;;;;;; org-babel-sha1-hash org-babel-execute-subtree org-babel-execute-buffer -;;;;;; org-babel-open-src-block-result org-babel-switch-to-session-with-code -;;;;;; org-babel-switch-to-session org-babel-initiate-session org-babel-load-in-session -;;;;;; org-babel-expand-src-block org-babel-execute-src-block org-babel-pop-to-session-maybe +;;;;;; org-babel-map-src-blocks org-babel-open-src-block-result +;;;;;; org-babel-switch-to-session-with-code org-babel-switch-to-session +;;;;;; org-babel-initiate-session org-babel-load-in-session org-babel-expand-src-block +;;;;;; org-babel-execute-src-block org-babel-pop-to-session-maybe ;;;;;; org-babel-load-in-session-maybe org-babel-expand-src-block-maybe ;;;;;; org-babel-execute-maybe org-babel-execute-safely-maybe) "ob" -;;;;;; "org/ob.el" (19714 43298)) +;;;;;; "org/ob.el" (19717 39999)) ;;; Generated autoloads from org/ob.el (autoload 'org-babel-execute-safely-maybe "ob" "\ @@ -18735,6 +18646,32 @@ results already exist. \(fn &optional RE-RUN)" t nil) +(autoload 'org-babel-map-src-blocks "ob" "\ +Evaluate BODY forms on each source-block in FILE. +If FILE is nil evaluate BODY forms on source blocks in current +buffer. During evaluation of BODY the following local variables +are set relative to the currently matched code block. + +full-block ------- string holding the entirety of the code block +beg-block -------- point at the beginning of the code block +end-block -------- point at the end of the matched code block +lang ------------- string holding the language of the code block +beg-lang --------- point at the beginning of the lang +end-lang --------- point at the end of the lang +switches --------- string holding the switches +beg-switches ----- point at the beginning of the switches +end-switches ----- point at the end of the switches +header-args ------ string holding the header-args +beg-header-args -- point at the beginning of the header-args +end-header-args -- point at the end of the header-args +body ------------- string holding the body of the code block +beg-body --------- point at the beginning of the body +end-body --------- point at the end of the body + +\(fn FILE &rest BODY)" nil (quote macro)) + +(put 'org-babel-map-src-blocks 'lisp-indent-function '1) + (autoload 'org-babel-execute-buffer "ob" "\ Execute source code blocks in a buffer. Call `org-babel-execute-src-block' on every source block in @@ -18794,7 +18731,7 @@ Mark current src block ;;;*** ;;;### (autoloads (org-babel-describe-bindings) "ob-keys" "org/ob-keys.el" -;;;;;; (19714 43298)) +;;;;;; (19717 39999)) ;;; Generated autoloads from org/ob-keys.el (autoload 'org-babel-describe-bindings "ob-keys" "\ @@ -18805,7 +18742,7 @@ Describe all keybindings behind `org-babel-key-prefix'. ;;;*** ;;;### (autoloads (org-babel-lob-get-info org-babel-lob-execute-maybe -;;;;;; org-babel-lob-ingest) "ob-lob" "org/ob-lob.el" (19714 43298)) +;;;;;; org-babel-lob-ingest) "ob-lob" "org/ob-lob.el" (19717 39999)) ;;; Generated autoloads from org/ob-lob.el (autoload 'org-babel-lob-ingest "ob-lob" "\ @@ -18830,7 +18767,7 @@ Return a Library of Babel function call as a string. ;;;### (autoloads (org-babel-tangle org-babel-tangle-file org-babel-load-file ;;;;;; org-babel-tangle-lang-exts) "ob-tangle" "org/ob-tangle.el" -;;;;;; (19714 43298)) +;;;;;; (19717 39999)) ;;; Generated autoloads from org/ob-tangle.el (defvar org-babel-tangle-lang-exts '(("emacs-lisp" . "el")) "\ @@ -18848,7 +18785,7 @@ This function exports the source code using `org-babel-tangle' and then loads the resulting file using `load-file'. -\(fn FILE)" nil nil) +\(fn FILE)" t nil) (autoload 'org-babel-tangle-file "ob-tangle" "\ Extract the bodies of source code blocks in FILE. @@ -18983,7 +18920,7 @@ including a reproducible test case and send the message. ;;;;;; org-insert-link-global org-store-link org-run-like-in-org-mode ;;;;;; turn-on-orgstruct++ turn-on-orgstruct orgstruct-mode org-global-cycle ;;;;;; org-mode org-babel-do-load-languages) "org" "org/org.el" -;;;;;; (19714 43298)) +;;;;;; (19717 39999)) ;;; Generated autoloads from org/org.el (autoload 'org-babel-do-load-languages "org" "\ @@ -19206,7 +19143,7 @@ Call the customize function with org as argument. ;;;;;; org-diary org-agenda-list-stuck-projects org-tags-view org-todo-list ;;;;;; org-search-view org-agenda-list org-batch-store-agenda-views ;;;;;; org-store-agenda-views org-batch-agenda-csv org-batch-agenda -;;;;;; org-agenda) "org-agenda" "org/org-agenda.el" (19714 43298)) +;;;;;; org-agenda) "org-agenda" "org/org-agenda.el" (19717 39999)) ;;; Generated autoloads from org/org-agenda.el (autoload 'org-agenda "org-agenda" "\ @@ -19313,13 +19250,13 @@ This feature is considered obsolete, please use the TODO list or a block agenda instead. With a numeric prefix argument in an interactive call, the agenda will -span INCLUDE-ALL days. Lisp programs should instead specify NDAYS to change -the number of days. NDAYS defaults to `org-agenda-ndays'. +span INCLUDE-ALL days. Lisp programs should instead specify SPAN to change +the number of days. SPAN defaults to `org-agenda-span'. START-DAY defaults to TODAY, or to the most recent match for the weekday given in `org-agenda-start-on-weekday'. -\(fn &optional INCLUDE-ALL START-DAY NDAYS)" t nil) +\(fn &optional INCLUDE-ALL START-DAY SPAN)" t nil) (autoload 'org-search-view "org-agenda" "\ Show all entries that contain a phrase or words or regular expressions. @@ -19456,7 +19393,7 @@ belonging to the \"Work\" category. ;;;### (autoloads (org-archive-subtree-default-with-confirmation ;;;;;; org-archive-subtree-default) "org-archive" "org/org-archive.el" -;;;;;; (19714 43298)) +;;;;;; (19717 39999)) ;;; Generated autoloads from org/org-archive.el (autoload 'org-archive-subtree-default "org-archive" "\ @@ -19476,8 +19413,8 @@ This command is set with the variable `org-archive-default-command'. ;;;### (autoloads (org-export-as-ascii org-export-region-as-ascii ;;;;;; org-replace-region-by-ascii org-export-as-ascii-to-buffer ;;;;;; org-export-as-utf8-to-buffer org-export-as-utf8 org-export-as-latin1-to-buffer -;;;;;; org-export-as-latin1) "org-ascii" "org/org-ascii.el" (19714 -;;;;;; 43298)) +;;;;;; org-export-as-latin1) "org-ascii" "org/org-ascii.el" (19717 +;;;;;; 39999)) ;;; Generated autoloads from org/org-ascii.el (autoload 'org-export-as-latin1 "org-ascii" "\ @@ -19550,8 +19487,8 @@ publishing directory. ;;;*** -;;;### (autoloads (org-attach) "org-attach" "org/org-attach.el" (19714 -;;;;;; 43298)) +;;;### (autoloads (org-attach) "org-attach" "org/org-attach.el" (19717 +;;;;;; 39999)) ;;; Generated autoloads from org/org-attach.el (autoload 'org-attach "org-attach" "\ @@ -19563,7 +19500,7 @@ Shows a list of commands and prompts for another key to execute a command. ;;;*** ;;;### (autoloads (org-bbdb-anniversaries) "org-bbdb" "org/org-bbdb.el" -;;;;;; (19714 43298)) +;;;;;; (19717 39999)) ;;; Generated autoloads from org/org-bbdb.el (autoload 'org-bbdb-anniversaries "org-bbdb" "\ @@ -19574,7 +19511,7 @@ Extract anniversaries from BBDB for display in the agenda. ;;;*** ;;;### (autoloads (org-capture-import-remember-templates org-capture-insert-template-here -;;;;;; org-capture) "org-capture" "org/org-capture.el" (19714 43298)) +;;;;;; org-capture) "org-capture" "org/org-capture.el" (19717 39999)) ;;; Generated autoloads from org/org-capture.el (autoload 'org-capture "org-capture" "\ @@ -19612,7 +19549,7 @@ Set org-capture-templates to be similar to `org-remember-templates'. ;;;*** ;;;### (autoloads (org-clock-persistence-insinuate org-get-clocktable) -;;;;;; "org-clock" "org/org-clock.el" (19714 43298)) +;;;;;; "org-clock" "org/org-clock.el" (19717 39999)) ;;; Generated autoloads from org/org-clock.el (autoload 'org-get-clocktable "org-clock" "\ @@ -19630,7 +19567,7 @@ Set up hooks for clock persistence. ;;;*** ;;;### (autoloads (org-datetree-find-date-create) "org-datetree" -;;;;;; "org/org-datetree.el" (19714 43298)) +;;;;;; "org/org-datetree.el" (19717 39999)) ;;; Generated autoloads from org/org-datetree.el (autoload 'org-datetree-find-date-create "org-datetree" "\ @@ -19646,7 +19583,7 @@ tree can be found. ;;;### (autoloads (org-export-as-docbook org-export-as-docbook-pdf-and-open ;;;;;; org-export-as-docbook-pdf org-export-region-as-docbook org-replace-region-by-docbook ;;;;;; org-export-as-docbook-to-buffer org-export-as-docbook-batch) -;;;;;; "org-docbook" "org/org-docbook.el" (19714 43298)) +;;;;;; "org-docbook" "org/org-docbook.el" (19717 39999)) ;;; Generated autoloads from org/org-docbook.el (autoload 'org-export-as-docbook-batch "org-docbook" "\ @@ -19723,7 +19660,7 @@ publishing directory. ;;;### (autoloads (org-insert-export-options-template org-export-as-org ;;;;;; org-export-visible org-export) "org-exp" "org/org-exp.el" -;;;;;; (19714 43298)) +;;;;;; (19717 39999)) ;;; Generated autoloads from org/org-exp.el (autoload 'org-export "org-exp" "\ @@ -19780,8 +19717,8 @@ Insert into the buffer a template with information for exporting. ;;;*** ;;;### (autoloads (org-feed-show-raw-feed org-feed-goto-inbox org-feed-update -;;;;;; org-feed-update-all) "org-feed" "org/org-feed.el" (19714 -;;;;;; 43298)) +;;;;;; org-feed-update-all) "org-feed" "org/org-feed.el" (19717 +;;;;;; 39999)) ;;; Generated autoloads from org/org-feed.el (autoload 'org-feed-update-all "org-feed" "\ @@ -19809,7 +19746,7 @@ Show the raw feed buffer of a feed. ;;;*** ;;;### (autoloads (org-footnote-normalize org-footnote-action) "org-footnote" -;;;;;; "org/org-footnote.el" (19714 43298)) +;;;;;; "org/org-footnote.el" (19717 39999)) ;;; Generated autoloads from org/org-footnote.el (autoload 'org-footnote-action "org-footnote" "\ @@ -19836,7 +19773,7 @@ referenced sequence. ;;;### (autoloads (org-freemind-to-org-mode org-freemind-from-org-sparse-tree ;;;;;; org-freemind-from-org-mode org-freemind-from-org-mode-node ;;;;;; org-freemind-show org-export-as-freemind) "org-freemind" -;;;;;; "org/org-freemind.el" (19714 43298)) +;;;;;; "org/org-freemind.el" (19717 39999)) ;;; Generated autoloads from org/org-freemind.el (autoload 'org-export-as-freemind "org-freemind" "\ @@ -19897,7 +19834,7 @@ Convert FreeMind file MM-FILE to `org-mode' file ORG-FILE. ;;;### (autoloads (org-export-htmlize-generate-css org-export-as-html ;;;;;; org-export-region-as-html org-replace-region-by-html org-export-as-html-to-buffer ;;;;;; org-export-as-html-batch org-export-as-html-and-open) "org-html" -;;;;;; "org/org-html.el" (19714 43298)) +;;;;;; "org/org-html.el" (19717 39999)) ;;; Generated autoloads from org/org-html.el (put 'org-export-html-style-include-default 'safe-local-variable 'booleanp) @@ -19991,7 +19928,7 @@ that uses these same face definitions. ;;;### (autoloads (org-export-icalendar-combine-agenda-files org-export-icalendar-all-agenda-files ;;;;;; org-export-icalendar-this-file) "org-icalendar" "org/org-icalendar.el" -;;;;;; (19714 43298)) +;;;;;; (19717 39999)) ;;; Generated autoloads from org/org-icalendar.el (autoload 'org-export-icalendar-this-file "org-icalendar" "\ @@ -20019,7 +19956,7 @@ The file is stored under the name `org-combined-agenda-icalendar-file'. ;;;### (autoloads (org-id-store-link org-id-find-id-file org-id-find ;;;;;; org-id-goto org-id-get-with-outline-drilling org-id-get-with-outline-path-completion ;;;;;; org-id-get org-id-copy org-id-get-create) "org-id" "org/org-id.el" -;;;;;; (19714 43298)) +;;;;;; (19717 39999)) ;;; Generated autoloads from org/org-id.el (autoload 'org-id-get-create "org-id" "\ @@ -20088,7 +20025,7 @@ Store a link to the current entry, using its ID. ;;;*** ;;;### (autoloads (org-indent-mode) "org-indent" "org/org-indent.el" -;;;;;; (19714 43298)) +;;;;;; (19717 39999)) ;;; Generated autoloads from org/org-indent.el (autoload 'org-indent-mode "org-indent" "\ @@ -20103,7 +20040,7 @@ FIXME: How to update when broken? ;;;*** ;;;### (autoloads (org-irc-store-link) "org-irc" "org/org-irc.el" -;;;;;; (19714 43298)) +;;;;;; (19717 39999)) ;;; Generated autoloads from org/org-irc.el (autoload 'org-irc-store-link "org-irc" "\ @@ -20116,7 +20053,7 @@ Dispatch to the appropriate function to store a link to an IRC session. ;;;### (autoloads (org-export-as-pdf-and-open org-export-as-pdf org-export-as-latex ;;;;;; org-export-region-as-latex org-replace-region-by-latex org-export-as-latex-to-buffer ;;;;;; org-export-as-latex-batch) "org-latex" "org/org-latex.el" -;;;;;; (19714 43298)) +;;;;;; (19717 39999)) ;;; Generated autoloads from org/org-latex.el (autoload 'org-export-as-latex-batch "org-latex" "\ @@ -20196,8 +20133,8 @@ Export as LaTeX, then process through to PDF, and open. ;;;*** ;;;### (autoloads (org-mobile-create-sumo-agenda org-mobile-pull -;;;;;; org-mobile-push) "org-mobile" "org/org-mobile.el" (19714 -;;;;;; 43298)) +;;;;;; org-mobile-push) "org-mobile" "org/org-mobile.el" (19717 +;;;;;; 39999)) ;;; Generated autoloads from org/org-mobile.el (autoload 'org-mobile-push "org-mobile" "\ @@ -20222,7 +20159,7 @@ Create a file that contains all custom agenda views. ;;;*** ;;;### (autoloads (org-plot/gnuplot) "org-plot" "org/org-plot.el" -;;;;;; (19714 43298)) +;;;;;; (19717 39999)) ;;; Generated autoloads from org/org-plot.el (autoload 'org-plot/gnuplot "org-plot" "\ @@ -20236,7 +20173,7 @@ line directly before or after the table. ;;;### (autoloads (org-publish-current-project org-publish-current-file ;;;;;; org-publish-all org-publish) "org-publish" "org/org-publish.el" -;;;;;; (19714 43298)) +;;;;;; (19717 39999)) ;;; Generated autoloads from org/org-publish.el (defalias 'org-publish-project 'org-publish) @@ -20270,7 +20207,7 @@ the project. ;;;### (autoloads (org-remember-handler org-remember org-remember-apply-template ;;;;;; org-remember-annotation org-remember-insinuate) "org-remember" -;;;;;; "org/org-remember.el" (19714 43298)) +;;;;;; "org/org-remember.el" (19717 39999)) ;;; Generated autoloads from org/org-remember.el (autoload 'org-remember-insinuate "org-remember" "\ @@ -20346,7 +20283,7 @@ See also the variable `org-reverse-note-order'. ;;;*** ;;;### (autoloads (org-table-to-lisp orgtbl-mode turn-on-orgtbl) -;;;;;; "org-table" "org/org-table.el" (19714 43298)) +;;;;;; "org-table" "org/org-table.el" (19717 39999)) ;;; Generated autoloads from org/org-table.el (autoload 'turn-on-orgtbl "org-table" "\ @@ -20370,7 +20307,7 @@ The table is taken from the parameter TXT, or from the buffer at point. ;;;*** ;;;### (autoloads (org-export-as-taskjuggler-and-open org-export-as-taskjuggler) -;;;;;; "org-taskjuggler" "org/org-taskjuggler.el" (19714 43298)) +;;;;;; "org-taskjuggler" "org/org-taskjuggler.el" (19717 39999)) ;;; Generated autoloads from org/org-taskjuggler.el (autoload 'org-export-as-taskjuggler "org-taskjuggler" "\ @@ -20398,7 +20335,7 @@ with the TaskJuggler GUI. ;;;### (autoloads (org-timer-set-timer org-timer-item org-timer-change-times-in-region ;;;;;; org-timer org-timer-start) "org-timer" "org/org-timer.el" -;;;;;; (19714 43298)) +;;;;;; (19717 39999)) ;;; Generated autoloads from org/org-timer.el (autoload 'org-timer-start "org-timer" "\ @@ -20459,7 +20396,7 @@ replace any running timer. ;;;*** ;;;### (autoloads (org-export-as-xoxo) "org-xoxo" "org/org-xoxo.el" -;;;;;; (19714 43298)) +;;;;;; (19717 39999)) ;;; Generated autoloads from org/org-xoxo.el (autoload 'org-export-as-xoxo "org-xoxo" "\ @@ -20787,7 +20724,7 @@ but before calling PC Selection mode): ;;;*** ;;;### (autoloads (pcase-let pcase-let* pcase) "pcase" "emacs-lisp/pcase.el" -;;;;;; (19714 43298)) +;;;;;; (19726 56598)) ;;; Generated autoloads from emacs-lisp/pcase.el (autoload 'pcase "pcase" "\ @@ -20801,6 +20738,7 @@ UPatterns can take the following forms: (and UPAT...) matches if all the patterns match. `QPAT matches if the QPattern QPAT matches. (pred PRED) matches if PRED applied to the object returns non-nil. + (let VAR EXP) matches anything and set VAR to the value of EXP. (guard BOOLEXP) matches if BOOLEXP evaluates to non-nil. QPatterns can take the following forms: @@ -22141,7 +22079,7 @@ With prefix argument \\[universal-prefix], prompt for the program to use. ;;;*** ;;;### (autoloads (open-protocol-stream) "proto-stream" "gnus/proto-stream.el" -;;;;;; (19714 43298)) +;;;;;; (19717 39999)) ;;; Generated autoloads from gnus/proto-stream.el (autoload 'open-protocol-stream "proto-stream" "\ @@ -22155,10 +22093,11 @@ is a string representing the capabilities of the server (if any). The PARAMETERS is a keyword list that can have the following values: -:type -- either `network', `tls', `shell' or `starttls'. If -omitted, the default is `network'. `network' will be -opportunistically upgraded to STARTTLS if both the server and -Emacs supports it. +:type -- either `network', `network-only, `tls', `shell' or +`starttls'. If omitted, the default is `network'. `network' +will be opportunistically upgraded to STARTTLS if both the server +and Emacs supports it. If you don't want STARTTLS upgrades, use +`network-only'. :end-of-command -- a regexp saying what the end of a command is. This defaults to \"\\n\". @@ -24886,7 +24825,7 @@ These are active only in the minibuffer, when entering or editing a formula: ;;;*** ;;;### (autoloads (html-mode sgml-mode) "sgml-mode" "textmodes/sgml-mode.el" -;;;;;; (19714 43298)) +;;;;;; (19717 39999)) ;;; Generated autoloads from textmodes/sgml-mode.el (autoload 'sgml-mode "sgml-mode" "\ @@ -30338,7 +30277,7 @@ mode-specific menu. `vc-annotate-color-map' and ;;;*** -;;;### (autoloads nil "vc-bzr" "vc/vc-bzr.el" (19714 43298)) +;;;### (autoloads nil "vc-bzr" "vc/vc-bzr.el" (19717 39999)) ;;; Generated autoloads from vc/vc-bzr.el (defconst vc-bzr-admin-dirname ".bzr" "\ @@ -30433,13 +30372,6 @@ case, and the process object in the asynchronous case. ;;;*** -;;;### (autoloads nil "vc-hooks" "vc/vc-hooks.el" (19640 47194)) -;;; Generated autoloads from vc/vc-hooks.el - -(put 'vc-mode 'risky-local-variable t) - -;;;*** - ;;;### (autoloads nil "vc-mtn" "vc/vc-mtn.el" (19714 43298)) ;;; Generated autoloads from vc/vc-mtn.el @@ -32302,13 +32234,6 @@ Default MODIFIER is 'shift. ;;;*** -;;;### (autoloads nil "window" "window.el" (19619 52030)) -;;; Generated autoloads from window.el - -(put 'special-display-buffer-names 'risky-local-variable t) - -;;;*** - ;;;### (autoloads (winner-mode winner-mode) "winner" "winner.el" ;;;;;; (19591 62571)) ;;; Generated autoloads from winner.el @@ -32636,27 +32561,26 @@ Zone out, completely. ;;;*** -;;;### (autoloads nil nil ("abbrev.el" "bindings.el" "button.el" -;;;;;; "calc/calc-aent.el" "calc/calc-alg.el" "calc/calc-arith.el" -;;;;;; "calc/calc-bin.el" "calc/calc-comb.el" "calc/calc-cplx.el" -;;;;;; "calc/calc-embed.el" "calc/calc-ext.el" "calc/calc-fin.el" -;;;;;; "calc/calc-forms.el" "calc/calc-frac.el" "calc/calc-funcs.el" -;;;;;; "calc/calc-graph.el" "calc/calc-help.el" "calc/calc-incom.el" -;;;;;; "calc/calc-keypd.el" "calc/calc-lang.el" "calc/calc-loaddefs.el" -;;;;;; "calc/calc-macs.el" "calc/calc-map.el" "calc/calc-math.el" -;;;;;; "calc/calc-menu.el" "calc/calc-misc.el" "calc/calc-mode.el" -;;;;;; "calc/calc-mtx.el" "calc/calc-nlfit.el" "calc/calc-poly.el" -;;;;;; "calc/calc-prog.el" "calc/calc-rewr.el" "calc/calc-rules.el" -;;;;;; "calc/calc-sel.el" "calc/calc-stat.el" "calc/calc-store.el" -;;;;;; "calc/calc-stuff.el" "calc/calc-trail.el" "calc/calc-undo.el" -;;;;;; "calc/calc-units.el" "calc/calc-vec.el" "calc/calc-yank.el" -;;;;;; "calc/calcalg2.el" "calc/calcalg3.el" "calc/calccomp.el" -;;;;;; "calc/calcsel2.el" "calendar/cal-bahai.el" "calendar/cal-coptic.el" -;;;;;; "calendar/cal-french.el" "calendar/cal-html.el" "calendar/cal-islam.el" -;;;;;; "calendar/cal-iso.el" "calendar/cal-julian.el" "calendar/cal-loaddefs.el" -;;;;;; "calendar/cal-mayan.el" "calendar/cal-menu.el" "calendar/cal-move.el" -;;;;;; "calendar/cal-persia.el" "calendar/cal-tex.el" "calendar/cal-x.el" -;;;;;; "calendar/diary-loaddefs.el" "calendar/hol-loaddefs.el" "case-table.el" +;;;### (autoloads nil nil ("calc/calc-aent.el" "calc/calc-alg.el" +;;;;;; "calc/calc-arith.el" "calc/calc-bin.el" "calc/calc-comb.el" +;;;;;; "calc/calc-cplx.el" "calc/calc-embed.el" "calc/calc-ext.el" +;;;;;; "calc/calc-fin.el" "calc/calc-forms.el" "calc/calc-frac.el" +;;;;;; "calc/calc-funcs.el" "calc/calc-graph.el" "calc/calc-help.el" +;;;;;; "calc/calc-incom.el" "calc/calc-keypd.el" "calc/calc-lang.el" +;;;;;; "calc/calc-loaddefs.el" "calc/calc-macs.el" "calc/calc-map.el" +;;;;;; "calc/calc-math.el" "calc/calc-menu.el" "calc/calc-misc.el" +;;;;;; "calc/calc-mode.el" "calc/calc-mtx.el" "calc/calc-nlfit.el" +;;;;;; "calc/calc-poly.el" "calc/calc-prog.el" "calc/calc-rewr.el" +;;;;;; "calc/calc-rules.el" "calc/calc-sel.el" "calc/calc-stat.el" +;;;;;; "calc/calc-store.el" "calc/calc-stuff.el" "calc/calc-trail.el" +;;;;;; "calc/calc-undo.el" "calc/calc-units.el" "calc/calc-vec.el" +;;;;;; "calc/calc-yank.el" "calc/calcalg2.el" "calc/calcalg3.el" +;;;;;; "calc/calccomp.el" "calc/calcsel2.el" "calendar/cal-bahai.el" +;;;;;; "calendar/cal-coptic.el" "calendar/cal-french.el" "calendar/cal-html.el" +;;;;;; "calendar/cal-islam.el" "calendar/cal-iso.el" "calendar/cal-julian.el" +;;;;;; "calendar/cal-loaddefs.el" "calendar/cal-mayan.el" "calendar/cal-menu.el" +;;;;;; "calendar/cal-move.el" "calendar/cal-persia.el" "calendar/cal-tex.el" +;;;;;; "calendar/cal-x.el" "calendar/diary-loaddefs.el" "calendar/hol-loaddefs.el" ;;;;;; "cdl.el" "cedet/cedet-cscope.el" "cedet/cedet-files.el" "cedet/cedet-global.el" ;;;;;; "cedet/cedet-idutils.el" "cedet/cedet.el" "cedet/ede/auto.el" ;;;;;; "cedet/ede/autoconf-edit.el" "cedet/ede/base.el" "cedet/ede/cpp-root.el" @@ -32712,41 +32636,36 @@ Zone out, completely. ;;;;;; "cedet/srecode/loaddefs.el" "cedet/srecode/map.el" "cedet/srecode/mode.el" ;;;;;; "cedet/srecode/semantic.el" "cedet/srecode/srt-wy.el" "cedet/srecode/srt.el" ;;;;;; "cedet/srecode/table.el" "cedet/srecode/template.el" "cedet/srecode/texi.el" -;;;;;; "cus-dep.el" "cus-face.el" "cus-load.el" "cus-start.el" "custom.el" -;;;;;; "dframe.el" "dired-aux.el" "dired-x.el" "dos-fns.el" "dos-vars.el" -;;;;;; "dos-w32.el" "dynamic-setting.el" "emacs-lisp/assoc.el" "emacs-lisp/authors.el" -;;;;;; "emacs-lisp/avl-tree.el" "emacs-lisp/backquote.el" "emacs-lisp/bindat.el" -;;;;;; "emacs-lisp/byte-lexbind.el" "emacs-lisp/byte-opt.el" "emacs-lisp/byte-run.el" -;;;;;; "emacs-lisp/chart.el" "emacs-lisp/cl-extra.el" "emacs-lisp/cl-loaddefs.el" -;;;;;; "emacs-lisp/cl-macs.el" "emacs-lisp/cl-seq.el" "emacs-lisp/cl-specs.el" -;;;;;; "emacs-lisp/cust-print.el" "emacs-lisp/eieio-base.el" "emacs-lisp/eieio-comp.el" -;;;;;; "emacs-lisp/eieio-custom.el" "emacs-lisp/eieio-datadebug.el" -;;;;;; "emacs-lisp/eieio-opt.el" "emacs-lisp/eieio-speedbar.el" -;;;;;; "emacs-lisp/eieio.el" "emacs-lisp/find-gc.el" "emacs-lisp/float-sup.el" -;;;;;; "emacs-lisp/gulp.el" "emacs-lisp/lisp-mnt.el" "emacs-lisp/lisp-mode.el" -;;;;;; "emacs-lisp/lisp.el" "emacs-lisp/map-ynp.el" "emacs-lisp/package-x.el" +;;;;;; "cus-dep.el" "dframe.el" "dired-aux.el" "dired-x.el" "dos-fns.el" +;;;;;; "dos-vars.el" "dos-w32.el" "dynamic-setting.el" "emacs-lisp/assoc.el" +;;;;;; "emacs-lisp/authors.el" "emacs-lisp/avl-tree.el" "emacs-lisp/bindat.el" +;;;;;; "emacs-lisp/byte-lexbind.el" "emacs-lisp/byte-opt.el" "emacs-lisp/chart.el" +;;;;;; "emacs-lisp/cl-extra.el" "emacs-lisp/cl-loaddefs.el" "emacs-lisp/cl-macs.el" +;;;;;; "emacs-lisp/cl-seq.el" "emacs-lisp/cl-specs.el" "emacs-lisp/cust-print.el" +;;;;;; "emacs-lisp/eieio-base.el" "emacs-lisp/eieio-comp.el" "emacs-lisp/eieio-custom.el" +;;;;;; "emacs-lisp/eieio-datadebug.el" "emacs-lisp/eieio-opt.el" +;;;;;; "emacs-lisp/eieio-speedbar.el" "emacs-lisp/eieio.el" "emacs-lisp/find-gc.el" +;;;;;; "emacs-lisp/gulp.el" "emacs-lisp/lisp-mnt.el" "emacs-lisp/package-x.el" ;;;;;; "emacs-lisp/regi.el" "emacs-lisp/smie.el" "emacs-lisp/sregex.el" -;;;;;; "emacs-lisp/syntax.el" "emacs-lisp/tcover-ses.el" "emacs-lisp/tcover-unsafep.el" -;;;;;; "emacs-lisp/timer.el" "emacs-lock.el" "emulation/cua-gmrk.el" -;;;;;; "emulation/cua-rect.el" "emulation/edt-lk201.el" "emulation/edt-mapper.el" -;;;;;; "emulation/edt-pc.el" "emulation/edt-vt100.el" "emulation/tpu-extras.el" -;;;;;; "emulation/viper-cmd.el" "emulation/viper-ex.el" "emulation/viper-init.el" -;;;;;; "emulation/viper-keym.el" "emulation/viper-macs.el" "emulation/viper-mous.el" -;;;;;; "emulation/viper-util.el" "env.el" "epa-hook.el" "erc/erc-backend.el" -;;;;;; "erc/erc-goodies.el" "erc/erc-ibuffer.el" "erc/erc-lang.el" -;;;;;; "eshell/em-alias.el" "eshell/em-banner.el" "eshell/em-basic.el" -;;;;;; "eshell/em-cmpl.el" "eshell/em-dirs.el" "eshell/em-glob.el" -;;;;;; "eshell/em-hist.el" "eshell/em-ls.el" "eshell/em-pred.el" -;;;;;; "eshell/em-prompt.el" "eshell/em-rebind.el" "eshell/em-script.el" -;;;;;; "eshell/em-smart.el" "eshell/em-term.el" "eshell/em-unix.el" -;;;;;; "eshell/em-xtra.el" "eshell/esh-arg.el" "eshell/esh-cmd.el" -;;;;;; "eshell/esh-ext.el" "eshell/esh-groups.el" "eshell/esh-io.el" -;;;;;; "eshell/esh-module.el" "eshell/esh-opt.el" "eshell/esh-proc.el" -;;;;;; "eshell/esh-util.el" "eshell/esh-var.el" "ezimage.el" "facemenu.el" -;;;;;; "faces.el" "files.el" "finder-inf.el" "foldout.el" "font-lock.el" -;;;;;; "format-spec.el" "forms-d2.el" "forms-pass.el" "frame.el" -;;;;;; "fringe.el" "generic-x.el" "gnus/auth-source.el" "gnus/color.el" -;;;;;; "gnus/compface.el" "gnus/gnus-async.el" "gnus/gnus-bcklg.el" +;;;;;; "emacs-lisp/tcover-ses.el" "emacs-lisp/tcover-unsafep.el" +;;;;;; "emacs-lock.el" "emulation/cua-gmrk.el" "emulation/cua-rect.el" +;;;;;; "emulation/edt-lk201.el" "emulation/edt-mapper.el" "emulation/edt-pc.el" +;;;;;; "emulation/edt-vt100.el" "emulation/tpu-extras.el" "emulation/viper-cmd.el" +;;;;;; "emulation/viper-ex.el" "emulation/viper-init.el" "emulation/viper-keym.el" +;;;;;; "emulation/viper-macs.el" "emulation/viper-mous.el" "emulation/viper-util.el" +;;;;;; "erc/erc-backend.el" "erc/erc-goodies.el" "erc/erc-ibuffer.el" +;;;;;; "erc/erc-lang.el" "eshell/em-alias.el" "eshell/em-banner.el" +;;;;;; "eshell/em-basic.el" "eshell/em-cmpl.el" "eshell/em-dirs.el" +;;;;;; "eshell/em-glob.el" "eshell/em-hist.el" "eshell/em-ls.el" +;;;;;; "eshell/em-pred.el" "eshell/em-prompt.el" "eshell/em-rebind.el" +;;;;;; "eshell/em-script.el" "eshell/em-smart.el" "eshell/em-term.el" +;;;;;; "eshell/em-unix.el" "eshell/em-xtra.el" "eshell/esh-arg.el" +;;;;;; "eshell/esh-cmd.el" "eshell/esh-ext.el" "eshell/esh-groups.el" +;;;;;; "eshell/esh-io.el" "eshell/esh-module.el" "eshell/esh-opt.el" +;;;;;; "eshell/esh-proc.el" "eshell/esh-util.el" "eshell/esh-var.el" +;;;;;; "ezimage.el" "foldout.el" "format-spec.el" "forms-d2.el" +;;;;;; "forms-pass.el" "fringe.el" "generic-x.el" "gnus/auth-source.el" +;;;;;; "gnus/color.el" "gnus/compface.el" "gnus/gnus-async.el" "gnus/gnus-bcklg.el" ;;;;;; "gnus/gnus-cite.el" "gnus/gnus-cus.el" "gnus/gnus-demon.el" ;;;;;; "gnus/gnus-dup.el" "gnus/gnus-eform.el" "gnus/gnus-ems.el" ;;;;;; "gnus/gnus-int.el" "gnus/gnus-logic.el" "gnus/gnus-mh.el" @@ -32765,42 +32684,31 @@ Zone out, completely. ;;;;;; "gnus/nnspool.el" "gnus/nntp.el" "gnus/nnvirtual.el" "gnus/nnweb.el" ;;;;;; "gnus/rfc1843.el" "gnus/rfc2045.el" "gnus/rfc2047.el" "gnus/rfc2104.el" ;;;;;; "gnus/rfc2231.el" "gnus/rtree.el" "gnus/shr-color.el" "gnus/sieve-manage.el" -;;;;;; "gnus/smime.el" "gnus/spam-stat.el" "gnus/spam-wash.el" "help.el" -;;;;;; "hex-util.el" "hfy-cmap.el" "ibuf-ext.el" "indent.el" "international/characters.el" -;;;;;; "international/charprop.el" "international/cp51932.el" "international/eucjp-ms.el" -;;;;;; "international/fontset.el" "international/iso-ascii.el" "international/ja-dic-cnv.el" -;;;;;; "international/ja-dic-utl.el" "international/mule-conf.el" -;;;;;; "international/mule.el" "international/ogonek.el" "international/uni-bidi.el" -;;;;;; "international/uni-category.el" "international/uni-combining.el" -;;;;;; "international/uni-comment.el" "international/uni-decimal.el" -;;;;;; "international/uni-decomposition.el" "international/uni-digit.el" -;;;;;; "international/uni-lowercase.el" "international/uni-mirrored.el" -;;;;;; "international/uni-name.el" "international/uni-numeric.el" -;;;;;; "international/uni-old-name.el" "international/uni-titlecase.el" -;;;;;; "international/uni-uppercase.el" "isearch.el" "jit-lock.el" -;;;;;; "jka-cmpr-hook.el" "json.el" "kermit.el" "language/burmese.el" -;;;;;; "language/cham.el" "language/chinese.el" "language/cyrillic.el" -;;;;;; "language/czech.el" "language/english.el" "language/ethiopic.el" -;;;;;; "language/european.el" "language/georgian.el" "language/greek.el" -;;;;;; "language/hanja-util.el" "language/hebrew.el" "language/indian.el" -;;;;;; "language/japanese.el" "language/khmer.el" "language/korean.el" -;;;;;; "language/lao.el" "language/misc-lang.el" "language/romanian.el" -;;;;;; "language/sinhala.el" "language/slovak.el" "language/tai-viet.el" -;;;;;; "language/thai-word.el" "language/thai.el" "language/tibetan.el" -;;;;;; "language/utf-8-lang.el" "language/vietnamese.el" "ldefs-boot.el" -;;;;;; "loadup.el" "mail/blessmail.el" "mail/mailheader.el" "mail/mailpost.el" -;;;;;; "mail/mspools.el" "mail/rfc2368.el" "mail/rfc822.el" "mail/rmail-spam-filter.el" -;;;;;; "mail/rmailedit.el" "mail/rmailkwd.el" "mail/rmailmm.el" -;;;;;; "mail/rmailmsc.el" "mail/rmailsort.el" "mail/rmailsum.el" -;;;;;; "mail/undigest.el" "md4.el" "mh-e/mh-acros.el" "mh-e/mh-alias.el" -;;;;;; "mh-e/mh-buffers.el" "mh-e/mh-compat.el" "mh-e/mh-funcs.el" -;;;;;; "mh-e/mh-gnus.el" "mh-e/mh-identity.el" "mh-e/mh-inc.el" -;;;;;; "mh-e/mh-junk.el" "mh-e/mh-letter.el" "mh-e/mh-limit.el" +;;;;;; "gnus/smime.el" "gnus/spam-stat.el" "gnus/spam-wash.el" "hex-util.el" +;;;;;; "hfy-cmap.el" "ibuf-ext.el" "international/charprop.el" "international/cp51932.el" +;;;;;; "international/eucjp-ms.el" "international/fontset.el" "international/iso-ascii.el" +;;;;;; "international/ja-dic-cnv.el" "international/ja-dic-utl.el" +;;;;;; "international/ogonek.el" "international/uni-bidi.el" "international/uni-category.el" +;;;;;; "international/uni-combining.el" "international/uni-comment.el" +;;;;;; "international/uni-decimal.el" "international/uni-decomposition.el" +;;;;;; "international/uni-digit.el" "international/uni-lowercase.el" +;;;;;; "international/uni-mirrored.el" "international/uni-name.el" +;;;;;; "international/uni-numeric.el" "international/uni-old-name.el" +;;;;;; "international/uni-titlecase.el" "international/uni-uppercase.el" +;;;;;; "json.el" "kermit.el" "language/hanja-util.el" "language/thai-word.el" +;;;;;; "ldefs-boot.el" "mail/blessmail.el" "mail/mailheader.el" +;;;;;; "mail/mailpost.el" "mail/mspools.el" "mail/rfc2368.el" "mail/rfc822.el" +;;;;;; "mail/rmail-spam-filter.el" "mail/rmailedit.el" "mail/rmailkwd.el" +;;;;;; "mail/rmailmm.el" "mail/rmailmsc.el" "mail/rmailsort.el" +;;;;;; "mail/rmailsum.el" "mail/undigest.el" "md4.el" "mh-e/mh-acros.el" +;;;;;; "mh-e/mh-alias.el" "mh-e/mh-buffers.el" "mh-e/mh-compat.el" +;;;;;; "mh-e/mh-funcs.el" "mh-e/mh-gnus.el" "mh-e/mh-identity.el" +;;;;;; "mh-e/mh-inc.el" "mh-e/mh-junk.el" "mh-e/mh-letter.el" "mh-e/mh-limit.el" ;;;;;; "mh-e/mh-loaddefs.el" "mh-e/mh-mime.el" "mh-e/mh-print.el" ;;;;;; "mh-e/mh-scan.el" "mh-e/mh-search.el" "mh-e/mh-seq.el" "mh-e/mh-show.el" ;;;;;; "mh-e/mh-speed.el" "mh-e/mh-thread.el" "mh-e/mh-tool-bar.el" -;;;;;; "mh-e/mh-utils.el" "mh-e/mh-xface.el" "minibuffer.el" "mouse-copy.el" -;;;;;; "mouse.el" "mwheel.el" "net/dns.el" "net/eudc-vars.el" "net/eudcb-bbdb.el" +;;;;;; "mh-e/mh-utils.el" "mh-e/mh-xface.el" "mouse-copy.el" "mouse.el" +;;;;;; "mwheel.el" "net/dns.el" "net/eudc-vars.el" "net/eudcb-bbdb.el" ;;;;;; "net/eudcb-ldap.el" "net/eudcb-mab.el" "net/eudcb-ph.el" ;;;;;; "net/gnutls.el" "net/hmac-def.el" "net/hmac-md5.el" "net/imap-hash.el" ;;;;;; "net/imap.el" "net/ldap.el" "net/mairix.el" "net/newsticker.el" @@ -32824,15 +32732,15 @@ Zone out, completely. ;;;;;; "org/ob-ref.el" "org/ob-ruby.el" "org/ob-sass.el" "org/ob-scheme.el" ;;;;;; "org/ob-screen.el" "org/ob-sh.el" "org/ob-sql.el" "org/ob-sqlite.el" ;;;;;; "org/ob-table.el" "org/org-beamer.el" "org/org-bibtex.el" -;;;;;; "org/org-colview.el" "org/org-compat.el" "org/org-crypt.el" -;;;;;; "org/org-ctags.el" "org/org-docview.el" "org/org-entities.el" -;;;;;; "org/org-exp-blocks.el" "org/org-faces.el" "org/org-gnus.el" -;;;;;; "org/org-habit.el" "org/org-info.el" "org/org-inlinetask.el" +;;;;;; "org/org-colview.el" "org/org-compat.el" "org/org-complete.el" +;;;;;; "org/org-crypt.el" "org/org-ctags.el" "org/org-docview.el" +;;;;;; "org/org-entities.el" "org/org-exp-blocks.el" "org/org-faces.el" +;;;;;; "org/org-gnus.el" "org/org-habit.el" "org/org-info.el" "org/org-inlinetask.el" ;;;;;; "org/org-install.el" "org/org-jsinfo.el" "org/org-list.el" ;;;;;; "org/org-mac-message.el" "org/org-macs.el" "org/org-mew.el" ;;;;;; "org/org-mhe.el" "org/org-mks.el" "org/org-mouse.el" "org/org-protocol.el" ;;;;;; "org/org-rmail.el" "org/org-src.el" "org/org-vm.el" "org/org-w3m.el" -;;;;;; "org/org-wl.el" "patcomp.el" "paths.el" "pgg-def.el" "pgg-parse.el" +;;;;;; "org/org-wl.el" "patcomp.el" "pgg-def.el" "pgg-parse.el" ;;;;;; "pgg-pgp.el" "pgg-pgp5.el" "play/gamegrid.el" "play/gametree.el" ;;;;;; "play/meese.el" "progmodes/ada-prj.el" "progmodes/cc-align.el" ;;;;;; "progmodes/cc-awk.el" "progmodes/cc-bytecomp.el" "progmodes/cc-cmds.el" @@ -32842,23 +32750,20 @@ Zone out, completely. ;;;;;; "progmodes/ebnf-otz.el" "progmodes/ebnf-yac.el" "progmodes/idlw-complete-structtag.el" ;;;;;; "progmodes/idlw-help.el" "progmodes/idlw-toolbar.el" "progmodes/mantemp.el" ;;;;;; "progmodes/xscheme.el" "ps-def.el" "ps-mule.el" "ps-samp.el" -;;;;;; "register.el" "replace.el" "rfn-eshadow.el" "saveplace.el" -;;;;;; "sb-image.el" "scroll-bar.el" "select.el" "simple.el" "soundex.el" -;;;;;; "startup.el" "subdirs.el" "subr.el" "tempo.el" "textmodes/bib-mode.el" -;;;;;; "textmodes/fill.el" "textmodes/makeinfo.el" "textmodes/page-ext.el" -;;;;;; "textmodes/page.el" "textmodes/paragraphs.el" "textmodes/refbib.el" +;;;;;; "saveplace.el" "sb-image.el" "scroll-bar.el" "select.el" +;;;;;; "soundex.el" "subdirs.el" "tempo.el" "textmodes/bib-mode.el" +;;;;;; "textmodes/makeinfo.el" "textmodes/page-ext.el" "textmodes/refbib.el" ;;;;;; "textmodes/refer.el" "textmodes/reftex-auc.el" "textmodes/reftex-dcr.el" ;;;;;; "textmodes/reftex-ref.el" "textmodes/reftex-sel.el" "textmodes/reftex-toc.el" -;;;;;; "textmodes/texnfo-upd.el" "textmodes/text-mode.el" "timezone.el" -;;;;;; "tooltip.el" "tree-widget.el" "uniquify.el" "url/url-about.el" -;;;;;; "url/url-cookie.el" "url/url-dired.el" "url/url-expand.el" -;;;;;; "url/url-ftp.el" "url/url-history.el" "url/url-imap.el" "url/url-methods.el" -;;;;;; "url/url-nfs.el" "url/url-proxy.el" "url/url-vars.el" "vc/ediff-diff.el" -;;;;;; "vc/ediff-init.el" "vc/ediff-merg.el" "vc/ediff-ptch.el" -;;;;;; "vc/ediff-vers.el" "vc/ediff-wind.el" "vc/pcvs-info.el" "vc/pcvs-parse.el" -;;;;;; "vc/pcvs-util.el" "vc/vc-dav.el" "vcursor.el" "version.el" -;;;;;; "vt-control.el" "vt100-led.el" "w32-fns.el" "w32-vars.el" -;;;;;; "widget.el" "x-dnd.el") (19714 43806 445397)) +;;;;;; "textmodes/texnfo-upd.el" "timezone.el" "tooltip.el" "tree-widget.el" +;;;;;; "uniquify.el" "url/url-about.el" "url/url-cookie.el" "url/url-dired.el" +;;;;;; "url/url-expand.el" "url/url-ftp.el" "url/url-history.el" +;;;;;; "url/url-imap.el" "url/url-methods.el" "url/url-nfs.el" "url/url-proxy.el" +;;;;;; "url/url-vars.el" "vc/ediff-diff.el" "vc/ediff-init.el" "vc/ediff-merg.el" +;;;;;; "vc/ediff-ptch.el" "vc/ediff-vers.el" "vc/ediff-wind.el" +;;;;;; "vc/pcvs-info.el" "vc/pcvs-parse.el" "vc/pcvs-util.el" "vc/vc-dav.el" +;;;;;; "vcursor.el" "vt-control.el" "vt100-led.el" "w32-fns.el" +;;;;;; "w32-vars.el" "x-dnd.el") (19737 18184 637096)) ;;;*** diff --git a/lisp/ledit.el b/lisp/ledit.el index 4b7b4988b47..09fe5001161 100644 --- a/lisp/ledit.el +++ b/lisp/ledit.el @@ -1,7 +1,6 @@ ;;; ledit.el --- Emacs side of ledit interface -;; Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: languages @@ -154,5 +153,4 @@ do (setq lisp-mode-hook 'ledit-from-lisp-mode)" (provide 'ledit) -;; arch-tag: f0f1ca13-8d31-478c-ae1b-b448c55a8faf ;;; ledit.el ends here diff --git a/lisp/linum.el b/lisp/linum.el index 4ab4b10a7c9..11e6a7f8b4f 100644 --- a/lisp/linum.el +++ b/lisp/linum.el @@ -1,6 +1,6 @@ ;;; linum.el --- display line numbers in the left margin -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Markus Triska <markus.triska@gmx.at> ;; Maintainer: FSF @@ -202,5 +202,4 @@ and you have to scroll or press \\[recenter-top-bottom] to update the numbers." (provide 'linum) -;; arch-tag: dea45631-ed3c-4867-8b49-1c41c80aec6a ;;; linum.el ends here diff --git a/lisp/loadhist.el b/lisp/loadhist.el index b255a5d947b..3395c41d2ff 100644 --- a/lisp/loadhist.el +++ b/lisp/loadhist.el @@ -1,7 +1,6 @@ ;;; loadhist.el --- lisp functions for working with feature groups -;; Copyright (C) 1995, 1998, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995, 1998, 2000-2011 Free Software Foundation, Inc. ;; Author: Eric S. Raymond <esr@snark.thyrsus.com> ;; Maintainer: FSF @@ -267,5 +266,4 @@ something strange, such as redefining an Emacs function." (provide 'loadhist) -;; arch-tag: 70bb846a-c413-4f01-bf88-78dba4ac0798 ;;; loadhist.el ends here diff --git a/lisp/loadup.el b/lisp/loadup.el index d13e38c0b36..b884adb5b1e 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -1,7 +1,7 @@ ;;; loadup.el --- load up standardly loaded Lisp files for Emacs -;; Copyright (C) 1985, 1986, 1992, 1994, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985-1986, 1992, 1994, 2001-2011 +;; Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: internal @@ -292,46 +292,16 @@ (error nil))) (message "Finding pointers to doc strings...done") -;;;Note: You can cause additional libraries to be preloaded -;;;by writing a site-init.el that loads them. -;;;See also "site-load" above. +;; Note: You can cause additional libraries to be preloaded +;; by writing a site-init.el that loads them. +;; See also "site-load" above. (load "site-init" t) (setq current-load-list nil) -;; Write the value of load-history into fns-VERSION.el, -;; then clear out load-history. -;; (if (or (equal (nth 3 command-line-args) "dump") -;; (equal (nth 4 command-line-args) "dump")) -;; (let ((buffer-undo-list t)) -;; (princ "(setq load-history\n" (current-buffer)) -;; (princ " (nconc load-history\n" (current-buffer)) -;; (princ " '(" (current-buffer)) -;; (let ((tem load-history)) -;; (while tem -;; (prin1 (car tem) (current-buffer)) -;; (terpri (current-buffer)) -;; (if (cdr tem) -;; (princ " " (current-buffer))) -;; (setq tem (cdr tem)))) -;; (princ ")))\n" (current-buffer)) -;; (write-region (point-min) (point-max) -;; (expand-file-name -;; (cond -;; ((eq system-type 'ms-dos) -;; "../lib-src/fns.el") -;; ((eq system-type 'windows-nt) -;; (format "../../../lib-src/fns-%s.el" emacs-version)) -;; (t -;; (format "../lib-src/fns-%s.el" emacs-version))) -;; invocation-directory)) -;; (erase-buffer) -;; (setq load-history nil)) -;; (setq symbol-file-load-history-loaded t)) -;; We don't use this fns-*.el file. Instead we keep the data in PURE space. +;; We keep the load-history data in PURE space. ;; Make sure that the spine of the list is not in pure space because it can ;; be destructively mutated in lread.c:build_load_history. (setq load-history (mapcar 'purecopy load-history)) -(setq symbol-file-load-history-loaded t) (set-buffer-modified-p nil) @@ -372,7 +342,7 @@ (dump-emacs "emacs" "temacs") (message "%d pure bytes used" pure-bytes-used) ;; Recompute NAME now, so that it isn't set when we dump. - (if (not (or (memq system-type '(ms-dos windows-nt cygwin)) + (if (not (or (memq system-type '(ms-dos windows-nt)) ;; Don't bother adding another name if we're just ;; building bootstrap-emacs. (equal (nth 3 command-line-args) "bootstrap") diff --git a/lisp/locate.el b/lisp/locate.el index 4c4312b9598..c78dd5aa34f 100644 --- a/lisp/locate.el +++ b/lisp/locate.el @@ -1,7 +1,6 @@ ;;; locate.el --- interface to the locate command -;; Copyright (C) 1996, 1998, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996, 1998, 2001-2011 Free Software Foundation, Inc. ;; Author: Peter Breton <pbreton@cs.umb.edu> ;; Keywords: unix files diff --git a/lisp/longlines.el b/lisp/longlines.el index 23b126c69ea..8843b1663ff 100644 --- a/lisp/longlines.el +++ b/lisp/longlines.el @@ -1,6 +1,6 @@ ;;; longlines.el --- automatically wrap long lines -*- coding:utf-8 -*- -;; Copyright (C) 2000, 2001, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2001, 2004-2011 Free Software Foundation, Inc. ;; Authors: Kai Grossjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> ;; Alex Schroeder <alex@gnu.org> @@ -503,5 +503,4 @@ This is called by `window-configuration-change-hook'." (provide 'longlines) -;; arch-tag: 3489d225-5506-47b9-8659-d8807b77c624 ;;; longlines.el ends here diff --git a/lisp/lpr.el b/lisp/lpr.el index 3b91172a7ef..709f992b2b8 100644 --- a/lisp/lpr.el +++ b/lisp/lpr.el @@ -1,7 +1,7 @@ ;;; lpr.el --- print Emacs buffer on line printer -;; Copyright (C) 1985, 1988, 1992, 1994, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1988, 1992, 1994, 2001-2011 +;; Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: unix @@ -337,5 +337,4 @@ The characters tab, linefeed, space, return and formfeed are not affected." (provide 'lpr) -;; arch-tag: 21c3f821-ebec-4ca9-ac67-a81e4b75c62a ;;; lpr.el ends here diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el index 58ed6685dc2..55ec835831a 100644 --- a/lisp/ls-lisp.el +++ b/lisp/ls-lisp.el @@ -1,7 +1,6 @@ ;;; ls-lisp.el --- emulate insert-directory completely in Emacs Lisp -;; Copyright (C) 1992, 1994, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1992, 1994, 2000-2011 Free Software Foundation, Inc. ;; Author: Sebastian Kremer <sk@thp.uni-koeln.de> ;; Modified by: Francis J. Wright <F.J.Wright@maths.qmw.ac.uk> diff --git a/lisp/macros.el b/lisp/macros.el index cbceb96fade..b4f38b7db84 100644 --- a/lisp/macros.el +++ b/lisp/macros.el @@ -1,7 +1,7 @@ ;;; macros.el --- non-primitive commands for keyboard macros -;; Copyright (C) 1985, 1986, 1987, 1992, 1994, 1995, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985-1987, 1992, 1994-1995, 2001-2011 +;; Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: abbrev @@ -283,5 +283,4 @@ and then select the region of un-tablified names and use (provide 'macros) -;; arch-tag: 346ed1a5-1220-4bc8-b533-961ee704361f ;;; macros.el ends here diff --git a/lisp/mail/binhex.el b/lisp/mail/binhex.el index 42d2f35baed..5332c0f14ba 100644 --- a/lisp/mail/binhex.el +++ b/lisp/mail/binhex.el @@ -1,7 +1,6 @@ -;;; binhex.el --- elisp native binhex decode +;;; binhex.el --- decode BinHex-encoded text -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu> ;; Keywords: binhex news @@ -23,6 +22,11 @@ ;;; Commentary: +;; BinHex is a binary-to-text encoding scheme similar to uuencode. +;; The command `binhex-decode-region' decodes BinHex-encoded text, via +;; the external program "hexbin" if that is available, or an Emacs +;; Lisp implementation if not. + ;;; Code: (eval-when-compile (require 'cl)) diff --git a/lisp/mail/blessmail.el b/lisp/mail/blessmail.el index 545350170ec..b614fffb69d 100644 --- a/lisp/mail/blessmail.el +++ b/lisp/mail/blessmail.el @@ -1,7 +1,6 @@ ;;; blessmail.el --- decide whether movemail needs special privileges -*- no-byte-compile: t -*- -;; Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: internal @@ -66,5 +65,4 @@ (write-region (point-min) (point-max) "blessmail") (kill-emacs) -;; arch-tag: c3329fe2-f945-41a9-8b00-b4b038ff182f ;;; blessmail.el ends here diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el index e6da4746041..a621647bcf1 100644 --- a/lisp/mail/emacsbug.el +++ b/lisp/mail/emacsbug.el @@ -1,7 +1,6 @@ ;;; emacsbug.el --- command to report Emacs bugs to appropriate mailing list -;; Copyright (C) 1985, 1994, 1997, 1998, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 1985, 1994, 1997-1998, 2000-2011 ;; Free Software Foundation, Inc. ;; Author: K. Shane Hartman @@ -33,6 +32,8 @@ ;;; Code: +(require 'url-util) + (defgroup emacsbug nil "Sending Emacs bug reports." :group 'maint @@ -78,6 +79,12 @@ Used for querying duplicates and linking to existing bugs.") (declare-function message-sort-headers "message" ()) (defvar message-strip-special-text-properties) +(defun report-emacs-bug-can-use-osx-open () + "Check if OSX open can be used to insert bug report into mailer" + (and (featurep 'ns) + (equal (executable-find "open") "/usr/bin/open") + (memq system-type '(darwin)))) + (defun report-emacs-bug-can-use-xdg-email () "Check if xdg-email can be used, i.e. we are on Gnome, KDE or xfce4." (and (getenv "DISPLAY") @@ -117,10 +124,15 @@ Used for querying duplicates and linking to existing bugs.") (if (> (point-max) (point)) (buffer-substring-no-properties (point) (point-max)))))) (if (and to subject body) - (start-process "xdg-email" nil "xdg-email" - "--subject" subject - "--body" body - (concat "mailto:" to)) + (if (report-emacs-bug-can-use-osx-open) + (start-process "/usr/bin/open" nil "open" + (concat "mailto:" to + "?subject=" (url-hexify-string subject) + "&body=" (url-hexify-string body))) + (start-process "xdg-email" nil "xdg-email" + "--subject" subject + "--body" body + (concat "mailto:" to))) (error "Subject, To or body not found"))))) ;;;###autoload @@ -142,7 +154,8 @@ Prompts for bug subject. Leaves you in a mail buffer." (prompt-properties '(field emacsbug-prompt intangible but-helpful rear-nonsticky t)) - (can-xdg-email (report-emacs-bug-can-use-xdg-email)) + (can-insert-mail (or (report-emacs-bug-can-use-xdg-email) + (report-emacs-bug-can-use-osx-open))) user-point message-end-point) (setq message-end-point (with-current-buffer (get-buffer-create "*Messages*") @@ -276,7 +289,7 @@ usually do not have translators to read other languages for them.\n\n") ;; This is so the user has to type something in order to send easily. (use-local-map (nconc (make-sparse-keymap) (current-local-map))) (define-key (current-local-map) "\C-c\C-i" 'report-emacs-bug-info) - (if can-xdg-email + (if can-insert-mail (define-key (current-local-map) "\C-cm" 'report-emacs-bug-insert-to-mailer)) (setq report-emacs-bug-send-command (get mail-user-agent 'sendfunc) @@ -293,7 +306,7 @@ usually do not have translators to read other languages for them.\n\n") report-emacs-bug-send-command)))) (princ (substitute-command-keys " Type \\[kill-buffer] RET to cancel (don't send it).\n")) - (if can-xdg-email + (if can-insert-mail (princ (substitute-command-keys " Type \\[report-emacs-bug-insert-to-mailer] to insert text to you preferred mail program.\n"))) (terpri) diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el index 5c6da623fed..597344fb88a 100644 --- a/lisp/mail/feedmail.el +++ b/lisp/mail/feedmail.el @@ -2662,5 +2662,4 @@ been weeded out." (provide 'feedmail) -;; arch-tag: ec27b380-11c0-4dfd-8436-f636cf2bb992 ;;; feedmail.el ends here diff --git a/lisp/mail/footnote.el b/lisp/mail/footnote.el index 5855d4496f9..4a4ded22886 100644 --- a/lisp/mail/footnote.el +++ b/lisp/mail/footnote.el @@ -1,7 +1,6 @@ ;;; footnote.el --- footnote support for message mode -*- coding: iso-latin-1;-*- -;; Copyright (C) 1997, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997, 2000-2011 Free Software Foundation, Inc. ;; Author: Steven L Baur <steve@xemacs.org> ;; Keywords: mail, news @@ -797,5 +796,4 @@ started, play around with the following keys: (provide 'footnote) -;; arch-tag: 9bcfb6d7-2161-4caf-8793-700f62400398 ;;; footnote.el ends here diff --git a/lisp/mail/hashcash.el b/lisp/mail/hashcash.el index efa27c3305d..8343cd086b1 100644 --- a/lisp/mail/hashcash.el +++ b/lisp/mail/hashcash.el @@ -1,7 +1,6 @@ ;;; hashcash.el --- Add hashcash payments to email -;; Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2010 -;; Free Software Foundation +;; Copyright (C) 2003-2005, 2007-2011 Free Software Foundation, Inc. ;; Written by: Paul Foley <mycroft@actrix.gen.nz> (1997-2002) ;; Maintainer: Paul Foley <mycroft@actrix.gen.nz> diff --git a/lisp/mail/mail-extr.el b/lisp/mail/mail-extr.el index 9b958e41b05..c3a7da41823 100644 --- a/lisp/mail/mail-extr.el +++ b/lisp/mail/mail-extr.el @@ -1,8 +1,6 @@ ;;; mail-extr.el --- extract full name and address from RFC 822 mail header -*- coding: utf-8 -*- -;; Copyright (C) 1991, 1992, 1993, 1994, 1997, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1991-1994, 1997, 2001-2011 Free Software Foundation, Inc. ;; Author: Joe Wells <jbw@cs.bu.edu> ;; Maintainer: FSF diff --git a/lisp/mail/mail-hist.el b/lisp/mail/mail-hist.el index f129f29ea33..d824c282805 100644 --- a/lisp/mail/mail-hist.el +++ b/lisp/mail/mail-hist.el @@ -1,7 +1,6 @@ ;;; mail-hist.el --- headers and message body history for outgoing mail -;; Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994, 2001-2011 Free Software Foundation, Inc. ;; Author: Karl Fogel <kfogel@red-bean.com> ;; Created: March, 1994 @@ -293,5 +292,4 @@ received mail." (provide 'mail-hist) -;; arch-tag: 9ff9a07c-9dca-482d-ba87-54f42778559d ;;; mail-hist.el ends here diff --git a/lisp/mail/mail-utils.el b/lisp/mail/mail-utils.el index a8def04100e..cb9ee7e0317 100644 --- a/lisp/mail/mail-utils.el +++ b/lisp/mail/mail-utils.el @@ -1,7 +1,6 @@ ;;; mail-utils.el --- utility functions used both by rmail and rnews -;; Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: mail, news @@ -28,10 +27,6 @@ ;;; Code: -;;; We require lisp-mode to make sure that lisp-mode-syntax-table has -;;; been initialized. -(require 'lisp-mode) - ;;;###autoload (defcustom mail-use-rfc822 nil "If non-nil, use a full, hairy RFC822 parser on mail addresses. @@ -186,65 +181,44 @@ Return a modified address list." (mapconcat 'identity (rfc822-addresses address) ", ")) (let (pos) - ;; Detect nested comments. - (if (string-match "[ \t]*(\\([^)\\]\\|\\\\.\\|\\\\\n\\)*(" address) - ;; Strip nested comments. - (with-current-buffer (get-buffer-create " *temp*") - (erase-buffer) - (insert address) - (set-syntax-table lisp-mode-syntax-table) - (goto-char 1) - (while (search-forward "(" nil t) - (forward-char -1) - (skip-chars-backward " \t") - (delete-region (point) - (save-excursion - (condition-case () - (forward-sexp 1) - (error (goto-char (point-max)))) - (point)))) - (setq address (buffer-string)) - (erase-buffer)) - ;; Strip non-nested comments an easier way. - (while (setq pos (string-match - ;; This doesn't hack rfc822 nested comments - ;; `(xyzzy (foo) whinge)' properly. Big deal. - "[ \t]*(\\([^)\\]\\|\\\\.\\|\\\\\n\\)*)" - address)) - (setq address (replace-match "" nil nil address 0)))) + ;; Strip comments. + (while (setq pos (string-match + "[ \t]*(\\([^()\\]\\|\\\\.\\|\\\\\n\\)*)" + address)) + (setq address (replace-match "" nil nil address 0))) - ;; strip surrounding whitespace - (string-match "\\`[ \t\n]*" address) - (setq address (substring address - (match-end 0) - (string-match "[ \t\n]*\\'" address - (match-end 0)))) + ;; strip surrounding whitespace + (string-match "\\`[ \t\n]*" address) + (setq address (substring address + (match-end 0) + (string-match "[ \t\n]*\\'" address + (match-end 0)))) - ;; strip `quoted' names (This is supposed to hack `"Foo Bar" <bar@host>') - (setq pos 0) - (while (setq pos (string-match + ;; strip `quoted' names (This is supposed to hack `"Foo Bar" <bar@host>') + (setq pos 0) + (while (setq pos (string-match "\\([ \t]?\\)\\([ \t]*\"\\([^\"\\]\\|\\\\.\\|\\\\\n\\)*\"[ \t\n]*\\)" address pos)) - ;; If the next thing is "@", we have "foo bar"@host. Leave it. - (if (and (> (length address) (match-end 0)) - (= (aref address (match-end 0)) ?@)) - (setq pos (match-end 0)) - ;; Otherwise discard the "..." part. - (setq address (replace-match "" nil nil address 2)))) - ;; If this address contains <...>, replace it with just - ;; the part between the <...>. - (while (setq pos (string-match "\\(,\\s-*\\|\\`\\)\\([^,]*<\\([^>,:]*\\)>[^,]*\\)\\(\\s-*,\\|\\'\\)" - address)) - (setq address (replace-match (match-string 3 address) - nil 'literal address 2))) - address)))) + ;; If the next thing is "@", we have "foo bar"@host. Leave it. + (if (and (> (length address) (match-end 0)) + (= (aref address (match-end 0)) ?@)) + (setq pos (match-end 0)) + ;; Otherwise discard the "..." part. + (setq address (replace-match "" nil nil address 2)))) + ;; If this address contains <...>, replace it with just + ;; the part between the <...>. + (while (setq pos (string-match "\\(,\\s-*\\|\\`\\)\\([^,]*<\\([^>,:]*\\)>[^,]*\\)\\(\\s-*,\\|\\'\\)" + address)) + (setq address (replace-match (match-string 3 address) + nil 'literal address 2))) + address)))) -;;; The following piece of ugliness is legacy code. The name was an -;;; unfortunate choice --- a flagrant violation of the Emacs Lisp -;;; coding conventions. `mail-dont-reply-to' would have been -;;; infinitely better. Also, `rmail-dont-reply-to-names' might have -;;; been better named `mail-dont-reply-to-names' and sourced from this -;;; file instead of in rmail.el. Yuck. -pmr +;; The following piece of ugliness is legacy code. The name was an +;; unfortunate choice --- a flagrant violation of the Emacs Lisp +;; coding conventions. `mail-dont-reply-to' would have been +;; infinitely better. Also, `rmail-dont-reply-to-names' might have +;; been better named `mail-dont-reply-to-names' and sourced from this +;; file instead of in rmail.el. Yuck. -pmr (defun rmail-dont-reply-to (destinations) "Prune addresses from DESTINATIONS, a list of recipient addresses. All addresses matching `rmail-dont-reply-to-names' are removed from @@ -398,13 +372,19 @@ matches may be returned from the message body." (defun mail-mbox-from () "Return an mbox \"From \" line for the current message. The buffer should be narrowed to just the header." - (let ((from (or (mail-fetch-field "from") - (mail-fetch-field "really-from") - (mail-fetch-field "sender") - (mail-fetch-field "return-path") - "unknown")) - (date (mail-fetch-field "date"))) - (format "From %s %s\n" (mail-strip-quoted-names from) + (let* ((from (mail-strip-quoted-names (or (mail-fetch-field "from") + (mail-fetch-field "really-from") + (mail-fetch-field "sender") + (mail-fetch-field "return-path") + "unknown"))) + (date (mail-fetch-field "date")) + ;; A From: header can contain multiple addresses, a "From " + ;; line must contain only one. (Bug#7760) + ;; See eg RFC 5322, 3.6.2. Originator Fields. + (end (string-match "[ \t]*[,\n]" from))) + (format "From %s %s\n" (if end + (substring from 0 end) + from) (or (and date (ignore-errors (current-time-string (date-to-time date)))) diff --git a/lisp/mail/mailabbrev.el b/lisp/mail/mailabbrev.el index c1a6c39ad63..b4827cf10ba 100644 --- a/lisp/mail/mailabbrev.el +++ b/lisp/mail/mailabbrev.el @@ -1,7 +1,6 @@ ;;; mailabbrev.el --- abbrev-expansion of mail aliases -;; Copyright (C) 1985, 1986, 1987, 1992, 1993, 1996, 1997, 2000, 2001, -;; 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 1985-1987, 1992-1993, 1996-1997, 2000-2011 ;; Free Software Foundation, Inc. ;; Author: Jamie Zawinski <jwz@lucid.com; now jwz@jwz.org> @@ -609,5 +608,4 @@ In other respects, this behaves like `end-of-buffer', which see." (provide 'mailabbrev) -;; arch-tag: 5aa2d901-73f8-4ad7-b73c-4802282ad2ff ;;; mailabbrev.el ends here diff --git a/lisp/mail/mailalias.el b/lisp/mail/mailalias.el index 8bf53058950..fb6ee674b35 100644 --- a/lisp/mail/mailalias.el +++ b/lisp/mail/mailalias.el @@ -1,7 +1,7 @@ ;;; mailalias.el --- expand and complete mailing address aliases -;; Copyright (C) 1985, 1987, 1995, 1996, 1997, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1987, 1995-1997, 2001-2011 +;; Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: mail @@ -240,6 +240,11 @@ removed from alias expansions." (defun build-mail-aliases (&optional file) "Read mail aliases from personal aliases file and set `mail-aliases'. By default, this is the file specified by `mail-personal-alias-file'." + (interactive + (list + (read-file-name (format "Read mail alias file (default %s): " + mail-personal-alias-file) + nil mail-personal-alias-file t))) (setq file (expand-file-name (or file mail-personal-alias-file))) ;; In case mail-aliases is t, make sure define-mail-alias ;; does not recursively call build-mail-aliases. @@ -562,5 +567,4 @@ See `mail-directory-stream'." (provide 'mailalias) -;; arch-tag: 1d6a0f87-eb34-4d45-8816-60c1b952cf46 ;;; mailalias.el ends here diff --git a/lisp/mail/mailclient.el b/lisp/mail/mailclient.el index 2a5d77d4f74..ab9f3662745 100644 --- a/lisp/mail/mailclient.el +++ b/lisp/mail/mailclient.el @@ -1,6 +1,6 @@ ;;; mailclient.el --- mail sending via system's mail client. -*- byte-compile-dynamic: t -*- -;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation +;; Copyright (C) 2005-2011 Free Software Foundation ;; Author: David Reitter <david.reitter@gmail.com> ;; Keywords: mail @@ -174,5 +174,4 @@ The mail client is taken to be the handler of mailto URLs." (provide 'mailclient) -;; arch-tag: 35d10fc8-a1bc-4f29-a4e6-c288e53578ef ;;; mailclient.el ends here diff --git a/lisp/mail/mailheader.el b/lisp/mail/mailheader.el index 939e499a024..896400068cc 100644 --- a/lisp/mail/mailheader.el +++ b/lisp/mail/mailheader.el @@ -1,7 +1,6 @@ ;;; mailheader.el --- mail header parsing, merging, formatting -;; Copyright (C) 1996, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996, 2001-2011 Free Software Foundation, Inc. ;; Author: Erik Naggum <erik@naggum.no> ;; Keywords: tools, mail, news diff --git a/lisp/mail/mailpost.el b/lisp/mail/mailpost.el index 0790375388d..7c4bea830d8 100644 --- a/lisp/mail/mailpost.el +++ b/lisp/mail/mailpost.el @@ -102,5 +102,4 @@ site-init." (provide 'mailpost) -;; arch-tag: 1f8ca085-60a6-4eac-8efb-69ffec2fa124 ;;; mailpost.el ends here diff --git a/lisp/mail/metamail.el b/lisp/mail/metamail.el index 47326b636a1..9269a24c4cb 100644 --- a/lisp/mail/metamail.el +++ b/lisp/mail/metamail.el @@ -1,7 +1,6 @@ ;;; metamail.el --- Metamail interface for GNU Emacs -;; Copyright (C) 1993, 1996, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1996, 2001-2011 Free Software Foundation, Inc. ;; Author: Masanobu UMEDA <umerin@mse.kyutech.ac.jp> ;; Keywords: mail, news, mime, multimedia @@ -200,5 +199,4 @@ redisplayed as output is inserted." (provide 'metamail) -;; arch-tag: 52c0cb6f-d800-4776-9789-f0275cb5490e ;;; metamail.el ends here diff --git a/lisp/mail/mspools.el b/lisp/mail/mspools.el index 3ca0750aaf6..862cb2a1eee 100644 --- a/lisp/mail/mspools.el +++ b/lisp/mail/mspools.el @@ -1,7 +1,6 @@ ;;; mspools.el --- show mail spools waiting to be read -;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997, 2001-2011 Free Software Foundation, Inc. ;; Author: Stephen Eglen <stephen@gnu.org> ;; Maintainer: Stephen Eglen <stephen@gnu.org> diff --git a/lisp/mail/reporter.el b/lisp/mail/reporter.el index 877cc5aa399..45700d4d60d 100644 --- a/lisp/mail/reporter.el +++ b/lisp/mail/reporter.el @@ -1,7 +1,6 @@ ;;; reporter.el --- customizable bug reporting of lisp programs -;; Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993-1998, 2001-2011 Free Software Foundation, Inc. ;; Author: 1993-1998 Barry A. Warsaw ;; Maintainer: FSF @@ -407,5 +406,4 @@ mail-sending package is used for editing and sending the message." (provide 'reporter) -;; arch-tag: 33612ff4-fbbc-4be2-b183-560ce9e0199b ;;; reporter.el ends here diff --git a/lisp/mail/rfc2368.el b/lisp/mail/rfc2368.el index 0c91fcd8394..d3f824fe50f 100644 --- a/lisp/mail/rfc2368.el +++ b/lisp/mail/rfc2368.el @@ -1,7 +1,6 @@ ;;; rfc2368.el --- support for rfc2368 -;; Copyright (C) 1998, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998, 2000-2011 Free Software Foundation, Inc. ;; Author: Sen Nagata <sen@eccosys.com> ;; Keywords: mail diff --git a/lisp/mail/rfc822.el b/lisp/mail/rfc822.el index 2bdf16eff96..9e4e60e6806 100644 --- a/lisp/mail/rfc822.el +++ b/lisp/mail/rfc822.el @@ -1,7 +1,6 @@ ;;; rfc822.el --- hairy rfc822 parser for mail and news and suchlike -;; Copyright (C) 1986, 1987, 1990, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1986-1987, 1990, 2001-2011 Free Software Foundation, Inc. ;; Author: Richard Mlynarik <mly@eddie.mit.edu> ;; Maintainer: FSF @@ -324,5 +323,4 @@ (provide 'rfc822) -;; arch-tag: 5d388a24-e173-40fb-9b8e-85269de44b37 ;;; rfc822.el ends here diff --git a/lisp/mail/rmail-spam-filter.el b/lisp/mail/rmail-spam-filter.el index 33f3be30cc2..70226b26965 100644 --- a/lisp/mail/rmail-spam-filter.el +++ b/lisp/mail/rmail-spam-filter.el @@ -1,7 +1,6 @@ ;;; rmail-spam-filter.el --- spam filter for Rmail, the Emacs mail reader -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Keywords: email, spam, filter, rmail ;; Author: Eli Tziperman <eli AT deas.harvard.edu> ;; Package: rmail @@ -555,5 +554,4 @@ checks to see if the old format is used, and updates it if necessary." (provide 'rmail-spam-filter) -;; arch-tag: 03e1d45d-b72f-4dd7-8f04-e7fd78249746 ;;; rmail-spam-fitler ends here diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index ffb52683bd7..7e1cbe4ea8d 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -1,7 +1,6 @@ ;;; rmail.el --- main code of "RMAIL" mail reader for Emacs -;; Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1996, 1997, 1998, -;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 1985-1988, 1993-1998, 2000-2011 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -2691,75 +2690,72 @@ The current mail message becomes the message displayed." (message "Showing message %d" msg)) (narrow-to-region beg end) (goto-char beg) - (if (and rmail-enable-mime - (re-search-forward "mime-version: 1.0" nil t)) - (let ((rmail-buffer mbox-buf) - (rmail-view-buffer view-buf)) - (funcall rmail-show-mime-function)) - (setq body-start (search-forward "\n\n" nil t)) - (narrow-to-region beg (point)) - (goto-char beg) - (save-excursion - (if (re-search-forward "^X-Coding-System: *\\(.*\\)$" nil t) - (setq coding-system (intern (match-string 1))) - (setq coding-system (rmail-get-coding-system)))) - (setq character-coding (mail-fetch-field "content-transfer-encoding") - is-text-message (rmail-is-text-p)) - (if character-coding - (setq character-coding (downcase character-coding))) - (narrow-to-region beg end) - ;; Decode the message body into an empty view buffer using a - ;; unibyte temporary buffer where the character decoding takes - ;; place. - (with-current-buffer rmail-view-buffer - (erase-buffer)) - (if (null character-coding) - ;; Do it directly since that is fast. - (rmail-decode-region body-start end coding-system view-buf) - ;; Can this be done directly, skipping the temp buffer? - (with-temp-buffer - (set-buffer-multibyte nil) - (insert-buffer-substring mbox-buf body-start end) - (cond - ((string= character-coding "quoted-printable") - ;; See bug#5441. - (or (mail-unquote-printable-region (point-min) (point-max) - nil t 'unibyte) - (message "Malformed MIME quoted-printable message"))) - ((and (string= character-coding "base64") is-text-message) - (condition-case err - (base64-decode-region (point-min) (point-max)) - (error (message "%s" (cdr err))))) - ((eq character-coding 'uuencode) - (error "uuencoded messages are not supported yet")) - (t)) - (rmail-decode-region (point-min) (point-max) - coding-system view-buf)))) (with-current-buffer rmail-view-buffer ;; We give the view buffer a buffer-local value of ;; rmail-header-style based on the binding in effect when ;; this function is called; `rmail-toggle-headers' can ;; inspect this value to determine how to toggle. - (set (make-local-variable 'rmail-header-style) header-style) - ;; Unquote quoted From lines - (goto-char (point-min)) - (while (re-search-forward "^>+From " nil t) - (beginning-of-line) - (delete-char 1) - (forward-line)) - (goto-char (point-min))) - ;; Copy the headers to the front of the message view buffer. - (rmail-copy-headers beg end) - ;; Add the separator (blank line) between headers and body; + (set (make-local-variable 'rmail-header-style) header-style)) + (if (and rmail-enable-mime + (re-search-forward "mime-version: 1.0" nil t)) + (let ((rmail-buffer mbox-buf) + (rmail-view-buffer view-buf)) + (funcall rmail-show-mime-function)) + (setq body-start (search-forward "\n\n" nil t)) + (narrow-to-region beg (point)) + (goto-char beg) + (save-excursion + (if (re-search-forward "^X-Coding-System: *\\(.*\\)$" nil t) + (setq coding-system (intern (match-string 1))) + (setq coding-system (rmail-get-coding-system)))) + (setq character-coding (mail-fetch-field "content-transfer-encoding") + is-text-message (rmail-is-text-p)) + (if character-coding + (setq character-coding (downcase character-coding))) + (narrow-to-region beg end) + ;; Decode the message body into an empty view buffer using a + ;; unibyte temporary buffer where the character decoding takes + ;; place. + (with-current-buffer rmail-view-buffer + (erase-buffer)) + (if (null character-coding) + ;; Do it directly since that is fast. + (rmail-decode-region body-start end coding-system view-buf) + ;; Can this be done directly, skipping the temp buffer? + (with-temp-buffer + (set-buffer-multibyte nil) + (insert-buffer-substring mbox-buf body-start end) + (cond + ((string= character-coding "quoted-printable") + ;; See bug#5441. + (or (mail-unquote-printable-region (point-min) (point-max) + nil t 'unibyte) + (message "Malformed MIME quoted-printable message"))) + ((and (string= character-coding "base64") is-text-message) + (condition-case err + (base64-decode-region (point-min) (point-max)) + (error (message "%s" (cdr err))))) + ((eq character-coding 'uuencode) + (error "uuencoded messages are not supported yet")) + (t)) + (rmail-decode-region (point-min) (point-max) + coding-system view-buf))) + (with-current-buffer rmail-view-buffer + ;; Prepare the separator (blank line) before the body. + (goto-char (point-min)) + (insert "\n") + ;; Unquote quoted From lines + (while (re-search-forward "^>+From " nil t) + (beginning-of-line) + (delete-char 1) + (forward-line)) + (goto-char (point-min))) + ;; Copy the headers to the front of the message view buffer. + (rmail-copy-headers beg end)) ;; highlight the message, activate any URL like text and add ;; special highlighting for and quoted material. (with-current-buffer rmail-view-buffer - (insert "\n") (goto-char (point-min)) - ;; Decode the headers according to RFC2047. - (save-excursion - (search-forward "\n\n" nil 'move) - (rfc2047-decode-region (point-min) (point))) (rmail-highlight-headers) ;(rmail-activate-urls) ;(rmail-process-quoted-material) @@ -3444,30 +3440,62 @@ does not pop any summary buffer." ;;;; *** Rmail Mailing Commands *** (defun rmail-start-mail (&optional noerase to subject in-reply-to cc - replybuffer sendactions same-window others) - (let (yank-action) + replybuffer sendactions same-window + other-headers) + (let ((switch-function + (cond (same-window nil) + (rmail-mail-new-frame 'switch-to-buffer-other-frame) + (t 'switch-to-buffer-other-window))) + yank-action) (if replybuffer ;; The function used here must behave like insert-buffer wrt ;; point and mark (see doc of sc-cite-original). (setq yank-action (list 'insert-buffer replybuffer))) - (setq others (cons (cons "cc" cc) others)) - (setq others (cons (cons "in-reply-to" in-reply-to) others)) - (if same-window - (compose-mail to subject others - noerase nil - yank-action sendactions) - (if rmail-mail-new-frame - (prog1 - (compose-mail to subject others - noerase 'switch-to-buffer-other-frame - yank-action sendactions) - ;; This is not a standard frame parameter; - ;; nothing except sendmail.el looks at it. - (modify-frame-parameters (selected-frame) - '((mail-dedicated-frame . t)))) - (compose-mail to subject others - noerase 'switch-to-buffer-other-window - yank-action sendactions))))) + (push (cons "cc" cc) other-headers) + (push (cons "in-reply-to" in-reply-to) other-headers) + (prog1 + (compose-mail to subject other-headers noerase + switch-function yank-action sendactions + '(rmail-mail-return)) + (if (eq switch-function 'switch-to-buffer-other-frame) + ;; This is not a standard frame parameter; nothing except + ;; sendmail.el looks at it. + (modify-frame-parameters (selected-frame) + '((mail-dedicated-frame . t))))))) + +(defun rmail-mail-return () + (cond + ;; If there is only one visible frame with no special handling, + ;; consider deleting the mail window to return to Rmail. + ((or (null (delq (selected-frame) (visible-frame-list))) + (not (or (window-dedicated-p (frame-selected-window)) + (and pop-up-frames (one-window-p)) + (cdr (assq 'mail-dedicated-frame + (frame-parameters)))))) + (let (rmail-flag summary-buffer) + (and (not (one-window-p)) + (with-current-buffer + (window-buffer (next-window (selected-window) 'not)) + (setq rmail-flag (eq major-mode 'rmail-mode)) + (setq summary-buffer + (and (boundp 'mail-bury-selects-summary) + mail-bury-selects-summary + (boundp 'rmail-summary-buffer) + rmail-summary-buffer + (buffer-name rmail-summary-buffer) + (not (get-buffer-window rmail-summary-buffer)) + rmail-summary-buffer)))) + (if rmail-flag + ;; If the Rmail buffer has a summary, show that. + (if summary-buffer (switch-to-buffer summary-buffer) + (delete-window))))) + ;; If the frame was probably made for this buffer, the user + ;; probably wants to delete it now. + ((display-multi-frame-p) + (delete-frame (selected-frame))) + ;; The previous frame is where normally they have the Rmail buffer + ;; displayed. + (t (other-frame -1)))) (defun rmail-mail () "Send mail in another window. @@ -4234,7 +4262,7 @@ encoded string (and the same mask) will decode the string." ;;; Start of automatically extracted autoloads. ;;;### (autoloads (rmail-edit-current-message) "rmailedit" "rmailedit.el" -;;;;;; "4bf8a5cdfc921b9e30680ee71b7f9ca6") +;;;;;; "090ad9432c3bf9a6098bb9c3d7c71baf") ;;; Generated autoloads from rmailedit.el (autoload 'rmail-edit-current-message "rmailedit" "\ @@ -4246,7 +4274,7 @@ Edit the contents of this message. ;;;### (autoloads (rmail-next-labeled-message rmail-previous-labeled-message ;;;;;; rmail-read-label rmail-kill-label rmail-add-label) "rmailkwd" -;;;;;; "rmailkwd.el" "112240cbb53c402294013cc49987771a") +;;;;;; "rmailkwd.el" "08c288c88cfe7be50830122c064e3884") ;;; Generated autoloads from rmailkwd.el (autoload 'rmail-add-label "rmailkwd" "\ @@ -4289,23 +4317,33 @@ With prefix argument N moves forward N messages with these labels. ;;;*** -;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "ec0bed149baed671125f623e5b012f6f") +;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "3e235bdf4c2e54da06abcdd72e7f7649") ;;; Generated autoloads from rmailmm.el (autoload 'rmail-mime "rmailmm" "\ -Process the current Rmail message as a MIME message. -This creates a temporary \"*RMAIL*\" buffer holding a decoded -copy of the message. Inline content-types are handled according to +Toggle displaying of a MIME message. + +The actualy behavior depends on the value of `rmail-enable-mime'. + +If `rmail-enable-mime' is t (default), this command change the +displaying of a MIME message between decoded presentation form +and raw data. + +With ARG, toggle the displaying of the current MIME entity only. + +If `rmail-enable-mime' is nil, this creates a temporary +\"*RMAIL*\" buffer holding a decoded copy of the message. Inline +content-types are handled according to `rmail-mime-media-type-handlers-alist'. By default, this displays text and multipart messages, and offers to download attachments as specfied by `rmail-mime-attachment-dirs-alist'. -\(fn)" t nil) +\(fn &optional ARG)" t nil) ;;;*** ;;;### (autoloads (set-rmail-inbox-list) "rmailmsc" "rmailmsc.el" -;;;;;; "c3575020691d5769bcf08ecc932304c3") +;;;;;; "ca19b2f8a3e8aa01aa75ca7413f8a5ef") ;;; Generated autoloads from rmailmsc.el (autoload 'set-rmail-inbox-list "rmailmsc" "\ @@ -4321,7 +4359,7 @@ This applies only to the current session. ;;;### (autoloads (rmail-sort-by-labels rmail-sort-by-lines rmail-sort-by-correspondent ;;;;;; rmail-sort-by-recipient rmail-sort-by-author rmail-sort-by-subject -;;;;;; rmail-sort-by-date) "rmailsort" "rmailsort.el" "b96e85edd736f23f1e9d54a299268d1e") +;;;;;; rmail-sort-by-date) "rmailsort" "rmailsort.el" "f297fd33c8f7fa74baf16d2da99acb35") ;;; Generated autoloads from rmailsort.el (autoload 'rmail-sort-by-date "rmailsort" "\ @@ -4380,7 +4418,7 @@ If prefix argument REVERSE is non-nil, sorts in reverse order. ;;;### (autoloads (rmail-summary-by-senders rmail-summary-by-topic ;;;;;; rmail-summary-by-regexp rmail-summary-by-recipients rmail-summary-by-labels -;;;;;; rmail-summary) "rmailsum" "rmailsum.el" "666a5db1021cdcba6e68a18a553d65f1") +;;;;;; rmail-summary) "rmailsum" "rmailsum.el" "76a7ae570a4fa96a9233d0276f52f515") ;;; Generated autoloads from rmailsum.el (autoload 'rmail-summary "rmailsum" "\ @@ -4428,7 +4466,7 @@ SENDERS is a string of regexps separated by commas. ;;;*** ;;;### (autoloads (unforward-rmail-message undigestify-rmail-message) -;;;;;; "undigest" "undigest.el" "8cf8a8ffa48eeddf0bde388fa8de1783") +;;;;;; "undigest" "undigest.el" "41e6a48ea63224385c447a944528feb6") ;;; Generated autoloads from undigest.el (autoload 'undigestify-rmail-message "undigest" "\ diff --git a/lisp/mail/rmailedit.el b/lisp/mail/rmailedit.el index 02f36fd47e7..868ca15923f 100644 --- a/lisp/mail/rmailedit.el +++ b/lisp/mail/rmailedit.el @@ -1,7 +1,6 @@ ;;; rmailedit.el --- "RMAIL edit mode" Edit the current message -;; Copyright (C) 1985, 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1994, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: mail @@ -399,5 +398,4 @@ HEADER-DIFF should be a return value from `rmail-edit-diff-headers'." ;; generated-autoload-file: "rmail.el" ;; End: -;; arch-tag: 9524f335-12cc-4e95-9e9b-3208dc30550b ;;; rmailedit.el ends here diff --git a/lisp/mail/rmailkwd.el b/lisp/mail/rmailkwd.el index 5c44b5cafa2..73542578bf6 100644 --- a/lisp/mail/rmailkwd.el +++ b/lisp/mail/rmailkwd.el @@ -1,7 +1,6 @@ ;;; rmailkwd.el --- part of the "RMAIL" mail reader for Emacs -;; Copyright (C) 1985, 1988, 1994, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1988, 1994, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: mail @@ -194,5 +193,4 @@ With prefix argument N moves forward N messages with these labels." ;; generated-autoload-file: "rmail.el" ;; End: -;; arch-tag: 1149979c-8e47-4333-9629-cf3dc887a6a7 ;;; rmailkwd.el ends here diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el index 918d2dfc365..127fd8ac350 100644 --- a/lisp/mail/rmailmm.el +++ b/lisp/mail/rmailmm.el @@ -1,6 +1,6 @@ ;;; rmailmm.el --- MIME decoding and display stuff for RMAIL -;; Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2006-2011 Free Software Foundation, Inc. ;; Author: Alexander Pohoyda ;; Alex Schroeder @@ -53,7 +53,7 @@ ;; ;; rmail-mime ;; +- rmail-mime-show <----------------------------------+ -;; +- rmail-mime-process | +;; +- rmail-mime-process | ;; +- rmail-mime-handle | ;; +- rmail-mime-text-handler | ;; +- rmail-mime-bulk-handler | @@ -97,7 +97,9 @@ The first item is a regular expression matching a content-type. The remaining elements are handler functions to run, in order of decreasing preference. These are called until one returns non-nil. Note that this only applies to items with an inline Content-Disposition, -all others are handled by `rmail-mime-bulk-handler'." +all others are handled by `rmail-mime-bulk-handler'. +Note also that this alist is ignored when the variable +`rmail-enable-mime' is non-nil." :type '(alist :key-type regexp :value-type (repeat function)) :version "23.1" :group 'rmail-mime) @@ -131,18 +133,36 @@ automatically display the image in the buffer." ;;; End of user options. +;;; Global variables that always have let-binding when referred. + +(defvar rmail-mime-mbox-buffer nil + "Buffer containing the mbox data. +The value is usually nil, and bound to a proper value while +processing MIME.") + +(defvar rmail-mime-view-buffer nil + "Buffer showing a message. +The value is usually nil, and bound to a proper value while +processing MIME.") + +(defvar rmail-mime-coding-system nil + "The first coding-system used for decoding a MIME entity. +The value is usually nil, and bound to non-nil while inserting +MIME entities.") + ;;; MIME-entity object (defun rmail-mime-entity (type disposition transfer-encoding - header body children) - "Retrun a newly created MIME-entity object. + display header tagline body children handler) + "Retrun a newly created MIME-entity object from arguments. -A MIME-entity is a vector of 6 elements: +A MIME-entity is a vector of 9 elements: - [ TYPE DISPOSITION TRANSFER-ENCODING HEADER BODY CHILDREN ] - -TYPE and DISPOSITION correspond to MIME headers Content-Type: and -Cotent-Disposition: respectively, and has this format: + [TYPE DISPOSITION TRANSFER-ENCODING DISPLAY HEADER TAGLINE BODY + CHILDREN HANDLER] + +TYPE and DISPOSITION correspond to MIME headers Content-Type and +Cotent-Disposition respectively, and has this format: \(VALUE (ATTRIBUTE . VALUE) (ATTRIBUTE . VALUE) ...) @@ -161,31 +181,61 @@ The corresponding TYPE argument must be: TRANSFER-ENCODING corresponds to MIME header Content-Transfer-Encoding, and is a lowercased string. -HEADER and BODY are a cons (BEG . END), where BEG and END specify -the region of the corresponding part in RMAIL's data (mbox) -buffer. BODY may be nil. In that case, the current buffer is -narrowed to the body part. - -CHILDREN is a list of MIME-entities for a \"multipart\" entity, and -nil for the other types." - (vector type disposition transfer-encoding header body children)) +DISPLAY is a vector [CURRENT NEW], where CURRENT indicates how +the header, tagline, and body of the entity are displayed now, +and NEW indicates how their displaying should be updated. +Both elements are vector [HEADER-DISPLAY TAGLINE-DISPLAY BODY-DISPLAY], +where each element is a symbol for the corresponding item that +has these values: + nil: not displayed + t: displayed by the decoded presentation form + raw: displayed by the raw MIME data (for the header and body only) + +HEADER and BODY are vectors [BEG END DISPLAY-FLAG], where BEG and +END specify the region of the header or body lines in RMAIL's +data (mbox) buffer, and DISPLAY-FLAG non-nil means that the +header or body is, by default, displayed by the decoded +presentation form. + +TAGLINE is a vector [TAG BULK-DATA DISPLAY-FLAG], where TAG is a +string indicating the depth and index number of the entity, +BULK-DATA is a cons (SIZE . TYPE) indicating the size and type of +an attached data, DISPLAY-FLAG non-nil means that the tagline is, +by default, displayed. + +CHILDREN is a list of child MIME-entities. A \"multipart/*\" +entity have one or more children. A \"message/rfc822\" entity +has just one child. Any other entity has no child. + +HANDLER is a function to insert the entity according to DISPLAY. +It is called with one argument ENTITY." + (vector type disposition transfer-encoding + display header tagline body children handler)) ;; Accessors for a MIME-entity object. (defsubst rmail-mime-entity-type (entity) (aref entity 0)) (defsubst rmail-mime-entity-disposition (entity) (aref entity 1)) (defsubst rmail-mime-entity-transfer-encoding (entity) (aref entity 2)) -(defsubst rmail-mime-entity-header (entity) (aref entity 3)) -(defsubst rmail-mime-entity-body (entity) (aref entity 4)) -(defsubst rmail-mime-entity-children (entity) (aref entity 5)) +(defsubst rmail-mime-entity-display (entity) (aref entity 3)) +(defsubst rmail-mime-entity-header (entity) (aref entity 4)) +(defsubst rmail-mime-entity-tagline (entity) (aref entity 5)) +(defsubst rmail-mime-entity-body (entity) (aref entity 6)) +(defsubst rmail-mime-entity-children (entity) (aref entity 7)) +(defsubst rmail-mime-entity-handler (entity) (aref entity 8)) + +(defsubst rmail-mime-message-p () + "Non-nil if and only if the current message is a MIME." + (or (get-text-property (point) 'rmail-mime-entity) + (get-text-property (point-min) 'rmail-mime-entity))) ;;; Buttons (defun rmail-mime-save (button) "Save the attachment using info in the BUTTON." - (let* ((filename (button-get button 'filename)) + (let* ((rmail-mime-mbox-buffer rmail-view-buffer) + (filename (button-get button 'filename)) (directory (button-get button 'directory)) (data (button-get button 'data)) - (mbox-buf rmail-view-buffer) (ofilename filename)) (setq filename (expand-file-name (read-file-name (format "Save as (default: %s): " filename) @@ -210,7 +260,8 @@ nil for the other types." ;; DATA is a MIME-entity object. (let ((transfer-encoding (rmail-mime-entity-transfer-encoding data)) (body (rmail-mime-entity-body data))) - (insert-buffer-substring mbox-buf (car body) (cdr body)) + (insert-buffer-substring rmail-mime-mbox-buffer + (aref body 0) (aref body 1)) (cond ((string= transfer-encoding "base64") (ignore-errors (base64-decode-region (point-min) (point-max)))) ((string= transfer-encoding "quoted-printable") @@ -219,34 +270,294 @@ nil for the other types." (define-button-type 'rmail-mime-save 'action 'rmail-mime-save) +(defun rmail-mime-entity-segment (pos &optional entity) + "Return a vector describing the displayed region of a MIME-entity at POS. +Optional 2nd argument ENTITY is the MIME-entity at POS. +The value is a vector [ INDEX HEADER TAGLINE BODY END], where + INDEX: index into the returned vector indicating where POS is (1..3). + HEADER: the position of the beginning of a header + TAGLINE: the position of the beginning of a tagline + BODY: the position of the beginning of a body + END: the position of the end of the entity." + (save-excursion + (or entity + (setq entity (get-text-property pos 'rmail-mime-entity))) + (if (not entity) + (vector 1 (point) (point) (point) (point)) + (let ((current (aref (rmail-mime-entity-display entity) 0)) + (beg (if (and (> pos (point-min)) + (eq (get-text-property (1- pos) 'rmail-mime-entity) + entity)) + (previous-single-property-change pos 'rmail-mime-entity + nil (point-min)) + pos)) + (index 1) + tagline-beg body-beg end) + (goto-char beg) + (if (aref current 0) + (search-forward "\n\n" nil t)) + (setq tagline-beg (point)) + (if (>= pos tagline-beg) + (setq index 2)) + (if (aref current 1) + (forward-line 1)) + (setq body-beg (point)) + (if (>= pos body-beg) + (setq index 3)) + (if (aref current 2) + (let ((tag (aref (rmail-mime-entity-tagline entity) 0)) + tag2) + (setq end (next-single-property-change beg 'rmail-mime-entity + nil (point-max))) + (while (and (< end (point-max)) + (setq entity (get-text-property end 'rmail-mime-entity) + tag2 (aref (rmail-mime-entity-tagline entity) 0)) + (and (> (length tag2) 0) + (eq (string-match tag tag2) 0))) + (setq end (next-single-property-change end 'rmail-mime-entity + nil (point-max))))) + (setq end body-beg)) + (vector index beg tagline-beg body-beg end))))) + +(defun rmail-mime-shown-mode (entity) + "Make MIME-entity ENTITY displayed by the default way." + (let ((new (aref (rmail-mime-entity-display entity) 1))) + (aset new 0 (aref (rmail-mime-entity-header entity) 2)) + (aset new 1 (aref (rmail-mime-entity-tagline entity) 2)) + (aset new 2 (aref (rmail-mime-entity-body entity) 2))) + (dolist (child (rmail-mime-entity-children entity)) + (rmail-mime-shown-mode child))) + +(defun rmail-mime-hidden-mode (entity) + "Make MIME-entity ENTITY displayed in the hidden mode." + (let ((new (aref (rmail-mime-entity-display entity) 1))) + (aset new 0 nil) + (aset new 1 t) + (aset new 2 nil)) + (dolist (child (rmail-mime-entity-children entity)) + (rmail-mime-hidden-mode child))) + +(defun rmail-mime-raw-mode (entity) + "Make MIME-entity ENTITY displayed in the raw mode." + (let ((new (aref (rmail-mime-entity-display entity) 1))) + (aset new 0 'raw) + (aset new 1 nil) + (aset new 2 'raw)) + (dolist (child (rmail-mime-entity-children entity)) + (rmail-mime-raw-mode child))) + +(defun rmail-mime-toggle-raw (entity) + "Toggle on and off the raw display mode of MIME-entity ENTITY." + (let* ((pos (if (eobp) (1- (point-max)) (point))) + (entity (get-text-property pos 'rmail-mime-entity)) + (current (aref (rmail-mime-entity-display entity) 0)) + (segment (rmail-mime-entity-segment pos entity))) + (if (not (eq (aref current 0) 'raw)) + ;; Enter the raw mode. + (rmail-mime-raw-mode entity) + ;; Enter the shown mode. + (rmail-mime-shown-mode entity)) + (let ((inhibit-read-only t) + (modified (buffer-modified-p))) + (save-excursion + (goto-char (aref segment 1)) + (rmail-mime-insert entity) + (restore-buffer-modified-p modified))))) + +(defun rmail-mime-toggle-hidden () + "Hide or show the body of MIME-entity at point." + (interactive) + (when (rmail-mime-message-p) + (let* ((rmail-mime-mbox-buffer rmail-view-buffer) + (rmail-mime-view-buffer (current-buffer)) + (pos (if (eobp) (1- (point-max)) (point))) + (entity (get-text-property pos 'rmail-mime-entity)) + (current (aref (rmail-mime-entity-display entity) 0)) + (segment (rmail-mime-entity-segment pos entity))) + (if (aref current 2) + ;; Enter the hidden mode. + (progn + ;; If point is in the body part, move it to the tagline + ;; (or the header if tagline is not displayed). + (if (= (aref segment 0) 3) + (goto-char (aref segment 2))) + (rmail-mime-hidden-mode entity) + ;; If the current entity is the topmost one, display the + ;; header. + (if (and rmail-mime-mbox-buffer (= (aref segment 1) (point-min))) + (let ((new (aref (rmail-mime-entity-display entity) 1))) + (aset new 0 t)))) + ;; Enter the shown mode. + (rmail-mime-shown-mode entity) + ;; Force this body shown. + (aset (aref (rmail-mime-entity-display entity) 1) 2 t)) + (let ((inhibit-read-only t) + (modified (buffer-modified-p)) + (rmail-mime-mbox-buffer rmail-view-buffer) + (rmail-mime-view-buffer rmail-buffer)) + (save-excursion + (goto-char (aref segment 1)) + (rmail-mime-insert entity) + (restore-buffer-modified-p modified)))))) + +(define-key rmail-mode-map "\t" 'forward-button) +(define-key rmail-mode-map [backtab] 'backward-button) +(define-key rmail-mode-map "\r" 'rmail-mime-toggle-hidden) + ;;; Handlers +(defun rmail-mime-insert-tagline (entity &rest item-list) + "Insert a tag line for MIME-entity ENTITY. +ITEM-LIST is a list of strings or button-elements (list) to be added +to the tag line." + (insert "[") + (let ((tag (aref (rmail-mime-entity-tagline entity) 0))) + (if (> (length tag) 0) (insert (substring tag 1) ":"))) + (insert (car (rmail-mime-entity-type entity)) " ") + (insert-button (let ((new (aref (rmail-mime-entity-display entity) 1))) + (if (aref new 2) "Hide" "Show")) + :type 'rmail-mime-toggle + 'help-echo "mouse-2, RET: Toggle show/hide") + (dolist (item item-list) + (when item + (if (stringp item) + (insert item) + (apply 'insert-button item)))) + (insert "]\n")) + +(defun rmail-mime-update-tagline (entity) + "Update the current tag line for MIME-entity ENTITY." + (let ((inhibit-read-only t) + (modified (buffer-modified-p)) + ;; If we are going to show the body, the new button label is + ;; "Hide". Otherwise, it's "Show". + (label (if (aref (aref (rmail-mime-entity-display entity) 1) 2) "Hide" + "Show")) + (button (next-button (point)))) + ;; Go to the second character of the button "Show" or "Hide". + (goto-char (1+ (button-start button))) + (setq button (button-at (point))) + (save-excursion + (insert label) + (delete-region (point) (button-end button))) + (delete-region (button-start button) (point)) + (put-text-property (point) (button-end button) 'rmail-mime-entity entity) + (restore-buffer-modified-p modified) + (forward-line 1))) + +(defun rmail-mime-insert-header (header) + "Decode and insert a MIME-entity header HEADER in the current buffer. +HEADER is a vector [BEG END DEFAULT-STATUS]. +See `rmail-mime-entity' for the detail." + (let ((pos (point)) + (last-coding-system-used nil)) + (save-restriction + (narrow-to-region pos pos) + (with-current-buffer rmail-mime-mbox-buffer + (let ((rmail-buffer rmail-mime-mbox-buffer) + (rmail-view-buffer rmail-mime-view-buffer)) + (save-excursion + (goto-char (aref header 0)) + (rmail-copy-headers (point) (aref header 1))))) + (rfc2047-decode-region pos (point)) + (if (and last-coding-system-used (not rmail-mime-coding-system)) + (setq rmail-mime-coding-system (cons last-coding-system-used nil))) + (goto-char (point-min)) + (rmail-highlight-headers) + (goto-char (point-max)) + (insert "\n")))) + +(defun rmail-mime-find-header-encoding (header) + "Retun the last coding system used to decode HEADER. +HEADER is a header component of a MIME-entity object (see +`rmail-mime-entity')." + (with-temp-buffer + (let ((last-coding-system-used nil)) + (with-current-buffer rmail-mime-mbox-buffer + (let ((rmail-buffer rmail-mime-mbox-buffer) + (rmail-view-buffer rmail-mime-view-buffer)) + (save-excursion + (goto-char (aref header 0)) + (rmail-copy-headers (point) (aref header 1))))) + (rfc2047-decode-region (point-min) (point-max)) + last-coding-system-used))) + (defun rmail-mime-text-handler (content-type content-disposition content-transfer-encoding) "Handle the current buffer as a plain text MIME part." - (let* ((charset (cdr (assq 'charset (cdr content-type)))) - (coding-system (when charset - (intern (downcase charset))))) - (when (coding-system-p coding-system) - (decode-coding-region (point-min) (point-max) coding-system)))) - -(defun rmail-mime-insert-text (entity) - "Insert MIME-entity ENTITY as a plain text MIME part in the current buffer." + (rmail-mime-insert-text + (rmail-mime-entity content-type content-disposition + content-transfer-encoding + (vector (vector nil nil nil) (vector nil nil t)) + (vector nil nil nil) (vector "" (cons nil nil) t) + (vector nil nil nil) nil 'rmail-mime-insert-text)) + t) + +(defun rmail-mime-insert-decoded-text (entity) + "Decode and insert the text body of MIME-entity ENTITY." (let* ((content-type (rmail-mime-entity-type entity)) (charset (cdr (assq 'charset (cdr content-type)))) - (coding-system (if charset (intern (downcase charset)))) - (transfer-encoding (rmail-mime-entity-transfer-encoding entity)) - (body (rmail-mime-entity-body entity))) - (save-restriction - (narrow-to-region (point) (point)) - (insert-buffer-substring rmail-buffer (car body) (cdr body)) - (cond ((string= transfer-encoding "base64") - (ignore-errors (base64-decode-region (point-min) (point-max)))) - ((string= transfer-encoding "quoted-printable") - (quoted-printable-decode-region (point-min) (point-max)))) - (if (coding-system-p coding-system) - (decode-coding-region (point-min) (point-max) coding-system))))) + (coding-system (if charset + (coding-system-from-name charset))) + (body (rmail-mime-entity-body entity)) + (pos (point))) + (or (and coding-system (coding-system-p coding-system)) + (setq coding-system 'undecided)) + (if (stringp (aref body 0)) + (insert (aref body 0)) + (let ((transfer-encoding (rmail-mime-entity-transfer-encoding entity))) + (insert-buffer-substring rmail-mime-mbox-buffer + (aref body 0) (aref body 1)) + (cond ((string= transfer-encoding "base64") + (ignore-errors (base64-decode-region pos (point)))) + ((string= transfer-encoding "quoted-printable") + (quoted-printable-decode-region pos (point)))))) + (decode-coding-region pos (point) coding-system) + (if (or (not rmail-mime-coding-system) (consp rmail-mime-coding-system)) + (setq rmail-mime-coding-system coding-system)) + (or (bolp) (insert "\n")))) + +(defun rmail-mime-insert-text (entity) + "Presentation handler for a plain text MIME entity." + (let ((current (aref (rmail-mime-entity-display entity) 0)) + (new (aref (rmail-mime-entity-display entity) 1)) + (header (rmail-mime-entity-header entity)) + (tagline (rmail-mime-entity-tagline entity)) + (body (rmail-mime-entity-body entity)) + (beg (point)) + (segment (rmail-mime-entity-segment (point) entity))) + + (or (integerp (aref body 0)) + (let ((data (buffer-string))) + (aset body 0 data) + (delete-region (point-min) (point-max)))) + + ;; header + (if (eq (aref current 0) (aref new 0)) + (goto-char (aref segment 2)) + (if (aref current 0) + (delete-char (- (aref segment 2) (aref segment 1)))) + (if (aref new 0) + (rmail-mime-insert-header header))) + ;; tagline + (if (eq (aref current 1) (aref new 1)) + (if (or (not (aref current 1)) + (eq (aref current 2) (aref new 2))) + (forward-char (- (aref segment 3) (aref segment 2))) + (rmail-mime-update-tagline entity)) + (if (aref current 1) + (delete-char (- (aref segment 3) (aref segment 2)))) + (if (aref new 1) + (rmail-mime-insert-tagline entity))) + ;; body + (if (eq (aref current 2) (aref new 2)) + (forward-char (- (aref segment 4) (aref segment 3))) + (if (aref current 2) + (delete-char (- (aref segment 4) (aref segment 3)))) + (if (aref new 2) + (rmail-mime-insert-decoded-text entity))) + (put-text-property beg (point) 'rmail-mime-entity entity))) ;; FIXME move to the test/ directory? (defun test-rmail-mime-handler () @@ -265,37 +576,37 @@ MIME-Version: 1.0 (set-buffer-multibyte t))) -(defun rmail-mime-insert-image (type data) - "Insert an image of type TYPE, where DATA is the image data. -If DATA is not a string, it is a MIME-entity object." - (end-of-line) - (let ((modified (buffer-modified-p))) - (insert ?\n) - (unless (stringp data) - ;; DATA is a MIME-entity. - (let ((transfer-encoding (rmail-mime-entity-transfer-encoding data)) - (body (rmail-mime-entity-body data)) - (mbox-buffer rmail-view-buffer)) +(defun rmail-mime-insert-image (entity) + "Decode and insert the image body of MIME-entity ENTITY." + (let* ((content-type (car (rmail-mime-entity-type entity))) + (bulk-data (aref (rmail-mime-entity-tagline entity) 1)) + (body (rmail-mime-entity-body entity)) + data) + (if (stringp (aref body 0)) + (setq data (aref body 0)) + (let ((rmail-mime-mbox-buffer rmail-view-buffer) + (transfer-encoding (rmail-mime-entity-transfer-encoding entity))) (with-temp-buffer (set-buffer-multibyte nil) (setq buffer-undo-list t) - (insert-buffer-substring mbox-buffer (car body) (cdr body)) + (insert-buffer-substring rmail-mime-mbox-buffer + (aref body 0) (aref body 1)) (cond ((string= transfer-encoding "base64") (ignore-errors (base64-decode-region (point-min) (point-max)))) ((string= transfer-encoding "quoted-printable") (quoted-printable-decode-region (point-min) (point-max)))) (setq data (buffer-substring-no-properties (point-min) (point-max)))))) - (insert-image (create-image data type t)) - (set-buffer-modified-p modified))) + (insert-image (create-image data (cdr bulk-data) t)) + (insert "\n"))) -(defun rmail-mime-image (button) - "Display the image associated with BUTTON." - (let ((inhibit-read-only t)) - (rmail-mime-insert-image (button-get button 'image-type) - (button-get button 'image-data)))) +(defun rmail-mime-toggle-button (button) + "Hide or show the body of the MIME-entity associated with BUTTON." + (save-excursion + (goto-char (button-start button)) + (rmail-mime-toggle-hidden))) -(define-button-type 'rmail-mime-image 'action 'rmail-mime-image) +(define-button-type 'rmail-mime-toggle 'action 'rmail-mime-toggle-button) (defun rmail-mime-bulk-handler (content-type @@ -306,16 +617,61 @@ For images that Emacs is capable of displaying, the behavior depends upon the value of `rmail-mime-show-images'." (rmail-mime-insert-bulk (rmail-mime-entity content-type content-disposition content-transfer-encoding - nil nil nil))) + (vector (vector nil nil nil) (vector nil t nil)) + (vector nil nil nil) (vector "" (cons nil nil) t) + (vector nil nil nil) nil 'rmail-mime-insert-bulk))) + +(defun rmail-mime-set-bulk-data (entity) + "Setup the information about the attachment object for MIME-entity ENTITY. +The value is non-nil if and only if the attachment object should be shown +directly." + (let ((content-type (car (rmail-mime-entity-type entity))) + (size (cdr (assq 'size (cdr (rmail-mime-entity-disposition entity))))) + (bulk-data (aref (rmail-mime-entity-tagline entity) 1)) + (body (rmail-mime-entity-body entity)) + type to-show) + (cond (size + (setq size (string-to-number size))) + ((stringp (aref body 0)) + (setq size (length (aref body 0)))) + (t + ;; Rough estimation of the size. + (let ((encoding (rmail-mime-entity-transfer-encoding entity))) + (setq size (- (aref body 1) (aref body 0))) + (cond ((string= encoding "base64") + (setq size (/ (* size 3) 4))) + ((string= encoding "quoted-printable") + (setq size (/ (* size 7) 3))))))) + + (cond + ((string-match "text/" content-type) + (setq type 'text)) + ((string-match "image/\\(.*\\)" content-type) + (setq type (image-type-from-file-name + (concat "." (match-string 1 content-type)))) + (if (and (memq type image-types) + (image-type-available-p type)) + (if (and rmail-mime-show-images + (not (eq rmail-mime-show-images 'button)) + (or (not (numberp rmail-mime-show-images)) + (< size rmail-mime-show-images))) + (setq to-show t)) + (setq type nil)))) + (setcar bulk-data size) + (setcdr bulk-data type) + to-show)) (defun rmail-mime-insert-bulk (entity) - "Inesrt a MIME-entity ENTITY as an attachment. -The optional second arg DATA, if non-nil, is a string containing -the attachment data that is already decoded." - ;; Find the default directory for this media type. + "Presentation handler for an attachment MIME entity." (let* ((content-type (rmail-mime-entity-type entity)) (content-disposition (rmail-mime-entity-disposition entity)) + (current (aref (rmail-mime-entity-display entity) 0)) + (new (aref (rmail-mime-entity-display entity) 1)) + (header (rmail-mime-entity-header entity)) + (tagline (rmail-mime-entity-tagline entity)) + (bulk-data (aref tagline 1)) (body (rmail-mime-entity-body entity)) + ;; Find the default directory for this media type. (directory (catch 'directory (dolist (entry rmail-mime-attachment-dirs-alist) (when (string-match (car entry) (car content-type)) @@ -325,47 +681,80 @@ the attachment data that is already decoded." (filename (or (cdr (assq 'name (cdr content-type))) (cdr (assq 'filename (cdr content-disposition))) "noname")) - (label (format "\nAttached %s file: " (car content-type))) (units '(B kB MB GB)) - data udata size osize type) - (if body + (segment (rmail-mime-entity-segment (point) entity)) + beg data size) + + (if (integerp (aref body 0)) (setq data entity - udata entity - size (- (cdr body) (car body))) - (setq data (buffer-string) - udata (string-as-unibyte data) - size (length udata)) - (delete-region (point-min) (point-max))) - (setq osize size) + size (car bulk-data)) + (if (stringp (aref body 0)) + (setq data (aref body 0)) + (setq data (string-as-unibyte (buffer-string))) + (aset body 0 data) + (rmail-mime-set-bulk-data entity) + (delete-region (point-min) (point-max))) + (setq size (length data))) (while (and (> size 1024.0) ; cribbed from gnus-agent-expire-done-message (cdr units)) (setq size (/ size 1024.0) units (cdr units))) - (insert label) - (insert-button filename - :type 'rmail-mime-save - 'help-echo "mouse-2, RET: Save attachment" - 'filename filename - 'directory (file-name-as-directory directory) - 'data data) - (insert (format " (%.0f%s)" size (car units))) - (when (and rmail-mime-show-images - (string-match "image/\\(.*\\)" (setq type (car content-type))) - (setq type (concat "." (match-string 1 type)) - type (image-type-from-file-name type)) - (memq type image-types) - (image-type-available-p type)) - (insert " ") - (cond ((or (eq rmail-mime-show-images 'button) - (and (numberp rmail-mime-show-images) - (>= osize rmail-mime-show-images))) - (insert-button "Display" - :type 'rmail-mime-image - 'help-echo "mouse-2, RET: Show image" - 'image-type type - 'image-data udata)) - (t - (rmail-mime-insert-image type udata)))))) + + (setq beg (point)) + + ;; header + (if (eq (aref current 0) (aref new 0)) + (goto-char (aref segment 2)) + (if (aref current 0) + (delete-char (- (aref segment 2) (aref segment 1)))) + (if (aref new 0) + (rmail-mime-insert-header header))) + + ;; tagline + (if (eq (aref current 1) (aref new 1)) + (if (or (not (aref current 1)) + (eq (aref current 2) (aref new 2))) + (forward-char (- (aref segment 3) (aref segment 2))) + (rmail-mime-update-tagline entity)) + (if (aref current 1) + (delete-char (- (aref segment 3) (aref segment 2)))) + (if (aref new 1) + (rmail-mime-insert-tagline + entity + " Save:" + (list filename + :type 'rmail-mime-save + 'help-echo "mouse-2, RET: Save attachment" + 'filename filename + 'directory (file-name-as-directory directory) + 'data data) + (format " (%.0f%s)" size (car units)) + ;; We don't need this button because the "type" string of a + ;; tagline is the button to do this. + ;; (if (cdr bulk-data) + ;; " ") + ;; (if (cdr bulk-data) + ;; (list "Toggle show/hide" + ;; :type 'rmail-mime-image + ;; 'help-echo "mouse-2, RET: Toggle show/hide" + ;; 'image-type (cdr bulk-data) + ;; 'image-data data)) + ))) + ;; body + (if (eq (aref current 2) (aref new 2)) + (forward-char (- (aref segment 4) (aref segment 3))) + (if (aref current 2) + (delete-char (- (aref segment 4) (aref segment 3)))) + (if (aref new 2) + (cond ((eq (cdr bulk-data) 'text) + (rmail-mime-insert-decoded-text entity)) + ((cdr bulk-data) + (rmail-mime-insert-image entity)) + (t + ;; As we don't know how to display the body, just + ;; insert it as a text. + (rmail-mime-insert-decoded-text entity))))) + (put-text-property beg (point) 'rmail-mime-entity entity))) (defun test-rmail-mime-bulk-handler () "Test of a mail used as an example in RFC 2183." @@ -397,19 +786,21 @@ CONTENT-DISPOSITION, and CONTENT-TRANSFER-ENCODING are the values of the respective parsed headers. See `rmail-mime-handle' for their format." (rmail-mime-process-multipart - content-type content-disposition content-transfer-encoding nil)) + content-type content-disposition content-transfer-encoding nil) + t) (defun rmail-mime-process-multipart (content-type content-disposition content-transfer-encoding - parse-only) + parse-tag) "Process the current buffer as a multipart MIME body. -If PARSE-ONLY is nil, modify the current buffer directly for showing -the MIME body and return nil. +If PARSE-TAG is nil, modify the current buffer directly for +showing the MIME body and return nil. -Otherwise, just parse the current buffer and return a list of -MIME-entity objects. +Otherwise, PARSE-TAG is a string indicating the depth and index +number of the entity. In this case, parse the current buffer and +return a list of MIME-entity objects. The other arguments are the same as `rmail-mime-multipart-handler'." ;; Some MUAs start boundaries with "--", while it should start @@ -420,6 +811,8 @@ The other arguments are the same as `rmail-mime-multipart-handler'." ;; of the preceding part. ;; We currently don't handle that. (let ((boundary (cdr (assq 'boundary content-type))) + (subtype (cadr (split-string (car content-type) "/"))) + (index 0) beg end next entities) (unless boundary (rmail-mm-get-boundary-error-message @@ -430,12 +823,22 @@ The other arguments are the same as `rmail-mime-multipart-handler'." (goto-char (point-min)) (when (and (search-forward boundary nil t) (looking-at "[ \t]*\n")) - (if parse-only + (if parse-tag (narrow-to-region (match-end 0) (point-max)) (delete-region (point-min) (match-end 0)))) + + ;; Change content-type to the proper default one for the children. + (cond ((string-match "mixed" subtype) + (setq content-type '("text/plain"))) + ((string-match "digest" subtype) + (setq content-type '("message/rfc822"))) + (t + (setq content-type nil))) + ;; Loop over all body parts, where beg points at the beginning of ;; the part and end points at the end of the part. next points at - ;; the beginning of the next part. + ;; the beginning of the next part. The current point is just + ;; after the boundary tag. (setq beg (point-min)) (while (search-forward boundary nil t) (setq end (match-beginning 0)) @@ -450,17 +853,47 @@ The other arguments are the same as `rmail-mime-multipart-handler'." (rmail-mm-get-boundary-error-message "Malformed boundary" content-type content-disposition content-transfer-encoding))) + + (setq index (1+ index)) ;; Handle the part. - (if parse-only + (if parse-tag (save-restriction (narrow-to-region beg end) - (setq entities (cons (rmail-mime-process nil t) entities))) + (let ((child (rmail-mime-process + nil (format "%s/%d" parse-tag index) + content-type content-disposition))) + ;; Display a tagline. + (aset (aref (rmail-mime-entity-display child) 1) 1 + (aset (rmail-mime-entity-tagline child) 2 t)) + (push child entities))) + (delete-region end next) (save-restriction (narrow-to-region beg end) (rmail-mime-show))) (goto-char (setq beg next))) - (nreverse entities))) + + (when parse-tag + (setq entities (nreverse entities)) + (if (string-match "alternative" subtype) + ;; Find the best entity to show, and hide all the others. + (let (best second) + (dolist (child entities) + (if (string= (or (car (rmail-mime-entity-disposition child)) + (car content-disposition)) + "inline") + (if (string-match "text/plain" + (car (rmail-mime-entity-type child))) + (setq best child) + (if (string-match "text/.*" + (car (rmail-mime-entity-type child))) + (setq second child))))) + (or best (not second) (setq best second)) + (dolist (child entities) + (unless (eq best child) + (aset (rmail-mime-entity-body child) 2 nil) + (rmail-mime-hidden-mode child))))) + entities))) (defun test-rmail-mime-multipart-handler () "Test of a mail used as an example in RFC 2046." @@ -493,6 +926,42 @@ This is the epilogue. It is also to be ignored.")) (insert mail) (rmail-mime-show t))) +(defun rmail-mime-insert-multipart (entity) + "Presentation handler for a multipart MIME entity." + (let ((current (aref (rmail-mime-entity-display entity) 0)) + (new (aref (rmail-mime-entity-display entity) 1)) + (header (rmail-mime-entity-header entity)) + (tagline (rmail-mime-entity-tagline entity)) + (body (rmail-mime-entity-body entity)) + (beg (point)) + (segment (rmail-mime-entity-segment (point) entity))) + ;; header + (if (eq (aref current 0) (aref new 0)) + (goto-char (aref segment 2)) + (if (aref current 0) + (delete-char (- (aref segment 2) (aref segment 1)))) + (if (aref new 0) + (rmail-mime-insert-header header))) + ;; tagline + (if (eq (aref current 1) (aref new 1)) + (if (or (not (aref current 1)) + (eq (aref current 2) (aref new 2))) + (forward-char (- (aref segment 3) (aref segment 2))) + (rmail-mime-update-tagline entity)) + (if (aref current 1) + (delete-char (- (aref segment 3) (aref segment 2)))) + (if (aref new 1) + (rmail-mime-insert-tagline entity))) + + (put-text-property beg (point) 'rmail-mime-entity entity) + + ;; body + (if (eq (aref current 2) (aref new 2)) + (forward-char (- (aref segment 4) (aref segment 3))) + (dolist (child (rmail-mime-entity-children entity)) + (rmail-mime-insert child))) + entity)) + ;;; Main code (defun rmail-mime-handle (content-type @@ -552,7 +1021,16 @@ The parsed header value: ;; Everything else is an attachment. (rmail-mime-bulk-handler content-type content-disposition - content-transfer-encoding))) + content-transfer-encoding)) + (save-restriction + (widen) + (let ((entity (get-text-property (1- (point)) 'rmail-mime-entity)) + current new) + (when entity + (setq current (aref (rmail-mime-entity-display entity) 0) + new (aref (rmail-mime-entity-display entity) 1)) + (dotimes (i 3) + (aset current i (aref new i))))))) (defun rmail-mime-show (&optional show-headers) "Handle the current buffer as a MIME message. @@ -565,7 +1043,9 @@ The current buffer must contain a single message. It will be modified." (rmail-mime-process show-headers nil)) -(defun rmail-mime-process (show-headers parse-only) +(defun rmail-mime-process (show-headers parse-tag &optional + default-content-type + default-content-disposition) (let ((end (point-min)) content-type content-transfer-encoding @@ -595,46 +1075,78 @@ modified." (setq content-transfer-encoding (downcase content-transfer-encoding))) (setq content-type (if content-type - (mail-header-parse-content-type content-type) - ;; FIXME: Default "message/rfc822" in a "multipart/digest" - ;; according to RFC 2046. - '("text/plain"))) + (or (mail-header-parse-content-type content-type) + '("text/plain")) + (or default-content-type '("text/plain")))) (setq content-disposition (if content-disposition (mail-header-parse-content-disposition content-disposition) ;; If none specified, we are free to choose what we deem ;; suitable according to RFC 2183. We like inline. - '("inline"))) + (or default-content-disposition '("inline")))) ;; Unrecognized disposition types are to be treated like ;; attachment according to RFC 2183. (unless (member (car content-disposition) '("inline" "attachment")) (setq content-disposition '("attachment"))) - (if parse-only - (cond ((string-match "multipart/.*" (car content-type)) - (setq end (1- end)) - (save-restriction - (let ((header (if show-headers (cons (point-min) end)))) + (if parse-tag + (let* ((is-inline (string= (car content-disposition) "inline")) + (header (vector (point-min) end nil)) + (tagline (vector parse-tag (cons nil nil) t)) + (body (vector end (point-max) is-inline)) + (new (vector (aref header 2) (aref tagline 2) (aref body 2))) + children handler entity) + (cond ((string-match "multipart/.*" (car content-type)) + (save-restriction + (narrow-to-region (1- end) (point-max)) + (setq children (rmail-mime-process-multipart + content-type + content-disposition + content-transfer-encoding + parse-tag) + handler 'rmail-mime-insert-multipart))) + ((string-match "message/rfc822" (car content-type)) + (save-restriction (narrow-to-region end (point-max)) - (rmail-mime-entity content-type - content-disposition - content-transfer-encoding - header nil - (rmail-mime-process-multipart - content-type content-disposition - content-transfer-encoding t))))) - ((string-match "message/rfc822" (car content-type)) - (or show-headers - (narrow-to-region end (point-max))) - (rmail-mime-process t t)) - (t - (rmail-mime-entity content-type - content-disposition - content-transfer-encoding - nil - (cons end (point-max)) - nil))) + (let* ((msg (rmail-mime-process t parse-tag + '("text/plain") '("inline"))) + (msg-new (aref (rmail-mime-entity-display msg) 1))) + ;; Show header of the child. + (aset msg-new 0 t) + (aset (rmail-mime-entity-header msg) 2 t) + ;; Hide tagline of the child. + (aset msg-new 1 nil) + (aset (rmail-mime-entity-tagline msg) 2 nil) + (setq children (list msg) + handler 'rmail-mime-insert-multipart)))) + ((and is-inline (string-match "text/" (car content-type))) + ;; Don't need a tagline. + (aset new 1 (aset tagline 2 nil)) + (setq handler 'rmail-mime-insert-text)) + (t + ;; Force hidden mode. + (aset new 1 (aset tagline 2 t)) + (aset new 2 (aset body 2 nil)) + (setq handler 'rmail-mime-insert-bulk))) + (setq entity (rmail-mime-entity content-type + content-disposition + content-transfer-encoding + (vector (vector nil nil nil) new) + header tagline body children handler)) + (if (and (eq handler 'rmail-mime-insert-bulk) + (rmail-mime-set-bulk-data entity)) + ;; Show the body. + (aset new 2 (aset body 2 t))) + entity) + ;; Hide headers and handle the part. + (put-text-property (point-min) (point-max) 'rmail-mime-entity + (rmail-mime-entity + content-type content-disposition + content-transfer-encoding + (vector (vector 'raw nil 'raw) (vector 'raw nil 'raw)) + (vector nil nil 'raw) (vector "" (cons nil nil) nil) + (vector nil nil 'raw) nil nil)) (save-restriction (cond ((string= (car content-type) "message/rfc822") (narrow-to-region end (point-max))) @@ -643,100 +1155,125 @@ modified." (rmail-mime-handle content-type content-disposition content-transfer-encoding))))) -(defun rmail-mime-insert-multipart (entity) - "Insert MIME-entity ENTITY of multipart type in the current buffer." - (let ((subtype (cadr (split-string (car (rmail-mime-entity-type entity)) - "/"))) - (disposition (rmail-mime-entity-disposition entity)) - (header (rmail-mime-entity-header entity)) - (children (rmail-mime-entity-children entity))) - (if header - (let ((pos (point))) - (or (bolp) - (insert "\n")) - (insert-buffer-substring rmail-buffer (car header) (cdr header)) - (rfc2047-decode-region pos (point)) - (insert "\n"))) - (cond - ((string= subtype "mixed") - (dolist (child children) - (rmail-mime-insert child '("text/plain") disposition))) - ((string= subtype "digest") - (dolist (child children) - (rmail-mime-insert child '("message/rfc822") disposition))) - ((string= subtype "alternative") - (let (best-plain-text best-text) - (dolist (child children) - (if (string= (or (car (rmail-mime-entity-disposition child)) - (car disposition)) - "inline") - (if (string-match "text/plain" - (car (rmail-mime-entity-type child))) - (setq best-plain-text child) - (if (string-match "text/.*" - (car (rmail-mime-entity-type child))) - (setq best-text child))))) - (if (or best-plain-text best-text) - (rmail-mime-insert (or best-plain-text best-text)) - ;; No child could be handled. Insert all. - (dolist (child children) - (rmail-mime-insert child nil disposition))))) - (t - ;; Unsupported subtype. Insert all of them. - (dolist (child children) - (rmail-mime-insert child)))))) - (defun rmail-mime-parse () "Parse the current Rmail message as a MIME message. -The value is a MIME-entiy object (see `rmail-mime-enty-new')." - (save-excursion - (goto-char (point-min)) - (rmail-mime-process nil t))) - -(defun rmail-mime-insert (entity &optional content-type disposition) +The value is a MIME-entiy object (see `rmail-mime-entity'). +If an error occurs, return an error message string." + (let ((rmail-mime-mbox-buffer (if (rmail-buffers-swapped-p) + rmail-view-buffer + (current-buffer)))) + (condition-case err + (with-current-buffer rmail-mime-mbox-buffer + (save-excursion + (goto-char (point-min)) + (let* ((entity (rmail-mime-process t "" + '("text/plain") '("inline"))) + (new (aref (rmail-mime-entity-display entity) 1))) + ;; Show header. + (aset new 0 (aset (rmail-mime-entity-header entity) 2 t)) + ;; Show tagline if and only if body is not shown. + (if (aref new 2) + (aset new 1 (aset (rmail-mime-entity-tagline entity) 2 nil)) + (aset new 1 (aset (rmail-mime-entity-tagline entity) 2 t))) + entity))) + (error (format "%s" err))))) + +(defun rmail-mime-insert (entity) "Insert a MIME-entity ENTITY in the current buffer. This function will be called recursively if multiple parts are available." - (if (rmail-mime-entity-children entity) - (rmail-mime-insert-multipart entity) - (setq content-type - (or (rmail-mime-entity-type entity) content-type)) - (setq disposition - (or (rmail-mime-entity-disposition entity) disposition)) - (if (and (string= (car disposition) "inline") - (string-match "text/.*" (car content-type))) - (rmail-mime-insert-text entity) - (rmail-mime-insert-bulk entity)))) + (let ((current (aref (rmail-mime-entity-display entity) 0)) + (new (aref (rmail-mime-entity-display entity) 1))) + (if (not (eq (aref new 0) 'raw)) + ;; Not a raw-mode. Each handler should handle it. + (funcall (rmail-mime-entity-handler entity) entity) + (let ((header (rmail-mime-entity-header entity)) + (tagline (rmail-mime-entity-tagline entity)) + (body (rmail-mime-entity-body entity)) + (beg (point)) + (segment (rmail-mime-entity-segment (point) entity))) + ;; header + (if (eq (aref current 0) (aref new 0)) + (goto-char (aref segment 2)) + (if (aref current 0) + (delete-char (- (aref segment 2) (aref segment 1)))) + (insert-buffer-substring rmail-mime-mbox-buffer + (aref header 0) (aref header 1))) + ;; tagline + (if (aref current 1) + (delete-char (- (aref segment 3) (aref segment 2)))) + ;; body + (let ((children (rmail-mime-entity-children entity))) + (if children + (progn + (put-text-property beg (point) 'rmail-mime-entity entity) + (dolist (child children) + (rmail-mime-insert child))) + (if (eq (aref current 2) (aref new 2)) + (forward-char (- (aref segment 4) (aref segment 3))) + (if (aref current 2) + (delete-char (- (aref segment 4) (aref segment 3)))) + (insert-buffer-substring rmail-mime-mbox-buffer + (aref body 0) (aref body 1)) + (or (bolp) (insert "\n"))) + (put-text-property beg (point) 'rmail-mime-entity entity))))) + (dotimes (i 3) + (aset current i (aref new i))))) (define-derived-mode rmail-mime-mode fundamental-mode "RMIME" "Major mode used in `rmail-mime' buffers." (setq font-lock-defaults '(rmail-font-lock-keywords t t nil nil))) ;;;###autoload -(defun rmail-mime () - "Process the current Rmail message as a MIME message. -This creates a temporary \"*RMAIL*\" buffer holding a decoded -copy of the message. Inline content-types are handled according to +(defun rmail-mime (&optional arg) + "Toggle displaying of a MIME message. + +The actualy behavior depends on the value of `rmail-enable-mime'. + +If `rmail-enable-mime' is t (default), this command change the +displaying of a MIME message between decoded presentation form +and raw data. + +With ARG, toggle the displaying of the current MIME entity only. + +If `rmail-enable-mime' is nil, this creates a temporary +\"*RMAIL*\" buffer holding a decoded copy of the message. Inline +content-types are handled according to `rmail-mime-media-type-handlers-alist'. By default, this displays text and multipart messages, and offers to download attachments as specfied by `rmail-mime-attachment-dirs-alist'." - (interactive) - (let ((data (rmail-apply-in-message rmail-current-message 'buffer-string)) - (buf (get-buffer-create "*RMAIL*"))) - (set-buffer buf) - (setq buffer-undo-list t) - (let ((inhibit-read-only t)) - ;; Decoding the message in fundamental mode for speed, only - ;; switching to rmail-mime-mode at the end for display. Eg - ;; quoted-printable-decode-region gets very slow otherwise (Bug#4993). - (fundamental-mode) - (erase-buffer) - (insert data) - (rmail-mime-show t) - (rmail-mime-mode) - (set-buffer-modified-p nil)) - (view-buffer buf))) + (interactive "P") + (if rmail-enable-mime + (with-current-buffer rmail-buffer + (if (rmail-mime-message-p) + (let ((rmail-mime-mbox-buffer rmail-view-buffer) + (rmail-mime-view-buffer rmail-buffer) + (entity (get-text-property (point) 'rmail-mime-entity))) + (if arg + (if entity + (rmail-mime-toggle-raw entity)) + (goto-char (point-min)) + (rmail-mime-toggle-raw + (get-text-property (point) 'rmail-mime-entity)))) + (message "Not a MIME message"))) + (let* ((data (rmail-apply-in-message rmail-current-message 'buffer-string)) + (buf (get-buffer-create "*RMAIL*")) + (rmail-mime-mbox-buffer rmail-view-buffer) + (rmail-mime-view-buffer buf)) + (set-buffer buf) + (setq buffer-undo-list t) + (let ((inhibit-read-only t)) + ;; Decoding the message in fundamental mode for speed, only + ;; switching to rmail-mime-mode at the end for display. Eg + ;; quoted-printable-decode-region gets very slow otherwise (Bug#4993). + (fundamental-mode) + (erase-buffer) + (insert data) + (rmail-mime-show t) + (rmail-mime-mode) + (set-buffer-modified-p nil)) + (view-buffer buf)))) (defun rmail-mm-get-boundary-error-message (message type disposition encoding) "Return MESSAGE with more information on the main mime components." @@ -744,39 +1281,59 @@ attachments as specfied by `rmail-mime-attachment-dirs-alist'." message type disposition encoding)) (defun rmail-show-mime () - (let ((mbox-buf rmail-buffer)) - (condition-case nil - (let ((entity (rmail-mime-parse))) - (with-current-buffer rmail-view-buffer - (let ((inhibit-read-only t) - (rmail-buffer mbox-buf)) - (erase-buffer) - (rmail-mime-insert entity)))) - (error - ;; Decoding failed. Insert the original message body as is. - (let ((region (with-current-buffer mbox-buf - (goto-char (point-min)) - (re-search-forward "^$" nil t) - (forward-line 1) - (cons (point) (point-max))))) - (with-current-buffer rmail-view-buffer - (let ((inhibit-read-only t)) - (erase-buffer) - (insert-buffer-substring mbox-buf (car region) (cdr region)))) - (message "MIME decoding failed")))))) + "Function to set in `rmail-show-mime-function' (which see)." + (let ((entity (rmail-mime-parse)) + (rmail-mime-mbox-buffer rmail-buffer) + (rmail-mime-view-buffer rmail-view-buffer) + (rmail-mime-coding-system nil)) + (if (vectorp entity) + (with-current-buffer rmail-mime-view-buffer + (erase-buffer) + (rmail-mime-insert entity) + (if (consp rmail-mime-coding-system) + ;; Decoding is done by rfc2047-decode-region only for a + ;; header. But, as the used coding system may have been + ;; overriden by mm-charset-override-alist, we can't + ;; trust (car rmail-mime-coding-system). So, here we + ;; try the decoding again with mm-charset-override-alist + ;; bound to nil. + (let ((mm-charset-override-alist nil)) + (setq rmail-mime-coding-system + (rmail-mime-find-header-encoding + (rmail-mime-entity-header entity))))) + (set-buffer-file-coding-system + (coding-system-base rmail-mime-coding-system) t t)) + ;; Decoding failed. ENTITY is an error message. Insert the + ;; original message body as is, and show warning. + (let ((region (with-current-buffer rmail-mime-mbox-buffer + (goto-char (point-min)) + (re-search-forward "^$" nil t) + (forward-line 1) + (vector (point-min) (point) (point-max))))) + (with-current-buffer rmail-mime-view-buffer + (let ((inhibit-read-only t)) + (erase-buffer) + (rmail-mime-insert-header region) + (insert-buffer-substring rmail-mime-mbox-buffer + (aref region 1) (aref region 2)))) + (set-buffer-file-coding-system 'no-conversion t t) + (message "MIME decoding failed: %s" entity))))) (setq rmail-show-mime-function 'rmail-show-mime) (defun rmail-insert-mime-forwarded-message (forward-buffer) - (let ((mbox-buf (with-current-buffer forward-buffer rmail-view-buffer))) + "Function to set in `rmail-insert-mime-forwarded-message-function' (which see)." + (let ((rmail-mime-mbox-buffer + (with-current-buffer forward-buffer rmail-view-buffer))) (save-restriction (narrow-to-region (point) (point)) - (message-forward-make-body-mime mbox-buf)))) + (message-forward-make-body-mime rmail-mime-mbox-buffer)))) (setq rmail-insert-mime-forwarded-message-function 'rmail-insert-mime-forwarded-message) (defun rmail-insert-mime-resent-message (forward-buffer) + "Function to set in `rmail-insert-mime-resent-message-function' (which see)." (insert-buffer-substring (with-current-buffer forward-buffer rmail-view-buffer)) (goto-char (point-min)) @@ -787,11 +1344,45 @@ attachments as specfied by `rmail-mime-attachment-dirs-alist'." (setq rmail-insert-mime-resent-message-function 'rmail-insert-mime-resent-message) +(defun rmail-search-mime-message (msg regexp) + "Function to set in `rmail-search-mime-message-function' (which see)." + (save-restriction + (narrow-to-region (rmail-msgbeg msg) (rmail-msgend msg)) + (let* ((rmail-mime-mbox-buffer (current-buffer)) + (rmail-mime-view-buffer rmail-view-buffer) + (header-end (save-excursion + (re-search-forward "^$" nil 'move) (point))) + (body-end (point-max)) + (entity (rmail-mime-parse))) + (or + ;; At first, just search the headers. + (with-temp-buffer + (insert-buffer-substring rmail-mime-mbox-buffer nil header-end) + (rfc2047-decode-region (point-min) (point)) + (goto-char (point-min)) + (re-search-forward regexp nil t)) + ;; Next, search the body. + (if (and entity + (let* ((content-type (rmail-mime-entity-type entity)) + (charset (cdr (assq 'charset (cdr content-type))))) + (or (not (string-match "text/.*" (car content-type))) + (and charset + (not (string= (downcase charset) "us-ascii")))))) + ;; Search the decoded MIME message. + (with-temp-buffer + (rmail-mime-insert entity) + (goto-char (point-min)) + (re-search-forward regexp nil t)) + ;; Search the body without decoding. + (goto-char header-end) + (re-search-forward regexp nil t)))))) + +(setq rmail-search-mime-message-function 'rmail-search-mime-message) + (provide 'rmailmm) ;; Local Variables: ;; generated-autoload-file: "rmail.el" ;; End: -;; arch-tag: 3f2c5e5d-1aef-4512-bc20-fd737c9d5dd9 ;;; rmailmm.el ends here diff --git a/lisp/mail/rmailmsc.el b/lisp/mail/rmailmsc.el index bbb8233d89c..4519ab1505f 100644 --- a/lisp/mail/rmailmsc.el +++ b/lisp/mail/rmailmsc.el @@ -1,7 +1,6 @@ ;;; rmailmsc.el --- miscellaneous support functions for the RMAIL mail reader -;; Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: mail @@ -59,5 +58,4 @@ This applies only to the current session." ;; generated-autoload-file: "rmail.el" ;; End: -;; arch-tag: 94614a62-2a0a-4e25-bac9-06f461ed4c60 ;;; rmailmsc.el ends here diff --git a/lisp/mail/rmailout.el b/lisp/mail/rmailout.el index 93d512336dc..3926b426a67 100644 --- a/lisp/mail/rmailout.el +++ b/lisp/mail/rmailout.el @@ -1,7 +1,7 @@ ;;; rmailout.el --- "RMAIL" mail reader for Emacs: output message to a file -;; Copyright (C) 1985, 1987, 1993, 1994, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1987, 1993-1994, 2001-2011 +;; Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: mail @@ -603,5 +603,4 @@ than appending to it. Deletes the message after writing if (if rmail-delete-after-output (rmail-delete-forward))) -;; arch-tag: 4059abf0-f249-4be4-8e0d-602d370d01d1 ;;; rmailout.el ends here diff --git a/lisp/mail/rmailsort.el b/lisp/mail/rmailsort.el index f4fd52c10c7..c9942f9c2f9 100644 --- a/lisp/mail/rmailsort.el +++ b/lisp/mail/rmailsort.el @@ -1,7 +1,6 @@ ;;; rmailsort.el --- Rmail: sort messages -;; Copyright (C) 1990, 1993, 1994, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990, 1993-1994, 2001-2011 Free Software Foundation, Inc. ;; Author: Masanobu UMEDA <umerin@mse.kyutech.ac.jp> ;; Maintainer: FSF @@ -255,5 +254,4 @@ Numeric keys are sorted numerically, all others as strings." ;; generated-autoload-file: "rmail.el" ;; End: -;; arch-tag: 665da245-f6a7-4115-ad8c-ba19216988d5 ;;; rmailsort.el ends here diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index f1efb33e6cb..e0f40afc0d1 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el @@ -1,7 +1,6 @@ ;;; rmailsum.el --- make summary buffers for the mail reader -;; Copyright (C) 1985, 1993, 1994, 1995, 1996, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1993-1996, 2000-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: mail @@ -1847,5 +1846,4 @@ the summary is only showing a subset of messages." ;; generated-autoload-file: "rmail.el" ;; End: -;; arch-tag: 80b0a27a-a50d-4f37-9466-83d32d1e0ca8 ;;; rmailsum.el ends here diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 7a9ab601bcc..77ae87b5449 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -1,7 +1,6 @@ ;;; sendmail.el --- mail sending commands for Emacs. -*- byte-compile-dynamic: t -*- -;; Copyright (C) 1985, 1986, 1992, 1993, 1994, 1995, 1996, 1998, 2000, -;; 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 1985-1986, 1992-1996, 1998, 2000-2011 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -28,11 +27,7 @@ ;; documented in the Emacs user's manual. ;;; Code: -(eval-when-compile - ;; Necessary to avoid recursive `require's. - (provide 'sendmail) - (require 'rmail) - (require 'mailalias)) +(require 'mail-utils) (autoload 'rfc2047-encode-string "rfc2047") @@ -203,13 +198,14 @@ when you first send mail." :type '(choice (const nil) string) :group 'sendmail) -;;;###autoload (defcustom mail-alias-file nil - "If non-nil, the name of a file to use instead of `/usr/lib/aliases'. + "If non-nil, the name of a file to use instead of the sendmail default. This file defines aliases to be expanded by the mailer; this is a different feature from that of defining aliases in `.mailrc' to be expanded in Emacs. -This variable has no effect unless your system uses sendmail as its mailer." - :type '(choice (const nil) file) +This variable has no effect unless your system uses sendmail as its mailer. +The default file is defined in sendmail's configuration file, e.g. +`/etc/aliases'." + :type '(choice (const :tag "Sendmail default" nil) file) :group 'sendmail) ;;;###autoload @@ -384,7 +380,7 @@ The default value matches citations like `foo-bar>' plus whitespace." (autoload 'build-mail-aliases "mailalias" "Read mail aliases from personal aliases file and set `mail-aliases'. -By default, this is the file specified by `mail-personal-alias-file'.") +By default, this is the file specified by `mail-personal-alias-file'." t) ;;;###autoload (defcustom mail-signature t @@ -422,8 +418,7 @@ in `message-auto-save-directory'." (defvar mail-reply-action nil) (defvar mail-send-actions nil "A list of actions to be performed upon successful sending of a message.") -(put 'mail-reply-action 'permanent-local t) -(put 'mail-send-actions 'permanent-local t) +(defvar mail-return-action nil) ;;;###autoload (defcustom mail-default-headers nil @@ -433,8 +428,6 @@ before you edit the message, so you can edit or delete the lines." :type '(choice (const nil) string) :group 'sendmail) -;; FIXME no need for autoload -;;;###autoload (defcustom mail-bury-selects-summary t "If non-nil, try to show Rmail summary buffer after returning from mail. The functions \\[mail-send-on-exit] or \\[mail-dont-send] select @@ -443,8 +436,6 @@ is non-nil." :type 'boolean :group 'sendmail) -;; FIXME no need for autoload -;;;###autoload (defcustom mail-send-nonascii 'mime "Specify whether to allow sending non-ASCII characters in mail. If t, that means do allow it. nil means don't allow it. @@ -468,23 +459,16 @@ support Delivery Status Notification." ;; Note: could use /usr/ucb/mail instead of sendmail; ;; options -t, and -v if not interactive. -(defvar mail-mailer-swallows-blank-line - (if (and (string-match "sparc-sun-sunos\\(\\'\\|[^5]\\)" system-configuration) - (file-readable-p "/etc/sendmail.cf") - (with-temp-buffer - (insert-file-contents "/etc/sendmail.cf") - (goto-char (point-min)) - (let ((case-fold-search nil)) - (re-search-forward "^OR\\>" nil t)))) - ;; According to RFC822, "The field-name must be composed of printable - ;; ASCII characters (i.e. characters that have decimal values between - ;; 33 and 126, except colon)", i.e. any chars except ctl chars, - ;; space, or colon. - '(looking-at "[ \t]\\|[][!\"#$%&'()*+,-./0-9;<=>?@A-Z\\\\^_`a-z{|}~]+:")) +(defvar mail-mailer-swallows-blank-line nil "Set this non-nil if the system's mailer runs the header and body together. -\(This problem exists on Sunos 4 when sendmail is run in remote mode.) -The value should be an expression to test whether the problem will -actually occur.") +The actual value should be an expression to evaluate that returns +non-nil if the problem will actually occur. +\(As far as we know, this is not an issue on any system still supported +by Emacs.)") + +(put 'mail-mailer-swallows-blank-line 'risky-local-variable t) ; gets evalled +(make-obsolete-variable 'mail-mailer-swallows-blank-line + "no need to set this on any modern system." "24.1") (defvar mail-mode-syntax-table ;; define-derived-mode will make it inherit from text-mode-syntax-table. @@ -535,16 +519,54 @@ actually occur.") (setq mail-alias-modtime modtime mail-aliases t))))) -(defun mail-setup (to subject in-reply-to cc replybuffer actions) + +;;;###autoload +(define-mail-user-agent 'sendmail-user-agent + 'sendmail-user-agent-compose + 'mail-send-and-exit) + +;;;###autoload +(defun sendmail-user-agent-compose (&optional to subject other-headers + continue switch-function yank-action + send-actions return-action + &rest ignored) + (if switch-function + (let ((special-display-buffer-names nil) + (special-display-regexps nil) + (same-window-buffer-names nil) + (same-window-regexps nil)) + (funcall switch-function "*mail*"))) + (let ((cc (cdr (assoc-string "cc" other-headers t))) + (in-reply-to (cdr (assoc-string "in-reply-to" other-headers t))) + (body (cdr (assoc-string "body" other-headers t)))) + (or (mail continue to subject in-reply-to cc yank-action + send-actions return-action) + continue + (error "Message aborted")) + (save-excursion + (rfc822-goto-eoh) + (while other-headers + (unless (member-ignore-case (car (car other-headers)) + '("in-reply-to" "cc" "body")) + (insert (car (car other-headers)) ": " + (cdr (car other-headers)) + (if use-hard-newlines hard-newline "\n"))) + (setq other-headers (cdr other-headers))) + (when body + (forward-line 1) + (insert body)) + t))) + +(defun mail-setup (to subject in-reply-to cc replybuffer + actions return-action) (or mail-default-reply-to (setq mail-default-reply-to (getenv "REPLYTO"))) (sendmail-sync-aliases) - (if (eq mail-aliases t) - (progn - (setq mail-aliases nil) - (when mail-personal-alias-file - (if (file-exists-p mail-personal-alias-file) - (build-mail-aliases))))) + (when (eq mail-aliases t) + (setq mail-aliases nil) + (and mail-personal-alias-file + (file-exists-p mail-personal-alias-file) + (build-mail-aliases))) ;; Don't leave this around from a previous message. (kill-local-variable 'buffer-file-coding-system) ;; This doesn't work for enable-multibyte-characters. @@ -552,8 +574,12 @@ actually occur.") (set-buffer-multibyte (default-value 'enable-multibyte-characters)) (if current-input-method (inactivate-input-method)) + + ;; Local variables for Mail mode. (setq mail-send-actions actions) (setq mail-reply-action replybuffer) + (setq mail-return-action return-action) + (goto-char (point-min)) (if mail-setup-with-from (mail-insert-from-field)) @@ -644,6 +670,7 @@ Turning on Mail mode runs the normal hooks `text-mode-hook' and `mail-mode-hook' (in that order)." (make-local-variable 'mail-reply-action) (make-local-variable 'mail-send-actions) + (make-local-variable 'mail-return-action) (setq buffer-offer-save t) (make-local-variable 'font-lock-defaults) (setq font-lock-defaults '(mail-font-lock-keywords t t)) @@ -777,39 +804,9 @@ Prefix arg means don't delete this window." "Bury this mail buffer." (let ((newbuf (other-buffer (current-buffer)))) (bury-buffer (current-buffer)) - (if (and (or nil - ;; In this case, we need to go to a different frame. - (window-dedicated-p (frame-selected-window)) - ;; In this mode of operation, the frame was probably - ;; made for this buffer, so the user probably wants - ;; to delete it now. - (and pop-up-frames (one-window-p)) - (cdr (assq 'mail-dedicated-frame (frame-parameters)))) - (not (null (delq (selected-frame) (visible-frame-list))))) - (progn - (if (display-multi-frame-p) - (delete-frame (selected-frame)) - ;; The previous frame is where normally they have the - ;; Rmail buffer displayed. - (other-frame -1))) - (let (rmail-flag summary-buffer) - (and (not arg) - (not (one-window-p)) - (with-current-buffer - (window-buffer (next-window (selected-window) 'not)) - (setq rmail-flag (eq major-mode 'rmail-mode)) - (setq summary-buffer - (and mail-bury-selects-summary - (boundp 'rmail-summary-buffer) - rmail-summary-buffer - (buffer-name rmail-summary-buffer) - (not (get-buffer-window rmail-summary-buffer)) - rmail-summary-buffer)))) - (if rmail-flag - ;; If the Rmail buffer has a summary, show that. - (if summary-buffer (switch-to-buffer summary-buffer) - (delete-window)) - (switch-to-buffer newbuf)))))) + (if (and (null arg) mail-return-action) + (apply (car mail-return-action) (cdr mail-return-action)) + (switch-to-buffer newbuf)))) (defcustom mail-send-hook nil "Hook run just before sending a message." @@ -1658,7 +1655,8 @@ If the current line has `mail-yank-prefix', insert it on the new line." ;;;###autoload (add-hook 'same-window-buffer-names (purecopy "*unsent mail*")) ;;;###autoload -(defun mail (&optional noerase to subject in-reply-to cc replybuffer actions) +(defun mail (&optional noerase to subject in-reply-to cc replybuffer + actions return-action) "Edit a message to be sent. Prefix arg means resume editing (don't erase). When this function returns, the buffer `*mail*' is selected. The value is t if the message was newly initialized; otherwise, nil. @@ -1706,49 +1704,6 @@ The seventh argument ACTIONS is a list of actions to take when the message is sent, we apply FUNCTION to ARGS. This is how Rmail arranges to mark messages `answered'." (interactive "P") - ;; This is commented out because I found it was confusing in practice. - ;; It is easy enough to rename *mail* by hand with rename-buffer - ;; if you want to have multiple mail buffers. - ;; And then you can control which messages to save. --rms. - ;; (let ((index 1) - ;; buffer) - ;; ;; If requested, look for a mail buffer that is modified and go to it. - ;; (if noerase - ;; (progn - ;; (while (and (setq buffer - ;; (get-buffer (if (= 1 index) "*mail*" - ;; (format "*mail*<%d>" index)))) - ;; (not (buffer-modified-p buffer))) - ;; (setq index (1+ index))) - ;; (if buffer (switch-to-buffer buffer) - ;; ;; If none exists, start a new message. - ;; ;; This will never re-use an existing unmodified mail buffer - ;; ;; (since index is not 1 anymore). Perhaps it should. - ;; (setq noerase nil)))) - ;; ;; Unless we found a modified message and are happy, start a new message. - ;; (if (not noerase) - ;; (progn - ;; ;; Look for existing unmodified mail buffer. - ;; (while (and (setq buffer - ;; (get-buffer (if (= 1 index) "*mail*" - ;; (format "*mail*<%d>" index)))) - ;; (buffer-modified-p buffer)) - ;; (setq index (1+ index))) - ;; ;; If none, make a new one. - ;; (or buffer - ;; (setq buffer (generate-new-buffer "*mail*"))) - ;; ;; Go there and initialize it. - ;; (switch-to-buffer buffer) - ;; (erase-buffer) - ;; (setq default-directory (expand-file-name "~/")) - ;; (auto-save-mode auto-save-default) - ;; (mail-mode) - ;; (mail-setup to subject in-reply-to cc replybuffer actions) - ;; (if (and buffer-auto-save-file-name - ;; (file-exists-p buffer-auto-save-file-name)) - ;; (message "Auto save file for draft message exists; consider M-x mail-recover")) - ;; t)) - (if (eq noerase 'new) (pop-to-buffer (generate-new-buffer "*mail*")) (and noerase @@ -1787,7 +1742,8 @@ The seventh argument ACTIONS is a list of actions to take t)) (let ((inhibit-read-only t)) (erase-buffer) - (mail-setup to subject in-reply-to cc replybuffer actions) + (mail-setup to subject in-reply-to cc replybuffer actions + return-action) (setq initialized t))) (if (and buffer-auto-save-file-name (file-exists-p buffer-auto-save-file-name)) @@ -1817,6 +1773,9 @@ The seventh argument ACTIONS is a list of actions to take ;; names are normally ``trivial'', so Dired will set point after ;; all the files, at buffer bottom. We want it on the first ;; file instead. + ;; Require dired so that dired-trivial-filenames does not get + ;; unbound on exit from the let. + (require 'dired) (let ((dired-trivial-filenames t)) (dired-other-window wildcard (concat dired-listing-switches "t"))) (rename-buffer "*Auto-saved Drafts*" t) diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index 4e76de60188..f726304704b 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el @@ -1,7 +1,6 @@ ;;; smtpmail.el --- simple SMTP protocol (RFC 821) for sending mail -;; Copyright (C) 1995, 1996, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995-1996, 2001-2011 Free Software Foundation, Inc. ;; Author: Tomoji Kagatani <kagatani@rbc.ncl.omron.co.jp> ;; Maintainer: Simon Josefsson <simon@josefsson.org> @@ -392,7 +391,14 @@ The list is in preference order.") (make-directory smtpmail-queue-dir t)) (with-current-buffer buffer-data (erase-buffer) - (set-buffer-file-coding-system smtpmail-code-conv-from nil t) + (set-buffer-file-coding-system + ;; We will be reading the file with no-conversion in + ;; smtpmail-send-queued-mail below, so write it out + ;; with Unix EOLs. + (coding-system-change-eol-conversion + (or smtpmail-code-conv-from 'undecided) + 'unix) + nil t) (insert-buffer-substring tembuf) (write-file file-data) (set-buffer buffer-elisp) @@ -1007,5 +1013,4 @@ many continuation lines." (provide 'smtpmail) -;; arch-tag: a76992df-6d71-43b7-9e72-4bacc6c05466 ;;; smtpmail.el ends here diff --git a/lisp/mail/supercite.el b/lisp/mail/supercite.el index 1660721fe21..084b623080a 100644 --- a/lisp/mail/supercite.el +++ b/lisp/mail/supercite.el @@ -1,7 +1,6 @@ ;;; supercite.el --- minor mode for citing mail and news replies -;; Copyright (C) 1993, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1997, 2001-2011 Free Software Foundation, Inc. ;; Author: 1993 Barry A. Warsaw <bwarsaw@python.org> ;; Maintainer: Glenn Morris <rgm@gnu.org> @@ -1997,5 +1996,4 @@ version at point." (provide 'supercite) (run-hooks 'sc-load-hook) -;; arch-tag: a5d5bfa6-3bd5-4414-8c65-0afc83e45cd3 ;;; supercite.el ends here diff --git a/lisp/mail/uce.el b/lisp/mail/uce.el index 2a3ec8dee85..f1bd98af297 100644 --- a/lisp/mail/uce.el +++ b/lisp/mail/uce.el @@ -1,7 +1,6 @@ ;;; uce.el --- facilitate reply to unsolicited commercial email -;; Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996, 1998, 2000-2011 Free Software Foundation, Inc. ;; Author: stanislav shalunov <shalunov@mccme.ru> ;; Created: 10 Dec 1996 @@ -375,5 +374,4 @@ You might need to set `uce-mail-reader' before using this." (provide 'uce) -;; arch-tag: 44b68c87-9b29-47bd-822c-3feee3883221 ;;; uce.el ends here diff --git a/lisp/mail/undigest.el b/lisp/mail/undigest.el index 01daf1f050b..04bb320a2ab 100644 --- a/lisp/mail/undigest.el +++ b/lisp/mail/undigest.el @@ -1,7 +1,7 @@ ;;; undigest.el --- digest-cracking support for the RMAIL mail reader -;; Copyright (C) 1985, 1986, 1994, 1996, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985-1986, 1994, 1996, 2001-2011 +;; Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: mail @@ -329,5 +329,4 @@ following the containing message." ;; generated-autoload-file: "rmail.el" ;; End: -;; arch-tag: 3a28b9fb-c1f5-43ef-9278-285f3e4b874d ;;; undigest.el ends here diff --git a/lisp/mail/unrmail.el b/lisp/mail/unrmail.el index 4cb380784e7..9ed2e90b456 100644 --- a/lisp/mail/unrmail.el +++ b/lisp/mail/unrmail.el @@ -1,7 +1,6 @@ ;;; unrmail.el --- convert Rmail Babyl files to mailbox files -;; Copyright (C) 1992, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1992, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: mail @@ -245,5 +244,4 @@ For example, invoke `emacs -batch -f batch-unrmail RMAIL'." (provide 'unrmail) -;; arch-tag: 14c6290d-60b2-456f-8909-5c2387de6acb ;;; unrmail.el ends here diff --git a/lisp/mail/uudecode.el b/lisp/mail/uudecode.el index 7ab2fcd1c62..8652e67d3e1 100644 --- a/lisp/mail/uudecode.el +++ b/lisp/mail/uudecode.el @@ -1,7 +1,6 @@ ;;; uudecode.el -- elisp native uudecode -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu> ;; Keywords: uudecode news diff --git a/lisp/makefile.w32-in b/lisp/makefile.w32-in index cd76ffa290a..eb65bb7a60f 100644 --- a/lisp/makefile.w32-in +++ b/lisp/makefile.w32-in @@ -1,6 +1,5 @@ # -*- Makefile -*- for GNU Emacs on the Microsoft W32 API. -# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -# 2009, 2010 Free Software Foundation, Inc. +# Copyright (C) 2000-2011 Free Software Foundation, Inc. # This file is part of GNU Emacs. @@ -34,7 +33,7 @@ EMACS = $(THISDIR)/../bin/emacs.exe # Command line flags for Emacs. -EMACSOPT = -batch --no-init-file --no-site-file +EMACSOPT = -batch --no-site-file --no-site-lisp # Extra flags to pass to the byte compiler BYTE_COMPILE_EXTRA_FLAGS = diff --git a/lisp/makesum.el b/lisp/makesum.el index 4b5cd036f94..c392f190166 100644 --- a/lisp/makesum.el +++ b/lisp/makesum.el @@ -1,7 +1,6 @@ ;;; makesum.el --- generate key binding summary for Emacs -;; Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: help diff --git a/lisp/man.el b/lisp/man.el index b1c5f37bc70..0b3ac537c5b 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -1,7 +1,7 @@ ;;; man.el --- browse UNIX manual pages -*- coding: iso-8859-1 -*- -;; Copyright (C) 1993, 1994, 1996, 1997, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993-1994, 1996-1997, 2001-2011 +;; Free Software Foundation, Inc. ;; Author: Barry A. Warsaw <bwarsaw@cen.com> ;; Maintainer: FSF @@ -1154,7 +1154,9 @@ default type, `Man-xref-man-page' is used for the buttons." (goto-char (point-min)) nil))) (while (re-search-forward regexp end t) - (make-text-button + ;; An overlay button is preferable because the underlying text + ;; may have text property highlights (Bug#7881). + (make-button (match-beginning button-pos) (match-end button-pos) 'type type @@ -1721,5 +1723,4 @@ Uses `Man-name-local-regexp'." (provide 'man) -;; arch-tag: 587cda76-8e23-4594-b1f3-89b6b09a0d47 ;;; man.el ends here diff --git a/lisp/master.el b/lisp/master.el index 5c1bd2f68c1..1ea0a24ca94 100644 --- a/lisp/master.el +++ b/lisp/master.el @@ -1,7 +1,6 @@ ;;; master.el --- make a buffer the master over another buffer -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Alex Schroeder <alex@gnu.org> ;; Maintainer: Alex Schroeder <alex@gnu.org> @@ -159,5 +158,4 @@ See `recenter'." (provide 'master) -;; arch-tag: dca08daa-8127-45ae-b77e-b135160dce98 ;;; master.el ends here diff --git a/lisp/mb-depth.el b/lisp/mb-depth.el index 6ae8eff99b5..2ed692c1b84 100644 --- a/lisp/mb-depth.el +++ b/lisp/mb-depth.el @@ -1,6 +1,6 @@ ;;; mb-depth.el --- Indicate minibuffer-depth in prompt ;; -;; Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2006-2011 Free Software Foundation, Inc. ;; ;; Author: Miles Bader <miles@gnu.org> ;; Keywords: convenience @@ -72,5 +72,4 @@ Returns non-nil if the new state is enabled." (provide 'mb-depth) -;; arch-tag: 50224089-5bf5-46f8-803d-18f018c5eacf ;;; mb-depth.el ends here diff --git a/lisp/md4.el b/lisp/md4.el index 6b28f757dbd..8d89004de23 100644 --- a/lisp/md4.el +++ b/lisp/md4.el @@ -1,6 +1,6 @@ ;;; md4.el --- MD4 Message Digest Algorithm. -;; Copyright (C) 2001, 2004, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2001, 2004, 2007-2011 Free Software Foundation, Inc. ;; Author: Taro Kawagishi <tarok@transpulse.org> ;; Keywords: MD4 diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 4708c52e12e..42caeee447c 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -1,7 +1,6 @@ ;;; menu-bar.el --- define a default menu bar -;; Copyright (C) 1993, 1994, 1995, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993-1995, 2000-2011 Free Software Foundation, Inc. ;; Author: RMS ;; Maintainer: FSF @@ -479,8 +478,7 @@ (define-key menu-bar-edit-menu [clear] `(menu-item ,(purecopy "Clear") delete-region :enable (and mark-active - (not buffer-read-only) - (not (mouse-region-match))) + (not buffer-read-only)) :help ,(purecopy "Delete the text in region between mark and current position"))) (defvar yank-menu (cons (purecopy "Select Yank") nil)) @@ -510,7 +508,7 @@ ;; under X (for GNUstep). `(menu-item ,(purecopy "Copy") ,(if (featurep 'ns) 'ns-copy-including-secondary - 'menu-bar-kill-ring-save) + 'kill-ring-save) :enable mark-active :help ,(purecopy "Copy text in region between mark and current position") :keys ,(purecopy (if (featurep 'ns) @@ -523,7 +521,8 @@ ,(purecopy "Cut (kill) text in region between mark and current position"))) ;; ns-win.el said: Separate undo from cut/paste section. (if (featurep 'ns) - (define-key menu-bar-edit-menu [separator-undo] `(,(purecopy "--")))) + (define-key menu-bar-edit-menu [separator-undo] menu-bar-separator)) + (define-key menu-bar-edit-menu [undo] `(menu-item ,(purecopy "Undo") undo :enable (and (not buffer-read-only) @@ -533,11 +532,8 @@ (consp buffer-undo-list))) :help ,(purecopy "Undo last operation"))) -(defun menu-bar-kill-ring-save (beg end) - (interactive "r") - (if (mouse-region-match) - (message "Selecting a region with the mouse does `copy' automatically") - (kill-ring-save beg end))) +(define-obsolete-function-alias + 'menu-bar-kill-ring-save 'kill-ring-save "24.1") ;; These are alternative definitions for the cut, paste and copy ;; menu items. Use them if your system expects these to use the clipboard. @@ -587,18 +583,15 @@ Do the same for the keys of the same name." (defvar menu-bar-custom-menu (make-sparse-keymap "Customize")) -(define-key menu-bar-custom-menu [customize-apropos-groups] - `(menu-item ,(purecopy "Groups Matching Regexp...") customize-apropos-groups - :help ,(purecopy "Browse groups whose names match regexp"))) (define-key menu-bar-custom-menu [customize-apropos-faces] - `(menu-item ,(purecopy "Faces Matching Regexp...") customize-apropos-faces - :help ,(purecopy "Browse faces whose names match regexp"))) + `(menu-item ,(purecopy "Faces Matching...") customize-apropos-faces + :help ,(purecopy "Browse faces matching a regexp or word list"))) (define-key menu-bar-custom-menu [customize-apropos-options] - `(menu-item ,(purecopy "Options Matching Regexp...") customize-apropos-options - :help ,(purecopy "Browse options whose names match regexp"))) + `(menu-item ,(purecopy "Options Matching...") customize-apropos-options + :help ,(purecopy "Browse options matching a regexp or word list"))) (define-key menu-bar-custom-menu [customize-apropos] - `(menu-item ,(purecopy "Settings Matching Regexp...") customize-apropos - :help ,(purecopy "Browse customizable settings whose names match regexp"))) + `(menu-item ,(purecopy "All Settings Matching...") customize-apropos + :help ,(purecopy "Browse customizable settings matching a regexp or word list"))) (define-key menu-bar-custom-menu [separator-1] menu-bar-separator) (define-key menu-bar-custom-menu [customize-group] @@ -626,6 +619,9 @@ Do the same for the keys of the same name." (define-key menu-bar-custom-menu [customize] `(menu-item ,(purecopy "Top-level Customization Group") customize :help ,(purecopy "The master group called `Emacs'"))) +(define-key menu-bar-custom-menu [customize-themes] + `(menu-item ,(purecopy "Custom Themes") customize-themes + :help ,(purecopy "Choose a pre-defined customization theme"))) ;(defvar menu-bar-preferences-menu (make-sparse-keymap "Preferences")) @@ -1147,7 +1143,7 @@ mail status in mode line")) ;; It is better not to use backquote here, ;; because that makes a bootstrapping problem ;; if you need to recompile all the Lisp files using interpreted code. - `(menu-item ,(purecopy "Mule (Multilingual Environment)") ,mule-menu-keymap + `(menu-item ,(purecopy "Multilingual Environment") ,mule-menu-keymap ;; Most of the MULE menu actually does make sense in unibyte mode, ;; e.g. language selection. ;;; :visible '(default-value 'enable-multibyte-characters) diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index 336fd0100c1..f3d1682127e 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog @@ -1,3 +1,7 @@ +2011-01-13 Chong Yidong <cyd@stupidchicken.com> + + * mh-comp.el (mh-user-agent-compose): New arg RETURN-ACTION. + 2010-11-07 Glenn Morris <rgm@gnu.org> * mh-seq.el (mh-read-msg-list): Use point-at-eol. @@ -3270,7 +3274,7 @@ * ChangeLog.1: New file. Contains old ChangeLog. - Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2005-2011 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -3293,4 +3297,3 @@ ;; add-log-time-zone-rule: t ;; End: -;;; arch-tag: 87324964-69b6-4925-a3c2-9c1df53d7d51 diff --git a/lisp/mh-e/ChangeLog.1 b/lisp/mh-e/ChangeLog.1 index 7492f9600b3..2abfea9ac6b 100644 --- a/lisp/mh-e/ChangeLog.1 +++ b/lisp/mh-e/ChangeLog.1 @@ -11400,8 +11400,7 @@ (dist): Leave release in current directory. - Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 - Free Software Foundation, Inc. + Copyright (C) 2003-2011 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -11417,4 +11416,3 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. - diff --git a/lisp/mh-e/mh-acros.el b/lisp/mh-e/mh-acros.el index e90f5e7b6ae..c1964d5a4ea 100644 --- a/lisp/mh-e/mh-acros.el +++ b/lisp/mh-e/mh-acros.el @@ -1,7 +1,6 @@ ;;; mh-acros.el --- macros used in MH-E -;; Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004, 2006-2011 Free Software Foundation, Inc. ;; Author: Satyaki Das <satyaki@theforce.stanford.edu> ;; Maintainer: Bill Wohler <wohler@newt.com> @@ -327,5 +326,4 @@ MH-E functions." ;; sentence-end-double-space: nil ;; End: -;; arch-tag: b383b49a-494f-4ed0-a30a-cb6d5d2da4ff ;;; mh-acros.el ends here diff --git a/lisp/mh-e/mh-alias.el b/lisp/mh-e/mh-alias.el index 2856c630fd0..061a5b3dc94 100644 --- a/lisp/mh-e/mh-alias.el +++ b/lisp/mh-e/mh-alias.el @@ -1,8 +1,6 @@ ;;; mh-alias.el --- MH-E mail alias completion and expansion -;; Copyright (C) 1994, 1995, 1996, 1997, -;; 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1994-1997, 2001-2011 Free Software Foundation, Inc. ;; Author: Peter S. Galbraith <psg@debian.org> ;; Maintainer: Bill Wohler <wohler@newt.com> @@ -670,5 +668,4 @@ show buffer, the message in the show buffer doesn't match." ;; sentence-end-double-space: nil ;; End: -;; arch-tag: 49879e46-5aa3-4569-bece-e5a58731d690 ;;; mh-alias.el ends here diff --git a/lisp/mh-e/mh-buffers.el b/lisp/mh-e/mh-buffers.el index 17c3b5dd235..48154cbf4e0 100644 --- a/lisp/mh-e/mh-buffers.el +++ b/lisp/mh-e/mh-buffers.el @@ -1,8 +1,6 @@ ;;; mh-buffers.el --- MH-E buffer constants and utilities -;; Copyright (C) 1993, 1995, 1997, -;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1993, 1995, 1997, 2000-2011 Free Software Foundation, Inc. ;; Author: Bill Wohler <wohler@newt.com> ;; Maintainer: Bill Wohler <wohler@newt.com> @@ -83,5 +81,4 @@ The function returns the size of the final size of the log buffer." ;; sentence-end-double-space: nil ;; End: -;; arch-tag: 812e9f29-78b8-4e73-ada9-aa61dc1ceecb ;;; mh-buffers.el ends here diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el index 762aad86080..169679e88ae 100644 --- a/lisp/mh-e/mh-comp.el +++ b/lisp/mh-e/mh-comp.el @@ -1,8 +1,6 @@ ;;; mh-comp.el --- MH-E functions for composing and sending messages -;; Copyright (C) 1993, 1995, 1997, -;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1993, 1995, 1997, 2000-2011 Free Software Foundation, Inc. ;; Author: Bill Wohler <wohler@newt.com> ;; Maintainer: Bill Wohler <wohler@newt.com> @@ -199,7 +197,8 @@ applications should use `mh-user-agent-compose'." ;;;###autoload (defun mh-user-agent-compose (&optional to subject other-headers continue switch-function yank-action - send-actions) + send-actions return-action + &rest ignored) "Set up mail composition draft with the MH mail system. This is the `mail-user-agent' entry point to MH-E. This function conforms to the contract specified by `define-mail-user-agent' @@ -213,8 +212,8 @@ OTHER-HEADERS is an alist specifying additional header fields. Elements look like (HEADER . VALUE) where both HEADER and VALUE are strings. -CONTINUE, SWITCH-FUNCTION, YANK-ACTION and SEND-ACTIONS are -ignored." +CONTINUE, SWITCH-FUNCTION, YANK-ACTION, SEND-ACTIONS, and +RETURN-ACTION are ignored." (mh-find-path) (let ((mh-error-if-no-draft t)) (mh-send to "" subject) @@ -1112,5 +1111,4 @@ doesn't exist there." ;; sentence-end-double-space: nil ;; End: -;; arch-tag: 62865511-e610-4923-b0b5-f45a8ab70a34 ;;; mh-comp.el ends here diff --git a/lisp/mh-e/mh-compat.el b/lisp/mh-e/mh-compat.el index 3d2922ac0dc..01a0f26b9e8 100644 --- a/lisp/mh-e/mh-compat.el +++ b/lisp/mh-e/mh-compat.el @@ -1,7 +1,6 @@ ;;; mh-compat.el --- make MH-E compatibile with various versions of Emacs -;; Copyright (C) 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2006-2011 Free Software Foundation, Inc. ;; Author: Bill Wohler <wohler@newt.com> ;; Maintainer: Bill Wohler <wohler@newt.com> @@ -315,5 +314,4 @@ XEmacs." ;; sentence-end-double-space: nil ;; End: -;; arch-tag: 577b0eab-a5cd-45e1-8d9f-c1a426f4d73c ;;; mh-compat.el ends here diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el index 9a2bccbc967..e9896eb4b8c 100644 --- a/lisp/mh-e/mh-e.el +++ b/lisp/mh-e/mh-e.el @@ -1,8 +1,6 @@ ;;; mh-e.el --- GNU Emacs interface to the MH mail system -;; Copyright (C) 1985, 1986, 1987, 1988, -;; 1990, 1992, 1993, 1994, 1995, 1997, 1999, -;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 1985-1988, 1990, 1992-1995, 1997, 1999-2011 ;; Free Software Foundation, Inc. ;; Author: Bill Wohler <wohler@newt.com> @@ -3727,5 +3725,4 @@ The background and foreground are used in the image." ;; sentence-end-double-space: nil ;; End: -;; arch-tag: cce884de-bd37-4104-9963-e4439d5ed22b ;;; mh-e.el ends here diff --git a/lisp/mh-e/mh-folder.el b/lisp/mh-e/mh-folder.el index 583b3719dd1..aab40c7be13 100644 --- a/lisp/mh-e/mh-folder.el +++ b/lisp/mh-e/mh-folder.el @@ -1,7 +1,6 @@ ;;; mh-folder.el --- MH-Folder mode -;; Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2002-2003, 2005-2011 Free Software Foundation, Inc. ;; Author: Bill Wohler <wohler@newt.com> ;; Maintainer: Bill Wohler <wohler@newt.com> @@ -1974,5 +1973,4 @@ If MSG is nil then act on the message at point" ;; sentence-end-double-space: nil ;; End: -;; arch-tag: aa97b758-d4f6-4c86-bc5a-1950921da1e7 ;;; mh-folder.el ends here diff --git a/lisp/mh-e/mh-funcs.el b/lisp/mh-e/mh-funcs.el index 3fb06fa13b8..ad508416501 100644 --- a/lisp/mh-e/mh-funcs.el +++ b/lisp/mh-e/mh-funcs.el @@ -1,8 +1,6 @@ ;;; mh-funcs.el --- MH-E functions not everyone will use right away -;; Copyright (C) 1993, 1995, -;; 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1993, 1995, 2001-2011 Free Software Foundation, Inc. ;; Author: Bill Wohler <wohler@newt.com> ;; Maintainer: Bill Wohler <wohler@newt.com> @@ -372,5 +370,4 @@ See `mh-store-msg' for a description of DIRECTORY." ;; sentence-end-double-space: nil ;; End: -;; arch-tag: 1936c4f1-4843-438e-bc4b-a63bb75a7762 ;;; mh-funcs.el ends here diff --git a/lisp/mh-e/mh-gnus.el b/lisp/mh-e/mh-gnus.el index 3c128218534..f644282fc82 100644 --- a/lisp/mh-e/mh-gnus.el +++ b/lisp/mh-e/mh-gnus.el @@ -1,7 +1,6 @@ ;;; mh-gnus.el --- make MH-E compatible with various versions of Gnus -;; Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2003-2004, 2006-2011 Free Software Foundation, Inc. ;; Author: Satyaki Das <satyaki@theforce.stanford.edu> ;; Maintainer: Bill Wohler <wohler@newt.com> @@ -177,5 +176,4 @@ PROMPT overrides the default one used to ask user for a file name." ;; sentence-end-double-space: nil ;; End: -;; arch-tag: 1e3638af-cad3-4c69-8427-bc8eb6e5e4fa ;;; mh-gnus.el ends here diff --git a/lisp/mh-e/mh-identity.el b/lisp/mh-e/mh-identity.el index cde83b49889..7e8b8576ff1 100644 --- a/lisp/mh-e/mh-identity.el +++ b/lisp/mh-e/mh-identity.el @@ -1,7 +1,6 @@ ;;; mh-identity.el --- multiple identify support for MH-E -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Author: Peter S. Galbraith <psg@debian.org> ;; Maintainer: Bill Wohler <wohler@newt.com> @@ -304,5 +303,4 @@ the header." ;; sentence-end-double-space: nil ;; End: -;; arch-tag: 07d66ef6-8726-4ac6-9ecf-e566cd5bfb45 ;;; mh-identity.el ends here diff --git a/lisp/mh-e/mh-inc.el b/lisp/mh-e/mh-inc.el index 56c260564c0..4f83ed70508 100644 --- a/lisp/mh-e/mh-inc.el +++ b/lisp/mh-e/mh-inc.el @@ -1,7 +1,6 @@ ;;; mh-inc.el --- MH-E "inc" and separate mail spool handling -;; Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2003-2004, 2006-2011 Free Software Foundation, Inc. ;; Author: Peter S. Galbraith <psg@debian.org> ;; Maintainer: Bill Wohler <wohler@newt.com> @@ -90,5 +89,4 @@ ;; sentence-end-double-space: nil ;; End: -;; arch-tag: 3713cf2a-6082-4cb4-8ce2-99d9acaba835 ;;; mh-inc.el ends here diff --git a/lisp/mh-e/mh-junk.el b/lisp/mh-e/mh-junk.el index fa31077dfe1..2ffc24e26e8 100644 --- a/lisp/mh-e/mh-junk.el +++ b/lisp/mh-e/mh-junk.el @@ -1,7 +1,6 @@ ;;; mh-junk.el --- MH-E interface to anti-spam measures -;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2003-2011 Free Software Foundation, Inc. ;; Author: Satyaki Das <satyaki@theforce.stanford.edu>, ;; Bill Wohler <wohler@newt.com> @@ -467,5 +466,4 @@ See `mh-spamprobe-blacklist' for more information." ;; sentence-end-double-space: nil ;; End: -;; arch-tag: 603335f1-77ff-4306-8828-5d3dad51abe1 ;;; mh-junk.el ends here diff --git a/lisp/mh-e/mh-letter.el b/lisp/mh-e/mh-letter.el index 03ef7b6f47f..eebc30aa4ca 100644 --- a/lisp/mh-e/mh-letter.el +++ b/lisp/mh-e/mh-letter.el @@ -1,8 +1,6 @@ ;;; mh-letter.el --- MH-Letter mode -;; Copyright (C) 1993, 1995, 1997, -;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1993, 1995, 1997, 2000-2011 Free Software Foundation, Inc. ;; Author: Bill Wohler <wohler@newt.com> ;; Maintainer: Bill Wohler <wohler@newt.com> @@ -960,5 +958,4 @@ Otherwise, simply insert MH-INS-STRING before each line." ;; sentence-end-double-space: nil ;; End: -;; arch-tag: 0548632c-aadb-4e3b-bb80-bbd62ff90bf3 ;;; mh-letter.el ends here diff --git a/lisp/mh-e/mh-limit.el b/lisp/mh-e/mh-limit.el index d8b4dea6488..db17b05ef37 100644 --- a/lisp/mh-e/mh-limit.el +++ b/lisp/mh-e/mh-limit.el @@ -1,7 +1,6 @@ ;;; mh-limit.el --- MH-E display limits -;; Copyright (C) 2001, 2002, 2003, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2001-2003, 2006-2011 Free Software Foundation, Inc. ;; Author: Peter S. Galbraith <psg@debian.org> ;; Maintainer: Bill Wohler <wohler@newt.com> @@ -334,5 +333,4 @@ The MH command pick is used to do the match." ;; sentence-end-double-space: nil ;; End: -;; arch-tag: b0d24378-1234-4c42-aa3f-7abad25b40a1 ;;; mh-limit.el ends here diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el index 860256e236a..de0f49e41db 100644 --- a/lisp/mh-e/mh-mime.el +++ b/lisp/mh-e/mh-mime.el @@ -1,7 +1,6 @@ ;;; mh-mime.el --- MH-E MIME support -;; Copyright (C) 1993, 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1995, 2001-2011 Free Software Foundation, Inc. ;; Author: Bill Wohler <wohler@newt.com> ;; Maintainer: Bill Wohler <wohler@newt.com> diff --git a/lisp/mh-e/mh-print.el b/lisp/mh-e/mh-print.el index 846596d79eb..bd99245efe6 100644 --- a/lisp/mh-e/mh-print.el +++ b/lisp/mh-e/mh-print.el @@ -1,7 +1,6 @@ ;;; mh-print.el --- MH-E printing support -;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2003-2011 Free Software Foundation, Inc. ;; Author: Jeffrey C Honig <jch@honig.net> ;; Maintainer: Bill Wohler <wohler@newt.com> @@ -248,5 +247,4 @@ Consider using \\[mh-ps-print-msg] instead." ;; sentence-end-double-space: nil ;; End: -;; arch-tag: 8d84d50b-2a49-4d0d-b51e-ba9c9b6fc679 ;;; mh-print.el ends here diff --git a/lisp/mh-e/mh-scan.el b/lisp/mh-e/mh-scan.el index 5f5a84f07a6..656bcb65011 100644 --- a/lisp/mh-e/mh-scan.el +++ b/lisp/mh-e/mh-scan.el @@ -1,8 +1,6 @@ ;;; mh-scan.el --- MH-E scan line constants and utilities -;; Copyright (C) 1993, 1995, 1997, -;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1993, 1995, 1997, 2000-2011 Free Software Foundation, Inc. ;; Author: Bill Wohler <wohler@newt.com> ;; Maintainer: Bill Wohler <wohler@newt.com> @@ -485,5 +483,4 @@ comes after that." ;; sentence-end-double-space: nil ;; End: -;; arch-tag: 5ab35d46-101e-443b-a2b6-5a908cf97528 ;;; mh-scan.el ends here diff --git a/lisp/mh-e/mh-search.el b/lisp/mh-e/mh-search.el index 7a1f41bf932..a90a26ab2a4 100644 --- a/lisp/mh-e/mh-search.el +++ b/lisp/mh-e/mh-search.el @@ -1,8 +1,6 @@ ;;; mh-search --- MH-Search mode -;; Copyright (C) 1993, 1995, -;; 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1993, 1995, 2001-2011 Free Software Foundation, Inc. ;; Author: Indexed search by Satyaki Das <satyaki@theforce.stanford.edu> ;; Maintainer: Bill Wohler <wohler@newt.com> @@ -1931,5 +1929,4 @@ folder buffer." ;; sentence-end-double-space: nil ;; End: -;; arch-tag: 607762ad-0dff-4fe1-a27e-6c0dde0dcc47 ;;; mh-search ends here diff --git a/lisp/mh-e/mh-seq.el b/lisp/mh-e/mh-seq.el index 09dce2f32da..145b689c6b9 100644 --- a/lisp/mh-e/mh-seq.el +++ b/lisp/mh-e/mh-seq.el @@ -1,7 +1,6 @@ ;;; mh-seq.el --- MH-E sequences support -;; Copyright (C) 1993, 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1995, 2001-2011 Free Software Foundation, Inc. ;; Author: Bill Wohler <wohler@newt.com> ;; Maintainer: Bill Wohler <wohler@newt.com> diff --git a/lisp/mh-e/mh-show.el b/lisp/mh-e/mh-show.el index 58d52205079..5c2f08cefe5 100644 --- a/lisp/mh-e/mh-show.el +++ b/lisp/mh-e/mh-show.el @@ -1,8 +1,6 @@ ;;; mh-show.el --- MH-Show mode -;; Copyright (C) 1993, 1995, 1997, -;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1993, 1995, 1997, 2000-2011 Free Software Foundation, Inc. ;; Author: Bill Wohler <wohler@newt.com> ;; Maintainer: Bill Wohler <wohler@newt.com> @@ -917,5 +915,4 @@ See also `mh-folder-mode'. ;; sentence-end-double-space: nil ;; End: -;; arch-tag: 8607a80a-9b5c-43a7-a25d-d7e4a848c25b ;;; mh-show.el ends here diff --git a/lisp/mh-e/mh-speed.el b/lisp/mh-e/mh-speed.el index fc22802b870..b782081c85c 100644 --- a/lisp/mh-e/mh-speed.el +++ b/lisp/mh-e/mh-speed.el @@ -1,7 +1,6 @@ ;;; mh-speed.el --- MH-E speedbar support -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Author: Satyaki Das <satyaki@theforce.stanford.edu> ;; Maintainer: Bill Wohler <wohler@newt.com> @@ -581,5 +580,4 @@ The function invalidates the latest ancestor that is present." ;; sentence-end-double-space: nil ;; End: -;; arch-tag: d38ddcd4-3c00-4e37-99bf-8b89dda7b32c ;;; mh-speed.el ends here diff --git a/lisp/mh-e/mh-thread.el b/lisp/mh-e/mh-thread.el index c07e58d1bc9..c6f33a15fd2 100644 --- a/lisp/mh-e/mh-thread.el +++ b/lisp/mh-e/mh-thread.el @@ -1,7 +1,6 @@ ;;; mh-thread.el --- MH-E threading support -;; Copyright (C) 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2002-2004, 2006-2011 Free Software Foundation, Inc. ;; Author: Satyaki Das <satyaki@theforce.stanford.edu> ;; Maintainer: Bill Wohler <wohler@newt.com> @@ -880,5 +879,4 @@ This function can only be used the folder is threaded." ;; sentence-end-double-space: nil ;; End: -;; arch-tag: b10e62f5-f028-4e04-873e-89d0e069b3d5 ;;; mh-thread.el ends here diff --git a/lisp/mh-e/mh-tool-bar.el b/lisp/mh-e/mh-tool-bar.el index 4c0187a385f..ddc9b3ffe94 100644 --- a/lisp/mh-e/mh-tool-bar.el +++ b/lisp/mh-e/mh-tool-bar.el @@ -1,7 +1,6 @@ ;;; mh-tool-bar.el --- MH-E tool bar support -;; Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2002-2003, 2005-2011 Free Software Foundation, Inc. ;; Author: Satyaki Das <satyaki@theforce.stanford.edu> ;; Maintainer: Bill Wohler <wohler@newt.com> @@ -465,5 +464,4 @@ This button runs `mh-widen'")) ;; sentence-end-double-space: nil ;; End: -;; arch-tag: 28c2436d-bb8d-486a-a8d7-5a4d9cae3513 ;;; mh-tool-bar.el ends here diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el index 7034fddd883..d7d3107b908 100644 --- a/lisp/mh-e/mh-utils.el +++ b/lisp/mh-e/mh-utils.el @@ -1,8 +1,6 @@ ;;; mh-utils.el --- MH-E general utilities -;; Copyright (C) 1993, 1995, 1997, -;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1993, 1995, 1997, 2000-2011 Free Software Foundation, Inc. ;; Author: Bill Wohler <wohler@newt.com> ;; Maintainer: Bill Wohler <wohler@newt.com> @@ -1013,5 +1011,4 @@ If the current line is too long truncate a part of it as well." ;; sentence-end-double-space: nil ;; End: -;; arch-tag: 1af39fdf-f66f-4b06-9b48-18a7656c8e36 ;;; mh-utils.el ends here diff --git a/lisp/mh-e/mh-xface.el b/lisp/mh-e/mh-xface.el index afad87d1ced..027d79a948a 100644 --- a/lisp/mh-e/mh-xface.el +++ b/lisp/mh-e/mh-xface.el @@ -1,7 +1,6 @@ ;;; mh-xface.el --- MH-E X-Face and Face header field display -;; Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2002-2003, 2005-2011 Free Software Foundation, Inc. ;; Author: Bill Wohler <wohler@newt.com> ;; Maintainer: Bill Wohler <wohler@newt.com> @@ -471,5 +470,4 @@ The argument CHANGE is ignored." ;; sentence-end-double-space: nil ;; End: -;; arch-tag: a79dd33f-d0e5-4b19-a53a-be690f90229a ;;; mh-xface.el ends here diff --git a/lisp/midnight.el b/lisp/midnight.el index 5ff1ecc9b07..9a6b162e986 100644 --- a/lisp/midnight.el +++ b/lisp/midnight.el @@ -1,7 +1,6 @@ ;;; midnight.el --- run something every midnight, e.g., kill old buffers -;; Copyright (C) 1998, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998, 2001-2011 Free Software Foundation, Inc. ;; Author: Sam Steingold <sds@gnu.org> ;; Maintainer: Sam Steingold <sds@gnu.org> @@ -126,7 +125,7 @@ See also `clean-buffer-list-kill-regexps', :group 'midnight) (defcustom clean-buffer-list-kill-never-buffer-names - '("*scratch*" "*Messages*" "*server*") + '("*scratch*" "*Messages*") "List of buffer names which will never be killed by `clean-buffer-list'. See also `clean-buffer-list-kill-never-regexps'. Note that this does override `clean-buffer-list-kill-regexps' and @@ -234,5 +233,4 @@ first argument to `run-at-time'." (provide 'midnight) -;; arch-tag: a5979be9-2890-46a3-ba84-791f0a4a6e80 ;;; midnight.el ends here diff --git a/lisp/minibuf-eldef.el b/lisp/minibuf-eldef.el index 95291f665cf..e6ebe3c53f1 100644 --- a/lisp/minibuf-eldef.el +++ b/lisp/minibuf-eldef.el @@ -1,7 +1,6 @@ ;;; minibuf-eldef.el --- Only show defaults in prompts when applicable ;; -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; ;; Author: Miles Bader <miles@gnu.org> ;; Keywords: convenience @@ -156,5 +155,4 @@ Returns non-nil if the new state is enabled." (provide 'minibuf-eldef) -;; arch-tag: 7e421fae-c275-4729-b0da-7836af377d3d ;;; minibuf-eldef.el ends here diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 8d09d5d3f6d..1b42ee1f2ce 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -1,6 +1,6 @@ ;;; minibuffer.el --- Minibuffer completion functions -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> ;; Package: emacs @@ -2320,5 +2320,4 @@ filter out additional entries (because TABLE migth not obey PRED)." (provide 'minibuffer) -;; arch-tag: ef8a0a15-1080-4790-a754-04017c02f08f ;;; minibuffer.el ends here diff --git a/lisp/misc.el b/lisp/misc.el index 55b685fe2b7..8a571f45144 100644 --- a/lisp/misc.el +++ b/lisp/misc.el @@ -1,7 +1,6 @@ ;;; misc.el --- some nonstandard basic editing commands for Emacs -;; Copyright (C) 1989, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1989, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: convenience diff --git a/lisp/misearch.el b/lisp/misearch.el index 1e5ab06a8b9..a0351f3820f 100644 --- a/lisp/misearch.el +++ b/lisp/misearch.el @@ -1,6 +1,6 @@ ;;; misearch.el --- isearch extensions for multi-buffer search -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Juri Linkov <juri@jurta.org> ;; Keywords: matching @@ -378,5 +378,4 @@ whose file names match the specified wildcard." (provide 'multi-isearch) -;; arch-tag: a6d38ffa-4d14-4e39-8ac6-46af9d6a6773 ;;; misearch.el ends here diff --git a/lisp/mouse-copy.el b/lisp/mouse-copy.el index db68ee66176..92fbdeb74e0 100644 --- a/lisp/mouse-copy.el +++ b/lisp/mouse-copy.el @@ -1,7 +1,6 @@ ;;; mouse-copy.el --- one-click text copy and move -;; Copyright (C) 1996, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996, 2001-2011 Free Software Foundation, Inc. ;; Author: John Heidemann <johnh@ISI.EDU> ;; Keywords: mouse @@ -222,5 +221,4 @@ by johnh@ficus.cs.ucla.edu." (provide 'mouse-copy) -;; arch-tag: 3d50293b-c089-4273-b412-4fc96a5f26ff ;;; mouse-copy.el ends here diff --git a/lisp/mouse-drag.el b/lisp/mouse-drag.el index e024b2aa551..ac99a34e64c 100644 --- a/lisp/mouse-drag.el +++ b/lisp/mouse-drag.el @@ -1,7 +1,6 @@ ;;; mouse-drag.el --- use mouse-2 to do a new style of scrolling -;; Copyright (C) 1996, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-1997, 2001-2011 Free Software Foundation, Inc. ;; Author: John Heidemann <johnh@ISI.EDU> ;; Keywords: mouse diff --git a/lisp/mouse-sel.el b/lisp/mouse-sel.el index 9b4a048131e..d80f8db3b7f 100644 --- a/lisp/mouse-sel.el +++ b/lisp/mouse-sel.el @@ -1,7 +1,6 @@ ;;; mouse-sel.el --- multi-click selection support -;; Copyright (C) 1993, 1994, 1995, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993-1995, 2001-2011 Free Software Foundation, Inc. ;; Author: Mike Williams <mdub@bigfoot.com> ;; Keywords: mouse diff --git a/lisp/mouse.el b/lisp/mouse.el index 40e0c14c064..c572263f3ba 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -1,7 +1,6 @@ ;;; mouse.el --- window system-independent mouse support -;; Copyright (C) 1993, 1994, 1995, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993-1995, 1999-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: hardware, mouse @@ -185,6 +184,7 @@ items `Turn Off' and `Help'." (minor-mode-menu-from-indicator indicator))) (defun mouse-menu-major-mode-map () + (run-hooks 'activate-menubar-hook 'menu-bar-update-hook) (let* (;; Keymap from which to inherit; may be null. (ancestor (mouse-menu-non-singleton (and (current-local-map) @@ -217,6 +217,7 @@ Otherwise return the whole menu." "Return a keymap equivalent to the menu bar. The contents are the items that would be in the menu bar whether or not it is actually displayed." + (run-hooks 'activate-menubar-hook 'menu-bar-update-hook) (let* ((local-menu (and (current-local-map) (lookup-key (current-local-map) [menu-bar]))) (global-menu (lookup-key global-map [menu-bar])) @@ -1280,7 +1281,16 @@ regardless of where you click." (or mouse-yank-at-point (mouse-set-point click)) (let ((primary (cond - ((fboundp 'x-get-selection-value) ; MS-DOS, MS-Windows and X. + ((eq system-type 'windows-nt) + ;; MS-Windows emulates PRIMARY in x-get-selection, but not + ;; in x-get-selection-value (the latter only accesses the + ;; clipboard). So try PRIMARY first, in case they selected + ;; something with the mouse in the current Emacs session. + (or (x-get-selection 'PRIMARY) + (x-get-selection-value))) + ((fboundp 'x-get-selection-value) ; MS-DOS and X. + ;; On X, x-get-selection-value supports more formats and + ;; encodings, so use it in preference to x-get-selection. (or (x-get-selection-value) (x-get-selection 'PRIMARY))) ;; FIXME: What about xterm-mouse-mode etc.? @@ -2130,5 +2140,4 @@ choose a font." (provide 'mouse) -;; arch-tag: 9a710ce1-914a-4923-9b81-697f7bf82ab3 ;;; mouse.el ends here diff --git a/lisp/mpc.el b/lisp/mpc.el index 97c5573face..8feddf8829b 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el @@ -1,6 +1,6 @@ ;;; mpc.el --- A client for the Music Player Daemon -*- coding: utf-8 -*- -;; Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2006-2011 Free Software Foundation, Inc. ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> ;; Keywords: multimedia @@ -2611,5 +2611,4 @@ This is used so that they can be compared with `eq', which is needed for (provide 'mpc) -;; arch-tag: 4794b2f5-59e6-4f26-b695-650b3e002f37 ;;; mpc.el ends here diff --git a/lisp/msb.el b/lisp/msb.el index b7f1cfa2ff0..fb9de914abf 100644 --- a/lisp/msb.el +++ b/lisp/msb.el @@ -1,7 +1,6 @@ ;;; msb.el --- customizable buffer-selection with multiple menus -;; Copyright (C) 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, -;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993-1995, 1997-2011 Free Software Foundation, Inc. ;; Author: Lars Lindberg <lars.lindberg@home.se> ;; Maintainer: FSF @@ -365,6 +364,9 @@ This is instead of the groups in `msb-menu-cond'." :set 'msb-custom-set :group 'msb) +(define-obsolete-variable-alias 'msb-after-load-hooks + 'msb-after-load-hook "24.1") + (defcustom msb-after-load-hook nil "Hook run after the msb package has been loaded." :type 'hook @@ -1152,7 +1154,6 @@ different buffer menu using the function `msb'." nil) (provide 'msb) -(eval-after-load "msb" '(run-hooks 'msb-after-load-hook 'msb-after-load-hooks)) +(run-hooks 'msb-after-load-hook) -;; arch-tag: 403f9e82-b92e-4e7a-a797-5d6d9b76da36 ;;; msb.el ends here diff --git a/lisp/mwheel.el b/lisp/mwheel.el index 2fc84c06245..4ead168b188 100644 --- a/lisp/mwheel.el +++ b/lisp/mwheel.el @@ -1,7 +1,6 @@ ;;; mwheel.el --- Wheel mouse support -;; Copyright (C) 1998, 2000, 2001, 2002, 2002, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998, 2000-2011 Free Software Foundation, Inc. ;; Maintainer: William M. Perry <wmperry@gnu.org> ;; Keywords: mouse ;; Package: emacs @@ -285,5 +284,4 @@ Return non-nil if the new state is enabled." (provide 'mwheel) -;; arch-tag: 50ed00e7-3686-4b7a-8037-fb31aa5c237f ;;; mwheel.el ends here diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index 07091663471..f0d36451b5c 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -1,8 +1,6 @@ ;;; ange-ftp.el --- transparent FTP support for GNU Emacs -;; Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, -;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1989-1996, 1998, 2000-2011 Free Software Foundation, Inc. ;; Author: Andy Norman (ange@hplb.hpl.hp.com) ;; Maintainer: FSF diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index f2af67458ac..660eb3b968e 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -1,8 +1,6 @@ ;;; browse-url.el --- pass a URL to a WWW browser -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1995-2011 Free Software Foundation, Inc. ;; Author: Denis Howe <dbh@doc.ic.ac.uk> ;; Maintainer: FSF diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index c9adec5d7b8..43215003ef7 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el @@ -1,6 +1,6 @@ ;;; dbus.el --- Elisp bindings for D-Bus. -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Michael Albinus <michael.albinus@gmx.de> ;; Keywords: comm, hardware @@ -183,7 +183,18 @@ association to the service from D-Bus." (defun dbus-unregister-service (bus service) "Unregister all objects related to SERVICE from D-Bus BUS. BUS is either a Lisp symbol, `:system' or `:session', or a string -denoting the bus address. SERVICE must be a known service name." +denoting the bus address. SERVICE must be a known service name. + +The function returns a keyword, indicating the result of the +operation. One of the following keywords is returned: + +`:released': Service has become the primary owner of the name. + +`:non-existent': Service name does not exist on this bus. + +`:not-owner': We are neither the primary owner nor waiting in the +queue of this service." + (maphash (lambda (key value) (dolist (elt value) @@ -193,9 +204,14 @@ denoting the bus address. SERVICE must be a known service name." (puthash key (delete elt value) dbus-registered-objects-table) (remhash key dbus-registered-objects-table)))))) dbus-registered-objects-table) - (dbus-call-method - bus dbus-service-dbus dbus-path-dbus dbus-interface-dbus - "ReleaseName" service)) + (let ((reply (dbus-call-method + bus dbus-service-dbus dbus-path-dbus dbus-interface-dbus + "ReleaseName" service))) + (case reply + (1 :released) + (2 :non-existent) + (3 :not-owner) + (t (signal 'dbus-error (list "Could not unregister service" service)))))) (defun dbus-call-method-non-blocking-handler (&rest args) "Handler for reply messages of asynchronous D-Bus message calls. @@ -868,21 +884,23 @@ name of the property, and its value. If there are no properties, (add-to-list 'result (cons (car dict) (caadr dict)) 'append))))) (defun dbus-register-property - (bus service path interface property access value &optional emits-signal) + (bus service path interface property access value + &optional emits-signal dont-register-service) "Register property PROPERTY on the D-Bus BUS. BUS is either a Lisp symbol, `:system' or `:session', or a string denoting the bus address. SERVICE is the D-Bus service name of the D-Bus. It must be a -known name. - -PATH is the D-Bus object path SERVICE is registered. INTERFACE -is the name of the interface used at PATH, PROPERTY is the name -of the property of INTERFACE. ACCESS indicates, whether the -property can be changed by other services via D-Bus. It must be -either the symbol `:read' or `:readwrite'. VALUE is the initial -value of the property, it can be of any valid type (see +known name (See discussion of DONT-REGISTER-SERVICE below). + +PATH is the D-Bus object path SERVICE is registered (See +discussion of DONT-REGISTER-SERVICE below). INTERFACE is the +name of the interface used at PATH, PROPERTY is the name of the +property of INTERFACE. ACCESS indicates, whether the property +can be changed by other services via D-Bus. It must be either +the symbol `:read' or `:readwrite'. VALUE is the initial value +of the property, it can be of any valid type (see `dbus-call-method' for details). If PROPERTY already exists on PATH, it will be overwritten. For @@ -894,24 +912,38 @@ The interface \"org.freedesktop.DBus.Properties\" is added to PATH, including a default handler for the \"Get\", \"GetAll\" and \"Set\" methods of this interface. When EMITS-SIGNAL is non-nil, the signal \"PropertiesChanged\" is sent when the property is -changed by `dbus-set-property'." +changed by `dbus-set-property'. + +When DONT-REGISTER-SERVICE is non-nil, the known name SERVICE is +not registered. This means that other D-Bus clients have no way +of noticing the newly registered property. When interfaces are +constructed incrementally by adding single methods or properties +at a time, DONT-REGISTER-SERVICE can be used to prevent other +clients from discovering the still incomplete interface." (unless (member access '(:read :readwrite)) (signal 'dbus-error (list "Access type invalid" access))) ;; Register SERVICE. - (unless (member service (dbus-list-names bus)) + (unless (or dont-register-service + (member service (dbus-list-names bus))) (dbus-call-method bus dbus-service-dbus dbus-path-dbus dbus-interface-dbus "RequestName" service 0)) - ;; Add the handler. We use `dbus-service-emacs' as service name, in - ;; order to let unregister SERVICE despite of this default handler. + ;; Add handlers for the three property-related methods. (dbus-register-method - bus service path dbus-interface-properties "Get" 'dbus-property-handler) + bus service path dbus-interface-properties "Get" + 'dbus-property-handler 'dont-register) (dbus-register-method - bus service path dbus-interface-properties "GetAll" 'dbus-property-handler) + bus service path dbus-interface-properties "GetAll" + 'dbus-property-handler 'dont-register) (dbus-register-method - bus service path dbus-interface-properties "Set" 'dbus-property-handler) + bus service path dbus-interface-properties "Set" + 'dbus-property-handler 'dont-register) + + ;; Register the name SERVICE with BUS. + (unless dont-register-service + (dbus-register-service bus service)) ;; Send the PropertiesChanged signal. (when emits-signal diff --git a/lisp/net/dig.el b/lisp/net/dig.el index d36247a1d1f..af78ded4786 100644 --- a/lisp/net/dig.el +++ b/lisp/net/dig.el @@ -1,7 +1,6 @@ ;;; dig.el --- Domain Name System dig interface -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; Author: Simon Josefsson <simon@josefsson.org> ;; Keywords: DNS BIND dig comm diff --git a/lisp/net/dns.el b/lisp/net/dns.el index 2d4c2d8cd8b..77a194ec436 100644 --- a/lisp/net/dns.el +++ b/lisp/net/dns.el @@ -1,7 +1,6 @@ ;;; dns.el --- Domain Name Service lookups -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: network comm diff --git a/lisp/net/eudc-bob.el b/lisp/net/eudc-bob.el index 962020f2b30..5847a2def64 100644 --- a/lisp/net/eudc-bob.el +++ b/lisp/net/eudc-bob.el @@ -1,7 +1,6 @@ ;;; eudc-bob.el --- Binary Objects Support for EUDC -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Oscar Figueiredo <oscar@cpe.fr> ;; Maintainer: Pavel Janík <Pavel@Janik.cz> @@ -366,5 +365,4 @@ display a button." "Display a button for the JPEG DATA." (eudc-bob-display-jpeg data nil)) -;; arch-tag: 8f1853df-c9b6-4c5a-bdb1-d94dbd651fb3 ;;; eudc-bob.el ends here diff --git a/lisp/net/eudc-export.el b/lisp/net/eudc-export.el index 91abac571b8..df3a2e04118 100644 --- a/lisp/net/eudc-export.el +++ b/lisp/net/eudc-export.el @@ -1,7 +1,6 @@ ;;; eudc-export.el --- functions to export EUDC query results -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Oscar Figueiredo <oscar@cpe.fr> ;; Maintainer: Pavel Janík <Pavel@Janik.cz> @@ -220,5 +219,4 @@ This function can only be called from a directory query result buffer." (overlay-get (car (overlays-at (point))) 'eudc-record) (eudc-insert-record-at-point-into-bbdb))) -;; arch-tag: 8cbda7dc-3163-47e6-921c-6ec5083df2d7 ;;; eudc-export.el ends here diff --git a/lisp/net/eudc-hotlist.el b/lisp/net/eudc-hotlist.el index 5862384bd4d..fd0c56ed693 100644 --- a/lisp/net/eudc-hotlist.el +++ b/lisp/net/eudc-hotlist.el @@ -1,7 +1,6 @@ ;;; eudc-hotlist.el --- hotlist management for EUDC -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Oscar Figueiredo <oscar@cpe.fr> ;; Maintainer: Pavel Janík <Pavel@Janik.cz> @@ -194,5 +193,4 @@ These are the special commands of this mode: "" eudc-hotlist-menu)) -;; arch-tag: 9b633ab3-6a6e-4b46-b12e-d96739a7e0e8 ;;; eudc-hotlist.el ends here diff --git a/lisp/net/eudc-vars.el b/lisp/net/eudc-vars.el index e5e231a3744..d9985312f99 100644 --- a/lisp/net/eudc-vars.el +++ b/lisp/net/eudc-vars.el @@ -1,7 +1,6 @@ ;;; eudc-vars.el --- Emacs Unified Directory Client -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Oscar Figueiredo <oscar@cpe.fr> ;; Maintainer: Pavel Janík <Pavel@Janik.cz> @@ -406,5 +405,4 @@ Otherwise records must match queries exactly." (provide 'eudc-vars) -;; arch-tag: 80050575-b838-4246-8ebc-b2d7c5a2e482 ;;; eudc-vars.el ends here diff --git a/lisp/net/eudc.el b/lisp/net/eudc.el index 282a60a8288..8616c805f41 100644 --- a/lisp/net/eudc.el +++ b/lisp/net/eudc.el @@ -1,7 +1,6 @@ ;;; eudc.el --- Emacs Unified Directory Client -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Oscar Figueiredo <oscar@cpe.fr> ;; Maintainer: Pavel Janík <Pavel@Janik.cz> diff --git a/lisp/net/eudcb-bbdb.el b/lisp/net/eudcb-bbdb.el index aa4315077e4..1dd0648f569 100644 --- a/lisp/net/eudcb-bbdb.el +++ b/lisp/net/eudcb-bbdb.el @@ -1,7 +1,6 @@ ;;; eudcb-bbdb.el --- Emacs Unified Directory Client - BBDB Backend -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Oscar Figueiredo <oscar@cpe.fr> ;; Maintainer: Pavel Janík <Pavel@Janik.cz> @@ -243,5 +242,4 @@ RETURN-ATTRS is a list of attributes to return, defaulting to (provide 'eudcb-bbdb) -;; arch-tag: 38276208-75de-4dbc-ba6f-8db684c32e0a ;;; eudcb-bbdb.el ends here diff --git a/lisp/net/eudcb-ldap.el b/lisp/net/eudcb-ldap.el index e2ca2acaddb..14594409dfa 100644 --- a/lisp/net/eudcb-ldap.el +++ b/lisp/net/eudcb-ldap.el @@ -1,7 +1,6 @@ ;;; eudcb-ldap.el --- Emacs Unified Directory Client - LDAP Backend -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Oscar Figueiredo <oscar@cpe.fr> ;; Maintainer: Pavel Janík <Pavel@Janik.cz> @@ -208,5 +207,4 @@ attribute names are returned. Default to `person'" (provide 'eudcb-ldap) -;; arch-tag: 0f254dc0-7378-4fd4-ae26-18666184e96b ;;; eudcb-ldap.el ends here diff --git a/lisp/net/eudcb-mab.el b/lisp/net/eudcb-mab.el index d848b9953a3..485ca5a0c06 100644 --- a/lisp/net/eudcb-mab.el +++ b/lisp/net/eudcb-mab.el @@ -1,7 +1,6 @@ ;;; eudcb-mab.el --- Emacs Unified Directory Client - AddressBook backend -;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2003-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@newartisans.com> ;; Maintainer: FSF @@ -130,5 +129,4 @@ RETURN-ATTRS is a list of attributes to return, defaulting to (provide 'eudcb-mab) -;; arch-tag: 4bef8e65-f109-47c7-91b9-8a6ea3ed7bb1 ;;; eudcb-mab.el ends here diff --git a/lisp/net/eudcb-ph.el b/lisp/net/eudcb-ph.el index c0e4f81d31c..9e7490106ed 100644 --- a/lisp/net/eudcb-ph.el +++ b/lisp/net/eudcb-ph.el @@ -1,7 +1,6 @@ ;;; eudcb-ph.el --- Emacs Unified Directory Client - CCSO PH/QI Backend -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Oscar Figueiredo <oscar@cpe.fr> ;; Maintainer: Pavel Janík <Pavel@Janik.cz> @@ -241,5 +240,4 @@ depending on RETURN-RESPONSE." (provide 'eudcb-ph) -;; arch-tag: 4365bbf5-af20-453e-b5b6-2e7118ebfcdb ;;; eudcb-ph.el ends here diff --git a/lisp/net/gnutls.el b/lisp/net/gnutls.el index 85c546ffd3f..0929c31b6c4 100644 --- a/lisp/net/gnutls.el +++ b/lisp/net/gnutls.el @@ -1,6 +1,6 @@ ;;; gnutls.el --- Support SSL/TLS connections through GnuTLS -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. ;; Author: Ted Zlatanov <tzz@lifelogs.com> ;; Keywords: comm, tls, ssl, encryption @@ -77,7 +77,7 @@ PRIORITY-STRING is as per the GnuTLS docs, default is \"NORMAL\". TRUSTFILES is a list of CA bundles. KEYFILES is a list of client keys." (let* ((type (or type 'gnutls-x509pki)) - (trusfiles (or trustfiles + (trustfiles (or trustfiles '("/etc/ssl/certs/ca-certificates.crt"))) (priority-string (or priority-string (cond diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el index 182758aaffb..4e78a7d42c0 100644 --- a/lisp/net/goto-addr.el +++ b/lisp/net/goto-addr.el @@ -1,7 +1,6 @@ ;;; goto-addr.el --- click to browse URL or to send to e-mail address -;; Copyright (C) 1995, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995, 2000-2011 Free Software Foundation, Inc. ;; Author: Eric Ding <ericding@alum.mit.edu> ;; Maintainer: FSF @@ -302,5 +301,4 @@ Also fontifies the buffer appropriately (see `goto-address-fontify-p' and (provide 'goto-addr) -;; arch-tag: ca47c505-5661-425d-a471-62bc6e75cf0a ;;; goto-addr.el ends here diff --git a/lisp/net/hmac-def.el b/lisp/net/hmac-def.el index c16fffc8de4..5c8710afdbf 100644 --- a/lisp/net/hmac-def.el +++ b/lisp/net/hmac-def.el @@ -1,6 +1,6 @@ ;;; hmac-def.el --- A macro for defining HMAC functions. -;; Copyright (C) 1999, 2001, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2001, 2007-2011 Free Software Foundation, Inc. ;; Author: Shuhei KOBAYASHI <shuhei@aqua.ocn.ne.jp> ;; Keywords: HMAC, RFC2104 diff --git a/lisp/net/hmac-md5.el b/lisp/net/hmac-md5.el index a0bfd36ea69..a423cbeadd1 100644 --- a/lisp/net/hmac-md5.el +++ b/lisp/net/hmac-md5.el @@ -1,6 +1,6 @@ ;;; hmac-md5.el --- Compute HMAC-MD5. -;; Copyright (C) 1999, 2001, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2001, 2007-2011 Free Software Foundation, Inc. ;; Author: Shuhei KOBAYASHI <shuhei@aqua.ocn.ne.jp> ;; Keywords: HMAC, RFC2104, HMAC-MD5, MD5, KEYED-MD5, CRAM-MD5 diff --git a/lisp/net/imap-hash.el b/lisp/net/imap-hash.el index 9bcca67d130..d21b714d950 100644 --- a/lisp/net/imap-hash.el +++ b/lisp/net/imap-hash.el @@ -1,6 +1,6 @@ ;;; imap-hash.el --- Hashtable-like interface to an IMAP mailbox -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Teodor Zlatanov <tzz@lifelogs.com> ;; Keywords: mail @@ -371,4 +371,3 @@ Get only the headers if HEADERS-ONLY is not nil." ;;; (imap-hash-fetch iht nil 1 2 3) ;;; (imap-hash-fetch iht t 1 2 3) -;; arch-tag: 071410ac-91dc-4e36-b892-18e057d639c5 diff --git a/lisp/net/imap.el b/lisp/net/imap.el index 9265e962b38..6d80b97fd23 100644 --- a/lisp/net/imap.el +++ b/lisp/net/imap.el @@ -1,7 +1,6 @@ ;;; imap.el --- imap library -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Simon Josefsson <simon@josefsson.org> ;; Keywords: mail diff --git a/lisp/net/ldap.el b/lisp/net/ldap.el index 066dbd8bea0..3ccad277ffb 100644 --- a/lisp/net/ldap.el +++ b/lisp/net/ldap.el @@ -1,7 +1,6 @@ ;;; ldap.el --- client interface to LDAP for Emacs -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Oscar Figueiredo <oscar@cpe.fr> ;; Maintainer: FSF @@ -556,13 +555,10 @@ an alist of attribute/value pairs." (if (and sizelimit (not (equal "" sizelimit))) (setq arglist (nconc arglist (list (format "-z%s" sizelimit))))) - (eval `(call-process ldap-ldapsearch-prog - nil - buf - nil - ,@arglist - ,@ldap-ldapsearch-args - ,@filter)) + (apply #'call-process ldap-ldapsearch-prog + ;; Ignore stderr, which can corrupt results + nil (list buf nil) nil + (append arglist ldap-ldapsearch-args filter)) (insert "\n") (goto-char (point-min)) diff --git a/lisp/net/mairix.el b/lisp/net/mairix.el index bfac633c580..8c4bbb4a785 100644 --- a/lisp/net/mairix.el +++ b/lisp/net/mairix.el @@ -1,6 +1,6 @@ ;;; mairix.el --- Mairix interface for Emacs -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: David Engster <dengste@eml.cc> ;; Keywords: mail searching @@ -946,4 +946,3 @@ Use cursor keys or C-n,C-p to select next/previous search.\n\n") ;;; mairix.el ends here -;; arch-tag: 787ab678-fcd5-4c50-9295-01c2ee5124a6 diff --git a/lisp/net/net-utils.el b/lisp/net/net-utils.el index 60829f300b5..3c4588780a2 100644 --- a/lisp/net/net-utils.el +++ b/lisp/net/net-utils.el @@ -1,7 +1,6 @@ ;;; net-utils.el --- network functions -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Peter Breton <pbreton@cs.umb.edu> ;; Created: Sun Mar 16 1997 diff --git a/lisp/net/netrc.el b/lisp/net/netrc.el index ff0b52c2b96..59e9eab5fc3 100644 --- a/lisp/net/netrc.el +++ b/lisp/net/netrc.el @@ -1,6 +1,5 @@ ;;; netrc.el --- .netrc parsing functionality -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news @@ -34,18 +33,6 @@ ;;; .netrc and .authinfo rc parsing ;;; -(defalias 'netrc-point-at-eol - (if (fboundp 'point-at-eol) - 'point-at-eol - 'line-end-position)) -(eval-when-compile - ;; This is unnecessary in the compiled version as it is a macro. - (if (fboundp 'bound-and-true-p) - (defalias 'netrc-bound-and-true-p 'bound-and-true-p) - (defmacro netrc-bound-and-true-p (var) - "Return the value of symbol VAR if it is bound, else nil." - `(and (boundp (quote ,var)) ,var)))) - (defgroup netrc nil "Netrc configuration." :group 'comm) @@ -58,12 +45,15 @@ (defvar netrc-services-file "/etc/services" "The name of the services file.") +(defvar netrc-cache nil) + (defun netrc-parse (&optional file) (interactive "fFile to Parse: ") "Parse FILE and return a list of all entries in the file." (unless file (setq file netrc-file)) (if (listp file) + ;; We got already parsed contents; just return it. file (when (file-exists-p file) (with-temp-buffer @@ -71,7 +61,16 @@ "password" "account" "macdef" "force" "port")) alist elem result pair) - (insert-file-contents file) + (if (and netrc-cache + (equal (car netrc-cache) (nth 5 (file-attributes file)))) + ;; Store the contents of the file heavily encrypted in memory. + (insert (base64-decode-string (rot13-string (cdr netrc-cache)))) + (insert-file-contents file) + (when (string-match "\\.gpg\\'" file) + (setq netrc-cache (cons (nth 5 (file-attributes file)) + (rot13-string + (base64-encode-string + (buffer-string))))))) (goto-char (point-min)) ;; Go through the file, line by line. (while (not (eobp)) diff --git a/lisp/net/newst-backend.el b/lisp/net/newst-backend.el index 590363a1f65..039d709770e 100644 --- a/lisp/net/newst-backend.el +++ b/lisp/net/newst-backend.el @@ -1,7 +1,6 @@ ;;; newst-backend.el --- Retrieval backend for newsticker. -;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2003-2011 Free Software Foundation, Inc. ;; Author: Ulf Jasper <ulf.jasper@web.de> ;; Filename: newst-backend.el @@ -2353,5 +2352,4 @@ This function is suited for adding it to `newsticker-new-item-functions'." (provide 'newst-backend) -;; arch-tag: 0e37b658-56e9-49ab-90f9-f2df57e1a659 ;;; newst-backend.el ends here diff --git a/lisp/net/newst-plainview.el b/lisp/net/newst-plainview.el index a6629a40721..0e1279cd86c 100644 --- a/lisp/net/newst-plainview.el +++ b/lisp/net/newst-plainview.el @@ -1,7 +1,6 @@ ;;; newst-plainview.el --- Single buffer frontend for newsticker. -;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2003-2011 Free Software Foundation, Inc. ;; Author: Ulf Jasper <ulf.jasper@web.de> ;; Filename: newst-plainview.el @@ -1800,5 +1799,4 @@ Take care: end of item is at the end of its last line!" (provide 'newst-plainview) -;; arch-tag: 4e48b683-d48b-48dd-a13e-fe45baf41184 ;;; newst-plainview.el ends here diff --git a/lisp/net/newst-reader.el b/lisp/net/newst-reader.el index 25ed65d04ae..dd076bcf4f0 100644 --- a/lisp/net/newst-reader.el +++ b/lisp/net/newst-reader.el @@ -1,7 +1,6 @@ ;;; newst-reader.el --- Generic RSS reader functions. -;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2003-2011 Free Software Foundation, Inc. ;; Author: Ulf Jasper <ulf.jasper@web.de> ;; Filename: newst-reader.el @@ -1181,5 +1180,4 @@ static char * visit_xpm[] = { (provide 'newst-reader) -;; arch-tag: c604b701-bdf1-4fc1-8d05-5fabd1939533 ;;; newst-reader.el ends here diff --git a/lisp/net/newst-ticker.el b/lisp/net/newst-ticker.el index 80df1a14f23..cb82bb74048 100644 --- a/lisp/net/newst-ticker.el +++ b/lisp/net/newst-ticker.el @@ -1,7 +1,6 @@ ;; newst-ticker.el --- modeline ticker for newsticker. -;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2003-2011 Free Software Foundation, Inc. ;; Author: Ulf Jasper <ulf.jasper@web.de> ;; Filename: newst-ticker.el @@ -290,5 +289,4 @@ running already." (provide 'newst-ticker) -;; arch-tag: faee3ebb-749b-4935-9835-7f36d4b700f0 ;;; newst-ticker.el ends here diff --git a/lisp/net/newst-treeview.el b/lisp/net/newst-treeview.el index 6bf0b593de3..58d86b23946 100644 --- a/lisp/net/newst-treeview.el +++ b/lisp/net/newst-treeview.el @@ -1,6 +1,6 @@ ;;; newst-treeview.el --- Treeview frontend for newsticker. -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Ulf Jasper <ulf.jasper@web.de> ;; Filename: newst-treeview.el @@ -2076,5 +2076,4 @@ POS gives the position where EVENT occurred." (provide 'newst-treeview) -;; arch-tag: 5dbaff48-1f3e-4fc6-8ebd-e966fc90d2d4 ;;; newst-treeview.el ends here diff --git a/lisp/net/newsticker.el b/lisp/net/newsticker.el index 2566529d421..3a2cf3f04f7 100644 --- a/lisp/net/newsticker.el +++ b/lisp/net/newsticker.el @@ -1,7 +1,6 @@ ;;; newsticker.el --- A Newsticker for Emacs. -;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2003-2011 Free Software Foundation, Inc. ;; Author: Ulf Jasper <ulf.jasper@web.de> ;; Filename: newsticker.el @@ -409,5 +408,4 @@ (provide 'newsticker) -;; arch-tag: ab761dfa-67bc-4207-bc64-4307271dc381 ;;; newsticker.el ends here diff --git a/lisp/net/ntlm.el b/lisp/net/ntlm.el index 517e97efe6c..25e7a7b43de 100644 --- a/lisp/net/ntlm.el +++ b/lisp/net/ntlm.el @@ -1,6 +1,6 @@ ;;; ntlm.el --- NTLM (NT LanManager) authentication support -;; Copyright (C) 2001, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2001, 2007-2011 Free Software Foundation, Inc. ;; Author: Taro Kawagishi <tarok@transpulse.org> ;; Keywords: NTLM, SASL diff --git a/lisp/net/quickurl.el b/lisp/net/quickurl.el index 4e99f542b32..4045a443640 100644 --- a/lisp/net/quickurl.el +++ b/lisp/net/quickurl.el @@ -1,7 +1,6 @@ ;;; quickurl.el --- insert an URL based on text at point in buffer -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Dave Pearson <davep@davep.org> ;; Maintainer: Dave Pearson <davep@davep.org> diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 093892a1100..59a7b176088 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -1,10 +1,10 @@ ;;; rcirc.el --- default, simple IRC client. -;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2005-2011 Free Software Foundation, Inc. -;; Author: Ryan Yeske -;; URL: http://www.nongnu.org/rcirc +;; Author: Ryan Yeske <rcyeske@gmail.com> +;; Maintainers: Ryan Yeske <rcyeske@gmail.com>, +;; Deniz Dogan <deniz.a.m.dogan@gmail.com> ;; Keywords: comm ;; This file is part of GNU Emacs. @@ -895,6 +895,7 @@ Each element looks like (FILENAME . TEXT).") This number is independent of the number of lines in the buffer.") (defun rcirc-mode (process target) + ;; FIXME: Use define-derived-mode. "Major mode for IRC channel buffers. \\{rcirc-mode-map}" @@ -973,7 +974,7 @@ This number is independent of the number of lines in the buffer.") (add-hook 'completion-at-point-functions 'rcirc-completion-at-point nil 'local) - (run-hooks 'rcirc-mode-hook)) + (run-mode-hooks 'rcirc-mode-hook)) (defun rcirc-update-prompt (&optional all) "Reset the prompt string in the current buffer. @@ -1027,6 +1028,9 @@ If ALL is non-nil, update prompts in all IRC buffers." (defun rcirc-kill-buffer-hook () "Part the channel when killing an rcirc buffer." (when (eq major-mode 'rcirc-mode) + (when (and rcirc-log-flag + rcirc-log-directory) + (rcirc-log-write)) (rcirc-clean-up-buffer "Killed buffer"))) (defun rcirc-change-major-mode-hook () @@ -1561,8 +1565,11 @@ return the filename, or nil if no logging is desired for this session. If the returned filename is absolute (`file-name-absolute-p' -returns true), then it is used as-is, otherwise the resulting -file is put into `rcirc-log-directory'." +returns t), then it is used as-is, otherwise the resulting file +is put into `rcirc-log-directory'. + +The filename is then cleaned using `convert-standard-filename' to +guarantee valid filenames for the current OS." :group 'rcirc :type 'function) @@ -1587,7 +1594,9 @@ file is put into `rcirc-log-directory'." Log data is written to `rcirc-log-directory', except for log-files with absolute names (see `rcirc-log-filename-function')." (dolist (cell rcirc-log-alist) - (let ((filename (expand-file-name (car cell) rcirc-log-directory)) + (let ((filename (convert-standard-filename + (expand-file-name (car cell) + rcirc-log-directory))) (coding-system-for-write 'utf-8)) (make-directory (file-name-directory filename) t) (with-temp-buffer @@ -2850,5 +2859,4 @@ Passwords are stored in `rcirc-authinfo' (which see)." (provide 'rcirc) -;; arch-tag: b471b7e8-6b5a-4399-b2c6-a3c78dfc8ffb ;;; rcirc.el ends here diff --git a/lisp/net/rcompile.el b/lisp/net/rcompile.el index 3addcf73d74..82df5b39c95 100644 --- a/lisp/net/rcompile.el +++ b/lisp/net/rcompile.el @@ -1,7 +1,6 @@ ;;; rcompile.el --- run a compilation on a remote machine -;; Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993-1994, 2001-2011 Free Software Foundation, Inc. ;; Author: Albert <alon@milcse.rtsg.mot.com> ;; Maintainer: FSF @@ -178,5 +177,4 @@ See \\[compile]." remote-compile-host "")))))) -;; arch-tag: 2866a132-ece4-4ce9-9f91-ec147f803f73 ;;; rcompile.el ends here diff --git a/lisp/net/rlogin.el b/lisp/net/rlogin.el index 77f3296751a..91b4aa7d72e 100644 --- a/lisp/net/rlogin.el +++ b/lisp/net/rlogin.el @@ -1,7 +1,6 @@ ;;; rlogin.el --- remote login interface -;; Copyright (C) 1992, 1993, 1994, 1995, 1997, 1998, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 1992-1995, 1997-1998, 2001-2011 ;; Free Software Foundation, Inc. ;; Author: Noah Friedman @@ -319,5 +318,4 @@ Delete ARG characters forward, or send a C-d to process if at end of buffer." (provide 'rlogin) -;; arch-tag: 6e20eabf-feda-40fa-ab40-0d156db447e4 ;;; rlogin.el ends here diff --git a/lisp/net/sasl-cram.el b/lisp/net/sasl-cram.el index 38d7ff4e11d..153d2cafe29 100644 --- a/lisp/net/sasl-cram.el +++ b/lisp/net/sasl-cram.el @@ -1,6 +1,6 @@ ;;; sasl-cram.el --- CRAM-MD5 module for the SASL client framework -;; Copyright (C) 2000, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000, 2007-2011 Free Software Foundation, Inc. ;; Author: Daiki Ueno <ueno@unixuser.org> ;; Kenichi OKADA <okada@opaopa.org> diff --git a/lisp/net/sasl-digest.el b/lisp/net/sasl-digest.el index 8559c8f3fa9..1c7d2f02d10 100644 --- a/lisp/net/sasl-digest.el +++ b/lisp/net/sasl-digest.el @@ -1,6 +1,6 @@ ;;; sasl-digest.el --- DIGEST-MD5 module for the SASL client framework -;; Copyright (C) 2000, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000, 2007-2011 Free Software Foundation, Inc. ;; Author: Daiki Ueno <ueno@unixuser.org> ;; Kenichi OKADA <okada@opaopa.org> diff --git a/lisp/net/sasl-ntlm.el b/lisp/net/sasl-ntlm.el index ace50528acb..d8b367ac8ad 100644 --- a/lisp/net/sasl-ntlm.el +++ b/lisp/net/sasl-ntlm.el @@ -1,6 +1,6 @@ ;;; sasl-ntlm.el --- NTLM (NT Lan Manager) module for the SASL client framework -;; Copyright (C) 2000, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000, 2007-2011 Free Software Foundation, Inc. ;; Author: Taro Kawagishi <tarok@transpulse.org> ;; Keywords: SASL, NTLM diff --git a/lisp/net/sasl.el b/lisp/net/sasl.el index 7f864390a52..2c4da7986e7 100644 --- a/lisp/net/sasl.el +++ b/lisp/net/sasl.el @@ -1,6 +1,6 @@ ;;; sasl.el --- SASL client framework -;; Copyright (C) 2000, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000, 2007-2011 Free Software Foundation, Inc. ;; Author: Daiki Ueno <ueno@unixuser.org> ;; Keywords: SASL diff --git a/lisp/net/secrets.el b/lisp/net/secrets.el index 4487407971f..89378497c36 100644 --- a/lisp/net/secrets.el +++ b/lisp/net/secrets.el @@ -1,6 +1,6 @@ ;;; secrets.el --- Client interface to gnome-keyring and kwallet. -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. ;; Author: Michael Albinus <michael.albinus@gmx.de> ;; Keywords: comm password passphrase @@ -448,10 +448,9 @@ If there is no such COLLECTION, return nil." ;; Check the collections. (catch 'collection-found (dolist (collection-path (secrets-get-collections) nil) - (when - (string-equal - collection - (secrets-get-collection-property collection-path "Label")) + (when (string-equal + collection + (secrets-get-collection-property collection-path "Label")) (throw 'collection-found collection-path)))))) (defun secrets-create-collection (collection) @@ -490,6 +489,13 @@ For the time being, only the alias \"default\" is supported." secrets-interface-service "SetAlias" alias :object-path collection-path)))) +(defun secrets-delete-alias (alias) + "Delete ALIAS, referencing to a collection." + (dbus-call-method + :session secrets-service secrets-path + secrets-interface-service "SetAlias" + alias :object-path secrets-empty-path)) + (defun secrets-unlock-collection (collection) "Unlock collection labelled COLLECTION. If successful, return the object path of the collection." diff --git a/lisp/net/snmp-mode.el b/lisp/net/snmp-mode.el index 846a6e0faba..e9783d46ba8 100644 --- a/lisp/net/snmp-mode.el +++ b/lisp/net/snmp-mode.el @@ -1,7 +1,6 @@ ;;; snmp-mode.el --- SNMP & SNMPv2 MIB major mode -;; Copyright (C) 1995, 1998, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995, 1998, 2001-2011 Free Software Foundation, Inc. ;; Author: Paul D. Smith <psmith@BayNetworks.com> ;; Keywords: data @@ -694,5 +693,4 @@ controls whether case is significant." (provide 'snmp-mode) -;; arch-tag: eb6cc0f9-1e47-4023-8625-bc9aae6c3527 ;;; snmp-mode.el ends here diff --git a/lisp/net/socks.el b/lisp/net/socks.el index e7ed84c16e7..d792077d861 100644 --- a/lisp/net/socks.el +++ b/lisp/net/socks.el @@ -1,7 +1,6 @@ ;;; socks.el --- A Socks v5 Client for Emacs -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-2000, 2002, 2007-2011 Free Software Foundation, Inc. ;; Author: William M. Perry <wmperry@gnu.org> ;; Dave Love <fx@gnu.org> @@ -646,5 +645,4 @@ version.") (provide 'socks) -;; arch-tag: 67aef0d9-f4f7-4056-89c3-b4c9bf93ce7f ;;; socks.el ends here diff --git a/lisp/net/telnet.el b/lisp/net/telnet.el index 25bf7db7612..d4850fed345 100644 --- a/lisp/net/telnet.el +++ b/lisp/net/telnet.el @@ -1,7 +1,7 @@ ;;; telnet.el --- run a telnet session from within an Emacs buffer -;; Copyright (C) 1985, 1988, 1992, 1994, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1988, 1992, 1994, 2001-2011 +;; Free Software Foundation, Inc. ;; Author: William F. Schelter ;; Maintainer: FSF @@ -263,5 +263,4 @@ Normally input is edited in Emacs and sent a line at a time." (provide 'telnet) -;; arch-tag: 98218821-d04a-48b6-9058-57d0d4677a56 ;;; telnet.el ends here diff --git a/lisp/net/tls.el b/lisp/net/tls.el index 0ab4293f0d6..42ae5920eee 100644 --- a/lisp/net/tls.el +++ b/lisp/net/tls.el @@ -1,7 +1,6 @@ ;;; tls.el --- TLS/SSL support via wrapper around GnuTLS -;; Copyright (C) 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-1999, 2002-2011 Free Software Foundation, Inc. ;; Author: Simon Josefsson <simon@josefsson.org> ;; Keywords: comm, tls, gnutls, ssl diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el index 7885d143cc2..c893ce797ed 100644 --- a/lisp/net/tramp-cache.el +++ b/lisp/net/tramp-cache.el @@ -1,7 +1,6 @@ ;;; tramp-cache.el --- file information caching for Tramp -;; Copyright (C) 2000, 2005, 2006, 2007, 2008, 2009, -;; 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000, 2005-2011 Free Software Foundation, Inc. ;; Author: Daniel Pittman <daniel@inanna.danann.net> ;; Michael Albinus <michael.albinus@gmx.de> @@ -62,6 +61,8 @@ (defcustom tramp-persistency-file-name (cond ;; GNU Emacs. + ((and (fboundp 'locate-user-emacs-file)) + (expand-file-name (tramp-compat-funcall 'locate-user-emacs-file "tramp"))) ((and (boundp 'user-emacs-directory) (stringp (symbol-value 'user-emacs-directory)) (file-directory-p (symbol-value 'user-emacs-directory))) @@ -403,5 +404,4 @@ for all methods. Resulting data are derived from connection history." (provide 'tramp-cache) -;; arch-tag: ee1739b7-7628-408c-9b96-d11a74b05d26 ;;; tramp-cache.el ends here diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el index fac08defefb..7d266ad17d7 100644 --- a/lisp/net/tramp-cmds.el +++ b/lisp/net/tramp-cmds.el @@ -1,6 +1,6 @@ ;;; tramp-cmds.el --- Interactive commands for Tramp -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Michael Albinus <michael.albinus@gmx.de> ;; Keywords: comm, processes diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el index 852ee8fa45d..4dcc3d5484e 100644 --- a/lisp/net/tramp-compat.el +++ b/lisp/net/tramp-compat.el @@ -1,6 +1,6 @@ ;;; tramp-compat.el --- Tramp compatibility functions -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Michael Albinus <michael.albinus@gmx.de> ;; Keywords: comm, processes diff --git a/lisp/net/tramp-ftp.el b/lisp/net/tramp-ftp.el index a0db0199412..f048208ea41 100644 --- a/lisp/net/tramp-ftp.el +++ b/lisp/net/tramp-ftp.el @@ -1,7 +1,6 @@ ;;; tramp-ftp.el --- Tramp convenience functions for Ange-FTP -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Author: Michael Albinus <michael.albinus@gmx.de> ;; Keywords: comm, processes @@ -105,13 +104,13 @@ present for backward compatibility." ;; ... and add it to the method list. ;;;###tramp-autoload (unless (featurep 'xemacs) - (add-to-list 'tramp-methods (cons tramp-ftp-method nil))) + (add-to-list 'tramp-methods (cons tramp-ftp-method nil)) -;; Add some defaults for `tramp-default-method-alist'. -(add-to-list 'tramp-default-method-alist - (list "\\`ftp\\." nil tramp-ftp-method)) -(add-to-list 'tramp-default-method-alist - (list nil "\\`\\(anonymous\\|ftp\\)\\'" tramp-ftp-method)) + ;; Add some defaults for `tramp-default-method-alist'. + (add-to-list 'tramp-default-method-alist + (list "\\`ftp\\." nil tramp-ftp-method)) + (add-to-list 'tramp-default-method-alist + (list nil "\\`\\(anonymous\\|ftp\\)\\'" tramp-ftp-method))) ;; Add completion function for FTP method. (tramp-set-completion-function diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index a87b58a42c2..0f3a0cf33ff 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el @@ -1,6 +1,6 @@ ;;; tramp-gvfs.el --- Tramp access functions for GVFS daemon -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Michael Albinus <michael.albinus@gmx.de> ;; Keywords: comm, processes @@ -124,6 +124,7 @@ ;; Add a default for `tramp-default-user-alist'. Rule: For the SYNCE ;; method, no user is chosen. +;;;###tramp-autoload (add-to-list 'tramp-default-user-alist '("\\`synce\\'" nil nil)) (defcustom tramp-gvfs-zeroconf-domain "local" diff --git a/lisp/net/tramp-gw.el b/lisp/net/tramp-gw.el index 0fac3935d73..70b70004de9 100644 --- a/lisp/net/tramp-gw.el +++ b/lisp/net/tramp-gw.el @@ -1,6 +1,6 @@ ;;; tramp-gw.el --- Tramp utility functions for HTTP tunnels and SOCKS gateways -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Michael Albinus <michael.albinus@gmx.de> ;; Keywords: comm, processes @@ -72,6 +72,7 @@ (list "Default server" "socks" tramp-gw-default-socks-port 5)) ;; Add a default for `tramp-default-user-alist'. Default is the local user. +;;;###tramp-autoload (add-to-list 'tramp-default-user-alist (list (concat "\\`" diff --git a/lisp/net/tramp-imap.el b/lisp/net/tramp-imap.el index d71583bcd85..e0799e070ab 100644 --- a/lisp/net/tramp-imap.el +++ b/lisp/net/tramp-imap.el @@ -1,6 +1,6 @@ ;;; tramp-imap.el --- Tramp interface to IMAP through imap.el -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Teodor Zlatanov <tzz@lifelogs.com> ;; Keywords: mail, comm @@ -96,6 +96,7 @@ (list tramp-imaps-method '(tramp-default-port 993)))) ;; Add a default for `tramp-default-user-alist'. Default is the local user. +;;;###tramp-autoload (add-to-list 'tramp-default-user-alist (list (concat "\\`" diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 1501868a6b5..ccc90288258 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -1,7 +1,6 @@ ;;; tramp-sh.el --- Tramp access functions for (s)sh-like connections -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; (copyright statements below in code to be updated with the above notice) @@ -161,10 +160,11 @@ detected as prompt when being sent on echoing hosts, therefore.") (tramp-async-args (("-q"))) (tramp-remote-sh "/bin/sh") (tramp-copy-program "scp") - (tramp-copy-args (("-P" "%p") ("%k" "-p") ("-q") + (tramp-copy-args (("-P" "%p") ("%k" "-p") ("-q") ("-r") ("-o" "ControlPath=%t.%%r@%%h:%%p") ("-o" "ControlMaster=auto"))) (tramp-copy-keep-date t) + (tramp-copy-recursive t) (tramp-gw-args (("-o" "GlobalKnownHostsFile=/dev/null") ("-o" "UserKnownHostsFile=/dev/null") ("-o" "StrictHostKeyChecking=no"))) @@ -179,8 +179,9 @@ detected as prompt when being sent on echoing hosts, therefore.") (tramp-async-args (("-q"))) (tramp-remote-sh "/bin/sh") (tramp-copy-program "scp") - (tramp-copy-args (("%k" "-p"))) + (tramp-copy-args (("-P" "%p") ("%k" "-p") ("-q") ("-r"))) (tramp-copy-keep-date t) + (tramp-copy-recursive t) (tramp-gw-args (("-o" "GlobalKnownHostsFile=/dev/null") ("-o" "UserKnownHostsFile=/dev/null") ("-o" "StrictHostKeyChecking=no"))) @@ -306,6 +307,12 @@ detected as prompt when being sent on echoing hosts, therefore.") (tramp-remote-sh "/bin/sh"))) ;;;###tramp-autoload (add-to-list 'tramp-methods + '("ksu" + (tramp-login-program "ksu") + (tramp-login-args (("%u") ("-q"))) + (tramp-remote-sh "/bin/sh"))) +;;;###tramp-autoload +(add-to-list 'tramp-methods '("krlogin" (tramp-login-program "krlogin") (tramp-login-args (("%h") ("-l" "%u") ("-x"))) @@ -374,13 +381,23 @@ detected as prompt when being sent on echoing hosts, therefore.") (tramp-copy-args (("%k" "-p"))) (tramp-copy-keep-date t))) +;;;###tramp-autoload (add-to-list 'tramp-default-method-alist `(,tramp-local-host-regexp "\\`root\\'" "su")) +;;;###tramp-autoload (add-to-list 'tramp-default-user-alist - '("\\`su\\(do\\)?\\'" nil "root")) + `(,(concat "\\`" (regexp-opt '("su" "sudo" "ksu")) "\\'") + nil "root")) +;; Do not add "ssh" based methods, otherwise ~/.ssh/config would be ignored. +;;;###tramp-autoload (add-to-list 'tramp-default-user-alist - `("\\`r\\(em\\)?\\(cp\\|sh\\)\\|telnet\\|plink1?\\'" + `(,(concat + "\\`" + (regexp-opt + '("rcp" "remcp" "rsh" "telnet" "krlogin" + "plink" "plink1" "pscp" "psftp" "fcp")) + "\\'") nil ,(user-login-name))) (defconst tramp-completion-function-alist-rsh @@ -437,6 +454,7 @@ detected as prompt when being sent on echoing hosts, therefore.") (tramp-set-completion-function "telnet" tramp-completion-function-alist-telnet) (tramp-set-completion-function "su" tramp-completion-function-alist-su) (tramp-set-completion-function "sudo" tramp-completion-function-alist-su) +(tramp-set-completion-function "ksu" tramp-completion-function-alist-su) (tramp-set-completion-function "krlogin" tramp-completion-function-alist-rsh) (tramp-set-completion-function "plink" tramp-completion-function-alist-ssh) (tramp-set-completion-function "plink1" tramp-completion-function-alist-ssh) @@ -742,8 +760,7 @@ on the remote host.") (defconst tramp-perl-encode "%s -e ' # This script contributed by Juanma Barranquero <lektu@terra.es>. -# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -# Free Software Foundation, Inc. +# Copyright (C) 2002-2011 Free Software Foundation, Inc. use strict; my %%trans = do { @@ -784,8 +801,7 @@ This string is passed to `format', so percent characters need to be doubled.") (defconst tramp-perl-decode "%s -e ' # This script contributed by Juanma Barranquero <lektu@terra.es>. -# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -# Free Software Foundation, Inc. +# Copyright (C) 2002-2011 Free Software Foundation, Inc. use strict; my %%trans = do { @@ -2637,61 +2653,65 @@ the result will be a local, non-Tramp, filename." (defun tramp-sh-handle-start-file-process (name buffer program &rest args) "Like `start-file-process' for Tramp files." (with-parsed-tramp-file-name default-directory nil - (unwind-protect - ;; When PROGRAM is nil, we just provide a tty. - (let ((command - (when (stringp program) - (format "cd %s; exec %s" - (tramp-shell-quote-argument localname) - (mapconcat 'tramp-shell-quote-argument - (cons program args) " ")))) - (tramp-process-connection-type - (or (null program) tramp-process-connection-type)) - (name1 name) - (i 0)) - (unless buffer - ;; BUFFER can be nil. We use a temporary buffer. - (setq buffer (generate-new-buffer tramp-temp-buffer-name))) - (while (get-process name1) - ;; NAME must be unique as process name. - (setq i (1+ i) - name1 (format "%s<%d>" name i))) - (setq name name1) - ;; Set the new process properties. - (tramp-set-connection-property v "process-name" name) - (tramp-set-connection-property v "process-buffer" buffer) - ;; Activate narrowing in order to save BUFFER contents. - ;; Clear also the modification time; otherwise we might be - ;; interrupted by `verify-visited-file-modtime'. - (with-current-buffer (tramp-get-connection-buffer v) - (clear-visited-file-modtime) - (narrow-to-region (point-max) (point-max))) - (if command - ;; Send the command. - (tramp-send-command v command nil t) ; nooutput - ;; Check, whether a pty is associated. - (tramp-maybe-open-connection v) - (unless (tramp-compat-process-get - (tramp-get-connection-process v) 'remote-tty) - (tramp-error - v 'file-error "pty association is not supported for `%s'" name))) - (let ((p (tramp-get-connection-process v))) - ;; Set sentinel and query flag for this process. - (tramp-set-connection-property p "vector" v) - (set-process-sentinel p 'tramp-process-sentinel) - (tramp-compat-set-process-query-on-exit-flag p t) - ;; Return process. - p)) - ;; Save exit. - (with-current-buffer (tramp-get-connection-buffer v) - (if (string-match tramp-temp-buffer-name (buffer-name)) - (progn - (set-process-buffer (tramp-get-connection-process v) nil) - (kill-buffer (current-buffer))) - (widen) - (goto-char (point-max)))) - (tramp-set-connection-property v "process-name" nil) - (tramp-set-connection-property v "process-buffer" nil)))) + ;; When PROGRAM is nil, we just provide a tty. + (let ((command + (when (stringp program) + (format "cd %s; exec %s" + (tramp-shell-quote-argument localname) + (mapconcat 'tramp-shell-quote-argument + (cons program args) " ")))) + (tramp-process-connection-type + (or (null program) tramp-process-connection-type)) + (bmp (and (buffer-live-p buffer) (buffer-modified-p buffer))) + (name1 name) + (i 0)) + (unwind-protect + (save-excursion + (save-restriction + (unless buffer + ;; BUFFER can be nil. We use a temporary buffer. + (setq buffer (generate-new-buffer tramp-temp-buffer-name))) + (while (get-process name1) + ;; NAME must be unique as process name. + (setq i (1+ i) + name1 (format "%s<%d>" name i))) + (setq name name1) + ;; Set the new process properties. + (tramp-set-connection-property v "process-name" name) + (tramp-set-connection-property v "process-buffer" buffer) + ;; Activate narrowing in order to save BUFFER contents. + ;; Clear also the modification time; otherwise we might + ;; be interrupted by `verify-visited-file-modtime'. + (with-current-buffer (tramp-get-connection-buffer v) + (let ((buffer-undo-list t)) + (clear-visited-file-modtime) + (narrow-to-region (point-max) (point-max)) + (if command + ;; Send the command. + (tramp-send-command v command nil t) ; nooutput + ;; Check, whether a pty is associated. + (tramp-maybe-open-connection v) + (unless (tramp-compat-process-get + (tramp-get-connection-process v) 'remote-tty) + (tramp-error + v 'file-error + "pty association is not supported for `%s'" name))))) + (let ((p (tramp-get-connection-process v))) + ;; Set sentinel and query flag for this process. + (tramp-set-connection-property p "vector" v) + (set-process-sentinel p 'tramp-process-sentinel) + (tramp-compat-set-process-query-on-exit-flag p t) + ;; Return process. + p))) + ;; Save exit. + (with-current-buffer (tramp-get-connection-buffer v) + (if (string-match tramp-temp-buffer-name (buffer-name)) + (progn + (set-process-buffer (tramp-get-connection-process v) nil) + (kill-buffer (current-buffer))) + (set-buffer-modified-p bmp))) + (tramp-set-connection-property v "process-name" nil) + (tramp-set-connection-property v "process-buffer" nil))))) (defun tramp-sh-handle-process-file (program &optional infile destination display &rest args) @@ -4042,9 +4062,17 @@ Goes through the list `tramp-inline-compress-commands'." vec 5 "Checking local compress command `%s', `%s' for sanity" compress decompress) - (unless (zerop (tramp-call-local-coding-command - (format "echo %s | %s | %s" - magic compress decompress) nil nil)) + (unless + (zerop + (tramp-call-local-coding-command + (format + ;; Windows shells need the program file name after + ;; the pipe symbol be quoted if they use forward + ;; slashes as directory separators. + (if (memq system-type '(windows-nt)) + "echo %s | \"%s\" | \"%s\"" + "echo %s | %s | %s") + magic compress decompress) nil nil)) (throw 'next nil)) (tramp-message vec 5 @@ -4938,9 +4966,25 @@ function cell is returned to be applied on a buffer." ((symbolp coding) coding) ((and compress (string-match "decoding" prop)) - (format "(%s | %s >%%s)" coding compress)) + (format + ;; Windows shells need the program file name after + ;; the pipe symbol be quoted if they use forward + ;; slashes as directory separators. + (if (and (string-match "local" prop) + (memq system-type '(windows-nt))) + "(%s | \"%s\" >%%s)" + "(%s | %s >%%s)") + coding compress)) (compress - (format "(%s <%%s | %s)" compress coding)) + (format + ;; Windows shells need the program file name after + ;; the pipe symbol be quoted if they use forward + ;; slashes as directory separators. + (if (and (string-match "local" prop) + (memq system-type '(windows-nt))) + "(%s <%%s | \"%s\")" + "(%s <%%s | %s)") + compress coding)) ((string-match "decoding" prop) (format "%s >%%s" coding)) (t diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index b54bbf1fa56..51e9c600b0c 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el @@ -1,7 +1,6 @@ ;;; tramp-smb.el --- Tramp access functions for SMB servers -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Author: Michael Albinus <michael.albinus@gmx.de> ;; Keywords: comm, processes @@ -43,11 +42,13 @@ ;; Add a default for `tramp-default-method-alist'. Rule: If there is ;; a domain in USER, it must be the SMB method. +;;;###tramp-autoload (add-to-list 'tramp-default-method-alist `(nil ,tramp-prefix-domain-regexp ,tramp-smb-method)) ;; Add a default for `tramp-default-user-alist'. Rule: For the SMB method, ;; the anonymous user is chosen. +;;;###tramp-autoload (add-to-list 'tramp-default-user-alist `(,(concat "\\`" tramp-smb-method "\\'") nil nil)) diff --git a/lisp/net/tramp-uu.el b/lisp/net/tramp-uu.el index fe6862c9240..391fba0b404 100644 --- a/lisp/net/tramp-uu.el +++ b/lisp/net/tramp-uu.el @@ -1,7 +1,6 @@ ;;; tramp-uu.el --- uuencode in Lisp -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Author: Kai Großjohann <kai.grossjohann@gmx.net> ;; Keywords: comm, terminals @@ -94,7 +93,6 @@ (provide 'tramp-uu) -;; arch-tag: 7153f2c6-8be5-4cd2-8c06-0fbcf5190ef6 ;;; tramp-uu.el ends here ;; Local Variables: diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index f7d3b81039e..93250e3864f 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -1,7 +1,6 @@ ;;; tramp.el --- Transparent Remote Access, Multiple Protocol -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Kai Großjohann <kai.grossjohann@gmx.net> ;; Michael Albinus <michael.albinus@gmx.de> @@ -291,8 +290,11 @@ shouldn't return t when it isn't." ;; password caching. "scpc" is chosen if we detect that the user is ;; running OpenSSH 4.0 or newer. (cond - ;; PuTTY is installed. - ((executable-find "pscp") + ;; PuTTY is installed. We don't take it, if it is installed on a + ;; non-windows system, or pscp from the pssh (parallel ssh) package + ;; is found. + ((and (eq system-type 'windows-nt) + (executable-find "pscp")) (if (or (fboundp 'password-read) (fboundp 'auth-source-user-or-password) ;; Pageant is running. @@ -318,6 +320,7 @@ Also see `tramp-default-method-alist'." :group 'tramp :type 'string) +;;;###tramp-autoload (defcustom tramp-default-method-alist nil "*Default method to use for specific host/user pairs. This is an alist of items (HOST USER METHOD). The first matching item @@ -344,6 +347,7 @@ This variable is regarded as obsolete, and will be removed soon." :group 'tramp :type '(choice (const nil) string)) +;;;###tramp-autoload (defcustom tramp-default-user-alist nil "*Default user to use for specific method/host pairs. This is an alist of items (METHOD HOST USER). The first matching item @@ -384,6 +388,7 @@ interpreted as a regular expression which always matches." (choice :tag "User regexp" regexp sexp) (choice :tag " Proxy name" string (const nil))))) +;;;###tramp-autoload (defconst tramp-local-host-regexp (concat "\\`" @@ -603,6 +608,7 @@ It shall be used in combination with `generate-new-buffer-name'.") "File name of a persistent local temporary file. Useful for \"rsync\" like methods.") (make-variable-buffer-local 'tramp-temp-buffer-file-name) +(put 'tramp-temp-buffer-file-name 'permanent-local t) ;; XEmacs is distributed with few Lisp packages. Further packages are ;; installed using EFS. If we use a unified filename format, then @@ -665,9 +671,11 @@ Derived from `tramp-postfix-method-format'.") (defconst tramp-user-regexp "[^:/ \t]+" "*Regexp matching user names.") +;;;###tramp-autoload (defconst tramp-prefix-domain-format "%" "*String matching delimeter between user and domain names.") +;;;###tramp-autoload (defconst tramp-prefix-domain-regexp (regexp-quote tramp-prefix-domain-format) "*Regexp matching delimeter between user and domain names. @@ -1284,7 +1292,8 @@ ARGS to actually emit the message (if applicable)." (let ((now (current-time))) (insert (format-time-string "%T." now)) (insert (format "%06d " (nth 2 now)))) - ;; Calling function. + ;; Calling Tramp function. We suppress compat and trace + ;; functions from being displayed. (let ((btn 1) btf fn) (while (not fn) (setq btf (nth 1 (backtrace-frame btn))) @@ -1292,10 +1301,23 @@ ARGS to actually emit the message (if applicable)." (setq fn "") (when (symbolp btf) (setq fn (symbol-name btf)) - (unless (and (string-match "^tramp" fn) - (not (string-match - "^tramp\\(-debug\\)?\\(-message\\|-error\\|-compat\\(-funcall\\|-with-temp-message\\)\\)$" - fn))) + (unless + (and + (string-match "^tramp" fn) + (not + (string-match + (concat + "^" + (regexp-opt + '("tramp-compat-funcall" + "tramp-compat-with-temp-message" + "tramp-debug-message" + "tramp-error" + "tramp-error-with-buffer" + "tramp-message") + t) + "$") + fn))) (setq fn nil))) (setq btn (1+ btn)))) ;; The following code inserts filename and line number. @@ -2842,8 +2864,8 @@ User is always nil." (t (file-local-copy filename))))) ;; When the file is not readable for the owner, it - ;; cannot be inserted, even it is redable for the group - ;; or for everybody. + ;; cannot be inserted, even if it is readable for the + ;; group or for everybody. (set-file-modes local-copy (tramp-compat-octal-to-decimal "0600")) (when (and (null remote-copy) @@ -2851,8 +2873,7 @@ User is always nil." method 'tramp-copy-keep-tmpfile)) ;; We keep the local file for performance reasons, ;; useful for "rsync". - (setq tramp-temp-buffer-file-name local-copy) - (put 'tramp-temp-buffer-file-name 'permanent-local t)) + (setq tramp-temp-buffer-file-name local-copy)) (with-progress-reporter v 3 (format "Inserting local temp file `%s'" local-copy) @@ -3077,26 +3098,27 @@ The terminal type can be configured with `tramp-terminal-type'." (tramp-compat-with-temp-message "" ;; Enable auth-source and password-cache. (tramp-set-connection-property vec "first-password-request" t) - (let (exit) - (while (not exit) - (tramp-message proc 3 "Waiting for prompts from remote shell") - (setq exit - (catch 'tramp-action - (if timeout - (with-timeout (timeout) - (tramp-process-one-action proc vec actions)) - (tramp-process-one-action proc vec actions))))) - (with-current-buffer (tramp-get-connection-buffer vec) - (widen) - (tramp-message vec 6 "\n%s" (buffer-string))) - (unless (eq exit 'ok) - (tramp-clear-passwd vec) - (tramp-error-with-buffer - nil vec 'file-error - (cond - ((eq exit 'permission-denied) "Permission denied") - ((eq exit 'process-died) "Process died") - (t "Login failed"))))))) + (save-restriction + (let (exit) + (while (not exit) + (tramp-message proc 3 "Waiting for prompts from remote shell") + (setq exit + (catch 'tramp-action + (if timeout + (with-timeout (timeout) + (tramp-process-one-action proc vec actions)) + (tramp-process-one-action proc vec actions))))) + (with-current-buffer (tramp-get-connection-buffer vec) + (widen) + (tramp-message vec 6 "\n%s" (buffer-string))) + (unless (eq exit 'ok) + (tramp-clear-passwd vec) + (tramp-error-with-buffer + nil vec 'file-error + (cond + ((eq exit 'permission-denied) "Permission denied") + ((eq exit 'process-died) "Process died") + (t "Login failed")))))))) :;; Utility functions: diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el index 005fbb932a2..1f3064c7066 100644 --- a/lisp/net/trampver.el +++ b/lisp/net/trampver.el @@ -1,8 +1,7 @@ ;;; trampver.el --- Transparent Remote Access, Multiple Protocol ;;; lisp/trampver.el. Generated from trampver.el.in by configure. -;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, -;; 2010 Free Software Foundation, Inc. +;; Copyright (C) 2003-2011 Free Software Foundation, Inc. ;; Author: Kai Großjohann <kai.grossjohann@gmx.net> ;; Keywords: comm, processes diff --git a/lisp/net/webjump.el b/lisp/net/webjump.el index 81e4e2c65f9..be79bc721e2 100644 --- a/lisp/net/webjump.el +++ b/lisp/net/webjump.el @@ -1,7 +1,6 @@ ;;; webjump.el --- programmable Web hotlist -;; Copyright (C) 1996, 1997, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-1997, 2001-2011 Free Software Foundation, Inc. ;; Author: Neil W. Van Dyke <nwv@acm.org> ;; Created: 09-Aug-1996 @@ -480,5 +479,4 @@ Please submit bug reports and other feedback to the author, Neil W. Van Dyke (provide 'webjump) -;; arch-tag: f1d20156-0a6f-488b-bd91-f69ee8b6d5cc ;;; webjump.el ends here diff --git a/lisp/net/xesam.el b/lisp/net/xesam.el index 03c188006d0..16500c61b77 100644 --- a/lisp/net/xesam.el +++ b/lisp/net/xesam.el @@ -1,6 +1,6 @@ ;;; xesam.el --- Xesam interface to search engines. -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Michael Albinus <michael.albinus@gmx.de> ;; Keywords: tools, hypermedia @@ -918,5 +918,4 @@ Example: ;; yahoo, ebay, ... ;; - Construct complex queries via widgets, like in mairix.el. -;; arch-tag: 7fb9fc6c-c2ff-4bc7-bb42-bacb80cce2b2 ;;; xesam.el ends here diff --git a/lisp/net/zeroconf.el b/lisp/net/zeroconf.el index e49a45c8a48..d801a4c094c 100644 --- a/lisp/net/zeroconf.el +++ b/lisp/net/zeroconf.el @@ -1,6 +1,6 @@ ;;; zeroconf.el --- Service browser using Avahi. -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Michael Albinus <michael.albinus@gmx.de> ;; Keywords: comm, hardware @@ -686,5 +686,4 @@ For the description of arguments, see `zeroconf-resolved-services-hash'." (provide 'zeroconf) -;; arch-tag: ea578165-7fa8-44f4-90f0-de3940aec69f ;;; zeroconf.el ends here diff --git a/lisp/newcomment.el b/lisp/newcomment.el index 3227d2ac539..d88b76a7759 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el @@ -1,7 +1,6 @@ ;;; newcomment.el --- (un)comment regions of buffers -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: code extracted from Emacs-20's simple.el ;; Maintainer: Stefan Monnier <monnier@iro.umontreal.ca> @@ -1185,6 +1184,12 @@ end- comment markers additionally to what `comment-add' already specifies." 'box-multi 'box))) (comment-region beg end (+ comment-add arg)))) +(defun comment-only-p (beg end) + "Return non-nil if the text between BEG and END is all comments." + (save-excursion + (goto-char beg) + (comment-forward (point-max)) + (<= end (point)))) ;;;###autoload (defun comment-or-uncomment-region (beg end &optional arg) @@ -1193,10 +1198,7 @@ in which case call `uncomment-region'. If a prefix arg is given, it is passed on to the respective function." (interactive "*r\nP") (comment-normalize-vars) - (funcall (if (save-excursion ;; check for already commented region - (goto-char beg) - (comment-forward (point-max)) - (<= end (point))) + (funcall (if (comment-only-p beg end) 'uncomment-region 'comment-region) beg end arg)) @@ -1387,5 +1389,4 @@ unless optional argument SOFT is non-nil." (provide 'newcomment) -;; arch-tag: 01e3320a-00c8-44ea-a696-8f8e7354c858 ;;; newcomment.el ends here diff --git a/lisp/notifications.el b/lisp/notifications.el index dc4904db4ca..893b9ed095f 100644 --- a/lisp/notifications.el +++ b/lisp/notifications.el @@ -1,6 +1,6 @@ ;;; notifications.el --- Client interface to desktop notifications. -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. ;; Author: Julien Danjou <julien@danjou.info> ;; Keywords: comm desktop notifications diff --git a/lisp/novice.el b/lisp/novice.el index 47b32fcde8a..e47b17cf346 100644 --- a/lisp/novice.el +++ b/lisp/novice.el @@ -1,7 +1,6 @@ ;;; novice.el --- handling of disabled commands ("novice mode") for Emacs -;; Copyright (C) 1985, 1986, 1987, 1994, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985-1987, 1994, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: internal, help diff --git a/lisp/nxml/nxml-enc.el b/lisp/nxml/nxml-enc.el index e36863154bd..350c5c77c7b 100644 --- a/lisp/nxml/nxml-enc.el +++ b/lisp/nxml/nxml-enc.el @@ -1,6 +1,6 @@ ;;; nxml-enc.el --- XML encoding auto-detection -;; Copyright (C) 2003, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc. ;; Author: James Clark ;; Keywords: XML @@ -146,5 +146,4 @@ Applied to any files that `auto-mode-alist' says should be handled by (provide 'nxml-enc) -;; arch-tag: c2436247-78f3-418c-8069-85dc5335d083 ;;; nxml-enc.el ends here diff --git a/lisp/nxml/nxml-glyph.el b/lisp/nxml/nxml-glyph.el index ec7ee492e92..1b48a3fa25f 100644 --- a/lisp/nxml/nxml-glyph.el +++ b/lisp/nxml/nxml-glyph.el @@ -1,6 +1,6 @@ ;;; nxml-glyph.el --- glyph-handling for nxml-mode -;; Copyright (C) 2003, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc. ;; Author: James Clark ;; Keywords: XML @@ -415,5 +415,4 @@ Return nil if the face cannot display a glyph for N." (provide 'nxml-glyph) -;; arch-tag: 50985104-27c6-4241-8625-b11aa5685633 ;;; nxml-glyph.el ends here diff --git a/lisp/nxml/nxml-maint.el b/lisp/nxml/nxml-maint.el index a10ad2b21ac..e24a3d7172a 100644 --- a/lisp/nxml/nxml-maint.el +++ b/lisp/nxml/nxml-maint.el @@ -1,7 +1,6 @@ ;;; nxml-maint.el --- commands for maintainers of nxml-*.el -;; Copyright (C) 2003, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc. ;; Author: James Clark ;; Keywords: XML diff --git a/lisp/nxml/nxml-mode.el b/lisp/nxml/nxml-mode.el index d1cffdd38a2..993a6f7a2ab 100644 --- a/lisp/nxml/nxml-mode.el +++ b/lisp/nxml/nxml-mode.el @@ -1,7 +1,6 @@ ;;; nxml-mode.el --- a new XML mode -;; Copyright (C) 2003, 2004, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2003-2004, 2007-2011 Free Software Foundation, Inc. ;; Author: James Clark ;; Keywords: XML diff --git a/lisp/nxml/nxml-ns.el b/lisp/nxml/nxml-ns.el index 60715b94749..4cf7f50d096 100644 --- a/lisp/nxml/nxml-ns.el +++ b/lisp/nxml/nxml-ns.el @@ -1,6 +1,6 @@ ;;; nxml-ns.el --- XML namespace processing -;; Copyright (C) 2003, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc. ;; Author: James Clark ;; Keywords: XML @@ -145,5 +145,4 @@ NS is a symbol or nil." (provide 'nxml-ns) -;; arch-tag: 5968e4b7-fb37-46ce-8621-c65db9793028 ;;; nxml-ns.el ends here diff --git a/lisp/nxml/nxml-outln.el b/lisp/nxml/nxml-outln.el index 1afc4e9e5e8..6a2a9daf7e4 100644 --- a/lisp/nxml/nxml-outln.el +++ b/lisp/nxml/nxml-outln.el @@ -1,7 +1,6 @@ ;;; nxml-outln.el --- outline support for nXML mode -;; Copyright (C) 2004, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004, 2007-2011 Free Software Foundation, Inc. ;; Author: James Clark ;; Keywords: XML diff --git a/lisp/nxml/nxml-parse.el b/lisp/nxml/nxml-parse.el index 94f11fbf5d9..36e112e4078 100644 --- a/lisp/nxml/nxml-parse.el +++ b/lisp/nxml/nxml-parse.el @@ -1,6 +1,6 @@ ;;; nxml-parse.el --- XML parser, sharing infrastructure with nxml-mode -;; Copyright (C) 2003, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc. ;; Author: James Clark ;; Keywords: XML @@ -315,5 +315,4 @@ same way as well-formedness error." (provide 'nxml-parse) -;; arch-tag: fc19639b-1bff-4673-9992-f539da89ba1e ;;; nxml-parse.el ends here diff --git a/lisp/nxml/nxml-rap.el b/lisp/nxml/nxml-rap.el index 3b36cef7536..05df6118325 100644 --- a/lisp/nxml/nxml-rap.el +++ b/lisp/nxml/nxml-rap.el @@ -1,6 +1,6 @@ ;;; nxml-rap.el --- low-level support for random access parsing for nXML mode -;; Copyright (C) 2003, 2004, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2003-2004, 2007-2011 Free Software Foundation, Inc. ;; Author: James Clark ;; Keywords: XML @@ -482,5 +482,4 @@ expected `%s'" (provide 'nxml-rap) -;; arch-tag: cba241ec-4c59-4ef3-aa51-2cf92b3dd24f ;;; nxml-rap.el ends here diff --git a/lisp/nxml/nxml-uchnm.el b/lisp/nxml/nxml-uchnm.el index 03c09824f63..e96ee345ae6 100644 --- a/lisp/nxml/nxml-uchnm.el +++ b/lisp/nxml/nxml-uchnm.el @@ -1,6 +1,6 @@ ;;; nxml-uchnm.el --- support for Unicode standard cha names in nxml-mode -;; Copyright (C) 2003, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc. ;; Author: James Clark ;; Keywords: XML @@ -248,5 +248,4 @@ the variable `nxml-enabled-unicode-blocks'." (provide 'nxml-uchnm) -;; arch-tag: 440248c3-b604-467c-8b50-e83662c659a3 ;;; nxml-uchnm.el ends here diff --git a/lisp/nxml/nxml-util.el b/lisp/nxml/nxml-util.el index a069a7aa0c6..e2e4ed348bd 100644 --- a/lisp/nxml/nxml-util.el +++ b/lisp/nxml/nxml-util.el @@ -1,6 +1,6 @@ ;;; nxml-util.el --- utility functions for nxml-*.el -;; Copyright (C) 2003, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc. ;; Author: James Clark ;; Keywords: XML @@ -132,5 +132,4 @@ modifications to the buffer." (provide 'nxml-util) -;; arch-tag: 7d3b3af4-de2b-4410-bf67-94d64824324b ;;; nxml-util.el ends here diff --git a/lisp/nxml/rng-cmpct.el b/lisp/nxml/rng-cmpct.el index 858f3778784..09bd2b75038 100644 --- a/lisp/nxml/rng-cmpct.el +++ b/lisp/nxml/rng-cmpct.el @@ -1,6 +1,6 @@ ;;; rng-cmpct.el --- parsing of RELAX NG Compact Syntax schemas -;; Copyright (C) 2003, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc. ;; Author: James Clark ;; Keywords: XML, RelaxNG @@ -938,4 +938,3 @@ Current token after parse is token following ]." ;;; rng-cmpct.el -;; arch-tag: 90395eb1-283b-4146-bbc1-6d6ef1704e57 diff --git a/lisp/nxml/rng-dt.el b/lisp/nxml/rng-dt.el index 89e7a846e4b..e320f8377b2 100644 --- a/lisp/nxml/rng-dt.el +++ b/lisp/nxml/rng-dt.el @@ -1,6 +1,6 @@ ;;; rng-dt.el --- datatype library interface for RELAX NG -;; Copyright (C) 2003, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc. ;; Author: James Clark ;; Keywords: XML, RelaxNG @@ -61,5 +61,4 @@ a datatype library.") (provide 'rng-dt) -;; arch-tag: 1dca90f1-8dae-4dd4-b61f-fade4452c014 ;;; rng-dt.el ends here diff --git a/lisp/nxml/rng-loc.el b/lisp/nxml/rng-loc.el index 35ec87a8c45..b9e31e0a09e 100644 --- a/lisp/nxml/rng-loc.el +++ b/lisp/nxml/rng-loc.el @@ -1,7 +1,6 @@ ;;; rng-loc.el --- locate the schema to use for validation -;; Copyright (C) 2003, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc. ;; Author: James Clark ;; Keywords: XML, RelaxNG diff --git a/lisp/nxml/rng-maint.el b/lisp/nxml/rng-maint.el index e3da03136ba..d31740f0ca2 100644 --- a/lisp/nxml/rng-maint.el +++ b/lisp/nxml/rng-maint.el @@ -1,6 +1,6 @@ ;;; rng-maint.el --- commands for RELAX NG maintainers -;; Copyright (C) 2003, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc. ;; Author: James Clark ;; Keywords: XML, RelaxNG @@ -275,5 +275,4 @@ (while (rng-do-some-validation (lambda () t)))) -;; arch-tag: 4b8c6143-daac-4888-9c61-9bea6f935f17 ;;; rng-maint.el ends here diff --git a/lisp/nxml/rng-match.el b/lisp/nxml/rng-match.el index 7afb4e82e45..072d932678a 100644 --- a/lisp/nxml/rng-match.el +++ b/lisp/nxml/rng-match.el @@ -1,6 +1,6 @@ ;;; rng-match.el --- matching of RELAX NG patterns against XML events -;; Copyright (C) 2003, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc. ;; Author: James Clark ;; Keywords: XML, RelaxNG @@ -1736,5 +1736,4 @@ be exhaustive." (provide 'rng-match) -;; arch-tag: c8c50733-edcf-49fb-85e2-0aac8749b7f8 ;;; rng-match.el ends here diff --git a/lisp/nxml/rng-nxml.el b/lisp/nxml/rng-nxml.el index 96e3525410a..1686ebfc514 100644 --- a/lisp/nxml/rng-nxml.el +++ b/lisp/nxml/rng-nxml.el @@ -1,7 +1,6 @@ ;;; rng-nxml.el --- make nxml-mode take advantage of rng-validate-mode -;; Copyright (C) 2003, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc. ;; Author: James Clark ;; Keywords: XML, RelaxNG diff --git a/lisp/nxml/rng-parse.el b/lisp/nxml/rng-parse.el index 88e3c026efb..68a3aff3a0f 100644 --- a/lisp/nxml/rng-parse.el +++ b/lisp/nxml/rng-parse.el @@ -1,6 +1,6 @@ ;;; rng-parse.el --- parse an XML file and validate it against a schema -;; Copyright (C) 2003, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc. ;; Author: James Clark ;; Keywords: XML, RelaxNG @@ -100,5 +100,4 @@ be signaled in the same way as when it is not well-formed." (provide 'rng-parse) -;; arch-tag: 8f14f533-b687-4dc0-9cd7-617ead856981 ;;; rng-parse.el ends here diff --git a/lisp/nxml/rng-pttrn.el b/lisp/nxml/rng-pttrn.el index 0f2d325079d..a803369d3d2 100644 --- a/lisp/nxml/rng-pttrn.el +++ b/lisp/nxml/rng-pttrn.el @@ -1,6 +1,6 @@ ;;; rng-pttrn.el --- RELAX NG patterns -;; Copyright (C) 2003, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc. ;; Author: James Clark ;; Keywords: XML, RelaxNG @@ -186,5 +186,4 @@ (provide 'rng-pttrn) -;; arch-tag: 9418e269-ddd4-4037-861f-ff903f48f008 ;;; rng-pttrn.el ends here diff --git a/lisp/nxml/rng-uri.el b/lisp/nxml/rng-uri.el index 5f9c515078a..2b367b20072 100644 --- a/lisp/nxml/rng-uri.el +++ b/lisp/nxml/rng-uri.el @@ -1,6 +1,6 @@ ;;; rng-uri.el --- URI parsing and manipulation -;; Copyright (C) 2003, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc. ;; Author: James Clark ;; Keywords: XML @@ -352,5 +352,4 @@ Both FULL and BASE must be absolute URIs." (provide 'rng-uri) -;; arch-tag: c7b7b8b8-61d1-48ec-82bc-7001c70b2e9d ;;; rng-uri.el ends here diff --git a/lisp/nxml/rng-util.el b/lisp/nxml/rng-util.el index 180f91f0139..3e23b67c998 100644 --- a/lisp/nxml/rng-util.el +++ b/lisp/nxml/rng-util.el @@ -1,6 +1,6 @@ ;;; rng-util.el --- utility functions for RELAX NG library -;; Copyright (C) 2003, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc. ;; Author: James Clark ;; Keywords: XML, RelaxNG @@ -167,5 +167,4 @@ HIST, if non-nil, specifies a history list as with `completing-read'." (provide 'rng-util) -;; arch-tag: 2dc233e0-5e7a-488f-bfc4-5909512dbaf0 ;;; rng-util.el ends here diff --git a/lisp/nxml/rng-valid.el b/lisp/nxml/rng-valid.el index f55601b3224..876e582ed21 100644 --- a/lisp/nxml/rng-valid.el +++ b/lisp/nxml/rng-valid.el @@ -1,7 +1,6 @@ ;;; rng-valid.el --- real-time validation of XML using RELAX NG -;; Copyright (C) 2003, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc. ;; Author: James Clark ;; Keywords: XML, RelaxNG diff --git a/lisp/nxml/rng-xsd.el b/lisp/nxml/rng-xsd.el index 74aa009e656..266f8daac9e 100644 --- a/lisp/nxml/rng-xsd.el +++ b/lisp/nxml/rng-xsd.el @@ -1,6 +1,6 @@ ;;; rng-xsd.el --- W3C XML Schema datatypes library for RELAX NG -;; Copyright (C) 2003, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc. ;; Author: James Clark ;; Keywords: XML, RelaxNG @@ -856,5 +856,4 @@ MONTHS must be an integer >= 0." (provide 'rng-xsd) -;; arch-tag: 6b05510e-a5bb-4b99-8618-4660d00d0abb ;;; rng-xsd.el ends here diff --git a/lisp/nxml/xmltok.el b/lisp/nxml/xmltok.el index d2aeff9778e..a9b24955fa7 100644 --- a/lisp/nxml/xmltok.el +++ b/lisp/nxml/xmltok.el @@ -1,6 +1,6 @@ ;;; xmltok.el --- XML tokenization -;; Copyright (C) 2003, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc. ;; Author: James Clark ;; Keywords: XML @@ -1920,5 +1920,4 @@ and `xmltok-namespace-attributes'." (provide 'xmltok) -;; arch-tag: 747e5f3a-6fc3-4f8d-bd96-89f05aa99f5e ;;; xmltok.el ends here diff --git a/lisp/nxml/xsd-regexp.el b/lisp/nxml/xsd-regexp.el index 1c13060679b..fbf0e159247 100644 --- a/lisp/nxml/xsd-regexp.el +++ b/lisp/nxml/xsd-regexp.el @@ -1,6 +1,6 @@ ;;; xsd-regexp.el --- translate W3C XML Schema regexps to Emacs regexps -;; Copyright (C) 2003, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc. ;; Author: James Clark ;; Keywords: XML, regexp @@ -2117,5 +2117,4 @@ Code is inserted into the current buffer." (provide 'xsd-regexp) -;; arch-tag: bf990d61-a26c-4fd3-b578-56a5640729da ;;; xsd-regexp.el ends here diff --git a/lisp/obsolete/awk-mode.el b/lisp/obsolete/awk-mode.el index 0d1b3c9a4f2..d09ff1dd892 100644 --- a/lisp/obsolete/awk-mode.el +++ b/lisp/obsolete/awk-mode.el @@ -1,7 +1,6 @@ ;;; awk-mode.el --- AWK code editing commands for Emacs -;; Copyright (C) 1988, 1994, 1996, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1988, 1994, 1996, 2000-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: unix, languages @@ -122,5 +121,4 @@ Turning on AWK mode runs `awk-mode-hook'." (provide 'awk-mode) -;; arch-tag: 14ebc02a-b3c5-4e76-8034-6ca9ac0af0e6 ;;; awk-mode.el ends here diff --git a/lisp/obsolete/cl-compat.el b/lisp/obsolete/cl-compat.el index 622c4eaace6..21bb46179c5 100644 --- a/lisp/obsolete/cl-compat.el +++ b/lisp/obsolete/cl-compat.el @@ -1,7 +1,6 @@ ;;; cl-compat.el --- Common Lisp extensions for GNU Emacs Lisp (compatibility) -;; Copyright (C) 1993, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993, 2001-2011 Free Software Foundation, Inc. ;; Author: Dave Gillespie <daveg@synaptics.com> ;; Version: 2.02 diff --git a/lisp/obsolete/complete.el b/lisp/obsolete/complete.el index b7e94743802..925361566fb 100644 --- a/lisp/obsolete/complete.el +++ b/lisp/obsolete/complete.el @@ -1,7 +1,6 @@ ;;; complete.el --- partial completion mechanism plus other goodies -;; Copyright (C) 1990, 1991, 1992, 1993, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 1999-2011 Free Software Foundation, Inc. ;; Author: Dave Gillespie <daveg@synaptics.com> ;; Keywords: abbrev convenience @@ -1120,5 +1119,4 @@ This is only used by " (provide 'complete) -;; arch-tag: fc7e2768-ff44-4e22-b579-4d825b968458 ;;; complete.el ends here diff --git a/lisp/obsolete/fast-lock.el b/lisp/obsolete/fast-lock.el index 979daae2585..68d06ef34bc 100644 --- a/lisp/obsolete/fast-lock.el +++ b/lisp/obsolete/fast-lock.el @@ -1,7 +1,6 @@ ;;; fast-lock.el --- automagic text properties caching for fast Font Lock mode -;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994-1998, 2001-2011 Free Software Foundation, Inc. ;; Author: Simon Marshall <simon@gnu.org> ;; Maintainer: FSF @@ -855,5 +854,4 @@ See `fast-lock-get-face-properties'." (provide 'fast-lock) -;; arch-tag: 638c431e-8cae-4538-80a1-963ff97d233e ;;; fast-lock.el ends here diff --git a/lisp/obsolete/iso-acc.el b/lisp/obsolete/iso-acc.el index 5a96e3fd1d7..14b6a202012 100644 --- a/lisp/obsolete/iso-acc.el +++ b/lisp/obsolete/iso-acc.el @@ -1,7 +1,6 @@ ;;; iso-acc.el --- minor mode providing electric accent keys -;; Copyright (C) 1993, 1994, 1996, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993-1994, 1996, 2001-2011 Free Software Foundation, Inc. ;; Author: Johan Vromans ;; Maintainer: FSF @@ -487,5 +486,4 @@ Noninteractively, this operates on text from START to END." (add-hook 'minibuffer-setup-hook 'iso-acc-minibuf-setup) -;; arch-tag: 149ff409-7c3e-4574-9b5d-ac038939c0a6 ;;; iso-acc.el ends here diff --git a/lisp/obsolete/iso-insert.el b/lisp/obsolete/iso-insert.el index 90ff2398ee3..3f3b6d4abb3 100644 --- a/lisp/obsolete/iso-insert.el +++ b/lisp/obsolete/iso-insert.el @@ -1,7 +1,6 @@ ;;; iso-insert.el --- insert functions for ISO 8859/1 -*- coding: iso-8859-1;-*- -;; Copyright (C) 1987, 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1987, 1994, 2001-2011 Free Software Foundation, Inc. ;; Author: Howard Gayle ;; Maintainer: FSF @@ -629,5 +628,4 @@ (provide 'iso-insert) -;; arch-tag: eb5f97bd-a034-4851-92ff-ab1f1bf92814 ;;; iso-insert.el ends here diff --git a/lisp/obsolete/iso-swed.el b/lisp/obsolete/iso-swed.el index 9a6df1dc32e..d197f0d5b67 100644 --- a/lisp/obsolete/iso-swed.el +++ b/lisp/obsolete/iso-swed.el @@ -1,7 +1,6 @@ ;;; iso-swed.el --- set up char tables for ISO 8859/1 for Swedish/Finnish ttys -;; Copyright (C) 1987, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1987, 2001-2011 Free Software Foundation, Inc. ;; Author: Howard Gayle ;; Maintainer: FSF @@ -149,5 +148,4 @@ (provide 'iso-swed) -;; arch-tag: 6b3dc269-660c-44b6-a25f-680b921eaf2c ;;; iso-swed.el ends here diff --git a/lisp/obsolete/keyswap.el b/lisp/obsolete/keyswap.el index f9e61187052..f95b8f5bdb5 100644 --- a/lisp/obsolete/keyswap.el +++ b/lisp/obsolete/keyswap.el @@ -1,7 +1,6 @@ ;;; keyswap.el --- swap BS and DEL keys -*- no-byte-compile: t -*- -;; Copyright (C) 1992, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1992, 2001-2011 Free Software Foundation, Inc. ;; Author: Eric S. Raymond <esr@snark.thyrsus.com> ;; Keywords: terminals @@ -39,5 +38,4 @@ (aset the-table ?\^h ?\177) (setq keyboard-translate-table the-table)) -;; arch-tag: 67cf7009-e23e-421c-9648-078e7277297c ;;; keyswap.el ends here diff --git a/lisp/obsolete/lazy-lock.el b/lisp/obsolete/lazy-lock.el index b425498e182..f922a5c30b6 100644 --- a/lisp/obsolete/lazy-lock.el +++ b/lisp/obsolete/lazy-lock.el @@ -1,7 +1,6 @@ ;;; lazy-lock.el --- lazy demand-driven fontification for fast Font Lock mode -;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994-1998, 2001-2011 Free Software Foundation, Inc. ;; Author: Simon Marshall <simon@gnu.org> ;; Maintainer: FSF diff --git a/lisp/obsolete/levents.el b/lisp/obsolete/levents.el index 1715185ac05..96183cadb9b 100644 --- a/lisp/obsolete/levents.el +++ b/lisp/obsolete/levents.el @@ -1,7 +1,6 @@ ;;; levents.el --- emulate the Lucid event data type and associated functions -;; Copyright (C) 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: emulations @@ -290,5 +289,4 @@ GNU Emacs 19 does not currently generate process-output events." (provide 'levents) -;; arch-tag: a80c21da-69d7-46de-9cdb-5f68577b5525 ;;; levents.el ends here diff --git a/lisp/obsolete/lmenu.el b/lisp/obsolete/lmenu.el index 14f6398eef1..3c188be93e2 100644 --- a/lisp/obsolete/lmenu.el +++ b/lisp/obsolete/lmenu.el @@ -1,7 +1,6 @@ ;;; lmenu.el --- emulate Lucid's menubar support -;; Copyright (C) 1992, 1993, 1994, 1997, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1992-1994, 1997, 2001-2011 Free Software Foundation, Inc. ;; Keywords: emulations obsolete ;; Obsolete-since: 23.3 diff --git a/lisp/obsolete/lucid.el b/lisp/obsolete/lucid.el index a35cde02290..d5ef629ffb4 100644 --- a/lisp/obsolete/lucid.el +++ b/lisp/obsolete/lucid.el @@ -1,7 +1,6 @@ ;;; lucid.el --- emulate some Lucid Emacs functions -;; Copyright (C) 1993, 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1995, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: emulations diff --git a/lisp/obsolete/old-whitespace.el b/lisp/obsolete/old-whitespace.el index 71568f98d55..be967938bc9 100644 --- a/lisp/obsolete/old-whitespace.el +++ b/lisp/obsolete/old-whitespace.el @@ -1,7 +1,6 @@ ;;; whitespace.el --- warn about and clean bogus whitespaces in the file -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Rajesh Vaidheeswarran <rv@gnu.org> ;; Keywords: convenience @@ -809,5 +808,4 @@ This is meant to be added buffer-locally to `write-file-functions'." (provide 'whitespace) -;; arch-tag: 4ff44e87-b63c-402d-95a6-15e51e58bd0c ;;; whitespace.el ends here diff --git a/lisp/obsolete/options.el b/lisp/obsolete/options.el index 808617d4b9f..1b475e9e98b 100644 --- a/lisp/obsolete/options.el +++ b/lisp/obsolete/options.el @@ -1,7 +1,6 @@ ;;; options.el --- edit Options command for Emacs -;; Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF @@ -147,5 +146,4 @@ For convenience, the characters \\[backward-paragraph] and \\[forward-paragraph] (provide 'options) -;; arch-tag: d18211a1-f3fb-48c9-a449-d5acde406a3c ;;; options.el ends here diff --git a/lisp/pgg-def.el b/lisp/obsolete/pgg-def.el index d1b78ccb30b..39aef5fd278 100644 --- a/lisp/pgg-def.el +++ b/lisp/obsolete/pgg-def.el @@ -1,12 +1,12 @@ ;;; pgg-def.el --- functions/macros for defining PGG functions -;; Copyright (C) 1999, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2002-2011 Free Software Foundation, Inc. ;; Author: Daiki Ueno <ueno@unixuser.org> ;; Created: 1999/11/02 ;; Keywords: PGP, OpenPGP, GnuPG ;; Package: pgg +;; Obsolete-since: 24.1 ;; This file is part of GNU Emacs. diff --git a/lisp/pgg-gpg.el b/lisp/obsolete/pgg-gpg.el index 97b3b3e3d42..064985f4566 100644 --- a/lisp/pgg-gpg.el +++ b/lisp/obsolete/pgg-gpg.el @@ -1,7 +1,6 @@ ;;; pgg-gpg.el --- GnuPG support for PGG. -;; Copyright (C) 1999, 2000, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2000, 2002-2011 Free Software Foundation, Inc. ;; Author: Daiki Ueno <ueno@unixuser.org> ;; Symmetric encryption and gpg-agent support added by: @@ -9,6 +8,7 @@ ;; Created: 1999/10/28 ;; Keywords: PGP, OpenPGP, GnuPG ;; Package: pgg +;; Obsolete-since: 24.1 ;; This file is part of GNU Emacs. diff --git a/lisp/pgg-parse.el b/lisp/obsolete/pgg-parse.el index 72f8729de77..3d4539d9466 100644 --- a/lisp/pgg-parse.el +++ b/lisp/obsolete/pgg-parse.el @@ -1,12 +1,12 @@ ;;; pgg-parse.el --- OpenPGP packet parsing -;; Copyright (C) 1999, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2002-2011 Free Software Foundation, Inc. ;; Author: Daiki Ueno <ueno@unixuser.org> ;; Created: 1999/10/28 ;; Keywords: PGP, OpenPGP, GnuPG ;; Package: pgg +;; Obsolete-since: 24.1 ;; This file is part of GNU Emacs. diff --git a/lisp/pgg-pgp.el b/lisp/obsolete/pgg-pgp.el index dfa02d78353..7a9c70249a1 100644 --- a/lisp/pgg-pgp.el +++ b/lisp/obsolete/pgg-pgp.el @@ -1,12 +1,12 @@ ;;; pgg-pgp.el --- PGP 2.* and 6.* support for PGG. -;; Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2000, 2002-2011 Free Software Foundation, Inc. ;; Author: Daiki Ueno <ueno@unixuser.org> ;; Created: 1999/11/02 ;; Keywords: PGP, OpenPGP ;; Package: pgg +;; Obsolete-since: 24.1 ;; This file is part of GNU Emacs. diff --git a/lisp/pgg-pgp5.el b/lisp/obsolete/pgg-pgp5.el index 49731190946..796310bcfdc 100644 --- a/lisp/pgg-pgp5.el +++ b/lisp/obsolete/pgg-pgp5.el @@ -1,12 +1,12 @@ ;;; pgg-pgp5.el --- PGP 5.* support for PGG. -;; Copyright (C) 1999, 2000, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2000, 2002-2011 Free Software Foundation, Inc. ;; Author: Daiki Ueno <ueno@unixuser.org> ;; Created: 1999/11/02 ;; Keywords: PGP, OpenPGP ;; Package: pgg +;; Obsolete-since: 24.1 ;; This file is part of GNU Emacs. diff --git a/lisp/pgg.el b/lisp/obsolete/pgg.el index f654f3dc35e..42030f7d502 100644 --- a/lisp/pgg.el +++ b/lisp/obsolete/pgg.el @@ -1,12 +1,12 @@ ;;; pgg.el --- glue for the various PGP implementations. -;; Copyright (C) 1999, 2000, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2000, 2002-2011 Free Software Foundation, Inc. ;; Author: Daiki Ueno <ueno@unixuser.org> ;; Symmetric encryption added by: Sascha Wilde <wilde@sha-bang.de> ;; Created: 1999/10/28 ;; Keywords: PGP +;; Obsolete-since: 24.1 ;; This file is part of GNU Emacs. @@ -23,11 +23,6 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. -;;; Commentary: - -;; This file is on its way to obsolescence, waiting for allout.el to -;; switch to EPG. - ;;; Code: (require 'pgg-def) diff --git a/lisp/obsolete/resume.el b/lisp/obsolete/resume.el index aa12ce32349..6b52ef28784 100644 --- a/lisp/obsolete/resume.el +++ b/lisp/obsolete/resume.el @@ -1,7 +1,6 @@ ;;; resume.el --- process command line args from within a suspended Emacs job -;; Copyright (C) 1992, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1992, 2001-2011 Free Software Foundation, Inc. ;; Author: Joe Wells <jbw@bucsf.bu.edu> ;; Adapted-By: ESR @@ -124,5 +123,4 @@ (provide 'resume) -;; arch-tag: c90b2761-4803-4e58-a0ae-c4721368b628 ;;; resume.el ends here diff --git a/lisp/obsolete/s-region.el b/lisp/obsolete/s-region.el index a88d1f37ee7..b06861c0efc 100644 --- a/lisp/obsolete/s-region.el +++ b/lisp/obsolete/s-region.el @@ -1,7 +1,6 @@ ;;; s-region.el --- set region using shift key -;; Copyright (C) 1994, 1995, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994-1995, 2001-2011 Free Software Foundation, Inc. ;; Author: Morten Welinder <terra@diku.dk> ;; Keywords: terminals @@ -121,5 +120,4 @@ to global keymap." (provide 's-region) -;; arch-tag: a471e912-18d7-4247-a29b-2100bca180ff ;;; s-region.el ends here diff --git a/lisp/obsolete/scribe.el b/lisp/obsolete/scribe.el index 568401b4650..3f543b38e44 100644 --- a/lisp/obsolete/scribe.el +++ b/lisp/obsolete/scribe.el @@ -1,7 +1,6 @@ ;;; scribe.el --- scribe mode, and its idiosyncratic commands -;; Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 2001-2011 Free Software Foundation, Inc. ;; Author: William Sommerfeld ;; (according to ack.texi) @@ -326,5 +325,4 @@ preceding text is of the form @Command." (provide 'scribe) -;; arch-tag: 64f454c4-7544-4ea2-9d14-f0b668f2cdc6 ;;; scribe.el ends here diff --git a/lisp/textmodes/spell.el b/lisp/obsolete/spell.el index dc4859ac53c..a97a6dce526 100644 --- a/lisp/textmodes/spell.el +++ b/lisp/obsolete/spell.el @@ -1,10 +1,10 @@ ;;; spell.el --- spelling correction interface for Emacs -;; Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: wp, unix +;; Obsolete-since: 23.1 ;; This file is part of GNU Emacs. @@ -146,27 +146,25 @@ for example, \"word\"." (defun spell-string (string) "Check spelling of string supplied as argument." (interactive "sSpell string: ") - (let ((buf (get-buffer-create " *temp*"))) - (with-current-buffer buf - (widen) - (erase-buffer) - (insert string "\n") - (if (string= "spell" spell-command) - (call-process-region (point-min) (point-max) "spell" - t t) - (call-process-region (point-min) (point-max) shell-file-name - t t nil "-c" spell-command)) - (if (= 0 (buffer-size)) - (message "%s is correct" string) - (goto-char (point-min)) - (while (search-forward "\n" nil t) - (replace-match " ")) - (message "%sincorrect" (buffer-substring 1 (point-max))))))) + (with-temp-buffer + (widen) + (erase-buffer) + (insert string "\n") + (if (string= "spell" spell-command) + (call-process-region (point-min) (point-max) "spell" + t t) + (call-process-region (point-min) (point-max) shell-file-name + t t nil "-c" spell-command)) + (if (= 0 (buffer-size)) + (message "%s is correct" string) + (goto-char (point-min)) + (while (search-forward "\n" nil t) + (replace-match " ")) + (message "%sincorrect" (buffer-substring 1 (point-max)))))) ;;;###autoload (make-obsolete 'spell-string "The `spell' package is obsolete - use `ispell'." "23.1") (provide 'spell) -;; arch-tag: 7eabb848-9c76-431a-bcdb-0e0592d2db04 ;;; spell.el ends here diff --git a/lisp/emacs-lisp/sregex.el b/lisp/obsolete/sregex.el index f5e3aac231c..d1c80a65672 100644 --- a/lisp/emacs-lisp/sregex.el +++ b/lisp/obsolete/sregex.el @@ -1,11 +1,11 @@ ;;; sregex.el --- symbolic regular expressions -;; Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-1998, 2000-2011 Free Software Foundation, Inc. ;; Author: Bob Glickstein <bobg+sregex@zanshin.com> ;; Maintainer: Bob Glickstein <bobg+sregex@zanshin.com> ;; Keywords: extensions +;; Obsolete-since: 24.1 ;; This file is part of GNU Emacs. @@ -604,5 +604,4 @@ has one of the following forms: (provide 'sregex) -;; arch-tag: 460c1f5a-eb6e-42ec-a451-ffac78bdf492 ;;; sregex.el ends here diff --git a/lisp/obsolete/swedish.el b/lisp/obsolete/swedish.el index 3cca9697588..4b82a74bce7 100644 --- a/lisp/obsolete/swedish.el +++ b/lisp/obsolete/swedish.el @@ -1,7 +1,6 @@ ;;; swedish.el --- miscellaneous functions for dealing with Swedish -;; Copyright (C) 1988, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1988, 2001-2011 Free Software Foundation, Inc. ;; Author: Howard Gayle ;; Maintainer: FSF @@ -159,5 +158,4 @@ Leaves point just after the word that looks Swedish." (provide 'swedish) -;; arch-tag: a117019d-acac-4ac4-8eac-0dbd49a41d32 ;;; swedish.el ends here diff --git a/lisp/obsolete/sym-comp.el b/lisp/obsolete/sym-comp.el index 90ce5b4f207..6365a1075e0 100644 --- a/lisp/obsolete/sym-comp.el +++ b/lisp/obsolete/sym-comp.el @@ -1,6 +1,6 @@ ;;; sym-comp.el --- mode-dependent symbol completion -;; Copyright (C) 2004, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2004, 2008-2011 Free Software Foundation, Inc. ;; Author: Dave Love <fx@gnu.org> ;; Keywords: extensions @@ -227,5 +227,4 @@ completion: (provide 'sym-comp) -;; arch-tag: 6fcce616-f3c4-4751-94b4-710e83144124 ;;; sym-comp.el ends here diff --git a/lisp/obsolete/vc-mcvs.el b/lisp/obsolete/vc-mcvs.el index 8027ee62933..06ce7f41c65 100644 --- a/lisp/obsolete/vc-mcvs.el +++ b/lisp/obsolete/vc-mcvs.el @@ -1,7 +1,6 @@ ;;; vc-mcvs.el --- VC backend for the Meta-CVS version-control system -;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2003-2011 Free Software Foundation, Inc. ;; Author: FSF (see vc.el for full credits) ;; Maintainer: None @@ -585,5 +584,4 @@ and that it passes `vc-mcvs-global-switches' to it before FLAGS." ;; ;; ********** READ THIS! ********** -;; arch-tag: a39c7c1c-5247-429d-88df-dd7187d2e704 ;;; vc-mcvs.el ends here diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index 2973ff4b579..b35cf0738bf 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog @@ -1,3 +1,13 @@ +2011-01-13 Stefan Monnier <monnier@iro.umontreal.ca> + + * org-remember.el (org-remember-mode): + * org-capture.el (org-capture-mode): Don't run hook redundantly. + +2011-01-09 Chong Yidong <cyd@stupidchicken.com> + + * org-faces.el (org-link): Inherit from link face. + Suggested by Joakim Verona. + 2010-12-11 Tassilo Horn <tassilo@member.fsf.org> * org-footnote.el (org-footnote-create-definition): Place @@ -175,6 +185,9 @@ * org-compat.el (org-floor*): New function. +2010-12-11 Carsten Dominik <carsten.dominik@gmail.com> + John Wiegley <jwiegley@gmail.com> + * org-complete.el: New file. 2010-12-11 Carsten Dominik <carsten.dominik@gmail.com> @@ -183,7 +196,7 @@ 2010-12-11 Matt Lundin <mdl@imapmail.org> - * org-agenda.el: (org-format-agenda-item) The value of + * org-agenda.el (org-format-agenda-item): The value of org-category is not converted to a string unless it is defined. 2010-12-11 Eric Schulte <schulte.eric@gmail.com> @@ -247,11 +260,6 @@ * org.el (org-auto-repeat-maybe): Use org-today. -2010-12-11 David Maus <dmaus@ictsoc.de> - - * test-org.el (test-org/org-link-escape-url-with-escaped-char): Add - test for escaping and unescaping url with already escaped char. - 2010-12-11 Carsten Dominik <carsten.dominik@gmail.com> * org-clock.el (org-day-of-week): New function. @@ -260,8 +268,8 @@ 2010-12-11 Sébastien Vauban <wxhgmqzgwmuf@spammotel.com> - * org.el (org-complete-tags-always-offer-all-agenda-tags): Fix - docstring. + * org.el (org-complete-tags-always-offer-all-agenda-tags): + Fix docstring. 2010-12-11 Julien Danjou <julien@danjou.info> @@ -277,10 +285,10 @@ 2010-12-11 Nicolas Goaziou <n.goaziou@gmail.com> - * org-latex.el (org-export-latex-lists): do not add an + * org-latex.el (org-export-latex-lists): Do not add an unnecessary newline character after a list. - * org-list.el (org-list-bottom-point-with-indent): ensure bottom + * org-list.el (org-list-bottom-point-with-indent): Ensure bottom point is just after a non blank line. 2010-12-11 Eric Schulte <schulte.eric@gmail.com> @@ -320,7 +328,7 @@ 2010-12-11 Eric Schulte <schulte.eric@gmail.com> - * ob-eval.el (org-babel-eval-wipe-error-buffer): Fixed compiler + * ob-eval.el (org-babel-eval-wipe-error-buffer): Fix compiler warning and added documentation string. 2010-12-11 Eric Schulte <schulte.eric@gmail.com> @@ -373,8 +381,8 @@ 2010-12-11 Eric Schulte <schulte.eric@gmail.com> - * ob-python.el (org-babel-python-table-or-string): Using - `org-babel-script-escape' for reading string input from scripting + * ob-python.el (org-babel-python-table-or-string): + Using `org-babel-script-escape' for reading string input from scripting languages. 2010-12-11 Achim Gratz <Stromeko@nexgo.de> (tiny change) @@ -383,29 +391,11 @@ with-no-warnings. (with-silent-modifications) Declare macro for Emacs < 23.2. -2010-12-11 David Maus <dmaus@ictsoc.de> - - * org-test.el (org-test-current-file): New function. Run all tests - for current file. - 2010-12-11 Eric Schulte <schulte.eric@gmail.com> - * ob.el (org-babel-parse-header-arguments): Removed addition of + * ob.el (org-babel-parse-header-arguments): Remove addition of ":" to singleton first header arguments as it was leading to errors. -2010-12-11 David Maus <dmaus@ictsoc.de> - - * test-org.el (test-org/org-link-escape-ascii-character) - (test-org/org-link-escape-ascii-ctrl-character) - (test-org/org-link-escape-multibyte-character) - (test-org/org-link-escape-custom-table) - (test-org/org-link-escape-custom-table-merge) - (test-org/org-link-unescape-ascii-character) - (test-org/org-link-unescape-ascii-ctrl-character) - (test-org/org-link-unescape-multibyte-character) - (test-org/org-link-unescape-ascii-extended-char): New tests for - unicode aware percent escaping. - 2010-12-11 Carsten Dominik <carsten.dominik@gmail.com> * org-latex.el (org-export-latex-make-header): Run the title through @@ -434,7 +424,7 @@ 2010-12-11 Achim Gratz <Stromeko@Stromeko.DE> (tiny change) - * org-clock.el (org-get-clocktable): previous patch incorrectly + * org-clock.el (org-get-clocktable): Previous patch incorrectly required whitespace in front of #+BEGIN: and #+END: 2010-12-11 Dan Davison <dandavison7@gmail.com> @@ -444,12 +434,12 @@ 2010-12-11 Nicolas Goaziou <n.goaziou@gmail.com> - * org-list.el (org-cycle-list-bullet): ensure point is at bol before + * org-list.el (org-cycle-list-bullet): Ensure point is at bol before checking item indentation. 2010-12-11 Eric Schulte <schulte.eric@gmail.com> - * ob.el (org-babel-map-src-blocks): Moved to earlier in the file + * ob.el (org-babel-map-src-blocks): Move to earlier in the file and now autoloading. 2010-12-11 Eric Schulte <schulte.eric@gmail.com> @@ -527,7 +517,7 @@ 2010-12-11 Noorul Islam <noorul@noorul.com> * org-latex.el (org-export-latex-hyperref-format): New option. - (org-export-latex-href-format): Renamed the existing variable + (org-export-latex-href-format): Rename the existing variable `org-export-latex-hyperref-format' as `org-export-latex-href-format' (org-export-latex-links): Use `org-export-latex-hyperref-format' and `org-export-latex-href-format' @@ -578,7 +568,7 @@ 2010-12-11 Dan Davison <dandavison7@gmail.com> - * org-exp.el: (org-export-format-source-code-or-example): + * org-exp.el (org-export-format-source-code-or-example): Remove hard-wired configuration of minted export (org-export-latex-minted-with-line-numbers): Remove variable @@ -616,8 +606,7 @@ 2010-12-11 Julien Danjou <julien@danjou.info> - * list/org-agenda.el (org-agenda-category-icon-alist): Fix defcustom - type. + * org-agenda.el (org-agenda-category-icon-alist): Fix defcustom type. 2010-12-11 Nicolas Goaziou <n.goaziou@gmail.com> @@ -661,18 +650,13 @@ * org-id.el (org-id-store-link): Test for org-mode before checking for IDs. -2010-12-11 David Maus <dmaus@ictsoc.de> - - * org-test.el (org-test-current-defun): `which-function' does not - return a list, but the name of the function. - 2010-12-11 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-shorten-string): New function. * org-exp.el (org-export-convert-protected-spaces): New function. - (org-export-preprocess-string): Call - `org-export-convert-protected-spaces' to handle new hard spaces. + (org-export-preprocess-string): + Call `org-export-convert-protected-spaces' to handle new hard spaces. 2010-12-11 David Maus <dmaus@ictsoc.de> @@ -752,8 +736,8 @@ 2010-11-11 Dan Davison <davison@stats.ox.ac.uk> - * org-exp.el (org-export-format-source-code-or-example): Use - minted for latex source code export if `org-export-latex-listings' + * org-exp.el (org-export-format-source-code-or-example): + Use minted for latex source code export if `org-export-latex-listings' has the value 'minted * org-latex.el (org-export-latex-listings): Document special value @@ -768,8 +752,8 @@ 2010-11-11 Eric Schulte <schulte.eric@gmail.com> - * ob-gnuplot.el (org-babel-variable-assignments:gnuplot): Fixed - bug in gnuplot data file assignment using user variables. + * ob-gnuplot.el (org-babel-variable-assignments:gnuplot): + Fix bug in gnuplot data file assignment using user variables. 2010-11-11 Eric Schulte <schulte.eric@gmail.com> @@ -813,7 +797,7 @@ 2010-11-11 Eric Schulte <schulte.eric@gmail.com> - * ob-clojure.el (org-babel-clojure-babel-clojure-cmd): Fixed error + * ob-clojure.el (org-babel-clojure-babel-clojure-cmd): Fix error message when clojure binary is not found. 2010-11-11 Carsten Dominik <carsten.dominik@gmail.com> @@ -843,8 +827,8 @@ 2010-11-11 David Maus <dmaus@ictsoc.de> - * ob-haskell.el (org-babel-variable-assignments:haskell): Don't - pass more than two arguments to mapc. + * ob-haskell.el (org-babel-variable-assignments:haskell): + Don't pass more than two arguments to mapc. 2010-11-11 David Maus <dmaus@ictsoc.de> @@ -931,17 +915,17 @@ 2010-11-11 Carsten Dominik <carsten.dominik@gmail.com> - * org-indent.el: (org-indent-add-properties): Use - `with-silent-modificaitons'. - (org-indent-remove-properties): Use `with-silent-modificaitons'. + * org-indent.el (org-indent-add-properties): + Use `with-silent-modificatons'. + (org-indent-remove-properties): Use `with-silent-modificatons'. 2010-11-11 Carsten Dominik <carsten.dominik@gmail.com> * org-table.el (org-table-cookie-line-p): Fix indentation. * org-exp.el (org-store-forced-table-alignment): New function. - (org-export-preprocess-string): Call - `org-store-forced-table-alignment'. + (org-export-preprocess-string): + Call `org-store-forced-table-alignment'. * org-html.el (org-format-org-table-html): Use stored alignment information. @@ -953,7 +937,7 @@ 2010-11-11 Eric Schulte <schulte.eric@gmail.com> - * ob.el (org-babel-execute-src-block): Removed needless param + * ob.el (org-babel-execute-src-block): Remove needless param sorting from ob-execute-src-block, the params are sorted already by ob-sha1-hash. @@ -995,7 +979,7 @@ 2010-11-11 Eric Schulte <schulte.eric@gmail.com> - * ob.el (org-babel-map-src-blocks): Fixed minor bug in and + * ob.el (org-babel-map-src-blocks): Fix minor bug in and improved efficiency of org-babel-map-src-blocks. 2010-11-11 Eric Schulte <schulte.eric@gmail.com> @@ -1314,7 +1298,7 @@ 2010-11-11 Eric Schulte <schulte.eric@gmail.com> - * ob.el (org-babel-merge-params): Fixed order or precedence for + * ob.el (org-babel-merge-params): Fix order or precedence for variables. 2010-11-11 Eric Schulte <schulte.eric@gmail.com> @@ -1498,16 +1482,16 @@ 2010-11-11 Eric Schulte <schulte.eric@gmail.com> - * ob-emacs-lisp.el (org-babel-expand-body:emacs-lisp): Whitespace - (org-babel-execute:emacs-lisp): Whitespace. + * ob-emacs-lisp.el (org-babel-expand-body:emacs-lisp): + Whitespace (org-babel-execute:emacs-lisp): Whitespace. 2010-11-11 Dan Davison <davison@stats.ox.ac.uk> * ob-sh.el (org-babel-sh-variable-assignments): Provide missing docstring - * ob-python.el (org-babel-python-variable-assignments): Provide - missing docstring. + * ob-python.el (org-babel-python-variable-assignments): + Provide missing docstring. 2010-11-11 Dan Davison <davison@stats.ox.ac.uk> @@ -1555,9 +1539,8 @@ 2010-11-11 Eric Schulte <schulte.eric@gmail.com> - * ob.el (org-number-sequence): Declared - - * ob-R.el (org-number-sequence): Declared. + * ob.el (org-number-sequence): + Declared * ob-R.el (org-number-sequence): Declared. 2010-11-11 Dan Davison <davison@stats.ox.ac.uk> @@ -1575,8 +1558,8 @@ * ob-R.el (org-babel-expand-body:R): Use `org-number-sequence'. - * ob.el (org-babel-where-is-src-block-result): Use - `org-number-sequence'. + * ob.el (org-babel-where-is-src-block-result): + Use `org-number-sequence'. (org-babel-current-buffer-properties): Fix variable definition. * ob-ref.el (org-babel-ref-index-list): Use `org-number-sequence'. @@ -1596,8 +1579,8 @@ * org.el (org-agenda-jump-prefer-future): New option. - * org-agenda.el (org-agenda-goto-date): Use - `org-agenda-jump-prefer-future'. + * org-agenda.el (org-agenda-goto-date): + Use `org-agenda-jump-prefer-future'. 2010-11-11 Noorul Islam <noorul@noorul.com> @@ -1721,18 +1704,18 @@ 2010-11-11 Dan Davison <davison@stats.ox.ac.uk> - * org-exp.el (org-export-latex-minted-with-line-numbers): Ensure - that variable is declared. + * org-exp.el (org-export-latex-minted-with-line-numbers): + Ensure that variable is declared. 2010-11-11 Eric Schulte <schulte.eric@gmail.com> - * ob-python.el (org-src-preserve-indentation): Fixed compiler + * ob-python.el (org-src-preserve-indentation): Fix compiler warning. 2010-11-11 Dan Davison <davison@stats.ox.ac.uk> - * org-exp.el (org-export-format-source-code-or-example): Latex - formatting of source code blocks using the minted package + * org-exp.el (org-export-format-source-code-or-example): + Latex formatting of source code blocks using the minted package (org-export-plist-vars): Add :latex-minted property (org-export-latex-minted): Ensure variable is defined (org-export-latex-minted-langs): Ensure variable is defined. @@ -1762,8 +1745,8 @@ 2010-11-11 Carsten Dominik <carsten.dominik@gmail.com> - * org-beamer.el (org-beamer-place-default-actions-for-lists): Fix - typo in regexp. + * org-beamer.el (org-beamer-place-default-actions-for-lists): + Fix typo in regexp. 2010-11-11 Nicolas Goaziou <n.goaziou@gmail.com> @@ -1772,8 +1755,8 @@ 2010-11-11 David Maus <dmaus@ictsoc.de> - * org-gnus.el (org-gnus-nnimap-query-article-no-from-file): Query - article number from file is nil by default. + * org-gnus.el (org-gnus-nnimap-query-article-no-from-file): + Query article number from file is nil by default. 2010-11-11 Stephen Eglen <S.J.Eglen@damtp.cam.ac.uk> @@ -1800,8 +1783,8 @@ 2010-11-11 Carsten Dominik <carsten.dominik@gmail.com> - * org-mobile.el (org-mobile-force-id-on-agenda-items): Fix - docstring. + * org-mobile.el (org-mobile-force-id-on-agenda-items): + Fix docstring. (org-mobile-write-agenda-for-mobile): Use outline path if we do not have an ID and are not allowed to make one. (org-mobile-get-outline-path-link): New function. @@ -1816,7 +1799,7 @@ 2010-11-11 Eric Schulte <schulte.eric@gmail.com> - * ob.el (org-babel-number-p): Fixed documentation string. + * ob.el (org-babel-number-p): Fix documentation string. 2010-11-11 Eric Schulte <schulte.eric@gmail.com> @@ -1826,7 +1809,7 @@ 2010-11-11 Eric Schulte <schulte.eric@gmail.com> - * ob-exp.el (org-babel-exp-src-blocks): Fixed export when headings + * ob-exp.el (org-babel-exp-src-blocks): Fix export when headings have links, with tests. 2010-11-11 Carsten Dominik <carsten.dominik@gmail.com> @@ -1949,7 +1932,7 @@ 2010-11-11 Eric Schulte <schulte.eric@gmail.com> - * ob.el (org-babel-confirm-evaluate): Fixed bug causing extra + * ob.el (org-babel-confirm-evaluate): Fix bug causing extra prompt in ob-confirm-evaluate in some cases. 2010-11-11 Eric Schulte <schulte.eric@gmail.com> @@ -1977,8 +1960,8 @@ 2010-11-11 Carsten Dominik <carsten.dominik@gmail.com> - * org-mobile.el (org-mobile-encryption-password): Improve - docstring. + * org-mobile.el (org-mobile-encryption-password): + Improve docstring. (org-mobile-encryption-password-session): New variable. (org-mobile-encryption-password): New function. (org-mobile-check-setup): @@ -1992,7 +1975,7 @@ 2010-11-11 Jambunathan K <kjambunathan@gmail.com> - * org.el (org-speed-command-hook): Added org-speed-command-hook + * org.el (org-speed-command-hook): Add org-speed-command-hook (org-babel-speed-command-hook): Hook for Babel's speed commands. 2010-11-11 Dan Davison <davison@stats.ox.ac.uk> @@ -2131,13 +2114,13 @@ 2010-11-11 Dan Davison <davison@stats.ox.ac.uk> - * org-src.el (org-src-strip-leading-and-trailing-blank-lines): New - variable allowing prevention of automatic stripping of leading and + * org-src.el (org-src-strip-leading-and-trailing-blank-lines): + New variable allowing prevention of automatic stripping of leading and trailing blank lines when exiting edit buffer. (org-edit-src-exit): Respect value of `org-src-strip-leading-and-trailing-blank-lines' - (org-src-native-tab-command-maybe): Bind - `org-src-strip-leading-and-trailing-blank-lines' to nil during + (org-src-native-tab-command-maybe): + Bind `org-src-strip-leading-and-trailing-blank-lines' to nil during this function. 2010-11-11 Dan Davison <davison@stats.ox.ac.uk> @@ -2256,8 +2239,8 @@ 2010-11-11 Carsten Dominik <carsten.dominik@gmail.com> * org-latex.el (org-export-latex-tag-markup): New option. - (org-export-latex-keywords-maybe): Use - `org-export-latex-tag-markup'. + (org-export-latex-keywords-maybe): + Use `org-export-latex-tag-markup'. 2010-11-11 Rémi Vanicat <vanicat@debian.org> @@ -2288,8 +2271,8 @@ 2010-11-11 aaa bbb <dominik@powerbook-g4-12-van-aaa-bbb.local> - * org-archive.el (org-get-local-archive-location): Use - `org-carchive-location' as default. + * org-archive.el (org-get-local-archive-location): + Use `org-carchive-location' as default. 2010-11-11 Eric Schulte <schulte.eric@gmail.com> @@ -2326,8 +2309,8 @@ 2010-11-11 David Maus <dmaus@ictsoc.de> - * org-gnus.el (org-gnus-nnimap-query-article-no-from-file): New - customization variable. + * org-gnus.el (org-gnus-nnimap-query-article-no-from-file): + New customization variable. (org-gnus-nnimap-cached-article-number): New function. (org-gnus-follow-link): Try to fetch cached article number of message-id. @@ -2350,8 +2333,8 @@ 2010-11-11 Dan Davison <davison@stats.ox.ac.uk> - * ob.el (org-babel-do-in-edit-buffer): Use - `org-babel-where-is-src-block-head' to test for source block at + * ob.el (org-babel-do-in-edit-buffer): + Use `org-babel-where-is-src-block-head' to test for source block at point. 2010-11-11 Eric Schulte <schulte.eric@gmail.com> @@ -2439,8 +2422,8 @@ 2010-11-11 Eric Schulte <schulte.eric@gmail.com> - * ob-tangle.el (org-babel-tangle-comment-format-beg): Format - string specifying the link-comment preceding a code block + * ob-tangle.el (org-babel-tangle-comment-format-beg): + Format string specifying the link-comment preceding a code block (org-babel-tangle-comment-format-end): Format string specifying the link-comment following a code block (org-babel-tangle-collect-blocks): Storing more information in the @@ -2537,7 +2520,7 @@ 2010-11-11 Eric Schulte <schulte.eric@gmail.com> - * ob-ruby.el (org-babel-expand-body:ruby): Removed requirement of + * ob-ruby.el (org-babel-expand-body:ruby): Remove requirement of inf-ruby. 2010-11-11 Noorul Islam <noorul@noorul.com> (tiny change) @@ -2636,7 +2619,7 @@ 2010-11-11 Nicolas Goaziou <n.goaziou@gmail.com> - * org-docbook.el (org-export-as-docbook): Removed check for + * org-docbook.el (org-export-as-docbook): Remove check for indentation on lines that do not start with a list bullet. * org-html.el (org-export-as-html): Same thing. @@ -2654,7 +2637,7 @@ 2010-11-11 Nicolas Goaziou <n.goaziou@gmail.com> - * org-list.el (org-list-struct-indent): Added code to replace + * org-list.el (org-list-struct-indent): Add code to replace bullets if needed when indenting. 2010-11-11 Nicolas Goaziou <n.goaziou@gmail.com> @@ -2704,7 +2687,7 @@ 2010-11-11 Nicolas Goaziou <n.goaziou@gmail.com> - * org-list.el (org-indent-item-tree): Removed region code. It was + * org-list.el (org-indent-item-tree): Remove region code. It was prone to errors and undocumented. * org-list.el (org-item-indent-positions): Better heuristics to @@ -2725,7 +2708,7 @@ 2010-11-11 Nicolas Goaziou <n.goaziou@gmail.com> - * org-list.el (org-indent-item-tree): Removed unnecessary bullets + * org-list.el (org-indent-item-tree): Remove unnecessary bullets fix, and improved heuristics to determine bullet when indenting. * org-list.el (org-item-indent-positions): Function now returns @@ -2784,8 +2767,8 @@ * org-list.el (org-list-insert-item-generic): Insert the right bullet, with help of `org-list-bullet-string'. - * org-list.el (org-indent-item-tree): Use - `org-list-bullet-string'. + * org-list.el (org-indent-item-tree): + Use `org-list-bullet-string'. * org-list.el (org-fix-bullet-type): Use `org-list-bullet-string'. @@ -2832,8 +2815,8 @@ 2010-11-11 Nicolas Goaziou <n.goaziou@gmail.com> - * org-list.el (org-cycle-list-bullet): Check - `org-plain-list-ordered-item-terminator' before allowing 1. or 1) + * org-list.el (org-cycle-list-bullet): + Check `org-plain-list-ordered-item-terminator' before allowing 1. or 1) as valid bullets when cycling. 2010-11-11 Nicolas Goaziou <n.goaziou@gmail.com> @@ -2860,7 +2843,7 @@ 2010-11-11 Nicolas Goaziou <n.goaziou@gmail.com> - * org-list.el (org-maybe-renumber-ordered-list): Removed call for + * org-list.el (org-maybe-renumber-ordered-list): Remove call for `org-fix-bullet-type' to prevent infinite loop, and some checks already done in `org-renumber-ordered-list'. @@ -2881,8 +2864,8 @@ 2010-11-11 Nicolas Goaziou <n.goaziou@gmail.com> - * org-capture.el (org-capture-place-item): Use - `org-search-forward-unenclosed' and + * org-capture.el (org-capture-place-item): + Use `org-search-forward-unenclosed' and `org-search-backward-unenclosed' and new variable `org-item-beginning-re'. @@ -2902,10 +2885,10 @@ * org-list.el (org-list-make-subtree): Add protection when used outside of list - * org-list.el (org-insert-item): Removed useless hack now + * org-list.el (org-insert-item): Remove useless hack now `org-in-item-p' is fixed. - * org-timer.el (org-timer-item): Removed useless hack now + * org-timer.el (org-timer-item): Remove useless hack now `org-in-item-p' is fixed. 2010-11-11 Nicolas Goaziou <n.goaziou@gmail.com> @@ -2959,8 +2942,8 @@ * org-list.el (org-search-forward-unenclosed): Can send errors now. Removed useless usage of COUNT. - * org-list.el (org-update-checkbox-count): Use - `org-search-forward-unenclosed' and + * org-list.el (org-update-checkbox-count): + Use `org-search-forward-unenclosed' and `org-search-backward-unenclosed' instead of `re-search-forward' and `re-search-backward'. @@ -2968,8 +2951,8 @@ and `org-search-backward-unenclosed' instead of `re-search-forward' and `re-search-backward'. - * org-list.el (org-list-make-subtree): Use - `org-search-forward-unenclosed' and + * org-list.el (org-list-make-subtree): + Use `org-search-forward-unenclosed' and `org-search-backward-unenclosed' instead of `re-search-forward' and `re-search-backward'. @@ -2983,7 +2966,7 @@ * org-timer.el (org-timer-item): Refactoring. Compute timer string before inserting it in the buffer - * org-timer.el (org-timer): Added an optional argument to return + * org-timer.el (org-timer): Add an optional argument to return timer string instead of inserting it. 2010-11-11 Nicolas Goaziou <n.goaziou@gmail.com> @@ -3192,8 +3175,8 @@ 2010-11-11 Nicolas Goaziou <n.goaziou@gmail.com> - * org-html.el (org-export-html-preprocess): Replace - `org-list-end-re' by a blank line during pre-process. + * org-html.el (org-export-html-preprocess): + Replace `org-list-end-re' by a blank line during pre-process. 2010-11-11 Nicolas Goaziou <n.goaziou@gmail.com> @@ -3292,8 +3275,8 @@ 2010-11-11 Carsten Dominik <carsten.dominik@gmail.com> - * org-exp.el (org-export-concatenate-multiline-emphasis): Ignore - matches that start in a headline. + * org-exp.el (org-export-concatenate-multiline-emphasis): + Ignore matches that start in a headline. 2010-11-11 Eric Schulte <schulte.eric@gmail.com> @@ -3320,17 +3303,16 @@ 2010-11-11 Eric Schulte <schulte.eric@gmail.com> - * ob-R.el (ess-make-buffer-current): Declared - (ess-ask-for-ess-directory): Declared - (ess-local-process-name): Declared - - * ob-latex.el (org-babel-latex-tex-to-pdf): Capturing free + * ob-R.el (ess-make-buffer-current): + Declared (ess-ask-for-ess-directory): + Declared (ess-local-process-name): + Declared * ob-latex.el (org-babel-latex-tex-to-pdf): Capturing free variable * ob.el (org-edit-src-code): Fixing arguments - (org-edit-src-exit): Declared - (org-outline-overlay-data): Declared - (org-set-outline-overlay-data): Declared. + (org-edit-src-exit): + Declared (org-outline-overlay-data): + Declared (org-set-outline-overlay-data): Declared. 2010-11-11 Glenn Morris <rgm@gnu.org> @@ -3358,7 +3340,7 @@ 2010-11-11 Eric Schulte <schulte.eric@gmail.com> - * ob.el (org-babel-remove-temporary-directory): Removed explicit + * ob.el (org-babel-remove-temporary-directory): Remove explicit second argument. 2010-11-11 Magnus Henoch <magnus.henoch@gmail.com> (tiny change) @@ -3368,7 +3350,7 @@ 2010-11-11 Eric Schulte <schulte.eric@gmail.com> - * org-macs.el (org-save-outline-visibility): Moved from org.el. + * org-macs.el (org-save-outline-visibility): Move from org.el. 2010-11-11 Eric Schulte <schulte.eric@gmail.com> @@ -3471,11 +3453,11 @@ 2010-11-11 Carsten Dominik <carsten.dominik@gmail.com> - * org-latex.el (org-export-latex-set-initial-vars): Bind - `case-fold-search' to t around the search for special LaTeX setup. + * org-latex.el (org-export-latex-set-initial-vars): + Bind `case-fold-search' to t around the search for special LaTeX setup. - * org-beamer.el (org-beamer-after-initial-vars): Bind - `case-fold-search' to t around the search for special BEAMER + * org-beamer.el (org-beamer-after-initial-vars): + Bind `case-fold-search' to t around the search for special BEAMER setup. 2010-11-11 David Maus <dmaus@ictsoc.de> @@ -3533,8 +3515,8 @@ * org-feed.el (xml-substitute-special): Declare function for byte compiler. (org-feed-unescape): Removed. - (org-feed-parse-rss-entry, org-feed-parse-atom-entry): Use - `xml-substitute-special' to unescape XML entities. + (org-feed-parse-rss-entry, org-feed-parse-atom-entry): + Use `xml-substitute-special' to unescape XML entities. 2010-11-11 Dan Davison <davison@stats.ox.ac.uk> @@ -3635,10 +3617,10 @@ 2010-11-11 Carsten Dominik <carsten.dominik@gmail.com> - * org-agenda.el (org-agenda-before-sorting-filter-function): New - hook function. - (org-finalize-agenda-entries): Apply - `org-agenda-before-sorting-filter-function'. + * org-agenda.el (org-agenda-before-sorting-filter-function): + New hook function. + (org-finalize-agenda-entries): + Apply `org-agenda-before-sorting-filter-function'. 2010-11-11 Carsten Dominik <carsten.dominik@gmail.com> @@ -3683,8 +3665,8 @@ * org.el (org-preview-latex-fragment): Call `org-format-latex' with the additional processing argument. (org-export-have-math): New variable, for dynamic scoping. - (org-format-latex): Implement specific ways of processing. New - function argument for processing type. + (org-format-latex): Implement specific ways of processing. + New function argument for processing type. (org-org-menu): Remove the entry to configure LaTeX snippet processing. @@ -3797,13 +3779,13 @@ 2010-11-11 Dan Davison <davison@stats.ox.ac.uk> - * ob-octave.el (org-babel-octave-evaluate-external-process): Allow - remote files. + * ob-octave.el (org-babel-octave-evaluate-external-process): + Allow remote files. 2010-11-11 Juan Pechiar <pechiar@computer.org> - * ob-octave.el (org-babel-octave-evaluate-external-process): Use - `org-babel-octave-import-elisp-from-file' instead of + * ob-octave.el (org-babel-octave-evaluate-external-process): + Use `org-babel-octave-import-elisp-from-file' instead of `org-babel-eval-read-file'. (org-babel-octave-var-to-octave): Separate matrix rows with ';', and use '%s' as format specifier instead of '%S'. @@ -3831,12 +3813,12 @@ * org-latex.el (org-export-latex-tables): Add label if any - * org-latex.el (org-export-latex-convert-table.el-table): Fix - little mistake when inserting label. + * org-latex.el (org-export-latex-convert-table.el-table): + Fix little mistake when inserting label. 2010-11-11 Nicolas Goaziou <n.goaziou@gmail.com> - * org.el (org-cycle-internal-local): Removed an unnecessary call + * org.el (org-cycle-internal-local): Remove an unnecessary call to `org-back-to-heading' that was preventing point to stay at its column when cycling visibility. @@ -3895,7 +3877,7 @@ 2010-11-11 Eric Schulte <schulte.eric@gmail.com> - * ob-lob.el (org-babel-lob-one-liner-regexp): Fixed error in lob + * ob-lob.el (org-babel-lob-one-liner-regexp): Fix error in lob regexp -- it wasn't matching lob lines w/o indices. 2010-11-11 Eric Schulte <schulte.eric@gmail.com> @@ -3931,13 +3913,13 @@ 2010-11-11 Eric Schulte <schulte.eric@gmail.com> - * org-exp.el (org-export-format-source-code-or-example): Escape - underscores in code block names on latex listings export. + * org-exp.el (org-export-format-source-code-or-example): + Escape underscores in code block names on latex listings export. 2010-11-11 Eric Schulte <schulte.eric@gmail.com> - * ob-tangle.el (org-babel-with-temp-filebuffer): Use - find-file-noselect to avoid excess buffer movement. + * ob-tangle.el (org-babel-with-temp-filebuffer): + Use find-file-noselect to avoid excess buffer movement. 2010-11-11 Carsten Dominik <carsten.dominik@gmail.com> @@ -4256,11 +4238,11 @@ 2010-07-19 Carsten Dominik <carsten.dominik@gmail.com> - * org-capture.el (org-capture-set-target-location): Store - exact positions for file+regexp and file+function targets. + * org-capture.el (org-capture-set-target-location): + Store exact positions for file+regexp and file+function targets. (org-capture-place-entry, org-capture-place-item) - (org-capture-place-table-line, org-capture-place-plain-text): Respect - exact positions. + (org-capture-place-table-line, org-capture-place-plain-text): + Respect exact positions. (org-capture-finalize): Make sure we are at the beginning of a line when fixing the empty lines after the entry. @@ -4281,21 +4263,21 @@ 2010-07-19 Eric Schulte <schulte.eric@gmail.com> - * org-exp.el (org-export-attach-captions-and-attributes): Add - a shortname attribute to caption strings under the symbol name + * org-exp.el (org-export-attach-captions-and-attributes): + Add a shortname attribute to caption strings under the symbol name org-caption-shortn. 2010-07-19 Carsten Dominik <carsten.dominik@gmail.com> - * org.el (org-switchb): Rename from `org-iswitchb'. Improve - docstring. + * org.el (org-switchb): Rename from `org-iswitchb'. + Improve docstring. (org-iswitchb): New alias. (org-ido-switchb): Make alias point to `org-switchb'. 2010-07-19 Carsten Dominik <carsten.dominik@gmail.com> - * org-capture.el (org-capture-fill-template): Respect - time-of-day preference in template prompt. + * org-capture.el (org-capture-fill-template): + Respect time-of-day preference in template prompt. 2010-07-19 David Maus <dmaus@ictsoc.de> @@ -4310,8 +4292,8 @@ 2010-07-19 Carsten Dominik <carsten.dominik@gmail.com> - * org-capture.el (org-capture-set-target-location): Fix - file+function interpretation. + * org-capture.el (org-capture-set-target-location): + Fix file+function interpretation. 2010-07-19 David Maus <dmaus@ictsoc.de> @@ -4325,8 +4307,8 @@ 2010-07-19 David Maus <dmaus@ictsoc.de> - * org-feed.el (org-feed-unescape): New function. Unescape - protected entities. + * org-feed.el (org-feed-unescape): New function. + Unescape protected entities. (org-feed-parse-atom-entry): Use function for atom:content type text and html. @@ -4347,8 +4329,8 @@ 2010-07-19 Carsten Dominik <carsten.dominik@gmail.com> - * org-publish.el (org-publish-initialize-cache): Make - timestamp directory, the entire path to it. + * org-publish.el (org-publish-initialize-cache): + Make timestamp directory, the entire path to it. 2010-07-19 Carsten Dominik <carsten.dominik@gmail.com> @@ -4403,15 +4385,15 @@ (org-capture-bookmark-last-stored-position): New functions. (org-capture-place-table-line): Better error catching. (org-capture-place-item, org-capture-place-entry) - (org-capture-place-plain-text): Call - `org-capture-position-for-last-stored'. + (org-capture-place-plain-text): + Call `org-capture-position-for-last-stored'. (org-capture-finalize): Just call `org-capture-bookmark-last-stored-position'. 2010-07-19 Eric Schulte <schulte.eric@gmail.com> - * org-exp.el (org-export-mark-blockquote-verse-center): Fix - small bug, now grabbing match data before overwritten by looking-at + * org-exp.el (org-export-mark-blockquote-verse-center): + Fix small bug, now grabbing match data before overwritten by looking-at this fixes a problem with remainders of #+end_quote lines appearing in exported output. @@ -4584,8 +4566,8 @@ 2010-07-19 Eric Schulte <schulte.eric@gmail.com> - * org-exp-blocks.el (org-export-blocks-postblock-hook): Add - documentation to and turn into a defcustom. + * org-exp-blocks.el (org-export-blocks-postblock-hook): + Add documentation to and turn into a defcustom. 2010-07-19 Eric Schulte <schulte.eric@gmail.com> @@ -4674,8 +4656,8 @@ 2010-07-19 John Wiegley <jwiegley@gmail.com> - * org-clock.el (org-clock-clock-in, org-clock-in): Add - parameter `start-time'. + * org-clock.el (org-clock-clock-in, org-clock-in): + Add parameter `start-time'. (org-clock-resolve-clock): Add parameter `clock-out-time'. If set, and resolve-to is a past time, then the clock out event occurs at `clock-out-time' rather than at `resolve-to'. @@ -4720,8 +4702,8 @@ * org-docbook.el (org-export-docbook-xslt-stylesheet): New option. (org-export-docbook-xslt-proc-command): Fix docstring. (org-export-docbook-xsl-fo-proc-command): Fix docstring. - (org-export-as-docbook-pdf): Improve - formatting of the xslt command. + (org-export-as-docbook-pdf): + Improve formatting of the xslt command. * org-exp.el (org-infile-export-plist): Check for XSLT setting. @@ -4730,8 +4712,8 @@ 2010-07-19 Carsten Dominik <carsten.dominik@gmail.com> - * org-docbook.el (org-export-as-docbook-pdf): Improve - formatting of the xslt command. + * org-docbook.el (org-export-as-docbook-pdf): + Improve formatting of the xslt command. 2010-07-19 Sebastian Rose <sebastian_rose@gmx.de> @@ -4748,8 +4730,8 @@ 2010-07-19 Carsten Dominik <carsten.dominik@gmail.com> - * org.el (org-beginning-of-defun, org-end-of-defun): New - functions. + * org.el (org-beginning-of-defun, org-end-of-defun): + New functions. (org-mode): Install the `org-beginning-of-defun' and `org-end-of-defun' functions. (org-pretty-entities): New option. @@ -4806,8 +4788,8 @@ * org.el (org-mode): Fix comment syntax settings. - * org-src.el (org-edit-src-allow-write-back-p): Define - variable. + * org-src.el (org-edit-src-allow-write-back-p): + Define variable. * org.el (org-inline-image-overlays): New variable. (org-toggle-inline-images, org-display-inline-images) @@ -4816,8 +4798,8 @@ 2010-07-19 David Maus <dmaus@ictsoc.de> - * org-wl.el (org-wl-message-field): New function. Return - content of header field in message entity. + * org-wl.el (org-wl-message-field): New function. + Return content of header field in message entity. (org-wl-store-link): Call `org-wl-store-link-folder' or `org-wl-store-link-message' depending on major-mode. (org-wl-store-link-folder): New function. Store link to @@ -4866,8 +4848,8 @@ 2010-07-19 Carsten Dominik <carsten.dominik@gmail.com> - * org-latex.el (org-export-latex-treat-sub-super-char): Make - sure parenthesis matching is consistent. + * org-latex.el (org-export-latex-treat-sub-super-char): + Make sure parenthesis matching is consistent. * org-table.el (org-table-colgroup-line-p) (org-table-cookie-line-p): New functions. @@ -4887,8 +4869,8 @@ * org-list.el (org-end-of-item-text-before-children): Also do the right thing at the end of a file. - * org.el (org-set-packages-alist, org-get-packages-alist): New - function. + * org.el (org-set-packages-alist, org-get-packages-alist): + New function. (org-export-latex-default-packages-alist) (org-export-latex-packages-alist): Add extra flag to each package, indicating if it should be used for snippets. @@ -4927,8 +4909,8 @@ * org-clock.el (org-clock-cancel, org-clock-out): Make sure the modeline display is removed. - * org-exp.el (org-export-format-drawer-function): Fix - docstring. + * org-exp.el (org-export-format-drawer-function): + Fix docstring. * org-agenda.el (org-agenda-refile): New optional argument NO-UPDATE. @@ -4944,21 +4926,21 @@ * org-ascii.el (org-export-ascii-preprocess): Make table mapping quiet. - * org-html.el (org-export-as-html, org-html-level-start): Change - XHTML IDs to not use dots. + * org-html.el (org-export-as-html, org-html-level-start): + Change XHTML IDs to not use dots. - * org-exp.el (org-export-define-heading-targets): Change - XHTML IDs to not use dots. + * org-exp.el (org-export-define-heading-targets): + Change XHTML IDs to not use dots. - * org-docbook.el (org-export-docbook-level-start): Change - XHTML IDs to not use dots. + * org-docbook.el (org-export-docbook-level-start): + Change XHTML IDs to not use dots. * org-latex.el (org-export-as-latex): Make sure that the result buffer is in latex-mode. * org.el (org-shiftup-final-hook, org-shiftdown-final-hook) - (org-shiftleft-final-hook, org-shiftright-final-hook): New - hooks. + (org-shiftleft-final-hook, org-shiftright-final-hook): + New hooks. 2010-07-19 Carsten Dominik <carsten.dominik@gmail.com> @@ -5011,8 +4993,8 @@ * org-publish.el (org-publish-project-alist): Update docstring. (org-publish-file-title-cache): New variable. - (org-publish-initialize-files-alist): Initialize - `org-publish-initialize-files-alist' to nil. + (org-publish-initialize-files-alist): + Initialize `org-publish-initialize-files-alist' to nil. (org-publish-sort-directory-files): New function. (org-publish-projects): Access the new properties. (org-publish-find-title): Use the file title cache. @@ -5097,8 +5079,8 @@ * org-compat.el (org-make-overlay, org-delete-overlay) (org-overlay-start, org-overlay-end, org-overlay-put) - (org-overlay-get, org-overlay-move, org-overlay-buffer): Functions - removed. + (org-overlay-get, org-overlay-move, org-overlay-buffer): + Functions removed. (org-add-to-invisibility-spec): Function removed. * org-html.el (org-export-as-html-and-open): Add argument to @@ -5173,8 +5155,8 @@ * org-freemind.el (org-freemind-from-org-mode-node) (org-freemind-from-org-mode) - (org-freemind-from-org-sparse-tree, org-freemind-to-org-mode): Use - interactive-p instead of called-interactively, because this is + (org-freemind-from-org-sparse-tree, org-freemind-to-org-mode): + Use interactive-p instead of called-interactively, because this is backward compatible with older Emacsen I still support.. 2010-07-19 Carsten Dominik <carsten.dominik@gmail.com> @@ -5184,8 +5166,8 @@ 2010-07-19 Carsten Dominik <carsten.dominik@gmail.com> - * org-footnote.el (org-footnote-goto-previous-reference): Rename - from `org-footnote-goto-next-reference'. + * org-footnote.el (org-footnote-goto-previous-reference): + Rename from `org-footnote-goto-next-reference'. * org.el (org-auto-repeat-maybe): Only record LAST_REPEAT if org-log-repeat is non-nil, or if there is clocking data in the @@ -5202,11 +5184,11 @@ * org-wl.el (org-wl-link-remove-filter): New customizable variable. If non-nil, filter conditions are stripped when storing link to message in filter folder. - (org-wl-shimbun-prefer-web-links): New customizable variable. If - non-nil, links to shimbun messages are created as web links to + (org-wl-shimbun-prefer-web-links): New customizable variable. + If non-nil, links to shimbun messages are created as web links to message source. - (org-wl-nntp-prefer-web-links): New customizable variable. If - non-nil, links to nntp message are created as web links to gmane + (org-wl-nntp-prefer-web-links): New customizable variable. + If non-nil, links to nntp message are created as web links to gmane or googlegroups. (org-wl-namazu-default-index): New customizable variable. Directory of namazu search index that should be used as default @@ -5237,13 +5219,13 @@ * org.el (org-file-apps-ex): New variable. (org-open-file): Before considering org-file-apps, first match the - regexps from org-file-apps-ex against the whole link. See - docstring of org-file-apps-ex. + regexps from org-file-apps-ex against the whole link. + See docstring of org-file-apps-ex. 2010-07-19 Carsten Dominik <carsten.dominik@gmail.com> - * org.el (org-export-latex-default-packages-alist): Remove - microtype package. + * org.el (org-export-latex-default-packages-alist): + Remove microtype package. (org-todo-repeat-to-state): New variable. (org-auto-repeat-maybe): Allow user-selected target states. (org-default-properties): Add the new property REPEAT_TO_STATE. @@ -5369,8 +5351,8 @@ (org-mobile-copy-agenda-files, org-mobile-sumo-agenda-command) (org-mobile-create-sumo-agenda): Use encryption code. (org-mobile-encrypt-and-move): New function. - (org-mobile-encrypt-file, org-mobile-decrypt-file): New - functions. + (org-mobile-encrypt-file, org-mobile-decrypt-file): + New functions. (org-mobile-move-capture): Decrypt the capture file. * org.el (org-entities): Require the new file. @@ -5482,8 +5464,8 @@ 2010-04-10 Carsten Dominik <carsten.dominik@gmail.com> - * org-exp.el (org-export-author-info, org-export-email-info): Fix - docstrings. + * org-exp.el (org-export-author-info, org-export-email-info): + Fix docstrings. * org-beamer.el (org-beamer-select-environment): Rename from `org-beamer-set-environment-tag'. Improve docstring. @@ -5592,8 +5574,8 @@ * org-crypt.el (org-reveal-start-hook): Add a decryption function to this hook. - (org-decrypt-entries, org-encrypt-entries, org-decrypt-entry): Add - docstrings. + (org-decrypt-entries, org-encrypt-entries, org-decrypt-entry): + Add docstrings. * org.el (org-point-at-end-of-empty-headline) (org-level-increment, org-get-previous-line-level): New function. @@ -5621,8 +5603,8 @@ 2010-04-10 Stephen Eglen <stephen@gnu.org> - * org-agenda.el (org-agenda-insert-diary-extract-time): New - variable. + * org-agenda.el (org-agenda-insert-diary-extract-time): + New variable. (org-agenda-add-entry-to-org-agenda-diary-file): Use this new variable rather than `org-agenda-search-headline-for-time'. @@ -5725,8 +5707,8 @@ (org-export-as-docbook): Fix problem with double footnote reference in one place. - * org-exp.el (org-export-format-source-code-or-example): Remove - unnecessary newline. + * org-exp.el (org-export-format-source-code-or-example): + Remove unnecessary newline. * org.el (org-deadline, org-schedule): Allow rescheduling entries with repeaters. @@ -5748,8 +5730,8 @@ 2010-04-10 Carsten Dominik <carsten.dominik@gmail.com> - * org-latex.el (org-export-latex-classes): Add - \usepackage{latexsym} to all classes. + * org-latex.el (org-export-latex-classes): + Add \usepackage{latexsym} to all classes. 2010-04-10 Carsten Dominik <carsten.dominik@gmail.com> @@ -5768,8 +5750,8 @@ 2010-04-10 Carsten Dominik <carsten.dominik@gmail.com> - * org-clock.el (org-clock-report-include-clocking-task): New - option. + * org-clock.el (org-clock-report-include-clocking-task): + New option. (org-clock-sum): Add the current clocking task. 2010-04-10 Carsten Dominik <carsten.dominik@gmail.com> @@ -5805,8 +5787,8 @@ (org-get-todo-face, org-font-lock-add-priority-faces) (org-get-tag-face): Use `org-face-from-face-or-color'. - * org-faces.el (org-todo-keyword-faces, org-priority-faces): Allow - simple colors as values. + * org-faces.el (org-todo-keyword-faces, org-priority-faces): + Allow simple colors as values. (org-faces-easy-properties): New option. * org-agenda.el (org-agenda-set-mode-name): Show if the agenda is @@ -5828,8 +5810,8 @@ * org-html.el (org-export-html-style-default): Add a default style for textareas. - * org-exp.el (org-export-format-source-code-or-example): Fix - textarea tag. + * org-exp.el (org-export-format-source-code-or-example): + Fix textarea tag. 2010-04-10 Bastien Guerry <bzg@altern.org> @@ -5859,8 +5841,8 @@ * org-latex.el (org-export-as-pdf-and-open): Kill product buffer if the user wants that. - * org-exp.el (org-export-kill-product-buffer-when-displayed): New - option. + * org-exp.el (org-export-kill-product-buffer-when-displayed): + New option. * org-agenda.el (org-batch-agenda-csv): Use the time property instead of the `time-of-day' property. @@ -5915,8 +5897,8 @@ * org.el (org-get-location): Make sure the selection buffer is shown in the current frame. - * org-ascii.el (org-export-ascii-table-widen-columns): New - option. + * org-ascii.el (org-export-ascii-table-widen-columns): + New option. (org-export-ascii-preprocess): Realign tables to remove narrowing if `org-export-ascii-table-widen-columns' is set. @@ -5941,8 +5923,8 @@ 2010-04-10 Carsten Dominik <carsten.dominik@gmail.com> - * org.el (org-fontify-meta-lines-and-blocks): Honor - `org-fontify-quote-and-verse-blocks'. + * org.el (org-fontify-meta-lines-and-blocks): + Honor `org-fontify-quote-and-verse-blocks'. * org-faces.el (org-fontify-quote-and-verse-blocks): New option. @@ -5990,11 +5972,11 @@ * org-latex.el (org-export-latex-make-header): Define the align macro if it is not yet defined. - * org-agenda.el (org-agenda-insert-diary-make-new-entry): Call - `org-insert-heading' with the INVISIBLE-OK argument. + * org-agenda.el (org-agenda-insert-diary-make-new-entry): + Call `org-insert-heading' with the INVISIBLE-OK argument. - * org-mac-message.el (org-mac-message-insert-flagged): Call - `org-insert-heading' with the INVISIBLE-OK argument. + * org-mac-message.el (org-mac-message-insert-flagged): + Call `org-insert-heading' with the INVISIBLE-OK argument. * org.el (org-insert-heading): New argument INVISIBLE-OK. @@ -6005,10 +5987,10 @@ `html-container-class' text property to set an additional class for an outline container. - * org-exp.el (org-export-remember-html-container-classes): New - function. - (org-export-preprocess-string): Call - `org-export-remember-html-container-classes'. + * org-exp.el (org-export-remember-html-container-classes): + New function. + (org-export-preprocess-string): + Call `org-export-remember-html-container-classes'. * org.el (org-cycle): Mention level cycling in the docstring. (org-default-properties): Add new property HTML_CONTAINER_CLASS. @@ -6054,8 +6036,8 @@ * org-clock.el (org-task-overrun-text): New option. (org-task-overrun, org-clock-update-period): New variables. - (org-clock-get-clock-string, org-clock-update-mode-line): Mark - overrun clock. + (org-clock-get-clock-string, org-clock-update-mode-line): + Mark overrun clock. (org-clock-notify-once-if-expired): Check if clock is overrun. * org-faces.el: New face `org-mode-line-clock-overrun'. @@ -6068,8 +6050,8 @@ 2010-04-10 Stephen Eglen <stephen@gnu.org> - * org-agenda.el (org-get-time-of-day): Use - org-agenda-time-leading-zero to allow leading zero (rather than + * org-agenda.el (org-get-time-of-day): + Use org-agenda-time-leading-zero to allow leading zero (rather than space) for times. 2010-04-10 Carsten Dominik <carsten.dominik@gmail.com> @@ -6116,8 +6098,8 @@ 2010-04-10 Carsten Dominik <carsten.dominik@gmail.com> - * org-agenda.el (org-diary-class): Use - `org-order-calendar-date-args'. + * org-agenda.el (org-diary-class): + Use `org-order-calendar-date-args'. * org.el (org-order-calendar-date-args): New function. @@ -6129,8 +6111,8 @@ * org-agenda.el (org-agenda-schedule, org-agenda-deadline): Document that ARG is passed through to remove the date. - (org-agenda-bulk-action): Accept prefix arg and pass it on. Do - not read a date when the user has given a `C-u' prefix. + (org-agenda-bulk-action): Accept prefix arg and pass it on. + Do not read a date when the user has given a `C-u' prefix. 2010-04-10 Carsten Dominik <carsten.dominik@gmail.com> @@ -6178,8 +6160,8 @@ have defined any. (org-beamer-fix-toc): Put a frame around the table of contents. - * org-exp.el (org-export-remove-comment-blocks-and-subtrees): Make - sure case-folding works well when processing comment stuff. + * org-exp.el (org-export-remove-comment-blocks-and-subtrees): + Make sure case-folding works well when processing comment stuff. * org-latex.el (org-export-latex-after-save-hook): New hook. (org-export-as-latex): Run the new hook. @@ -6365,8 +6347,8 @@ * org.el (org-inhibit-startup-visibility-stuff): New variable. (org-mode): Don't do startup visibility if inhibited. - (org-outline-overlay-data, org-set-outline-overlay-data): New - functions. + (org-outline-overlay-data, org-set-outline-overlay-data): + New functions. (org-save-outline-visibility): New macro. (org-log-note-headings): Document that one should not change the `state' note format. @@ -6395,42 +6377,42 @@ * org-beamer.el: New file. * org-latex.el (org-export-latex-after-initial-vars-hook): New hook. - (org-export-as-latex): Run - `org-export-latex-after-initial-vars-hook'. + (org-export-as-latex): + Run `org-export-latex-after-initial-vars-hook'. (org-export-latex-format-toc-function) - (org-export-latex-make-header): Call - `org-export-latex-format-toc-function'. + (org-export-latex-make-header): + Call `org-export-latex-format-toc-function'. * org.el (org-fill-template): Make template searches case sensitive. * org-exp.el (org-export): Use "1" as a sign to export only the subtree. - * org-colview-xemacs.el (org-columns-edit-value): Use - org-unrestricted property. + * org-colview-xemacs.el (org-columns-edit-value): + Use org-unrestricted property. - * org-colview.el (org-columns-edit-value): Use - org-unrestricted property. + * org-colview.el (org-columns-edit-value): + Use org-unrestricted property. * org.el (org-compute-property-at-point): Set org-unrestricted text property if the list contains ":ETC". - (org-insert-property-drawer): Use - org-unrestricted property. + (org-insert-property-drawer): + Use org-unrestricted property. * org-exp.el (org-export-preprocess-before-selecting-backend-code-hook): New hook. - (org-export-preprocess-string): Run - `org-export-preprocess-before-selecting-backend-code-hook'. + (org-export-preprocess-string): + Run `org-export-preprocess-before-selecting-backend-code-hook'. * org-xoxo.el (org-export-as-xoxo): Run `org-export-first-hook'. - * org-latex.el (org-export-region-as-latex): Run - `org-export-first-hook'. + * org-latex.el (org-export-region-as-latex): + Run `org-export-first-hook'. * org-html.el (org-export-as-html): Run `org-export-first-hook'. - * org-docbook.el (org-export-as-docbook): Run - `org-export-first-hook'. + * org-docbook.el (org-export-as-docbook): + Run `org-export-first-hook'. * org-ascii.el (org-export-as-ascii): Run `org-export-first-hook'. @@ -6468,8 +6450,8 @@ * org-macs.el (org-re): Interpret :punct: in regexps. - * org-exp.el (org-export-replace-src-segments-and-examples): Also - take the final newline after the END line. + * org-exp.el (org-export-replace-src-segments-and-examples): + Also take the final newline after the END line. * org.el (org-clean-visibility-after-subtree-move): Only fix entries that are not entirely invisible already. @@ -6478,8 +6460,8 @@ 2010-04-10 Carsten Dominik <carsten.dominik@gmail.com> - * org-exp.el (org-export-format-source-code-or-example): Avoid - additional extra white lines in LaTeX. + * org-exp.el (org-export-format-source-code-or-example): + Avoid additional extra white lines in LaTeX. * org-list.el (org-list-parse-list): Leave empty lines after the list, don't consider them as part of the list. @@ -6497,14 +6479,14 @@ 2010-04-10 Tassilo Horn <tassilo@member.fsf.org> - * org.el (org-complete-tags-always-offer-all-agenda-tags): New - variable. + * org.el (org-complete-tags-always-offer-all-agenda-tags): + New variable. (org-set-tags): Use it. 2010-04-10 Carsten Dominik <carsten.dominik@gmail.com> - * org-list.el (org-empty-line-terminates-plain-lists): Update - docstring. + * org-list.el (org-empty-line-terminates-plain-lists): + Update docstring. * org.el (org-format-latex): Fix link creation for processed latex snippets. @@ -6560,8 +6542,8 @@ * org-latex.el (org-export-latex-parse-global) (org-export-latex-parse-content) - (org-export-latex-parse-subcontent): Use - `org-re-search-forward-unprotected'. + (org-export-latex-parse-subcontent): + Use `org-re-search-forward-unprotected'. (org-export-as-pdf): Remove log files produced by XeTeX. * org-macs.el (org-re-search-forward-unprotected): New function. @@ -6594,8 +6576,8 @@ * org.el (org-cycle-level): Use `org-looking-back'. - * org-list.el (org-cycle-item-indentation): Use - `org-looking-back'. + * org-list.el (org-cycle-item-indentation): + Use `org-looking-back'. * org-compat.el (org-looking-back): New function. @@ -6648,8 +6630,8 @@ 2009-11-20 Carsten Dominik <carsten.dominik@gmail.com> - * org-agenda.el (org-agenda-diary-entry-in-org-file): Rebuild - agenda after adding new entry. + * org-agenda.el (org-agenda-diary-entry-in-org-file): + Rebuild agenda after adding new entry. * org-datetree.el (org-datetree-find-day-create): Fix regular expression. @@ -6686,8 +6668,8 @@ * org-agenda.el (org-agenda-insert-diary-strategy): New variable. (org-agenda-insert-diary-as-top-level): New function. - (org-agenda-add-entry-to-org-agenda-diary-file): Call - `org-agenda-insert-diary-as-top-level'. + (org-agenda-add-entry-to-org-agenda-diary-file): + Call `org-agenda-insert-diary-as-top-level'. * org.el (org-occur-in-agenda-files): Make sure none of the buffers is narrowed. @@ -6754,8 +6736,8 @@ * org-agenda.el (org-agenda-show-outline-path): New option. (org-agenda-do-context-action): New function. - (org-agenda-next-line, org-agenda-previous-line): Use - `org-agenda-do-context-action'. + (org-agenda-next-line, org-agenda-previous-line): + Use `org-agenda-do-context-action'. * org.el (org-use-speed-commands): Allow function value. (org-speed-commands-default): Make headline motion safe, so that @@ -6832,8 +6814,8 @@ * org-latex.el (org-export-latex-links): Check for protectedness in the last matched character, not after the match. - * org-datetree.el (org-datetree-find-date-create): Respect - restriction when KEEP-RESTRICTION is set. + * org-datetree.el (org-datetree-find-date-create): + Respect restriction when KEEP-RESTRICTION is set. (org-datetree-file-entry-under): New function. (org-datetree-cleanup): New command. @@ -6871,8 +6853,8 @@ * org-agenda.el (org-agenda-diary-entry-in-org-file) (org-agenda-add-entry-to-org-agenda-diary-file) (org-agenda-insert-diary-make-new-entry): New functions. - (org-agenda-diary-entry): Call - `org-agenda-diary-entry-in-org-file' when appropriate. + (org-agenda-diary-entry): + Call `org-agenda-diary-entry-in-org-file' when appropriate. * org.el (org-calendar-insert-diary-entry-key): New option. (org-agenda-diary-file): New option. @@ -6923,8 +6905,8 @@ 2009-11-13 Dan Davison <davison@stats.ox.ac.uk> - * org-exp.el (org-export-format-source-code-or-example): Restrict - scope of preserve-indentp to the let binding. + * org-exp.el (org-export-format-source-code-or-example): + Restrict scope of preserve-indentp to the let binding. (org-src): Require org-src, since org-src-preserve-indentation is used. 2009-11-13 Carsten Dominik <carsten.dominik@gmail.com> @@ -6944,14 +6926,14 @@ 2009-11-13 Carsten Dominik <carsten.dominik@gmail.com> - * org-icalendar.el (org-print-icalendar-entries): Use - org-icalendar-verify-function only if non-nil. + * org-icalendar.el (org-print-icalendar-entries): + Use org-icalendar-verify-function only if non-nil. * org.el (org-refile): Refile to clock only if the prefix arg is 2. (org-sparse-tree): Fix docstring to be in line with prompt. - (org-update-parent-todo-statistics): Call - `org-after-todo-statistics-hook' on each level. + (org-update-parent-todo-statistics): + Call `org-after-todo-statistics-hook' on each level. 2009-11-13 Carsten Dominik <carsten.dominik@gmail.com> @@ -6982,8 +6964,8 @@ * org-clock.el (org-clock-play-sound): Expand file in org-clock-sound, to allow ~ for home. - * org-remember.el (org-remember-handler): Set - text-before-node-creation even if this already looks like a node, + * org-remember.el (org-remember-handler): + Set text-before-node-creation even if this already looks like a node, because the string might be needed on non-org-mode target files. * org-agenda.el (org-agenda-open-link): Make this work in agenda @@ -7012,12 +6994,12 @@ * org-src.el (org-src-preserve-indentation): Document that this variable is also used during export. - * org-exp.el (org-export-format-source-code-or-example): Preserve - indentation if a block has a -i option, or if + * org-exp.el (org-export-format-source-code-or-example): + Preserve indentation if a block has a -i option, or if `org-src-preserve-indentation' is set. - * org-exp-blocks.el (org-export-blocks-preprocess): Preserve - indentation if a block has a -i option, or if + * org-exp-blocks.el (org-export-blocks-preprocess): + Preserve indentation if a block has a -i option, or if `org-src-preserve-indentation' is set. 2009-11-13 Carsten Dominik <carsten.dominik@gmail.com> @@ -7034,8 +7016,8 @@ (org-agenda-menu): Add the new archiving commands to the menu. (org-agenda-archive-default) (org-agenda-archive-default-with-confirmation): New commands. - (org-agenda-archive, org-agenda-archive-to-archive-sibling): Just - call `org-agenda-archive-with'. + (org-agenda-archive, org-agenda-archive-to-archive-sibling): + Just call `org-agenda-archive-with'. (org-agenda-archive-with): New function. * org-table.el (org-table-convert-region): Inert spaces around "|" @@ -7055,8 +7037,8 @@ IF-EXISTS, which avoids creating the attachment directory if it does not yet exist. - * org-agenda.el (org-agenda, org-run-agenda-series): Evaluate - MATCH. + * org-agenda.el (org-agenda, org-run-agenda-series): + Evaluate MATCH. 2009-11-13 Carsten Dominik <carsten.dominik@gmail.com> @@ -7169,8 +7151,8 @@ 2009-11-13 John Wiegley <jwiegley@gmail.com> - * org-clock.el (org-clock-display, org-clock-put-overlay): Use - `org-time-clock-use-fractional'. + * org-clock.el (org-clock-display, org-clock-put-overlay): + Use `org-time-clock-use-fractional'. * org.el (org-time-clocksum-use-fractional) (org-time-clocksum-fractional-format): Two new customizable @@ -7267,8 +7249,8 @@ * org-agenda.el (org-agenda-next-line): New command. (org-agenda-previous-line): New commands. - (org-agenda-show-and-scroll-up, org-agenda-show-scroll-down): New - commands. + (org-agenda-show-and-scroll-up, org-agenda-show-scroll-down): + New commands. (org-agenda-follow-mode): Do the follow immediately if the mode is turned on here. (previous-line, next-line): Replace keys with the corresponding @@ -7299,8 +7281,8 @@ 2009-11-13 John Wiegley <johnw@newartisans.com> - * org-clock.el (org-clock-disable-clock-resolution): New - customization variable that disable automatic clock resolution on + * org-clock.el (org-clock-disable-clock-resolution): + New customization variable that disable automatic clock resolution on clock in. (org-clock-in): If `org-clock-disable-clock-resolution' is set, do not automatically resolve anything. This is does not affect @@ -7326,8 +7308,8 @@ 2009-11-13 John Wiegley <johnw@newartisans.com> - * org-agenda.el (org-agenda-auto-exclude-function): New - customization variable for allowing the user to create an "auto + * org-agenda.el (org-agenda-auto-exclude-function): + New customization variable for allowing the user to create an "auto exclusion" filter for doing context-aware auto tag filtering. (org-agenda-filter-by-tag): Changes to support the use of `org-agenda-auto-exclude-function'. See the new manual addition,. @@ -7394,8 +7376,8 @@ resolves a clock to a specific time, closing or resuming as need be, and possibly even starting a new clock. (org-clock-resolve): New function used by `org-resolve-clocks' - that sets up for the call to `org-clock-resolve-clock'. It - determines the time to resolve to based on a single-character + that sets up for the call to `org-clock-resolve-clock'. + It determines the time to resolve to based on a single-character selection from the user to either keep time, subtract away time or cancel the clock. (org-resolve-clocks): New user command which resolves dangling @@ -7504,8 +7486,8 @@ 2009-11-13 Carsten Dominik <carsten.dominik@gmail.com> * org-src.el (org-edit-src-code) - (org-edit-src-find-region-and-lang, org-edit-src-exit): Handle - macro editing. + (org-edit-src-find-region-and-lang, org-edit-src-exit): + Handle macro editing. * org-agenda.el (org-prefix-category-max-length): New variable. (org-format-agenda-item): Use `org-prefix-category-max-length'. @@ -7658,12 +7640,12 @@ (org-agenda-show-new-time, org-agenda-date-prompt) (org-agenda-schedule, org-agenda-deadline, org-agenda-action) (org-agenda-clock-in, org-agenda-bulk-mark) - (org-agenda-bulk-unmark, org-agenda-show-the-flagging-note): Use - `org-get-at-bol'. + (org-agenda-bulk-unmark, org-agenda-show-the-flagging-note): + Use `org-get-at-bol'. * org-colview.el (org-columns-display-here) - (org-columns-edit-allowed, org-agenda-columns): Use - `org-get-at-bol'. + (org-columns-edit-allowed, org-agenda-columns): + Use `org-get-at-bol'. 2009-10-01 Carsten Dominik <carsten.dominik@gmail.com> @@ -7698,13 +7680,13 @@ 2009-10-01 Carsten Dominik <carsten.dominik@gmail.com> - * org-agenda.el (org-prepare-agenda): Reset - `org-drawers-for-agenda'. + * org-agenda.el (org-prepare-agenda): + Reset `org-drawers-for-agenda'. (org-prepare-agenda): Uniquify list of drawers. * org.el (org-complex-heading-regexp-format): New variable. - (org-set-regexps-and-options): Define - `org-complex-heading-regexp-format'. + (org-set-regexps-and-options): + Define `org-complex-heading-regexp-format'. (org-drawers-for-agenda): New variable. (org-map-entries): Bind `org-drawers-for-agenda'. (org-prepare-agenda-buffers): Add to `org-drawers-for-agenda'. @@ -7749,10 +7731,10 @@ * org-archive.el (org-archive-set-tag) (org-archive-subtree-default): New commands. - * org-clock.el (org-clock-clocktable-default-properties): New - option. - (org-clock-report): Use - `org-clock-clocktable-default-properties'. + * org-clock.el (org-clock-clocktable-default-properties): + New option. + (org-clock-report): + Use `org-clock-clocktable-default-properties'. 2009-10-01 Carsten Dominik <carsten.dominik@gmail.com> @@ -7855,8 +7837,8 @@ 2009-10-01 Carsten Dominik <carsten.dominik@gmail.com> - * org-agenda.el (org-agenda-entry-text-exclude-regexps): New - variable. + * org-agenda.el (org-agenda-entry-text-exclude-regexps): + New variable. (org-agenda-entry-text-cleanup-hook): New hook. (org-agenda-get-some-entry-text): Remove matches of `org-agenda-entry-text-exclude-regexps' and run the hook @@ -8006,8 +7988,8 @@ 2009-09-02 Carsten Dominik <carsten.dominik@gmail.com> - * org.el (org-eval-in-calendar): Use - `org-select-frame-set-input-focus'. + * org.el (org-eval-in-calendar): + Use `org-select-frame-set-input-focus'. * org-compat.el (org-select-frame-set-input-focus): New function. @@ -8053,8 +8035,8 @@ (org-agenda-menu): Add effort setting commands to menu. (org-agenda-set-property, org-agenda-set-effort): New functions. - * org-latex.el (org-export-latex-tables): Fix - `org-table-last-alignment' and `org-table-last-column-widths' if + * org-latex.el (org-export-latex-tables): + Fix `org-table-last-alignment' and `org-table-last-column-widths' if the first column has been removed. 2009-09-02 Carsten Dominik <carsten.dominik@gmail.com> @@ -8076,8 +8058,8 @@ (org-get-last-sibling): New function. (org-refile): Use `org-get-next-sibling' instead of the outline version of this function. - (org-clean-visibility-after-subtree-move): Use - `org-get-next-sibling' and `org-get-last-sibling' instead of the + (org-clean-visibility-after-subtree-move): + Use `org-get-next-sibling' and `org-get-last-sibling' instead of the outline versions of these functions. 2009-09-02 Carsten Dominik <carsten.dominik@gmail.com> @@ -8105,8 +8087,8 @@ (org-table-get-specials, org-table-rotate-recalc-marks) (org-table-get-range, org-table-recalculate) (org-table-edit-formulas, org-table-fedit-convert-buffer) - (org-table-show-reference, org-table-highlight-rectangle): Don't - use `goto-line'. + (org-table-show-reference, org-table-highlight-rectangle): + Don't use `goto-line'. * org-src.el (org-edit-src-code, org-edit-fixed-width-region) (org-edit-src-exit): Don't use `goto-line'. @@ -8121,8 +8103,8 @@ * org-colview.el (org-columns, org-columns-redo) (org-agenda-columns): Don't use `goto-line'. - * org-colview-xemacs.el (org-columns, org-agenda-columns): Don't - use `goto-line'. + * org-colview-xemacs.el (org-columns, org-agenda-columns): + Don't use `goto-line'. * org-agenda.el (org-agenda-mode): Force visual line motion off. (org-agenda-add-entry-text-maxlines): Improve docstring. @@ -8164,8 +8146,8 @@ 2009-09-02 Carsten Dominik <carsten.dominik@gmail.com> * org-agenda.el (org-agenda-get-some-entry-text): New function. - (org-agenda-add-entry-text): Use - `org-agenda-get-some-entry-text'. + (org-agenda-add-entry-text): + Use `org-agenda-get-some-entry-text'. * org.el (org-cycle-separator-lines): Update docstring. (org-cycle-show-empty-lines): Handle negative values for @@ -8193,8 +8175,8 @@ 2009-09-02 Carsten Dominik <carsten.dominik@gmail.com> - * org-exp.el (org-export-format-source-code-or-example): Translate - language. + * org-exp.el (org-export-format-source-code-or-example): + Translate language. * org-src.el (org-src-lang-modes): New variable. (org-edit-src-code): Translate language. @@ -8220,8 +8202,8 @@ 2009-09-02 Carsten Dominik <carsten.dominik@gmail.com> - * org-remember.el (org-remember-apply-template): Use - org-icompleting-read. + * org-remember.el (org-remember-apply-template): + Use org-icompleting-read. * org-publish.el (org-publish): Use org-icompleting-read. @@ -8229,11 +8211,11 @@ (org-insert-columns-dblock): Use org-icompleting-read. * org-colview-xemacs.el (org-columns-edit-value) - (org-columns-new, org-insert-columns-dblock): Use - org-icompleting-read. + (org-columns-new, org-insert-columns-dblock): + Use org-icompleting-read. - * org-attach.el (org-attach-delete-one, org-attach-open): Use - org-icompleting-read. + * org-attach.el (org-attach-delete-one, org-attach-open): + Use org-icompleting-read. 2009-09-02 Carsten Dominik <carsten.dominik@gmail.com> @@ -8242,8 +8224,8 @@ (org-org-menu): Add a menu entry for the new bug reporter. (org-submit-bug-report): New command. - * org-list.el (org-hierarchical-checkbox-statistics): Improve - docstring. + * org-list.el (org-hierarchical-checkbox-statistics): + Improve docstring. * org.el (org-emphasis-regexp-components): Add "`" to set of pre-emphasis characters. @@ -8252,16 +8234,16 @@ package. (org-export-latex-emphasis-alist): Use \st for strikethough. - * org-exp-blocks.el (org-export-blocks-preprocess): Use - `indent-code-rigidly' to indent. + * org-exp-blocks.el (org-export-blocks-preprocess): + Use `indent-code-rigidly' to indent. - * org-agenda.el (org-agenda-get-restriction-and-command): Remove - properties only if MATCH really is a string. + * org-agenda.el (org-agenda-get-restriction-and-command): + Remove properties only if MATCH really is a string. 2009-09-02 Carsten Dominik <carsten.dominik@gmail.com> - * org-latex.el (org-export-latex-packages-alist): Fix - customization type. + * org-latex.el (org-export-latex-packages-alist): + Fix customization type. * org.el (org-create-formula-image): Also use `org-export-latex-packages-alist'. @@ -8274,8 +8256,8 @@ * org.el (org-fast-tag-selection): Avoid text properties on tags in the alist. - * org-agenda.el (org-agenda-get-restriction-and-command): Avoid - text properties on the match element. + * org-agenda.el (org-agenda-get-restriction-and-command): + Avoid text properties on the match element. 2009-09-02 Carsten Dominik <carsten.dominik@gmail.com> @@ -8299,8 +8281,8 @@ 2009-09-02 Carsten Dominik <carsten.dominik@gmail.com> - * org.el (org-export-html-special-string-regexps): Definition - moved into org.el. + * org.el (org-export-html-special-string-regexps): + Definition moved into org.el. * org-exp.el (org-export-preprocess-apply-macros): Allow newlines in macro calls. @@ -8310,8 +8292,8 @@ * org-latex.el (org-export-latex-listings) (org-export-latex-listings-langs): New options. - * org-exp.el (org-export-format-source-code-or-example): Use - listing package if requested by the user. + * org-exp.el (org-export-format-source-code-or-example): + Use listing package if requested by the user. 2009-09-02 Bastien Guerry <bzg@altern.org> @@ -8334,8 +8316,8 @@ * org.el (org-insert-heading): When respecting content, do not convert current line to headline. - * org-clock.el (org-clock-save-markers-for-cut-and-paste): Also - cheeeeeck the hd marker. + * org-clock.el (org-clock-save-markers-for-cut-and-paste): + Also cheeeeeck the hd marker. (org-clock-in): Also set the hd marker. (org-clock-out): Also set the hd marker. (org-clock-cancel): Reset markers. @@ -8350,8 +8332,8 @@ * org.el (org-modules): Add org-track.el. * org-agenda.el (org-agenda-bulk-marked-p): New function. - (org-agenda-bulk-mark, org-agenda-bulk-unmark): Use - `org-agenda-bulk-marked-p'. + (org-agenda-bulk-mark, org-agenda-bulk-unmark): + Use `org-agenda-bulk-marked-p'. (org-agenda-bulk-toggle): New command. 2009-09-02 Carsten Dominik <carsten.dominik@gmail.com> @@ -8417,8 +8399,8 @@ 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> - * org-list.el (org-list-send-list): Call - `org-list-goto-true-beginning' instead of + * org-list.el (org-list-send-list): + Call `org-list-goto-true-beginning' instead of `org-list-find-true-beginning', which does not exist. * org-timer.el (org-timer-reset-timers): Use `mapc'. @@ -8436,8 +8418,8 @@ (org-startup-options): Add new options indent and noindent. (org-unfontify-region): Remove line-prefix and wrap-prefix properties. - (org-after-demote-entry-hook, org-after-promote-entry-hook): New - hooks. + (org-after-demote-entry-hook, org-after-promote-entry-hook): + New hooks. (org-promote, org-demote): Run the new hooks. * org-table.el (org-table-align): Replace leading \n as well. @@ -8480,8 +8462,8 @@ 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> - * org-table.el (org-table-cut-region, org-table-copy-region): Work - on single field if no active region. + * org-table.el (org-table-cut-region, org-table-copy-region): + Work on single field if no active region. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> @@ -8523,8 +8505,8 @@ * org.el (org-store-link): Never store a link to an inline task. - * org-footnote.el (org-footnote-goto-local-insertion-point): Skip - inline tasks when positioning footnotes. + * org-footnote.el (org-footnote-goto-local-insertion-point): + Skip inline tasks when positioning footnotes. * org.el (org-refile): Remove the END line when archiving an inline task that does have an END line. @@ -8570,8 +8552,8 @@ 2009-08-06 Bastien Guerry <bzg@altern.org> - * org-protocol.el (org-protocol-default-template-key): New - option. + * org-protocol.el (org-protocol-default-template-key): + New option. * org.el (org-refile): Bugfix: save-excursion before reading the refile target, otherwise cursor moves might confuse `org-refile'. @@ -8599,8 +8581,8 @@ * org.el (org-mode-map): New key for org-timer-set-timer. * org-timer.el (org-timer-reset-timers) - (org-timer-show-remaining-time, org-timer-set-timer): New - functions. + (org-timer-show-remaining-time, org-timer-set-timer): + New functions. * org-clock.el (org-show-notification): Update the docstring. @@ -8669,8 +8651,8 @@ * org.el (org-get-refile-targets): Fix bug: don't ignore case when building the list of targets. - * org-remember.el (org-remember-delete-empty-lines-at-end): New - option. + * org-remember.el (org-remember-delete-empty-lines-at-end): + New option. (org-remember-handler): Use the new option. 2009-08-06 James TD Smith <ahktenzero@mohorovi.cc> @@ -8697,8 +8679,8 @@ * org-latex.el (org-export-latex-first-lines): Fix problem with publishing the region. - * org-exp.el (org-export-format-source-code-or-example): Fix - bad line numbering when exporting examples in HTML. + * org-exp.el (org-export-format-source-code-or-example): + Fix bad line numbering when exporting examples in HTML. 2009-08-06 James TD Smith <ahktenzero@mohorovi.cc> @@ -8744,8 +8726,8 @@ * org-exp.el (org-infile-export-plist): Read BIND lines. (org-install-letbind): New function. - (org-export-as-org, org-export-preprocess-string): Call - `org-install-letbind'. + (org-export-as-org, org-export-preprocess-string): + Call `org-install-letbind'. * org-list.el (org-list-demote-modify-bullet): New option. (org-first-list-item-p): Save point. @@ -8762,8 +8744,8 @@ * org-footnote.el (org-footnote-auto-adjust): New option. (org-footnote-auto-adjust-maybe): New function. - (org-footnote-new, org-footnote-delete): Call - `org-footnote-auto-adjust-maybe'. + (org-footnote-new, org-footnote-delete): + Call `org-footnote-auto-adjust-maybe'. * org.el (org-startup-options): Add new footnote-related keywords. @@ -8926,16 +8908,16 @@ in column values. (org-columns-capture-view): Exclude comment and archived trees. - * org-colview-xemacs.el (org-columns-capture-view): Protect - vertical bars in column values. + * org-colview-xemacs.el (org-columns-capture-view): + Protect vertical bars in column values. (org-columns-capture-view): Exclude comment and archived trees. * org.el (org-quote-vert): New function. * org-latex.el (org-export-latex-verbatim-wrap): New option. - * org-exp.el (org-export-format-source-code-or-example): Use - `org-export-latex-verbatim-wrap'. + * org-exp.el (org-export-format-source-code-or-example): + Use `org-export-latex-verbatim-wrap'. * org.el (org-clone-subtree-with-time-shift): Also shift inactive time stamps. @@ -8967,8 +8949,8 @@ 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> - * org-icalendar.el (org-icalendar-include-bbdb-anniversaries): New - option. + * org-icalendar.el (org-icalendar-include-bbdb-anniversaries): + New option. (org-export-icalendar): Call `org-bbdb-anniv-export-ical'. * org-bbdb.el (org-bbdb-anniv-export-ical): New function. @@ -8990,8 +8972,8 @@ * org-remember.el (org-remember-handler): Abort remember if the buffer is empty. - * org-exp.el (org-export-format-source-code-or-example): Run - `org-src-mode-hook'. + * org-exp.el (org-export-format-source-code-or-example): + Run `org-src-mode-hook'. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> @@ -9008,8 +8990,8 @@ * org-macs.el (org-replace-match-keep-properties): New function. - * org-exp.el (org-export-mark-blockquote-verse-center): Better - preprocessing of center and quote and verse blocks. + * org-exp.el (org-export-mark-blockquote-verse-center): + Better preprocessing of center and quote and verse blocks. * org-list.el (org-list-end): Respect the stored "original" indentation when determining the end of the list. @@ -9032,8 +9014,8 @@ 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> - * org-exp.el (org-export-format-source-code-or-example): Remember - the original indentation of source code snippets and examples. + * org-exp.el (org-export-format-source-code-or-example): + Remember the original indentation of source code snippets and examples. * org-latex.el (org-export-as-latex): Relocate the table of contents. @@ -9109,35 +9091,35 @@ (org-table-edit-formulas, orgtbl-ctrl-c-ctrl-c) (orgtbl-gather-send-defs): Allow indented #+TBLFM line. - * org.el (org-fontify-meta-lines, org-ctrl-c-ctrl-c): Allow - indented #+TBLFM line. + * org.el (org-fontify-meta-lines, org-ctrl-c-ctrl-c): + Allow indented #+TBLFM line. - * org-footnote.el (org-footnote-goto-local-insertion-point): Allow - indented #+TBLFM line. + * org-footnote.el (org-footnote-goto-local-insertion-point): + Allow indented #+TBLFM line. * org-colview.el (org-dblock-write:columnview): Allow indented #+TBLFM line. - * org-colview-xemacs.el (org-dblock-write:columnview): Allow - indented #+TBLFM line. + * org-colview-xemacs.el (org-dblock-write:columnview): + Allow indented #+TBLFM line. * org-clock.el (org-dblock-write:clocktable): Allow indented #+TBLFM line. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> - * org-exp.el (org-export-format-source-code-or-example): Make - editing indented blocks work correctly. + * org-exp.el (org-export-format-source-code-or-example): + Make editing indented blocks work correctly. * org.el (org-edit-src-nindent): New variable. (org-edit-src-code, org-edit-fixed-width-region) - (org-edit-src-find-region-and-lang, org-edit-src-exit): Make - editing indented blocks work correctly. + (org-edit-src-find-region-and-lang, org-edit-src-exit): + Make editing indented blocks work correctly. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> - * org-exp.el (org-export-replace-src-segments-and-examples): Find - indented blocks. + * org-exp.el (org-export-replace-src-segments-and-examples): + Find indented blocks. (org-export-format-source-code-or-example): Fix indentation of blocks. (org-export-remove-indentation): New function. @@ -9156,18 +9138,18 @@ 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-treat-insert-todo-heading-as-state-change) - (org-treat-S-cursor-todo-selection-as-state-change): New - variables. - (org-insert-todo-heading): Honor - `org-treat-insert-todo-heading-as-state-change'. - (org-shiftright, org-shiftleft): Honor - `org-treat-S-cursor-todo-selection-as-state-change'. + (org-treat-S-cursor-todo-selection-as-state-change): + New variables. + (org-insert-todo-heading): + Honor `org-treat-insert-todo-heading-as-state-change'. + (org-shiftright, org-shiftleft): + Honor `org-treat-S-cursor-todo-selection-as-state-change'. (org-inhibit-logging): New variable. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> - * org-agenda.el (org-remove-subtree-entries-from-agenda): Reduce - range for marker position checking. + * org-agenda.el (org-remove-subtree-entries-from-agenda): + Reduce range for marker position checking. * org-latex.el (org-export-latex-first-lines): Fix bug when exporting a region. @@ -9190,8 +9172,8 @@ * org-latex.el (org-export-latex-low-levels): Fix customization type. - * org.el (org-priority, org-shiftup, org-shiftdown): Disable - priority commands. + * org.el (org-priority, org-shiftup, org-shiftdown): + Disable priority commands. * org-agenda.el (org-agenda-priority): Disable priority commands. @@ -9206,17 +9188,17 @@ * org-exp.el (org-export-push-to-kill-ring): New function. (org-export-copy-to-kill-ring): New option. - * org-latex.el (org-export-as-latex): Call - `org-export-push-to-kill-ring'. + * org-latex.el (org-export-as-latex): + Call `org-export-push-to-kill-ring'. - * org-exp.el (org-export-show-temporary-export-buffer): New - option. + * org-exp.el (org-export-show-temporary-export-buffer): + New option. - * org-latex.el (org-export-as-latex): Use - `org-export-show-temporary-export-buffer'. + * org-latex.el (org-export-as-latex): + Use `org-export-show-temporary-export-buffer'. - * org-exp.el (org-export-show-temporary-export-buffer): New - option. + * org-exp.el (org-export-show-temporary-export-buffer): + New option. (org-export-push-to-kill-ring): New function. * org-colview.el (org-columns-compile-map): New variable. @@ -9279,8 +9261,8 @@ * org-latex.el (org-export-latex-complex-heading-re): New variable. (org-export-as-latex): Force the correct regexp in the preprocessor buffer. - (org-export-latex-set-initial-vars): Set - `org-export-latex-complex-heading-re'. + (org-export-latex-set-initial-vars): + Set `org-export-latex-complex-heading-re'. * org-agenda.el (org-agenda-start-with-log-mode): New option. (org-agenda-mode): Use `org-agenda-start-with-log-mode'. @@ -9363,8 +9345,8 @@ * org-clock.el (org-clock-insert-selection-line): Fix prefious patch. - * org.el (org-edit-src-code, org-edit-fixed-width-region): Use - separate buffer instead of indirect buffer to edit source code. + * org.el (org-edit-src-code, org-edit-fixed-width-region): + Use separate buffer instead of indirect buffer to edit source code. (org-edit-src-exit): Make this function work with the new setup. * org-clock.el (org-clock-insert-selection-line): Make sure tasks @@ -9386,8 +9368,8 @@ * org-list.el (org-reset-checkbox-state-subtree): Move here from org-checklist.el. - (org-reset-checkbox-state-subtree): Call - `org-reset-checkbox-state-subtree'. + (org-reset-checkbox-state-subtree): + Call `org-reset-checkbox-state-subtree'. * org-remember.el (org-select-remember-template): For the selection of a valid template. @@ -9455,11 +9437,11 @@ * org.el (org-prepare-agenda-buffers): Catch a throw to nextfile. * org-protocol.el: Remove dependency on url.el. - (org-protocol-unhex-compound, org-protocol-open-source): Remove - dependency on url.el. + (org-protocol-unhex-compound, org-protocol-open-source): + Remove dependency on url.el. - * org-latex.el (org-export-as-pdf): Use - `org-latex-to-pdf-process'. + * org-latex.el (org-export-as-pdf): + Use `org-latex-to-pdf-process'. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> @@ -9467,8 +9449,8 @@ * org-agenda.el (org-agenda-skip-additional-timestamps-same-entry): New option. - (org-agenda-get-timestamps): Honor - `org-agenda-skip-additional-timestamps-same-entry'. + (org-agenda-get-timestamps): + Honor `org-agenda-skip-additional-timestamps-same-entry'. * org-clock.el (org-clock-goto-may-find-recent-task): New option. (org-clock-goto): Find recent task only if @@ -9493,8 +9475,8 @@ * org.el (org-tab-first-hook) (org-tab-after-check-for-table-hook) (org-tab-after-check-for-cycling-hook): New hooks. - (org-cycle-internal-global, org-cycle-internal-local): New - functions, split out from `org-cycle'. + (org-cycle-internal-global, org-cycle-internal-local): + New functions, split out from `org-cycle'. (org-cycle): Call the new hooks. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> @@ -9502,13 +9484,13 @@ * org-exp.el (org-export-preprocess-string): Reset the list of preferred targets for each run of the preprocessor. - * org.el (org-refile-target-verify-function): Improve - documentation. + * org.el (org-refile-target-verify-function): + Improve documentation. (org-get-refile-targets): Respect point being moved by the verification function. - * org-latex.el (org-export-latex-timestamp-keyword-markup): New - option. + * org-latex.el (org-export-latex-timestamp-keyword-markup): + New option. (org-export-latex-keywords): Use new option. * org.el (org-rear-nonsticky-at): New defsubst. @@ -9521,8 +9503,8 @@ 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-protocol.el (server-edit): Declare `server-edit'. - (org-protocol-unhex-string, org-protocol-unhex-compound): New - functions. + (org-protocol-unhex-string, org-protocol-unhex-compound): + New functions. (org-protocol-check-filename-for-protocol): Call `server-edit'. * org.el (org-default-properties): New default properteis for @@ -9703,15 +9685,15 @@ * org-agenda.el (org-agenda-confirm-kill) (org-agenda-custom-commands-local-options) (org-timeline-show-empty-dates, org-agenda-ndays) - (org-agenda-start-on-weekday, org-scheduled-past-days): Fix - customization type from number to integer. + (org-agenda-start-on-weekday, org-scheduled-past-days): + Fix customization type from number to integer. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-protocol.el: Declare some functions. - * org-agenda.el (org-agenda-compare-effort): Honor - `org-sort-agenda-noeffort-is-high'. + * org-agenda.el (org-agenda-compare-effort): + Honor `org-sort-agenda-noeffort-is-high'. (org-agenda-filter-by-tag, org-agenda-filter-make-matcher) (org-agenda-compare-effort): Implement the "?" operator for finding entries without effort setting. @@ -9814,8 +9796,8 @@ * org-mac-message.el (org-mac-flagged-mail): New group. (org-mac-mail-account): New variable. - (org-mac-create-flagged-mail, org-mac-insert-flagged-mail): New - commands. + (org-mac-create-flagged-mail, org-mac-insert-flagged-mail): + New commands. * org-remember.el (org-remember-backup-directory): New variable. (org-remember-apply-template): Write file to backup directory. @@ -9828,15 +9810,15 @@ * org-table.el (org-table-beginning-of-field) (org-table-end-of-field): New commands. - (org-table-previous-field, org-table-beginning-of-field): Better - error messages. + (org-table-previous-field, org-table-beginning-of-field): + Better error messages. (orgtbl-setup): Include `M-a' and `M-e'. - * org.el (org-backward-sentence, org-forward-sentence): New - commands. + * org.el (org-backward-sentence, org-forward-sentence): + New commands. - * org-colview.el (org-colview-initial-truncate-line-value): New - variable. + * org-colview.el (org-colview-initial-truncate-line-value): + New variable. (org-columns-remove-overlays): Restore the value of `truncate-lines'. (org-columns): Remember the value of `truncate-lines'. @@ -9892,11 +9874,11 @@ sub-projects. (org-agenda-skip-entry-when-regexp-matches) (org-agenda-skip-entry-when-regexp-matches-in-subtree): New functions. - (org-agenda-list-stuck-projects): Use - `org-agenda-skip-entry-when-regexp-matches-in-subtree'. + (org-agenda-list-stuck-projects): + Use `org-agenda-skip-entry-when-regexp-matches-in-subtree'. - * org-latex.el (org-export-latex-preprocess): Improve - export of verses. + * org-latex.el (org-export-latex-preprocess): + Improve export of verses. * org-exp.el (org-export-as-html): Implement centering as a div rather than a paragraph. Do a better job with line-end in verse @@ -9911,8 +9893,8 @@ * org-latex.el (org-export-latex-preprocess): Implement the centering markup. - * org-exp.el (org-export-mark-blockquote-verse-center): Rename - from `org-export-mark-blockquote-and-verse'. + * org-exp.el (org-export-mark-blockquote-verse-center): + Rename from `org-export-mark-blockquote-and-verse'. (org-export-as-html): Implement the centering markup. * org-latex.el (org-export-latex-tables): Fix vertical @@ -9938,16 +9920,16 @@ 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> - * org-latex.el (org-export-latex-emphasis-alist): Better - defaults for verbose emphasis. + * org-latex.el (org-export-latex-emphasis-alist): + Better defaults for verbose emphasis. (org-export-latex-emph-format): New function. (org-export-latex-fontify): Call `org-export-latex-emph-format'. * org-agenda.el (org-agenda-menu): Add new commands to menu. (org-agenda-do-date-later, org-agenda-do-date-earlier) (org-agenda-date-later-minutes, org-agenda-date-earlier-minutes) - (org-agenda-date-later-hours, org-agenda-date-earlier-hours): New - commands. + (org-agenda-date-later-hours, org-agenda-date-earlier-hours): + New commands. * org.el (org-timestamp-change): Move end-time along with start time. @@ -9979,8 +9961,8 @@ (org-publish-projects, org-publish-org-index): Change default anme for the index of file names to "sitemap.org". - * org-latex.el (org-export-latex-tables): Use - `org-split-string', for Emacs 21 compatibility. + * org-latex.el (org-export-latex-tables): + Use `org-split-string', for Emacs 21 compatibility. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> @@ -9996,10 +9978,10 @@ (org-get-current-options): Add new keywords. (org-export-as-html): Publish description and keywords. - * org-agenda.el (org-agenda-add-entry-text-descriptive-links): New - option. - (org-agenda-add-entry-text): Honor - `org-agenda-add-entry-text-descriptive-links'. + * org-agenda.el (org-agenda-add-entry-text-descriptive-links): + New option. + (org-agenda-add-entry-text): + Honor `org-agenda-add-entry-text-descriptive-links'. * org-latex.el (org-export-latex-preprocess): Make all external preprocess functions use a PARAMETER arg. @@ -10018,8 +10000,8 @@ `org-export-html-style-include-scripts'. (org-export-as-html): Honor new option `org-export-html-style-include-scripts'. - (org-export-html-scripts, org-export-html-style-default): Fix - xml issues with the Safari browser. + (org-export-html-scripts, org-export-html-style-default): + Fix xml issues with the Safari browser. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> @@ -10036,8 +10018,8 @@ 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> - * org-exp.el (org-export-format-source-code-or-example): Mark - temporary buffer unmodified, so that it will be killed even if + * org-exp.el (org-export-format-source-code-or-example): + Mark temporary buffer unmodified, so that it will be killed even if mode like message mode has decided to assign a file name. * org.el (org-scan-tags): Improve tag inheritance. @@ -10056,8 +10038,8 @@ * org.el (org-add-planning-info): Fix bug with looking for keyword only at column 0. - * org-agenda.el (org-agenda-custom-commands-local-options): Add - option for tags filter preset. + * org-agenda.el (org-agenda-custom-commands-local-options): + Add option for tags filter preset. (org-prepare-agenda): Store filter preset as a property on the filter variable. (org-finalize-agenda): Call the filter, if there is a preset. @@ -10076,8 +10058,8 @@ (org-agenda-fontify-priorities): Rename from org-fontify-priorities. - * org.el (org-set-font-lock-defaults): Call - `org-font-lock-add-priority-faces'. + * org.el (org-set-font-lock-defaults): + Call `org-font-lock-add-priority-faces'. (org-font-lock-add-priority-faces): New function. * org-faces.el (org-set-tag-faces): New option. @@ -10134,8 +10116,8 @@ * org.el (org-blank-before-new-entry): Mention the dependence on `org-empty-line-terminates-plain-lists' in the docstring. - * org-publish.el (org-publish-get-project-from-filename): New - optional argument UP. Only find the top project if UP is set. + * org-publish.el (org-publish-get-project-from-filename): + New optional argument UP. Only find the top project if UP is set. (org-publish-current-project): Find the top encloding project. * org-agenda.el (org-agenda-before-write-hook) @@ -10149,15 +10131,15 @@ * org-exp.el (org-export-ascii-links-to-notes): New option. (org-export-as-ascii): Handle links better. - (org-export-ascii-wrap, org-export-ascii-push-links): New - functions. + (org-export-ascii-wrap, org-export-ascii-push-links): + New functions. 2009-08-06 Carsten Dominik <carsten.dominik@gmail.com> * org-agenda.el (org-agenda): Make prefix arg optional. (org-agenda-search-headline-for-time): New option. - (org-format-agenda-item): Honor - `org-agenda-search-headline-for-time'. + (org-format-agenda-item): + Honor `org-agenda-search-headline-for-time'. * org-table.el (orgtbl-self-insert-command): Cluster undo for 20 characters. @@ -10228,8 +10210,8 @@ 2009-02-19 Carsten Dominik <dominik@science.uva.nl> - * org.el (org-block-todo-from-children-or-siblings): Use - `org-up-heading-all' so that this will work correctly with hidden + * org.el (org-block-todo-from-children-or-siblings): + Use `org-up-heading-all' so that this will work correctly with hidden property drawers and entries. (org-end-of-line, org-beginning-of-line): Make prefix arg work, by falling back to normal, default command. @@ -10310,8 +10292,8 @@ * org-exp.el (org-export-html-footnotes-section): Make the div id consistent. - * org-export-latex.el (org-export-latex-classes): Remove - paper size option from LaTeX classes. + * org-export-latex.el (org-export-latex-classes): + Remove paper size option from LaTeX classes. 2009-01-31 Carsten Dominik <carsten.dominik@gmail.com> @@ -10394,8 +10376,8 @@ * org-agenda.el (org-agenda-todo): Call `org-todo' interactively, to get real errors from the blocker hook. - * org.el (org-shiftselect-error, org-call-for-shift-select): New - functions. + * org.el (org-shiftselect-error, org-call-for-shift-select): + New functions. (org-set-visibility-according-to-property): Turn off the setting of `org-show-entry-below', to avoid overruling a FOLDED visibility property. @@ -10412,13 +10394,13 @@ * org-footnote.el (org-footnote-normalize): Remove unnecessary variable. - (org-insert-footnote-reference-near-definition): Remove - unnecessary let form. + (org-insert-footnote-reference-near-definition): + Remove unnecessary let form. 2009-01-26 Carsten Dominik <dominik@science.uva.nl> - * org-export-latex.el (org-export-as-latex): Call - `org-export-latex-first-lines' with OPT-PLIST as a parameter. + * org-export-latex.el (org-export-as-latex): + Call `org-export-latex-first-lines' with OPT-PLIST as a parameter. (org-export-latex-first-lines): New parameter OPT-PLIST. * org.el (org-yank): Tell `delete-selection-mode' about @@ -10426,8 +10408,8 @@ * org-faces.el (org-clock-overlay): Fix face definition. - * org-export-latex.el (org-export-latex-first-lines): Pass - timestamp and footnote parameters to the preprocessor. + * org-export-latex.el (org-export-latex-first-lines): + Pass timestamp and footnote parameters to the preprocessor. * org-exp.el (org-export-remove-timestamps): Do not remove time stamps inside tables. @@ -10436,8 +10418,8 @@ * org-exp.el (org-export-as-html): Turn \par into a paragraph. - * org.el (org-agenda-tags-todo-honor-ignore-options): Declare - variable. + * org.el (org-agenda-tags-todo-honor-ignore-options): + Declare variable. * org-table.el (org-table-insert-hline): Fix typo in fuction call to `backward-char'. @@ -10445,21 +10427,21 @@ * org-exp.el (org-export-as-html): Remove the initial space from colon examples. - * org.el (org-scan-tags): Call - `org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item'. + * org.el (org-scan-tags): + Call `org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item'. - * org-agenda.el (org-agenda-todo-list, org-agenda-match-view): New - customization groups. + * org-agenda.el (org-agenda-todo-list, org-agenda-match-view): + New customization groups. (org-agenda-tags-todo-honor-ignore-options): New option. (org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item): New function. - (org-agenda-get-todos): Use - `org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item'. + (org-agenda-get-todos): + Use `org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item'. 2009-01-25 Carsten Dominik <carsten.dominik@gmail.com> - * org-exp.el (org-export-format-source-code-or-example): Escape - HTML characters also in examples that anre not treated with + * org-exp.el (org-export-format-source-code-or-example): + Escape HTML characters also in examples that anre not treated with htmlize. Also, just switch to EXAMPLE processing if we do not have a good version of htmlize. @@ -10515,8 +10497,8 @@ 2009-01-25 Carsten Dominik <carsten.dominik@gmail.com> - * org-export-latex.el (org-export-latex-quotation-marks): Use - `org-if-unprotected-1'. + * org-export-latex.el (org-export-latex-quotation-marks): + Use `org-if-unprotected-1'. (org-export-latex-set-initial-vars): Check for class definition in property. @@ -10526,8 +10508,8 @@ * org-compat.el (org-count-lines): New function. - * org-exp.el (org-export-format-source-code-or-example): Handle - switches related to text areas. + * org-exp.el (org-export-format-source-code-or-example): + Handle switches related to text areas. * org.el (org-activate-footnote-links): Don't allow match inside a link. @@ -10562,17 +10544,17 @@ * org.el (org-image-file-name-regexp, org-file-image-p): Allow the list of extensions to be a parameter. - * org-exp.el (org-export-html-inline-image-extensions): New - variable. + * org-exp.el (org-export-html-inline-image-extensions): + New variable. - * org-agenda.el (org-prepare-agenda): Use - `org-agenda-block-separator'. + * org-agenda.el (org-prepare-agenda): + Use `org-agenda-block-separator'. (org-agenda-block-separator): New option. 2009-01-25 Carsten Dominik <carsten.dominik@gmail.com> - * org-export-latex.el (org-export-latex-tables): Call - `org-table-clean-before-export' with the new optional argument. + * org-export-latex.el (org-export-latex-tables): + Call `org-table-clean-before-export' with the new optional argument. * org-exp.el (org-table-clean-before-export): New optional parameter MAYBE-QUOTED, allows for quoted characters like \# in @@ -10583,8 +10565,8 @@ * org-plot.el (org-plot/gnuplot): Fix text-ind parameter for histograms. - * org-colview.el (org-colview-construct-allowed-dates): Better - error catching when a date/time property does not have allowed + * org-colview.el (org-colview-construct-allowed-dates): + Better error catching when a date/time property does not have allowed values defined. * org-colview-xemacs.el (org-colview-construct-allowed-dates): @@ -10613,8 +10595,8 @@ 2009-01-25 Carsten Dominik <carsten.dominik@gmail.com> - * org-compat.el (org-fit-window-to-buffer): Use - `window-full-width-p'. + * org-compat.el (org-fit-window-to-buffer): + Use `window-full-width-p'. * org-export-latex.el (org-export-latex-fixed-width): Enforce the space after the colon in short examples. @@ -10670,8 +10652,8 @@ (org-timer-stop): New command. (org-timer-seconds): Return correct time when timer is paused. (org-timer-mode-line-timer): New variable. - (org-timer-set-mode-line, org-timer-update-mode-line): New - functions. + (org-timer-set-mode-line, org-timer-update-mode-line): + New functions. * org.el (org-insert-heading): Handle new value `auto' for `org-blank-before-new-entry'. @@ -10720,19 +10702,19 @@ * org-exp.el (org-export-preprocess-string): Remove clock lines and timestamps already in the preprocesor. - (org-export-remove-timestamps, org-export-remove-clock-lines): New - functions. + (org-export-remove-timestamps, org-export-remove-clock-lines): + New functions. (org-export-as-ascii, org-export-as-html): Add the timestamps parameter to the preprocessor parameter list. * org-list.el (org-list-parse-list): Parse for checkboxes. (org-list-to-generic): Introduce and handle new parameters :cbon and :cboff. - (org-list-to-latex, org-list-to-html, org-list-to-texinfo): Add - optional parameter PARAMS. + (org-list-to-latex, org-list-to-html, org-list-to-texinfo): + Add optional parameter PARAMS. - * org-export-latex.el (org-export-latex-special-chars): Fix - problems with interpreting dollar signs. + * org-export-latex.el (org-export-latex-special-chars): + Fix problems with interpreting dollar signs. (org-inside-latex-math-p): New function. (org-export-latex-preprocess): Protect all the math fragments. @@ -10744,8 +10726,8 @@ * org-agenda.el (org-run-agenda-series): Have series options set when finalizing the agenda. - * org-exp.el (org-export-format-source-code-or-example): Protect - the converted examples. + * org-exp.el (org-export-format-source-code-or-example): + Protect the converted examples. * org.el (org-set-regexps-and-options): Fix the regexp `org-complex-heading-regexp'. @@ -10789,8 +10771,8 @@ * org-macs.el (org-re): Handle the [:word:] class. - * org-exp.el (org-export-preprocess-string): Call - `org-export-protect-colon-examples'. + * org-exp.el (org-export-preprocess-string): + Call `org-export-protect-colon-examples'. (org-export-protect-colon-examples): Rename from `org-export-protect-examples', and scope limited to lines starting with a colon. @@ -10820,8 +10802,8 @@ (org-export-latex-preprocess): Treat multiple references to a footnote. - * org-exp.el (org-export-preprocess-string): Call - `org-footnote-normalize'. + * org-exp.el (org-export-preprocess-string): + Call `org-footnote-normalize'. (org-export-as-ascii, org-export-as-html): Pass footnote variable to preprocessor. (org-export-as-html): Treat multiple references to a footnote. @@ -10832,8 +10814,8 @@ links. * org.el (org-bracket-link-analytic-regexp++): New variable. - (org-make-link-regexps): Initialize - `org-bracket-link-analytic-regexp++'. + (org-make-link-regexps): + Initialize `org-bracket-link-analytic-regexp++'. (org-store-link): Implement special case in edit-src buffer. (org-insert-link): No use of ide to insert stored links. (org-link-search): Implement special case for coderefs. @@ -10861,8 +10843,8 @@ 2009-01-16 Glenn Morris <rgm@gnu.org> - * org-mouse.el (org-mouse-show-context-menu): Use - mouse-menu-major-mode-map, if defined, rather than the obsolete + * org-mouse.el (org-mouse-show-context-menu): + Use mouse-menu-major-mode-map, if defined, rather than the obsolete mouse-major-mode-menu. 2008-12-23 Carsten Dominik <dominik@science.uva.nl> @@ -10887,8 +10869,8 @@ 2008-12-20 Carsten Dominik <carsten.dominik@gmail.com> - * org.el (org-get-refile-targets, org-refile-get-location): Use - expanded file name to improve comparison. + * org.el (org-get-refile-targets, org-refile-get-location): + Use expanded file name to improve comparison. 2008-12-20 Carsten Dominik <carsten.dominik@gmail.com> @@ -10900,12 +10882,12 @@ * org-export-latex.el (org-export-latex-links): Fix bug with undefined label. - * org-table.el (org-table-get-specials): Set - `org-table-current-last-data-line'. + * org-table.el (org-table-get-specials): + Set `org-table-current-last-data-line'. (org-table-current-last-data-line): New variable. (org-table-insert-column, org-table-delete-column) - (org-table-move-column, org-table-fix-formulas): Call - `org-table-fix-formulas' a second time to fix the $LR references. + (org-table-move-column, org-table-fix-formulas): + Call `org-table-fix-formulas' a second time to fix the $LR references. (org-table-get-specials): Add the $LR references to the tables. (org-table-get-formula): Do not offer last-row names as LHS of formulas. @@ -10959,8 +10941,8 @@ * org.el (org-refile): Avoid refiling to within the region to be refiled. - * org-export-latex.el (org-export-latex-special-chars): Replace - special characters also in tables. + * org-export-latex.el (org-export-latex-special-chars): + Replace special characters also in tables. * org-agenda.el (org-agenda-change-all-lines): New argument FORCE-TAGS. @@ -11008,8 +10990,8 @@ (org-export-as-latex): Pass RBEG to `org-export-latex-first-lines'. (org-export-latex-make-header): Add some hard space after the table of contents. - (org-export-latex-first-lines): Accept RBEG argument. Mark - exported text so that it will be excuded in further steps. + (org-export-latex-first-lines): Accept RBEG argument. + Mark exported text so that it will be excuded in further steps. * org-table.el (org-table-get-specials): Make @0 reference the last line in a table. @@ -11029,8 +11011,8 @@ * org-exp.el (org-export-html-style-default): Add style definitions for the figure div. - (org-export-preprocess-string, org-export-as-html): Implement - attribute, label, and caption handling. + (org-export-preprocess-string, org-export-as-html): + Implement attribute, label, and caption handling. (org-export-attach-captions-and-attributes): New function. (org-export-html-format-image): New function. (org-format-org-table-html): Implement attribute, label, and @@ -11118,8 +11100,8 @@ * org-w3m.el (w3m-minor-mode-hook): Also add the special copy command to the `w3m-minor-mode-map'. - * org-archive.el (org-archive-to-archive-sibling): Protect - `this-command' to avoid appending kills during archiving. + * org-archive.el (org-archive-to-archive-sibling): + Protect `this-command' to avoid appending kills during archiving. * org-exp.el (org-export-with-priority): New variable. (org-export-add-options-to-plist): Use `org-export-plist-vars' @@ -11147,8 +11129,8 @@ 2008-12-07 Carsten Dominik <carsten.dominik@gmail.com> * org.el (org-tags-exclude-from-inheritance): New option. - (org-tag-inherit-p, org-remove-uniherited-tags): Respect - `org-tags-exclude-from-inheritance'. + (org-tag-inherit-p, org-remove-uniherited-tags): + Respect `org-tags-exclude-from-inheritance'. * org-agenda.el (org-agenda-show-inherited-tags): New option. (org-format-agenda-item): Add inherited tags to the agenda line @@ -11206,8 +11188,8 @@ accidentially overwritten by last commit to Emacs. * org.el (org-outline-path-complete-in-steps): New option. - (org-refile-get-location): Honor - `org-outline-path-complete-in-steps'. + (org-refile-get-location): + Honor `org-outline-path-complete-in-steps'. (org-agenda-change-all-lines, org-tags-sparse-tree) (org-time-string-to-absolute, org-small-year-to-year) (org-link-escape): Re-apply changes accidentially overwritten @@ -11230,8 +11212,8 @@ line before the first headline to always be included. This is to not miss a commented target. - * org-mouse.el (org-mouse-insert-item): Call - `org-indent-to-column' instead of `indent-to', for XEmacs + * org-mouse.el (org-mouse-insert-item): + Call `org-indent-to-column' instead of `indent-to', for XEmacs compatibility. * org.el (org-refile-targets): Fix customize definition so @@ -11254,18 +11236,18 @@ 2008-11-23 Carsten Dominik <carsten.dominik@gmail.com> - * org-remember.el (org-remember-apply-template): Use - `org-substring-no-properties'. + * org-remember.el (org-remember-apply-template): + Use `org-substring-no-properties'. * org-compat.el (org-substring-no-properties): New function. - * org-remember.el (org-remember-apply-template): Use - `org-substring-no-properties' for compatibility. + * org-remember.el (org-remember-apply-template): + Use `org-substring-no-properties' for compatibility. - * org-list.el (org-list-two-spaces-after-bullet-regexp): New - option. - (org-fix-bullet-type): Respect - `org-list-two-spaces-after-bullet-regexp'. + * org-list.el (org-list-two-spaces-after-bullet-regexp): + New option. + (org-fix-bullet-type): + Respect `org-list-two-spaces-after-bullet-regexp'. * org-clock.el (org-clock-load): Clean up the code. @@ -11330,8 +11312,8 @@ (org-set-property, org-delete-property) (org-delete-property-globally): Use `org-ido-completing-read'. - * org-remember.el (org-remember-apply-template): Use - `org-ido-completing-read'. + * org-remember.el (org-remember-apply-template): + Use `org-ido-completing-read'. * org-publish.el (org-publish): Use `org-ido-completing-read'. @@ -11339,14 +11321,14 @@ (org-insert-columns-dblock): Use `org-ido-completing-read'. * org-colview-xemacs.el (org-columns-edit-value) - (org-columns-new, org-insert-columns-dblock): Use - `org-ido-completing-read'. + (org-columns-new, org-insert-columns-dblock): + Use `org-ido-completing-read'. - * org-attach.el (org-attach-delete-one, org-attach-open): Use - `org-ido-completing-read'. + * org-attach.el (org-attach-delete-one, org-attach-open): + Use `org-ido-completing-read'. - * org-agenda.el (org-todo-list, org-agenda-filter-by-tag): Use - `org-ido-completing-read'. + * org-agenda.el (org-todo-list, org-agenda-filter-by-tag): + Use `org-ido-completing-read'. * org.el (org-time-today): New function. (org-matcher-time): Use `org-time-today'. Add special treatment @@ -11361,8 +11343,8 @@ 2008-11-23 Carsten Dominik <carsten.dominik@gmail.com> - * org-export-latex.el (org-export-latex-subcontent): Interprete - target aliases as additonal labels. + * org-export-latex.el (org-export-latex-subcontent): + Interprete target aliases as additonal labels. * org-exp.el (org-export-target-aliases): New variable. (org-export-preprocess-string) @@ -11409,8 +11391,8 @@ * org-vm.el (org-vm-follow-link): Require `vm-search'. - * org.el (org-up-heading-safe, org-forward-same-level): Always - call `org-back-to-heading' instead of `outline-back-to-heading'. + * org.el (org-up-heading-safe, org-forward-same-level): + Always call `org-back-to-heading' instead of `outline-back-to-heading'. (org-back-to-heading): New wrapper around outline-back-to-heading, with a useful error message telling where the error happened. @@ -11516,8 +11498,8 @@ * org.el (org-link-abbrev-alist): Improve customization type. - * org-attach.el (org-attach-expand-link, org-attach-expand): New - functions. + * org-attach.el (org-attach-expand-link, org-attach-expand): + New functions. * org-agenda.el (org-agenda-get-progress): Rename from `org-get-closed'. Implement searching for state changes as well. @@ -11556,8 +11538,8 @@ * org-exp.el (org-export-as-html): Make sure that <hr/> is between paragraphs, not inside. - * org.el (org-todo): Quote - `org-agenda-headline-snapshot-before-repeat'. + * org.el (org-todo): + Quote `org-agenda-headline-snapshot-before-repeat'. * org-exp.el (org-export-as-html): Fully process link descriptions. (org-export-html-format-desc): New function. @@ -11572,14 +11554,14 @@ really, a preliminary and incomplete version was present earlier, but not used). - * org.el (org-fast-todo-selection, org-fast-tag-selection): Use - `org-fit-window-to-buffer'. + * org.el (org-fast-todo-selection, org-fast-tag-selection): + Use `org-fit-window-to-buffer'. * org-exp.el (org-export): Use `org-fit-window-to-buffer'. * org-agenda.el (org-agenda-get-restriction-and-command) - (org-fit-agenda-window, org-agenda-convert-date): Use - `org-fit-window-to-buffer'. + (org-fit-agenda-window, org-agenda-convert-date): + Use `org-fit-window-to-buffer'. * org-exp.el (org-export-as-html): Process href links through `org-export-html-format-href'. @@ -11602,8 +11584,8 @@ (org-export-html-style-default): Mark style definitions as unparsed CDATA. - * org-publish.el (org-publish-validate-link): Function - re-introduced. + * org-publish.el (org-publish-validate-link): + Function re-introduced. 2008-11-12 Charles Sebold <csebold@gmail.com> @@ -11748,8 +11730,8 @@ 2008-10-26 Bastien Guerry <bzg@altern.org> - * org-export-latex.el (org-export-latex-classes): Add - \usepackage{graphicx} to the default list of packages. + * org-export-latex.el (org-export-latex-classes): + Add \usepackage{graphicx} to the default list of packages. 2008-10-26 Carsten Dominik <dominik@science.uva.nl> @@ -11763,8 +11745,8 @@ (org-add-log-note): Mask prefix argument when immediately storing the note. - * org-agenda.el (org-agenda-filter-effort-default-operator): New - option. + * org-agenda.el (org-agenda-filter-effort-default-operator): + New option. 2008-10-26 James TD Smith <ahktenzero@mohorovi.cc> @@ -11797,8 +11779,8 @@ 2008-10-26 Carsten Dominik <dominik@science.uva.nl> - * org.el (org-add-log-setup): Respect - `org-log-state-notes-insert-after-drawers'. + * org.el (org-add-log-setup): + Respect `org-log-state-notes-insert-after-drawers'. (org-log-state-notes-insert-after-drawers): New option. (org-todo-trigger-tag-changes): New function. (org-todo): Call `org-todo-trigger-tag-changes'. @@ -11833,8 +11815,8 @@ 2008-10-26 Carsten Dominik <dominik@science.uva.nl> - * org-export-latex.el (org-export-latex-preprocess): Improve - quoting of LaTeX environments. + * org-export-latex.el (org-export-latex-preprocess): + Improve quoting of LaTeX environments. 2008-10-19 Eli Zaretskii <eliz@gnu.org> @@ -11889,8 +11871,8 @@ * org-attach.el (org-attach-auto-tag): New option. (org-attach-tag, org-attach-untag): New functions. - (org-attach-attach, org-attach-new, org-attach-sync): Call - `org-attach-tag'. + (org-attach-attach, org-attach-new, org-attach-sync): + Call `org-attach-tag'. (org-attach-delete): Call `org-attach-untag'. * org-table.el (orgtbl-self-insert-command): Make this work for @@ -11917,8 +11899,8 @@ * org-exp.el (org-infile-export-plist): Put the content of #+LATEX_HEADER: into the property :latex-header-extra. - * org-colview.el (org-columns-get-format-and-top-level): Remove - resetting the marker. + * org-colview.el (org-columns-get-format-and-top-level): + Remove resetting the marker. * org-colview-xemacs.el (org-columns-get-format-and-top-level): Remove resetting the marker. @@ -11930,8 +11912,8 @@ * org-exp.el (org-infile-export-plist): Allow multiple STYLE lines. * org.el (org-entry-get-multivalued-property) - (org-entry-protect-space, org-entry-restore-space): New - functions. + (org-entry-protect-space, org-entry-restore-space): + New functions. (org-file-apps-defaults-macosx): Let postscript files be opened by preview. (org-time-stamp-inactive): Call `org-time-stamp'. @@ -11966,8 +11948,8 @@ * org-bbdb.el (org-bbdb-anniversaries): Require bbdb in `org-bbdb-anniversaries'. - * org.el (org-get-next-sibling, org-forward-same-level): New - functions, similar to the outline versions, but invisible headings + * org.el (org-get-next-sibling, org-forward-same-level): + New functions, similar to the outline versions, but invisible headings are OK. 2008-10-12 Bastien Guerry <bzg@altern.org> @@ -12092,15 +12074,15 @@ (org-entries-lessp): Implement sorting by TODO state. (org-cmp-todo-state): New defsubst. - * org-colview.el (org-colview-construct-allowed-dates): New - function. - (org-columns-next-allowed-value): Use - `org-colview-construct-allowed-dates'. + * org-colview.el (org-colview-construct-allowed-dates): + New function. + (org-columns-next-allowed-value): + Use `org-colview-construct-allowed-dates'. - * org-colview-xemacs.el (org-colview-construct-allowed-dates): New - function. - (org-columns-next-allowed-value): Use - `org-colview-construct-allowed-dates'. + * org-colview-xemacs.el (org-colview-construct-allowed-dates): + New function. + (org-columns-next-allowed-value): + Use `org-colview-construct-allowed-dates'. * org.el (org-protect-slash): New function. (org-get-refile-targets): Use `org-protect-slash'. @@ -12108,8 +12090,8 @@ * org-agenda.el (org-global-tags-completion-table): New variable. * org-exp.el (org-export-handle-export-tags): New function. - (org-export-preprocess-string): Call - `org-export-handle-export-tags'. + (org-export-preprocess-string): + Call `org-export-handle-export-tags'. * org-publish.el (org-publish-expand-components): Function removed. (org-publish-expand-projects): Allow components to have components. @@ -12119,8 +12101,8 @@ (org-yank-and-fold-if-subtree): New function. * org-agenda.el (org-agenda-todayp): New function. - (org-agenda-get-deadlines, org-agenda-get-scheduled): Use - `org-agenda-todayp'. + (org-agenda-get-deadlines, org-agenda-get-scheduled): + Use `org-agenda-todayp'. * org.el (org-insert-heading-respect-content) (org-insert-todo-heading-respect-content): New commands. @@ -12228,11 +12210,11 @@ * org-agenda.el (org-agenda-align-tags): Fix bug with malformed face property. - * org-colview.el (org-columns-display-here): Use - `org-columns-modify-value-for-display-function'. + * org-colview.el (org-columns-display-here): + Use `org-columns-modify-value-for-display-function'. - * org-colview-xemacs.el (org-columns-display-here): Use - `org-columns-modify-value-for-display-function'. + * org-colview-xemacs.el (org-columns-display-here): + Use `org-columns-modify-value-for-display-function'. * org.el (org-columns-modify-value-for-display-function): New option. @@ -12289,14 +12271,14 @@ 2008-07-24 Carsten Dominik <dominik@science.uva.nl> - * org-exp.el (org-export-region-as-html, org-export-as-html): Make - sure that calls from `org-export-region-as-html' do not do the + * org-exp.el (org-export-region-as-html, org-export-as-html): + Make sure that calls from `org-export-region-as-html' do not do the special check for a subtree. * org-agenda.el (org-batch-store-agenda-views): Fix parsing bug. - * org.el (org-open-file): Use - `org-open-directory-means-index-dot-org'. + * org.el (org-open-file): + Use `org-open-directory-means-index-dot-org'. (org-open-directory-means-index-dot-org): New option. * org.el (org-make-link-string): Remove link attributes from @@ -12312,8 +12294,8 @@ * org.el (org-narrow-to-subtree): Do not include the final newline into the narrowed region. - * org-agenda.el (org-agenda-custom-commands-local-options): Fix - bug with user-define skipping condition. + * org-agenda.el (org-agenda-custom-commands-local-options): + Fix bug with user-define skipping condition. * org-agenda.el (org-agenda-get-restriction-and-command): Fix typo. @@ -12332,8 +12314,8 @@ * org-publish.el (org-publish-find-title): Bug fix. (org-publish-org-index): Implement new :index-style option. - * org-publish.el (org-publish-timestamp-filename): Use - SHA1-encoded file names in the timestamp directory. + * org-publish.el (org-publish-timestamp-filename): + Use SHA1-encoded file names in the timestamp directory. * org-publish.el (org-publish-needed-p): Be verbose about files published and files skipped. @@ -12475,8 +12457,8 @@ `org-diary-to-ical-string' out of the loop, and kill the buffer afterwords. - * org-remember.el (org-remember-visit-immediately): Position - cursor after moving to the note. + * org-remember.el (org-remember-visit-immediately): + Position cursor after moving to the note. (org-remember-apply-template): Use a text property to record the cursor position. (org-remember-handler): Align tags after pasting the note. @@ -12519,8 +12501,8 @@ 2008-06-17 Carsten Dominik <dominik@science.uva.nl> * org-remember.el (org-jump-to-target-location): New variable. - (org-remember-apply-template): Set - `org-remember-apply-template' if requested by template. + (org-remember-apply-template): + Set `org-remember-apply-template' if requested by template. (org-remember-handler): Start an idle timer to jump to remember location. @@ -12570,8 +12552,8 @@ 2008-06-17 Carsten Dominik <dominik@science.uva.nl> - * org-agenda.el (org-agenda-columns-remove-prefix-from-item): New - option. + * org-agenda.el (org-agenda-columns-remove-prefix-from-item): + New option. * org-colview.el (org-agenda-columns-cleanup-item): New function. @@ -12692,11 +12674,11 @@ * org-clock.el (org-clock-display, org-clock-out) (org-update-mode-line): Use `org-time-clocksum-format'. - * org-colview-xemacs.el (org-columns-number-to-string): Use - `org-time-clocksum-format'. + * org-colview-xemacs.el (org-columns-number-to-string): + Use `org-time-clocksum-format'. - * org-colview.el (org-columns-number-to-string): Use - `org-time-clocksum-format'. + * org-colview.el (org-columns-number-to-string): + Use `org-time-clocksum-format'. 2008-06-17 Carsten Dominik <dominik@science.uva.nl> @@ -12724,8 +12706,8 @@ (org-export-preprocess-string): Implement the COMMENT environment. - * org-export-latex.el (org-export-latex-preprocess): Implement - VERSE environment. + * org-export-latex.el (org-export-latex-preprocess): + Implement VERSE environment. 2008-06-17 Carsten Dominik <dominik@science.uva.nl> @@ -12780,8 +12762,8 @@ 2008-06-17 Carsten Dominik <dominik@science.uva.nl> - * org.el (org-remove-double-quotes, org-file-contents): New - functions. + * org.el (org-remove-double-quotes, org-file-contents): + New functions. * org-exp.el (org-infile-export-plist): Also parse the contents of #+SETUPFILE files, recursively. @@ -12790,8 +12772,8 @@ contents of #+SETUPFILE files, recursively. * org-exp.el (org-export-handle-include-files): New function. - (org-export-preprocess-string): Call - `org-export-handle-include-files'. + (org-export-preprocess-string): + Call `org-export-handle-include-files'. * org.el (org-delete-property-globally) (org-delete-property, org-set-property): Ignore case during @@ -12819,8 +12801,8 @@ * org.el (org-set-font-lock-defaults): Make the description tag bold. - * org-exp.el (org-export-as-html, org-close-li): Implement - description lists. + * org-exp.el (org-export-as-html, org-close-li): + Implement description lists. 2008-06-17 Jason Riedy <jason@acm.org> @@ -12901,7 +12883,7 @@ ;; add-log-time-zone-rule: t ;; End: - Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2008-2011 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -12918,4 +12900,3 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. -;; arch-tag: a9bdcf06-7c2d-4b5a-bf7a-c5e7b706f67c diff --git a/lisp/org/ob-C.el b/lisp/org/ob-C.el index da0e76894f1..6d81e1978fa 100644 --- a/lisp/org/ob-C.el +++ b/lisp/org/ob-C.el @@ -1,6 +1,6 @@ ;;; ob-C.el --- org-babel functions for C and similar languages -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research @@ -189,6 +189,5 @@ of the same value." (provide 'ob-C) -;; arch-tag: 8f49e462-54e3-417b-9a8d-423864893b37 ;;; ob-C.el ends here diff --git a/lisp/org/ob-R.el b/lisp/org/ob-R.el index 1f4fd87b0a3..5f94240f22f 100644 --- a/lisp/org/ob-R.el +++ b/lisp/org/ob-R.el @@ -1,6 +1,6 @@ ;;; ob-R.el --- org-babel functions for R code evaluation -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Eric Schulte, Dan Davison ;; Keywords: literate programming, reproducible research, R, statistics @@ -298,6 +298,5 @@ Insert hline if column names in output have been requested." (provide 'ob-R) -;; arch-tag: cd4c7298-503b-450f-a3c2-f3e74b630237 ;;; ob-R.el ends here diff --git a/lisp/org/ob-asymptote.el b/lisp/org/ob-asymptote.el index ab2abda28d8..06407542468 100644 --- a/lisp/org/ob-asymptote.el +++ b/lisp/org/ob-asymptote.el @@ -1,6 +1,6 @@ ;;; ob-asymptote.el --- org-babel functions for asymptote evaluation -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research @@ -159,6 +159,5 @@ of int, where every cell must be of int type." (provide 'ob-asymptote) -;; arch-tag: f2f5bd0d-78e8-412b-8e6c-6dadc94cc06b ;;; ob-asymptote.el ends here diff --git a/lisp/org/ob-calc.el b/lisp/org/ob-calc.el index 287bad31a29..8682a06e243 100644 --- a/lisp/org/ob-calc.el +++ b/lisp/org/ob-calc.el @@ -1,6 +1,6 @@ ;;; ob-calc.el --- org-babel functions for calc code evaluation -;; Copyright (C) 2010 Free Software Foundation, Inc +;; Copyright (C) 2010-2011 Free Software Foundation, Inc ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research @@ -92,6 +92,5 @@ (provide 'ob-calc) -;; arch-tag: 5c57a3b7-5818-4c6c-acda-7a94831a6449 ;;; ob-calc.el ends here diff --git a/lisp/org/ob-clojure.el b/lisp/org/ob-clojure.el index d88c54b6dbe..f9087e8358e 100644 --- a/lisp/org/ob-clojure.el +++ b/lisp/org/ob-clojure.el @@ -1,6 +1,6 @@ ;;; ob-clojure.el --- org-babel functions for clojure evaluation -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Joel Boehland, Eric Schulte ;; Keywords: literate programming, reproducible research @@ -83,6 +83,5 @@ (provide 'ob-clojure) -;; arch-tag: a43b33f2-653e-46b1-ac56-2805cf05b7d1 ;;; ob-clojure.el ends here diff --git a/lisp/org/ob-comint.el b/lisp/org/ob-comint.el index 064aad539c2..7607f802914 100644 --- a/lisp/org/ob-comint.el +++ b/lisp/org/ob-comint.el @@ -1,6 +1,6 @@ ;;; ob-comint.el --- org-babel functions for interaction with comint buffers -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research, comint @@ -158,6 +158,5 @@ FILE exists at end of evaluation." (provide 'ob-comint) -;; arch-tag: 9adddce6-0864-4be3-b0b5-6c5157dc7889 ;;; ob-comint.el ends here diff --git a/lisp/org/ob-css.el b/lisp/org/ob-css.el index 48ea9e3f937..6c96d53a993 100644 --- a/lisp/org/ob-css.el +++ b/lisp/org/ob-css.el @@ -1,6 +1,6 @@ ;;; ob-css.el --- org-babel functions for css evaluation -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research @@ -44,6 +44,5 @@ CSS does not support sessions." (provide 'ob-css) -;; arch-tag: f4447e8c-50ab-41f9-b322-b7b9574d9fbe ;;; ob-css.el ends here diff --git a/lisp/org/ob-ditaa.el b/lisp/org/ob-ditaa.el index 097f938e92d..336ca8cde7f 100644 --- a/lisp/org/ob-ditaa.el +++ b/lisp/org/ob-ditaa.el @@ -1,6 +1,6 @@ ;;; ob-ditaa.el --- org-babel functions for ditaa evaluation -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research @@ -69,6 +69,5 @@ This function is called by `org-babel-execute-src-block'." (provide 'ob-ditaa) -;; arch-tag: 492cd006-07d9-4fac-bef6-5bb60b48842e ;;; ob-ditaa.el ends here diff --git a/lisp/org/ob-dot.el b/lisp/org/ob-dot.el index 36baddb1cd3..09476cd2592 100644 --- a/lisp/org/ob-dot.el +++ b/lisp/org/ob-dot.el @@ -1,6 +1,6 @@ ;;; ob-dot.el --- org-babel functions for dot evaluation -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research @@ -85,6 +85,5 @@ This function is called by `org-babel-execute-src-block'." (provide 'ob-dot) -;; arch-tag: 817d0516-7b47-4f77-a8b2-2aadd8e4d0e2 ;;; ob-dot.el ends here diff --git a/lisp/org/ob-emacs-lisp.el b/lisp/org/ob-emacs-lisp.el index df6f505ffea..9b9fe68a25a 100644 --- a/lisp/org/ob-emacs-lisp.el +++ b/lisp/org/ob-emacs-lisp.el @@ -1,6 +1,6 @@ ;;; ob-emacs-lisp.el --- org-babel functions for emacs-lisp code evaluation -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc +;; Copyright (C) 2009-2011 Free Software Foundation, Inc ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research @@ -66,6 +66,5 @@ (provide 'ob-emacs-lisp) -;; arch-tag: e9a3acca-dc84-472a-9f5a-23c35befbcd6 ;;; ob-emacs-lisp.el ends here diff --git a/lisp/org/ob-eval.el b/lisp/org/ob-eval.el index a71cb0dd691..84d0354fc77 100644 --- a/lisp/org/ob-eval.el +++ b/lisp/org/ob-eval.el @@ -1,6 +1,6 @@ ;;; ob-eval.el --- org-babel functions for external code evaluation -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research, comint @@ -257,6 +257,5 @@ This buffer is named by `org-babel-error-buffer-name'." (provide 'ob-eval) -;; arch-tag: 5328b17f-957d-42d9-94da-a2952682d04d ;;; ob-eval.el ends here diff --git a/lisp/org/ob-exp.el b/lisp/org/ob-exp.el index 8b6914c903c..1be45198e0d 100644 --- a/lisp/org/ob-exp.el +++ b/lisp/org/ob-exp.el @@ -1,6 +1,6 @@ ;;; ob-exp.el --- Exportation of org-babel source blocks -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Eric Schulte, Dan Davison ;; Keywords: literate programming, reproducible research @@ -323,6 +323,5 @@ inhibit insertion of results into the buffer." (provide 'ob-exp) -;; arch-tag: 523abf4c-76d1-44ed-9f27-e3bddf34bf0f ;;; ob-exp.el ends here diff --git a/lisp/org/ob-gnuplot.el b/lisp/org/ob-gnuplot.el index 423e47e8669..41b47102d65 100644 --- a/lisp/org/ob-gnuplot.el +++ b/lisp/org/ob-gnuplot.el @@ -1,6 +1,6 @@ ;;; ob-gnuplot.el --- org-babel functions for gnuplot evaluation -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research @@ -230,6 +230,5 @@ Pass PARAMS through to `orgtbl-to-generic' when exporting TABLE." (provide 'ob-gnuplot) -;; arch-tag: 50490ace-a9e1-4b29-a6e5-0db9f16c610b ;;; ob-gnuplot.el ends here diff --git a/lisp/org/ob-haskell.el b/lisp/org/ob-haskell.el index 734e1f6c891..43c14deb407 100644 --- a/lisp/org/ob-haskell.el +++ b/lisp/org/ob-haskell.el @@ -1,6 +1,6 @@ ;;; ob-haskell.el --- org-babel functions for haskell evaluation -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research @@ -212,6 +212,5 @@ constructs (header arguments, no-web syntax etc...) are ignored." (provide 'ob-haskell) -;; arch-tag: b53f75f3-ba1a-4b05-82d9-a2a0d4e70804 ;;; ob-haskell.el ends here diff --git a/lisp/org/ob-js.el b/lisp/org/ob-js.el index 05f8ea41754..06acfb391bc 100644 --- a/lisp/org/ob-js.el +++ b/lisp/org/ob-js.el @@ -1,6 +1,6 @@ ;;; ob-js.el --- org-babel functions for Javascript -;; Copyright (C) 2010 Free Software Foundation +;; Copyright (C) 2010-2011 Free Software Foundation ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research, js @@ -160,6 +160,5 @@ then create. Return the initialized session." (provide 'ob-js) -;; arch-tag: 84401fb3-b8d9-4bb6-9a90-cbe2d103d494 ;;; ob-js.el ends here diff --git a/lisp/org/ob-keys.el b/lisp/org/ob-keys.el index af8190692cd..d1422c6876f 100644 --- a/lisp/org/ob-keys.el +++ b/lisp/org/ob-keys.el @@ -1,6 +1,6 @@ ;;; ob-keys.el --- key bindings for org-babel -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research @@ -93,6 +93,5 @@ a-list placed behind the generic `org-babel-key-prefix'.") (provide 'ob-keys) -;; arch-tag: 01e348ee-4906-46fa-839a-6b7b6f989048 ;;; ob-keys.el ends here diff --git a/lisp/org/ob-latex.el b/lisp/org/ob-latex.el index 96afbcd92a6..9bb0f318be6 100644 --- a/lisp/org/ob-latex.el +++ b/lisp/org/ob-latex.el @@ -1,6 +1,6 @@ ;;; ob-latex.el --- org-babel functions for latex "evaluation" -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research @@ -175,6 +175,5 @@ Extracted from `org-export-as-pdf' in org-latex.el." (provide 'ob-latex) -;; arch-tag: 1f13f7e2-26de-4c24-9274-9f331d4c6ff3 ;;; ob-latex.el ends here diff --git a/lisp/org/ob-ledger.el b/lisp/org/ob-ledger.el index a02eb6fec86..51f0282c5c0 100644 --- a/lisp/org/ob-ledger.el +++ b/lisp/org/ob-ledger.el @@ -1,6 +1,6 @@ ;;; ob-ledger.el --- org-babel functions for ledger evaluation -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. ;; Author: Eric S Fraga ;; Keywords: literate programming, reproducible research, accounting @@ -67,6 +67,5 @@ called by `org-babel-execute-src-block'." (provide 'ob-ledger) -;; arch-tag: 7bbb529e-95a1-4236-9d29-b0000b918c7c ;;; ob-ledger.el ends here diff --git a/lisp/org/ob-lisp.el b/lisp/org/ob-lisp.el index 600b79ee7af..1a8ad38a199 100644 --- a/lisp/org/ob-lisp.el +++ b/lisp/org/ob-lisp.el @@ -1,6 +1,6 @@ ;;; ob-lisp.el --- org-babel functions for Common Lisp -;; Copyright (C) 2010 Free Software Foundation +;; Copyright (C) 2010-2011 Free Software Foundation ;; Author: David T. O'Toole <dto@gnu.org>, Eric Schulte ;; Keywords: literate programming, reproducible research, lisp @@ -108,6 +108,5 @@ then create. Return the initialized session." (provide 'ob-lisp) -;; arch-tag: 18086168-009f-4947-bbb5-3532375d851d ;;; ob-lisp.el ends here diff --git a/lisp/org/ob-lob.el b/lisp/org/ob-lob.el index 137a6bce9a3..96081c16236 100644 --- a/lisp/org/ob-lob.el +++ b/lisp/org/ob-lob.el @@ -1,6 +1,6 @@ ;;; ob-lob.el --- functions supporting the Library of Babel -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Eric Schulte, Dan Davison ;; Keywords: literate programming, reproducible research @@ -119,6 +119,5 @@ if so then run the appropriate source block from the Library." (provide 'ob-lob) -;; arch-tag: ce0712c9-2147-4019-ba3f-42341b8b474b ;;; ob-lob.el ends here diff --git a/lisp/org/ob-matlab.el b/lisp/org/ob-matlab.el index 192c73d9081..441f9d7a73a 100644 --- a/lisp/org/ob-matlab.el +++ b/lisp/org/ob-matlab.el @@ -1,6 +1,6 @@ ;;; ob-matlab.el --- org-babel support for matlab evaluation -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. ;; Author: Dan Davison ;; Keywords: literate programming, reproducible research @@ -43,6 +43,5 @@ (provide 'ob-matlab) -;; arch-tag: 6b234299-c1f7-4eb1-ace8-7b93344065ac ;;; ob-matlab.el ends here diff --git a/lisp/org/ob-mscgen.el b/lisp/org/ob-mscgen.el index 98230da56a3..3b55f2e27b3 100644 --- a/lisp/org/ob-mscgen.el +++ b/lisp/org/ob-mscgen.el @@ -1,6 +1,6 @@ ;;; ob-msc.el --- org-babel functions for mscgen evaluation -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. ;; Author: Juan Pechiar ;; Keywords: literate programming, reproducible research @@ -81,6 +81,5 @@ ERROR: no output file specified. Add \":file name.png\" to the src header")) (provide 'ob-mscgen) -;; arch-tag: 74695b1e-715f-4b5a-a3a9-d78ee39ba5c8 ;;; ob-msc.el ends here diff --git a/lisp/org/ob-ocaml.el b/lisp/org/ob-ocaml.el index 459dcf336f7..bf34b984c00 100644 --- a/lisp/org/ob-ocaml.el +++ b/lisp/org/ob-ocaml.el @@ -1,6 +1,6 @@ ;;; ob-ocaml.el --- org-babel functions for ocaml evaluation -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research @@ -152,6 +152,5 @@ Emacs-lisp table, otherwise return the results as a string." (provide 'ob-ocaml) -;; arch-tag: 2e815f4d-365e-4d69-b1df-dd17fdd7b7b7 ;;; ob-ocaml.el ends here diff --git a/lisp/org/ob-octave.el b/lisp/org/ob-octave.el index 9fcd825f91e..ae6c1513dee 100644 --- a/lisp/org/ob-octave.el +++ b/lisp/org/ob-octave.el @@ -1,6 +1,6 @@ ;;; ob-octave.el --- org-babel functions for octave and matlab evaluation -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. ;; Author: Dan Davison ;; Keywords: literate programming, reproducible research @@ -259,6 +259,5 @@ This removes initial blank and comment lines and then calls (provide 'ob-octave) -;; arch-tag: d8e5f68b-ba13-440a-a495-b653e989e704 ;;; ob-octave.el ends here diff --git a/lisp/org/ob-org.el b/lisp/org/ob-org.el index c03fa07602a..99c04d8e313 100644 --- a/lisp/org/ob-org.el +++ b/lisp/org/ob-org.el @@ -1,6 +1,6 @@ ;;; ob-org.el --- org-babel functions for org code block evaluation -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research @@ -57,6 +57,5 @@ This function is called by `org-babel-execute-src-block'." (provide 'ob-org) -;; arch-tag: 130af5fe-cc56-46bd-9508-fa0ebd94cb1f ;;; ob-org.el ends here diff --git a/lisp/org/ob-perl.el b/lisp/org/ob-perl.el index 1e0cecb1af0..6309b900111 100644 --- a/lisp/org/ob-perl.el +++ b/lisp/org/ob-perl.el @@ -1,6 +1,6 @@ ;;; ob-perl.el --- org-babel functions for perl evaluation -;; Copyright (C) 2009, 2010 Free Software Foundation +;; Copyright (C) 2009-2011 Free Software Foundation ;; Author: Dan Davison, Eric Schulte ;; Keywords: literate programming, reproducible research @@ -112,6 +112,5 @@ return the value of the last statement in BODY, as elisp." (provide 'ob-perl) -;; arch-tag: 88ef9396-d857-4dc3-8946-5a72bdfa2337 ;;; ob-perl.el ends here diff --git a/lisp/org/ob-plantuml.el b/lisp/org/ob-plantuml.el index fb81dc8e60d..f455bc9bb4c 100644 --- a/lisp/org/ob-plantuml.el +++ b/lisp/org/ob-plantuml.el @@ -1,6 +1,6 @@ ;;; ob-plantuml.el --- org-babel functions for plantuml evaluation -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. ;; Author: Zhang Weize ;; Keywords: literate programming, reproducible research @@ -78,6 +78,5 @@ This function is called by `org-babel-execute-src-block'." (provide 'ob-plantuml) -;; arch-tag: 451f50c5-e779-407e-ad64-70e0e8f161d1 ;;; ob-plantuml.el ends here diff --git a/lisp/org/ob-python.el b/lisp/org/ob-python.el index 27b69bff5ab..b53513a212c 100644 --- a/lisp/org/ob-python.el +++ b/lisp/org/ob-python.el @@ -1,6 +1,6 @@ ;;; ob-python.el --- org-babel functions for python evaluation -;; Copyright (C) 2009, 2010 Free Software Foundation +;; Copyright (C) 2009-2011 Free Software Foundation ;; Author: Eric Schulte, Dan Davison ;; Keywords: literate programming, reproducible research @@ -277,6 +277,5 @@ last statement in BODY, as elisp." (provide 'ob-python) -;; arch-tag: f19b6c3d-dfcb-4a1a-9ce0-45ade1ebc212 ;;; ob-python.el ends here diff --git a/lisp/org/ob-ref.el b/lisp/org/ob-ref.el index 2ca99ca651c..7b06e90f924 100644 --- a/lisp/org/ob-ref.el +++ b/lisp/org/ob-ref.el @@ -1,6 +1,6 @@ ;;; ob-ref.el --- org-babel functions for referencing external data -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Eric Schulte, Dan Davison ;; Keywords: literate programming, reproducible research @@ -224,6 +224,5 @@ Supported reference types are tables and source blocks." (provide 'ob-ref) -;; arch-tag: ace4a4f4-ea38-4dac-8fe6-6f52fcc43b6d ;;; ob-ref.el ends here diff --git a/lisp/org/ob-ruby.el b/lisp/org/ob-ruby.el index 3f2af394603..ae98137735c 100644 --- a/lisp/org/ob-ruby.el +++ b/lisp/org/ob-ruby.el @@ -1,6 +1,6 @@ ;;; ob-ruby.el --- org-babel functions for ruby evaluation -;; Copyright (C) 2009, 2010 Free Software Foundation +;; Copyright (C) 2009-2011 Free Software Foundation ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research @@ -234,6 +234,5 @@ return the value of the last statement in BODY, as elisp." (provide 'ob-ruby) -;; arch-tag: 3e9726db-4520-49e2-b263-e8f571ac88f5 ;;; ob-ruby.el ends here diff --git a/lisp/org/ob-sass.el b/lisp/org/ob-sass.el index b3acc8b8d2c..3348dd4d1d6 100644 --- a/lisp/org/ob-sass.el +++ b/lisp/org/ob-sass.el @@ -1,6 +1,6 @@ ;;; ob-sass.el --- org-babel functions for the sass css generation language -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research @@ -64,6 +64,5 @@ This function is called by `org-babel-execute-src-block'." (provide 'ob-sass) -;; arch-tag: 2954b169-eef4-45ce-a8e5-3e619f0f07ac ;;; ob-sass.el ends here diff --git a/lisp/org/ob-scheme.el b/lisp/org/ob-scheme.el index b2b9fa6a01d..5dda693b9a7 100644 --- a/lisp/org/ob-scheme.el +++ b/lisp/org/ob-scheme.el @@ -1,6 +1,6 @@ ;;; ob-scheme.el --- org-babel functions for Scheme -;; Copyright (C) 2010 Free Software Foundation +;; Copyright (C) 2010-2011 Free Software Foundation ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research, scheme @@ -134,6 +134,5 @@ then create. Return the initialized session." (provide 'ob-scheme) -;; arch-tag: 6b2fe76f-4b25-4e87-ad1c-225b2f282a71 ;;; ob-scheme.el ends here diff --git a/lisp/org/ob-screen.el b/lisp/org/ob-screen.el index 7f4af795499..59e23c4caad 100644 --- a/lisp/org/ob-screen.el +++ b/lisp/org/ob-screen.el @@ -1,6 +1,6 @@ ;;; ob-screen.el --- org-babel support for interactive terminal -;; Copyright (C) 2009, 2010 Free Software Foundation +;; Copyright (C) 2009-2011 Free Software Foundation ;; Author: Benjamin Andresen ;; Keywords: literate programming, interactive shell @@ -142,6 +142,5 @@ The terminal should shortly flicker." (provide 'ob-screen) -;; arch-tag: 908e5afe-89a0-4f27-b982-23f1f2e3bac9 ;;; ob-screen.el ends here diff --git a/lisp/org/ob-sh.el b/lisp/org/ob-sh.el index e153d68b575..6ca52b1f361 100644 --- a/lisp/org/ob-sh.el +++ b/lisp/org/ob-sh.el @@ -1,6 +1,6 @@ ;;; ob-sh.el --- org-babel functions for shell evaluation -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research @@ -166,6 +166,5 @@ return the value of the last statement in BODY." (provide 'ob-sh) -;; arch-tag: 416dd531-c230-4b0a-a5bf-8d948f990f2d ;;; ob-sh.el ends here diff --git a/lisp/org/ob-sql.el b/lisp/org/ob-sql.el index 5bb123d631b..3bd10d6b2bd 100644 --- a/lisp/org/ob-sql.el +++ b/lisp/org/ob-sql.el @@ -1,6 +1,6 @@ ;;; ob-sql.el --- org-babel functions for sql evaluation -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research @@ -121,6 +121,5 @@ This function is called by `org-babel-execute-src-block'." (provide 'ob-sql) -;; arch-tag: a43ff944-6de1-4566-a83c-626814e3dad2 ;;; ob-sql.el ends here diff --git a/lisp/org/ob-sqlite.el b/lisp/org/ob-sqlite.el index 65e8091741f..408ca4e64c4 100644 --- a/lisp/org/ob-sqlite.el +++ b/lisp/org/ob-sqlite.el @@ -1,6 +1,6 @@ ;;; ob-sqlite.el --- org-babel functions for sqlite database interaction -;; Copyright (C) 2010 Free Software Foundation +;; Copyright (C) 2010-2011 Free Software Foundation ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research @@ -144,6 +144,5 @@ Prepare SESSION according to the header arguments specified in PARAMS." (provide 'ob-sqlite) -;; arch-tag: 5c03d7f2-0f72-48b8-bbd1-35aafea248ac ;;; ob-sqlite.el ends here diff --git a/lisp/org/ob-table.el b/lisp/org/ob-table.el index b7f9673c676..e44bb86ca04 100644 --- a/lisp/org/ob-table.el +++ b/lisp/org/ob-table.el @@ -1,6 +1,6 @@ ;;; ob-table.el --- support for calling org-babel functions from tables -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research @@ -120,6 +120,5 @@ example above." (provide 'ob-table) -;; arch-tag: 4234cc7c-4fc8-4e92-abb0-2892de1a493b ;;; ob-table.el ends here diff --git a/lisp/org/ob-tangle.el b/lisp/org/ob-tangle.el index c5ef2a1fcea..67f12eabc01 100644 --- a/lisp/org/ob-tangle.el +++ b/lisp/org/ob-tangle.el @@ -1,6 +1,6 @@ ;;; ob-tangle.el --- extract source code from org-mode files -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research @@ -449,6 +449,5 @@ which enable the original code blocks to be found." (provide 'ob-tangle) -;; arch-tag: 413ced93-48f5-4216-86e4-3fc5df8c8f24 ;;; ob-tangle.el ends here diff --git a/lisp/org/ob.el b/lisp/org/ob.el index 1c9f9fdbc12..33f960f145e 100644 --- a/lisp/org/ob.el +++ b/lisp/org/ob.el @@ -1,6 +1,6 @@ ;;; ob.el --- working with code blocks in org-mode -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Eric Schulte, Dan Davison ;; Keywords: literate programming, reproducible research @@ -1963,6 +1963,5 @@ of `org-babel-temporary-directory'." (provide 'ob) -;; arch-tag: 01a7ebee-06c5-4ee4-a709-e660d28c0af1 ;;; ob.el ends here diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index 6bcbf62da02..9adc180b28e 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el @@ -1,7 +1,6 @@ ;;; org-agenda.el --- Dynamic task and appointment lists for Org -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Keywords: outlines, hypermedia, calendar, wp @@ -8058,6 +8057,5 @@ belonging to the \"Work\" category." (provide 'org-agenda) -;; arch-tag: 77f7565d-7c4b-44af-a2df-9f6f7070cff1 ;;; org-agenda.el ends here diff --git a/lisp/org/org-archive.el b/lisp/org/org-archive.el index e56b01f952a..4a934517cfe 100644 --- a/lisp/org/org-archive.el +++ b/lisp/org/org-archive.el @@ -1,7 +1,6 @@ ;;; org-archive.el --- Archiving for Org-mode -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Keywords: outlines, hypermedia, calendar, wp @@ -466,6 +465,5 @@ This command is set with the variable `org-archive-default-command'." (provide 'org-archive) -;; arch-tag: 0837f601-9699-43c3-8b90-631572ae6c85 ;;; org-archive.el ends here diff --git a/lisp/org/org-ascii.el b/lisp/org/org-ascii.el index 99facb1e431..d5964538a9c 100644 --- a/lisp/org/org-ascii.el +++ b/lisp/org/org-ascii.el @@ -1,7 +1,6 @@ ;;; org-ascii.el --- ASCII export for Org-mode -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Keywords: outlines, hypermedia, calendar, wp @@ -719,5 +718,4 @@ publishing directory." (provide 'org-ascii) -;; arch-tag: aa96f882-f477-4e13-86f5-70d43e7adf3c ;;; org-ascii.el ends here diff --git a/lisp/org/org-attach.el b/lisp/org/org-attach.el index a894064ed84..c9679edc65a 100644 --- a/lisp/org/org-attach.el +++ b/lisp/org/org-attach.el @@ -1,6 +1,6 @@ ;;; org-attach.el --- Manage file attachments to org-mode tasks -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@newartisans.com> ;; Keywords: org data task @@ -418,5 +418,4 @@ prefix." (provide 'org-attach) -;; arch-tag: fce93c2e-fe07-4fa3-a905-e10dcc7a6248 ;;; org-attach.el ends here diff --git a/lisp/org/org-bbdb.el b/lisp/org/org-bbdb.el index 4155f58b5f6..49393db4304 100644 --- a/lisp/org/org-bbdb.el +++ b/lisp/org/org-bbdb.el @@ -1,7 +1,6 @@ ;;; org-bbdb.el --- Support for links to BBDB entries from within Org-mode -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <carsten at orgmode dot org>, ;; Thomas Baumann <thomas dot baumann at ch dot tum dot de> @@ -381,6 +380,5 @@ END:VEVENT\n" (provide 'org-bbdb) -;; arch-tag: 9e4f275d-d080-48c1-b040-62247f66b5c2 ;;; org-bbdb.el ends here diff --git a/lisp/org/org-beamer.el b/lisp/org/org-beamer.el index c88df859f79..7b698da9681 100644 --- a/lisp/org/org-beamer.el +++ b/lisp/org/org-beamer.el @@ -1,6 +1,6 @@ ;;; org-beamer.el --- Beamer-specific LaTeX export for org-mode ;; -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; ;; Version: 7.4 ;; Author: Carsten Dominik <carsten.dominik AT gmail DOT com> @@ -631,6 +631,5 @@ include square brackets." (provide 'org-beamer) -;; arch-tag: 68bac91a-a946-43a3-8173-a9269306f67c ;;; org-beamer.el ends here diff --git a/lisp/org/org-bibtex.el b/lisp/org/org-bibtex.el index e34e1572cd3..0c7edc6cbdb 100644 --- a/lisp/org/org-bibtex.el +++ b/lisp/org/org-bibtex.el @@ -1,6 +1,6 @@ ;;; org-bibtex.el --- Org links to BibTeX entries ;; -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; ;; Author: Bastien Guerry <bzg at altern dot org> ;; Carsten Dominik <carsten dot dominik at gmail dot com> @@ -200,6 +200,5 @@ (provide 'org-bibtex) -;; arch-tag: 83987d5a-01b8-41c7-85bc-77700f1285f5 ;;; org-bibtex.el ends here diff --git a/lisp/org/org-capture.el b/lisp/org/org-capture.el index 5c7b0386e04..fb9365bda75 100644 --- a/lisp/org/org-capture.el +++ b/lisp/org/org-capture.el @@ -1,6 +1,6 @@ ;;; org-capture.el --- Fast note taking in Org-mode -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Keywords: outlines, hypermedia, calendar, wp @@ -359,8 +359,7 @@ for a Remember buffer.") nil " Rem" org-capture-mode-map (org-set-local 'header-line-format - "Capture buffer. Finish `C-c C-c', refile `C-c C-w', abort `C-c C-k'.") - (run-hooks 'org-capture-mode-hook)) + "Capture buffer. Finish `C-c C-c', refile `C-c C-w', abort `C-c C-k'.")) (define-key org-capture-mode-map "\C-c\C-c" 'org-capture-finalize) (define-key org-capture-mode-map "\C-c\C-k" 'org-capture-kill) (define-key org-capture-mode-map "\C-c\C-w" 'org-capture-refile) @@ -1386,6 +1385,5 @@ The template may still contain \"%?\" for cursor positioning." (provide 'org-capture) -;; arch-tag: 986bf41b-8ada-4e28-bf20-e8388a7205a0 ;;; org-capture.el ends here diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el index 93b0b524c80..4e30dd90d80 100644 --- a/lisp/org/org-clock.el +++ b/lisp/org/org-clock.el @@ -1,7 +1,6 @@ ;;; org-clock.el --- The time clocking code for Org-mode -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Keywords: outlines, hypermedia, calendar, wp @@ -2493,7 +2492,6 @@ The details of what will be saved are regulated by the variable (provide 'org-clock) -;; arch-tag: 7b42c5d4-9b36-48be-97c0-66a869daed4c ;;; org-clock.el ends here diff --git a/lisp/org/org-colview.el b/lisp/org/org-colview.el index c4f18c7c640..35a23052e8a 100644 --- a/lisp/org/org-colview.el +++ b/lisp/org/org-colview.el @@ -1,7 +1,6 @@ ;;; org-colview.el --- Column View in Org-mode -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Keywords: outlines, hypermedia, calendar, wp @@ -1537,6 +1536,5 @@ The string should be two numbers joined with a \"-\"." (provide 'org-colview) -;; arch-tag: 61f5128d-747c-4983-9479-e3871fa3d73c ;;; org-colview.el ends here diff --git a/lisp/org/org-compat.el b/lisp/org/org-compat.el index 452a261fd1b..efe54c568b3 100644 --- a/lisp/org/org-compat.el +++ b/lisp/org/org-compat.el @@ -1,7 +1,6 @@ ;;; org-compat.el --- Compatibility code for Org-mode -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Keywords: outlines, hypermedia, calendar, wp @@ -426,6 +425,5 @@ With two arguments, return floor and remainder of their quotient." (provide 'org-compat) -;; arch-tag: a0a0579f-e68c-4bdf-9e55-93768b846bbe ;;; org-compat.el ends here diff --git a/lisp/org/org-complete.el b/lisp/org/org-complete.el index 2eb1f4c3ff5..07c1ba2e4f2 100644 --- a/lisp/org/org-complete.el +++ b/lisp/org/org-complete.el @@ -1,7 +1,6 @@ ;;; org-complete.el --- In-buffer completion code -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; John Wiegley <johnw at gnu dot org> @@ -274,6 +273,5 @@ Complete a language in the first field, the header arguments and switches." (provide 'org-complete) -;; arch-tag: ;;; org-complete.el ends here diff --git a/lisp/org/org-crypt.el b/lisp/org/org-crypt.el index 1d761049bbb..0a6001bf62a 100644 --- a/lisp/org/org-crypt.el +++ b/lisp/org/org-crypt.el @@ -1,6 +1,6 @@ ;;; org-crypt.el --- Public key encryption for org-mode entries -;; Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. ;; Emacs Lisp Archive Entry ;; Filename: org-crypt.el @@ -182,6 +182,5 @@ This setting can also be overridden in the CRYPTKEY property." (provide 'org-crypt) -;; arch-tag: 8202ed2c-221e-4001-9e4b-54674a7e846e ;;; org-crypt.el ends here diff --git a/lisp/org/org-ctags.el b/lisp/org/org-ctags.el index f2c631afe24..3bbfe18e1b4 100644 --- a/lisp/org/org-ctags.el +++ b/lisp/org/org-ctags.el @@ -1,6 +1,6 @@ ;;; org-ctags.el - Integrate Emacs "tags" facility with org mode. ;; -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Paul Sexton <eeeickythump@gmail.com> ;; Version: 7.4 @@ -537,5 +537,4 @@ a new topic." (provide 'org-ctags) -;; arch-tag: 4b1ddd5a-8529-4b17-bcde-96a922d26343 ;;; org-ctags.el ends here diff --git a/lisp/org/org-datetree.el b/lisp/org/org-datetree.el index 8014f8f1f93..47ca287d8fc 100644 --- a/lisp/org/org-datetree.el +++ b/lisp/org/org-datetree.el @@ -1,6 +1,6 @@ ;;; org-datetree.el --- Create date entries in a tree -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Keywords: outlines, hypermedia, calendar, wp @@ -195,6 +195,5 @@ before running this command, even though the command tries to be smart." (provide 'org-datetree) -;; arch-tag: 1daea962-fd08-448b-9f98-6e8b511b3601 ;;; org-datetree.el ends here diff --git a/lisp/org/org-docbook.el b/lisp/org/org-docbook.el index 91ebb971967..e883d71b6f4 100644 --- a/lisp/org/org-docbook.el +++ b/lisp/org/org-docbook.el @@ -1,6 +1,6 @@ ;;; org-docbook.el --- DocBook exporter for org-mode ;; -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; ;; Emacs Lisp Archive Entry ;; Filename: org-docbook.el @@ -1440,5 +1440,4 @@ that need to be preserved in later phase of DocBook exporting." (provide 'org-docbook) -;; arch-tag: a24a127c-d365-4c2a-9e9b-f7dcb0ebfdc3 ;;; org-docbook.el ends here diff --git a/lisp/org/org-docview.el b/lisp/org/org-docview.el index cb0f24139a2..ee39d8afc63 100644 --- a/lisp/org/org-docview.el +++ b/lisp/org/org-docview.el @@ -1,6 +1,6 @@ ;;; org-docview.el --- support for links to doc-view-mode buffers -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Jan Böcker <jan.boecker at jboecker dot de> ;; Keywords: outlines, hypermedia, calendar, wp @@ -88,6 +88,5 @@ and append it." (provide 'org-docview) -;; arch-tag: dd147a78-cce1-481b-b40a-15869417debe ;;; org-docview.el ends here diff --git a/lisp/org/org-entities.el b/lisp/org/org-entities.el index 1c99b9eb5a5..7115972b73e 100644 --- a/lisp/org/org-entities.el +++ b/lisp/org/org-entities.el @@ -1,6 +1,6 @@ ;;; org-entities.el --- Support for special entities in Org-mode -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <carsten at orgmode dot org>, ;; Ulf Stegemann <ulf at zeitform dot de> @@ -568,6 +568,5 @@ Kind can be any of `latex', `html', `ascii', `latin1', or `utf8'." ;; coding: utf-8 ;; End: -;; arch-tag: e6bd163f-7419-4009-9c93-a74623016424 ;;; org-entities.el ends here diff --git a/lisp/org/org-exp-blocks.el b/lisp/org/org-exp-blocks.el index 57087e1dfc7..f5b635838fe 100644 --- a/lisp/org/org-exp-blocks.el +++ b/lisp/org/org-exp-blocks.el @@ -1,7 +1,6 @@ ;;; org-exp-blocks.el --- pre-process blocks when exporting org files -;; Copyright (C) 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Version: 7.4 @@ -352,5 +351,4 @@ other backends, it converts the comment into an EXAMPLE segment." (provide 'org-exp-blocks) -;; arch-tag: 1c365fe9-8808-4f72-bb15-0b00f36d8024 ;;; org-exp-blocks.el ends here diff --git a/lisp/org/org-exp.el b/lisp/org/org-exp.el index d45ef9cdd74..002ad025fbe 100644 --- a/lisp/org/org-exp.el +++ b/lisp/org/org-exp.el @@ -1,7 +1,6 @@ ;;; org-exp.el --- ASCII, HTML, XOXO and iCalendar export for Org-mode -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Keywords: outlines, hypermedia, calendar, wp @@ -2962,7 +2961,6 @@ The depends on the variable `org-export-copy-to-kill'." (provide 'org-exp) -;; arch-tag: 65985fe9-095c-49c7-a7b6-cb4ee15c0a95 ;;; org-exp.el ends here diff --git a/lisp/org/org-faces.el b/lisp/org/org-faces.el index 3f8245758f7..e5877768fe7 100644 --- a/lisp/org/org-faces.el +++ b/lisp/org/org-faces.el @@ -1,7 +1,6 @@ ;;; org-faces.el --- Face definitions for Org-mode. -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Keywords: outlines, hypermedia, calendar, wp @@ -247,9 +246,7 @@ column view defines special faces for each outline level. See the file :group 'org-faces) (defface org-link - '((((class color) (background light)) (:foreground "Purple" :underline t)) - (((class color) (background dark)) (:foreground "Cyan" :underline t)) - (t (:underline t))) + '((t :inherit link)) "Face for links." :group 'org-faces) @@ -718,6 +715,5 @@ level org-n-level-faces" (provide 'org-faces) -;; arch-tag: 9dab5f91-c4b9-4d6f-bac3-1f6211ad0a04 ;;; org-faces.el ends here diff --git a/lisp/org/org-feed.el b/lisp/org/org-feed.el index 32da49b1cb8..07558af462f 100644 --- a/lisp/org/org-feed.el +++ b/lisp/org/org-feed.el @@ -1,6 +1,6 @@ ;;; org-feed.el --- Add RSS feed items to Org files ;; -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Keywords: outlines, hypermedia, calendar, wp @@ -674,5 +674,4 @@ formatted as a string, not the original XML data." (provide 'org-feed) -;; arch-tag: 0929b557-9bc4-47f4-9633-30a12dbb5ae2 ;;; org-feed.el ends here diff --git a/lisp/org/org-footnote.el b/lisp/org/org-footnote.el index 88ffd6e4842..c0ca570b7b7 100644 --- a/lisp/org/org-footnote.el +++ b/lisp/org/org-footnote.el @@ -1,6 +1,6 @@ ;;; org-footnote.el --- Footnote support in Org and elsewhere ;; -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Keywords: outlines, hypermedia, calendar, wp @@ -585,6 +585,5 @@ and all references of a footnote label." (provide 'org-footnote) -;; arch-tag: 1b5954df-fb5d-4da5-8709-78d944dbfc37 ;;; org-footnote.el ends here diff --git a/lisp/org/org-freemind.el b/lisp/org/org-freemind.el index d9486afa0b5..c85b4bac36a 100644 --- a/lisp/org/org-freemind.el +++ b/lisp/org/org-freemind.el @@ -1,6 +1,6 @@ ;;; org-freemind.el --- Export Org files to freemind -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: Lennart Borgman (lennart O borgman A gmail O com) ;; Keywords: outlines, hypermedia, calendar, wp @@ -1237,7 +1237,6 @@ PATH should be a list of steps, where each step has the form (provide 'org-freemind) -;; arch-tag: e7b0d776-94fd-404a-b35e-0f855fae3627 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; org-freemind.el ends here diff --git a/lisp/org/org-gnus.el b/lisp/org/org-gnus.el index fccd3e9ee01..e8424a1e5cd 100644 --- a/lisp/org/org-gnus.el +++ b/lisp/org/org-gnus.el @@ -1,7 +1,6 @@ ;;; org-gnus.el --- Support for links to Gnus groups and messages from within Org-mode -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Tassilo Horn <tassilo at member dot fsf dot org> @@ -258,6 +257,5 @@ If `org-store-link' was called with a prefix arg the meaning of (provide 'org-gnus) -;; arch-tag: 512e0840-58fa-45b3-b456-71e10fa2376d ;;; org-gnus.el ends here diff --git a/lisp/org/org-habit.el b/lisp/org/org-habit.el index b174a1f0879..33c55cf46d1 100644 --- a/lisp/org/org-habit.el +++ b/lisp/org/org-habit.el @@ -1,6 +1,6 @@ ;;; org-habit.el --- The habit tracking code for Org-mode -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw at gnu dot org> ;; Keywords: outlines, hypermedia, calendar, wp @@ -350,6 +350,5 @@ current time." (provide 'org-habit) -;; arch-tag: 64e070d9-bd09-4917-bd44-44465f5ed348 ;;; org-habit.el ends here diff --git a/lisp/org/org-html.el b/lisp/org/org-html.el index 47e82319873..a6933978710 100644 --- a/lisp/org/org-html.el +++ b/lisp/org/org-html.el @@ -1,7 +1,6 @@ ;;; org-html.el --- HTML export for Org-mode -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Keywords: outlines, hypermedia, calendar, wp @@ -2415,5 +2414,4 @@ Replaces invalid characters with \"_\" and then prepends a prefix." (provide 'org-html) -;; arch-tag: 8109d84d-eb8f-460b-b1a8-f45f3a6c7ea1 ;;; org-html.el ends here diff --git a/lisp/org/org-icalendar.el b/lisp/org/org-icalendar.el index d4034fe6d36..e0ea20a4bb8 100644 --- a/lisp/org/org-icalendar.el +++ b/lisp/org/org-icalendar.el @@ -1,7 +1,6 @@ ;;; org-icalendar.el --- iCalendar export for Org-mode -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Keywords: outlines, hypermedia, calendar, wp @@ -651,5 +650,4 @@ a time), or the day by one (if it does not contain a time)." (provide 'org-icalendar) -;; arch-tag: 2dee2b6e-9211-4aee-8a47-a3c7e5bc30cf ;;; org-icalendar.el ends here diff --git a/lisp/org/org-id.el b/lisp/org/org-id.el index a8004afec8a..2f64b8b0bb6 100644 --- a/lisp/org/org-id.el +++ b/lisp/org/org-id.el @@ -1,6 +1,6 @@ ;;; org-id.el --- Global identifiers for Org-mode entries ;; -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Keywords: outlines, hypermedia, calendar, wp @@ -642,6 +642,5 @@ optional argument MARKERP, return the position as a new marker." ;;; org-id.el ends here -;; arch-tag: e5abaca4-e16f-4b25-832a-540cfb63a712 diff --git a/lisp/org/org-indent.el b/lisp/org/org-indent.el index a177a6f2a04..50dd6ac027a 100644 --- a/lisp/org/org-indent.el +++ b/lisp/org/org-indent.el @@ -1,5 +1,5 @@ ;;; org-indent.el --- Dynamic indentation for Org-mode -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Keywords: outlines, hypermedia, calendar, wp @@ -322,5 +322,4 @@ Point is assumed to be at the beginning of a headline." (provide 'org-indent) -;; arch-tag: b76736bc-9f4a-43cd-977c-ecfd6689846a ;;; org-indent.el ends here diff --git a/lisp/org/org-info.el b/lisp/org/org-info.el index 250f438ab96..edbf4268954 100644 --- a/lisp/org/org-info.el +++ b/lisp/org/org-info.el @@ -1,7 +1,6 @@ ;;; org-info.el --- Support for links to Info nodes from within Org-Mode -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Keywords: outlines, hypermedia, calendar, wp @@ -78,6 +77,5 @@ (provide 'org-info) -;; arch-tag: 1e289f54-7176-487f-b575-dd4854bab15e ;;; org-info.el ends here diff --git a/lisp/org/org-inlinetask.el b/lisp/org/org-inlinetask.el index 3f2d6fbbf06..53e3f782b98 100644 --- a/lisp/org/org-inlinetask.el +++ b/lisp/org/org-inlinetask.el @@ -1,6 +1,6 @@ ;;; org-inlinetask.el --- Tasks independent of outline hierarchy -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Keywords: outlines, hypermedia, calendar, wp diff --git a/lisp/org/org-install.el b/lisp/org/org-install.el index 736d7e39fd3..eb2d011efb9 100644 --- a/lisp/org/org-install.el +++ b/lisp/org/org-install.el @@ -1,7 +1,6 @@ ;;; org-install.el --- Outline-based notes management and organizer ;; Carstens outline-mode for keeping track of everything. -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Keywords: outlines, hypermedia, calendar, wp @@ -35,5 +34,4 @@ (provide 'org-install) -;; arch-tag: 0614acb4-47a3-4e7b-918a-aa3149792bcc ;;; org-install.el ends here diff --git a/lisp/org/org-irc.el b/lisp/org/org-irc.el index fba274156db..8339a5640d2 100644 --- a/lisp/org/org-irc.el +++ b/lisp/org/org-irc.el @@ -1,6 +1,6 @@ ;;; org-irc.el --- Store links to IRC sessions ;; -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; ;; Author: Philip Jackson <emacs@shellarchive.co.uk> ;; Keywords: erc, irc, link, org @@ -251,6 +251,5 @@ default." (provide 'org-irc) -;; arch-tag: 018d7dda-53b8-4a35-ba92-6670939e525a ;;; org-irc.el ends here diff --git a/lisp/org/org-jsinfo.el b/lisp/org/org-jsinfo.el index e5c65b0fb0f..1db4860b20d 100644 --- a/lisp/org/org-jsinfo.el +++ b/lisp/org/org-jsinfo.el @@ -1,7 +1,6 @@ ;;; org-jsinfo.el --- Support for org-info.js Javascript in Org HTML export -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Keywords: outlines, hypermedia, calendar, wp @@ -205,6 +204,5 @@ Option settings will replace the %MANAGER-OPTIONS cookie." (provide 'org-infojs) (provide 'org-jsinfo) -;; arch-tag: c71d1d85-3337-4817-a066-725e74ac9eac ;;; org-jsinfo.el ends here diff --git a/lisp/org/org-latex.el b/lisp/org/org-latex.el index a29c9f37401..3f4c1dcb7cf 100644 --- a/lisp/org/org-latex.el +++ b/lisp/org/org-latex.el @@ -1,6 +1,6 @@ ;;; org-latex.el --- LaTeX exporter for org-mode ;; -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; ;; Emacs Lisp Archive Entry ;; Filename: org-latex.el @@ -2573,6 +2573,5 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER." (provide 'org-export-latex) (provide 'org-latex) -;; arch-tag: 23c2b87d-da04-4c2d-ad2d-1eb6487bc3ad ;;; org-latex.el ends here diff --git a/lisp/org/org-list.el b/lisp/org/org-list.el index bc8e7bddb5b..08c733acc6f 100644 --- a/lisp/org/org-list.el +++ b/lisp/org/org-list.el @@ -1,7 +1,6 @@ ;;; org-list.el --- Plain lists for Org-mode ;; -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Bastien Guerry <bzg AT altern DOT org> @@ -2288,5 +2287,4 @@ with overruling parameters for `org-list-to-generic'." (provide 'org-list) -;; arch-tag: 73cf50c1-200f-4d1d-8a53-4e842a5b11c8 ;;; org-list.el ends here diff --git a/lisp/org/org-mac-message.el b/lisp/org/org-mac-message.el index a146cc86e2b..101743727c8 100644 --- a/lisp/org/org-mac-message.el +++ b/lisp/org/org-mac-message.el @@ -1,6 +1,6 @@ ;;; org-mac-message.el --- Links to Apple Mail.app messages from within Org-mode -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> ;; Christopher Suckling <suckling at gmail dot com> @@ -214,6 +214,5 @@ list of message:// links to flagged mail after heading." (provide 'org-mac-message) -;; arch-tag: 3806d0c1-abe1-4db6-9c31-f3ed7d4a9b32 ;;; org-mac-message.el ends here diff --git a/lisp/org/org-macs.el b/lisp/org/org-macs.el index 97a8fdc06e4..5bb86888739 100644 --- a/lisp/org/org-macs.el +++ b/lisp/org/org-macs.el @@ -1,7 +1,6 @@ ;;; org-macs.el --- Top-level definitions for Org-mode -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Keywords: outlines, hypermedia, calendar, wp @@ -344,6 +343,5 @@ The number of levels is controlled by `org-inlinetask-min-level'" (provide 'org-macs) -;; arch-tag: 7e6a73ce-aac9-4fc0-9b30-ce6f89dc6668 ;;; org-macs.el ends here diff --git a/lisp/org/org-mew.el b/lisp/org/org-mew.el index 9636a1aa428..be0c3b93d1e 100644 --- a/lisp/org/org-mew.el +++ b/lisp/org/org-mew.el @@ -1,6 +1,6 @@ ;;; org-mew.el --- Support for links to Mew messages from within Org-mode -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Tokuya Kameshima <kames at fa2 dot so-net dot ne dot jp> ;; Keywords: outlines, hypermedia, calendar, wp @@ -135,6 +135,5 @@ (provide 'org-mew) -;; arch-tag: 07ccdca7-6020-4941-a593-588a1e51b870 ;;; org-mew.el ends here diff --git a/lisp/org/org-mhe.el b/lisp/org/org-mhe.el index c384062a3fa..1767ddca1ee 100644 --- a/lisp/org/org-mhe.el +++ b/lisp/org/org-mhe.el @@ -1,7 +1,6 @@ ;;; org-mhe.el --- Support for links to MH-E messages from within Org-mode -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Thomas Baumann <thomas dot baumann at ch dot tum dot de> ;; Keywords: outlines, hypermedia, calendar, wp @@ -225,6 +224,5 @@ folders." (provide 'org-mhe) -;; arch-tag: dcb05484-8627-491d-a8c1-01dbd2bde4ae ;;; org-mhe.el ends here diff --git a/lisp/org/org-mks.el b/lisp/org/org-mks.el index df4ab3e2e75..e4826f801c0 100644 --- a/lisp/org/org-mks.el +++ b/lisp/org/org-mks.el @@ -1,6 +1,6 @@ ;;; org-mks.el --- Multi-key-selection for Org-mode -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Keywords: outlines, hypermedia, calendar, wp @@ -132,6 +132,5 @@ only the bare key is returned." (provide 'org-mks) -;; arch-tag: 4ea90d0e-c6e4-4684-bd61-baf878712f9f ;;; org-mks.el ends here diff --git a/lisp/org/org-mobile.el b/lisp/org/org-mobile.el index 4b16e2b8fcf..a36f1fc2d5e 100644 --- a/lisp/org/org-mobile.el +++ b/lisp/org/org-mobile.el @@ -1,5 +1,5 @@ ;;; org-mobile.el --- Code for asymmetric sync with a mobile device -;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Keywords: outlines, hypermedia, calendar, wp @@ -1083,7 +1083,6 @@ A and B must be strings or nil." (provide 'org-mobile) -;; arch-tag: ace0e26c-58f2-4309-8a61-05ec1535f658 ;;; org-mobile.el ends here diff --git a/lisp/org/org-mouse.el b/lisp/org/org-mouse.el index d1540c3f3f9..d30f172f42f 100644 --- a/lisp/org/org-mouse.el +++ b/lisp/org/org-mouse.el @@ -1,6 +1,6 @@ ;;; org-mouse.el --- Better mouse support for org-mode -;; Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation +;; Copyright (C) 2006-2011 Free Software Foundation ;; ;; Author: Piotr Zielinski <piotr dot zielinski at gmail dot com> ;; Maintainer: Carsten Dominik <carsten at orgmode dot org> @@ -1143,6 +1143,5 @@ This means, between the beginning of line and the point." (provide 'org-mouse) -;; arch-tag: ff1ae557-3529-41a3-95c6-baaebdcc280f ;;; org-mouse.el ends here diff --git a/lisp/org/org-plot.el b/lisp/org/org-plot.el index 374e2d43b5e..c5f4bff24fa 100644 --- a/lisp/org/org-plot.el +++ b/lisp/org/org-plot.el @@ -1,6 +1,6 @@ ;;; org-plot.el --- Support for plotting from Org-mode -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; ;; Author: Eric Schulte <schulte dot eric at gmail dot com> ;; Keywords: tables, plotting @@ -350,5 +350,4 @@ line directly before or after the table." (provide 'org-plot) -;; arch-tag: 5763f7c6-0c75-416d-b070-398ee4ec0eca ;;; org-plot.el ends here diff --git a/lisp/org/org-protocol.el b/lisp/org/org-protocol.el index 5d5059fbf0e..018eadf9a23 100644 --- a/lisp/org/org-protocol.el +++ b/lisp/org/org-protocol.el @@ -1,7 +1,6 @@ ;;; org-protocol.el --- Intercept calls from emacsclient to trigger custom actions. ;; -;; Copyright (C) 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; ;; Author: Bastien Guerry <bzg AT altern DOT org> ;; Author: Daniel M German <dmg AT uvic DOT org> @@ -704,5 +703,4 @@ project-plist is the CDR of an element in `org-publish-project-alist', reuse (provide 'org-protocol) -;; arch-tag: b5c5c2ac-77cf-4a94-a649-2163dff95846 ;;; org-protocol.el ends here diff --git a/lisp/org/org-publish.el b/lisp/org/org-publish.el index bb20cc60dff..7451587ba2f 100644 --- a/lisp/org/org-publish.el +++ b/lisp/org/org-publish.el @@ -1,6 +1,5 @@ ;;; org-publish.el --- publish related org-mode files as a website -;; Copyright (C) 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2006-2011 Free Software Foundation, Inc. ;; Author: David O'Toole <dto@gnu.org> ;; Maintainer: Carsten Dominik <carsten DOT dominik AT gmail DOT com> @@ -1077,6 +1076,5 @@ Returns value on success, else nil." (provide 'org-publish) -;; arch-tag: 72807f3c-8af0-4a6b-8dca-c3376eb25adb ;;; org-publish.el ends here diff --git a/lisp/org/org-remember.el b/lisp/org/org-remember.el index c6e21ae057b..80f9dadd7a4 100644 --- a/lisp/org/org-remember.el +++ b/lisp/org/org-remember.el @@ -1,7 +1,6 @@ ;;; org-remember.el --- Fast note taking in Org-mode -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Keywords: outlines, hypermedia, calendar, wp @@ -224,8 +223,7 @@ for a Remember buffer.") (define-minor-mode org-remember-mode "Minor mode for special key bindings in a remember buffer." - nil " Rem" org-remember-mode-map - (run-hooks 'org-remember-mode-hook)) + nil " Rem" org-remember-mode-map) (define-key org-remember-mode-map "\C-c\C-c" 'org-remember-finalize) (define-key org-remember-mode-map "\C-c\C-k" 'org-remember-kill) @@ -1149,7 +1147,6 @@ See also the variable `org-reverse-note-order'." (provide 'org-remember) -;; arch-tag: 497f30d0-4bc3-4097-8622-2d27ac5f2698 ;;; org-remember.el ends here diff --git a/lisp/org/org-rmail.el b/lisp/org/org-rmail.el index 73258685232..6e984fda687 100644 --- a/lisp/org/org-rmail.el +++ b/lisp/org/org-rmail.el @@ -1,7 +1,6 @@ ;;; org-rmail.el --- Support for links to Rmail messages from within Org-mode -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Keywords: outlines, hypermedia, calendar, wp @@ -115,6 +114,5 @@ (provide 'org-rmail) -;; arch-tag: c6cf4a8b-6639-4b7f-821f-bdf10746b173 ;;; org-rmail.el ends here diff --git a/lisp/org/org-src.el b/lisp/org/org-src.el index c932b4a70b2..07779700da8 100644 --- a/lisp/org/org-src.el +++ b/lisp/org/org-src.el @@ -1,7 +1,6 @@ ;;; org-src.el --- Source code examples in Org ;; -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Bastien Guerry <bzg AT altern DOT org> @@ -807,5 +806,4 @@ LANG is a string, and the returned major mode is a symbol." (provide 'org-src) -;; arch-tag: 6a1fc84f-dec7-47be-a416-64be56bea5d8 ;;; org-src.el ends here diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index 116c3fc2312..c99b5bf681a 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el @@ -1,7 +1,6 @@ ;;; org-table.el --- The table editor for Org-mode -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Keywords: outlines, hypermedia, calendar, wp @@ -4393,6 +4392,5 @@ list of the fields in the rectangle ." (provide 'org-table) -;; arch-tag: 4d21cfdd-0268-440a-84b0-09237a0fe0ef ;;; org-table.el ends here diff --git a/lisp/org/org-taskjuggler.el b/lisp/org/org-taskjuggler.el index d78e10d56a8..94341d80905 100644 --- a/lisp/org/org-taskjuggler.el +++ b/lisp/org/org-taskjuggler.el @@ -1,6 +1,6 @@ ;;; org-taskjuggler.el --- TaskJuggler exporter for org-mode ;; -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; ;; Emacs Lisp Archive Entry ;; Filename: org-taskjuggler.el diff --git a/lisp/org/org-timer.el b/lisp/org/org-timer.el index bac11870431..f920062362b 100644 --- a/lisp/org/org-timer.el +++ b/lisp/org/org-timer.el @@ -1,6 +1,6 @@ ;;; org-timer.el --- The relative timer code for Org-mode -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Keywords: outlines, hypermedia, calendar, wp @@ -394,6 +394,5 @@ replace any running timer." (provide 'org-timer) -;; arch-tag: 97538f8c-3871-4509-8f23-1e7b3ff3d107 ;;; org-timer.el ends here diff --git a/lisp/org/org-vm.el b/lisp/org/org-vm.el index daef6713f41..7ebeadbc4d9 100644 --- a/lisp/org/org-vm.el +++ b/lisp/org/org-vm.el @@ -1,7 +1,6 @@ ;;; org-vm.el --- Support for links to VM messages from within Org-mode -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Keywords: outlines, hypermedia, calendar, wp @@ -138,6 +137,5 @@ (provide 'org-vm) -;; arch-tag: cbc3047b-935e-4d2a-96e7-c5b0117aaa6d ;;; org-vm.el ends here diff --git a/lisp/org/org-w3m.el b/lisp/org/org-w3m.el index 6965ac6b337..ff839a9b7c2 100644 --- a/lisp/org/org-w3m.el +++ b/lisp/org/org-w3m.el @@ -1,6 +1,6 @@ ;;; org-w3m.el --- Support from copy and paste from w3m to Org-mode -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Andy Stewart <lazycat dot manatee at gmail dot com> ;; Keywords: outlines, hypermedia, calendar, wp @@ -168,6 +168,5 @@ Return t if there is no previous link; otherwise, return nil." (provide 'org-w3m) -;; arch-tag: 851d7447-488d-49f0-a14d-46c092e84352 ;;; org-w3m.el ends here diff --git a/lisp/org/org-wl.el b/lisp/org/org-wl.el index 137bad9de89..2a16d047b33 100644 --- a/lisp/org/org-wl.el +++ b/lisp/org/org-wl.el @@ -1,7 +1,6 @@ ;;; org-wl.el --- Support for links to Wanderlust messages from within Org-mode -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Tokuya Kameshima <kames at fa2 dot so-net dot ne dot jp> ;; David Maus <dmaus at ictsoc dot de> @@ -310,6 +309,5 @@ for namazu index." (provide 'org-wl) -;; arch-tag: 29b75a0f-ef2e-430b-8abc-acff75bde54a ;;; org-wl.el ends here diff --git a/lisp/org/org-xoxo.el b/lisp/org/org-xoxo.el index 2ce277ed6ce..39a4cc7a447 100644 --- a/lisp/org/org-xoxo.el +++ b/lisp/org/org-xoxo.el @@ -1,7 +1,6 @@ ;;; org-xoxo.el --- XOXO export for Org-mode -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Keywords: outlines, hypermedia, calendar, wp @@ -124,5 +123,4 @@ The XOXO buffer is named *xoxo-<source buffer name>*" (provide 'org-xoxo) -;; arch-tag: 16e6a31f-f4f5-46f1-af18-48dc89faa702 ;;; org-xoxo.el ends here diff --git a/lisp/org/org.el b/lisp/org/org.el index eb919687325..8f1ef9e5d60 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -1,7 +1,6 @@ ;;; org.el --- Outline-based notes management and organizer ;; Carstens outline-mode for keeping track of everything. -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Keywords: outlines, hypermedia, calendar, wp @@ -19642,6 +19641,5 @@ Still experimental, may disappear in the future." (run-hooks 'org-load-hook) -;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd ;;; org.el ends here diff --git a/lisp/outline.el b/lisp/outline.el index 95cc450973a..d43afd94a3c 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -1,7 +1,6 @@ ;;; outline.el --- outline mode commands for Emacs -;; Copyright (C) 1986, 1993, 1994, 1995, 1997, 2000, 2001, 2002, -;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 1986, 1993-1995, 1997, 2000-2011 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -1119,5 +1118,4 @@ convenient way to make a table of contents of the buffer." (provide 'outline) (provide 'noutline) -;; arch-tag: 1724410e-7d4d-4f46-b801-49e18171e874 ;;; outline.el ends here diff --git a/lisp/paren.el b/lisp/paren.el index bdc15a66cc0..8bd96b9317a 100644 --- a/lisp/paren.el +++ b/lisp/paren.el @@ -1,7 +1,6 @@ ;;; paren.el --- highlight matching paren -;; Copyright (C) 1993, 1996, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1996, 2001-2011 Free Software Foundation, Inc. ;; Author: rms@gnu.org ;; Maintainer: FSF diff --git a/lisp/password-cache.el b/lisp/password-cache.el index 7c67ab17702..fcae55ad597 100644 --- a/lisp/password-cache.el +++ b/lisp/password-cache.el @@ -1,7 +1,6 @@ ;;; password-cache.el --- Read passwords, possibly using a password cache. -;; Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2008, 2009, -;; 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2000, 2003-2011 Free Software Foundation, Inc. ;; Author: Simon Josefsson <simon@josefsson.org> ;; Created: 2003-12-21 diff --git a/lisp/patcomp.el b/lisp/patcomp.el index b542dc27f46..c1965a763ca 100644 --- a/lisp/patcomp.el +++ b/lisp/patcomp.el @@ -19,5 +19,4 @@ It uses the command line arguments to specify the files to compile." (let ((load-path (list (expand-file-name "lisp")))) (batch-byte-compile))) -;; arch-tag: cb299b78-1d6c-4c02-945b-12fa2e856d6f ;;; patcomp.el ends here diff --git a/lisp/paths.el b/lisp/paths.el index 095326e9c8e..161caf9cb8c 100644 --- a/lisp/paths.el +++ b/lisp/paths.el @@ -1,7 +1,6 @@ ;;; paths.el --- define pathnames for use by various Emacs commands -*- no-byte-compile: t -*- -;; Copyright (C) 1986, 1988, 1994, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1986, 1988, 1994, 1999-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: internal @@ -186,5 +185,4 @@ If non-nil, Emacs startup does (load (concat term-file-prefix (getenv \"TERM\")) You may set this variable to nil in your `.emacs' file if you do not wish the terminal-initialization file to be loaded.") -;; arch-tag: bae27ffb-9944-4c87-b569-30d4635a99e1 ;;; paths.el ends here diff --git a/lisp/pcmpl-cvs.el b/lisp/pcmpl-cvs.el index 98d1e476669..b6c5eb62b17 100644 --- a/lisp/pcmpl-cvs.el +++ b/lisp/pcmpl-cvs.el @@ -1,7 +1,6 @@ ;;; pcmpl-cvs.el --- functions for dealing with cvs completions -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> ;; Package: pcomplete @@ -185,5 +184,4 @@ operation character applies, as displayed by 'cvs -n update'." (setq pcomplete-stub nondir) (pcomplete-uniqify-list entries))) -;; arch-tag: d2aeac43-4bf5-4509-a496-74b863c6642b ;;; pcmpl-cvs.el ends here diff --git a/lisp/pcmpl-gnu.el b/lisp/pcmpl-gnu.el index df1f055506c..62f5fafe2c4 100644 --- a/lisp/pcmpl-gnu.el +++ b/lisp/pcmpl-gnu.el @@ -1,7 +1,6 @@ ;;; pcmpl-gnu.el --- completions for GNU project tools -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Package: pcomplete @@ -307,5 +306,4 @@ ;;;###autoload (defalias 'pcomplete/gdb 'pcomplete/xargs) -;; arch-tag: 06d2b429-dcb1-4a57-84e1-f70d87781183 ;;; pcmpl-gnu.el ends here diff --git a/lisp/pcmpl-linux.el b/lisp/pcmpl-linux.el index 59c084fffae..8090397627e 100644 --- a/lisp/pcmpl-linux.el +++ b/lisp/pcmpl-linux.el @@ -1,7 +1,6 @@ ;;; pcmpl-linux.el --- functions for dealing with GNU/Linux completions -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Package: pcomplete @@ -99,5 +98,4 @@ (pcomplete-uniqify-list points) (cons "swap" (pcmpl-linux-mounted-directories)))))) -;; arch-tag: bb0961a6-a623-463d-92c6-497c317293b1 ;;; pcmpl-linux.el ends here diff --git a/lisp/pcmpl-rpm.el b/lisp/pcmpl-rpm.el index 7960141f03e..475215b1622 100644 --- a/lisp/pcmpl-rpm.el +++ b/lisp/pcmpl-rpm.el @@ -1,7 +1,6 @@ ;;; pcmpl-rpm.el --- functions for dealing with rpm completions -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Package: pcomplete @@ -322,5 +321,4 @@ (provide 'pcmpl-rpm) -;; arch-tag: 4e64b490-fecf-430e-b2b9-70a8ad64b8c1 ;;; pcmpl-rpm.el ends here diff --git a/lisp/pcmpl-unix.el b/lisp/pcmpl-unix.el index f2c19ca71c4..e947bfe1da6 100644 --- a/lisp/pcmpl-unix.el +++ b/lisp/pcmpl-unix.el @@ -1,7 +1,6 @@ ;;; pcmpl-unix.el --- standard UNIX completions -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Package: pcomplete @@ -40,14 +39,23 @@ (defcustom pcmpl-ssh-known-hosts-file "~/.ssh/known_hosts" "If non-nil, a string naming your SSH \"known_hosts\" file. -This allows completion of SSH host names. Note that newer -versions of ssh hash the hosts by default to prevent -Island-hopping SSH attacks. This can be disabled, at some risk, -with the SSH option \"HashKnownHosts no\"." +This allows one method of completion of SSH host names, the other +being via `pcmpl-ssh-config-file'. Note that newer versions of +ssh hash the hosts by default, to prevent Island-hopping SSH +attacks. This can be disabled, at some risk, with the SSH option +\"HashKnownHosts no\"." :type '(choice file (const nil)) :group 'pcmpl-unix :version "23.1") +(defcustom pcmpl-ssh-config-file "~/.ssh/config" + "If non-nil, a string naming your SSH \"config\" file. +This allows one method of completion of SSH host names, the other +being via `pcmpl-ssh-known-hosts-file'." + :type '(choice file (const nil)) + :group 'pcmpl-unix + :version "24.1") + ;; Functions: ;;;###autoload @@ -138,7 +146,7 @@ documentation), this function returns nil." ;; ssh support by Phil Hagelberg. ;; http://www.emacswiki.org/cgi-bin/wiki/pcmpl-ssh.el -(defun pcmpl-ssh-hosts () +(defun pcmpl-ssh-known-hosts () "Return a list of hosts found in `pcmpl-ssh-known-hosts-file'." (when (and pcmpl-ssh-known-hosts-file (file-readable-p pcmpl-ssh-known-hosts-file)) @@ -153,6 +161,27 @@ documentation), this function returns nil." (add-to-list 'ssh-hosts-list (match-string 1)))) ssh-hosts-list)))) +(defun pcmpl-ssh-config-hosts () + "Return a list of hosts found in `pcmpl-ssh-config-file'." + (when (and pcmpl-ssh-config-file + (file-readable-p pcmpl-ssh-config-file)) + (with-temp-buffer + (insert-file-contents-literally pcmpl-ssh-config-file) + (let (ssh-hosts-list + (case-fold-search t)) + (while (re-search-forward "^ *host\\(name\\)? +\\([-.[:alnum:]]+\\)" + nil t) + (add-to-list 'ssh-hosts-list (match-string 2))) + ssh-hosts-list)))) + +(defun pcmpl-ssh-hosts () + "Return a list of known SSH hosts. +Uses both `pcmpl-ssh-config-file' and `pcmpl-ssh-known-hosts-file'." + (let ((hosts (pcmpl-ssh-known-hosts))) + (dolist (h (pcmpl-ssh-config-hosts)) + (add-to-list 'hosts h)) + hosts)) + ;;;###autoload (defun pcomplete/ssh () "Completion rules for the `ssh' command." @@ -171,5 +200,4 @@ Includes files as well as host names followed by a colon." (provide 'pcmpl-unix) -;; arch-tag: 3f9eb5af-7e0e-449d-b586-381cbbf8fc5c ;;; pcmpl-unix.el ends here diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el index cd216ad8d36..0f4d5e42d78 100644 --- a/lisp/pcomplete.el +++ b/lisp/pcomplete.el @@ -1,7 +1,6 @@ ;;; pcomplete.el --- programmable completion -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> ;; Keywords: processes abbrev @@ -1391,5 +1390,4 @@ Returns the resultant list." (provide 'pcomplete) -;; arch-tag: ae32ef2d-dbed-4244-8b0f-cf5a2a3b07a4 ;;; pcomplete.el ends here diff --git a/lisp/play/5x5.el b/lisp/play/5x5.el index 918587db132..364ea35af3c 100644 --- a/lisp/play/5x5.el +++ b/lisp/play/5x5.el @@ -1,7 +1,6 @@ ;;; 5x5.el --- simple little puzzle game -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Dave Pearson <davep@davep.org> ;; Maintainer: Dave Pearson <davep@davep.org> @@ -512,5 +511,4 @@ in progress because it is an animated attempt." (provide '5x5) -;; arch-tag: ec4dabd5-572d-41ea-b48c-ec5ce0d68fa9 ;;; 5x5.el ends here diff --git a/lisp/play/animate.el b/lisp/play/animate.el index 9ac95917039..157a2fe7593 100644 --- a/lisp/play/animate.el +++ b/lisp/play/animate.el @@ -1,7 +1,6 @@ ;;; animate.el --- make text dance -;; Copyright (C) 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2001-2011 Free Software Foundation, Inc. ;; Maintainer: Richard Stallman <rms@gnu.org> ;; Keywords: games @@ -191,5 +190,4 @@ You can specify the one's name by NAME; the default value is \"Sarah\"." (provide 'animate) -;; arch-tag: 275289a3-6ac4-41da-b527-a1147045392f ;;; animate.el ends here diff --git a/lisp/play/blackbox.el b/lisp/play/blackbox.el index cecb5a29a47..42d1d8e09fa 100644 --- a/lisp/play/blackbox.el +++ b/lisp/play/blackbox.el @@ -1,7 +1,6 @@ ;;; blackbox.el --- blackbox game in Emacs Lisp -;; Copyright (C) 1985, 1986, 1987, 1992, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985-1987, 1992, 2001-2011 Free Software Foundation, Inc. ;; Author: F. Thomas May <uw-nsr!uw-warp!tom@beaver.cs.washington.edu> ;; Adapted-By: ESR @@ -434,5 +433,4 @@ a reflection." (provide 'blackbox) -;; arch-tag: 6c474c62-5617-4b10-9b44-ac430168c0e2 ;;; blackbox.el ends here diff --git a/lisp/play/bruce.el b/lisp/play/bruce.el index ac4640a5fbb..168d528ecb1 100644 --- a/lisp/play/bruce.el +++ b/lisp/play/bruce.el @@ -1,8 +1,7 @@ ;;; bruce.el --- bruce phrase utility for overloading the Communications -*- no-byte-compile: t -*- ;;; Decency Act snoops, if any. -;; Copyright (C) 1988, 1993, 1997, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1988, 1993, 1997, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: games @@ -146,5 +145,4 @@ (provide 'bruce) -;; arch-tag: b83ded51-4ccb-41ef-8bd6-3b521e81dd9b ;;; bruce.el ends here diff --git a/lisp/play/bubbles.el b/lisp/play/bubbles.el index 69620aeaca2..8fea2cef6ad 100644 --- a/lisp/play/bubbles.el +++ b/lisp/play/bubbles.el @@ -1,6 +1,6 @@ ;;; bubbles.el --- Puzzle game for Emacs. -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Ulf Jasper <ulf.jasper@web.de> ;; URL: http://ulf.epplejasper.de/ @@ -1460,5 +1460,4 @@ Return t if new char is non-empty." (provide 'bubbles) -;; arch-tag: 2cd7237a-b0ad-400d-a7fd-75f676dceb70 ;;; bubbles.el ends here diff --git a/lisp/play/cookie1.el b/lisp/play/cookie1.el index e786c6cc5c1..837213665fc 100644 --- a/lisp/play/cookie1.el +++ b/lisp/play/cookie1.el @@ -1,7 +1,6 @@ ;;; cookie1.el --- retrieve random phrases from fortune cookie files -;; Copyright (C) 1993, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993, 2001-2011 Free Software Foundation, Inc. ;; Author: Eric S. Raymond <esr@snark.thyrsus.com> ;; Maintainer: FSF @@ -164,5 +163,4 @@ Optional fifth arg REQUIRE-MATCH non-nil forces a matching cookie." (provide 'cookie1) -;; arch-tag: 4a8a8712-df6a-4f34-b030-108a1b47f9f2 ;;; cookie1.el ends here diff --git a/lisp/play/decipher.el b/lisp/play/decipher.el index f0a602be70b..3de8ca3d4fd 100644 --- a/lisp/play/decipher.el +++ b/lisp/play/decipher.el @@ -1,7 +1,6 @@ ;;; decipher.el --- cryptanalyze monoalphabetic substitution ciphers ;; -;; Copyright (C) 1995, 1996, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995-1996, 2001-2011 Free Software Foundation, Inc. ;; ;; Author: Christopher J. Madsen <chris_madsen@geocities.com> ;; Keywords: games diff --git a/lisp/play/dissociate.el b/lisp/play/dissociate.el index eac1dcf58b9..4530e586de8 100644 --- a/lisp/play/dissociate.el +++ b/lisp/play/dissociate.el @@ -1,7 +1,6 @@ ;;; dissociate.el --- scramble text amusingly for Emacs -;; Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: games @@ -99,5 +98,4 @@ Default is 2." (provide 'dissociate) -;; arch-tag: 90d197d1-409b-45c5-a0b5-fbfb2e06334f ;;; dissociate.el ends here diff --git a/lisp/play/doctor.el b/lisp/play/doctor.el index e892c5dcfbb..5b3b4aba0fe 100644 --- a/lisp/play/doctor.el +++ b/lisp/play/doctor.el @@ -1,7 +1,7 @@ ;;; doctor.el --- psychological help for frustrated users -;; Copyright (C) 1985, 1987, 1994, 1996, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1987, 1994, 1996, 2000-2011 +;; Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: games diff --git a/lisp/play/dunnet.el b/lisp/play/dunnet.el index f5f8bd7ed44..696442ee8cb 100644 --- a/lisp/play/dunnet.el +++ b/lisp/play/dunnet.el @@ -1,7 +1,6 @@ ;;; dunnet.el --- text adventure for Emacs -*- byte-compile-warnings: nil -*- -;; Copyright (C) 1992, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1992-1993, 2001-2011 Free Software Foundation, Inc. ;; Author: Ron Schnell <ronnie@driver-aces.com> ;; Created: 25 Jul 1992 @@ -3357,5 +3356,4 @@ File not found"))) (provide 'dunnet) -;; arch-tag: 4cc8e47c-d9e1-4ef4-936b-578e7f529558 ;;; dunnet.el ends here diff --git a/lisp/play/fortune.el b/lisp/play/fortune.el index e7bd013b2ab..05775c8a85e 100644 --- a/lisp/play/fortune.el +++ b/lisp/play/fortune.el @@ -1,7 +1,6 @@ ;;; fortune.el --- use fortune to create signatures -;; Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2001-2011 Free Software Foundation, Inc. ;; Author: Holger Schauer <Holger.Schauer@gmx.de> ;; Keywords: games utils mail diff --git a/lisp/play/gamegrid.el b/lisp/play/gamegrid.el index da10ffaf0a5..d3d8350a43f 100644 --- a/lisp/play/gamegrid.el +++ b/lisp/play/gamegrid.el @@ -1,7 +1,6 @@ ;;; gamegrid.el --- library for implementing grid-based games on Emacs -;; Copyright (C) 1997, 1998, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-1998, 2001-2011 Free Software Foundation, Inc. ;; Author: Glynn Clements <glynn@sensei.co.uk> ;; Version: 1.02 @@ -597,5 +596,4 @@ FILE is created there." (provide 'gamegrid) -;; arch-tag: a96c2ff4-1c12-427e-bd3d-faeaf174cd46 ;;; gamegrid.el ends here diff --git a/lisp/play/gametree.el b/lisp/play/gametree.el index 215d95db341..d0ba9b037e7 100644 --- a/lisp/play/gametree.el +++ b/lisp/play/gametree.el @@ -1,7 +1,6 @@ ;;; gametree.el --- manage game analysis trees in Emacs -;; Copyright (C) 1997, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997, 1999, 2001-2011 Free Software Foundation, Inc. ;; Author: Ian T Zimmerman <itz@rahul.net> ;; Created: Wed Dec 10 07:41:46 PST 1997 diff --git a/lisp/play/gomoku.el b/lisp/play/gomoku.el index 2c77aa62df1..f9d5594cd0b 100644 --- a/lisp/play/gomoku.el +++ b/lisp/play/gomoku.el @@ -1,7 +1,6 @@ ;;; gomoku.el --- Gomoku game between you and Emacs -;; Copyright (C) 1988, 1994, 1996, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1988, 1994, 1996, 2001-2011 Free Software Foundation, Inc. ;; Author: Philippe Schnoebelen <phs@lsv.ens-cachan.fr> ;; Maintainer: FSF diff --git a/lisp/play/handwrite.el b/lisp/play/handwrite.el index 01844cc892c..5bab360f9ff 100644 --- a/lisp/play/handwrite.el +++ b/lisp/play/handwrite.el @@ -1,7 +1,6 @@ ;;; handwrite.el --- turns your emacs buffer into a handwritten document -*- coding: iso-latin-1; -*- -;; Copyright (C) 1996, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996, 2001-2011 Free Software Foundation, Inc. ;; Author: Danny Roozendaal (was: <danny@tvs.kun.nl>) ;; Created: October 21 1996 @@ -1323,5 +1322,4 @@ end (provide 'handwrite) -;; arch-tag: f2285ae9-e41b-4c96-8343-87dce41e44b7 ;;; handwrite.el ends here diff --git a/lisp/play/hanoi.el b/lisp/play/hanoi.el index 5185b810918..767792babb3 100644 --- a/lisp/play/hanoi.el +++ b/lisp/play/hanoi.el @@ -447,5 +447,4 @@ BITS must be of length nrings. Start at START-TIME." (provide 'hanoi) -;; arch-tag: 7a901659-4346-495c-8883-14cbf540610c ;;; hanoi.el ends here diff --git a/lisp/play/landmark.el b/lisp/play/landmark.el index 0db1041e307..dd32fd790d3 100644 --- a/lisp/play/landmark.el +++ b/lisp/play/landmark.el @@ -1,7 +1,6 @@ ;;; landmark.el --- neural-network robot that learns landmarks -;; Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-1997, 2000-2011 Free Software Foundation, Inc. ;; Author: Terrence Brannon (was: <brannon@rana.usc.edu>) ;; Created: December 16, 1996 - first release to usenet @@ -10,7 +9,7 @@ ;;;_* Usage ;;; Just type ;;; M-x eval-buffer -;;; M-x lm-test-run +;;; M-x landmark-test-run ;; This file is part of GNU Emacs. @@ -30,7 +29,7 @@ ;;; Commentary: -;; Lm is a relatively non-participatory game in which a robot +;; Landmark is a relatively non-participatory game in which a robot ;; attempts to maneuver towards a tree at the center of the window ;; based on unique olfactory cues from each of the 4 directions. If ;; the smell of the tree increases, then the weights in the robot's @@ -53,7 +52,7 @@ ;; a single move, one moves east,west and south, then both east and ;; west will be improved when they shouldn't -;; Many thanks to Yuri Pryadkin (yuri@rana.usc.edu) for this +;; Many thanks to Yuri Pryadkin <yuri@rana.usc.edu> for this ;; concise problem description. ;;;_* Require @@ -63,9 +62,9 @@ ;;; Code: -(defgroup lm nil +(defgroup landmark nil "Neural-network robot that learns landmarks." - :prefix "lm-" + :prefix "landmark-" :group 'games) ;;;_ + THE BOARD. @@ -75,199 +74,199 @@ ;; containing padding squares (coded with -1). These squares allow us to ;; detect when we are trying to move out of the board. We denote a square by ;; its (X,Y) coords, or by the INDEX corresponding to them in the vector. The -;; leftmost topmost square has coords (1,1) and index lm-board-width + 2. +;; leftmost topmost square has coords (1,1) and index landmark-board-width + 2. ;; Similarly, vectors between squares may be given by two DX, DY coords or by ;; one DEPL (the difference between indexes). -(defvar lm-board-width nil - "Number of columns on the Lm board.") -(defvar lm-board-height nil - "Number of lines on the Lm board.") +(defvar landmark-board-width nil + "Number of columns on the Landmark board.") +(defvar landmark-board-height nil + "Number of lines on the Landmark board.") -(defvar lm-board nil - "Vector recording the actual state of the Lm board.") +(defvar landmark-board nil + "Vector recording the actual state of the Landmark board.") -(defvar lm-vector-length nil - "Length of lm-board vector.") +(defvar landmark-vector-length nil + "Length of landmark-board vector.") -(defvar lm-draw-limit nil +(defvar landmark-draw-limit nil ;; This is usually set to 70% of the number of squares. "After how many moves will Emacs offer a draw?") -(defvar lm-cx 0 +(defvar landmark-cx 0 "This is the x coordinate of the center of the board.") -(defvar lm-cy 0 +(defvar landmark-cy 0 "This is the y coordinate of the center of the board.") -(defvar lm-m 0 +(defvar landmark-m 0 "This is the x dimension of the playing board.") -(defvar lm-n 0 +(defvar landmark-n 0 "This is the y dimension of the playing board.") -(defun lm-xy-to-index (x y) +(defun landmark-xy-to-index (x y) "Translate X, Y cartesian coords into the corresponding board index." - (+ (* y lm-board-width) x y)) + (+ (* y landmark-board-width) x y)) -(defun lm-index-to-x (index) +(defun landmark-index-to-x (index) "Return corresponding x-coord of board INDEX." - (% index (1+ lm-board-width))) + (% index (1+ landmark-board-width))) -(defun lm-index-to-y (index) +(defun landmark-index-to-y (index) "Return corresponding y-coord of board INDEX." - (/ index (1+ lm-board-width))) + (/ index (1+ landmark-board-width))) -(defun lm-init-board () - "Create the lm-board vector and fill it with initial values." - (setq lm-board (make-vector lm-vector-length 0)) +(defun landmark-init-board () + "Create the landmark-board vector and fill it with initial values." + (setq landmark-board (make-vector landmark-vector-length 0)) ;; Every square is 0 (i.e. empty) except padding squares: - (let ((i 0) (ii (1- lm-vector-length))) - (while (<= i lm-board-width) ; The squares in [0..width] and in - (aset lm-board i -1) ; [length - width - 1..length - 1] - (aset lm-board ii -1) ; are padding squares. + (let ((i 0) (ii (1- landmark-vector-length))) + (while (<= i landmark-board-width) ; The squares in [0..width] and in + (aset landmark-board i -1) ; [length - width - 1..length - 1] + (aset landmark-board ii -1) ; are padding squares. (setq i (1+ i) ii (1- ii)))) (let ((i 0)) - (while (< i lm-vector-length) - (aset lm-board i -1) ; and also all k*(width+1) - (setq i (+ i lm-board-width 1))))) + (while (< i landmark-vector-length) + (aset landmark-board i -1) ; and also all k*(width+1) + (setq i (+ i landmark-board-width 1))))) ;;;_ + DISPLAYING THE BOARD. ;; You may change these values if you have a small screen or if the squares ;; look rectangular, but spacings SHOULD be at least 2 (MUST BE at least 1). -(defconst lm-square-width 2 - "*Horizontal spacing between squares on the Lm board.") +(defconst landmark-square-width 2 + "*Horizontal spacing between squares on the Landmark board.") -(defconst lm-square-height 1 - "*Vertical spacing between squares on the Lm board.") +(defconst landmark-square-height 1 + "*Vertical spacing between squares on the Landmark board.") -(defconst lm-x-offset 3 - "*Number of columns between the Lm board and the side of the window.") +(defconst landmark-x-offset 3 + "*Number of columns between the Landmark board and the side of the window.") -(defconst lm-y-offset 1 - "*Number of lines between the Lm board and the top of the window.") +(defconst landmark-y-offset 1 + "*Number of lines between the Landmark board and the top of the window.") -;;;_ + LM MODE AND KEYMAP. +;;;_ + LANDMARK MODE AND KEYMAP. -(defcustom lm-mode-hook nil - "If non-nil, its value is called on entry to Lm mode." +(defcustom landmark-mode-hook nil + "If non-nil, its value is called on entry to Landmark mode." :type 'hook - :group 'lm) + :group 'landmark) -(defvar lm-mode-map +(defvar landmark-mode-map (let ((map (make-sparse-keymap))) ;; Key bindings for cursor motion. - (define-key map "y" 'lm-move-nw) ; y - (define-key map "u" 'lm-move-ne) ; u - (define-key map "b" 'lm-move-sw) ; b - (define-key map "n" 'lm-move-se) ; n + (define-key map "y" 'landmark-move-nw) ; y + (define-key map "u" 'landmark-move-ne) ; u + (define-key map "b" 'landmark-move-sw) ; b + (define-key map "n" 'landmark-move-se) ; n (define-key map "h" 'backward-char) ; h (define-key map "l" 'forward-char) ; l - (define-key map "j" 'lm-move-down) ; j - (define-key map "k" 'lm-move-up) ; k + (define-key map "j" 'landmark-move-down) ; j + (define-key map "k" 'landmark-move-up) ; k - (define-key map [kp-7] 'lm-move-nw) - (define-key map [kp-9] 'lm-move-ne) - (define-key map [kp-1] 'lm-move-sw) - (define-key map [kp-3] 'lm-move-se) + (define-key map [kp-7] 'landmark-move-nw) + (define-key map [kp-9] 'landmark-move-ne) + (define-key map [kp-1] 'landmark-move-sw) + (define-key map [kp-3] 'landmark-move-se) (define-key map [kp-4] 'backward-char) (define-key map [kp-6] 'forward-char) - (define-key map [kp-2] 'lm-move-down) - (define-key map [kp-8] 'lm-move-up) + (define-key map [kp-2] 'landmark-move-down) + (define-key map [kp-8] 'landmark-move-up) - (define-key map "\C-n" 'lm-move-down) ; C-n - (define-key map "\C-p" 'lm-move-up) ; C-p + (define-key map "\C-n" 'landmark-move-down) ; C-n + (define-key map "\C-p" 'landmark-move-up) ; C-p ;; Key bindings for entering Human moves. - (define-key map "X" 'lm-human-plays) ; X - (define-key map "x" 'lm-human-plays) ; x - - (define-key map " " 'lm-start-robot) ; SPC - (define-key map [down-mouse-1] 'lm-start-robot) - (define-key map [drag-mouse-1] 'lm-click) - (define-key map [mouse-1] 'lm-click) - (define-key map [down-mouse-2] 'lm-click) - (define-key map [mouse-2] 'lm-mouse-play) - (define-key map [drag-mouse-2] 'lm-mouse-play) - - (define-key map [remap previous-line] 'lm-move-up) - (define-key map [remap next-line] 'lm-move-down) - (define-key map [remap beginning-of-line] 'lm-beginning-of-line) - (define-key map [remap end-of-line] 'lm-end-of-line) - (define-key map [remap undo] 'lm-human-takes-back) - (define-key map [remap advertised-undo] 'lm-human-takes-back) + (define-key map "X" 'landmark-human-plays) ; X + (define-key map "x" 'landmark-human-plays) ; x + + (define-key map " " 'landmark-start-robot) ; SPC + (define-key map [down-mouse-1] 'landmark-start-robot) + (define-key map [drag-mouse-1] 'landmark-click) + (define-key map [mouse-1] 'landmark-click) + (define-key map [down-mouse-2] 'landmark-click) + (define-key map [mouse-2] 'landmark-mouse-play) + (define-key map [drag-mouse-2] 'landmark-mouse-play) + + (define-key map [remap previous-line] 'landmark-move-up) + (define-key map [remap next-line] 'landmark-move-down) + (define-key map [remap beginning-of-line] 'landmark-beginning-of-line) + (define-key map [remap end-of-line] 'landmark-end-of-line) + (define-key map [remap undo] 'landmark-human-takes-back) + (define-key map [remap advertised-undo] 'landmark-human-takes-back) map) - "Local keymap to use in Lm mode.") + "Local keymap to use in Landmark mode.") -(defvar lm-emacs-won () +(defvar landmark-emacs-won () "*For making font-lock use the winner's face for the line.") -(defface lm-font-lock-face-O '((((class color)) :foreground "red") +(defface landmark-font-lock-face-O '((((class color)) :foreground "red") (t :weight bold)) "Face to use for Emacs' O." :version "22.1" - :group 'lm) + :group 'landmark) -(defface lm-font-lock-face-X '((((class color)) :foreground "green") +(defface landmark-font-lock-face-X '((((class color)) :foreground "green") (t :weight bold)) "Face to use for your X." :version "22.1" - :group 'lm) - -(defvar lm-font-lock-keywords - '(("O" . 'lm-font-lock-face-O) - ("X" . 'lm-font-lock-face-X) - ("[-|/\\]" 0 (if lm-emacs-won - 'lm-font-lock-face-O - 'lm-font-lock-face-X))) - "*Font lock rules for Lm.") - -(put 'lm-mode 'front-sticky - (put 'lm-mode 'rear-nonsticky '(intangible))) -(put 'lm-mode 'intangible 1) + :group 'landmark) + +(defvar landmark-font-lock-keywords + '(("O" . 'landmark-font-lock-face-O) + ("X" . 'landmark-font-lock-face-X) + ("[-|/\\]" 0 (if landmark-emacs-won + 'landmark-font-lock-face-O + 'landmark-font-lock-face-X))) + "*Font lock rules for Landmark.") + +(put 'landmark-mode 'front-sticky + (put 'landmark-mode 'rear-nonsticky '(intangible))) +(put 'landmark-mode 'intangible 1) ;; This one is for when they set view-read-only to t: Landmark cannot ;; allow View Mode to be activated in its buffer. -(put 'lm-mode 'mode-class 'special) +(put 'landmark-mode 'mode-class 'special) -(defun lm-mode () - "Major mode for playing Lm against Emacs. +(defun landmark-mode () + "Major mode for playing Landmark against Emacs. You and Emacs play in turn by marking a free square. You mark it with X and Emacs marks it with O. The winner is the first to get five contiguous marks horizontally, vertically or in diagonal. -You play by moving the cursor over the square you choose and hitting \\[lm-human-plays]. +You play by moving the cursor over the square you choose and hitting \\[landmark-human-plays]. Other useful commands: -\\{lm-mode-map} -Entry to this mode calls the value of `lm-mode-hook' if that value +\\{landmark-mode-map} +Entry to this mode calls the value of `landmark-mode-hook' if that value is non-nil. One interesting value is `turn-on-font-lock'." (interactive) (kill-all-local-variables) - (setq major-mode 'lm-mode - mode-name "Lm") - (lm-display-statistics) - (use-local-map lm-mode-map) + (setq major-mode 'landmark-mode + mode-name "Landmark") + (landmark-display-statistics) + (use-local-map landmark-mode-map) (make-local-variable 'font-lock-defaults) - (setq font-lock-defaults '(lm-font-lock-keywords t) + (setq font-lock-defaults '(landmark-font-lock-keywords t) buffer-read-only t) - (run-mode-hooks 'lm-mode-hook)) + (run-mode-hooks 'landmark-mode-hook)) ;;;_ + THE SCORE TABLE. ;; Every (free) square has a score associated to it, recorded in the -;; LM-SCORE-TABLE vector. The program always plays in the square having +;; LANDMARK-SCORE-TABLE vector. The program always plays in the square having ;; the highest score. -(defvar lm-score-table nil +(defvar landmark-score-table nil "Vector recording the actual score of the free squares.") @@ -294,7 +293,7 @@ is non-nil. One interesting value is `turn-on-font-lock'." ;; the qtuples. ;; ;; This algorithm is rather simple but anyway it gives a not so dumb level of -;; play. It easily extends to "n-dimensional Lm", where a win should not +;; play. It easily extends to "n-dimensional Landmark", where a win should not ;; be obtained with as few as 5 contiguous marks: 6 or 7 (depending on n !) ;; should be preferred. @@ -303,9 +302,9 @@ is non-nil. One interesting value is `turn-on-font-lock'." ;; these values will change (hopefully improve) the strength of the program ;; and may change its style (rather aggressive here). -(defconst lm-nil-score 7 "Score of an empty qtuple.") +(defconst landmark-nil-score 7 "Score of an empty qtuple.") -(defconst lm-score-trans-table +(defconst landmark-score-trans-table (let ((Xscore 15) ; Score of a qtuple containing one X. (XXscore 400) ; Score of a qtuple containing two X's. (XXXscore 1800) ; Score of a qtuple containing three X's. @@ -338,7 +337,7 @@ is non-nil. One interesting value is `turn-on-font-lock'." ;; As we chose values 0, 1 and 6 to denote empty, X and O squares, ;; the contents of a qtuple are uniquely determined by the sum of ;; its elements and we just have to set up a translation table. - (vector lm-nil-score Xscore XXscore XXXscore XXXXscore 0 + (vector landmark-nil-score Xscore XXscore XXXscore XXXXscore 0 Oscore 0 0 0 0 0 OOscore 0 0 0 0 0 OOOscore 0 0 0 0 0 @@ -354,16 +353,16 @@ is non-nil. One interesting value is `turn-on-font-lock'." ;; qtuple. We may use these considerations to detect when a given move is ;; winning or losing. -(defconst lm-winning-threshold - (aref lm-score-trans-table (+ 6 6 6 6)) ;; OOOOscore +(defconst landmark-winning-threshold + (aref landmark-score-trans-table (+ 6 6 6 6)) ;; OOOOscore "Threshold score beyond which an Emacs move is winning.") -(defconst lm-losing-threshold - (aref lm-score-trans-table (+ 1 1 1 1)) ;; XXXXscore +(defconst landmark-losing-threshold + (aref landmark-score-trans-table (+ 1 1 1 1)) ;; XXXXscore "Threshold score beyond which a human move is winning.") -(defun lm-strongest-square () +(defun landmark-strongest-square () "Compute index of free square with highest score, or nil if none." ;; We just have to loop other all squares. However there are two problems: ;; 1/ The SCORE-TABLE only gives correct scores to free squares. To speed @@ -372,23 +371,23 @@ is non-nil. One interesting value is `turn-on-font-lock'." ;; 2/ We want to choose randomly between equally good moves. (let ((score-max 0) (count 0) ; Number of equally good moves - (square (lm-xy-to-index 1 1)) ; First square - (end (lm-xy-to-index lm-board-width lm-board-height)) + (square (landmark-xy-to-index 1 1)) ; First square + (end (landmark-xy-to-index landmark-board-width landmark-board-height)) best-square score) (while (<= square end) (cond ;; If score is lower (i.e. most of the time), skip to next: - ((< (aref lm-score-table square) score-max)) + ((< (aref landmark-score-table square) score-max)) ;; If score is better, beware of non free squares: - ((> (setq score (aref lm-score-table square)) score-max) - (if (zerop (aref lm-board square)) ; is it free ? + ((> (setq score (aref landmark-score-table square)) score-max) + (if (zerop (aref landmark-board square)) ; is it free ? (setq count 1 ; yes: take it ! best-square square score-max score) - (aset lm-score-table square -1))) ; no: kill it ! + (aset landmark-score-table square -1))) ; no: kill it ! ;; If score is equally good, choose randomly. But first check freeness: - ((not (zerop (aref lm-board square))) - (aset lm-score-table square -1)) + ((not (zerop (aref landmark-board square))) + (aset landmark-score-table square -1)) ((zerop (random (setq count (1+ count)))) (setq best-square square score-max score))) @@ -407,28 +406,28 @@ is non-nil. One interesting value is `turn-on-font-lock'." ;; Also, as it is likely that successive games will be played on a board with ;; same size, it is a good idea to save the initial SCORE-TABLE configuration. -(defvar lm-saved-score-table nil +(defvar landmark-saved-score-table nil "Recorded initial value of previous score table.") -(defvar lm-saved-board-width nil +(defvar landmark-saved-board-width nil "Recorded value of previous board width.") -(defvar lm-saved-board-height nil +(defvar landmark-saved-board-height nil "Recorded value of previous board height.") -(defun lm-init-score-table () +(defun landmark-init-score-table () "Create the score table vector and fill it with initial values." - (if (and lm-saved-score-table ; Has it been stored last time ? - (= lm-board-width lm-saved-board-width) - (= lm-board-height lm-saved-board-height)) - (setq lm-score-table (copy-sequence lm-saved-score-table)) + (if (and landmark-saved-score-table ; Has it been stored last time ? + (= landmark-board-width landmark-saved-board-width) + (= landmark-board-height landmark-saved-board-height)) + (setq landmark-score-table (copy-sequence landmark-saved-score-table)) ;; No, compute it: - (setq lm-score-table - (make-vector lm-vector-length (* 20 lm-nil-score))) + (setq landmark-score-table + (make-vector landmark-vector-length (* 20 landmark-nil-score))) (let (i j maxi maxj maxi2 maxj2) - (setq maxi (/ (1+ lm-board-width) 2) - maxj (/ (1+ lm-board-height) 2) + (setq maxi (/ (1+ landmark-board-width) 2) + maxj (/ (1+ landmark-board-height) 2) maxi2 (min 4 maxi) maxj2 (min 4 maxj)) ;; We took symmetry into account and could use it more if the board @@ -440,43 +439,43 @@ is non-nil. One interesting value is `turn-on-font-lock'." (while (<= i maxi2) (setq j 1) (while (<= j maxj) - (lm-init-square-score i j) + (landmark-init-square-score i j) (setq j (1+ j))) (setq i (1+ i))) (while (<= i maxi) (setq j 1) (while (<= j maxj2) - (lm-init-square-score i j) + (landmark-init-square-score i j) (setq j (1+ j))) (setq i (1+ i)))) - (setq lm-saved-score-table (copy-sequence lm-score-table) - lm-saved-board-width lm-board-width - lm-saved-board-height lm-board-height))) + (setq landmark-saved-score-table (copy-sequence landmark-score-table) + landmark-saved-board-width landmark-board-width + landmark-saved-board-height landmark-board-height))) -(defun lm-nb-qtuples (i j) +(defun landmark-nb-qtuples (i j) "Return the number of qtuples containing square I,J." ;; This function is complicated because we have to deal ;; with ugly cases like 3 by 6 boards, but it works. ;; If you have a simpler (and correct) solution, send it to me. Thanks ! (let ((left (min 4 (1- i))) - (right (min 4 (- lm-board-width i))) + (right (min 4 (- landmark-board-width i))) (up (min 4 (1- j))) - (down (min 4 (- lm-board-height j)))) + (down (min 4 (- landmark-board-height j)))) (+ -12 (min (max (+ left right) 3) 8) (min (max (+ up down) 3) 8) (min (max (+ (min left up) (min right down)) 3) 8) (min (max (+ (min right up) (min left down)) 3) 8)))) -(defun lm-init-square-score (i j) +(defun landmark-init-square-score (i j) "Give initial score to square I,J and to its mirror images." - (let ((ii (1+ (- lm-board-width i))) - (jj (1+ (- lm-board-height j))) - (sc (* (lm-nb-qtuples i j) (aref lm-score-trans-table 0)))) - (aset lm-score-table (lm-xy-to-index i j) sc) - (aset lm-score-table (lm-xy-to-index ii j) sc) - (aset lm-score-table (lm-xy-to-index i jj) sc) - (aset lm-score-table (lm-xy-to-index ii jj) sc))) + (let ((ii (1+ (- landmark-board-width i))) + (jj (1+ (- landmark-board-height j))) + (sc (* (landmark-nb-qtuples i j) (aref landmark-score-trans-table 0)))) + (aset landmark-score-table (landmark-xy-to-index i j) sc) + (aset landmark-score-table (landmark-xy-to-index ii j) sc) + (aset landmark-score-table (landmark-xy-to-index i jj) sc) + (aset landmark-score-table (landmark-xy-to-index ii jj) sc))) ;;;_ - MAINTAINING THE SCORE TABLE. @@ -486,7 +485,7 @@ is non-nil. One interesting value is `turn-on-font-lock'." ;; SCORE-TABLE after each move. Updating needs not modify more than 36 ;; squares: it is done in constant time. -(defun lm-update-score-table (square dval) +(defun landmark-update-score-table (square dval) "Update score table after SQUARE received a DVAL increment." ;; The board has already been updated when this function is called. ;; Updating scores is done by looking for qtuples boundaries in all four @@ -494,25 +493,25 @@ is non-nil. One interesting value is `turn-on-font-lock'." ;; Finally all squares received the right increment, and then are up to ;; date, except possibly for SQUARE itself if we are taking a move back for ;; its score had been set to -1 at the time. - (let* ((x (lm-index-to-x square)) - (y (lm-index-to-y square)) + (let* ((x (landmark-index-to-x square)) + (y (landmark-index-to-y square)) (imin (max -4 (- 1 x))) (jmin (max -4 (- 1 y))) - (imax (min 0 (- lm-board-width x 4))) - (jmax (min 0 (- lm-board-height y 4)))) - (lm-update-score-in-direction imin imax + (imax (min 0 (- landmark-board-width x 4))) + (jmax (min 0 (- landmark-board-height y 4)))) + (landmark-update-score-in-direction imin imax square 1 0 dval) - (lm-update-score-in-direction jmin jmax + (landmark-update-score-in-direction jmin jmax square 0 1 dval) - (lm-update-score-in-direction (max imin jmin) (min imax jmax) + (landmark-update-score-in-direction (max imin jmin) (min imax jmax) square 1 1 dval) - (lm-update-score-in-direction (max (- 1 y) -4 - (- x lm-board-width)) + (landmark-update-score-in-direction (max (- 1 y) -4 + (- x landmark-board-width)) (min 0 (- x 5) - (- lm-board-height y 4)) + (- landmark-board-height y 4)) square -1 1 dval))) -(defun lm-update-score-in-direction (left right square dx dy dval) +(defun landmark-update-score-in-direction (left right square dx dy dval) "Update scores for all squares in the qtuples in range. That is, those between the LEFTth square and the RIGHTth after SQUARE, along the DX, DY direction, considering that DVAL has been added on SQUARE." @@ -523,7 +522,7 @@ along the DX, DY direction, considering that DVAL has been added on SQUARE." ((> left right)) ; Quit (t ; Else .. (let (depl square0 square1 square2 count delta) - (setq depl (lm-xy-to-index dx dy) + (setq depl (landmark-xy-to-index dx dy) square0 (+ square (* left depl)) square1 (+ square (* right depl)) square2 (+ square0 (* 4 depl))) @@ -531,25 +530,25 @@ along the DX, DY direction, considering that DVAL has been added on SQUARE." (setq square square0 count 0) (while (<= square square2) - (setq count (+ count (aref lm-board square)) + (setq count (+ count (aref landmark-board square)) square (+ square depl))) (while (<= square0 square1) ;; Update the squares of the qtuple beginning in SQUARE0 and ending ;; in SQUARE2. - (setq delta (- (aref lm-score-trans-table count) - (aref lm-score-trans-table (- count dval)))) + (setq delta (- (aref landmark-score-trans-table count) + (aref landmark-score-trans-table (- count dval)))) (cond ((not (zerop delta)) ; or else nothing to update (setq square square0) (while (<= square square2) - (if (zerop (aref lm-board square)) ; only for free squares - (aset lm-score-table square - (+ (aref lm-score-table square) delta))) + (if (zerop (aref landmark-board square)) ; only for free squares + (aset landmark-score-table square + (+ (aref landmark-score-table square) delta))) (setq square (+ square depl))))) ;; Then shift the qtuple one square along DEPL, this only requires ;; modifying SQUARE0 and SQUARE2. (setq square2 (+ square2 depl) - count (+ count (- (aref lm-board square0)) - (aref lm-board square2)) + count (+ count (- (aref landmark-board square0)) + (aref landmark-board square2)) square0 (+ square0 depl))))))) ;;; @@ -561,328 +560,328 @@ along the DX, DY direction, considering that DVAL has been added on SQUARE." ;; (anti-updating the score table) and to compute the table from scratch in ;; case of an interruption. -(defvar lm-game-in-progress nil +(defvar landmark-game-in-progress nil "Non-nil if a game is in progress.") -(defvar lm-game-history nil +(defvar landmark-game-history nil "A record of all moves that have been played during current game.") -(defvar lm-number-of-moves nil +(defvar landmark-number-of-moves nil "Number of moves already played in current game.") -(defvar lm-number-of-human-moves nil +(defvar landmark-number-of-human-moves nil "Number of moves already played by human in current game.") -(defvar lm-emacs-played-first nil +(defvar landmark-emacs-played-first nil "Non-nil if Emacs played first.") -(defvar lm-human-took-back nil +(defvar landmark-human-took-back nil "Non-nil if Human took back a move during the game.") -(defvar lm-human-refused-draw nil +(defvar landmark-human-refused-draw nil "Non-nil if Human refused Emacs offer of a draw.") -(defvar lm-emacs-is-computing nil +(defvar landmark-emacs-is-computing nil ;; This is used to detect interruptions. Hopefully, it should not be needed. "Non-nil if Emacs is in the middle of a computation.") -(defun lm-start-game (n m) +(defun landmark-start-game (n m) "Initialize a new game on an N by M board." - (setq lm-emacs-is-computing t) ; Raise flag - (setq lm-game-in-progress t) - (setq lm-board-width n - lm-board-height m - lm-vector-length (1+ (* (+ m 2) (1+ n))) - lm-draw-limit (/ (* 7 n m) 10)) - (setq lm-emacs-won nil - lm-game-history nil - lm-number-of-moves 0 - lm-number-of-human-moves 0 - lm-emacs-played-first nil - lm-human-took-back nil - lm-human-refused-draw nil) - (lm-init-display n m) ; Display first: the rest takes time - (lm-init-score-table) ; INIT-BOARD requires that the score - (lm-init-board) ; table be already created. - (setq lm-emacs-is-computing nil)) - -(defun lm-play-move (square val &optional dont-update-score) + (setq landmark-emacs-is-computing t) ; Raise flag + (setq landmark-game-in-progress t) + (setq landmark-board-width n + landmark-board-height m + landmark-vector-length (1+ (* (+ m 2) (1+ n))) + landmark-draw-limit (/ (* 7 n m) 10)) + (setq landmark-emacs-won nil + landmark-game-history nil + landmark-number-of-moves 0 + landmark-number-of-human-moves 0 + landmark-emacs-played-first nil + landmark-human-took-back nil + landmark-human-refused-draw nil) + (landmark-init-display n m) ; Display first: the rest takes time + (landmark-init-score-table) ; INIT-BOARD requires that the score + (landmark-init-board) ; table be already created. + (setq landmark-emacs-is-computing nil)) + +(defun landmark-play-move (square val &optional dont-update-score) "Go to SQUARE, play VAL and update everything." - (setq lm-emacs-is-computing t) ; Raise flag + (setq landmark-emacs-is-computing t) ; Raise flag (cond ((= 1 val) ; a Human move - (setq lm-number-of-human-moves (1+ lm-number-of-human-moves))) - ((zerop lm-number-of-moves) ; an Emacs move. Is it first ? - (setq lm-emacs-played-first t))) - (setq lm-game-history - (cons (cons square (aref lm-score-table square)) - lm-game-history) - lm-number-of-moves (1+ lm-number-of-moves)) - (lm-plot-square square val) - (aset lm-board square val) ; *BEFORE* UPDATE-SCORE ! + (setq landmark-number-of-human-moves (1+ landmark-number-of-human-moves))) + ((zerop landmark-number-of-moves) ; an Emacs move. Is it first ? + (setq landmark-emacs-played-first t))) + (setq landmark-game-history + (cons (cons square (aref landmark-score-table square)) + landmark-game-history) + landmark-number-of-moves (1+ landmark-number-of-moves)) + (landmark-plot-square square val) + (aset landmark-board square val) ; *BEFORE* UPDATE-SCORE ! (if dont-update-score nil - (lm-update-score-table square val) ; previous val was 0: dval = val - (aset lm-score-table square -1)) - (setq lm-emacs-is-computing nil)) + (landmark-update-score-table square val) ; previous val was 0: dval = val + (aset landmark-score-table square -1)) + (setq landmark-emacs-is-computing nil)) -(defun lm-take-back () +(defun landmark-take-back () "Take back last move and update everything." - (setq lm-emacs-is-computing t) - (let* ((last-move (car lm-game-history)) + (setq landmark-emacs-is-computing t) + (let* ((last-move (car landmark-game-history)) (square (car last-move)) - (oldval (aref lm-board square))) + (oldval (aref landmark-board square))) (if (= 1 oldval) - (setq lm-number-of-human-moves (1- lm-number-of-human-moves))) - (setq lm-game-history (cdr lm-game-history) - lm-number-of-moves (1- lm-number-of-moves)) - (lm-plot-square square 0) - (aset lm-board square 0) ; *BEFORE* UPDATE-SCORE ! - (lm-update-score-table square (- oldval)) - (aset lm-score-table square (cdr last-move))) - (setq lm-emacs-is-computing nil)) + (setq landmark-number-of-human-moves (1- landmark-number-of-human-moves))) + (setq landmark-game-history (cdr landmark-game-history) + landmark-number-of-moves (1- landmark-number-of-moves)) + (landmark-plot-square square 0) + (aset landmark-board square 0) ; *BEFORE* UPDATE-SCORE ! + (landmark-update-score-table square (- oldval)) + (aset landmark-score-table square (cdr last-move))) + (setq landmark-emacs-is-computing nil)) ;;;_ + SESSION CONTROL. -(defvar lm-number-of-trials 0 +(defvar landmark-number-of-trials 0 "The number of times that landmark has been run.") -(defvar lm-sum-of-moves 0 +(defvar landmark-sum-of-moves 0 "The total number of moves made in all games.") -(defvar lm-number-of-emacs-wins 0 +(defvar landmark-number-of-emacs-wins 0 "Number of games Emacs won in this session.") -(defvar lm-number-of-human-wins 0 +(defvar landmark-number-of-human-wins 0 "Number of games you won in this session.") -(defvar lm-number-of-draws 0 +(defvar landmark-number-of-draws 0 "Number of games already drawn in this session.") -(defun lm-terminate-game (result) +(defun landmark-terminate-game (result) "Terminate the current game with RESULT." - (setq lm-number-of-trials (1+ lm-number-of-trials)) - (setq lm-sum-of-moves (+ lm-sum-of-moves lm-number-of-moves)) + (setq landmark-number-of-trials (1+ landmark-number-of-trials)) + (setq landmark-sum-of-moves (+ landmark-sum-of-moves landmark-number-of-moves)) (if (eq result 'crash-game) (message "Sorry, I have been interrupted and cannot resume that game...")) - (lm-display-statistics) + (landmark-display-statistics) ;;(ding) - (setq lm-game-in-progress nil)) + (setq landmark-game-in-progress nil)) -(defun lm-crash-game () +(defun landmark-crash-game () "What to do when Emacs detects it has been interrupted." - (setq lm-emacs-is-computing nil) - (lm-terminate-game 'crash-game) + (setq landmark-emacs-is-computing nil) + (landmark-terminate-game 'crash-game) (sit-for 4) ; Let's see the message - (lm-prompt-for-other-game)) + (landmark-prompt-for-other-game)) ;;;_ + INTERACTIVE COMMANDS. -(defun lm-emacs-plays () +(defun landmark-emacs-plays () "Compute Emacs next move and play it." (interactive) - (lm-switch-to-window) + (landmark-switch-to-window) (cond - (lm-emacs-is-computing - (lm-crash-game)) - ((not lm-game-in-progress) - (lm-prompt-for-other-game)) + (landmark-emacs-is-computing + (landmark-crash-game)) + ((not landmark-game-in-progress) + (landmark-prompt-for-other-game)) (t (message "Let me think...") (let (square score) - (setq square (lm-strongest-square)) + (setq square (landmark-strongest-square)) (cond ((null square) - (lm-terminate-game 'nobody-won)) + (landmark-terminate-game 'nobody-won)) (t - (setq score (aref lm-score-table square)) - (lm-play-move square 6) - (cond ((>= score lm-winning-threshold) - (setq lm-emacs-won t) ; for font-lock - (lm-find-filled-qtuple square 6) - (lm-terminate-game 'emacs-won)) + (setq score (aref landmark-score-table square)) + (landmark-play-move square 6) + (cond ((>= score landmark-winning-threshold) + (setq landmark-emacs-won t) ; for font-lock + (landmark-find-filled-qtuple square 6) + (landmark-terminate-game 'emacs-won)) ((zerop score) - (lm-terminate-game 'nobody-won)) - ((and (> lm-number-of-moves lm-draw-limit) - (not lm-human-refused-draw) - (lm-offer-a-draw)) - (lm-terminate-game 'draw-agreed)) + (landmark-terminate-game 'nobody-won)) + ((and (> landmark-number-of-moves landmark-draw-limit) + (not landmark-human-refused-draw) + (landmark-offer-a-draw)) + (landmark-terminate-game 'draw-agreed)) (t - (lm-prompt-for-move))))))))) + (landmark-prompt-for-move))))))))) ;; For small square dimensions this is approximate, since though measured in ;; pixels, event's (X . Y) is a character's top-left corner. -(defun lm-click (click) +(defun landmark-click (click) "Position at the square where you click." (interactive "e") (and (windowp (posn-window (setq click (event-end click)))) (numberp (posn-point click)) (select-window (posn-window click)) (setq click (posn-col-row click)) - (lm-goto-xy + (landmark-goto-xy (min (max (/ (+ (- (car click) - lm-x-offset + landmark-x-offset 1) (window-hscroll) - lm-square-width - (% lm-square-width 2) - (/ lm-square-width 2)) - lm-square-width) + landmark-square-width + (% landmark-square-width 2) + (/ landmark-square-width 2)) + landmark-square-width) 1) - lm-board-width) + landmark-board-width) (min (max (/ (+ (- (cdr click) - lm-y-offset + landmark-y-offset 1) (let ((inhibit-point-motion-hooks t)) (count-lines 1 (window-start))) - lm-square-height - (% lm-square-height 2) - (/ lm-square-height 2)) - lm-square-height) + landmark-square-height + (% landmark-square-height 2) + (/ landmark-square-height 2)) + landmark-square-height) 1) - lm-board-height)))) + landmark-board-height)))) -(defun lm-mouse-play (click) +(defun landmark-mouse-play (click) "Play at the square where you click." (interactive "e") - (if (lm-click click) - (lm-human-plays))) + (if (landmark-click click) + (landmark-human-plays))) -(defun lm-human-plays () - "Signal to the Lm program that you have played. +(defun landmark-human-plays () + "Signal to the Landmark program that you have played. You must have put the cursor on the square where you want to play. If the game is finished, this command requests for another game." (interactive) - (lm-switch-to-window) + (landmark-switch-to-window) (cond - (lm-emacs-is-computing - (lm-crash-game)) - ((not lm-game-in-progress) - (lm-prompt-for-other-game)) + (landmark-emacs-is-computing + (landmark-crash-game)) + ((not landmark-game-in-progress) + (landmark-prompt-for-other-game)) (t (let (square score) - (setq square (lm-point-square)) + (setq square (landmark-point-square)) (cond ((null square) (error "Your point is not on a square. Retry!")) - ((not (zerop (aref lm-board square))) + ((not (zerop (aref landmark-board square))) (error "Your point is not on a free square. Retry!")) (t - (setq score (aref lm-score-table square)) - (lm-play-move square 1) - (cond ((and (>= score lm-losing-threshold) + (setq score (aref landmark-score-table square)) + (landmark-play-move square 1) + (cond ((and (>= score landmark-losing-threshold) ;; Just testing SCORE > THRESHOLD is not enough for ;; detecting wins, it just gives an indication that - ;; we confirm with LM-FIND-FILLED-QTUPLE. - (lm-find-filled-qtuple square 1)) - (lm-terminate-game 'human-won)) + ;; we confirm with LANDMARK-FIND-FILLED-QTUPLE. + (landmark-find-filled-qtuple square 1)) + (landmark-terminate-game 'human-won)) (t - (lm-emacs-plays))))))))) + (landmark-emacs-plays))))))))) -(defun lm-human-takes-back () - "Signal to the Lm program that you wish to take back your last move." +(defun landmark-human-takes-back () + "Signal to the Landmark program that you wish to take back your last move." (interactive) - (lm-switch-to-window) + (landmark-switch-to-window) (cond - (lm-emacs-is-computing - (lm-crash-game)) - ((not lm-game-in-progress) + (landmark-emacs-is-computing + (landmark-crash-game)) + ((not landmark-game-in-progress) (message "Too late for taking back...") (sit-for 4) - (lm-prompt-for-other-game)) - ((zerop lm-number-of-human-moves) + (landmark-prompt-for-other-game)) + ((zerop landmark-number-of-human-moves) (message "You have not played yet... Your move?")) (t (message "One moment, please...") ;; It is possible for the user to let Emacs play several consecutive ;; moves, so that the best way to know when to stop taking back moves is ;; to count the number of human moves: - (setq lm-human-took-back t) - (let ((number lm-number-of-human-moves)) - (while (= number lm-number-of-human-moves) - (lm-take-back))) - (lm-prompt-for-move)))) - -(defun lm-human-resigns () - "Signal to the Lm program that you may want to resign." + (setq landmark-human-took-back t) + (let ((number landmark-number-of-human-moves)) + (while (= number landmark-number-of-human-moves) + (landmark-take-back))) + (landmark-prompt-for-move)))) + +(defun landmark-human-resigns () + "Signal to the Landmark program that you may want to resign." (interactive) - (lm-switch-to-window) + (landmark-switch-to-window) (cond - (lm-emacs-is-computing - (lm-crash-game)) - ((not lm-game-in-progress) + (landmark-emacs-is-computing + (landmark-crash-game)) + ((not landmark-game-in-progress) (message "There is no game in progress")) ((y-or-n-p "You mean, you resign? ") - (lm-terminate-game 'human-resigned)) + (landmark-terminate-game 'human-resigned)) ((y-or-n-p "You mean, we continue? ") - (lm-prompt-for-move)) + (landmark-prompt-for-move)) (t - (lm-terminate-game 'human-resigned)))) ; OK. Accept it + (landmark-terminate-game 'human-resigned)))) ; OK. Accept it ;;;_ + PROMPTING THE HUMAN PLAYER. -(defun lm-prompt-for-move () +(defun landmark-prompt-for-move () "Display a message asking for Human's move." - (message (if (zerop lm-number-of-human-moves) + (message (if (zerop landmark-number-of-human-moves) "Your move? (move to a free square and hit X, RET ...)" "Your move?"))) -(defun lm-prompt-for-other-game () +(defun landmark-prompt-for-other-game () "Ask for another game, and start it." (if (y-or-n-p "Another game? ") (if (y-or-n-p "Retain learned weights ") - (lm 2) - (lm 1)) + (landmark 2) + (landmark 1)) (message "Chicken!"))) -(defun lm-offer-a-draw () +(defun landmark-offer-a-draw () "Offer a draw and return t if Human accepted it." (or (y-or-n-p "I offer you a draw. Do you accept it? ") - (not (setq lm-human-refused-draw t)))) + (not (setq landmark-human-refused-draw t)))) -(defun lm-max-width () +(defun landmark-max-width () "Largest possible board width for the current window." (1+ (/ (- (window-width (selected-window)) - lm-x-offset lm-x-offset 1) - lm-square-width))) + landmark-x-offset landmark-x-offset 1) + landmark-square-width))) -(defun lm-max-height () +(defun landmark-max-height () "Largest possible board height for the current window." (1+ (/ (- (window-height (selected-window)) - lm-y-offset lm-y-offset 2) + landmark-y-offset landmark-y-offset 2) ;; 2 instead of 1 because WINDOW-HEIGHT includes the mode line ! - lm-square-height))) + landmark-square-height))) -(defun lm-point-y () +(defun landmark-point-y () "Return the board row where point is." (let ((inhibit-point-motion-hooks t)) - (1+ (/ (- (count-lines 1 (point)) lm-y-offset (if (bolp) 0 1)) - lm-square-height)))) + (1+ (/ (- (count-lines 1 (point)) landmark-y-offset (if (bolp) 0 1)) + landmark-square-height)))) -(defun lm-point-square () +(defun landmark-point-square () "Return the index of the square point is on." (let ((inhibit-point-motion-hooks t)) - (lm-xy-to-index (1+ (/ (- (current-column) lm-x-offset) - lm-square-width)) - (lm-point-y)))) + (landmark-xy-to-index (1+ (/ (- (current-column) landmark-x-offset) + landmark-square-width)) + (landmark-point-y)))) -(defun lm-goto-square (index) +(defun landmark-goto-square (index) "Move point to square number INDEX." - (lm-goto-xy (lm-index-to-x index) (lm-index-to-y index))) + (landmark-goto-xy (landmark-index-to-x index) (landmark-index-to-y index))) -(defun lm-goto-xy (x y) +(defun landmark-goto-xy (x y) "Move point to square at X, Y coords." (let ((inhibit-point-motion-hooks t)) (goto-char (point-min)) - (forward-line (+ lm-y-offset (* lm-square-height (1- y))))) - (move-to-column (+ lm-x-offset (* lm-square-width (1- x))))) + (forward-line (+ landmark-y-offset (* landmark-square-height (1- y))))) + (move-to-column (+ landmark-x-offset (* landmark-square-width (1- x))))) -(defun lm-plot-square (square value) +(defun landmark-plot-square (square value) "Draw 'X', 'O' or '.' on SQUARE depending on VALUE, leave point there." (or (= value 1) - (lm-goto-square square)) + (landmark-goto-square square)) (let ((inhibit-read-only t) (inhibit-point-motion-hooks t)) (insert-and-inherit (cond ((= value 1) ?.) @@ -901,8 +900,8 @@ mouse-1: get robot moving, mouse-2: play on this square"))) (backward-char 1)) (sit-for 0)) ; Display NOW -(defun lm-init-display (n m) - "Display an N by M Lm board." +(defun landmark-init-display (n m) + "Display an N by M Landmark board." (buffer-disable-undo (current-buffer)) (let ((inhibit-read-only t) (point 1) opoint @@ -910,17 +909,17 @@ mouse-1: get robot moving, mouse-2: play on this square"))) (i m) j x) ;; Try to minimize number of chars (because of text properties) (setq tab-width - (if (zerop (% lm-x-offset lm-square-width)) - lm-square-width - (max (/ (+ (% lm-x-offset lm-square-width) - lm-square-width 1) 2) 2))) + (if (zerop (% landmark-x-offset landmark-square-width)) + landmark-square-width + (max (/ (+ (% landmark-x-offset landmark-square-width) + landmark-square-width 1) 2) 2))) (erase-buffer) - (newline lm-y-offset) + (newline landmark-y-offset) (while (progn (setq j n - x (- lm-x-offset lm-square-width)) + x (- landmark-x-offset landmark-square-width)) (while (>= (setq j (1- j)) 0) - (insert-char ?\t (/ (- (setq x (+ x lm-square-width)) + (insert-char ?\t (/ (- (setq x (+ x landmark-square-width)) (current-column)) tab-width)) (insert-char ? (- x (current-column))) @@ -941,7 +940,7 @@ mouse-1: get robot moving, mouse-2: play on this square"))) (> (setq i (1- i)) 0)) (if (= i (1- m)) (setq opoint point)) - (insert-char ?\n lm-square-height)) + (insert-char ?\n landmark-square-height)) (or (eq (char-after 1) ?.) (put-text-property 1 2 'point-entered (lambda (x y) (if (bobp) (forward-char))))) @@ -949,32 +948,32 @@ mouse-1: get robot moving, mouse-2: play on this square"))) (put-text-property point (point) 'intangible 2)) (put-text-property point (point) 'point-entered (lambda (x y) (if (eobp) (backward-char)))) - (put-text-property (point-min) (point) 'category 'lm-mode)) - (lm-goto-xy (/ (1+ n) 2) (/ (1+ m) 2)) ; center of the board + (put-text-property (point-min) (point) 'category 'landmark-mode)) + (landmark-goto-xy (/ (1+ n) 2) (/ (1+ m) 2)) ; center of the board (sit-for 0)) ; Display NOW -(defun lm-display-statistics () +(defun landmark-display-statistics () "Obnoxiously display some statistics about previous games in mode line." ;; We store this string in the mode-line-process local variable. ;; This is certainly not the cleanest way out ... (setq mode-line-process (format ": Trials: %d, Avg#Moves: %d" - lm-number-of-trials - (if (zerop lm-number-of-trials) + landmark-number-of-trials + (if (zerop landmark-number-of-trials) 0 - (/ lm-sum-of-moves lm-number-of-trials)))) + (/ landmark-sum-of-moves landmark-number-of-trials)))) (force-mode-line-update)) -(defun lm-switch-to-window () - "Find or create the Lm buffer, and display it." +(defun landmark-switch-to-window () + "Find or create the Landmark buffer, and display it." (interactive) - (let ((buff (get-buffer "*Lm*"))) + (let ((buff (get-buffer "*Landmark*"))) (if buff ; Buffer exists: (switch-to-buffer buff) ; no problem. - (if lm-game-in-progress - (lm-crash-game)) ; buffer has been killed or something - (switch-to-buffer "*Lm*") ; Anyway, start anew. - (lm-mode)))) + (if landmark-game-in-progress + (landmark-crash-game)) ; buffer has been killed or something + (switch-to-buffer "*Landmark*") ; Anyway, start anew. + (landmark-mode)))) ;;;_ + CROSSING WINNING QTUPLES. @@ -984,61 +983,61 @@ mouse-1: get robot moving, mouse-2: play on this square"))) ;; squares ! It only knows the square where the last move has been played and ;; who won. The solution is to scan the board along all four directions. -(defun lm-find-filled-qtuple (square value) +(defun landmark-find-filled-qtuple (square value) "Return t if SQUARE belongs to a qtuple filled with VALUEs." - (or (lm-check-filled-qtuple square value 1 0) - (lm-check-filled-qtuple square value 0 1) - (lm-check-filled-qtuple square value 1 1) - (lm-check-filled-qtuple square value -1 1))) + (or (landmark-check-filled-qtuple square value 1 0) + (landmark-check-filled-qtuple square value 0 1) + (landmark-check-filled-qtuple square value 1 1) + (landmark-check-filled-qtuple square value -1 1))) -(defun lm-check-filled-qtuple (square value dx dy) +(defun landmark-check-filled-qtuple (square value dx dy) "Return t if SQUARE belongs to a qtuple filled with VALUEs along DX, DY." (let ((a 0) (b 0) (left square) (right square) - (depl (lm-xy-to-index dx dy))) + (depl (landmark-xy-to-index dx dy))) (while (and (> a -4) ; stretch tuple left - (= value (aref lm-board (setq left (- left depl))))) + (= value (aref landmark-board (setq left (- left depl))))) (setq a (1- a))) (while (and (< b (+ a 4)) ; stretch tuple right - (= value (aref lm-board (setq right (+ right depl))))) + (= value (aref landmark-board (setq right (+ right depl))))) (setq b (1+ b))) (cond ((= b (+ a 4)) ; tuple length = 5 ? - (lm-cross-qtuple (+ square (* a depl)) (+ square (* b depl)) + (landmark-cross-qtuple (+ square (* a depl)) (+ square (* b depl)) dx dy) t)))) -(defun lm-cross-qtuple (square1 square2 dx dy) +(defun landmark-cross-qtuple (square1 square2 dx dy) "Cross every square between SQUARE1 and SQUARE2 in the DX, DY direction." (save-excursion ; Not moving point from last square - (let ((depl (lm-xy-to-index dx dy)) + (let ((depl (landmark-xy-to-index dx dy)) (inhibit-read-only t) (inhibit-point-motion-hooks t)) ;; WARNING: this function assumes DEPL > 0 and SQUARE2 > SQUARE1 (while (/= square1 square2) - (lm-goto-square square1) + (landmark-goto-square square1) (setq square1 (+ square1 depl)) (cond ((= dy 0) ; Horizontal (forward-char 1) - (insert-char ?- (1- lm-square-width) t) + (insert-char ?- (1- landmark-square-width) t) (delete-region (point) (progn (skip-chars-forward " \t") (point)))) ((= dx 0) ; Vertical - (let ((lm-n 1) + (let ((landmark-n 1) (column (current-column))) - (while (< lm-n lm-square-height) - (setq lm-n (1+ lm-n)) + (while (< landmark-n landmark-square-height) + (setq landmark-n (1+ landmark-n)) (forward-line 1) (indent-to column) (insert-and-inherit ?|)))) ((= dx -1) ; 1st Diagonal - (indent-to (prog1 (- (current-column) (/ lm-square-width 2)) - (forward-line (/ lm-square-height 2)))) + (indent-to (prog1 (- (current-column) (/ landmark-square-width 2)) + (forward-line (/ landmark-square-height 2)))) (insert-and-inherit ?/)) (t ; 2nd Diagonal - (indent-to (prog1 (+ (current-column) (/ lm-square-width 2)) - (forward-line (/ lm-square-height 2)))) + (indent-to (prog1 (+ (current-column) (/ landmark-square-width 2)) + (forward-line (/ landmark-square-height 2)))) (insert-and-inherit ?\\)))))) (sit-for 0)) ; Display NOW @@ -1046,301 +1045,301 @@ mouse-1: get robot moving, mouse-2: play on this square"))) ;;;_ + CURSOR MOTION. ;; previous-line and next-line don't work right with intangible newlines -(defun lm-move-down () - "Move point down one row on the Lm board." +(defun landmark-move-down () + "Move point down one row on the Landmark board." (interactive) - (if (< (lm-point-y) lm-board-height) - (forward-line 1)));;; lm-square-height))) + (if (< (landmark-point-y) landmark-board-height) + (forward-line 1)));;; landmark-square-height))) -(defun lm-move-up () - "Move point up one row on the Lm board." +(defun landmark-move-up () + "Move point up one row on the Landmark board." (interactive) - (if (> (lm-point-y) 1) - (forward-line (- lm-square-height)))) + (if (> (landmark-point-y) 1) + (forward-line (- landmark-square-height)))) -(defun lm-move-ne () - "Move point North East on the Lm board." +(defun landmark-move-ne () + "Move point North East on the Landmark board." (interactive) - (lm-move-up) + (landmark-move-up) (forward-char)) -(defun lm-move-se () - "Move point South East on the Lm board." +(defun landmark-move-se () + "Move point South East on the Landmark board." (interactive) - (lm-move-down) + (landmark-move-down) (forward-char)) -(defun lm-move-nw () - "Move point North West on the Lm board." +(defun landmark-move-nw () + "Move point North West on the Landmark board." (interactive) - (lm-move-up) + (landmark-move-up) (backward-char)) -(defun lm-move-sw () - "Move point South West on the Lm board." +(defun landmark-move-sw () + "Move point South West on the Landmark board." (interactive) - (lm-move-down) + (landmark-move-down) (backward-char)) -(defun lm-beginning-of-line () - "Move point to first square on the Lm board row." +(defun landmark-beginning-of-line () + "Move point to first square on the Landmark board row." (interactive) - (move-to-column lm-x-offset)) + (move-to-column landmark-x-offset)) -(defun lm-end-of-line () - "Move point to last square on the Lm board row." +(defun landmark-end-of-line () + "Move point to last square on the Landmark board row." (interactive) - (move-to-column (+ lm-x-offset - (* lm-square-width (1- lm-board-width))))) + (move-to-column (+ landmark-x-offset + (* landmark-square-width (1- landmark-board-width))))) ;;;_ + Simulation variables -;;;_ - lm-nvar -(defvar lm-nvar 0.0075 +;;;_ - landmark-nvar +(defvar landmark-nvar 0.0075 "Not used. Affects a noise generator which was used in an earlier incarnation of this program to add a random element to the way moves were made.") ;;;_ - lists of cardinal directions ;;;_ : -(defvar lm-ns '(lm-n lm-s) +(defvar landmark-ns '(landmark-n landmark-s) "Used when doing something relative to the north and south axes.") -(defvar lm-ew '(lm-e lm-w) +(defvar landmark-ew '(landmark-e landmark-w) "Used when doing something relative to the east and west axes.") -(defvar lm-directions '(lm-n lm-s lm-e lm-w) +(defvar landmark-directions '(landmark-n landmark-s landmark-e landmark-w) "The cardinal directions.") -(defvar lm-8-directions - '((lm-n) (lm-n lm-w) (lm-w) (lm-s lm-w) - (lm-s) (lm-s lm-e) (lm-e) (lm-n lm-e)) +(defvar landmark-8-directions + '((landmark-n) (landmark-n landmark-w) (landmark-w) (landmark-s landmark-w) + (landmark-s) (landmark-s landmark-e) (landmark-e) (landmark-n landmark-e)) "The full 8 possible directions.") -(defvar lm-number-of-moves +(defvar landmark-number-of-moves "The number of moves made by the robot so far.") ;;;_* Terry's mods to create lm.el -;;;(setq lm-debug nil) -(defvar lm-debug nil +;;;(setq landmark-debug nil) +(defvar landmark-debug nil "If non-nil, debugging is printed.") -(defcustom lm-one-moment-please nil +(defcustom landmark-one-moment-please nil "If non-nil, print \"One moment please\" when a new board is generated. The drawback of this is you don't see how many moves the last run took because it is overwritten by \"One moment please\"." :type 'boolean - :group 'lm) -(defcustom lm-output-moves t + :group 'landmark) +(defcustom landmark-output-moves t "If non-nil, output number of moves so far on a move-by-move basis." :type 'boolean - :group 'lm) + :group 'landmark) -(defun lm-weights-debug () - (if lm-debug - (progn (lm-print-wts) (lm-blackbox) (lm-print-y-s-noise) - (lm-print-smell)))) +(defun landmark-weights-debug () + (if landmark-debug + (progn (landmark-print-wts) (landmark-blackbox) (landmark-print-y-s-noise) + (landmark-print-smell)))) ;;;_ - Printing various things -(defun lm-print-distance-int (direction) +(defun landmark-print-distance-int (direction) (interactive) (insert (format "%S %S " direction (get direction 'distance)))) -(defun lm-print-distance () - (insert (format "tree: %S \n" (calc-distance-of-robot-from 'lm-tree))) - (mapc 'lm-print-distance-int lm-directions)) +(defun landmark-print-distance () + (insert (format "tree: %S \n" (calc-distance-of-robot-from 'landmark-tree))) + (mapc 'landmark-print-distance-int landmark-directions)) -;;(setq direction 'lm-n) -;;(get 'lm-n 'lm-s) -(defun lm-nslify-wts-int (direction) +;;(setq direction 'landmark-n) +;;(get 'landmark-n 'landmark-s) +(defun landmark-nslify-wts-int (direction) (mapcar (lambda (target-direction) (get direction target-direction)) - lm-directions)) + landmark-directions)) -(defun lm-nslify-wts () +(defun landmark-nslify-wts () (interactive) - (let ((l (apply 'append (mapcar 'lm-nslify-wts-int lm-directions)))) + (let ((l (apply 'append (mapcar 'landmark-nslify-wts-int landmark-directions)))) (insert (format "set data_value WTS \n %s \n" l)) (insert (format "/* max: %S min: %S */" (eval (cons 'max l)) (eval (cons 'min l)))))) -(defun lm-print-wts-int (direction) +(defun landmark-print-wts-int (direction) (mapc (lambda (target-direction) (insert (format "%S %S %S " direction target-direction (get direction target-direction)))) - lm-directions) + landmark-directions) (insert "\n")) -(defun lm-print-wts () +(defun landmark-print-wts () (interactive) - (with-current-buffer "*lm-wts*" + (with-current-buffer "*landmark-wts*" (insert "==============================\n") - (mapc 'lm-print-wts-int lm-directions))) + (mapc 'landmark-print-wts-int landmark-directions))) -(defun lm-print-moves (moves) +(defun landmark-print-moves (moves) (interactive) - (with-current-buffer "*lm-moves*" + (with-current-buffer "*landmark-moves*" (insert (format "%S\n" moves)))) -(defun lm-print-y-s-noise-int (direction) - (insert (format "%S:lm-y %S, s %S, noise %S \n" +(defun landmark-print-y-s-noise-int (direction) + (insert (format "%S:landmark-y %S, s %S, noise %S \n" (symbol-name direction) (get direction 'y_t) (get direction 's) (get direction 'noise) ))) -(defun lm-print-y-s-noise () +(defun landmark-print-y-s-noise () (interactive) - (with-current-buffer "*lm-y,s,noise*" + (with-current-buffer "*landmark-y,s,noise*" (insert "==============================\n") - (mapc 'lm-print-y-s-noise-int lm-directions))) + (mapc 'landmark-print-y-s-noise-int landmark-directions))) -(defun lm-print-smell-int (direction) +(defun landmark-print-smell-int (direction) (insert (format "%S: smell: %S \n" (symbol-name direction) (get direction 'smell)))) -(defun lm-print-smell () +(defun landmark-print-smell () (interactive) - (with-current-buffer "*lm-smell*" + (with-current-buffer "*landmark-smell*" (insert "==============================\n") (insert (format "tree: %S \n" (get 'z 't))) - (mapc 'lm-print-smell-int lm-directions))) + (mapc 'landmark-print-smell-int landmark-directions))) -(defun lm-print-w0-int (direction) +(defun landmark-print-w0-int (direction) (insert (format "%S: w0: %S \n" (symbol-name direction) (get direction 'w0)))) -(defun lm-print-w0 () +(defun landmark-print-w0 () (interactive) - (with-current-buffer "*lm-w0*" + (with-current-buffer "*landmark-w0*" (insert "==============================\n") - (mapc 'lm-print-w0-int lm-directions))) + (mapc 'landmark-print-w0-int landmark-directions))) -(defun lm-blackbox () - (with-current-buffer "*lm-blackbox*" +(defun landmark-blackbox () + (with-current-buffer "*landmark-blackbox*" (insert "==============================\n") (insert "I smell: ") (mapc (lambda (direction) (if (> (get direction 'smell) 0) (insert (format "%S " direction)))) - lm-directions) + landmark-directions) (insert "\n") (insert "I move: ") (mapc (lambda (direction) (if (> (get direction 'y_t) 0) (insert (format "%S " direction)))) - lm-directions) + landmark-directions) (insert "\n") - (lm-print-wts-blackbox) + (landmark-print-wts-blackbox) (insert (format "z_t-z_t-1: %S" (- (get 'z 't) (get 'z 't-1)))) - (lm-print-distance) + (landmark-print-distance) (insert "\n"))) -(defun lm-print-wts-blackbox () +(defun landmark-print-wts-blackbox () (interactive) - (mapc 'lm-print-wts-int lm-directions)) + (mapc 'landmark-print-wts-int landmark-directions)) ;;;_ - learning parameters -(defcustom lm-bound 0.005 +(defcustom landmark-bound 0.005 "The maximum that w0j may be." :type 'number - :group 'lm) -(defcustom lm-c 1.0 + :group 'landmark) +(defcustom landmark-c 1.0 "A factor applied to modulate the increase in wij. -Used in the function lm-update-normal-weights." +Used in the function landmark-update-normal-weights." :type 'number - :group 'lm) -(defcustom lm-c-naught 0.5 + :group 'landmark) +(defcustom landmark-c-naught 0.5 "A factor applied to modulate the increase in w0j. -Used in the function lm-update-naught-weights." +Used in the function landmark-update-naught-weights." :type 'number - :group 'lm) -(defvar lm-initial-w0 0.0) -(defvar lm-initial-wij 0.0) -(defcustom lm-no-payoff 0 + :group 'landmark) +(defvar landmark-initial-w0 0.0) +(defvar landmark-initial-wij 0.0) +(defcustom landmark-no-payoff 0 "The amount of simulation cycles that have occurred with no movement. Used to move the robot when he is stuck in a rut for some reason." :type 'integer - :group 'lm) -(defcustom lm-max-stall-time 2 + :group 'landmark) +(defcustom landmark-max-stall-time 2 "The maximum number of cycles that the robot can remain stuck in a place. -After this limit is reached, lm-random-move is called to push him out of it." +After this limit is reached, landmark-random-move is called to push him out of it." :type 'integer - :group 'lm) + :group 'landmark) ;;;_ + Randomizing functions -;;;_ - lm-flip-a-coin () -(defun lm-flip-a-coin () +;;;_ - landmark-flip-a-coin () +(defun landmark-flip-a-coin () (if (> (random 5000) 2500) -1 1)) -;;;_ : lm-very-small-random-number () -;(defun lm-very-small-random-number () +;;;_ : landmark-very-small-random-number () +;(defun landmark-very-small-random-number () ; (/ ; (* (/ (random 900000) 900000.0) .0001))) -;;;_ : lm-randomize-weights-for (direction) -(defun lm-randomize-weights-for (direction) +;;;_ : landmark-randomize-weights-for (direction) +(defun landmark-randomize-weights-for (direction) (mapc (lambda (target-direction) (put direction target-direction - (* (lm-flip-a-coin) (/ (random 10000) 10000.0)))) - lm-directions)) -;;;_ : lm-noise () -(defun lm-noise () - (* (- (/ (random 30001) 15000.0) 1) lm-nvar)) - -;;;_ : lm-fix-weights-for (direction) -(defun lm-fix-weights-for (direction) + (* (landmark-flip-a-coin) (/ (random 10000) 10000.0)))) + landmark-directions)) +;;;_ : landmark-noise () +(defun landmark-noise () + (* (- (/ (random 30001) 15000.0) 1) landmark-nvar)) + +;;;_ : landmark-fix-weights-for (direction) +(defun landmark-fix-weights-for (direction) (mapc (lambda (target-direction) (put direction target-direction - lm-initial-wij)) - lm-directions)) + landmark-initial-wij)) + landmark-directions)) ;;;_ + Plotting functions -;;;_ - lm-plot-internal (sym) -(defun lm-plot-internal (sym) - (lm-plot-square (lm-xy-to-index +;;;_ - landmark-plot-internal (sym) +(defun landmark-plot-internal (sym) + (landmark-plot-square (landmark-xy-to-index (get sym 'x) (get sym 'y)) (get sym 'sym))) -;;;_ - lm-plot-landmarks () -(defun lm-plot-landmarks () - (setq lm-cx (/ lm-board-width 2)) - (setq lm-cy (/ lm-board-height 2)) +;;;_ - landmark-plot-landmarks () +(defun landmark-plot-landmarks () + (setq landmark-cx (/ landmark-board-width 2)) + (setq landmark-cy (/ landmark-board-height 2)) - (put 'lm-n 'x lm-cx) - (put 'lm-n 'y 1) - (put 'lm-n 'sym 2) + (put 'landmark-n 'x landmark-cx) + (put 'landmark-n 'y 1) + (put 'landmark-n 'sym 2) - (put 'lm-tree 'x lm-cx) - (put 'lm-tree 'y lm-cy) - (put 'lm-tree 'sym 6) + (put 'landmark-tree 'x landmark-cx) + (put 'landmark-tree 'y landmark-cy) + (put 'landmark-tree 'sym 6) - (put 'lm-s 'x lm-cx) - (put 'lm-s 'y lm-board-height) - (put 'lm-s 'sym 3) + (put 'landmark-s 'x landmark-cx) + (put 'landmark-s 'y landmark-board-height) + (put 'landmark-s 'sym 3) - (put 'lm-w 'x 1) - (put 'lm-w 'y (/ lm-board-height 2)) - (put 'lm-w 'sym 5) + (put 'landmark-w 'x 1) + (put 'landmark-w 'y (/ landmark-board-height 2)) + (put 'landmark-w 'sym 5) - (put 'lm-e 'x lm-board-width) - (put 'lm-e 'y (/ lm-board-height 2)) - (put 'lm-e 'sym 4) + (put 'landmark-e 'x landmark-board-width) + (put 'landmark-e 'y (/ landmark-board-height 2)) + (put 'landmark-e 'sym 4) - (mapc 'lm-plot-internal '(lm-n lm-s lm-e lm-w lm-tree))) + (mapc 'landmark-plot-internal '(landmark-n landmark-s landmark-e landmark-w landmark-tree))) @@ -1357,9 +1356,9 @@ After this limit is reached, lm-random-move is called to push him out of it." (defun calc-distance-of-robot-from (direction) (put direction 'distance (distance (get direction 'x) - (lm-index-to-x (lm-point-square)) + (landmark-index-to-x (landmark-point-square)) (get direction 'y) - (lm-index-to-y (lm-point-square))))) + (landmark-index-to-y (landmark-point-square))))) ;;;_ - calc-smell-internal (sym) (defun calc-smell-internal (sym) @@ -1371,269 +1370,259 @@ After this limit is reached, lm-random-move is called to push him out of it." ;;;_ + Learning (neural) functions -(defun lm-f (x) +(defun landmark-f (x) (cond - ((> x lm-bound) lm-bound) + ((> x landmark-bound) landmark-bound) ((< x 0.0) 0.0) (t x))) -(defun lm-y (direction) - (let ((noise (put direction 'noise (lm-noise)))) +(defun landmark-y (direction) + (let ((noise (put direction 'noise (landmark-noise)))) (put direction 'y_t (if (> (get direction 's) 0.0) 1.0 0.0)))) -(defun lm-update-normal-weights (direction) +(defun landmark-update-normal-weights (direction) (mapc (lambda (target-direction) (put direction target-direction (+ (get direction target-direction) - (* lm-c + (* landmark-c (- (get 'z 't) (get 'z 't-1)) (get target-direction 'y_t) (get direction 'smell))))) - lm-directions)) + landmark-directions)) -(defun lm-update-naught-weights (direction) +(defun landmark-update-naught-weights (direction) (mapc (lambda (target-direction) (put direction 'w0 - (lm-f + (landmark-f (+ (get direction 'w0) - (* lm-c-naught + (* landmark-c-naught (- (get 'z 't) (get 'z 't-1)) (get direction 'y_t)))))) - lm-directions)) + landmark-directions)) ;;;_ + Statistics gathering and creating functions -(defun lm-calc-current-smells () +(defun landmark-calc-current-smells () (mapc (lambda (direction) (put direction 'smell (calc-smell-internal direction))) - lm-directions)) + landmark-directions)) -(defun lm-calc-payoff () +(defun landmark-calc-payoff () (put 'z 't-1 (get 'z 't)) - (put 'z 't (calc-smell-internal 'lm-tree)) + (put 'z 't (calc-smell-internal 'landmark-tree)) (if (= (- (get 'z 't) (get 'z 't-1)) 0.0) - (incf lm-no-payoff) - (setf lm-no-payoff 0))) + (incf landmark-no-payoff) + (setf landmark-no-payoff 0))) -(defun lm-store-old-y_t () +(defun landmark-store-old-y_t () (mapc (lambda (direction) (put direction 'y_t-1 (get direction 'y_t))) - lm-directions)) + landmark-directions)) ;;;_ + Functions to move robot -(defun lm-confidence-for (target-direction) +(defun landmark-confidence-for (target-direction) (apply '+ (get target-direction 'w0) (mapcar (lambda (direction) (* (get direction target-direction) (get direction 'smell))) - lm-directions))) + landmark-directions))) -(defun lm-calc-confidences () +(defun landmark-calc-confidences () (mapc (lambda (direction) - (put direction 's (lm-confidence-for direction))) - lm-directions)) + (put direction 's (landmark-confidence-for direction))) + landmark-directions)) -(defun lm-move () - (if (and (= (get 'lm-n 'y_t) 1.0) (= (get 'lm-s 'y_t) 1.0)) +(defun landmark-move () + (if (and (= (get 'landmark-n 'y_t) 1.0) (= (get 'landmark-s 'y_t) 1.0)) (progn - (mapc (lambda (dir) (put dir 'y_t 0)) lm-ns) - (if lm-debug + (mapc (lambda (dir) (put dir 'y_t 0)) landmark-ns) + (if landmark-debug (message "n-s normalization.")))) - (if (and (= (get 'lm-w 'y_t) 1.0) (= (get 'lm-e 'y_t) 1.0)) + (if (and (= (get 'landmark-w 'y_t) 1.0) (= (get 'landmark-e 'y_t) 1.0)) (progn - (mapc (lambda (dir) (put dir 'y_t 0)) lm-ew) - (if lm-debug + (mapc (lambda (dir) (put dir 'y_t 0)) landmark-ew) + (if landmark-debug (message "e-w normalization")))) (mapc (lambda (pair) (if (> (get (car pair) 'y_t) 0) (funcall (car (cdr pair))))) '( - (lm-n lm-move-up) - (lm-s lm-move-down) - (lm-e forward-char) - (lm-w backward-char))) - (lm-plot-square (lm-point-square) 1) - (incf lm-number-of-moves) - (if lm-output-moves - (message "Moves made: %d" lm-number-of-moves))) + (landmark-n landmark-move-up) + (landmark-s landmark-move-down) + (landmark-e forward-char) + (landmark-w backward-char))) + (landmark-plot-square (landmark-point-square) 1) + (incf landmark-number-of-moves) + (if landmark-output-moves + (message "Moves made: %d" landmark-number-of-moves))) -(defun lm-random-move () +(defun landmark-random-move () (mapc (lambda (direction) (put direction 'y_t 0)) - lm-directions) - (dolist (direction (nth (random 8) lm-8-directions)) + landmark-directions) + (dolist (direction (nth (random 8) landmark-8-directions)) (put direction 'y_t 1.0)) - (lm-move)) + (landmark-move)) -(defun lm-amble-robot () +(defun landmark-amble-robot () (interactive) - (while (> (calc-distance-of-robot-from 'lm-tree) 0) + (while (> (calc-distance-of-robot-from 'landmark-tree) 0) - (lm-store-old-y_t) - (lm-calc-current-smells) + (landmark-store-old-y_t) + (landmark-calc-current-smells) - (if (> lm-no-payoff lm-max-stall-time) - (lm-random-move) + (if (> landmark-no-payoff landmark-max-stall-time) + (landmark-random-move) (progn - (lm-calc-confidences) - (mapc 'lm-y lm-directions) - (lm-move))) + (landmark-calc-confidences) + (mapc 'landmark-y landmark-directions) + (landmark-move))) - (lm-calc-payoff) + (landmark-calc-payoff) - (mapc 'lm-update-normal-weights lm-directions) - (mapc 'lm-update-naught-weights lm-directions) - (if lm-debug - (lm-weights-debug))) - (lm-terminate-game nil)) + (mapc 'landmark-update-normal-weights landmark-directions) + (mapc 'landmark-update-naught-weights landmark-directions) + (if landmark-debug + (landmark-weights-debug))) + (landmark-terminate-game nil)) -;;;_ - lm-start-robot () -(defun lm-start-robot () - "Signal to the Lm program that you have played. +;;;_ - landmark-start-robot () +(defun landmark-start-robot () + "Signal to the Landmark program that you have played. You must have put the cursor on the square where you want to play. If the game is finished, this command requests for another game." (interactive) - (lm-switch-to-window) + (landmark-switch-to-window) (cond - (lm-emacs-is-computing - (lm-crash-game)) - ((not lm-game-in-progress) - (lm-prompt-for-other-game)) + (landmark-emacs-is-computing + (landmark-crash-game)) + ((not landmark-game-in-progress) + (landmark-prompt-for-other-game)) (t (let (square score) - (setq square (lm-point-square)) + (setq square (landmark-point-square)) (cond ((null square) (error "Your point is not on a square. Retry!")) - ((not (zerop (aref lm-board square))) + ((not (zerop (aref landmark-board square))) (error "Your point is not on a free square. Retry!")) (t (progn - (lm-plot-square square 1) + (landmark-plot-square square 1) - (lm-store-old-y_t) - (lm-calc-current-smells) - (put 'z 't (calc-smell-internal 'lm-tree)) + (landmark-store-old-y_t) + (landmark-calc-current-smells) + (put 'z 't (calc-smell-internal 'landmark-tree)) - (lm-random-move) + (landmark-random-move) - (lm-calc-payoff) + (landmark-calc-payoff) - (mapc 'lm-update-normal-weights lm-directions) - (mapc 'lm-update-naught-weights lm-directions) - (lm-amble-robot) + (mapc 'landmark-update-normal-weights landmark-directions) + (mapc 'landmark-update-naught-weights landmark-directions) + (landmark-amble-robot) ))))))) ;;;_ + Misc functions -;;;_ - lm-init (auto-start save-weights) -(defvar lm-tree-r "") +;;;_ - landmark-init (auto-start save-weights) +(defvar landmark-tree-r "") -(defun lm-init (auto-start save-weights) +(defun landmark-init (auto-start save-weights) - (setq lm-number-of-moves 0) + (setq landmark-number-of-moves 0) - (lm-plot-landmarks) + (landmark-plot-landmarks) - (if lm-debug + (if landmark-debug (save-current-buffer - (set-buffer (get-buffer-create "*lm-w0*")) + (set-buffer (get-buffer-create "*landmark-w0*")) (erase-buffer) - (set-buffer (get-buffer-create "*lm-moves*")) - (set-buffer (get-buffer-create "*lm-wts*")) + (set-buffer (get-buffer-create "*landmark-moves*")) + (set-buffer (get-buffer-create "*landmark-wts*")) (erase-buffer) - (set-buffer (get-buffer-create "*lm-y,s,noise*")) + (set-buffer (get-buffer-create "*landmark-y,s,noise*")) (erase-buffer) - (set-buffer (get-buffer-create "*lm-smell*")) + (set-buffer (get-buffer-create "*landmark-smell*")) (erase-buffer) - (set-buffer (get-buffer-create "*lm-blackbox*")) + (set-buffer (get-buffer-create "*landmark-blackbox*")) (erase-buffer) - (set-buffer (get-buffer-create "*lm-distance*")) + (set-buffer (get-buffer-create "*landmark-distance*")) (erase-buffer))) - (lm-set-landmark-signal-strengths) + (landmark-set-landmark-signal-strengths) - (dolist (direction lm-directions) + (dolist (direction landmark-directions) (put direction 'y_t 0.0)) (if (not save-weights) (progn - (mapc 'lm-fix-weights-for lm-directions) - (dolist (direction lm-directions) - (put direction 'w0 lm-initial-w0))) + (mapc 'landmark-fix-weights-for landmark-directions) + (dolist (direction landmark-directions) + (put direction 'w0 landmark-initial-w0))) (message "Weights preserved for this run.")) (if auto-start (progn - (lm-goto-xy (1+ (random lm-board-width)) (1+ (random lm-board-height))) - (lm-start-robot)))) + (landmark-goto-xy (1+ (random landmark-board-width)) (1+ (random landmark-board-height))) + (landmark-start-robot)))) ;;;_ - something which doesn't work ; no-a-worka!! -;(defum lm-sum-list (list) +;(defum landmark-sum-list (list) ; (if (> (length list) 0) -; (+ (car list) (lm-sum-list (cdr list))) +; (+ (car list) (landmark-sum-list (cdr list))) ; 0)) ; this a worka! ; (eval (cons '+ list)) -;;;_ - lm-set-landmark-signal-strengths () +;;;_ - landmark-set-landmark-signal-strengths () ;;; on a screen higher than wide, I noticed that the robot would amble -;;; left and right and not move forward. examining *lm-blackbox* +;;; left and right and not move forward. examining *landmark-blackbox* ;;; revealed that there was no scent from the north and south ;;; landmarks, hence, they need less factoring down of the effect of ;;; distance on scent. -(defun lm-set-landmark-signal-strengths () - - (setq lm-tree-r (* (sqrt (+ (square lm-cx) (square lm-cy))) 1.5)) - +(defun landmark-set-landmark-signal-strengths () + (setq landmark-tree-r (* (sqrt (+ (square landmark-cx) (square landmark-cy))) 1.5)) (mapc (lambda (direction) - (put direction 'r (* lm-cx 1.1))) - lm-ew) + (put direction 'r (* landmark-cx 1.1))) + landmark-ew) (mapc (lambda (direction) - (put direction 'r (* lm-cy 1.1))) - lm-ns) - (put 'lm-tree 'r lm-tree-r)) + (put direction 'r (* landmark-cy 1.1))) + landmark-ns) + (put 'landmark-tree 'r landmark-tree-r)) -;;;_ + lm-test-run () +;;;_ + landmark-test-run () ;;;###autoload -(defalias 'landmark-repeat 'lm-test-run) +(defalias 'landmark-repeat 'landmark-test-run) ;;;###autoload -(defun lm-test-run () - "Run 100 Lm games, each time saving the weights from the previous game." +(defun landmark-test-run () + "Run 100 Landmark games, each time saving the weights from the previous game." (interactive) - - (lm 1) - + (landmark 1) (dotimes (scratch-var 100) + (landmark 2))) - (lm 2))) - - -;;;_ + lm: The function you invoke to play - -;;;###autoload -(defalias 'landmark 'lm) ;;;###autoload -(defun lm (parg) - "Start or resume an Lm game. +(defun landmark (parg) + "Start or resume an Landmark game. If a game is in progress, this command allows you to resume it. Here is the relation between prefix args and game options: @@ -1644,37 +1633,37 @@ none / 1 | yes | no 3 | no | yes 4 | no | no -You start by moving to a square and typing \\[lm-start-robot], +You start by moving to a square and typing \\[landmark-start-robot], if you did not use a prefix arg to ask for automatic start. Use \\[describe-mode] for more info." (interactive "p") - (setf lm-n nil lm-m nil) - (lm-switch-to-window) + (setf landmark-n nil landmark-m nil) + (landmark-switch-to-window) (cond - (lm-emacs-is-computing - (lm-crash-game)) - ((or (not lm-game-in-progress) - (<= lm-number-of-moves 2)) - (let ((max-width (lm-max-width)) - (max-height (lm-max-height))) - (or lm-n (setq lm-n max-width)) - (or lm-m (setq lm-m max-height)) - (cond ((< lm-n 1) + (landmark-emacs-is-computing + (landmark-crash-game)) + ((or (not landmark-game-in-progress) + (<= landmark-number-of-moves 2)) + (let ((max-width (landmark-max-width)) + (max-height (landmark-max-height))) + (or landmark-n (setq landmark-n max-width)) + (or landmark-m (setq landmark-m max-height)) + (cond ((< landmark-n 1) (error "I need at least 1 column")) - ((< lm-m 1) + ((< landmark-m 1) (error "I need at least 1 row")) - ((> lm-n max-width) - (error "I cannot display %d columns in that window" lm-n))) - (if (and (> lm-m max-height) - (not (eq lm-m lm-saved-board-height)) + ((> landmark-n max-width) + (error "I cannot display %d columns in that window" landmark-n))) + (if (and (> landmark-m max-height) + (not (eq landmark-m landmark-saved-board-height)) ;; Use EQ because SAVED-BOARD-HEIGHT may be nil - (not (y-or-n-p (format "Do you really want %d rows? " lm-m)))) - (setq lm-m max-height))) - (if lm-one-moment-please + (not (y-or-n-p (format "Do you really want %d rows? " landmark-m)))) + (setq landmark-m max-height))) + (if landmark-one-moment-please (message "One moment, please...")) - (lm-start-game lm-n lm-m) - (eval (cons 'lm-init + (landmark-start-game landmark-n landmark-m) + (eval (cons 'landmark-init (cond ((= parg 1) '(t nil)) ((= parg 2) '(t t)) diff --git a/lisp/play/life.el b/lisp/play/life.el index 996b0c6144b..7cdc4136194 100644 --- a/lisp/play/life.el +++ b/lisp/play/life.el @@ -1,7 +1,6 @@ ;;; life.el --- John Horton Conway's `Life' game for GNU Emacs -;; Copyright (C) 1988, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1988, 2001-2011 Free Software Foundation, Inc. ;; Author: Kyle Jones <kyleuunet.uu.net> ;; Maintainer: FSF diff --git a/lisp/play/meese.el b/lisp/play/meese.el index 115befa6c35..d811dacb9bc 100644 --- a/lisp/play/meese.el +++ b/lisp/play/meese.el @@ -34,5 +34,4 @@ (add-hook 'find-file-hook 'protect-innocence-hook) (provide 'meese) -;; arch-tag: 47af12d2-6a7d-4e2e-a1ea-eae75a77e3f0 ;;; meese.el ends here diff --git a/lisp/play/morse.el b/lisp/play/morse.el index c5ea7b05527..d4a0224ede5 100644 --- a/lisp/play/morse.el +++ b/lisp/play/morse.el @@ -1,7 +1,6 @@ ;;; morse.el --- convert text to morse code and back -*- coding: utf-8 -*- -;; Copyright (C) 1995, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995, 2001-2011 Free Software Foundation, Inc. ;; Author: Rick Farnbach <rick_farnbach@MENTORG.COM> ;; Keywords: games @@ -139,5 +138,4 @@ (provide 'morse) -;; arch-tag: 3331e6c1-9a9e-453f-abfd-163a9c3f93a6 ;;; morse.el ends here diff --git a/lisp/play/mpuz.el b/lisp/play/mpuz.el index c5b74a8499f..269da0a061c 100644 --- a/lisp/play/mpuz.el +++ b/lisp/play/mpuz.el @@ -1,7 +1,6 @@ ;;; mpuz.el --- multiplication puzzle for GNU Emacs -;; Copyright (C) 1990, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990, 2001-2011 Free Software Foundation, Inc. ;; Author: Philippe Schnoebelen <phs@lsv.ens-cachan.fr> ;; Overhauled: Daniel Pfeiffer <occitan@esperanto.org> @@ -519,5 +518,4 @@ You may abort a game by typing \\<mpuz-mode-map>\\[mpuz-offer-abort]." (provide 'mpuz) -;; arch-tag: 2781d6ba-89e7-43b5-85c7-5d3a2e73feb1 ;;; mpuz.el ends here diff --git a/lisp/play/pong.el b/lisp/play/pong.el index 523b8371a07..a2912831707 100644 --- a/lisp/play/pong.el +++ b/lisp/play/pong.el @@ -1,7 +1,6 @@ ;;; pong.el --- classical implementation of pong -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Benjamin Drieu <bdrieu@april.org> ;; Keywords: games @@ -458,5 +457,4 @@ pong-mode keybindings:\\<pong-mode-map> (provide 'pong) -;; arch-tag: 1fdf0fc5-13e2-4de4-aae4-09bdd5af99f3 ;;; pong.el ends here diff --git a/lisp/play/snake.el b/lisp/play/snake.el index 3ce8ff6ee9d..3714e6be4d2 100644 --- a/lisp/play/snake.el +++ b/lisp/play/snake.el @@ -1,7 +1,6 @@ ;;; snake.el --- implementation of Snake for Emacs -;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997, 2001-2011 Free Software Foundation, Inc. ;; Author: Glynn Clements <glynn@sensei.co.uk> ;; Created: 1997-09-10 @@ -412,5 +411,4 @@ Snake mode keybindings: (provide 'snake) -;; arch-tag: 512ffc92-cfac-4287-9a4e-92890701a5c8 ;;; snake.el ends here diff --git a/lisp/play/solitaire.el b/lisp/play/solitaire.el index 63b2a93a3ce..d58a81b5ae7 100644 --- a/lisp/play/solitaire.el +++ b/lisp/play/solitaire.el @@ -1,7 +1,6 @@ ;;; solitaire.el --- game of solitaire in Emacs Lisp -;; Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994, 2001-2011 Free Software Foundation, Inc. ;; Author: Jan Schormann <Jan.Schormann@rechen-gilde.de> ;; Created: Fri afternoon, Jun 3, 1994 @@ -447,5 +446,4 @@ Seen in info on text lines." (provide 'solitaire) -;; arch-tag: 1b18ee1c-1e79-4a5b-8658-9560b82e63dd ;;; solitaire.el ends here diff --git a/lisp/play/spook.el b/lisp/play/spook.el index 77062d37a7c..6cab994a9cc 100644 --- a/lisp/play/spook.el +++ b/lisp/play/spook.el @@ -1,7 +1,6 @@ ;;; spook.el --- spook phrase utility for overloading the NSA line eater -;; Copyright (C) 1988, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1988, 1993, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: games @@ -76,5 +75,4 @@ (provide 'spook) -;; arch-tag: c682b61f-92b6-4492-9c0d-2367e562449c ;;; spook.el ends here diff --git a/lisp/play/studly.el b/lisp/play/studly.el index b9bd173d5f1..d28304df1e5 100644 --- a/lisp/play/studly.el +++ b/lisp/play/studly.el @@ -68,5 +68,4 @@ (provide 'studly) -;; arch-tag: 0dbf5a60-d2e6-48c2-86ae-77fc8575ac67 ;;; studly.el ends here diff --git a/lisp/play/tetris.el b/lisp/play/tetris.el index 68d1590e571..2935ff04c96 100644 --- a/lisp/play/tetris.el +++ b/lisp/play/tetris.el @@ -1,7 +1,6 @@ ;;; tetris.el --- implementation of Tetris for Emacs -;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997, 2001-2011 Free Software Foundation, Inc. ;; Author: Glynn Clements <glynn@sensei.co.uk> ;; Version: 2.01 @@ -641,5 +640,4 @@ tetris-mode keybindings: (provide 'tetris) -;; arch-tag: fb780d53-3ff0-49f0-8e19-f7f13cf2d49e ;;; tetris.el ends here diff --git a/lisp/play/yow.el b/lisp/play/yow.el index 72fd01353b3..d75e04eb74f 100644 --- a/lisp/play/yow.el +++ b/lisp/play/yow.el @@ -1,7 +1,6 @@ ;;; yow.el --- quote random zippyisms -;; Copyright (C) 1993, 1994, 1995, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993-1995, 2000-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Author: Richard Mlynarik @@ -128,5 +127,4 @@ If called interactively, display a list of matches." (provide 'yow) -;; arch-tag: d13db89b-84f1-4141-a5ce-261d1733a65c ;;; yow.el ends here diff --git a/lisp/play/zone.el b/lisp/play/zone.el index 4fa5a8c3920..75c3b6fbc7d 100644 --- a/lisp/play/zone.el +++ b/lisp/play/zone.el @@ -1,7 +1,6 @@ ;;; zone.el --- idle display hacks -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; Author: Victor Zandy <zandy@cs.wisc.edu> ;; Maintainer: Thien-Thi Nguyen <ttn@gnu.org> @@ -684,5 +683,4 @@ If nil, `zone-pgm-random-life' chooses a value from 0-3 (inclusive).") ;;;;;;;;;;;;;;; (provide 'zone) -;; arch-tag: 7092503d-74a9-4325-a55c-a026ede58cea ;;; zone.el ends here diff --git a/lisp/printing.el b/lisp/printing.el index ecbc82e0144..99ed8c04262 100644 --- a/lisp/printing.el +++ b/lisp/printing.el @@ -1,7 +1,6 @@ ;;; printing.el --- printing utilities -;; Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009, -;; 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2001, 2003-2011 Free Software Foundation, Inc. ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> diff --git a/lisp/proced.el b/lisp/proced.el index ee4e7b26ca1..ce3ad08598c 100644 --- a/lisp/proced.el +++ b/lisp/proced.el @@ -1,6 +1,6 @@ ;;; proced.el --- operate on system processes like dired -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Roland Winkler <winkler@gnu.org> ;; Keywords: Processes, Unix @@ -1880,5 +1880,4 @@ Killed processes cannot be recovered by Emacs.")) (provide 'proced) -;; arch-tag: a6e312ad-9032-45aa-972d-31a8cfc545af ;;; proced.el ends here diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el index b45c4b1eb7e..beb737ba613 100644 --- a/lisp/progmodes/ada-mode.el +++ b/lisp/progmodes/ada-mode.el @@ -1,8 +1,6 @@ ;;; ada-mode.el --- major-mode for editing Ada sources -;; Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1994-1995, 1997-2011 Free Software Foundation, Inc. ;; Author: Rolf Ebert <ebert@inf.enst.fr> ;; Markus Heritsch <Markus.Heritsch@studbox.uni-stuttgart.de> diff --git a/lisp/progmodes/ada-prj.el b/lisp/progmodes/ada-prj.el index 3d10e482be1..d7397144498 100644 --- a/lisp/progmodes/ada-prj.el +++ b/lisp/progmodes/ada-prj.el @@ -1,7 +1,6 @@ ;;; ada-prj.el --- GUI editing of project files for the ada-mode -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Emmanuel Briot <briot@gnat.com> ;; Maintainer: Stephen Leake <stephen_leake@stephe-leake.org> diff --git a/lisp/progmodes/ada-stmt.el b/lisp/progmodes/ada-stmt.el index b618b26c73a..e48055c9f50 100644 --- a/lisp/progmodes/ada-stmt.el +++ b/lisp/progmodes/ada-stmt.el @@ -1,8 +1,6 @@ ;;; ada-stmt.el --- an extension to Ada mode for inserting statement templates -;; Copyright (C) 1987, 1993, 1994, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1987, 1993-1994, 1996-2011 Free Software Foundation, Inc. ;; Authors: Daniel Pfeiffer ;; Markus Heritsch @@ -484,5 +482,4 @@ Invoke right after `ada-function-spec' or `ada-procedure-spec'." (provide 'ada-stmt) -;; arch-tag: 94f51555-cc0e-44e5-8865-8788aae8ecd3 ;;; ada-stmt.el ends here diff --git a/lisp/progmodes/ada-xref.el b/lisp/progmodes/ada-xref.el index 36e297182cf..85659cafd95 100644 --- a/lisp/progmodes/ada-xref.el +++ b/lisp/progmodes/ada-xref.el @@ -1,8 +1,6 @@ ;; ada-xref.el --- for lookup and completion in Ada mode -;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1994-2011 Free Software Foundation, Inc. ;; Author: Markus Heritsch <Markus.Heritsch@studbox.uni-stuttgart.de> ;; Rolf Ebert <ebert@inf.enst.fr> diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el index 3e3e315c500..c5207139014 100644 --- a/lisp/progmodes/antlr-mode.el +++ b/lisp/progmodes/antlr-mode.el @@ -1,7 +1,6 @@ ;;; antlr-mode.el --- major mode for ANTLR grammar files -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Christoph.Wedler@sap.com ;; Keywords: languages, ANTLR, code generator @@ -2182,36 +2181,32 @@ grammar file in which CLASS is defined and EVOCAB is the name of the export vocabulary specified in that file." (let ((grammar (directory-files dirname t "\\.g\\'"))) (when grammar - (let ((temp-buffer (get-buffer-create - (generate-new-buffer-name " *temp*"))) - (antlr-imenu-name nil) ; dynamic-let: no imenu - (expanded-regexp (concat (format (regexp-quote - (cadr antlr-special-file-formats)) - ".+") - "\\'")) + (let ((antlr-imenu-name nil) ; dynamic-let: no imenu + (expanded-regexp + (concat (format (regexp-quote + (cadr antlr-special-file-formats)) + ".+") + "\\'")) classes dependencies) - (unwind-protect - (with-current-buffer temp-buffer - (widen) ; just in case... - (dolist (file grammar) - (when (and (file-regular-p file) - (null (string-match expanded-regexp file))) - (insert-file-contents file t nil nil t) - (normal-mode t) ; necessary for major-mode, syntax + (with-temp-buffer + (dolist (file grammar) + (when (and (file-regular-p file) + (null (string-match expanded-regexp file))) + (insert-file-contents file t nil nil t) + (normal-mode t) ; necessary for major-mode, syntax ; table and `antlr-language' - (when (derived-mode-p 'antlr-mode) - (let* ((file-deps (antlr-file-dependencies)) - (file (car file-deps))) - (when file-deps - (dolist (class-def (caadr file-deps)) - (let ((file-evocab (cons file (cdr class-def))) - (class-spec (assoc (car class-def) classes))) - (if class-spec - (nconc (cdr class-spec) (list file-evocab)) - (push (list (car class-def) file-evocab) - classes)))) - (push file-deps dependencies))))))) - (kill-buffer temp-buffer)) + (when (derived-mode-p 'antlr-mode) + (let* ((file-deps (antlr-file-dependencies)) + (file (car file-deps))) + (when file-deps + (dolist (class-def (caadr file-deps)) + (let ((file-evocab (cons file (cdr class-def))) + (class-spec (assoc (car class-def) classes))) + (if class-spec + (nconc (cdr class-spec) (list file-evocab)) + (push (list (car class-def) file-evocab) + classes)))) + (push file-deps dependencies))))))) (cons (nreverse classes) (nreverse dependencies)))))) @@ -2667,5 +2662,4 @@ Used in `antlr-mode'. Also a useful function in `java-mode-hook'." ;;; Local IspellPersDict: .ispell_antlr -;; arch-tag: 5de2be79-3d13-4560-8fbc-f7d0234dcb5c ;;; antlr-mode.el ends here diff --git a/lisp/progmodes/asm-mode.el b/lisp/progmodes/asm-mode.el index 12179e8f9b8..9d79d22d42e 100644 --- a/lisp/progmodes/asm-mode.el +++ b/lisp/progmodes/asm-mode.el @@ -1,7 +1,6 @@ ;;; asm-mode.el --- mode for editing assembler code -;; Copyright (C) 1991, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1991, 2001-2011 Free Software Foundation, Inc. ;; Author: Eric S. Raymond <esr@snark.thyrsus.com> ;; Maintainer: FSF @@ -243,5 +242,4 @@ repeatedly until you are satisfied with the kind of comment." (provide 'asm-mode) -;; arch-tag: 210e695f-f338-4376-8913-a4c5c72ac848 ;;; asm-mode.el ends here diff --git a/lisp/progmodes/autoconf.el b/lisp/progmodes/autoconf.el index 827949cc70e..3aa9a6cfb87 100644 --- a/lisp/progmodes/autoconf.el +++ b/lisp/progmodes/autoconf.el @@ -1,7 +1,6 @@ ;;; autoconf.el --- mode for editing Autoconf configure.in files -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; Author: Dave Love <fx@gnu.org> ;; Keywords: languages @@ -99,5 +98,4 @@ searching backwards at another AC_... command." (provide 'autoconf-mode) (provide 'autoconf) -;; arch-tag: 4f44778f-2ab3-49a1-a103-f0acb9df2de4 ;;; autoconf.el ends here diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el index 4897581252f..4d78047268f 100644 --- a/lisp/progmodes/bug-reference.el +++ b/lisp/progmodes/bug-reference.el @@ -1,6 +1,6 @@ ;; bug-reference.el --- buttonize bug references -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Tom Tromey <tromey@redhat.com> ;; Created: 21 Mar 2007 @@ -151,5 +151,4 @@ so that it is considered safe, see `enable-local-variables'.") (widen) (bug-reference-unfontify (point-min) (point-max))))) -;; arch-tag: b138abce-e5c3-475e-bd58-7afba40387ea ;;; bug-reference.el ends here diff --git a/lisp/progmodes/cap-words.el b/lisp/progmodes/cap-words.el index 225c3b88036..0ce84ae33a7 100644 --- a/lisp/progmodes/cap-words.el +++ b/lisp/progmodes/cap-words.el @@ -1,7 +1,6 @@ ;;; cap-words.el --- minor mode for motion in CapitalizedWordIdentifiers -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Author: Dave Love <fx@gnu.org> ;; Keywords: languages @@ -92,5 +91,4 @@ Obsoletes `c-forward-into-nomenclature'." (provide 'cap-words) -;; arch-tag: 46513b64-fe5a-4c0b-902c-ed235c22975f ;;; cap-words.el ends here diff --git a/lisp/progmodes/cc-align.el b/lisp/progmodes/cc-align.el index 8224db79ace..81045d63abf 100644 --- a/lisp/progmodes/cc-align.el +++ b/lisp/progmodes/cc-align.el @@ -1,8 +1,6 @@ ;;; cc-align.el --- custom indentation functions for CC Mode -;; Copyright (C) 1985, 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, -;; 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1985, 1987, 1992-2011 Free Software Foundation, Inc. ;; Authors: 2004- Alan Mackenzie ;; 1998- Martin Stjernholm @@ -1333,5 +1331,4 @@ For other semicolon contexts, no determination is made." (cc-provide 'cc-align) -;; arch-tag: 4d71ed28-bf51-4509-a148-f39669669a2e ;;; cc-align.el ends here diff --git a/lisp/progmodes/cc-awk.el b/lisp/progmodes/cc-awk.el index 6c7db25612d..d19ba47aa3f 100644 --- a/lisp/progmodes/cc-awk.el +++ b/lisp/progmodes/cc-awk.el @@ -1,7 +1,6 @@ ;;; cc-awk.el --- AWK specific code within cc-mode. -;; Copyright (C) 1988, 1994, 1996, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1988, 1994, 1996, 2000-2011 Free Software Foundation, Inc. ;; Author: Alan Mackenzie <acm@muc.de> (originally based on awk-mode.el) ;; Maintainer: FSF @@ -1096,5 +1095,4 @@ comment at the start of cc-engine.el for more info." (cc-provide 'cc-awk) ; Changed from 'awk-mode, ACM 2002/5/21 -;; arch-tag: c4836289-3aa4-4a59-9934-9ccc2bacccf3 ;;; awk-mode.el ends here diff --git a/lisp/progmodes/cc-bytecomp.el b/lisp/progmodes/cc-bytecomp.el index 597267d4e5d..823430f2d38 100644 --- a/lisp/progmodes/cc-bytecomp.el +++ b/lisp/progmodes/cc-bytecomp.el @@ -1,7 +1,6 @@ ;;; cc-bytecomp.el --- compile time setup for proper compilation -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; Author: Martin Stjernholm ;; Maintainer: bug-cc-mode@gnu.org @@ -434,5 +433,4 @@ exclude any functions that have been bound during compilation with (provide 'cc-bytecomp) -;; arch-tag: 2d71b3ad-57b0-4b13-abd3-ab836e08f975 ;;; cc-bytecomp.el ends here diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 8639ebba3bc..327ebea40cc 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el @@ -1,8 +1,6 @@ ;;; cc-cmds.el --- user level commands for CC Mode -;; Copyright (C) 1985, 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, -;; 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1985, 1987, 1992-2011 Free Software Foundation, Inc. ;; Authors: 2003- Alan Mackenzie ;; 1998- Martin Stjernholm @@ -4574,5 +4572,4 @@ normally bound to C-o. See `c-context-line-break' for the details." (cc-provide 'cc-cmds) -;; arch-tag: bf0611dc-d1f4-449e-9e45-4ec7c6936677 ;;; cc-cmds.el ends here diff --git a/lisp/progmodes/cc-compat.el b/lisp/progmodes/cc-compat.el index adfac2f5f9e..01f7379b1b0 100644 --- a/lisp/progmodes/cc-compat.el +++ b/lisp/progmodes/cc-compat.el @@ -1,8 +1,6 @@ ;;; cc-compat.el --- cc-mode compatibility with c-mode.el confusion -;; Copyright (C) 1985, 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, -;; 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1985, 1987, 1992-2011 Free Software Foundation, Inc. ;; Authors: 1998- Martin Stjernholm ;; 1994-1999 Barry A. Warsaw @@ -163,5 +161,4 @@ This is in addition to c-continued-statement-offset.") (cc-provide 'cc-compat) -;; arch-tag: 564dab2f-e6ad-499c-a4a3-fedec3ecc192 ;;; cc-compat.el ends here diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el index 147a0e2dc2a..ce38cf8850b 100644 --- a/lisp/progmodes/cc-defs.el +++ b/lisp/progmodes/cc-defs.el @@ -1,8 +1,6 @@ ;;; cc-defs.el --- compile time definitions for CC Mode -;; Copyright (C) 1985, 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, -;; 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1985, 1987, 1992-2011 Free Software Foundation, Inc. ;; Authors: 2003- Alan Mackenzie ;; 1998- Martin Stjernholm @@ -2259,5 +2257,4 @@ quoted." (cc-provide 'cc-defs) -;; arch-tag: 3bb2629d-dd84-4ff0-ad39-584be0fe3cda ;;; cc-defs.el ends here diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index c9e162c91b9..406ee1a91d9 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -1,8 +1,6 @@ ;;; cc-engine.el --- core syntax guessing engine for CC mode -;; Copyright (C) 1985, 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, -;; 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, -;; 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1987, 1992-2011 Free Software Foundation, Inc. ;; Authors: 2001- Alan Mackenzie ;; 1998- Martin Stjernholm @@ -10337,5 +10335,4 @@ Cannot combine absolute offsets %S and %S in `add' method" (cc-provide 'cc-engine) -;; arch-tag: 149add18-4673-4da5-ac47-6805e4eae089 ;;; cc-engine.el ends here diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index d2e5657d34a..0d738700cc7 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el @@ -1,6 +1,6 @@ ;;; cc-fonts.el --- font lock support for CC Mode -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Authors: 2003- Alan Mackenzie ;; 2002- Martin Stjernholm @@ -2460,5 +2460,4 @@ need for `pike-font-lock-extra-types'.") ;; 2006-07-10: awk-font-lock-keywords has been moved back to cc-awk.el. (cc-provide 'cc-fonts) -;; arch-tag: 2f65f405-735f-4da5-8d4b-b957844c5203 ;;; cc-fonts.el ends here diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index ad6b6787652..86a963bcf55 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -1,8 +1,6 @@ ;;; cc-langs.el --- language specific settings for CC Mode -;; Copyright (C) 1985, 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, -;; 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1985, 1987, 1992-2011 Free Software Foundation, Inc. ;; Authors: 2002- Alan Mackenzie ;; 1998- Martin Stjernholm @@ -3137,5 +3135,4 @@ evaluated and should not be quoted." (cc-provide 'cc-langs) -;; arch-tag: 1ab57482-cfc2-4c5b-b628-3539c3098822 ;;; cc-langs.el ends here diff --git a/lisp/progmodes/cc-menus.el b/lisp/progmodes/cc-menus.el index e27335e1f58..f53a7da5186 100644 --- a/lisp/progmodes/cc-menus.el +++ b/lisp/progmodes/cc-menus.el @@ -1,8 +1,6 @@ ;;; cc-menus.el --- imenu support for CC Mode -;; Copyright (C) 1985, 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, -;; 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1985, 1987, 1992-2011 Free Software Foundation, Inc. ;; Authors: 1998- Martin Stjernholm ;; 1992-1999 Barry A. Warsaw @@ -442,5 +440,4 @@ Example: (cc-provide 'cc-menus) -;; arch-tag: f6b60933-91f0-4145-ab44-70ca6d1b919b ;;; cc-menus.el ends here diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 3196fc59023..1a2e0027ea7 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -1,8 +1,6 @@ ;;; cc-mode.el --- major mode for editing C and similar languages -;; Copyright (C) 1985, 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, -;; 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, -;; 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1987, 1992-2011 Free Software Foundation, Inc. ;; Authors: 2003- Alan Mackenzie ;; 1998- Martin Stjernholm @@ -1685,5 +1683,4 @@ Key bindings: (cc-provide 'cc-mode) -;; arch-tag: 7825e5c4-fd09-439f-a04d-4c13208ba3d7 ;;; cc-mode.el ends here diff --git a/lisp/progmodes/cc-styles.el b/lisp/progmodes/cc-styles.el index 26529411c43..e161eb6d0f5 100644 --- a/lisp/progmodes/cc-styles.el +++ b/lisp/progmodes/cc-styles.el @@ -1,8 +1,6 @@ ;;; cc-styles.el --- support for styles in CC Mode -;; Copyright (C) 1985, 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, -;; 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1985, 1987, 1992-2011 Free Software Foundation, Inc. ;; Authors: 2004- Alan Mackenzie ;; 1998- Martin Stjernholm @@ -656,5 +654,4 @@ any reason to call this function directly." (cc-provide 'cc-styles) -;; arch-tag: c764f61a-96ba-484a-a68f-101c0e9d5d2c ;;; cc-styles.el ends here diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el index e965cc21928..d2a5d117635 100644 --- a/lisp/progmodes/cc-vars.el +++ b/lisp/progmodes/cc-vars.el @@ -1,8 +1,6 @@ ;;; cc-vars.el --- user customization variables for CC Mode -;; Copyright (C) 1985, 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, -;; 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1985, 1987, 1992-2011 Free Software Foundation, Inc. ;; Authors: 2002- Alan Mackenzie ;; 1998- Martin Stjernholm @@ -1712,5 +1710,4 @@ It treats escaped EOLs as whitespace.") (cc-provide 'cc-vars) -;; arch-tag: d62e9a55-c9fe-409b-b5b6-050b6aa202c9 ;;; cc-vars.el ends here diff --git a/lisp/progmodes/cfengine.el b/lisp/progmodes/cfengine.el index 07fdbed12d6..a475bbd5932 100644 --- a/lisp/progmodes/cfengine.el +++ b/lisp/progmodes/cfengine.el @@ -1,7 +1,6 @@ ;;; cfengine.el --- mode for editing Cfengine files -;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2001-2011 Free Software Foundation, Inc. ;; Author: Dave Love <fx@gnu.org> ;; Keywords: languages @@ -250,5 +249,4 @@ to the action header." (provide 'cfengine) -;; arch-tag: 6b931be2-1505-4124-afa6-9675971e26d4 ;;; cfengine.el ends here diff --git a/lisp/progmodes/cmacexp.el b/lisp/progmodes/cmacexp.el index 61b5c22918f..322492c5566 100644 --- a/lisp/progmodes/cmacexp.el +++ b/lisp/progmodes/cmacexp.el @@ -1,7 +1,6 @@ ;;; cmacexp.el --- expand C macros in a region -;; Copyright (C) 1992, 1994, 1996, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1992, 1994, 1996, 2000-2011 Free Software Foundation, Inc. ;; Author: Francesco Potorti` <pot@gnu.org> ;; Adapted-By: ESR @@ -403,5 +402,4 @@ Optional arg DISPLAY non-nil means show messages in the echo area." ;; Cleanup. (kill-buffer outbuf)))) -;; arch-tag: 4f20253c-71ef-4e6d-a774-19087060910e ;;; cmacexp.el ends here diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index da9b213ad8f..5dde9ba9a98 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -1,7 +1,6 @@ ;;; compile.el --- run compiler as inferior of Emacs, parse error messages -;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -;; 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 1985-1987, 1993-1999, 2001-2011 ;; Free Software Foundation, Inc. ;; Authors: Roland McGrath <roland@gnu.org>, @@ -29,57 +28,12 @@ ;; This package provides the compile facilities documented in the Emacs user's ;; manual. -;; This mode uses some complex data-structures: - -;; LOC (or location) is a list of (COLUMN LINE FILE-STRUCTURE) - -;; COLUMN and LINE are numbers parsed from an error message. COLUMN and maybe -;; LINE will be nil for a message that doesn't contain them. Then the -;; location refers to a indented beginning of line or beginning of file. -;; Once any location in some file has been jumped to, the list is extended to -;; (COLUMN LINE FILE-STRUCTURE MARKER TIMESTAMP . VISITED) -;; for all LOCs pertaining to that file. -;; MARKER initially points to LINE and COLUMN in a buffer visiting that file. -;; Being a marker it sticks to some text, when the buffer grows or shrinks -;; before that point. VISITED is t if we have jumped there, else nil. -;; TIMESTAMP is necessary because of "incremental compilation": `omake -P' -;; polls filesystem for changes and recompiles when a file is modified -;; using the same *compilation* buffer. this necessitates re-parsing markers. - -;; FILE-STRUCTURE is a list of -;; ((FILENAME DIRECTORY) FORMATS (LINE LOC ...) ...) - -;; FILENAME is a string parsed from an error message. DIRECTORY is a string -;; obtained by following directory change messages. DIRECTORY will be nil for -;; an absolute filename. FORMATS is a list of formats to apply to FILENAME if -;; a file of that name can't be found. -;; The rest of the list is an alist of elements with LINE as key. The keys -;; are either nil or line numbers. If present, nil comes first, followed by -;; the numbers in decreasing order. The LOCs for each line are again an alist -;; ordered the same way. Note that the whole file structure is referenced in -;; every LOC. - -;; MESSAGE is a list of (LOC TYPE END-LOC) - -;; TYPE is 0 for info or 1 for warning if the message matcher identified it as -;; such, 2 otherwise (for a real error). END-LOC is a LOC pointing to the -;; other end, if the parsed message contained a range. If the end of the -;; range didn't specify a COLUMN, it defaults to -1, meaning end of line. -;; These are the value of the `message' text-properties in the compilation -;; buffer. - ;;; Code: (eval-when-compile (require 'cl)) (require 'tool-bar) (require 'comint) -(defvar font-lock-extra-managed-props) -(defvar font-lock-keywords) -(defvar font-lock-maximum-size) -(defvar font-lock-support-mode) - - (defgroup compilation nil "Run compiler as inferior of Emacs, parse error messages." :group 'tools @@ -123,9 +77,7 @@ in the compilation output, and should return a transformed file name.") "*Function to call to customize the compilation process. This function is called immediately before the compilation process is started. It can be used to set any variables or functions that are used -while processing the output of the compilation process. The function -is called with variables `compilation-buffer' and `compilation-window' -bound to the compilation buffer and window, respectively.") +while processing the output of the compilation process.") ;;;###autoload (defvar compilation-buffer-name-function nil @@ -239,7 +191,9 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) (gcc-include "^\\(?:In file included \\| \\|\t\\)from \ -\\(.+\\):\\([0-9]+\\)\\(?:\\(:\\)\\|\\(,\\|$\\)\\)?" 1 2 nil (3 . 4)) +\\([0-9]*[^0-9\n]\\(?:[^\n :]\\| [^-/\n]\\|:[^ \n]\\)*?\\):\ +\\([0-9]+\\)\\(?::\\([0-9]+\\)\\)?\\(?:\\(:\\)\\|\\(,\\|$\\)\\)?" + 1 2 3 (4 . 5)) (gnu ;; The first line matches the program name for @@ -268,12 +222,12 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) ;; The "in \\|from " exception was added to handle messages from Ruby. "^\\(?:[[:alpha:]][-[:alnum:].]+: ?\\|[ \t]+\\(?:in \\|from \\)\\)?\ \\([0-9]*[^0-9\n]\\(?:[^\n :]\\| [^-/\n]\\|:[^ \n]\\)*?\\): ?\ -\\([0-9]+\\)\\(?:\\([.:]\\)\\([0-9]+\\)\\)?\ +\\([0-9]+\\)\\(?:[.:]\\([0-9]+\\)\\)?\ \\(?:-\\([0-9]+\\)?\\(?:\\.\\([0-9]+\\)\\)?\\)?:\ \\(?: *\\(\\(?:Future\\|Runtime\\)?[Ww]arning\\|W:\\)\\|\ *\\([Ii]nfo\\(?:\\>\\|rmationa?l?\\)\\|I:\\|instantiated from\\|[Nn]ote\\)\\|\ \[0-9]?\\(?:[^0-9\n]\\|$\\)\\|[0-9][0-9][0-9]\\)" - 1 (2 . 5) (4 . 6) (7 . 8)) + 1 (2 . 4) (3 . 5) (6 . 7)) (lcc "^\\(?:E\\|\\(W\\)\\), \\([^(\n]+\\)(\\([0-9]+\\),[ \t]*\\([0-9]+\\)" @@ -283,11 +237,15 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) "^makepp\\(?:\\(?:: warning\\(:\\).*?\\|\\(: Scanning\\|: [LR]e?l?oading makefile\\|: Imported\\|log:.*?\\) \\|: .*?\\)\ `\\(\\(\\S +?\\)\\(?::\\([0-9]+\\)\\)?\\)['(]\\)" 4 5 nil (1 . 2) 3 - ("`\\(\\(\\S +?\\)\\(?::\\([0-9]+\\)\\)?\\)['(]" nil nil - (2 compilation-info-face) - (3 compilation-line-face nil t) - (1 (compilation-error-properties 2 3 nil nil nil 0 nil) - append))) + (0 (progn (save-match-data + (compilation-parse-errors + (match-end 0) (line-end-position) + `("`\\(\\(\\S +?\\)\\(?::\\([0-9]+\\)\\)?\\)['(]" + 2 3 nil + ,(cond ((match-end 1) 1) ((match-end 2) 0) (t 2)) + 1))) + (end-of-line) + nil))) ;; This regexp is pathologically slow on long lines (Bug#3441). ;; (maven @@ -310,7 +268,12 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) (omake ;; "omake -P" reports "file foo changed" ;; (useful if you do "cvs up" and want to see what has changed) - "omake: file \\(.*\\) changed" 1) + "omake: file \\(.*\\) changed" 1 nil nil nil nil + ;; FIXME-omake: This tries to prevent reusing pre-existing markers + ;; for subsequent messages, since those messages's line numbers + ;; are about another version of the file. + (0 (progn (compilation--flush-file-structure (match-string 1)) + nil))) (oracle "^\\(?:Semantic error\\|Error\\|PCC-[0-9]+:\\).* line \\([0-9]+\\)\ @@ -367,12 +330,10 @@ File = \\(.+\\), Line = \\([0-9]+\\)\\(?:, Column = \\([0-9]+\\)\\)?" (gcov-file "^ *-: *\\(0\\):Source:\\(.+\\)$" - 2 1 nil 0 nil - (1 compilation-line-face prepend) (2 compilation-info-face prepend)) + 2 1 nil 0 nil) (gcov-header "^ *-: *\\(0\\):\\(?:Object\\|Graph\\|Data\\|Runs\\|Programs\\):.+$" - nil 1 nil 0 nil - (1 compilation-line-face prepend)) + nil 1 nil 0 nil) ;; Underlines over all lines of gcov output are too uncomfortable to read. ;; However, hyperlinks embedded in the lines are useful. ;; So I put default face on the lines; and then put @@ -381,18 +342,18 @@ File = \\(.+\\), Line = \\([0-9]+\\)\\(?:, Column = \\([0-9]+\\)\\)?" (gcov-nomark "^ *-: *\\([1-9]\\|[0-9]\\{2,\\}\\):.*$" nil 1 nil 0 nil - (0 'default t) - (1 compilation-line-face prepend)) + (0 'default) + (1 compilation-line-face)) (gcov-called-line "^ *\\([0-9]+\\): *\\([0-9]+\\):.*$" nil 2 nil 0 nil - (0 'default t) - (1 compilation-info-face prepend) (2 compilation-line-face prepend)) + (0 'default) + (1 compilation-info-face) (2 compilation-line-face)) (gcov-never-called "^ *\\(#####\\): *\\([0-9]+\\):.*$" nil 2 nil 2 nil - (0 'default t) - (1 compilation-error-face prepend) (2 compilation-line-face prepend)) + (0 'default) + (1 compilation-error-face) (2 compilation-line-face)) (perl--Pod::Checker ;; podchecker error messages, per Pod::Checker. @@ -504,12 +465,11 @@ What matched the HYPERLINK'th subexpression has `mouse-face' and `compilation-message-face' applied. If this is nil, the text matched by the whole REGEXP becomes the hyperlink. -Additional HIGHLIGHTs as described under `font-lock-keywords' can -be added." - :type `(set :menu-tag "Pick" - ,@(mapcar (lambda (elt) - (list 'const (car elt))) - compilation-error-regexp-alist-alist)) +Additional HIGHLIGHTs take the shape (SUBMATCH FACE), where SUBMATCH is +the number of a submatch that should be highlighted when it matches, +and FACE is an expression returning the face to use for that submatch.." + :type '(repeat (choice (symbol :tag "Predefined symbol") + (sexp :tag "Error specification"))) :link `(file-link :tag "example file" ,(expand-file-name "compilation.txt" data-directory)) :group 'compilation) @@ -545,10 +505,10 @@ you may also want to change `compilation-page-delimiter'.") (1 font-lock-function-name-face) (3 compilation-line-face nil t)) (" -\\(?:o[= ]?\\|-\\(?:outfile\\|output\\)[= ]\\)\\(\\S +\\)" . 1) ("^Compilation \\(finished\\).*" - (0 '(face nil message nil help-echo nil mouse-face nil) t) + (0 '(face nil compilation-message nil help-echo nil mouse-face nil) t) (1 compilation-info-face)) ("^Compilation \\(exited abnormally\\|interrupt\\|killed\\|terminated\\|segmentation fault\\)\\(?:.*with code \\([0-9]+\\)\\)?.*" - (0 '(face nil message nil help-echo nil mouse-face nil) t) + (0 '(face nil compilation-message nil help-echo nil mouse-face nil) t) (1 compilation-error-face) (2 compilation-error-face nil t))) "Additional things to highlight in Compilation mode. @@ -739,11 +699,9 @@ Faces `compilation-error-face', `compilation-warning-face', ;; Used for compatibility with the old compile.el. -(defvaralias 'compilation-last-buffer 'next-error-last-buffer) -(defvar compilation-parsing-end (make-marker)) (defvar compilation-parse-errors-function nil) -(defvar compilation-error-list nil) -(defvar compilation-old-error-list nil) +(make-obsolete 'compilation-parse-errors-function + 'compilation-error-regexp-alist "24.1") (defcustom compilation-auto-jump-to-first-error nil "If non-nil, automatically jump to the first error during compilation." @@ -755,9 +713,9 @@ Faces `compilation-error-face', `compilation-warning-face', "If non-nil, automatically jump to the next error encountered.") (make-variable-buffer-local 'compilation-auto-jump-to-next) -(defvar compilation-buffer-modtime nil - "The buffer modification time, for buffers not associated with files.") -(make-variable-buffer-local 'compilation-buffer-modtime) +;; (defvar compilation-buffer-modtime nil +;; "The buffer modification time, for buffers not associated with files.") +;; (make-variable-buffer-local 'compilation-buffer-modtime) (defvar compilation-skip-to-next-location t "*If non-nil, skip multiple error messages for the same source location.") @@ -803,23 +761,155 @@ from a different message." (and (cdr type) (match-end (cdr type)) compilation-info-face) compilation-error-face)) +;; LOC (or location) is a list of (COLUMN LINE FILE-STRUCTURE nil nil) + +;; COLUMN and LINE are numbers parsed from an error message. COLUMN and maybe +;; LINE will be nil for a message that doesn't contain them. Then the +;; location refers to a indented beginning of line or beginning of file. +;; Once any location in some file has been jumped to, the list is extended to +;; (COLUMN LINE FILE-STRUCTURE MARKER TIMESTAMP . VISITED) +;; for all LOCs pertaining to that file. +;; MARKER initially points to LINE and COLUMN in a buffer visiting that file. +;; Being a marker it sticks to some text, when the buffer grows or shrinks +;; before that point. VISITED is t if we have jumped there, else nil. +;; FIXME-omake: TIMESTAMP was used to try and handle "incremental compilation": +;; `omake -P' polls filesystem for changes and recompiles when a file is +;; modified using the same *compilation* buffer. this necessitates +;; re-parsing markers. + +;; (defstruct (compilation--loc +;; (:constructor nil) +;; (:copier nil) +;; (:constructor compilation--make-loc +;; (file-struct line col marker)) +;; (:conc-name compilation--loc->)) +;; col line file-struct marker timestamp visited) + +;; FIXME: We don't use a defstruct because of compilation-assq which looks up +;; and creates part of the LOC (only the first cons cell containing the COL). + +(defmacro compilation--make-cdrloc (line file-struct marker) + `(list ,line ,file-struct ,marker nil)) +(defmacro compilation--loc->col (loc) `(car ,loc)) +(defmacro compilation--loc->line (loc) `(cadr ,loc)) +(defmacro compilation--loc->file-struct (loc) `(nth 2 ,loc)) +(defmacro compilation--loc->marker (loc) `(nth 3 ,loc)) +;; (defmacro compilation--loc->timestamp (loc) `(nth 4 ,loc)) +(defmacro compilation--loc->visited (loc) `(nthcdr 5 ,loc)) + +;; FILE-STRUCTURE is a list of +;; ((FILENAME DIRECTORY) FORMATS (LINE LOC ...) ...) + +;; FILENAME is a string parsed from an error message. DIRECTORY is a string +;; obtained by following directory change messages. DIRECTORY will be nil for +;; an absolute filename. FORMATS is a list of formats to apply to FILENAME if +;; a file of that name can't be found. +;; The rest of the list is an alist of elements with LINE as key. The keys +;; are either nil or line numbers. If present, nil comes first, followed by +;; the numbers in decreasing order. The LOCs for each line are again an alist +;; ordered the same way. Note that the whole file structure is referenced in +;; every LOC. + +(defmacro compilation--make-file-struct (file-spec formats &optional loc-tree) + `(cons ,file-spec (cons ,formats ,loc-tree))) +(defmacro compilation--file-struct->file-spec (fs) `(car ,fs)) +(defmacro compilation--file-struct->formats (fs) `(cadr ,fs)) +;; The FORMATS field plays the role of ANCHOR in the loc-tree. +(defmacro compilation--file-struct->loc-tree (fs) `(cdr ,fs)) + +;; MESSAGE is a list of (LOC TYPE END-LOC) + +;; TYPE is 0 for info or 1 for warning if the message matcher identified it as +;; such, 2 otherwise (for a real error). END-LOC is a LOC pointing to the +;; other end, if the parsed message contained a range. If the end of the +;; range didn't specify a COLUMN, it defaults to -1, meaning end of line. +;; These are the value of the `compilation-message' text-properties in the +;; compilation buffer. + +(defstruct (compilation--message + (:constructor nil) + (:copier nil) + ;; (:type list) ;Old representation. + (:constructor compilation--make-message (loc type end-loc)) + (:conc-name compilation--message->)) + loc type end-loc) + +(defvar compilation--previous-directory-cache nil + "A pair (POS . RES) caching the result of previous directory search. +Basically, this pair says that calling + (previous-single-property-change POS 'compilation-directory) +returned RES, i.e. there is no change of `compilation-directory' between +POS and RES.") +(make-variable-buffer-local 'compilation--previous-directory-cache) + +(defun compilation--flush-directory-cache (start end) + (cond + ((or (not compilation--previous-directory-cache) + (<= (car compilation--previous-directory-cache) start))) + ((or (not (cdr compilation--previous-directory-cache)) + (<= (cdr compilation--previous-directory-cache) start)) + (set-marker (car compilation--previous-directory-cache) start)) + (t (setq compilation--previous-directory-cache nil)))) + +(defun compilation--previous-directory (pos) + "Like (previous-single-property-change POS 'compilation-directory), but faster." + ;; This avoids an N² behavior when there's no/few compilation-directory + ;; entries, in which case each call to previous-single-property-change + ;; ends up having to walk very far back to find the last change. + (if (and compilation--previous-directory-cache + (< pos (car compilation--previous-directory-cache)) + (or (null (cdr compilation--previous-directory-cache)) + (< (cdr compilation--previous-directory-cache) pos))) + ;; No need to call previous-single-property-change. + (cdr compilation--previous-directory-cache) + + (let* ((cache (and compilation--previous-directory-cache + (<= (car compilation--previous-directory-cache) pos) + (car compilation--previous-directory-cache))) + (prev + (previous-single-property-change + pos 'compilation-directory nil cache))) + (cond + ((null cache) + (setq compilation--previous-directory-cache + (cons (copy-marker pos) (copy-marker prev))) + prev) + ((eq prev cache) + (if cache + (set-marker (car compilation--previous-directory-cache) pos) + (setq compilation--previous-directory-cache + (cons (copy-marker pos) nil))) + (cdr compilation--previous-directory-cache)) + (t + (if cache + (progn + (set-marker (car compilation--previous-directory-cache) pos) + (setcdr compilation--previous-directory-cache + (copy-marker prev))) + (setq compilation--previous-directory-cache + (cons (copy-marker pos) (copy-marker prev)))) + prev))))) + ;; Internal function for calculating the text properties of a directory -;; change message. The directory property is important, because it is -;; the stack of nested enter-messages. Relative filenames on the following +;; change message. The compilation-directory property is important, because it +;; is the stack of nested enter-messages. Relative filenames on the following ;; lines are relative to the top of the stack. (defun compilation-directory-properties (idx leave) (if leave (setq leave (match-end leave))) ;; find previous stack, and push onto it, or if `leave' pop it - (let ((dir (previous-single-property-change (point) 'directory))) - (setq dir (if dir (or (get-text-property (1- dir) 'directory) - (get-text-property dir 'directory)))) - `(face ,(if leave - compilation-leave-directory-face - compilation-enter-directory-face) - directory ,(if leave - (or (cdr dir) - '(nil)) ; nil only isn't a property-change - (cons (match-string-no-properties idx) dir)) + (let ((dir (compilation--previous-directory (point)))) + (setq dir (if dir (or (get-text-property (1- dir) 'compilation-directory) + (get-text-property dir 'compilation-directory)))) + `(font-lock-face ,(if leave + compilation-leave-directory-face + compilation-enter-directory-face) + compilation-directory ,(if leave + (or (cdr dir) + '(nil)) ; nil only isn't a property-change + (cons (match-string-no-properties idx) dir)) + ;; Place a `compilation-message' everywhere we change text-properties + ;; so compilation--remove-properties can know what to remove. + compilation-message ,(compilation--make-message nil 0 nil) mouse-face highlight keymap compilation-button-map help-echo "mouse-2: visit destination directory"))) @@ -858,28 +948,28 @@ from a different message." ;; Return a property list with all meta information on this error location. (defun compilation-error-properties (file line end-line col end-col type fmt) - (unless (< (next-single-property-change (match-beginning 0) - 'directory nil (point)) - (point)) + (unless (text-property-not-all (match-beginning 0) (point) + 'compilation-message nil) (if file - (if (functionp file) - (setq file (funcall file)) - (let (dir) - (setq file (match-string-no-properties file)) + (when (stringp + (setq file (if (functionp file) (funcall file) + (match-string-no-properties file)))) + (let ((dir (unless (file-name-absolute-p file) - (setq dir (previous-single-property-change (point) 'directory) - dir (if dir (or (get-text-property (1- dir) 'directory) - (get-text-property dir 'directory))))) + (let ((pos (compilation--previous-directory (point)))) + (when pos + (or (get-text-property (1- pos) 'compilation-directory) + (get-text-property pos 'compilation-directory))))))) (setq file (cons file (car dir))))) ;; This message didn't mention one, get it from previous (let ((prev-pos ;; Find the previous message. - (previous-single-property-change (point) 'message))) + (previous-single-property-change (point) 'compilation-message))) (if prev-pos ;; Get the file structure that belongs to it. (let* ((prev - (or (get-text-property (1- prev-pos) 'message) - (get-text-property prev-pos 'message))) + (or (get-text-property (1- prev-pos) 'compilation-message) + (get-text-property prev-pos 'compilation-message))) (prev-struct (car (nth 2 (car prev))))) ;; Construct FILE . DIR from that. @@ -918,7 +1008,8 @@ from a different message." (run-with-timer 0 nil 'compilation-auto-jump (current-buffer) (match-beginning 0))) - (compilation-internal-error-properties file line end-line col end-col type fmt))) + (compilation-internal-error-properties + file line end-line col end-col type fmt))) (defun compilation-move-to-column (col screen) "Go to column COL on the current line. @@ -939,22 +1030,25 @@ FMTS is a list of format specs for transforming the file name. (let* ((file-struct (compilation-get-file-structure file fmts)) ;; Get first already existing marker (if any has one, all have one). ;; Do this first, as the compilation-assq`s may create new nodes. - (marker-line (car (cddr file-struct))) ; a line structure - (marker (nth 3 (cadr marker-line))) ; its marker + (marker-line ; a line structure + (cadr (compilation--file-struct->loc-tree file-struct))) + (marker + (if marker-line (compilation--loc->marker (cadr marker-line)))) (compilation-error-screen-columns compilation-error-screen-columns) end-marker loc end-loc) (if (not (and marker (marker-buffer marker))) (setq marker nil) ; no valid marker for this file (setq loc (or line 1)) ; normalize no linenumber to line 1 (catch 'marker ; find nearest loc, at least one exists - (dolist (x (nthcdr 3 file-struct)) ; loop over remaining lines + (dolist (x (cddr (compilation--file-struct->loc-tree + file-struct))) ; Loop over remaining lines. (if (> (car x) loc) ; still bigger (setq marker-line x) (if (> (- (or (car marker-line) 1) loc) (- loc (car x))) ; current line is nearer (setq marker-line x)) (throw 'marker t)))) - (setq marker (nth 3 (cadr marker-line)) + (setq marker (compilation--loc->marker (cadr marker-line)) marker-line (or (car marker-line) 1)) (with-current-buffer (marker-buffer marker) (save-excursion @@ -967,7 +1061,7 @@ FMTS is a list of format specs for transforming the file name. (end-of-line) (compilation-move-to-column end-col compilation-error-screen-columns)) - (setq end-marker (list (point-marker)))) + (setq end-marker (point-marker))) (beginning-of-line (if end-line (- line end-line -1) (- loc marker-line -1))) @@ -975,120 +1069,259 @@ FMTS is a list of format specs for transforming the file name. (compilation-move-to-column col compilation-error-screen-columns) (forward-to-indentation 0)) - (setq marker (list (point-marker))))))) + (setq marker (point-marker)))))) - (setq loc (compilation-assq line (cdr file-struct))) + (setq loc (compilation-assq line (compilation--file-struct->loc-tree + file-struct))) + (setq end-loc (if end-line - (setq end-loc (compilation-assq end-line (cdr file-struct)) - end-loc (compilation-assq end-col end-loc)) + (compilation-assq + end-col (compilation-assq + end-line (compilation--file-struct->loc-tree + file-struct))) (if end-col ; use same line element - (setq end-loc (compilation-assq end-col loc)))) + (compilation-assq end-col loc)))) (setq loc (compilation-assq col loc)) ;; If they are new, make the loc(s) reference the file they point to. - (or (cdr loc) (setcdr loc `(,line ,file-struct ,@marker))) + ;; FIXME-omake: there's a problem with timestamps here: the markers + ;; relative to which we computed the current `marker' have a timestamp + ;; almost guaranteed to be different from compilation-buffer-modtime, so if + ;; we use their timestamp, we'll never use `loc' since the timestamp won't + ;; match compilation-buffer-modtime, and if we use + ;; compilation-buffer-modtime then we have different timestamps for + ;; locations that were computed together, which doesn't make sense either. + ;; I think this points to a fundamental problem in our approach to the + ;; "omake -P" problem. --Stef + (or (cdr loc) + (setcdr loc (compilation--make-cdrloc line file-struct marker))) (if end-loc (or (cdr end-loc) - (setcdr end-loc `(,(or end-line line) ,file-struct ,@end-marker)))) + (setcdr end-loc + (compilation--make-cdrloc (or end-line line) file-struct + end-marker)))) ;; Must start with face - `(face ,compilation-message-face - message (,loc ,type ,end-loc) - ,@(if compilation-debug - `(debug (,(assoc (with-no-warnings matcher) font-lock-keywords) - ,@(match-data)))) - help-echo ,(if col - "mouse-2: visit this file, line and column" - (if line - "mouse-2: visit this file and line" - "mouse-2: visit this file")) - keymap compilation-button-map - mouse-face highlight))) + `(font-lock-face ,compilation-message-face + compilation-message ,(compilation--make-message loc type end-loc) + help-echo ,(if col + "mouse-2: visit this file, line and column" + (if line + "mouse-2: visit this file and line" + "mouse-2: visit this file")) + keymap compilation-button-map + mouse-face highlight))) + +(defun compilation--put-prop (matchnum prop val) + (when (and (integerp matchnum) (match-beginning matchnum)) + (put-text-property + (match-beginning matchnum) (match-end matchnum) + prop val))) + +(defun compilation--remove-properties (&optional start end) + (with-silent-modifications + ;; When compile.el used font-lock directly, we could just remove all + ;; our text-properties in one go, but now that we manually place + ;; font-lock-face, we have to be careful to only remove the font-lock-face + ;; we placed. + ;; (remove-list-of-text-properties + ;; (or start (point-min)) (or end (point-max)) + ;; '(compilation-debug compilation-directory compilation-message + ;; font-lock-face help-echo mouse-face)) + (let (next) + (unless start (setq start (point-min))) + (unless end (setq end (point-max))) + (compilation--flush-directory-cache start end) + (while + (progn + (setq next (or (next-single-property-change + start 'compilation-message nil end) + end)) + (when (get-text-property start 'compilation-message) + (remove-list-of-text-properties + start next + '(compilation-debug compilation-directory compilation-message + font-lock-face help-echo mouse-face))) + (< next end)) + (setq start next))))) + +(defun compilation--parse-region (start end) + (goto-char end) + (unless (bolp) + ;; We generally don't like to parse partial lines. + (assert (eobp)) + (when (let ((proc (get-buffer-process (current-buffer)))) + (and proc (memq (process-status proc) '(run open)))) + (setq end (line-beginning-position)))) + (compilation--remove-properties start end) + (if compilation-parse-errors-function + ;; An old package! Try the compatibility code. + (progn + (goto-char start) + (compilation--compat-parse-errors end)) + + ;; compilation-directory-matcher is the only part that really needs to be + ;; parsed sequentially. So we could split it out, handle directories + ;; like syntax-propertize, and the rest as font-lock-keywords. But since + ;; we want to have it work even when font-lock is off, we'd then need to + ;; use our own compilation-parsed text-property to keep track of the parts + ;; that have already been parsed. + (goto-char start) + (while (re-search-forward (car compilation-directory-matcher) + end t) + (compilation--flush-directory-cache (match-beginning 0) (match-end 0)) + (when compilation-debug + (font-lock-append-text-property + (match-beginning 0) (match-end 0) + 'compilation-debug + (vector 'directory compilation-directory-matcher))) + (dolist (elt (cdr compilation-directory-matcher)) + (add-text-properties (match-beginning (car elt)) + (match-end (car elt)) + (compilation-directory-properties + (car elt) (cdr elt))))) + + (compilation-parse-errors start end))) + +(defun compilation-parse-errors (start end &rest rules) + "Parse errors between START and END. +The errors recognized are the ones specified in RULES which default +to `compilation-error-regexp-alist' if RULES is nil." + (dolist (item (or rules compilation-error-regexp-alist)) + (if (symbolp item) + (setq item (cdr (assq item + compilation-error-regexp-alist-alist)))) + (let ((file (nth 1 item)) + (line (nth 2 item)) + (col (nth 3 item)) + (type (nth 4 item)) + (pat (car item)) + end-line end-col fmt + props) + + ;; omake reports some error indented, so skip the indentation. + ;; another solution is to modify (some?) regexps in + ;; `compilation-error-regexp-alist'. + ;; note that omake usage is not limited to ocaml and C (for stubs). + ;; FIXME-omake: Doing it here seems wrong, at least it should depend on + ;; whether or not omake's own error messages are recognized. + (cond + ((not (memq 'omake compilation-error-regexp-alist)) nil) + ((string-match "\\`\\([^^]\\|^\\( \\*\\|\\[\\)\\)" pat) + nil) ;; Not anchored or anchored but already allows empty spaces. + (t (setq pat (concat "^ *" (substring pat 1))))) + + (if (consp file) (setq fmt (cdr file) file (car file))) + (if (consp line) (setq end-line (cdr line) line (car line))) + (if (consp col) (setq end-col (cdr col) col (car col))) + + (if (functionp line) + ;; The old compile.el had here an undocumented hook that + ;; allowed `line' to be a function that computed the actual + ;; error location. Let's do our best. + (progn + (goto-char start) + (while (re-search-forward pat end t) + (save-match-data + (when compilation-debug + (font-lock-append-text-property + (match-beginning 0) (match-end 0) + 'compilation-debug (vector 'functionp item))) + (add-text-properties + (match-beginning 0) (match-end 0) + (compilation--compat-error-properties + (funcall line (cons (match-string file) + (cons default-directory + (nthcdr 4 item))) + (if col (match-string col)))))) + (compilation--put-prop + file 'font-lock-face compilation-error-face))) + + (unless (or (null (nth 5 item)) (integerp (nth 5 item))) + (error "HYPERLINK should be an integer: %s" (nth 5 item))) + + (goto-char start) + (while (re-search-forward pat end t) + (when (setq props (compilation-error-properties + file line end-line col end-col (or type 2) fmt)) + + (when (integerp file) + (compilation--put-prop + file 'font-lock-face + (if (consp type) + (compilation-face type) + (symbol-value (aref [compilation-info-face + compilation-warning-face + compilation-error-face] + (or type 2)))))) + + (compilation--put-prop + line 'font-lock-face compilation-line-face) + (compilation--put-prop + end-line 'font-lock-face compilation-line-face) + + (compilation--put-prop + col 'font-lock-face compilation-column-face) + (compilation--put-prop + end-col 'font-lock-face compilation-column-face) + + (dolist (extra-item (nthcdr 6 item)) + (let ((mn (pop extra-item))) + (when (match-beginning mn) + (let ((face (eval (car extra-item)))) + (cond + ((null face)) + ((symbolp face) + (put-text-property + (match-beginning mn) (match-end mn) + 'font-lock-face face)) + (t + (error "Don't know how to handle face %S" + face))))))) + (let ((mn (or (nth 5 item) 0))) + (when compilation-debug + (font-lock-append-text-property + (match-beginning 0) (match-end 0) + 'compilation-debug (vector 'std item props))) + (add-text-properties + (match-beginning mn) (match-end mn) + (cddr props)) + (font-lock-append-text-property + (match-beginning mn) (match-end mn) + 'font-lock-face (cadr props))))))))) + +(defvar compilation--parsed -1) +(make-variable-buffer-local 'compilation--parsed) + +(defun compilation--ensure-parse (limit) + "Make sure the text has been parsed up to LIMIT." + (save-excursion + (goto-char limit) + (setq limit (line-beginning-position 2)) + (unless (markerp compilation--parsed) + ;; We use a marker for compilation--parsed so that users (such as + ;; grep.el) don't need to flush-parse when they modify the buffer + ;; in a way that impacts buffer positions but does not require + ;; re-parsing. + (setq compilation--parsed (point-min-marker))) + (when (< compilation--parsed limit) + (let ((start (max compilation--parsed (point-min)))) + (move-marker compilation--parsed limit) + (goto-char start) + (forward-line 0) ;Not line-beginning-position: ignore (comint) fields. + (with-silent-modifications + (compilation--parse-region (point) compilation--parsed))))) + nil) + +(defun compilation--flush-parse (start end) + "Mark the region between START and END for re-parsing." + (if (markerp compilation--parsed) + (move-marker compilation--parsed (min start compilation--parsed)))) (defun compilation-mode-font-lock-keywords () "Return expressions to highlight in Compilation mode." - (if compilation-parse-errors-function - ;; An old package! Try the compatibility code. - '((compilation-compat-parse-errors)) - (append - ;; make directory tracking - (if compilation-directory-matcher - `((,(car compilation-directory-matcher) - ,@(mapcar (lambda (elt) - `(,(car elt) - (compilation-directory-properties - ,(car elt) ,(cdr elt)) - t t)) - (cdr compilation-directory-matcher))))) - - ;; Compiler warning/error lines. - (mapcar - (lambda (item) - (if (symbolp item) - (setq item (cdr (assq item - compilation-error-regexp-alist-alist)))) - (let ((file (nth 1 item)) - (line (nth 2 item)) - (col (nth 3 item)) - (type (nth 4 item)) - (pat (car item)) - end-line end-col fmt) - ;; omake reports some error indented, so skip the indentation. - ;; another solution is to modify (some?) regexps in - ;; `compilation-error-regexp-alist'. - ;; note that omake usage is not limited to ocaml and C (for stubs). - (when (and (= ?^ (aref pat 0)) ; anchored: starts with "^" - ;; but does not allow an arbitrary number of leading spaces - (not (and (= ? (aref pat 1)) (= ?* (aref pat 2))))) - (setq pat (concat "^ *" (substring pat 1)))) - (if (consp file) (setq fmt (cdr file) file (car file))) - (if (consp line) (setq end-line (cdr line) line (car line))) - (if (consp col) (setq end-col (cdr col) col (car col))) - - (if (functionp line) - ;; The old compile.el had here an undocumented hook that - ;; allowed `line' to be a function that computed the actual - ;; error location. Let's do our best. - `(,pat - (0 (save-match-data - (compilation-compat-error-properties - (funcall ',line (cons (match-string ,file) - (cons default-directory - ',(nthcdr 4 item))) - ,(if col `(match-string ,col)))))) - (,file compilation-error-face t)) - - (unless (or (null (nth 5 item)) (integerp (nth 5 item))) - (error "HYPERLINK should be an integer: %s" (nth 5 item))) - - `(,pat - - ,@(when (integerp file) - `((,file ,(if (consp type) - `(compilation-face ',type) - (aref [compilation-info-face - compilation-warning-face - compilation-error-face] - (or type 2)))))) - - ,@(when line - `((,line compilation-line-face nil t))) - ,@(when end-line - `((,end-line compilation-line-face nil t))) - - ,@(when (integerp col) - `((,col compilation-column-face nil t))) - ,@(when (integerp end-col) - `((,end-col compilation-column-face nil t))) - - ,@(nthcdr 6 item) - (,(or (nth 5 item) 0) - (compilation-error-properties ',file ,line ,end-line - ,col ,end-col ',(or type 2) - ',fmt) - append))))) ; for compilation-message-face - compilation-error-regexp-alist) - - compilation-mode-font-lock-keywords))) + (append + '((compilation--ensure-parse)) + compilation-mode-font-lock-keywords)) (defun compilation-read-command (command) (read-shell-command "Compile command: " command @@ -1384,7 +1617,7 @@ Returns the compilation buffer created." ;; Insert the output at the end, after the initial text, ;; regardless of where the user sees point. (goto-char (point-max)) - (let* ((buffer-read-only nil) ; call-process needs to modify outbuf + (let* ((inhibit-read-only t) ; call-process needs to modify outbuf (status (call-process shell-file-name nil outbuf nil "-c" command))) (cond ((numberp status) @@ -1398,10 +1631,6 @@ Returns the compilation buffer created." (concat status "\n"))) (t (compilation-handle-exit 'bizarre status status))))) - ;; Without async subprocesses, the buffer is not yet - ;; fontified, so fontify it now. - (let ((font-lock-verbose nil)) ; shut up font-lock messages - (font-lock-fontify-buffer)) (set-buffer-modified-p nil) (message "Executing `%s'...done" command))) ;; Now finally cd to where the shell started make/grep/... @@ -1567,9 +1796,11 @@ Returns the compilation buffer created." (defvar compilation-mode-tool-bar-map ;; When bootstrapping, tool-bar-map is not properly initialized yet, ;; so don't do anything. - (when (keymapp (butlast tool-bar-map)) - (let ((map (butlast (copy-keymap tool-bar-map))) - (help (last tool-bar-map))) ;; Keep Help last in tool bar + (when (keymapp tool-bar-map) + (let ((map (copy-keymap tool-bar-map))) + (define-key map [undo] nil) + (define-key map [separator-2] nil) + (define-key-after map [separator-compile] menu-bar-separator) (tool-bar-local-item "left-arrow" 'previous-error-no-select 'previous-error-no-select map :rtl "right-arrow" @@ -1586,7 +1817,7 @@ Returns the compilation buffer created." (tool-bar-local-item "refresh" 'recompile 'recompile map :help "Restart compilation") - (append map help)))) + map))) (put 'compilation-mode 'mode-class 'special) @@ -1610,7 +1841,7 @@ Runs `compilation-mode-hook' with `run-mode-hooks' (which see). mode-name (or name-of-mode "Compilation")) (set (make-local-variable 'page-delimiter) compilation-page-delimiter) - (set (make-local-variable 'compilation-buffer-modtime) nil) + ;; (set (make-local-variable 'compilation-buffer-modtime) nil) (compilation-setup) (setq buffer-read-only t) (run-mode-hooks 'compilation-mode-hook)) @@ -1631,6 +1862,7 @@ by replacing the first word, e.g `compilation-scroll-output' from (symbol-name v))))) (and (cdr v) (or (boundp (cdr v)) + ;; FIXME: This is hackish, using undocumented info. (if (boundp 'byte-compile-bound-variables) (memq (cdr v) byte-compile-bound-variables))) `(set (make-local-variable ',(car v)) ,(cdr v)))) @@ -1668,9 +1900,6 @@ The global commands next/previous/first-error/goto-error use this.") "Buffer position of the beginning of the compilation messages. If nil, use the beginning of buffer.") -;; A function name can't be a hook, must be something with a value. -(defconst compilation-turn-on-font-lock 'turn-on-font-lock) - (defun compilation-setup (&optional minor) "Prepare the buffer for the compilation parsing commands to work. Optional argument MINOR indicates this is called from @@ -1689,26 +1918,29 @@ Optional argument MINOR indicates this is called from (setq next-error-function 'compilation-next-error-function) (set (make-local-variable 'comint-file-name-prefix) (or (file-remote-p default-directory) "")) - (set (make-local-variable 'font-lock-extra-managed-props) - '(directory message help-echo mouse-face debug)) (set (make-local-variable 'compilation-locs) (make-hash-table :test 'equal :weakness 'value)) - ;; lazy-lock would never find the message unless it's scrolled to. - ;; jit-lock might fontify some things too late. - (set (make-local-variable 'font-lock-support-mode) nil) - (set (make-local-variable 'font-lock-maximum-size) nil) + ;; It's generally preferable to use after-change-functions since they + ;; can be subject to combine-after-change-calls, but if we do that, we risk + ;; running our hook after font-lock, resulting in incorrect refontification. + (add-hook 'before-change-functions 'compilation--flush-parse nil t) + ;; Also for minor mode, since it's not permanent-local. + (add-hook 'change-major-mode-hook #'compilation--remove-properties nil t) (if minor - (let ((fld font-lock-defaults)) + (progn (font-lock-add-keywords nil (compilation-mode-font-lock-keywords)) (if font-lock-mode - (if fld - (font-lock-fontify-buffer) - (font-lock-change-mode) - (turn-on-font-lock)) - (turn-on-font-lock))) - (setq font-lock-defaults '(compilation-mode-font-lock-keywords t)) - ;; maybe defer font-lock till after derived mode is set up - (run-mode-hooks 'compilation-turn-on-font-lock))) + (font-lock-fontify-buffer))) + (setq font-lock-defaults '(compilation-mode-font-lock-keywords t)))) + +(defun compilation--unsetup () + ;; Only for minor mode. + (font-lock-remove-keywords nil (compilation-mode-font-lock-keywords)) + (remove-hook 'before-change-functions 'compilation--flush-parse t) + (kill-local-variable 'compilation--parsed) + (compilation--remove-properties) + (if font-lock-mode + (font-lock-fontify-buffer))) ;;;###autoload (define-minor-mode compilation-shell-minor-mode @@ -1722,8 +1954,7 @@ Turning the mode on runs the normal hook `compilation-shell-minor-mode-hook'." :group 'compilation (if compilation-shell-minor-mode (compilation-setup t) - (font-lock-remove-keywords nil (compilation-mode-font-lock-keywords)) - (font-lock-fontify-buffer))) + (compilation--unsetup))) ;;;###autoload (define-minor-mode compilation-minor-mode @@ -1736,8 +1967,7 @@ Turning the mode on runs the normal hook `compilation-minor-mode-hook'." :group 'compilation (if compilation-minor-mode (compilation-setup t) - (font-lock-remove-keywords nil (compilation-mode-font-lock-keywords)) - (font-lock-fontify-buffer))) + (compilation--unsetup))) (defun compilation-handle-exit (process-status exit-status msg) "Write MSG in the current buffer and hack its `mode-line-process'." @@ -1765,7 +1995,8 @@ Turning the mode on runs the normal hook `compilation-minor-mode-hook'." (setq mode-line-process (let ((out-string (format ":%s [%s]" process-status (cdr status))) (msg (format "%s %s" mode-name - (replace-regexp-in-string "\n?$" "" (car status))))) + (replace-regexp-in-string "\n?$" "" + (car status))))) (message "%s" msg) (propertize out-string 'help-echo msg 'face (if (> exit-status 0) @@ -1810,13 +2041,13 @@ and runs `compilation-filter-hook'." (let ((inhibit-read-only t) ;; `save-excursion' doesn't use the right insertion-type for us. (pos (copy-marker (point) t)) + ;; `save-restriction' doesn't use the right insertion type either: + ;; If we are inserting at the end of the accessible part of the + ;; buffer, keep the inserted text visible. (min (point-min-marker)) - (max (point-max-marker))) + (max (copy-marker (point-max) t))) (unwind-protect (progn - ;; If we are inserting at the end of the accessible part - ;; of the buffer, keep the inserted text visible. - (set-marker-insertion-type max t) (widen) (goto-char (process-mark proc)) ;; We used to use `insert-before-markers', so that windows with @@ -1826,10 +2057,12 @@ and runs `compilation-filter-hook'." (unless comint-inhibit-carriage-motion (comint-carriage-motion (process-mark proc) (point))) (set-marker (process-mark proc) (point)) - (set (make-local-variable 'compilation-buffer-modtime) (current-time)) + ;; (set (make-local-variable 'compilation-buffer-modtime) + ;; (current-time)) (run-hooks 'compilation-filter-hook)) (goto-char pos) (narrow-to-region min max) + (set-marker pos nil) (set-marker min nil) (set-marker max nil)))))) @@ -1848,31 +2081,50 @@ and runs `compilation-filter-hook'." `(let (opt) (while (,< n 0) (setq opt pt) - (or (setq pt (,property-change pt 'message)) + (or (setq pt (,property-change pt 'compilation-message)) ;; Handle the case where where the first error message is ;; at the start of the buffer, and n < 0. - (if (or (eq (get-text-property ,limit 'message) - (get-text-property opt 'message)) + (if (or (eq (get-text-property ,limit 'compilation-message) + (get-text-property opt 'compilation-message)) (eq pt opt)) (error ,error compilation-error) (setq pt ,limit))) - ;; prop 'message usually has 2 changes, on and off, so + ;; prop 'compilation-message usually has 2 changes, on and off, so ;; re-search if off - (or (setq msg (get-text-property pt 'message)) - (if (setq pt (,property-change pt 'message nil ,limit)) - (setq msg (get-text-property pt 'message))) + (or (setq msg (get-text-property pt 'compilation-message)) + (if (setq pt (,property-change pt 'compilation-message nil ,limit)) + (setq msg (get-text-property pt 'compilation-message))) (error ,error compilation-error)) - (or (< (cadr msg) compilation-skip-threshold) + (or (< (compilation--message->type msg) compilation-skip-threshold) (if different-file - (eq (prog1 last (setq last (nth 2 (car msg)))) + (eq (prog1 last + (setq last (compilation--loc->file-struct + (compilation--message->loc msg)))) last)) (if compilation-skip-visited - (nthcdr 5 (car msg))) + (compilation--loc->visited (compilation--message->loc msg))) (if compilation-skip-to-next-location - (eq (car msg) loc)) + (eq (compilation--message->loc msg) loc)) ;; count this message only if none of the above are true (setq n (,1+ n)))))) +(defun compilation-next-single-property-change (position prop + &optional object limit) + (let (parsed res) + (while (progn + ;; We parse the buffer here "on-demand" by chunks of 500 chars. + ;; But we could also just parse the whole buffer. + (compilation--ensure-parse + (setq parsed (max compilation--parsed + (min (+ position 500) + (or limit (point-max)))))) + (and (or (not (setq res (next-single-property-change + position prop object limit))) + (eq res limit)) + (< position (or limit (point-max))))) + (setq position parsed)) + res)) + (defun compilation-next-error (n &optional different-file pt) "Move point to the next error in the compilation buffer. This function does NOT find the source line like \\[next-error]. @@ -1886,31 +2138,35 @@ looking for the next message." (or (compilation-buffer-p (current-buffer)) (error "Not in a compilation buffer")) (or pt (setq pt (point))) - (let* ((msg (get-text-property pt 'message)) - ;; `loc' is used by the compilation-loop macro. - (loc (car msg)) + (let* ((msg (get-text-property pt 'compilation-message)) + ;; `loc', `msg', and `last' are used by the compilation-loop macro. + (loc (compilation--message->loc msg)) last) (if (zerop n) (unless (or msg ; find message near here (setq msg (get-text-property (max (1- pt) (point-min)) - 'message))) - (setq pt (previous-single-property-change pt 'message nil + 'compilation-message))) + (setq pt (previous-single-property-change pt 'compilation-message nil (line-beginning-position))) - (unless (setq msg (get-text-property (max (1- pt) (point-min)) 'message)) - (setq pt (next-single-property-change pt 'message nil + (unless (setq msg (get-text-property (max (1- pt) (point-min)) + 'compilation-message)) + (setq pt (next-single-property-change pt 'compilation-message nil (line-end-position))) - (or (setq msg (get-text-property pt 'message)) + (or (setq msg (get-text-property pt 'compilation-message)) (setq pt (point))))) - (setq last (nth 2 (car msg))) + (setq last (compilation--loc->file-struct + (compilation--message->loc msg))) (if (>= n 0) - (compilation-loop > next-single-property-change 1- + (compilation-loop > compilation-next-single-property-change 1- (if (get-buffer-process (current-buffer)) "No more %ss yet" "Moved past last %s") (point-max)) + (compilation--ensure-parse pt) ;; Don't move "back" to message at or before point. ;; Pass an explicit (point-min) to make sure pt is non-nil. - (setq pt (previous-single-property-change pt 'message nil (point-min))) + (setq pt (previous-single-property-change + pt 'compilation-message nil (point-min))) (compilation-loop < previous-single-property-change 1+ "Moved back before first %s" (point-min)))) (goto-char pt) @@ -1954,12 +2210,16 @@ Use this command in a compilation log buffer. Sets the mark at point there." (if event (posn-set-point (event-end event))) (or (compilation-buffer-p (current-buffer)) (error "Not in a compilation buffer")) - (if (get-text-property (point) 'directory) - (dired-other-window (car (get-text-property (point) 'directory))) + (compilation--ensure-parse (point)) + (if (get-text-property (point) 'compilation-directory) + (dired-other-window + (car (get-text-property (point) 'compilation-directory))) (push-mark) (setq compilation-current-error (point)) (next-error-internal))) +;; This is mostly unused, but we keep it for the sake of some external +;; packages which seem to make use of it. (defun compilation-find-buffer (&optional avoid-current) "Return a compilation buffer. If AVOID-CURRENT is nil, and the current buffer is a compilation buffer, @@ -1978,53 +2238,65 @@ This is the value of `next-error-function' in Compilation buffers." (setq compilation-current-error nil)) (let* ((columns compilation-error-screen-columns) ; buffer's local value (last 1) timestamp - (loc (compilation-next-error (or n 1) nil + (msg (compilation-next-error (or n 1) nil (or compilation-current-error compilation-messages-start (point-min)))) - (end-loc (nth 2 loc)) + (loc (compilation--message->loc msg)) + (end-loc (compilation--message->end-loc msg)) (marker (point-marker))) (setq compilation-current-error (point-marker) overlay-arrow-position (if (bolp) compilation-current-error - (copy-marker (line-beginning-position))) - loc (car loc)) + (copy-marker (line-beginning-position)))) ;; If loc contains no marker, no error in that file has been visited. ;; If the marker is invalid the buffer has been killed. - ;; If the file is newer than the timestamp, it has been modified - ;; (`omake -P' polls filesystem for changes and recompiles when needed - ;; in the same process and buffer). ;; So, recalculate all markers for that file. - (unless (and (nth 3 loc) (marker-buffer (nth 3 loc)) (nthcdr 4 loc) - ;; There may be no timestamp info if the loc is a `fake-loc', - ;; but we just checked that the file has been visited before! - (equal (nth 4 loc) - (setq timestamp compilation-buffer-modtime))) - (with-current-buffer (compilation-find-file marker (caar (nth 2 loc)) - (cadr (car (nth 2 loc)))) + (unless (and (compilation--loc->marker loc) + (marker-buffer (compilation--loc->marker loc)) + ;; FIXME-omake: For "omake -P", which automatically recompiles + ;; when the file is modified, the line numbers of new output + ;; may not be related to line numbers from earlier output + ;; (earlier markers), so we used to try to detect it here and + ;; force a reparse. But that caused more problems elsewhere, + ;; so instead we now flush the file-structure when we see + ;; omake's message telling it's about to recompile a file. + ;; (or (null (compilation--loc->timestamp loc)) ;A fake-loc + ;; (equal (compilation--loc->timestamp loc) + ;; (setq timestamp compilation-buffer-modtime))) + ) + (with-current-buffer + (compilation-find-file + marker + (caar (compilation--loc->file-struct loc)) + (cadr (car (compilation--loc->file-struct loc)))) (save-restriction (widen) (goto-char (point-min)) ;; Treat file's found lines in forward order, 1 by 1. - (dolist (line (reverse (cddr (nth 2 loc)))) + (dolist (line (reverse (cddr (compilation--loc->file-struct loc)))) (when (car line) ; else this is a filename w/o a line# (beginning-of-line (- (car line) last -1)) (setq last (car line))) ;; Treat line's found columns and store/update a marker for each. (dolist (col (cdr line)) - (if (car col) - (if (eq (car col) -1) ; special case for range end + (if (compilation--loc->col col) + (if (eq (compilation--loc->col col) -1) + ;; Special case for range end. (end-of-line) - (compilation-move-to-column (car col) columns)) + (compilation-move-to-column (compilation--loc->col col) + columns)) (beginning-of-line) (skip-chars-forward " \t")) - (if (nth 3 col) - (set-marker (nth 3 col) (point)) - (setcdr (nthcdr 2 col) `(,(point-marker))))))))) - (compilation-goto-locus marker (nth 3 loc) (nth 3 end-loc)) - (setcdr (nthcdr 3 loc) (list timestamp)) - (setcdr (nthcdr 4 loc) t))) ; Set this one as visited. + (if (compilation--loc->marker col) + (set-marker (compilation--loc->marker col) (point)) + (setf (compilation--loc->marker col) (point-marker))) + ;; (setf (compilation--loc->timestamp col) timestamp) + ))))) + (compilation-goto-locus marker (compilation--loc->marker loc) + (compilation--loc->marker end-loc)) + (setf (compilation--loc->visited loc) t))) (defvar compilation-gcpro nil "Internal variable used to keep some values from being GC'd.") @@ -2035,8 +2307,8 @@ This is the value of `next-error-function' in Compilation buffers." FILE should be ABSOLUTE-FILENAME or (RELATIVE-FILENAME . DIRNAME). This is useful when you compile temporary files, but want automatic translation of the messages to the real buffer from -which the temporary file came. This only works if done before a -message about FILE appears! +which the temporary file came. This may also affect previous messages +about FILE. Optional args LINE and COL default to 1 and beginning of indentation respectively. The marker is expected to reflect @@ -2048,18 +2320,19 @@ header with variable assignments and a code region), you must call this several times, once each for the last line of one region and the first line of the next region." (or (consp file) (setq file (list file))) - (setq file (compilation-get-file-structure file)) - ;; Between the current call to compilation-fake-loc and the first occurrence - ;; of an error message referring to `file', the data is only kept in the - ;; weak hash-table compilation-locs, so we need to prevent this entry - ;; in compilation-locs from being GC'd away. --Stef - (push file compilation-gcpro) - (let ((loc (compilation-assq (or line 1) (cdr file)))) - (setq loc (compilation-assq col loc)) - (if (cdr loc) - (setcdr (cddr loc) (list marker)) - (setcdr loc (list line file marker))) - loc)) + (compilation--flush-file-structure file) + (let ((fs (compilation-get-file-structure file))) + ;; Between the current call to compilation-fake-loc and the first + ;; occurrence of an error message referring to `file', the data is + ;; only kept in the weak hash-table compilation-locs, so we need + ;; to prevent this entry in compilation-locs from being GC'd + ;; away. --Stef + (push fs compilation-gcpro) + (let ((loc (compilation-assq (or line 1) (cdr fs)))) + (setq loc (compilation-assq col loc)) + (assert (null (cdr loc))) + (setcdr loc (compilation--make-cdrloc line fs marker)) + loc))) (defcustom compilation-context-lines nil "Display this many lines of leading context before the current message. @@ -2277,7 +2550,7 @@ FILE should be (FILENAME) or (RELATIVE-FILENAME . DIRNAME). In the former case, FILENAME may be relative or absolute. The file-structure looks like this: - (list (list FILENAME [DIR-FROM-PREV-MSG]) FMT LINE-STRUCT...)" + ((FILENAME [DIR-FROM-PREV-MSG]) FMT LINE-STRUCT...)" (or (gethash file compilation-locs) ;; File was not previously encountered, at least not in the form passed. ;; Let's normalize it and look again. @@ -2322,25 +2595,41 @@ The file-structure looks like this: ;; http://lists.gnu.org/archive/html/emacs-devel/2007-08/msg00463.html (or (gethash (cons filename spec-directory) compilation-locs) (puthash (cons filename spec-directory) - (list (list filename spec-directory) fmt) + (compilation--make-file-struct + (list filename spec-directory) fmt) compilation-locs)) compilation-locs)))) -(add-to-list 'debug-ignored-errors "^No more [-a-z ]+s yet$") +(defun compilation--flush-file-structure (file) + (or (consp file) (setq file (list file))) + (let ((fs (compilation-get-file-structure file))) + (assert (eq fs (gethash file compilation-locs))) + (assert (eq fs (gethash (cons (caar fs) (cadr (car fs))) + compilation-locs))) + (maphash (lambda (k v) + (if (eq v fs) (remhash k compilation-locs))) + compilation-locs))) + +(add-to-list 'debug-ignored-errors "\\`No more [-a-z ]+s yet\\'") +(add-to-list 'debug-ignored-errors "\\`Moved past last .*") ;;; Compatibility with the old compile.el. -(defun compile-buffer-substring (n) (if n (match-string n))) +(defvaralias 'compilation-last-buffer 'next-error-last-buffer) +(defvar compilation-parsing-end (make-marker)) +(defvar compilation-error-list nil) +(defvar compilation-old-error-list nil) -(defun compilation-compat-error-properties (err) +(defun compilation--compat-error-properties (err) "Map old-style error ERR to new-style message." ;; Old-style structure is (MARKER (FILE DIR) LINE COL) or ;; (MARKER . MARKER). (let ((dst (cdr err))) (if (markerp dst) - ;; Must start with a face, for font-lock. - `(face nil - message ,(list (list nil nil nil dst) 2) + `(compilation-message ,(compilation--make-message + (cons nil (compilation--make-cdrloc + nil nil dst)) + 2 nil) help-echo "mouse-2: visit the source location" keymap compilation-button-map mouse-face highlight) @@ -2354,19 +2643,19 @@ The file-structure looks like this: (compilation-internal-error-properties (cons filename dirname) line nil col nil 2 fmt))))) -(defun compilation-compat-parse-errors (limit) +(defun compilation--compat-parse-errors (limit) (when compilation-parse-errors-function ;; FIXME: We should remove the rest of the compilation keywords ;; but we can't do that from here because font-lock is using - ;; the value right now. --stef + ;; the value right now. --Stef (save-excursion (setq compilation-error-list nil) ;; Reset compilation-parsing-end each time because font-lock ;; might force us the re-parse many times (typically because ;; some code adds some text-property to the output that we ;; already parsed). You might say "why reparse", well: - ;; because font-lock has just removed the `message' property so - ;; have to do it all over again. + ;; because font-lock has just removed the `compilation-message' property + ;; so have to do it all over again. (if compilation-parsing-end (set-marker compilation-parsing-end (point)) (setq compilation-parsing-end (point-marker))) @@ -2378,19 +2667,26 @@ The file-structure looks like this: (dolist (err (if (listp compilation-error-list) compilation-error-list)) (let* ((src (car err)) (dst (cdr err)) - (loc (cond ((markerp dst) (list nil nil nil dst)) + (loc (cond ((markerp dst) + (cons nil + (compilation--make-cdrloc nil nil dst))) ((consp dst) - (list (nth 2 dst) (nth 1 dst) - (cons (cdar dst) (caar dst))))))) + (cons (nth 2 dst) + (compilation--make-cdrloc + (nth 1 dst) + (cons (cdar dst) (caar dst)) + nil)))))) (when loc (goto-char src) - ;; (put-text-property src (line-end-position) 'font-lock-face 'font-lock-warning-face) + ;; (put-text-property src (line-end-position) + ;; 'font-lock-face 'font-lock-warning-face) (put-text-property src (line-end-position) - 'message (list loc 2))))))) + 'compilation-message + (compilation--make-message loc 2 nil))))))) (goto-char limit) nil) -;; Beware: this is not only compatibility code. New code stil uses it. --Stef +;; Beware! this is not only compatibility code. New code also uses it. --Stef (defun compilation-forget-errors () ;; In case we hit the same file/line specs, we want to recompute a new ;; marker for them, so flush our cache. @@ -2427,5 +2723,4 @@ The file-structure looks like this: (provide 'compile) -;; arch-tag: 12465727-7382-4f72-b234-79855a00dd8c ;;; compile.el ends here diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 6f8c1261510..7c634d14e6a 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -1,8 +1,6 @@ ;;; cperl-mode.el --- Perl code editing commands for Emacs -;; Copyright (C) 1985, 1986, 1987, 1991, 1992, 1993, 1994, 1995, 1996, -;; 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985-1987, 1991-2011 Free Software Foundation, Inc. ;; Author: Ilya Zakharevich ;; Bob Olson diff --git a/lisp/progmodes/cpp.el b/lisp/progmodes/cpp.el index 77a30521e9b..d7b8b0e8748 100644 --- a/lisp/progmodes/cpp.el +++ b/lisp/progmodes/cpp.el @@ -1,7 +1,6 @@ ;;; cpp.el --- highlight or hide text according to cpp conditionals -;; Copyright (C) 1994, 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation +;; Copyright (C) 1994-1995, 2001-2011 Free Software Foundation, Inc. ;; Author: Per Abrahamsen <abraham@dina.kvl.dk> ;; Keywords: c, faces, tools @@ -826,5 +825,4 @@ BRANCH should be either nil (false branch), t (true branch) or 'both." (provide 'cpp) -;; arch-tag: fb7d433d-745d-495a-96f0-86908ab63f74 ;;; cpp.el ends here diff --git a/lisp/progmodes/cwarn.el b/lisp/progmodes/cwarn.el index 00c11086ce1..211c856f9b7 100644 --- a/lisp/progmodes/cwarn.el +++ b/lisp/progmodes/cwarn.el @@ -1,7 +1,6 @@ ;;; cwarn.el --- highlight suspicious C and C++ constructions -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Anders Lindgren <andersl@andersl.com> ;; Keywords: c, languages, faces @@ -381,5 +380,4 @@ The mode is turned if some feature is enabled for the current ;;}}} -;; arch-tag: 225fb5e2-0838-4eb1-88ce-3811c5e4d738 ;;; cwarn.el ends here diff --git a/lisp/progmodes/dcl-mode.el b/lisp/progmodes/dcl-mode.el index 9aea53705cd..902848ef007 100644 --- a/lisp/progmodes/dcl-mode.el +++ b/lisp/progmodes/dcl-mode.el @@ -1,7 +1,6 @@ ;;; dcl-mode.el --- major mode for editing DCL command files -;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997, 2001-2011 Free Software Foundation, Inc. ;; Author: Odd Gripenstam <gripenstamol@decus.se> ;; Maintainer: Odd Gripenstam <gripenstamol@decus.se> diff --git a/lisp/progmodes/delphi.el b/lisp/progmodes/delphi.el index 77d88e5a812..c376b25fae0 100644 --- a/lisp/progmodes/delphi.el +++ b/lisp/progmodes/delphi.el @@ -1,7 +1,6 @@ ;;; delphi.el --- major mode for editing Delphi source (Object Pascal) in Emacs -;; Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-1999, 2001-2011 Free Software Foundation, Inc. ;; Authors: Ray Blaak <blaak@infomatch.com>, ;; Simon South <ssouth@member.fsf.org> @@ -2047,5 +2046,4 @@ no args, if that value is non-nil." (run-mode-hooks 'delphi-mode-hook)) -;; arch-tag: 410e192d-e9b5-4397-ad62-12340fc3fa41 ;;; delphi.el ends here diff --git a/lisp/progmodes/ebnf-abn.el b/lisp/progmodes/ebnf-abn.el index a8741a30cf2..b45a47f8a3f 100644 --- a/lisp/progmodes/ebnf-abn.el +++ b/lisp/progmodes/ebnf-abn.el @@ -1,7 +1,6 @@ ;;; ebnf-abn.el --- parser for ABNF (Augmented BNF) -;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2001-2011 Free Software Foundation, Inc. ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> @@ -664,5 +663,4 @@ See documentation for variable `ebnf-abn-lex'." (provide 'ebnf-abn) -;; arch-tag: 8d1b3c4d-4226-4393-b9ae-b7ccf07cf779 ;;; ebnf-abn.el ends here diff --git a/lisp/progmodes/ebnf-bnf.el b/lisp/progmodes/ebnf-bnf.el index 45f2fe727e8..cb8ebf8aab0 100644 --- a/lisp/progmodes/ebnf-bnf.el +++ b/lisp/progmodes/ebnf-bnf.el @@ -1,7 +1,6 @@ ;;; ebnf-bnf.el --- parser for EBNF -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> @@ -605,5 +604,4 @@ See documentation for variable `ebnf-bnf-lex'." (provide 'ebnf-bnf) -;; arch-tag: 3b1834d3-8367-475b-80d5-8e0bbd00ce50 ;;; ebnf-bnf.el ends here diff --git a/lisp/progmodes/ebnf-dtd.el b/lisp/progmodes/ebnf-dtd.el index 2ca38406d4f..204b6a91b0f 100644 --- a/lisp/progmodes/ebnf-dtd.el +++ b/lisp/progmodes/ebnf-dtd.el @@ -1,7 +1,6 @@ ;;; ebnf-dtd.el --- parser for DTD (Data Type Description for XML) -;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2001-2011 Free Software Foundation, Inc. ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> @@ -1350,5 +1349,4 @@ See documentation for variable `ebnf-dtd-lex'." (provide 'ebnf-dtd) -;; arch-tag: c21bb640-135f-4afa-8712-fa11d86301c4 ;;; ebnf-dtd.el ends here diff --git a/lisp/progmodes/ebnf-ebx.el b/lisp/progmodes/ebnf-ebx.el index dd94f9e638a..7d697e889b7 100644 --- a/lisp/progmodes/ebnf-ebx.el +++ b/lisp/progmodes/ebnf-ebx.el @@ -1,7 +1,6 @@ ;;; ebnf-ebx.el --- parser for EBNF used to specify XML (EBNFX) -;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2001-2011 Free Software Foundation, Inc. ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> @@ -669,5 +668,4 @@ See documentation for variable `ebnf-ebx-lex'." (provide 'ebnf-ebx) -;; arch-tag: bfe2f95b-66bc-4dc6-8b7e-b7831e68f5fb ;;; ebnf-ebx.el ends here diff --git a/lisp/progmodes/ebnf-iso.el b/lisp/progmodes/ebnf-iso.el index fa1592bb17f..d33167093a3 100644 --- a/lisp/progmodes/ebnf-iso.el +++ b/lisp/progmodes/ebnf-iso.el @@ -1,7 +1,6 @@ ;;; ebnf-iso.el --- parser for ISO EBNF -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> @@ -612,5 +611,4 @@ See documentation for variable `ebnf-iso-lex'." (provide 'ebnf-iso) -;; arch-tag: 03315eef-8f64-404a-bf9d-256d42442ee3 ;;; ebnf-iso.el ends here diff --git a/lisp/progmodes/ebnf-otz.el b/lisp/progmodes/ebnf-otz.el index b005d95a806..0392505972d 100644 --- a/lisp/progmodes/ebnf-otz.el +++ b/lisp/progmodes/ebnf-otz.el @@ -1,7 +1,6 @@ ;;; ebnf-otz.el --- syntactic chart OpTimiZer -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> @@ -697,5 +696,4 @@ (provide 'ebnf-otz) -;; arch-tag: 7ef2249d-9e8b-4bc1-999f-95d784690636 ;;; ebnf-otz.el ends here diff --git a/lisp/progmodes/ebnf-yac.el b/lisp/progmodes/ebnf-yac.el index a7f1851cffb..5ff239bfa21 100644 --- a/lisp/progmodes/ebnf-yac.el +++ b/lisp/progmodes/ebnf-yac.el @@ -1,7 +1,6 @@ ;;; ebnf-yac.el --- parser for Yacc/Bison -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> @@ -513,5 +512,4 @@ See documentation for variable `ebnf-yac-lex'." (provide 'ebnf-yac) -;; arch-tag: 8a96989c-0b1d-42ba-a020-b2901f9a2a4d ;;; ebnf-yac.el ends here diff --git a/lisp/progmodes/ebnf2ps.el b/lisp/progmodes/ebnf2ps.el index a4d1fe85c30..9f8dd79e0fc 100644 --- a/lisp/progmodes/ebnf2ps.el +++ b/lisp/progmodes/ebnf2ps.el @@ -1,7 +1,6 @@ ;;; ebnf2ps.el --- translate an EBNF to a syntactic chart on PostScript -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el index 6b7c70208ea..d674484345a 100644 --- a/lisp/progmodes/ebrowse.el +++ b/lisp/progmodes/ebrowse.el @@ -1,8 +1,6 @@ ;;; ebrowse.el --- Emacs C++ class browser & tags facility -;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -;; 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation Inc. +;; Copyright (C) 1992-2011 Free Software Foundation, Inc. ;; Author: Gerd Moellmann <gerd@gnu.org> ;; Maintainer: FSF diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index 885ad0796ba..d22d03fbe96 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -1,8 +1,7 @@ ;;; etags.el --- etags facility for Emacs -;; Copyright (C) 1985, 1986, 1988, 1989, 1992, 1993, 1994, 1995, 1996, -;; 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, -;; 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985-1986, 1988-1989, 1992-1996, 1998, 2000-2011 +;; Free Software Foundation, Inc. ;; Author: Roland McGrath <roland@gnu.org> ;; Maintainer: FSF diff --git a/lisp/progmodes/executable.el b/lisp/progmodes/executable.el index 1f27d33cdaa..9313df9f587 100644 --- a/lisp/progmodes/executable.el +++ b/lisp/progmodes/executable.el @@ -1,7 +1,6 @@ ;;; executable.el --- base functionality for executable interpreter scripts -*- byte-compile-dynamic: t -*- -;; Copyright (C) 1994, 1995, 1996, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994-1996, 2000-2011 Free Software Foundation, Inc. ;; Author: Daniel Pfeiffer <occitan@esperanto.org> ;; Keywords: languages, unix @@ -276,5 +275,4 @@ file modes." (provide 'executable) -;; arch-tag: 58458d1c-d9db-45ec-942b-8bbb1d5e319d ;;; executable.el ends here diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index 906ed4588c2..c46120bbd63 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el @@ -1,7 +1,6 @@ ;;; f90.el --- Fortran-90 mode (free format) -;; Copyright (C) 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995-1997, 2000-2011 Free Software Foundation, Inc. ;; Author: Torbj\"orn Einarsson <Torbjorn.Einarsson@era.ericsson.se> ;; Maintainer: Glenn Morris <rgm@gnu.org> @@ -2214,5 +2213,4 @@ escape character." (provide 'f90) -;; arch-tag: fceac97c-c147-44bd-aec0-172d4b560ef8 ;;; f90.el ends here diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index a90f380d1c3..4461ec27456 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -1,7 +1,6 @@ ;;; flymake.el -- a universal on-the-fly syntax checker -;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2003-2011 Free Software Foundation, Inc. ;; Author: Pavel Kobyakov <pk_at_work@yahoo.com> ;; Maintainer: Pavel Kobyakov <pk_at_work@yahoo.com> diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el index c8bbbf48343..67a214977b1 100644 --- a/lisp/progmodes/fortran.el +++ b/lisp/progmodes/fortran.el @@ -1,8 +1,6 @@ ;;; fortran.el --- Fortran mode for GNU Emacs -;; Copyright (C) 1986, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001, -;; 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1986, 1993-1995, 1997-2011 Free Software Foundation, Inc. ;; Author: Michael D. Prange <prange@erl.mit.edu> ;; Maintainer: Glenn Morris <rgm@gnu.org> diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index f3f7e617376..ce7de946b5e 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -1,6 +1,6 @@ ;;; gdb-mi.el --- User Interface for running GDB -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Nick Roberts <nickrob@gnu.org> ;; Maintainer: FSF diff --git a/lisp/progmodes/glasses.el b/lisp/progmodes/glasses.el index 95f76adc86e..a1dc19da1ed 100644 --- a/lisp/progmodes/glasses.el +++ b/lisp/progmodes/glasses.el @@ -1,7 +1,6 @@ ;;; glasses.el --- make cantReadThis readable -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Milan Zamazal <pdm@zamazal.org> ;; Maintainer: Milan Zamazal <pdm@zamazal.org> @@ -329,5 +328,4 @@ at places they belong to." (provide 'glasses) -;; arch-tag: a3515167-c89e-484f-90a1-d85143e52b12 ;;; glasses.el ends here diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 06ab8c389d4..4bab8a18dee 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -1,7 +1,6 @@ ;;; grep.el --- run Grep as inferior of Emacs, parse match messages -;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -;; 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 1985-1987, 1993-1999, 2001-2011 ;; Free Software Foundation, Inc. ;; Author: Roland McGrath <roland@gnu.org> @@ -342,7 +341,7 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies ;;;###autoload (defconst grep-regexp-alist - '(("^\\(.+?\\)\\(:[ \t]*\\)\\([0-9]+\\)\\2" + '(("^\\(.+?\\)\\(:[ \t]*\\)\\([1-9][0-9]*\\)\\2" 1 3) ;; Rule to match column numbers is commented out since no known grep ;; produces them @@ -385,7 +384,6 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies (defvar grep-mode-font-lock-keywords '(;; Command output lines. - ("^\\([A-Za-z_0-9/\.+-]+\\)[ \t]*:" 1 font-lock-function-name-face) (": \\(.+\\): \\(?:Permission denied\\|No such \\(?:file or directory\\|device or address\\)\\)$" 1 grep-error-face) ;; remove match from grep-regexp-alist before fontifying @@ -400,7 +398,8 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies (1 grep-error-face) (2 grep-error-face nil t)) ("^.+?-[0-9]+-.*\n" (0 grep-context-face)) - ;; Highlight grep matches and delete markers + ;; Highlight grep matches and delete markers. + ;; FIXME: Modifying the buffer text from font-lock is a bad idea! ("\\(\033\\[01;31m\\)\\(.*?\\)\\(\033\\[[0-9]*m\\)" ;; Refontification does not work after the markers have been ;; deleted. So we use the font-lock-face property here as Font @@ -410,12 +409,14 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies (progn ;; Delete markers with `replace-match' because it updates ;; the match-data, whereas `delete-region' would render it obsolete. + (syntax-ppss-flush-cache (match-beginning 0)) (replace-match "" t t nil 3) (replace-match "" t t nil 1)))) - ("\\(\033\\[[0-9;]*[mK]\\)" + ("\033\\[[0-9;]*[mK]" ;; Delete all remaining escape sequences ((lambda (bound)) - (replace-match "" t t nil 1)))) + (syntax-ppss-flush-cache (match-beginning 0)) + (replace-match "" t t)))) "Additional things to highlight in grep output. This gets tacked on the end of the generated expressions.") @@ -565,7 +566,10 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'." (unless grep-find-command (setq grep-find-command (cond ((eq grep-find-use-xargs 'gnu) - (format "%s . -type f -print0 | %s -0 -e %s" + ;; Windows shells need the program file name + ;; after the pipe symbol be quoted if they use + ;; forward slashes as directory separators. + (format "%s . -type f -print0 | \"%s\" -0 -e %s" find-program xargs-program grep-command)) ((eq grep-find-use-xargs 'exec) (let ((cmd0 (format "%s . -type f -exec %s" @@ -576,21 +580,21 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'." (shell-quote-argument ";")) (1+ (length cmd0))))) (t - (format "%s . -type f -print | %s %s" + (format "%s . -type f -print | \"%s\" %s" find-program xargs-program grep-command))))) (unless grep-find-template (setq grep-find-template (let ((gcmd (format "%s <C> %s <R>" grep-program grep-options))) (cond ((eq grep-find-use-xargs 'gnu) - (format "%s . <X> -type f <F> -print0 | %s -0 -e %s" + (format "%s . <X> -type f <F> -print0 | \"%s\" -0 -e %s" find-program xargs-program gcmd)) ((eq grep-find-use-xargs 'exec) (format "%s . <X> -type f <F> -exec %s {} %s %s" find-program gcmd null-device (shell-quote-argument ";"))) (t - (format "%s . <X> -type f <F> -print | %s %s" + (format "%s . <X> -type f <F> -print | \"%s\" %s" find-program xargs-program gcmd)))))))) (when (eq grep-highlight-matches 'auto-detect) (setq grep-highlight-matches @@ -1046,5 +1050,4 @@ file name to `*.gz', and sets `grep-highlight-matches' to `always'." (provide 'grep) -;; arch-tag: 5a5b9169-a79d-4f38-9c38-f69615f39c4d ;;; grep.el ends here diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index ef35b118be8..6e175da1414 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -1,7 +1,6 @@ ;;; gud.el --- Grand Unified Debugger mode for running GDB and other debuggers -;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1992-1996, 1998, 2000-2011 Free Software Foundation, Inc. ;; Author: Eric S. Raymond <esr@snark.thyrsus.com> ;; Maintainer: FSF @@ -3471,5 +3470,4 @@ so they have been disabled.")) (provide 'gud) -;; arch-tag: 6d990948-df65-461a-be39-1c7fb83ac4c4 ;;; gud.el ends here diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el index b21cd9c89ef..76a91c4b000 100644 --- a/lisp/progmodes/hideif.el +++ b/lisp/progmodes/hideif.el @@ -1,7 +1,6 @@ ;;; hideif.el --- hides selected code within ifdef -;; Copyright (C) 1988, 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1988, 1994, 2001-2011 Free Software Foundation, Inc. ;; Author: Brian Marick ;; Daniel LaLiberte <liberte@holonexus.org> diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index 48831509aa4..15a94d68735 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el @@ -1,7 +1,6 @@ ;;; hideshow.el --- minor mode cmds to selectively display code/comment blocks -;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994-2011 Free Software Foundation, Inc. ;; Author: Thien-Thi Nguyen <ttn@gnu.org> ;; Dan Nicolaescu <dann@ics.uci.edu> @@ -965,5 +964,4 @@ Key bindings: (provide 'hideshow) -;; arch-tag: 378b6852-e82a-466a-aee8-d9c73859a65e ;;; hideshow.el ends here diff --git a/lisp/progmodes/icon.el b/lisp/progmodes/icon.el index b1c8dc2b336..9a8b8064be7 100644 --- a/lisp/progmodes/icon.el +++ b/lisp/progmodes/icon.el @@ -1,7 +1,6 @@ ;;; icon.el --- mode for editing Icon code -;; Copyright (C) 1989, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1989, 2001-2011 Free Software Foundation, Inc. ;; Author: Chris Smith <csmith@convex.com> ;; Created: 15 Feb 89 diff --git a/lisp/progmodes/idlw-complete-structtag.el b/lisp/progmodes/idlw-complete-structtag.el index a2457eead0f..a967fc03e40 100644 --- a/lisp/progmodes/idlw-complete-structtag.el +++ b/lisp/progmodes/idlw-complete-structtag.el @@ -1,7 +1,6 @@ ;;; idlw-complete-structtag.el --- Completion of structure tags. -;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, -;; 2010 Free Software Foundation, Inc. +;; Copyright (C) 2001-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <dominik@astro.uva.nl> ;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu> diff --git a/lisp/progmodes/idlw-help.el b/lisp/progmodes/idlw-help.el index 0674ccf730a..1b32c7807c6 100644 --- a/lisp/progmodes/idlw-help.el +++ b/lisp/progmodes/idlw-help.el @@ -1,7 +1,6 @@ ;;; idlw-help.el --- HTML Help code for IDLWAVE -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; ;; Authors: J.D. Smith <jdsmith@as.arizona.edu> ;; Carsten Dominik <dominik@science.uva.nl> @@ -195,8 +194,7 @@ support." :type 'string) (defface idlwave-help-link - '((((class color)) (:foreground "Blue")) - (t (:weight bold))) + '((t :inherit link)) "Face for highlighting links into IDLWAVE online help." :group 'idlwave-online-help) diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el index 0cad8cce517..93a3bf1b7f5 100644 --- a/lisp/progmodes/idlw-shell.el +++ b/lisp/progmodes/idlw-shell.el @@ -1,7 +1,6 @@ ;; idlw-shell.el --- run IDL as an inferior process of Emacs. -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Authors: J.D. Smith <jdsmith@as.arizona.edu> ;; Carsten Dominik <dominik@astro.uva.nl> diff --git a/lisp/progmodes/idlw-toolbar.el b/lisp/progmodes/idlw-toolbar.el index e6137e46860..d4eddee9722 100644 --- a/lisp/progmodes/idlw-toolbar.el +++ b/lisp/progmodes/idlw-toolbar.el @@ -1,7 +1,6 @@ ;;; idlw-toolbar.el --- a debugging toolbar for IDLWAVE -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <dominik@astro.uva.nl> ;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu> @@ -969,5 +968,4 @@ static char * file[] = { (provide 'idlw-toolbar) (provide 'idlwave-toolbar) -;; arch-tag: ec9a3717-c44c-4716-9bda-cdacbe5ddb62 ;;; idlw-toolbar.el ends here diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index 4788cb30783..72b7914e21b 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el @@ -1,7 +1,6 @@ ;; idlwave.el --- IDL editing mode for GNU Emacs -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Authors: J.D. Smith <jdsmith@as.arizona.edu> ;; Carsten Dominik <dominik@science.uva.nl> diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el index 109bda80170..e4e56054f9d 100644 --- a/lisp/progmodes/inf-lisp.el +++ b/lisp/progmodes/inf-lisp.el @@ -1,7 +1,6 @@ ;;; inf-lisp.el --- an inferior-lisp mode -;; Copyright (C) 1988, 1993, 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1988, 1993-1994, 2001-2011 Free Software Foundation, Inc. ;; Author: Olin Shivers <shivers@cs.cmu.edu> ;; Keywords: processes, lisp @@ -653,5 +652,4 @@ See variable `lisp-describe-sym-command'." (provide 'inf-lisp) -;; arch-tag: 5b74abc3-a085-4b91-8ab8-8da6899d3b92 ;;; inf-lisp.el ends here diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index fdb11aa7d88..f495e35dc89 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -1,6 +1,6 @@ ;;; js.el --- Major mode for editing JavaScript -;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: Karl Landstrom <karl.landstrom@brgeight.se> ;; Daniel Colascione <dan.colascione@gmail.com> @@ -47,12 +47,9 @@ (require 'cc-mode) -(require 'font-lock) (require 'newcomment) +(require 'thingatpt) ; forward-symbol etc (require 'imenu) -(require 'etags) -(require 'thingatpt) -(require 'easymenu) (require 'moz nil t) (require 'json nil t) @@ -1662,12 +1659,11 @@ This performs fontification according to `js--class-styles'." ;; below. (eval-and-compile (defconst js--regexp-literal - "[=(,:]\\(?:\\s-\\|\n\\)*\\(/\\)\\(?:\\\\/\\|[^/*]\\)\\(?:\\\\/\\|[^/]\\)*\\(/\\)" + "[=(,:]\\(?:\\s-\\|\n\\)*\\(/\\)\\(?:\\\\.\\|[^/*\\]\\)\\(?:\\\\.\\|[^/\\]\\)*\\(/\\)" "Regexp matching a JavaScript regular expression literal. Match groups 1 and 2 are the characters forming the beginning and end of the literal.")) - (defconst js-syntax-propertize-function (syntax-propertize-rules ;; We want to match regular expressions only at the beginning of @@ -2171,12 +2167,15 @@ marker." (setf (car bounds) (point)))) (buffer-substring (car bounds) (cdr bounds))))) +(defvar find-tag-marker-ring) ; etags + (defun js-find-symbol (&optional arg) "Read a JavaScript symbol and jump to it. With a prefix argument, restrict symbols to those from the current buffer. Pushes a mark onto the tag ring just like `find-tag'." (interactive "P") + (require 'etags) (let (symbols marker) (if (not arg) (setq symbols (js--get-all-known-symbols)) diff --git a/lisp/progmodes/ld-script.el b/lisp/progmodes/ld-script.el index 318456e9534..8a8112c9655 100644 --- a/lisp/progmodes/ld-script.el +++ b/lisp/progmodes/ld-script.el @@ -1,7 +1,6 @@ ;;; ld-script.el --- GNU linker script editing mode for Emacs -;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, -;; 2010 Free Software Foundation, Inc. +;; Copyright (C) 2001-2011 Free Software Foundation, Inc. ;; Author: Masatake YAMATO<jet@gyve.org> ;; Keywords: languages, faces @@ -167,5 +166,4 @@ (provide 'ld-script) -;; arch-tag: 83280b6b-e6fc-4d00-a630-922d7aec5593 ;;; ld-script.el ends here diff --git a/lisp/progmodes/m4-mode.el b/lisp/progmodes/m4-mode.el index 39c46d69aea..98df1c69468 100644 --- a/lisp/progmodes/m4-mode.el +++ b/lisp/progmodes/m4-mode.el @@ -1,7 +1,6 @@ ;;; m4-mode.el --- m4 code editing commands for Emacs -;; Copyright (C) 1996, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1996-1997, 2001-2011 Free Software Foundation, Inc. ;; Author: Andrew Csillag <drew_csillag@geocities.com> ;; Maintainer: Andrew Csillag <drew_csillag@geocities.com> @@ -172,5 +171,4 @@ ;;; "m4_syscmd" "m4_sysval" "m4_traceoff" "m4_traceon" "m4_translit" ;;; "m4_m4_undefine" "m4_undivert")) -;; arch-tag: 87811d86-94c1-474b-9666-587f6da74af1 ;;; m4-mode.el ends here diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el index 187c838382b..fd9a576002a 100644 --- a/lisp/progmodes/make-mode.el +++ b/lisp/progmodes/make-mode.el @@ -1,7 +1,6 @@ ;;; make-mode.el --- makefile editing commands for Emacs -;; Copyright (C) 1992, 1994, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1992, 1994, 1999-2011 Free Software Foundation, Inc. ;; Author: Thomas Neumann <tom@smart.bo.open.de> ;; Eric S. Raymond <esr@snark.thyrsus.com> @@ -1839,5 +1838,4 @@ If it isn't in one, return nil." (provide 'make-mode) -;; arch-tag: bd23545a-de91-44fb-b1b2-feafbb2635a0 ;;; make-mode.el ends here diff --git a/lisp/progmodes/mantemp.el b/lisp/progmodes/mantemp.el index 94de2d88d84..c8963d2a6dd 100644 --- a/lisp/progmodes/mantemp.el +++ b/lisp/progmodes/mantemp.el @@ -1,7 +1,6 @@ ;;; mantemp.el --- create manual template instantiations from g++ 2.7.2 output -;; Copyright (C) 1996, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1996, 2001-2011 Free Software Foundation, Inc. ;; Author: Tom Houlder <thoulder@icor.fr> ;; Created: 10 Dec 1996 @@ -202,5 +201,4 @@ but operates on the region." (provide 'mantemp) -;; arch-tag: 49794712-3b1b-4baa-9785-39556cb52c94 ;;; mantemp.el ends here diff --git a/lisp/progmodes/meta-mode.el b/lisp/progmodes/meta-mode.el index 7e679f7fe31..b36104bf49b 100644 --- a/lisp/progmodes/meta-mode.el +++ b/lisp/progmodes/meta-mode.el @@ -1,7 +1,6 @@ ;;; meta-mode.el --- major mode for editing Metafont or MetaPost sources -;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997, 2001-2011 Free Software Foundation, Inc. ;; Author: Ulrik Vieth <vieth@thphy.uni-duesseldorf.de> ;; Version: 1.0 diff --git a/lisp/progmodes/mixal-mode.el b/lisp/progmodes/mixal-mode.el index bdf222376ff..bf5662cdfa3 100644 --- a/lisp/progmodes/mixal-mode.el +++ b/lisp/progmodes/mixal-mode.el @@ -1,7 +1,6 @@ ;;; mixal-mode.el --- Major mode for the mix asm language. -;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2003-2011 Free Software Foundation, Inc. ;; Author: Pieter E.J. Pareit <pieter.pareit@gmail.com> ;; Maintainer: Pieter E.J. Pareit <pieter.pareit@gmail.com> @@ -1120,5 +1119,4 @@ Assumes that file has been compiled with debugging support." (provide 'mixal-mode) -;; arch-tag: be7c128a-bf61-4951-a90e-9398267ce3f3 ;;; mixal-mode.el ends here diff --git a/lisp/progmodes/modula2.el b/lisp/progmodes/modula2.el index 2fc3bc59d88..f0b8f7cbca7 100644 --- a/lisp/progmodes/modula2.el +++ b/lisp/progmodes/modula2.el @@ -613,5 +613,4 @@ followed by the first character of the construct. (provide 'modula2) -;; arch-tag: a21df1cb-5ece-4709-9219-1e7cd2d85d90 ;;; modula2.el ends here diff --git a/lisp/progmodes/octave-inf.el b/lisp/progmodes/octave-inf.el index 1003ffd6460..e1d41c2ebd6 100644 --- a/lisp/progmodes/octave-inf.el +++ b/lisp/progmodes/octave-inf.el @@ -1,7 +1,6 @@ ;;; octave-inf.el --- running Octave as an inferior Emacs process -;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1997, 2001-2011 Free Software Foundation, Inc. ;; Author: Kurt Hornik <Kurt.Hornik@wu-wien.ac.at> ;; Author: John Eaton <jwe@bevo.che.wisc.edu> @@ -391,5 +390,4 @@ directory and makes this the current buffer's default directory." (provide 'octave-inf) -;; arch-tag: bdce0395-24d1-4bb4-bfba-6fb1eeb1a660 ;;; octave-inf.el ends here diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el index 3e6c2896752..7ec4cf3d947 100644 --- a/lisp/progmodes/octave-mod.el +++ b/lisp/progmodes/octave-mod.el @@ -1,7 +1,6 @@ ;;; octave-mod.el --- editing Octave source files under Emacs -;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997, 2001-2011 Free Software Foundation, Inc. ;; Author: Kurt Hornik <Kurt.Hornik@wu-wien.ac.at> ;; Author: John Eaton <jwe@octave.org> diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el index a93e97efed9..2a243a99ffc 100644 --- a/lisp/progmodes/pascal.el +++ b/lisp/progmodes/pascal.el @@ -1,8 +1,6 @@ ;;; pascal.el --- major mode for editing pascal source in Emacs -;; Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -;; 2002 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1993-2011 Free Software Foundation, Inc. ;; Author: Espen Skoglund <esk@gnu.org> ;; Keywords: languages diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index 63b77fca43a..9b446e49b5c 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -1,7 +1,6 @@ ;;; perl-mode.el --- Perl code editing commands for GNU Emacs -;; Copyright (C) 1990, 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990, 1994, 2001-2011 Free Software Foundation, Inc. ;; Author: William F. Mann ;; Maintainer: FSF @@ -360,7 +359,8 @@ The expansion is entirely correct because it uses the C preprocessor." (t ;; This is regexp like quote thingy. (setq char (char-after (nth 8 state))) - (let ((twoargs (save-excursion + (let ((startpos (point)) + (twoargs (save-excursion (goto-char (nth 8 state)) (skip-syntax-backward " ") (skip-syntax-backward "w") @@ -384,7 +384,8 @@ The expansion is entirely correct because it uses the C preprocessor." (goto-char (1+ (nth 8 state))) (up-list 1) t) - (scan-error nil)) + ;; In case of error, make sure we don't move backward. + (scan-error (goto-char startpos) nil)) (not (or (nth 8 (parse-partial-sexp (point) limit nil nil state 'syntax-table)) ;; If we have a self-paired opener and a twoargs diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 822e6d9b6f8..fd79cfd2399 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el @@ -1,10 +1,16 @@ -;;; prolog.el --- major mode for editing and running Prolog under Emacs +;;; prolog.el --- major mode for editing and running Prolog (and Mercury) code -;; Copyright (C) 1986, 1987, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1986-1987, 1997-1999, 2002-2003, 2011 +;; Free Software Foundation, Inc. -;; Author: Masanobu UMEDA <umerin@mse.kyutech.ac.jp> -;; Keywords: languages +;; Authors: Emil Åström <emil_astrom(at)hotmail(dot)com> +;; Milan Zamazal <pdm(at)freesoft(dot)cz> +;; Stefan Bruda <stefan(at)bruda(dot)ca> (current maintainer) +;; * See below for more details +;; Keywords: prolog major mode sicstus swi mercury + +(defvar prolog-mode-version "1.22" + "Prolog mode version number.") ;; This file is part of GNU Emacs. @@ -21,409 +27,4117 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. +;; Original author: Masanobu UMEDA <umerin(at)mse(dot)kyutech(dot)ac(dot)jp> +;; Parts of this file was taken from a modified version of the original +;; by Johan Andersson, Peter Olin, Mats Carlsson, Johan Bevemyr, Stefan +;; Andersson, and Per Danielsson (all SICS people), and Henrik Båkman +;; at Uppsala University, Sweden. +;; +;; Some ideas and also a few lines of code have been borrowed (not stolen ;-) +;; from Oz.el, the Emacs major mode for the Oz programming language, +;; Copyright (C) 1993 DFKI GmbH, Germany, with permission. +;; Authors: Ralf Scheidhauer and Michael Mehl ([scheidhr|mehl](at)dfki(dot)uni-sb(dot)de) +;; +;; More ideas and code have been taken from the SICStus debugger mode +;; (http://www.csd.uu.se/~perm/source_debug/index.shtml -- broken link +;; as of Mon May 5 08:23:48 EDT 2003) by Per Mildner. +;; +;; Additions for ECLiPSe and other helpful suggestions: Stephan Heuel +;; <heuel(at)ipb(dot)uni-bonn(dot)de> + ;;; Commentary: +;; +;; This package provides a major mode for editing Prolog code, with +;; all the bells and whistles one would expect, including syntax +;; highlighting and auto indentation. It can also send regions to an +;; inferior Prolog process. +;; +;; The code requires the comint, easymenu, info, imenu, and font-lock +;; libraries. These are normally distributed with GNU Emacs and +;; XEmacs. + +;;; Installation: +;; +;; Insert the following lines in your init file--typically ~/.emacs +;; (GNU Emacs and XEmacs <21.4), or ~/.xemacs/init.el (XEmacs +;; 21.4)--to use this mode when editing Prolog files under Emacs: +;; +;; (setq load-path (cons "/usr/lib/xemacs/site-lisp" load-path)) +;; (autoload 'run-prolog "prolog" "Start a Prolog sub-process." t) +;; (autoload 'prolog-mode "prolog" "Major mode for editing Prolog programs." t) +;; (autoload 'mercury-mode "prolog" "Major mode for editing Mercury programs." t) +;; (setq prolog-system 'swi) ; optional, the system you are using; +;; ; see `prolog-system' below for possible values +;; (setq auto-mode-alist (append '(("\\.pl$" . prolog-mode) +;; ("\\.m$" . mercury-mode)) +;; auto-mode-alist)) +;; +;; where the path in the first line is the file system path to this file. +;; MSDOS paths can be written like "d:/programs/emacs-19.34/site-lisp". +;; Note: In XEmacs, either `/usr/lib/xemacs/site-lisp' (RPM default in +;; Red Hat-based distributions) or `/usr/local/lib/xemacs/site-lisp' +;; (default when compiling from sources) are automatically added to +;; `load-path', so the first line is not necessary provided that you +;; put this file in the appropriate place. +;; +;; The last s-expression above makes sure that files ending with .pl +;; are assumed to be Prolog files and not Perl, which is the default +;; Emacs setting. If this is not wanted, remove this line. It is then +;; necessary to either +;; +;; o insert in your Prolog files the following comment as the first line: +;; +;; % -*- Mode: Prolog -*- +;; +;; and then the file will be open in Prolog mode no matter its +;; extension, or +;; +;; o manually switch to prolog mode after opening a Prolog file, by typing +;; M-x prolog-mode. +;; +;; If the command to start the prolog process ('sicstus', 'pl' or +;; 'swipl' for SWI prolog, etc.) is not available in the default path, +;; then it is necessary to set the value of the environment variable +;; EPROLOG to a shell command to invoke the prolog process. In XEmacs +;; and Emacs 20+ you can also customize the variable +;; `prolog-program-name' (in the group `prolog-inferior') and provide +;; a full path for your Prolog system (swi, scitus, etc.). +;; +;; Note: I (Stefan, the current maintainer) work under XEmacs. Future +;; developments will thus be biased towards XEmacs (OK, I admit it, +;; I am biased towards XEmacs in general), though I will do my best +;; to keep the GNU Emacs compatibility. So if you work under Emacs +;; and see something that does not work do drop me a line, as I have +;; a smaller chance to notice this kind of bugs otherwise. + +;; Changelog: -;; This package provides a major mode for editing Prolog. It knows -;; about Prolog syntax and comments, and can send regions to an inferior -;; Prolog interpreter process. Font locking is tuned towards GNU Prolog. +;; Version 1.22: +;; o Allowed both 'swipl' and 'pl' as names for the SWI Prolog +;; interpreter. +;; o Atoms that start a line are not blindly coloured as +;; predicates. Instead we check that they are followed by ( or +;; :- first. Patch suggested by Guy Wiener. +;; Version 1.21: +;; o Cleaned up the code that defines faces. The missing face +;; warnings on some Emacsen should disappear. +;; Version 1.20: +;; o Improved the handling of clause start detection and multi-line +;; comments: `prolog-clause-start' no longer finds non-predicate +;; (e.g., capitalized strings) beginning of clauses. +;; `prolog-tokenize' recognizes when the end point is within a +;; multi-line comment. +;; Version 1.19: +;; o Minimal changes for Aquamacs inclusion and in general for +;; better coping with finding the Prolog executable. Patch +;; provided by David Reitter +;; Version 1.18: +;; o Fixed syntax highlighting for clause heads that do not begin at +;; the beginning of the line. +;; o Fixed compilation warnings under Emacs. +;; o Updated the email address of the current maintainer. +;; Version 1.17: +;; o Minor indentation fix (patch by Markus Triska) +;; o `prolog-underscore-wordchar-flag' defaults now to nil (more +;; consistent to other Emacs modes) +;; Version 1.16: +;; o Eliminated a possible compilation warning. +;; Version 1.15: +;; o Introduced three new customizable variables: electric colon +;; (`prolog-electric-colon-flag', default nil), electric dash +;; (`prolog-electric-dash-flag', default nil), and a possibility +;; to prevent the predicate template insertion from adding commata +;; (`prolog-electric-dot-full-predicate-template', defaults to t +;; since it seems quicker to me to just type those commata). A +;; trivial adaptation of a patch by Markus Triska. +;; o Improved the behaviour of electric if-then-else to only skip +;; forward if the parenthesis/semicolon is preceded by +;; whitespace. Once more a trivial adaptation of a patch by +;; Markus Triska. +;; Version 1.14: +;; o Cleaned up align code. `prolog-align-flag' is eliminated (since +;; on a second thought it does not do anything useful). Added key +;; binding (C-c C-a) and menu entry for alignment. +;; o Condensed regular expressions for lower and upper case +;; characters (GNU Emacs seems to go over the regexp length limit +;; with the original form). My code on the matter was improved +;; considerably by Markus Triska. +;; o Fixed `prolog-insert-spaces-after-paren' (which used an +;; unitialized variable). +;; o Minor changes to clean up the code and avoid some implicit +;; package requirements. +;; Version 1.13: +;; o Removed the use of `map-char-table' in `prolog-build-case-strings' +;; which appears to cause prblems in (at least) Emacs 23.0.0.1. +;; o Added if-then-else indentation + corresponding electric +;; characters. New customization: `prolog-electric-if-then-else-flag' +;; o Align support (requires `align'). New customization: +;; `prolog-align-flag'. +;; o Temporary consult files have now the same name throughout the +;; session. This prevents issues with reconsulting a buffer +;; (this event is no longer passed to Prolog as a request to +;; consult a new file). +;; o Adaptive fill mode is now turned on. Comment indentation is +;; still worse than it could be though, I am working on it. +;; o Improved filling and auto-filling capabilities. Now block +;; comments should be [auto-]filled correctly most of the time; +;; the following pattern in particular is worth noting as being +;; filled correctly: +;; <some code here> % some comment here that goes beyond the +;; % rightmost column, possibly combined with +;; % subsequent comment lines +;; o `prolog-char-quote-workaround' now defaults to nil. +;; o Note: Many of the above improvements have been suggested by +;; Markus Triska, who also provided useful patches on the matter +;; when he realized that I was slow in responding. Many thanks. +;; Version 1.11 / 1.12 +;; o GNU Emacs compatibility fix for paragraph filling (fixed +;; incorrectly in 1.11, fix fixed in 1.12). +;; Version 1.10 +;; o Added paragraph filling in comment blocks and also correct auto +;; filling for comments. +;; o Fixed the possible "Regular expression too big" error in +;; `prolog-electric-dot'. +;; Version 1.9 +;; o Parenthesis expressions are now indented by default so that +;; components go one underneath the other, just as for compound +;; terms. You can use the old style (the second and subsequent +;; lines being indented to the right in a parenthesis expression) +;; by setting the customizable variable `prolog-paren-indent-p' +;; (group "Prolog Indentation") to t. +;; o (Somehow awkward) handling of the 0' character escape +;; sequence. I am looking into a better way of doing it but +;; prospects look bleak. If this breaks things for you please let +;; me know and also set the `prolog-char-quote-workaround' (group +;; "Prolog Other") to nil. +;; Version 1.8 +;; o Key binding fix. +;; Version 1.7 +;; o Fixed a number of issues with the syntax of single quotes, +;; including Debian bug #324520. +;; Version 1.6 +;; o Fixed mercury mode menu initialization (Debian bug #226121). +;; o Fixed (i.e., eliminated) Delete remapping (Debian bug #229636). +;; o Corrected indentation for clauses defining quoted atoms. +;; Version 1.5: +;; o Keywords fontifying should work in console mode so this is +;; enabled everywhere. +;; Version 1.4: +;; o Now supports GNU Prolog--minor adaptation of a patch by Stefan +;; Moeding. +;; Version 1.3: +;; o Info-follow-nearest-node now called correctly under Emacs too +;; (thanks to Nicolas Pelletier). Should be implemented more +;; elegantly (i.e., without compilation warnings) in the future. +;; Version 1.2: +;; o Another prompt fix, still in SWI mode (people seem to have +;; changed the prompt of SWI Prolog). +;; Version 1.1: +;; o Fixed dots in the end of line comments causing indentation +;; problems. The following code is now correctly indented (note +;; the dot terminating the comment): +;; a(X) :- b(X), +;; c(X). % comment here. +;; a(X). +;; and so is this (and variants): +;; a(X) :- b(X), +;; c(X). /* comment here. */ +;; a(X). +;; Version 1.0: +;; o Revamped the menu system. +;; o Yet another prompt recognition fix (SWI mode). +;; o This is more of a renumbering than a new edition. I promoted +;; the mode to version 1.0 to emphasize the fact that it is now +;; mature and stable enough to be considered production (in my +;; opinion anyway). +;; Version 0.1.41: +;; o GNU Emacs compatibility fixes. +;; Version 0.1.40: +;; o prolog-get-predspec is now suitable to be called as +;; imenu-extract-index-name-function. The predicate index works. +;; o Since imenu works now as advertised, prolog-imenu-flag is t +;; by default. +;; o Eliminated prolog-create-predicate-index since the imenu +;; utilities now work well. Actually, this function is also +;; buggy, and I see no reason to fix it since we do not need it +;; anyway. +;; o Fixed prolog-pred-start, prolog-clause-start, prolog-clause-info. +;; o Fix for prolog-build-case-strings; now prolog-upper-case-string +;; and prolog-lower-case-string are correctly initialized, +;; o Various font-lock changes; most importantly, block comments (/* +;; ... */) are now correctly fontified in XEmacs even when they +;; extend on multiple lines. +;; Version 0.1.36: +;; o The debug prompt of SWI Prolog is now correctly recognized. +;; Version 0.1.35: +;; o Minor font-lock bug fixes. +;;; TODO: + +;; Replace ":type 'sexp" with more precise Custom types. + ;;; Code: -(defvar comint-prompt-regexp) -(defvar comint-process-echoes) -(require 'smie) +(eval-when-compile + (require 'compile) + (require 'font-lock) + ;; We need imenu everywhere because of the predicate index! + (require 'imenu) + ;) + (require 'info) + (require 'shell) + ) + +(require 'comint) +(require 'easymenu) +(require 'align) + (defgroup prolog nil - "Major mode for editing and running Prolog under Emacs." - :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces) + "Major modes for editing and running Prolog and Mercury files." :group 'languages) +(defgroup prolog-faces nil + "Prolog mode specific faces." + :group 'font-lock) -(defcustom prolog-program-name - (let ((names '("prolog" "gprolog" "swipl"))) - (while (and names - (not (executable-find (car names)))) - (setq names (cdr names))) - (or (car names) "prolog")) - "Program name for invoking an inferior Prolog with `run-prolog'." - :type 'string +(defgroup prolog-indentation nil + "Prolog mode indentation configuration." :group 'prolog) -(defcustom prolog-consult-string "reconsult(user).\n" - "(Re)Consult mode (for C-Prolog and Quintus Prolog). " - :type 'string +(defgroup prolog-font-lock nil + "Prolog mode font locking patterns." :group 'prolog) -(defcustom prolog-compile-string "compile(user).\n" - "Compile mode (for Quintus Prolog)." - :type 'string +(defgroup prolog-keyboard nil + "Prolog mode keyboard flags." :group 'prolog) -(defcustom prolog-eof-string "end_of_file.\n" - "String that represents end of file for Prolog. -When nil, send actual operating system end of file." - :type 'string +(defgroup prolog-inferior nil + "Inferior Prolog mode options." :group 'prolog) -(defcustom prolog-indent-width 4 - "Level of indentation in Prolog buffers." - :type 'integer +(defgroup prolog-other nil + "Other Prolog mode options." + :group 'prolog) + + +;;------------------------------------------------------------------- +;; User configurable variables +;;------------------------------------------------------------------- + +;; General configuration + +(defcustom prolog-system nil + "*Prolog interpreter/compiler used. +The value of this variable is nil or a symbol. +If it is a symbol, it determines default values of other configuration +variables with respect to properties of the specified Prolog +interpreter/compiler. + +Currently recognized symbol values are: +eclipse - Eclipse Prolog +mercury - Mercury +sicstus - SICStus Prolog +swi - SWI Prolog +gnu - GNU Prolog" + :group 'prolog + :type '(choice (const :tag "SICStus" :value sicstus) + (const :tag "SWI Prolog" :value swi) + (const :tag "GNU Prolog" :value gnu) + (const :tag "ECLiPSe Prolog" :value eclipse) + ;; Mercury shouldn't be needed since we have a separate + ;; major mode for it. + (const :tag "Default" :value nil))) +(make-variable-buffer-local 'prolog-system) + +;; NB: This alist can not be processed in prolog-mode-variables to +;; create a prolog-system-version-i variable since it is needed +;; prior to the call to prolog-mode-variables. +(defcustom prolog-system-version + '((sicstus (3 . 6)) + (swi (0 . 0)) + (mercury (0 . 0)) + (eclipse (3 . 7)) + (gnu (0 . 0))) + ;; FIXME: This should be auto-detected instead of user-provided. + "*Alist of Prolog system versions. +The version numbers are of the format (Major . Minor)." :group 'prolog) -(defvar prolog-font-lock-keywords - '(("\\(#[<=]=>\\|:-\\)\\|\\(#=\\)\\|\\(#[#<>\\/][=\\/]*\\|!\\)" - 0 font-lock-keyword-face) - ("\\<\\(is\\|write\\|nl\\|read_\\sw+\\)\\>" - 1 font-lock-keyword-face) - ("^\\(\\sw+\\)\\s-*\\((\\(.+\\))\\)*" - (1 font-lock-function-name-face) - (3 font-lock-variable-name-face))) - "Font-lock keywords for Prolog mode.") +;; Indentation + +(defcustom prolog-indent-width 4 + "*The indentation width used by the editing buffer." + :group 'prolog-indentation + :type 'integer) + +(defcustom prolog-align-comments-flag t + "*Non-nil means automatically align comments when indenting." + :group 'prolog-indentation + :type 'boolean) + +(defcustom prolog-indent-mline-comments-flag t + "*Non-nil means indent contents of /* */ comments. +Otherwise leave such lines as they are." + :group 'prolog-indentation + :type 'boolean) + +(defcustom prolog-object-end-to-0-flag t + "*Non-nil means indent closing '}' in SICStus object definitions to level 0. +Otherwise indent to `prolog-indent-width'." + :group 'prolog-indentation + :type 'boolean) + +(defcustom prolog-left-indent-regexp "\\(;\\|\\*?->\\)" + "*Regexp for character sequences after which next line is indented. +Next line after such a regexp is indented to the opening paranthesis level." + :group 'prolog-indentation + :type 'regexp) + +(defcustom prolog-paren-indent-p nil + "*If non-nil, increase indentation for parenthesis expressions. +The second and subsequent line in a parenthesis expression other than +a compound term can either be indented `prolog-paren-indent' to the +right (if this variable is non-nil) or in the same way as for compound +terms (if this variable is nil, default)." + :group 'prolog-indentation + :type 'boolean) + +(defcustom prolog-paren-indent 4 + "*The indentation increase for parenthesis expressions. +Only used in ( If -> Then ; Else) and ( Disj1 ; Disj2 ) style expressions." + :group 'prolog-indentation + :type 'integer) + +(defcustom prolog-parse-mode 'beg-of-clause + "*The parse mode used (decides from which point parsing is done). +Legal values: +'beg-of-line - starts parsing at the beginning of a line, unless the + previous line ends with a backslash. Fast, but has + problems detecting multiline /* */ comments. +'beg-of-clause - starts parsing at the beginning of the current clause. + Slow, but copes better with /* */ comments." + :group 'prolog-indentation + :type '(choice (const :value beg-of-line) + (const :value beg-of-clause))) + +;; Font locking + +(defcustom prolog-keywords + '((eclipse + ("use_module" "begin_module" "module_interface" "dynamic" + "external" "export" "dbgcomp" "nodbgcomp" "compile")) + (mercury + ("all" "else" "end_module" "equality" "external" "fail" "func" "if" + "implementation" "import_module" "include_module" "inst" "instance" + "interface" "mode" "module" "not" "pragma" "pred" "some" "then" "true" + "type" "typeclass" "use_module" "where")) + (sicstus + ("block" "dynamic" "mode" "module" "multifile" "meta_predicate" + "parallel" "public" "sequential" "volatile")) + (swi + ("discontiguous" "dynamic" "ensure_loaded" "export" "export_list" "import" + "meta_predicate" "module" "module_transparent" "multifile" "require" + "use_module" "volatile")) + (gnu + ("built_in" "char_conversion" "discontiguous" "dynamic" "ensure_linked" + "ensure_loaded" "foreign" "include" "initialization" "multifile" "op" + "public" "set_prolog_flag")) + (t + ;; FIXME: Shouldn't we just use the union of all the above here? + ("dynamic" "module"))) + "*Alist of Prolog keywords which is used for font locking of directives." + :group 'prolog-font-lock + :type 'sexp) + +(defcustom prolog-types + '((mercury + ("char" "float" "int" "io__state" "string" "univ")) + (t nil)) + "*Alist of Prolog types used by font locking." + :group 'prolog-font-lock + :type 'sexp) + +(defcustom prolog-mode-specificators + '((mercury + ("bound" "di" "free" "ground" "in" "mdi" "mui" "muo" "out" "ui" "uo")) + (t nil)) + "*Alist of Prolog mode specificators used by font locking." + :group 'prolog-font-lock + :type 'sexp) + +(defcustom prolog-determinism-specificators + '((mercury + ("cc_multi" "cc_nondet" "det" "erroneous" "failure" "multi" "nondet" + "semidet")) + (t nil)) + "*Alist of Prolog determinism specificators used by font locking." + :group 'prolog-font-lock + :type 'sexp) + +(defcustom prolog-directives + '((mercury + ("^#[0-9]+")) + (t nil)) + "*Alist of Prolog source code directives used by font locking." + :group 'prolog-font-lock + :type 'sexp) + + +;; Keyboard + +(defcustom prolog-electric-newline-flag (not (fboundp 'electric-indent-mode)) + "*Non-nil means automatically indent the next line when the user types RET." + :group 'prolog-keyboard + :type 'boolean) + +(defcustom prolog-hungry-delete-key-flag nil + "*Non-nil means delete key consumes all preceding spaces." + :group 'prolog-keyboard + :type 'boolean) + +(defcustom prolog-electric-dot-flag nil + "*Non-nil means make dot key electric. +Electric dot appends newline or inserts head of a new clause. +If dot is pressed at the end of a line where at least one white space +precedes the point, it inserts a recursive call to the current predicate. +If dot is pressed at the beginning of an empty line, it inserts the head +of a new clause for the current predicate. It does not apply in strings +and comments. +It does not apply in strings and comments." + :group 'prolog-keyboard + :type 'boolean) + +(defcustom prolog-electric-dot-full-predicate-template nil + "*If nil, electric dot inserts only the current predicate's name and `(' +for recursive calls or new clause heads. Non-nil means to also +insert enough commata to cover the predicate's arity and `)', +and dot and newline for recursive calls." + :group 'prolog-keyboard + :type 'boolean) + +(defcustom prolog-electric-underscore-flag nil + "*Non-nil means make underscore key electric. +Electric underscore replaces the current variable with underscore. +If underscore is pressed not on a variable then it behaves as usual." + :group 'prolog-keyboard + :type 'boolean) + +(defcustom prolog-electric-tab-flag nil + "*Non-nil means make TAB key electric. +Electric TAB inserts spaces after parentheses, ->, and ; +in ( If -> Then ; Else) and ( Disj1 ; Disj2 ) style expressions." + :group 'prolog-keyboard + :type 'boolean) + +(defcustom prolog-electric-if-then-else-flag nil + "*Non-nil makes `(', `>' and `;' electric +to automatically indent if-then-else constructs." + :group 'prolog-keyboard + :type 'boolean) + +(defcustom prolog-electric-colon-flag nil + "*Makes `:' electric (inserts `:-' on a new line). +If non-nil, pressing `:' at the end of a line that starts in +the first column (i.e., clause heads) inserts ` :-' and newline." + :group 'prolog-keyboard + :type 'boolean) + +(defcustom prolog-electric-dash-flag nil + "*Makes `-' electric (inserts a `-->' on a new line). +If non-nil, pressing `-' at the end of a line that starts in +the first column (i.e., DCG heads) inserts ` -->' and newline." + :group 'prolog-keyboard + :type 'boolean) + +(defcustom prolog-old-sicstus-keys-flag nil + "*Non-nil means old SICStus Prolog mode keybindings are used." + :group 'prolog-keyboard + :type 'boolean) + +;; Inferior mode + +(defcustom prolog-program-name + `(((getenv "EPROLOG") (eval (getenv "EPROLOG"))) + (eclipse "eclipse") + (mercury nil) + (sicstus "sicstus") + (swi ,(if (not (executable-find "swipl")) "pl" "swipl")) + (gnu "gprolog") + (t ,(let ((names '("prolog" "gprolog" "swipl" "pl"))) + (while (and names + (not (executable-find (car names)))) + (setq names (cdr names))) + (or (car names) "prolog")))) + "*Alist of program names for invoking an inferior Prolog with `run-prolog'." + :group 'prolog-inferior + :type 'sexp) +(defun prolog-program-name () + (prolog-find-value-by-system prolog-program-name)) + +(defcustom prolog-program-switches + '((sicstus ("-i")) + (t nil)) + "*Alist of switches given to inferior Prolog run with `run-prolog'." + :group 'prolog-inferior + :type 'sexp) +(defun prolog-program-switches () + (prolog-find-value-by-system prolog-program-switches)) + +(defcustom prolog-consult-string + '((eclipse "[%f].") + (mercury nil) + (sicstus (eval (if (prolog-atleast-version '(3 . 7)) + "prolog:zap_file(%m,%b,consult,%l)." + "prolog:zap_file(%m,%b,consult)."))) + (swi "[%f].") + (gnu "[%f].") + (t "reconsult(%f).")) + "*Alist of strings defining predicate for reconsulting. + +Some parts of the string are replaced: +`%f' by the name of the consulted file (can be a temporary file) +`%b' by the file name of the buffer to consult +`%m' by the module name and name of the consulted file separated by colon +`%l' by the line offset into the file. This is 0 unless consulting a + region of a buffer, in which case it is the number of lines before + the region." + :group 'prolog-inferior + :type 'sexp) +(defun prolog-consult-string () + (prolog-find-value-by-system prolog-consult-string)) + +(defcustom prolog-compile-string + '((eclipse "[%f].") + (mercury "mmake ") + (sicstus (eval (if (prolog-atleast-version '(3 . 7)) + "prolog:zap_file(%m,%b,compile,%l)." + "prolog:zap_file(%m,%b,compile)."))) + (swi "[%f].") + (t "compile(%f).")) + "*Alist of strings and lists defining predicate for recompilation. + +Some parts of the string are replaced: +`%f' by the name of the compiled file (can be a temporary file) +`%b' by the file name of the buffer to compile +`%m' by the module name and name of the compiled file separated by colon +`%l' by the line offset into the file. This is 0 unless compiling a + region of a buffer, in which case it is the number of lines before + the region. + +If `prolog-program-name' is non-nil, it is a string sent to a Prolog process. +If `prolog-program-name' is nil, it is an argument to the `compile' function." + :group 'prolog-inferior + :type 'sexp) +(defun prolog-compile-string () + (prolog-find-value-by-system prolog-compile-string)) + +(defcustom prolog-eof-string "end_of_file.\n" + "*Alist of strings that represent end of file for prolog. +nil means send actual operating system end of file." + :group 'prolog-inferior + :type 'sexp) + +(defcustom prolog-prompt-regexp + '((eclipse "^[a-zA-Z0-9()]* *\\?- \\|^\\[[a-zA-Z]* [0-9]*\\]:") + (sicstus "| [ ?][- ] *") + (swi "^\\(\\[[a-zA-Z]*\\] \\)?[1-9]?[0-9]*[ ]?\\?- \\|^| +") + (gnu "^| \\?-") + (t "^|? *\\?-")) + "*Alist of prompts of the prolog system command line." + :group 'prolog-inferior + :type 'sexp) +(defun prolog-prompt-regexp () + (prolog-find-value-by-system prolog-prompt-regexp)) + +;; (defcustom prolog-continued-prompt-regexp +;; '((sicstus "^\\(| +\\| +\\)") +;; (t "^|: +")) +;; "*Alist of regexps matching the prompt when consulting `user'." +;; :group 'prolog-inferior +;; :type 'sexp) + +(defcustom prolog-debug-on-string "debug.\n" + "*Predicate for enabling debug mode." + :group 'prolog-inferior + :type 'string) + +(defcustom prolog-debug-off-string "nodebug.\n" + "*Predicate for disabling debug mode." + :group 'prolog-inferior + :type 'string) + +(defcustom prolog-trace-on-string "trace.\n" + "*Predicate for enabling tracing." + :group 'prolog-inferior + :type 'string) + +(defcustom prolog-trace-off-string "notrace.\n" + "*Predicate for disabling tracing." + :group 'prolog-inferior + :type 'string) + +(defcustom prolog-zip-on-string "zip.\n" + "*Predicate for enabling zip mode for SICStus." + :group 'prolog-inferior + :type 'string) + +(defcustom prolog-zip-off-string "nozip.\n" + "*Predicate for disabling zip mode for SICStus." + :group 'prolog-inferior + :type 'string) + +(defcustom prolog-use-standard-consult-compile-method-flag t + "*Non-nil means use the standard compilation method. +Otherwise the new compilation method will be used. This +utilises a special compilation buffer with the associated +features such as parsing of error messages and automatically +jumping to the source code responsible for the error. + +Warning: the new method is so far only experimental and +does contain bugs. The recommended setting for the novice user +is non-nil for this variable." + :group 'prolog-inferior + :type 'boolean) + + +;; Miscellaneous + +(defcustom prolog-use-prolog-tokenizer-flag + (not (fboundp 'syntax-propertize-rules)) + "*Non-nil means use the internal prolog tokenizer for indentation etc. +Otherwise use `parse-partial-sexp' which is faster but sometimes incorrect." + :group 'prolog-other + :type 'boolean) + +(defcustom prolog-imenu-flag t + "*Non-nil means add a clause index menu for all prolog files." + :group 'prolog-other + :type 'boolean) + +(defcustom prolog-imenu-max-lines 3000 + "*The maximum number of lines of the file for imenu to be enabled. +Relevant only when `prolog-imenu-flag' is non-nil." + :group 'prolog-other + :type 'integer) + +(defcustom prolog-info-predicate-index + "(sicstus)Predicate Index" + "*The info node for the SICStus predicate index." + :group 'prolog-other + :type 'string) + +(defcustom prolog-underscore-wordchar-flag nil + "*Non-nil means underscore (_) is a word-constituent character." + :group 'prolog-other + :type 'boolean) + +(defcustom prolog-use-sicstus-sd nil + "*If non-nil, use the source level debugger of SICStus 3#7 and later." + :group 'prolog-other + :type 'boolean) + +(defcustom prolog-char-quote-workaround nil + "*If non-nil, declare 0 as a quote character to handle 0'<char>. +This is really kludgy, and unneeded (i.e. obsolete) in Emacs>=24." + :group 'prolog-other + :type 'boolean) + + +;;------------------------------------------------------------------- +;; Internal variables +;;------------------------------------------------------------------- + +;;(defvar prolog-temp-filename "") ; Later set by `prolog-temporary-file' (defvar prolog-mode-syntax-table + ;; The syntax accepted varies depending on the implementation used. + ;; Here are some of the differences: + ;; - SWI-Prolog accepts nested /*..*/ comments. + ;; - Edinburgh-style Prologs take <radix>'<number> for non-decimal number, + ;; whereas ISO-style Prologs use 0[obx]<number> instead. + ;; - In atoms \x<hex> sometimes needs a terminating \ (ISO-style) + ;; and sometimes not. (let ((table (make-syntax-table))) - (modify-syntax-entry ?_ "w" table) - (modify-syntax-entry ?\\ "\\" table) - (modify-syntax-entry ?/ ". 14" table) - (modify-syntax-entry ?* ". 23" table) + (if prolog-underscore-wordchar-flag + (modify-syntax-entry ?_ "w" table) + (modify-syntax-entry ?_ "_" table)) + (modify-syntax-entry ?+ "." table) (modify-syntax-entry ?- "." table) (modify-syntax-entry ?= "." table) - (modify-syntax-entry ?% "<" table) - (modify-syntax-entry ?\n ">" table) (modify-syntax-entry ?< "." table) (modify-syntax-entry ?> "." table) + (modify-syntax-entry ?| "." table) (modify-syntax-entry ?\' "\"" table) - table)) + ;; Any better way to handle the 0'<char> construct?!? + (when prolog-char-quote-workaround + (modify-syntax-entry ?0 "\\" table)) + + (modify-syntax-entry ?% "<" table) + (modify-syntax-entry ?\n ">" table) + (if (featurep 'xemacs) + (progn + (modify-syntax-entry ?* ". 67" table) + (modify-syntax-entry ?/ ". 58" table) + ) + ;; Emacs wants to see this it seems: + (modify-syntax-entry ?* ". 23b" table) + (modify-syntax-entry ?/ ". 14" table) + ) + table)) (defvar prolog-mode-abbrev-table nil) +(defvar prolog-upper-case-string "" + "A string containing all upper case characters. +Set by prolog-build-case-strings.") +(defvar prolog-lower-case-string "" + "A string containing all lower case characters. +Set by prolog-build-case-strings.") + +(defvar prolog-atom-char-regexp "" + "Set by prolog-set-atom-regexps.") +;; "Regexp specifying characters which constitute atoms without quoting.") +(defvar prolog-atom-regexp "" + "Set by prolog-set-atom-regexps.") + +(defconst prolog-left-paren "[[({]" ;FIXME: Why not \\s(? + "The characters used as left parentheses for the indentation code.") +(defconst prolog-right-paren "[])}]" ;FIXME: Why not \\s)? + "The characters used as right parentheses for the indentation code.") + +(defconst prolog-quoted-atom-regexp + "\\(^\\|[^0-9]\\)\\('\\([^\n']\\|\\\\'\\)*'\\)" + "Regexp matching a quoted atom.") +(defconst prolog-string-regexp + "\\(\"\\([^\n\"]\\|\\\\\"\\)*\"\\)" + "Regexp matching a string.") +(defconst prolog-head-delimiter "\\(:-\\|\\+:\\|-:\\|\\+\\?\\|-\\?\\|-->\\)" + "A regexp for matching on the end delimiter of a head (e.g. \":-\").") + +(defvar prolog-compilation-buffer "*prolog-compilation*" + "Name of the output buffer for Prolog compilation/consulting.") + +(defvar prolog-temporary-file-name nil) +(defvar prolog-keywords-i nil) +(defvar prolog-types-i nil) +(defvar prolog-mode-specificators-i nil) +(defvar prolog-determinism-specificators-i nil) +(defvar prolog-directives-i nil) +(defvar prolog-eof-string-i nil) +;; (defvar prolog-continued-prompt-regexp-i nil) +(defvar prolog-help-function-i nil) + +(defvar prolog-align-rules + (eval-when-compile + (mapcar + (lambda (x) + (let ((name (car x)) + (sym (cdr x))) + `(,(intern (format "prolog-%s" name)) + (regexp . ,(format "\\(\\s-*\\)%s\\(\\s-*\\)" sym)) + (tab-stop . nil) + (modes . '(prolog-mode)) + (group . (1 2))))) + '(("dcg" . "-->") ("rule" . ":-") ("simplification" . "<=>") + ("propagation" . "==>"))))) + + + +;;------------------------------------------------------------------- +;; Prolog mode +;;------------------------------------------------------------------- + +;; Example: (prolog-atleast-version '(3 . 6)) +(defun prolog-atleast-version (version) + "Return t if the version of the current prolog system is VERSION or later. +VERSION is of the format (Major . Minor)" + ;; Version.major < major or + ;; Version.major = major and Version.minor <= minor + (let* ((thisversion (prolog-find-value-by-system prolog-system-version)) + (thismajor (car thisversion)) + (thisminor (cdr thisversion))) + (or (< (car version) thismajor) + (and (= (car version) thismajor) + (<= (cdr version) thisminor))) + )) + (define-abbrev-table 'prolog-mode-abbrev-table ()) -(defun prolog-smie-forward-token () - (forward-comment (point-max)) - (buffer-substring-no-properties - (point) - (progn (cond - ((looking-at "[!;]") (forward-char 1)) - ((not (zerop (skip-chars-forward "#&*+-./:<=>?@\\^`~")))) - ((not (zerop (skip-syntax-forward "w_'")))) - ;; In case of non-ASCII punctuation. - ((not (zerop (skip-syntax-forward "."))))) - (point)))) - -(defun prolog-smie-backward-token () - (forward-comment (- (point-max))) - (buffer-substring-no-properties - (point) - (progn (cond - ((memq (char-before) '(?! ?\;)) (forward-char -1)) - ((not (zerop (skip-chars-backward "#&*+-./:<=>?@\\^`~")))) - ((not (zerop (skip-syntax-backward "w_'")))) - ;; In case of non-ASCII punctuation. - ((not (zerop (skip-syntax-backward "."))))) - (point)))) - -(defconst prolog-smie-grammar - ;; Rather than construct the operator levels table from the BNF, - ;; we directly provide the operator precedences from GNU Prolog's - ;; manual (7.14.10 op/3). The only problem is that GNU Prolog's - ;; manual uses precedence levels in the opposite sense (higher - ;; numbers bind less tightly) than SMIE, so we use negative numbers. - '(("." -10000 -10000) - (":-" -1200 -1200) - ("-->" -1200 -1200) - (";" -1100 -1100) - ("->" -1050 -1050) - ("," -1000 -1000) - ("\\+" -900 -900) - ("=" -700 -700) - ("\\=" -700 -700) - ("=.." -700 -700) - ("==" -700 -700) - ("\\==" -700 -700) - ("@<" -700 -700) - ("@=<" -700 -700) - ("@>" -700 -700) - ("@>=" -700 -700) - ("is" -700 -700) - ("=:=" -700 -700) - ("=\\=" -700 -700) - ("<" -700 -700) - ("=<" -700 -700) - (">" -700 -700) - (">=" -700 -700) - (":" -600 -600) - ("+" -500 -500) - ("-" -500 -500) - ("/\\" -500 -500) - ("\\/" -500 -500) - ("*" -400 -400) - ("/" -400 -400) - ("//" -400 -400) - ("rem" -400 -400) - ("mod" -400 -400) - ("<<" -400 -400) - (">>" -400 -400) - ("**" -200 -200) - ("^" -200 -200) - ;; Prefix - ;; ("+" 200 200) - ;; ("-" 200 200) - ;; ("\\" 200 200) - ) - "Precedence levels of infix operators.") - -(defun prolog-smie-rules (kind token) - (pcase (cons kind token) - (`(:elem . basic) prolog-indent-width) - (`(:after . ".") 0) ;; To work around smie-closer-alist. - (`(:after . ,(or `":-" `"->")) prolog-indent-width))) +(defun prolog-find-value-by-system (alist) + "Get value from ALIST according to `prolog-system'." + (let ((system (or prolog-system + (buffer-local-value 'prolog-system + (prolog-inferior-buffer 'dont-run))))) + (if (listp alist) + (let (result + id) + (while alist + (setq id (car (car alist))) + (if (or (eq id system) + (eq id t) + (and (listp id) + (eval id))) + (progn + (setq result (car (cdr (car alist)))) + (if (and (listp result) + (eq (car result) 'eval)) + (setq result (eval (car (cdr result))))) + (setq alist nil)) + (setq alist (cdr alist)))) + result) + alist))) + +(defconst prolog-syntax-propertize-function + (when (fboundp 'syntax-propertize-rules) + (syntax-propertize-rules + ;; GNU Prolog only accepts 0'\' rather than 0'', but the only + ;; possible meaning of 0'' is rather clear. + ("\\<0\\(''?\\)" + (1 (unless (save-excursion (nth 8 (syntax-ppss (match-beginning 0)))) + (string-to-syntax "_")))) + ;; We could check that we're not inside an atom, but I don't think + ;; that 'foo 8'z could be a valid syntax anyway, so why bother? + ("\\<[1-9][0-9]*\\('\\)[0-9a-zA-Z]" (1 "_")) + ;; Supposedly, ISO-Prolog wants \NNN\ for octal and \xNNN\ for hexadecimal + ;; escape sequences in atoms, so be careful not to let the terminating \ + ;; escape a subsequent quote. + ("\\\\[x0-7][0-9a-fA-F]*\\(\\\\\\)" (1 "_")) + ))) (defun prolog-mode-variables () - (set (make-local-variable 'paragraph-separate) (concat "%%\\|$\\|" page-delimiter)) ;'%%..' + "Set some common variables to Prolog code specific values." + (setq local-abbrev-table prolog-mode-abbrev-table) + (set (make-local-variable 'paragraph-start) + (concat "[ \t]*$\\|" page-delimiter)) ;'%%..' + (set (make-local-variable 'paragraph-separate) paragraph-start) (set (make-local-variable 'paragraph-ignore-fill-prefix) t) - (set (make-local-variable 'imenu-generic-expression) '((nil "^\\sw+" 0))) - - ;; Setup SMIE. - (smie-setup prolog-smie-grammar #'prolog-smie-rules - :forward-token #'prolog-smie-forward-token - :backward-token #'prolog-smie-backward-token) - (set (make-local-variable 'smie-blink-matching-triggers) '(?.)) - (set (make-local-variable 'smie-closer-alist) '((t . "."))) - (add-hook 'post-self-insert-hook #'smie-blink-matching-open 'append 'local) - ;; There's no real closer in Prolog anyway. - (set (make-local-variable 'smie-blink-matching-inners) t) - + (set (make-local-variable 'normal-auto-fill-function) 'prolog-do-auto-fill) + (set (make-local-variable 'indent-line-function) 'prolog-indent-line) (set (make-local-variable 'comment-start) "%") - (set (make-local-variable 'comment-start-skip) "\\(?:%+\\|/\\*+\\)[ \t]*") - (set (make-local-variable 'comment-end-skip) "[ \t]*\\(\n\\|\\*+/\\)") - (set (make-local-variable 'comment-column) 48)) + (set (make-local-variable 'comment-end) "") + (set (make-local-variable 'comment-add) 1) + (set (make-local-variable 'comment-start-skip) + ;; This complex regexp makes sure that comments cannot start + ;; inside quoted atoms or strings + (format "^\\(\\(%s\\|%s\\|[^\n\'\"%%]\\)*\\)\\(/\\*+ *\\|%%+ *\\)" + prolog-quoted-atom-regexp prolog-string-regexp)) + (set (make-local-variable 'comment-indent-function) 'prolog-comment-indent) + (set (make-local-variable 'parens-require-spaces) nil) + ;; Initialize Prolog system specific variables + (dolist (var '(prolog-keywords prolog-types prolog-mode-specificators + prolog-determinism-specificators prolog-directives + prolog-eof-string + ;; prolog-continued-prompt-regexp + prolog-help-function)) + (set (intern (concat (symbol-name var) "-i")) + (prolog-find-value-by-system (symbol-value var)))) + (when (null (prolog-program-name)) + (set (make-local-variable 'compile-command) (prolog-compile-string))) + (set (make-local-variable 'font-lock-defaults) + '(prolog-font-lock-keywords nil nil ((?_ . "w")))) + (set (make-local-variable 'syntax-propertize-function) + prolog-syntax-propertize-function) + ) + +(defun prolog-mode-keybindings-common (map) + "Define keybindings common to both Prolog modes in MAP." + (define-key map "\C-c?" 'prolog-help-on-predicate) + (define-key map "\C-c/" 'prolog-help-apropos) + (define-key map "\C-c\C-d" 'prolog-debug-on) + (define-key map "\C-c\C-t" 'prolog-trace-on) + (define-key map "\C-c\C-z" 'prolog-zip-on) + (define-key map "\C-c\r" 'run-prolog)) + +(defun prolog-mode-keybindings-edit (map) + "Define keybindings for Prolog mode in MAP." + (define-key map "\M-a" 'prolog-beginning-of-clause) + (define-key map "\M-e" 'prolog-end-of-clause) + (define-key map "\M-q" 'prolog-fill-paragraph) + (define-key map "\C-c\C-a" 'align) + (define-key map "\C-\M-a" 'prolog-beginning-of-predicate) + (define-key map "\C-\M-e" 'prolog-end-of-predicate) + (define-key map "\M-\C-c" 'prolog-mark-clause) + (define-key map "\M-\C-h" 'prolog-mark-predicate) + (define-key map "\M-\C-n" 'prolog-forward-list) + (define-key map "\M-\C-p" 'prolog-backward-list) + (define-key map "\C-c\C-n" 'prolog-insert-predicate-template) + (define-key map "\C-c\C-s" 'prolog-insert-predspec) + (define-key map "\M-\r" 'prolog-insert-next-clause) + (define-key map "\C-c\C-va" 'prolog-variables-to-anonymous) + (define-key map "\C-c\C-v\C-s" 'prolog-view-predspec) + + (define-key map [Backspace] 'prolog-electric-delete) + (define-key map "." 'prolog-electric-dot) + (define-key map "_" 'prolog-electric-underscore) + (define-key map "(" 'prolog-electric-if-then-else) + (define-key map ";" 'prolog-electric-if-then-else) + (define-key map ">" 'prolog-electric-if-then-else) + (define-key map ":" 'prolog-electric-colon) + (define-key map "-" 'prolog-electric-dash) + (if prolog-electric-newline-flag + (define-key map "\r" 'newline-and-indent)) + + ;; If we're running SICStus, then map C-c C-c e/d to enabling + ;; and disabling of the source-level debugging facilities. + ;(if (and (eq prolog-system 'sicstus) + ; (prolog-atleast-version '(3 . 7))) + ; (progn + ; (define-key map "\C-c\C-ce" 'prolog-enable-sicstus-sd) + ; (define-key map "\C-c\C-cd" 'prolog-disable-sicstus-sd) + ; )) + + (if prolog-old-sicstus-keys-flag + (progn + (define-key map "\C-c\C-c" 'prolog-consult-predicate) + (define-key map "\C-cc" 'prolog-consult-region) + (define-key map "\C-cC" 'prolog-consult-buffer) + (define-key map "\C-c\C-k" 'prolog-compile-predicate) + (define-key map "\C-ck" 'prolog-compile-region) + (define-key map "\C-cK" 'prolog-compile-buffer)) + (define-key map "\C-c\C-p" 'prolog-consult-predicate) + (define-key map "\C-c\C-r" 'prolog-consult-region) + (define-key map "\C-c\C-b" 'prolog-consult-buffer) + (define-key map "\C-c\C-f" 'prolog-consult-file) + (define-key map "\C-c\C-cp" 'prolog-compile-predicate) + (define-key map "\C-c\C-cr" 'prolog-compile-region) + (define-key map "\C-c\C-cb" 'prolog-compile-buffer) + (define-key map "\C-c\C-cf" 'prolog-compile-file)) + + ;; Inherited from the old prolog.el. + (define-key map "\e\C-x" 'prolog-consult-region) + (define-key map "\C-c\C-l" 'prolog-consult-file) + (define-key map "\C-c\C-z" 'switch-to-prolog)) + +(defun prolog-mode-keybindings-inferior (map) + "Define keybindings for inferior Prolog mode in MAP." + ;; No inferior mode specific keybindings now. + ) (defvar prolog-mode-map (let ((map (make-sparse-keymap))) - (define-key map "\e\C-x" 'prolog-consult-region) - (define-key map "\C-c\C-l" 'inferior-prolog-load-file) - (define-key map "\C-c\C-z" 'switch-to-prolog) + (prolog-mode-keybindings-common map) + (prolog-mode-keybindings-edit map) map)) -(easy-menu-define prolog-mode-menu prolog-mode-map "Menu for Prolog mode." - ;; Mostly copied from scheme-mode's menu. - ;; Not tremendously useful, but it's a start. - '("Prolog" - ["Indent line" indent-according-to-mode t] - ["Indent region" indent-region t] - ["Comment region" comment-region t] - ["Uncomment region" uncomment-region t] - "--" - ["Run interactive Prolog session" run-prolog t] - )) +(defvar prolog-mode-hook nil + "List of functions to call after the prolog mode has initialised.") + +(unless (fboundp 'prog-mode) + (defalias 'prog-mode 'fundamental-mode)) ;;;###autoload (define-derived-mode prolog-mode prog-mode "Prolog" - "Major mode for editing Prolog code for Prologs. -Blank lines and `%%...' separate paragraphs. `%'s start comments. + "Major mode for editing Prolog code. + +Blank lines and `%%...' separate paragraphs. `%'s starts a comment +line and comments can also be enclosed in /* ... */. + +If an optional argument SYSTEM is non-nil, set up mode for the given system. + +To find out what version of Prolog mode you are running, enter +`\\[prolog-mode-version]'. + Commands: \\{prolog-mode-map} Entry to this mode calls the value of `prolog-mode-hook' if that value is non-nil." + (setq mode-name (concat "Prolog" + (cond + ((eq prolog-system 'eclipse) "[ECLiPSe]") + ((eq prolog-system 'sicstus) "[SICStus]") + ((eq prolog-system 'swi) "[SWI]") + ((eq prolog-system 'gnu) "[GNU]") + (t "")))) (prolog-mode-variables) - (set (make-local-variable 'comment-add) 1) - (setq font-lock-defaults '(prolog-font-lock-keywords - nil nil nil - beginning-of-line))) - -(defun end-of-prolog-clause () - "Go to end of clause in this line." - (beginning-of-line 1) - (let* ((eolpos (line-end-position))) - (if (re-search-forward comment-start-skip eolpos 'move) - (goto-char (match-beginning 0))) - (skip-chars-backward " \t"))) + (prolog-build-case-strings) + (prolog-set-atom-regexps) + (dolist (ar prolog-align-rules) (add-to-list 'align-rules-list ar)) + + ;; imenu entry moved to the appropriate hook for consistency + + ;; Load SICStus debugger if suitable + (if (and (eq prolog-system 'sicstus) + (prolog-atleast-version '(3 . 7)) + prolog-use-sicstus-sd) + (prolog-enable-sicstus-sd)) + + (prolog-menu)) + +(defvar mercury-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map prolog-mode-map) + map)) + +;;;###autoload +(define-derived-mode mercury-mode prolog-mode "Prolog[Mercury]" + "Major mode for editing Mercury programs. +Actually this is just customized `prolog-mode'." + (set (make-local-variable 'prolog-system) 'mercury)) + -;;; -;;; Inferior prolog mode -;;; -(defvar inferior-prolog-mode-map +;;------------------------------------------------------------------- +;; Inferior prolog mode +;;------------------------------------------------------------------- + +(defvar prolog-inferior-mode-map (let ((map (make-sparse-keymap))) - ;; This map will inherit from `comint-mode-map' when entering - ;; inferior-prolog-mode. + (prolog-mode-keybindings-common map) + (prolog-mode-keybindings-inferior map) (define-key map [remap self-insert-command] - 'inferior-prolog-self-insert-command) + 'prolog-inferior-self-insert-command) map)) -(defvar inferior-prolog-mode-syntax-table prolog-mode-syntax-table) -(defvar inferior-prolog-mode-abbrev-table prolog-mode-abbrev-table) +(defvar prolog-inferior-mode-hook nil + "List of functions to call after the inferior prolog mode has initialised.") -(defvar inferior-prolog-error-regexp-alist - ;; GNU Prolog used to not follow the GNU standard format. - '(("^\\(.*?\\):\\([0-9]+\\) error: .*(char:\\([0-9]+\\)" 1 2 3) +(defvar prolog-inferior-error-regexp-alist + '(;; GNU Prolog used to not follow the GNU standard format. + ;; ("^\\(.*?\\):\\([0-9]+\\) error: .*(char:\\([0-9]+\\)" 1 2 3) + ;; SWI-Prolog. + ("^\\(?:\\?- *\\)?\\(\\(?:ERROR\\|\\(W\\)arning\\): *\\(.*?\\):\\([1-9][0-9]*\\):\\(?:\\([0-9]*\\):\\)?\\)\\(?:$\\| \\)" + 3 4 5 (2 . nil) 1) + ;; GNU-Prolog now uses the GNU standard format. gnu)) -(declare-function comint-mode "comint") -(declare-function comint-send-string "comint" (process string)) -(declare-function comint-send-region "comint" (process start end)) -(declare-function comint-send-eof "comint" ()) -(defvar compilation-error-regexp-alist) +(defun prolog-inferior-self-insert-command () + "Insert the char in the buffer or pass it directly to the process." + (interactive) + (let* ((proc (get-buffer-process (current-buffer))) + (pmark (and proc (marker-position (process-mark proc))))) + ;; FIXME: the same treatment would be needed for SWI-Prolog, but I can't + ;; seem to find any way for Emacs to figure out when to use it because + ;; SWI doesn't include a " ? " or some such recognizable marker. + (if (and (eq prolog-system 'gnu) + pmark + (null current-prefix-arg) + (eobp) + (eq (point) pmark) + (save-excursion + (goto-char (- pmark 3)) + ;; FIXME: check this comes from the process's output, maybe? + (looking-at " \\? "))) + ;; This is GNU prolog waiting to know whether you want more answers + ;; or not (or abort, etc...). The answer is a single char, not + ;; a line, so pass this char directly rather than wait for RET to + ;; send a whole line. + (comint-send-string proc (string last-command-event)) + (call-interactively 'self-insert-command)))) + -(define-derived-mode inferior-prolog-mode comint-mode "Inferior Prolog" +(define-derived-mode prolog-inferior-mode comint-mode "Inferior Prolog" "Major mode for interacting with an inferior Prolog process. The following commands are available: -\\{inferior-prolog-mode-map} +\\{prolog-inferior-mode-map} Entry to this mode calls the value of `prolog-mode-hook' with no arguments, if that value is non-nil. Likewise with the value of `comint-mode-hook'. `prolog-mode-hook' is called after `comint-mode-hook'. -You can send text to the inferior Prolog from other buffers using the commands -`process-send-region', `process-send-string' and \\[prolog-consult-region]. +You can send text to the inferior Prolog from other buffers +using the commands `send-region', `send-string' and \\[prolog-consult-region]. Commands: Tab indents for Prolog; with argument, shifts rest of expression rigidly with the current line. -Paragraphs are separated only by blank lines and '%%'. -'%'s start comments. +Paragraphs are separated only by blank lines and '%%'. '%'s start comments. Return at end of buffer sends line as input. Return not at end copies rest of line to end and sends it. -\\[comint-kill-input] and \\[backward-kill-word] are kill commands, imitating normal Unix input editing. +\\[comint-delchar-or-maybe-eof] sends end-of-file as input. +\\[comint-kill-input] and \\[backward-kill-word] are kill commands, +imitating normal Unix input editing. \\[comint-interrupt-subjob] interrupts the shell or its current subjob if any. -\\[comint-stop-subjob] stops. \\[comint-quit-subjob] sends quit signal." - (setq comint-prompt-regexp "^| [ ?][- ] *") +\\[comint-stop-subjob] stops, likewise. +\\[comint-quit-subjob] sends quit signal, likewise. + +To find out what version of Prolog mode you are running, enter +`\\[prolog-mode-version]'." + (setq comint-input-filter 'prolog-input-filter) + (setq mode-line-process '(": %s")) + (prolog-mode-variables) + (setq comint-prompt-regexp (prolog-prompt-regexp)) + (set (make-local-variable 'shell-dirstack-query) "pwd.") (set (make-local-variable 'compilation-error-regexp-alist) - inferior-prolog-error-regexp-alist) + prolog-inferior-error-regexp-alist) (compilation-shell-minor-mode) - (prolog-mode-variables)) - -(defvar inferior-prolog-buffer nil) - -(defvar inferior-prolog-flavor 'unknown - "Either a symbol or a buffer position offset by one. -If a buffer position, the flavor has not been determined yet and -it is expected that the process's output has been or will -be inserted at that position plus one.") - -(defun inferior-prolog-run (&optional name) - (with-current-buffer (make-comint "prolog" (or name prolog-program-name)) - (inferior-prolog-mode) - (setq-default inferior-prolog-buffer (current-buffer)) - (make-local-variable 'inferior-prolog-buffer) - (when (and name (not (equal name prolog-program-name))) - (set (make-local-variable 'prolog-program-name) name)) - (set (make-local-variable 'inferior-prolog-flavor) - ;; Force re-detection. - (let* ((proc (get-buffer-process (current-buffer))) - (pmark (and proc (marker-position (process-mark proc))))) - (cond - ((null pmark) (1- (point-min))) - ;; The use of insert-before-markers in comint.el together with - ;; the potential use of comint-truncate-buffer in the output - ;; filter, means that it's difficult to reliably keep track of - ;; the buffer position where the process's output started. - ;; If possible we use a marker at "start - 1", so that - ;; insert-before-marker at `start' won't shift it. And if not, - ;; we fall back on using a plain integer. - ((> pmark (point-min)) (copy-marker (1- pmark))) - (t (1- pmark))))) - (add-hook 'comint-output-filter-functions - 'inferior-prolog-guess-flavor nil t))) - -(defun inferior-prolog-process (&optional dontstart) - (or (and (buffer-live-p inferior-prolog-buffer) - (get-buffer-process inferior-prolog-buffer)) - (unless dontstart - (inferior-prolog-run) - ;; Try again. - (inferior-prolog-process)))) - -(defun inferior-prolog-guess-flavor (&optional ignored) - (save-excursion - (goto-char (1+ inferior-prolog-flavor)) - (setq inferior-prolog-flavor - (cond - ((looking-at "GNU Prolog") 'gnu) - ((looking-at "Welcome to SWI-Prolog") 'swi) - ((looking-at ".*\n") 'unknown) ;There's at least one line. - (t inferior-prolog-flavor)))) - (when (symbolp inferior-prolog-flavor) - (remove-hook 'comint-output-filter-functions - 'inferior-prolog-guess-flavor t) - (if (eq inferior-prolog-flavor 'gnu) - (set (make-local-variable 'comint-process-echoes) t)))) + (prolog-inferior-menu)) + +(defun prolog-input-filter (str) + (cond ((string-match "\\`\\s *\\'" str) nil) ;whitespace + ((not (derived-mode-p 'prolog-inferior-mode)) t) + ((= (length str) 1) nil) ;one character + ((string-match "\\`[rf] *[0-9]*\\'" str) nil) ;r(edo) or f(ail) + (t t))) ;;;###autoload -(defalias 'run-prolog 'switch-to-prolog) -;;;###autoload -(defun switch-to-prolog (&optional name) +(defun run-prolog (arg) "Run an inferior Prolog process, input and output via buffer *prolog*. -With prefix argument \\[universal-prefix], prompt for the program to use." - (interactive - (list (when current-prefix-arg - (let ((proc (inferior-prolog-process 'dontstart))) - (if proc - (if (yes-or-no-p "Kill current process before starting new one? ") - (kill-process proc) - (error "Abort"))) - (read-string "Run Prolog: " prolog-program-name))))) - (unless (inferior-prolog-process 'dontstart) - (inferior-prolog-run name)) - (pop-to-buffer inferior-prolog-buffer)) - -(defun inferior-prolog-self-insert-command () - "Insert the char in the buffer or pass it directly to the process." +With prefix argument ARG, restart the Prolog process if running before." + (interactive "P") + ;; FIXME: It should be possible to interactively specify the command to use + ;; to run prolog. + (if (and arg (get-process "prolog")) + (progn + (process-send-string "prolog" "halt.\n") + (while (get-process "prolog") (sit-for 0.1)))) + (let ((buff (buffer-name))) + (if (not (string= buff "*prolog*")) + (prolog-goto-prolog-process-buffer)) + ;; Load SICStus debugger if suitable + (if (and (eq prolog-system 'sicstus) + (prolog-atleast-version '(3 . 7)) + prolog-use-sicstus-sd) + (prolog-enable-sicstus-sd)) + (prolog-mode-variables) + (prolog-ensure-process) + )) + +(defun prolog-inferior-guess-flavor (&optional ignored) + (setq prolog-system + (when (or (numberp prolog-system) (markerp prolog-system)) + (save-excursion + (goto-char (1+ prolog-system)) + (cond + ((looking-at "GNU Prolog") 'gnu) + ((looking-at "Welcome to SWI-Prolog\\|%.*\\<swi_") 'swi) + ((looking-at ".*\n") nil) ;There's at least one line. + (t prolog-system))))) + (when (symbolp prolog-system) + (remove-hook 'comint-output-filter-functions + 'prolog-inferior-guess-flavor t) + (when prolog-system + (setq comint-prompt-regexp (prolog-prompt-regexp)) + (if (eq prolog-system 'gnu) + (set (make-local-variable 'comint-process-echoes) t))))) + +(defun prolog-ensure-process (&optional wait) + "If Prolog process is not running, run it. +If the optional argument WAIT is non-nil, wait for Prolog prompt specified by +the variable `prolog-prompt-regexp'." + (if (null (prolog-program-name)) + (error "This Prolog system has defined no interpreter.")) + (if (comint-check-proc "*prolog*") + () + (with-current-buffer (get-buffer-create "*prolog*") + (prolog-inferior-mode) + (apply 'make-comint-in-buffer "prolog" (current-buffer) + (prolog-program-name) nil (prolog-program-switches)) + (unless prolog-system + ;; Setup auto-detection. + (set (make-local-variable 'prolog-system) + ;; Force re-detection. + (let* ((proc (get-buffer-process (current-buffer))) + (pmark (and proc (marker-position (process-mark proc))))) + (cond + ((null pmark) (1- (point-min))) + ;; The use of insert-before-markers in comint.el together with + ;; the potential use of comint-truncate-buffer in the output + ;; filter, means that it's difficult to reliably keep track of + ;; the buffer position where the process's output started. + ;; If possible we use a marker at "start - 1", so that + ;; insert-before-marker at `start' won't shift it. And if not, + ;; we fall back on using a plain integer. + ((> pmark (point-min)) (copy-marker (1- pmark))) + (t (1- pmark))))) + (add-hook 'comint-output-filter-functions + 'prolog-inferior-guess-flavor nil t)) + (if wait + (progn + (goto-char (point-max)) + (while + (save-excursion + (not + (re-search-backward + (concat "\\(" (prolog-prompt-regexp) "\\)" "\\=") + nil t))) + (sit-for 0.1))))))) + +(defun prolog-inferior-buffer (&optional dont-run) + (or (get-buffer "*prolog*") + (unless dont-run + (prolog-ensure-process) + (get-buffer "*prolog*")))) + +(defun prolog-process-insert-string (process string) + "Insert STRING into inferior Prolog buffer running PROCESS." + ;; Copied from elisp manual, greek to me + (with-current-buffer (process-buffer process) + ;; FIXME: Use window-point-insertion-type instead. + (let ((moving (= (point) (process-mark process)))) + (save-excursion + ;; Insert the text, moving the process-marker. + (goto-char (process-mark process)) + (insert string) + (set-marker (process-mark process) (point))) + (if moving (goto-char (process-mark process)))))) + +;;------------------------------------------------------------ +;; Old consulting and compiling functions +;;------------------------------------------------------------ + +(defun prolog-old-process-region (compilep start end) + "Process the region limited by START and END positions. +If COMPILEP is non-nil then use compilation, otherwise consulting." + (prolog-ensure-process) + ;(let ((tmpfile prolog-temp-filename) + (let ((tmpfile (prolog-temporary-file)) + ;(process (get-process "prolog")) + (first-line (1+ (count-lines + (point-min) + (save-excursion + (goto-char start) + (point)))))) + (write-region start end tmpfile) + (setq start (copy-marker start)) + (with-current-buffer (prolog-inferior-buffer) + (compilation-forget-errors) + (compilation-fake-loc start tmpfile)) + (process-send-string + "prolog" (prolog-build-prolog-command + compilep tmpfile (prolog-bsts buffer-file-name) + first-line)) + (prolog-goto-prolog-process-buffer))) + +(defun prolog-old-process-predicate (compilep) + "Process the predicate around point. +If COMPILEP is non-nil then use compilation, otherwise consulting." + (prolog-old-process-region + compilep (prolog-pred-start) (prolog-pred-end))) + +(defun prolog-old-process-buffer (compilep) + "Process the entire buffer. +If COMPILEP is non-nil then use compilation, otherwise consulting." + (prolog-old-process-region compilep (point-min) (point-max))) + +(defun prolog-old-process-file (compilep) + "Process the file of the current buffer. +If COMPILEP is non-nil then use compilation, otherwise consulting." + (save-some-buffers) + (prolog-ensure-process) + (with-current-buffer (prolog-inferior-buffer) + (compilation-forget-errors)) + (process-send-string + "prolog" (prolog-build-prolog-command + compilep buffer-file-name + (prolog-bsts buffer-file-name))) + (prolog-goto-prolog-process-buffer)) + + +;;------------------------------------------------------------ +;; Consulting and compiling +;;------------------------------------------------------------ + +;; Interactive interface functions, used by both the standard +;; and the experimental consultation and compilation functions +(defun prolog-consult-file () + "Consult file of current buffer." (interactive) - (let* ((proc (get-buffer-process (current-buffer))) - (pmark (and proc (marker-position (process-mark proc))))) - (if (and (eq inferior-prolog-flavor 'gnu) - pmark - (null current-prefix-arg) - (eobp) - (eq (point) pmark) + (if prolog-use-standard-consult-compile-method-flag + (prolog-old-process-file nil) + (prolog-consult-compile-file nil))) + +(defun prolog-consult-buffer () + "Consult buffer." + (interactive) + (if prolog-use-standard-consult-compile-method-flag + (prolog-old-process-buffer nil) + (prolog-consult-compile-buffer nil))) + +(defun prolog-consult-region (beg end) + "Consult region between BEG and END." + (interactive "r") + (if prolog-use-standard-consult-compile-method-flag + (prolog-old-process-region nil beg end) + (prolog-consult-compile-region nil beg end))) + +(defun prolog-consult-predicate () + "Consult the predicate around current point." + (interactive) + (if prolog-use-standard-consult-compile-method-flag + (prolog-old-process-predicate nil) + (prolog-consult-compile-predicate nil))) + +(defun prolog-compile-file () + "Compile file of current buffer." + (interactive) + (if prolog-use-standard-consult-compile-method-flag + (prolog-old-process-file t) + (prolog-consult-compile-file t))) + +(defun prolog-compile-buffer () + "Compile buffer." + (interactive) + (if prolog-use-standard-consult-compile-method-flag + (prolog-old-process-buffer t) + (prolog-consult-compile-buffer t))) + +(defun prolog-compile-region (beg end) + "Compile region between BEG and END." + (interactive "r") + (if prolog-use-standard-consult-compile-method-flag + (prolog-old-process-region t beg end) + (prolog-consult-compile-region t beg end))) + +(defun prolog-compile-predicate () + "Compile the predicate around current point." + (interactive) + (if prolog-use-standard-consult-compile-method-flag + (prolog-old-process-predicate t) + (prolog-consult-compile-predicate t))) + +(defun prolog-buffer-module () + "Select Prolog module name appropriate for current buffer. +Bases decision on buffer contents (-*- line)." + ;; Look for -*- ... module: MODULENAME; ... -*- + (let (beg end) + (save-excursion + (goto-char (point-min)) + (skip-chars-forward " \t") + (and (search-forward "-*-" (line-end-position) t) + (progn + (skip-chars-forward " \t") + (setq beg (point)) + (search-forward "-*-" (line-end-position) t)) + (progn + (forward-char -3) + (skip-chars-backward " \t") + (setq end (point)) + (goto-char beg) + (and (let ((case-fold-search t)) + (search-forward "module:" end t)) + (progn + (skip-chars-forward " \t") + (setq beg (point)) + (if (search-forward ";" end t) + (forward-char -1) + (goto-char end)) + (skip-chars-backward " \t") + (buffer-substring beg (point))))))))) + +(defun prolog-build-prolog-command (compilep file buffername + &optional first-line) + "Make Prolog command for FILE compilation/consulting. +If COMPILEP is non-nil, consider compilation, otherwise consulting." + (let* ((compile-string + ;; FIXME: If the process is not running yet, the auto-detection of + ;; prolog-system won't help here, so we should make sure + ;; we first run Prolog and then build the command. + (if compilep (prolog-compile-string) (prolog-consult-string))) + (module (prolog-buffer-module)) + (file-name (concat "'" (prolog-bsts file) "'")) + (module-name (if module (concat "'" module "'"))) + (module-file (if module + (concat module-name ":" file-name) + file-name)) + strbeg strend + (lineoffset (if first-line + (- first-line 1) + 0))) + + ;; Assure that there is a buffer name + (if (not buffername) + (error "The buffer is not saved")) + + (if (not (string-match "\\`'.*'\\'" buffername)) ; Add quotes + (setq buffername (concat "'" buffername "'"))) + (while (string-match "%m" compile-string) + (setq strbeg (substring compile-string 0 (match-beginning 0))) + (setq strend (substring compile-string (match-end 0))) + (setq compile-string (concat strbeg module-file strend))) + ;; FIXME: The code below will %-expand any %[fbl] that appears in + ;; module-file. + (while (string-match "%f" compile-string) + (setq strbeg (substring compile-string 0 (match-beginning 0))) + (setq strend (substring compile-string (match-end 0))) + (setq compile-string (concat strbeg file-name strend))) + (while (string-match "%b" compile-string) + (setq strbeg (substring compile-string 0 (match-beginning 0))) + (setq strend (substring compile-string (match-end 0))) + (setq compile-string (concat strbeg buffername strend))) + (while (string-match "%l" compile-string) + (setq strbeg (substring compile-string 0 (match-beginning 0))) + (setq strend (substring compile-string (match-end 0))) + (setq compile-string (concat strbeg (format "%d" lineoffset) strend))) + (concat compile-string "\n"))) + +;; The rest of this page is experimental code! + +;; Global variables for process filter function +(defvar prolog-process-flag nil + "Non-nil means that a prolog task (i.e. a consultation or compilation job) +is running.") +(defvar prolog-consult-compile-output "" + "Hold the unprocessed output from the current prolog task.") +(defvar prolog-consult-compile-first-line 1 + "The number of the first line of the file to consult/compile. +Used for temporary files.") +(defvar prolog-consult-compile-file nil + "The file to compile/consult (can be a temporary file).") +(defvar prolog-consult-compile-real-file nil + "The file name of the buffer to compile/consult.") + +(defun prolog-consult-compile (compilep file &optional first-line) + "Consult/compile FILE. +If COMPILEP is non-nil, perform compilation, otherwise perform CONSULTING. +COMMAND is a string described by the variables `prolog-consult-string' +and `prolog-compile-string'. +Optional argument FIRST-LINE is the number of the first line in the compiled +region. + +This function must be called from the source code buffer." + (if prolog-process-flag + (error "Another Prolog task is running.")) + (prolog-ensure-process t) + (let* ((buffer (get-buffer-create prolog-compilation-buffer)) + (real-file buffer-file-name) + (command-string (prolog-build-prolog-command compilep file + real-file first-line)) + (process (get-process "prolog")) + (old-filter (process-filter process))) + (with-current-buffer buffer + (delete-region (point-min) (point-max)) + ;; FIXME: Wasn't this supposed to use prolog-inferior-mode? + (compilation-mode) + ;; FIXME: This doesn't seem to cooperate well with new(ish) compile.el. + ;; Setting up font-locking for this buffer + (set (make-local-variable 'font-lock-defaults) + '(prolog-font-lock-keywords nil nil ((?_ . "w")))) + (if (eq prolog-system 'sicstus) + ;; FIXME: This looks really problematic: not only is this using + ;; the old compilation-parse-errors-function, but + ;; prolog-parse-sicstus-compilation-errors only accepts one argument + ;; whereas compile.el calls it with 2 (and did so at least since + ;; Emacs-20). + (set (make-local-variable 'compilation-parse-errors-function) + 'prolog-parse-sicstus-compilation-errors)) + (toggle-read-only 0) + (insert command-string "\n")) + (save-selected-window + (pop-to-buffer buffer)) + (setq prolog-process-flag t + prolog-consult-compile-output "" + prolog-consult-compile-first-line (if first-line (1- first-line) 0) + prolog-consult-compile-file file + prolog-consult-compile-real-file (if (string= + file buffer-file-name) + nil + real-file)) + (with-current-buffer buffer + (goto-char (point-max)) + (set-process-filter process 'prolog-consult-compile-filter) + (process-send-string "prolog" command-string) + ;; (prolog-build-prolog-command compilep file real-file first-line)) + (while (and prolog-process-flag + (accept-process-output process 10)) ; 10 secs is ok? + (sit-for 0.1) + (unless (get-process "prolog") + (setq prolog-process-flag nil))) + (insert (if compilep + "\nCompilation finished.\n" + "\nConsulted.\n")) + (set-process-filter process old-filter)))) + +(defun prolog-parse-sicstus-compilation-errors (limit) + "Parse the prolog compilation buffer for errors. +Argument LIMIT is a buffer position limiting searching. +For use with the `compilation-parse-errors-function' variable." + (setq compilation-error-list nil) + (message "Parsing SICStus error messages...") + (let (filepath dir file errorline) + (while + (re-search-backward + "{\\([a-zA-Z ]* ERROR\\|Warning\\):.* in line[s ]*\\([0-9]+\\)" + limit t) + (setq errorline (string-to-number (match-string 2))) + (save-excursion + (re-search-backward + "{\\(consulting\\|compiling\\|processing\\) \\(.*\\)\\.\\.\\.}" + limit t) + (setq filepath (match-string 2))) + + ;; ###### Does this work with SICStus under Windows (i.e. backslahes and stuff?) + (if (string-match "\\(.*/\\)\\([^/]*\\)$" filepath) + (progn + (setq dir (match-string 1 filepath)) + (setq file (match-string 2 filepath)))) + + (setq compilation-error-list + (cons + (cons (save-excursion + (beginning-of-line) + (point-marker)) + (list (list file dir) errorline)) + compilation-error-list) + )) + )) + +(defun prolog-consult-compile-filter (process output) + "Filter function for Prolog compilation PROCESS. +Argument OUTPUT is a name of the output file." + ;;(message "start") + (setq prolog-consult-compile-output + (concat prolog-consult-compile-output output)) + ;;(message "pccf1: %s" prolog-consult-compile-output) + ;; Iterate through the lines of prolog-consult-compile-output + (let (outputtype) + (while (and prolog-process-flag + (or + ;; Trace question + (progn + (setq outputtype 'trace) + (and (eq prolog-system 'sicstus) + (string-match + "^[ \t]*[0-9]+[ \t]*[0-9]+[ \t]*Call:.*? " + prolog-consult-compile-output))) + + ;; Match anything + (progn + (setq outputtype 'normal) + (string-match "^.*\n" prolog-consult-compile-output)) + )) + ;;(message "outputtype: %s" outputtype) + + (setq output (match-string 0 prolog-consult-compile-output)) + ;; remove the text in output from prolog-consult-compile-output + (setq prolog-consult-compile-output + (substring prolog-consult-compile-output (length output))) + ;;(message "pccf2: %s" prolog-consult-compile-output) + + ;; If temporary files were used, then we change the error + ;; messages to point to the original source file. + ;; FIXME: Use compilation-fake-loc instead. + (cond + + ;; If the prolog process was in trace mode then it requires + ;; user input + ((and (eq prolog-system 'sicstus) + (eq outputtype 'trace)) + (let ((input (concat (read-string output) "\n"))) + (process-send-string process input) + (setq output (concat output input)))) + + ((eq prolog-system 'sicstus) + (if (and prolog-consult-compile-real-file + (string-match + "\\({.*:.* in line[s ]*\\)\\([0-9]+\\)-\\([0-9]+\\)" output)) + (setq output (replace-match + ;; Adds a {processing ...} line so that + ;; `prolog-parse-sicstus-compilation-errors' + ;; finds the real file instead of the temporary one. + ;; Also fixes the line numbers. + (format "Added by Emacs: {processing %s...}\n%s%d-%d" + prolog-consult-compile-real-file + (match-string 1 output) + (+ prolog-consult-compile-first-line + (string-to-number + (match-string 2 output))) + (+ prolog-consult-compile-first-line + (string-to-number + (match-string 3 output)))) + t t output))) + ) + + ((eq prolog-system 'swi) + (if (and prolog-consult-compile-real-file + (string-match (format + "%s\\([ \t]*:[ \t]*\\)\\([0-9]+\\)" + prolog-consult-compile-file) + output)) + (setq output (replace-match + ;; Real filename + text + fixed linenum + (format "%s%s%d" + prolog-consult-compile-real-file + (match-string 1 output) + (+ prolog-consult-compile-first-line + (string-to-number + (match-string 2 output)))) + t t output))) + ) + + (t ()) + ) + ;; Write the output in the *prolog-compilation* buffer + (insert output))) + + ;; If the prompt is visible, then the task is finished + (if (string-match (prolog-prompt-regexp) prolog-consult-compile-output) + (setq prolog-process-flag nil))) + +(defun prolog-consult-compile-file (compilep) + "Consult/compile file of current buffer. +If COMPILEP is non-nil, compile, otherwise consult." + (let ((file buffer-file-name)) + (if file + (progn + (save-some-buffers) + (prolog-consult-compile compilep file)) + (prolog-consult-compile-region compilep (point-min) (point-max))))) + +(defun prolog-consult-compile-buffer (compilep) + "Consult/compile current buffer. +If COMPILEP is non-nil, compile, otherwise consult." + (prolog-consult-compile-region compilep (point-min) (point-max))) + +(defun prolog-consult-compile-region (compilep beg end) + "Consult/compile region between BEG and END. +If COMPILEP is non-nil, compile, otherwise consult." + ;(let ((file prolog-temp-filename) + (let ((file (prolog-bsts (prolog-temporary-file))) + (lines (count-lines 1 beg))) + (write-region beg end file nil 'no-message) + (write-region "\n" nil file t 'no-message) + (prolog-consult-compile compilep file + (if (bolp) (1+ lines) lines)) + (delete-file file))) + +(defun prolog-consult-compile-predicate (compilep) + "Consult/compile the predicate around current point. +If COMPILEP is non-nil, compile, otherwise consult." + (prolog-consult-compile-region + compilep (prolog-pred-start) (prolog-pred-end))) + + +;;------------------------------------------------------------------- +;; Font-lock stuff +;;------------------------------------------------------------------- + +;; Auxilliary functions +(defun prolog-make-keywords-regexp (keywords &optional protect) + "Create regexp from the list of strings KEYWORDS. +If PROTECT is non-nil, surround the result regexp by word breaks." + (let ((regexp + (if (fboundp 'regexp-opt) + ;; Emacs 20 + ;; Avoid compile warnings under earlier versions by using eval + (eval '(regexp-opt keywords)) + ;; Older Emacsen + (concat (mapconcat 'regexp-quote keywords "\\|"))) + )) + (if protect + (concat "\\<\\(" regexp "\\)\\>") + regexp))) + +(defun prolog-font-lock-object-matcher (bound) + "Find SICStus objects method name for font lock. +Argument BOUND is a buffer position limiting searching." + (let (point + (case-fold-search nil)) + (while (and (not point) + (re-search-forward "\\(::[ \t\n]*{\\|&\\)[ \t]*" + bound t)) + (while (or (re-search-forward "\\=\n[ \t]*" bound t) + (re-search-forward "\\=%.*" bound t) + (and (re-search-forward "\\=/\\*" bound t) + (re-search-forward "\\*/[ \t]*" bound t)))) + (setq point (re-search-forward + (format "\\=\\(%s\\)" prolog-atom-regexp) + bound t))) + point)) + +(defsubst prolog-face-name-p (facename) + ;; Return t if FACENAME is the name of a face. This method is + ;; necessary since facep in XEmacs only returns t for the actual + ;; face objects (while it's only their names that are used just + ;; about anywhere else) without providing a predicate that tests + ;; face names. This function (including the above commentary) is + ;; borrowed from cc-mode. + (memq facename (face-list))) + +;; Set everything up +(defun prolog-font-lock-keywords () + "Set up font lock keywords for the current Prolog system." + ;(when window-system + (require 'font-lock) + + ;; Define Prolog faces + (defface prolog-redo-face + '((((class grayscale)) (:italic t)) + (((class color)) (:foreground "darkorchid")) + (t (:italic t))) + "Prolog mode face for highlighting redo trace lines." + :group 'prolog-faces) + (defface prolog-exit-face + '((((class grayscale)) (:underline t)) + (((class color) (background dark)) (:foreground "green")) + (((class color) (background light)) (:foreground "ForestGreen")) + (t (:underline t))) + "Prolog mode face for highlighting exit trace lines." + :group 'prolog-faces) + (defface prolog-exception-face + '((((class grayscale)) (:bold t :italic t :underline t)) + (((class color)) (:bold t :foreground "black" :background "Khaki")) + (t (:bold t :italic t :underline t))) + "Prolog mode face for highlighting exception trace lines." + :group 'prolog-faces) + (defface prolog-warning-face + '((((class grayscale)) (:underline t)) + (((class color) (background dark)) (:foreground "blue")) + (((class color) (background light)) (:foreground "MidnightBlue")) + (t (:underline t))) + "Face name to use for compiler warnings." + :group 'prolog-faces) + (defface prolog-builtin-face + '((((class color) (background light)) (:foreground "Purple")) + (((class color) (background dark)) (:foreground "Cyan")) + (((class grayscale) (background light)) (:foreground "LightGray" :bold t)) + (((class grayscale) (background dark)) (:foreground "DimGray" :bold t)) + (t (:bold t))) + "Face name to use for compiler warnings." + :group 'prolog-faces) + (defvar prolog-warning-face + (if (prolog-face-name-p 'font-lock-warning-face) + 'font-lock-warning-face + 'prolog-warning-face) + "Face name to use for built in predicates.") + (defvar prolog-builtin-face + (if (prolog-face-name-p 'font-lock-builtin-face) + 'font-lock-builtin-face + 'prolog-builtin-face) + "Face name to use for built in predicates.") + (defvar prolog-redo-face 'prolog-redo-face + "Face name to use for redo trace lines.") + (defvar prolog-exit-face 'prolog-exit-face + "Face name to use for exit trace lines.") + (defvar prolog-exception-face 'prolog-exception-face + "Face name to use for exception trace lines.") + + ;; Font Lock Patterns + (let ( + ;; "Native" Prolog patterns + (head-predicates + (list (format "^\\(%s\\)\\((\\|[ \t]*:-\\)" prolog-atom-regexp) + 1 font-lock-function-name-face)) + ;(list (format "^%s" prolog-atom-regexp) + ; 0 font-lock-function-name-face)) + (head-predicates-1 + (list (format "\\.[ \t]*\\(%s\\)" prolog-atom-regexp) + 1 font-lock-function-name-face) ) + (variables + '("\\<\\([_A-Z][a-zA-Z0-9_]*\\)" + 1 font-lock-variable-name-face)) + (important-elements + (list (if (eq prolog-system 'mercury) + "[][}{;|]\\|\\\\[+=]\\|<?=>?" + "[][}{!;|]\\|\\*->") + 0 'font-lock-keyword-face)) + (important-elements-1 + '("[^-*]\\(->\\)" 1 font-lock-keyword-face)) + (predspecs ; module:predicate/cardinality + (list (format "\\<\\(%s:\\|\\)%s/[0-9]+" + prolog-atom-regexp prolog-atom-regexp) + 0 font-lock-function-name-face 'prepend)) + (keywords ; directives (queries) + (list + (if (eq prolog-system 'mercury) + (concat + "\\<\\(" + (prolog-make-keywords-regexp prolog-keywords-i) + "\\|" + (prolog-make-keywords-regexp + prolog-determinism-specificators-i) + "\\)\\>") + (concat + "^[?:]- *\\(" + (prolog-make-keywords-regexp prolog-keywords-i) + "\\)\\>")) + 1 prolog-builtin-face)) + (quoted_atom (list prolog-quoted-atom-regexp + 2 'font-lock-string-face 'append)) + (string (list prolog-string-regexp + 1 'font-lock-string-face 'append)) + ;; SICStus specific patterns + (sicstus-object-methods + (if (eq prolog-system 'sicstus) + '(prolog-font-lock-object-matcher + 1 font-lock-function-name-face))) + ;; Mercury specific patterns + (types + (if (eq prolog-system 'mercury) + (list + (prolog-make-keywords-regexp prolog-types-i t) + 0 'font-lock-type-face))) + (modes + (if (eq prolog-system 'mercury) + (list + (prolog-make-keywords-regexp prolog-mode-specificators-i t) + 0 'font-lock-reference-face))) + (directives + (if (eq prolog-system 'mercury) + (list + (prolog-make-keywords-regexp prolog-directives-i t) + 0 'prolog-warning-face))) + ;; Inferior mode specific patterns + (prompt + ;; FIXME: Should be handled by comint already. + (list (prolog-prompt-regexp) 0 'font-lock-keyword-face)) + (trace-exit + ;; FIXME: Add to compilation-error-regexp-alist instead. + (cond + ((eq prolog-system 'sicstus) + '("[ \t]*[0-9]+[ \t]+[0-9]+[ \t]*\\(Exit\\):" + 1 prolog-exit-face)) + ((eq prolog-system 'swi) + '("[ \t]*\\(Exit\\):[ \t]*([ \t0-9]*)" 1 prolog-exit-face)) + (t nil))) + (trace-fail + ;; FIXME: Add to compilation-error-regexp-alist instead. + (cond + ((eq prolog-system 'sicstus) + '("[ \t]*[0-9]+[ \t]+[0-9]+[ \t]*\\(Fail\\):" + 1 prolog-warning-face)) + ((eq prolog-system 'swi) + '("[ \t]*\\(Fail\\):[ \t]*([ \t0-9]*)" 1 prolog-warning-face)) + (t nil))) + (trace-redo + ;; FIXME: Add to compilation-error-regexp-alist instead. + (cond + ((eq prolog-system 'sicstus) + '("[ \t]*[0-9]+[ \t]+[0-9]+[ \t]*\\(Redo\\):" + 1 prolog-redo-face)) + ((eq prolog-system 'swi) + '("[ \t]*\\(Redo\\):[ \t]*([ \t0-9]*)" 1 prolog-redo-face)) + (t nil))) + (trace-call + ;; FIXME: Add to compilation-error-regexp-alist instead. + (cond + ((eq prolog-system 'sicstus) + '("[ \t]*[0-9]+[ \t]+[0-9]+[ \t]*\\(Call\\):" + 1 font-lock-function-name-face)) + ((eq prolog-system 'swi) + '("[ \t]*\\(Call\\):[ \t]*([ \t0-9]*)" + 1 font-lock-function-name-face)) + (t nil))) + (trace-exception + ;; FIXME: Add to compilation-error-regexp-alist instead. + (cond + ((eq prolog-system 'sicstus) + '("[ \t]*[0-9]+[ \t]+[0-9]+[ \t]*\\(Exception\\):" + 1 prolog-exception-face)) + ((eq prolog-system 'swi) + '("[ \t]*\\(Exception\\):[ \t]*([ \t0-9]*)" + 1 prolog-exception-face)) + (t nil))) + (error-message-identifier + ;; FIXME: Add to compilation-error-regexp-alist instead. + (cond + ((eq prolog-system 'sicstus) + '("{\\([A-Z]* ?ERROR:\\)" 1 prolog-exception-face prepend)) + ((eq prolog-system 'swi) + '("^[[]\\(WARNING:\\)" 1 prolog-builtin-face prepend)) + (t nil))) + (error-whole-messages + ;; FIXME: Add to compilation-error-regexp-alist instead. + (cond + ((eq prolog-system 'sicstus) + '("{\\([A-Z]* ?ERROR:.*\\)}[ \t]*$" + 1 font-lock-comment-face append)) + ((eq prolog-system 'swi) + '("^[[]WARNING:[^]]*[]]$" 0 font-lock-comment-face append)) + (t nil))) + (error-warning-messages + ;; FIXME: Add to compilation-error-regexp-alist instead. + ;; Mostly errors that SICStus asks the user about how to solve, + ;; such as "NAME CLASH:" for example. + (cond + ((eq prolog-system 'sicstus) + '("^[A-Z ]*[A-Z]+:" 0 prolog-warning-face)) + (t nil))) + (warning-messages + ;; FIXME: Add to compilation-error-regexp-alist instead. + (cond + ((eq prolog-system 'sicstus) + '("\\({ ?\\(Warning\\|WARNING\\) ?:.*}\\)[ \t]*$" + 2 prolog-warning-face prepend)) + (t nil)))) + + ;; Make font lock list + (delq + nil + (cond + ((eq major-mode 'prolog-mode) + (list + head-predicates + head-predicates-1 + quoted_atom + string + variables + important-elements + important-elements-1 + predspecs + keywords + sicstus-object-methods + types + modes + directives)) + ((eq major-mode 'prolog-inferior-mode) + (list + prompt + error-message-identifier + error-whole-messages + error-warning-messages + warning-messages + predspecs + trace-exit + trace-fail + trace-redo + trace-call + trace-exception)) + ((eq major-mode 'compilation-mode) + (list + error-message-identifier + error-whole-messages + error-warning-messages + warning-messages + predspecs)))) + )) + + +;;------------------------------------------------------------------- +;; Indentation stuff +;;------------------------------------------------------------------- + +;; NB: This function *MUST* have this optional argument since XEmacs +;; assumes it. This does not mean we have to use it... +(defun prolog-indent-line (&optional whole-exp) + "Indent current line as Prolog code. +With argument, indent any additional lines of the same clause +rigidly along with this one (not yet)." + (interactive "p") + (let ((indent (prolog-indent-level)) + (pos (- (point-max) (point))) beg) + (beginning-of-line) + (setq beg (point)) + (skip-chars-forward " \t") + (indent-line-to indent) + (if (> (- (point-max) pos) (point)) + (goto-char (- (point-max) pos))) + + ;; Align comments + (if (and prolog-align-comments-flag (save-excursion - (goto-char (- pmark 3)) - (looking-at " \\? "))) - ;; This is GNU prolog waiting to know whether you want more answers - ;; or not (or abort, etc...). The answer is a single char, not - ;; a line, so pass this char directly rather than wait for RET to - ;; send a whole line. - (comint-send-string proc (string last-command-event)) - (call-interactively 'self-insert-command)))) + (line-beginning-position) + ;; (let ((start (comment-search-forward (line-end-position) t))) + ;; (and start ;There's a comment to indent. + ;; ;; If it's first on the line, we've indented it already + ;; ;; and prolog-goto-comment-column would inf-loop. + ;; (progn (goto-char start) (skip-chars-backward " \t") + ;; (not (bolp))))))) + (and (looking-at comment-start-skip) + ;; The definition of comment-start-skip used in this + ;; mode is unusual in that it only matches at BOL. + (progn (skip-chars-forward " \t") + (not (eq (point) (match-end 1))))))) + (save-excursion + (prolog-goto-comment-column t))) + + ;; Insert spaces if needed + (if (or prolog-electric-tab-flag prolog-electric-if-then-else-flag) + (prolog-insert-spaces-after-paren)) + )) + +(defun prolog-comment-indent () + "Compute prolog comment indentation." + ;; FIXME: Only difference with default behavior is that %%% is not + ;; flushed to column 0 but just left where the user put it. + (cond ((looking-at "%%%") (prolog-indentation-level-of-line)) + ((looking-at "%%") (prolog-indent-level)) + (t + (save-excursion + (skip-chars-backward " \t") + ;; Insert one space at least, except at left margin. + (max (+ (current-column) (if (bolp) 0 1)) + comment-column))) + )) + +(defun prolog-indent-level () + "Compute prolog indentation level." + (save-excursion + (beginning-of-line) + (let ((totbal (prolog-region-paren-balance + (prolog-clause-start t) (point))) + (oldpoint (point))) + (skip-chars-forward " \t") + (cond + ((looking-at "%%%") (prolog-indentation-level-of-line)) + ;Large comment starts + ((looking-at "%[^%]") comment-column) ;Small comment starts + ((bobp) 0) ;Beginning of buffer + + ;; If we found '}' then we must check if it's the + ;; end of an object declaration or something else. + ((and (looking-at "}") + (save-excursion + (forward-char 1) + ;; Goto to matching { + (if prolog-use-prolog-tokenizer-flag + (prolog-backward-list) + (backward-list)) + (skip-chars-backward " \t") + (backward-char 2) + (looking-at "::"))) + ;; It was an object + (if prolog-object-end-to-0-flag + 0 + prolog-indent-width)) + + ;;End of /* */ comment + ((looking-at "\\*/") + (save-excursion + (prolog-find-start-of-mline-comment) + (skip-chars-backward " \t") + (- (current-column) 2))) + + ;; Here we check if the current line is within a /* */ pair + ((and (looking-at "[^%/]") + (eq (prolog-in-string-or-comment) 'cmt)) + (if prolog-indent-mline-comments-flag + (prolog-find-start-of-mline-comment) + ;; Same as before + (prolog-indentation-level-of-line))) + + (t + (let ((empty t) ind linebal) + ;; See previous indentation + (while empty + (forward-line -1) + (beginning-of-line) + (if (bobp) + (setq empty nil) + (skip-chars-forward " \t") + (if (not (or (not (member (prolog-in-string-or-comment) + '(nil txt))) + (looking-at "%") + (looking-at "\n"))) + (setq empty nil)))) + + ;; Store this line's indentation + (setq ind (if (bobp) + 0 ;Beginning of buffer. + (current-column))) ;Beginning of clause. + + ;; Compute the balance of the line + (setq linebal (prolog-paren-balance)) + ;;(message "bal of previous line %d totbal %d" linebal totbal) + (if (< linebal 0) + (progn + ;; Add 'indent-level' mode to find-unmatched-paren instead? + (end-of-line) + (setq ind (prolog-find-indent-of-matching-paren)))) + + ;;(message "ind %d" ind) + (beginning-of-line) + + ;; Check if the line ends with ":-", ".", ":: {", "}" (might be + ;; unnecessary), "&" or ")" (The last four concerns SICStus objects) + (cond + ;; If the last char of the line is a '&' then set the indent level + ;; to prolog-indent-width (used in SICStus objects) + ((and (eq prolog-system 'sicstus) + (looking-at ".+&[ \t]*\\(%.*\\|\\)$")) + (setq ind prolog-indent-width)) + + ;; Increase indentation if the previous line was the head of a rule + ;; and does not contain a '.' + ((and (looking-at (format ".*%s[^\\.]*[ \t]*\\(%%.*\\|\\)$" + prolog-head-delimiter)) + ;; We must check that the match is at a paren balance of 0. + (save-excursion + (let ((p (point))) + (re-search-forward prolog-head-delimiter) + (>= 0 (prolog-region-paren-balance p (point)))))) + (let ((headindent + (if (< (prolog-paren-balance) 0) + (save-excursion + (end-of-line) + (prolog-find-indent-of-matching-paren)) + (prolog-indentation-level-of-line)))) + (setq ind (+ headindent prolog-indent-width)))) + + ;; The previous line was the head of an object + ((looking-at ".+ *::.*{[ \t]*$") + (setq ind prolog-indent-width)) + + ;; If a '.' is found at the end of the previous line, then + ;; decrease the indentation. (The \\(%.*\\|\\) part of the + ;; regexp is for comments at the end of the line) + ((and (looking-at "^.+\\.[ \t]*\\(%.*\\|\\)$") + ;; Make sure that the '.' found is not in a comment or string + (save-excursion + (end-of-line) + (re-search-backward "\\.[ \t]*\\(%.*\\|\\)$" (point-min)) + ;; Guard against the real '.' being followed by a + ;; commented '.'. + (if (eq (prolog-in-string-or-comment) 'cmt) + ;; commented out '.' + (let ((here (line-beginning-position))) + (end-of-line) + (re-search-backward "\\.[ \t]*%.*$" here t)) + (not (prolog-in-string-or-comment)) + ) + )) + (setq ind 0)) + + ;; If a '.' is found at the end of the previous line, then + ;; decrease the indentation. (The /\\*.*\\*/ part of the + ;; regexp is for C-like comments at the end of the + ;; line--can we merge with the case above?). + ((and (looking-at "^.+\\.[ \t]*\\(/\\*.*\\|\\)$") + ;; Make sure that the '.' found is not in a comment or string + (save-excursion + (end-of-line) + (re-search-backward "\\.[ \t]*\\(/\\*.*\\|\\)$" (point-min)) + ;; Guard against the real '.' being followed by a + ;; commented '.'. + (if (eq (prolog-in-string-or-comment) 'cmt) + ;; commented out '.' + (let ((here (line-beginning-position))) + (end-of-line) + (re-search-backward "\\.[ \t]*/\\*.*$" here t)) + (not (prolog-in-string-or-comment)) + ) + )) + (setq ind 0)) + + ) + + ;; If the last non comment char is a ',' or left paren or a left- + ;; indent-regexp then indent to open parenthesis level + (if (and + (> totbal 0) + ;; SICStus objects have special syntax rules if point is + ;; not inside additional parens (objects are defined + ;; within {...}) + (not (and (eq prolog-system 'sicstus) + (= totbal 1) + (prolog-in-object)))) + (if (looking-at + (format "\\(%s\\|%s\\|0'.\\|[0-9]+'[0-9a-zA-Z]+\\|[^\n\'\"%%]\\)*\\(,\\|%s\\|%s\\)\[ \t]*\\(%%.*\\|\\)$" + prolog-quoted-atom-regexp prolog-string-regexp + prolog-left-paren prolog-left-indent-regexp)) + (progn + (goto-char oldpoint) + (setq ind (prolog-find-unmatched-paren + (if prolog-paren-indent-p + 'termdependent + 'skipwhite))) + ;;(setq ind (prolog-find-unmatched-paren 'termdependent)) + ) + (goto-char oldpoint) + (setq ind (prolog-find-unmatched-paren nil)) + )) + + + ;; Return the indentation level + ind + )))))) + +(defun prolog-find-indent-of-matching-paren () + "Find the indentation level based on the matching parenthesis. +Indentation level is set to the one the point is after when the function is +called." + (save-excursion + ;; Go to the matching paren + (if prolog-use-prolog-tokenizer-flag + (prolog-backward-list) + (backward-list)) + + ;; If this was the first paren on the line then return this line's + ;; indentation level + (if (prolog-paren-is-the-first-on-line-p) + (prolog-indentation-level-of-line) + ;; It was not the first one + (progn + ;; Find the next paren + (prolog-goto-next-paren 0) + + ;; If this paren is a left one then use its column as indent level, + ;; if not then recurse this function + (if (looking-at prolog-left-paren) + (+ (current-column) 1) + (progn + (forward-char 1) + (prolog-find-indent-of-matching-paren))) + )) + )) + +(defun prolog-indentation-level-of-line () + "Return the indentation level of the current line." + (save-excursion + (beginning-of-line) + (skip-chars-forward " \t") + (current-column))) + +(defun prolog-paren-is-the-first-on-line-p () + "Return t if the parenthesis under the point is the first one on the line. +Return nil otherwise. +Note: does not check if the point is actually at a parenthesis!" + (save-excursion + (let ((begofline (line-beginning-position))) + (if (= begofline (point)) + t + (if (prolog-goto-next-paren begofline) + nil + t))))) + +(defun prolog-find-unmatched-paren (&optional mode) + "Return the column of the last unmatched left parenthesis. +If MODE is `skipwhite' then any white space after the parenthesis is added to +the answer. +If MODE is `plusone' then the parenthesis' column +1 is returned. +If MODE is `termdependent' then if the unmatched parenthesis is part of +a compound term the function will work as `skipwhite', otherwise +it will return the column paren plus the value of `prolog-paren-indent'. +If MODE is nil or not set then the parenthesis' exact column is returned." + (save-excursion + ;; If the next paren we find is a left one we're finished, if it's + ;; a right one then we go back one step and recurse + (prolog-goto-next-paren 0) + + (let ((roundparen (looking-at "("))) + (if (looking-at prolog-left-paren) + (let ((not-part-of-term + (save-excursion + (backward-char 1) + (looking-at "[ \t]")))) + (if (eq mode nil) + (current-column) + (if (and roundparen + (eq mode 'termdependent) + not-part-of-term) + (+ (current-column) + (if prolog-electric-tab-flag + ;; Electric TAB + prolog-paren-indent + ;; Not electric TAB + (if (looking-at ".[ \t]*$") + 2 + prolog-paren-indent)) + ) + + (forward-char 1) + (if (or (eq mode 'skipwhite) (eq mode 'termdependent) ) + (skip-chars-forward " \t")) + (current-column)))) + ;; Not looking at left paren + (progn + (forward-char 1) + ;; Go to the matching paren. When we get there we have a total + ;; balance of 0. + (if prolog-use-prolog-tokenizer-flag + (prolog-backward-list) + (backward-list)) + (prolog-find-unmatched-paren mode))) + ))) + + +(defun prolog-paren-balance () + "Return the parenthesis balance of the current line. +A return value of n means n more left parentheses than right ones." + (save-excursion + (end-of-line) + (prolog-region-paren-balance (line-beginning-position) (point)))) + +(defun prolog-region-paren-balance (beg end) + "Return the summed parenthesis balance in the region. +The region is limited by BEG and END positions." + (save-excursion + (let ((state (if prolog-use-prolog-tokenizer-flag + (prolog-tokenize beg end) + (parse-partial-sexp beg end)))) + (nth 0 state)))) + +(defun prolog-goto-next-paren (limit-pos) + "Move the point to the next parenthesis earlier in the buffer. +Return t if a match was found before LIMIT-POS. Return nil otherwise." + (let ((retval (re-search-backward + (concat prolog-left-paren "\\|" prolog-right-paren) + limit-pos t))) + + ;; If a match was found but it was in a string or comment, then recurse + (if (and retval (prolog-in-string-or-comment)) + (prolog-goto-next-paren limit-pos) + retval) + )) + +(defun prolog-in-string-or-comment () + "Check whether string, atom, or comment is under current point. +Return: + `txt' if the point is in a string, atom, or character code expression + `cmt' if the point is in a comment + nil otherwise." + (save-excursion + (let* ((start + (if (eq prolog-parse-mode 'beg-of-line) + ;; 'beg-of-line + (save-excursion + (let (safepoint) + (beginning-of-line) + (setq safepoint (point)) + (while (and (> (point) (point-min)) + (progn + (forward-line -1) + (end-of-line) + (if (not (bobp)) + (backward-char 1)) + (looking-at "\\\\")) + ) + (beginning-of-line) + (setq safepoint (point))) + safepoint)) + ;; 'beg-of-clause + (prolog-clause-start))) + (end (point)) + (state (if prolog-use-prolog-tokenizer-flag + (prolog-tokenize start end) + (if (fboundp 'syntax-ppss) + (syntax-ppss) + (parse-partial-sexp start end))))) + (cond + ((nth 3 state) 'txt) ; String + ((nth 4 state) 'cmt) ; Comment + (t + (cond + ((looking-at "%") 'cmt) ; Start of a comment + ((looking-at "/\\*") 'cmt) ; Start of a comment + ((looking-at "\'") 'txt) ; Start of an atom + ((looking-at "\"") 'txt) ; Start of a string + (t nil) + )))) + )) + +(defun prolog-find-start-of-mline-comment () + "Return the start column of a /* */ comment. +This assumes that the point is inside a comment." + (re-search-backward "/\\*" (point-min) t) + (forward-char 2) + (skip-chars-forward " \t") + (current-column)) + +(defun prolog-insert-spaces-after-paren () + "Insert spaces after the opening parenthesis, \"then\" (->) and \"else\" (;) branches. +Spaces are inserted if all preceding objects on the line are +whitespace characters, parentheses, or then/else branches." + (save-excursion + (let ((regexp (concat "(\\|" prolog-left-indent-regexp)) + level) + (beginning-of-line) + (skip-chars-forward " \t") + (when (looking-at regexp) + ;; Treat "( If -> " lines specially. + ;;(setq incr (if (looking-at "(.*->") + ;; 2 + ;; prolog-paren-indent)) + + ;; work on all subsequent "->", "(", ";" + (while (looking-at regexp) + (goto-char (match-end 0)) + (setq level (+ (prolog-find-unmatched-paren) prolog-paren-indent)) + + ;; Remove old white space + (let ((start (point))) + (skip-chars-forward " \t") + (delete-region start (point))) + (indent-to level) + (skip-chars-forward " \t")) + ))) + (when (save-excursion + (backward-char 2) + (looking-at "\\s ;\\|\\s (\\|->")) ; (looking-at "\\s \\((\\|;\\)")) + (skip-chars-forward " \t")) + ) + +;;;; Comment filling + +(defun prolog-comment-limits () + "Return the current comment limits plus the comment type (block or line). +The comment limits are the range of a block comment or the range that +contains all adjacent line comments (i.e. all comments that starts in +the same column with no empty lines or non-whitespace characters +between them)." + (let ((here (point)) + lit-limits-b lit-limits-e lit-type beg end + ) + (save-restriction + ;; Widen to catch comment limits correctly. + (widen) + (setq end (line-end-position) + beg (line-beginning-position)) + (save-excursion + (beginning-of-line) + (setq lit-type (if (search-forward-regexp "%" end t) 'line 'block)) + ; (setq lit-type 'line) + ;(if (search-forward-regexp "^[ \t]*%" end t) + ; (setq lit-type 'line) + ; (if (not (search-forward-regexp "%" end t)) + ; (setq lit-type 'block) + ; (if (not (= (forward-line 1) 0)) + ; (setq lit-type 'block) + ; (setq done t + ; ret (prolog-comment-limits))) + ; )) + (if (eq lit-type 'block) + (progn + (goto-char here) + (when (looking-at "/\\*") (forward-char 2)) + (when (and (looking-at "\\*") (> (point) (point-min)) + (forward-char -1) (looking-at "/")) + (forward-char 1)) + (when (save-excursion (search-backward "/*" nil t)) + (list (save-excursion (search-backward "/*") (point)) + (or (search-forward "*/" nil t) (point-max)) lit-type))) + ;; line comment + (setq lit-limits-b (- (point) 1) + lit-limits-e end) + (condition-case nil + (if (progn (goto-char lit-limits-b) + (looking-at "%")) + (let ((col (current-column)) done) + (setq beg (point) + end lit-limits-e) + ;; Always at the beginning of the comment + ;; Go backward now + (beginning-of-line) + (while (and (zerop (setq done (forward-line -1))) + (search-forward-regexp "^[ \t]*%" + (line-end-position) t) + (= (+ 1 col) (current-column))) + (setq beg (- (point) 1))) + (when (= done 0) + (forward-line 1)) + ;; We may have a line with code above... + (when (and (zerop (setq done (forward-line -1))) + (search-forward "%" (line-end-position) t) + (= (+ 1 col) (current-column))) + (setq beg (- (point) 1))) + (when (= done 0) + (forward-line 1)) + ;; Go forward + (goto-char lit-limits-b) + (beginning-of-line) + (while (and (zerop (forward-line 1)) + (search-forward-regexp "^[ \t]*%" + (line-end-position) t) + (= (+ 1 col) (current-column))) + (setq end (line-end-position))) + (list beg end lit-type)) + (list lit-limits-b lit-limits-e lit-type) + ) + (error (list lit-limits-b lit-limits-e lit-type)))) + )))) + +(defun prolog-guess-fill-prefix () + ;; fill 'txt entities? + (when (save-excursion + (end-of-line) + (equal (prolog-in-string-or-comment) 'cmt)) + (let* ((bounds (prolog-comment-limits)) + (cbeg (car bounds)) + (type (nth 2 bounds)) + beg end) + (save-excursion + (end-of-line) + (setq end (point)) + (beginning-of-line) + (setq beg (point)) + (if (and (eq type 'line) + (> cbeg beg) + (save-excursion (not (search-forward-regexp "^[ \t]*%" + cbeg t)))) + (progn + (goto-char cbeg) + (search-forward-regexp "%+[ \t]*" end t) + (prolog-replace-in-string (buffer-substring beg (point)) + "[^ \t%]" " ")) + ;(goto-char beg) + (if (search-forward-regexp "^[ \t]*\\(%+\\|\\*+\\|/\\*+\\)[ \t]*" + end t) + (prolog-replace-in-string (buffer-substring beg (point)) "/" " ") + (beginning-of-line) + (when (search-forward-regexp "^[ \t]+" end t) + (buffer-substring beg (point))))))))) + +(defun prolog-fill-paragraph () + "Fill paragraph comment at or after point." + (interactive) + (let* ((bounds (prolog-comment-limits)) + (type (nth 2 bounds))) + (if (eq type 'line) + (let ((fill-prefix (prolog-guess-fill-prefix))) + (fill-paragraph nil)) + (save-excursion + (save-restriction + ;; exclude surrounding lines that delimit a multiline comment + ;; and don't contain alphabetic characters, like "/*******", + ;; "- - - */" etc. + (save-excursion + (backward-paragraph) + (unless (bobp) (forward-line)) + (if (string-match "^/\\*[^a-zA-Z]*$" (thing-at-point 'line)) + (narrow-to-region (point-at-eol) (point-max)))) + (save-excursion + (forward-paragraph) + (forward-line -1) + (if (string-match "^[^a-zA-Z]*\\*/$" (thing-at-point 'line)) + (narrow-to-region (point-min) (point-at-bol)))) + (let ((fill-prefix (prolog-guess-fill-prefix))) + (fill-paragraph nil)))) + ))) + +(defun prolog-do-auto-fill () + "Carry out Auto Fill for Prolog mode. +In effect it sets the `fill-prefix' when inside comments and then calls +`do-auto-fill'." + (let ((fill-prefix (prolog-guess-fill-prefix))) + (do-auto-fill) + )) + +(defalias 'prolog-replace-in-string + (if (fboundp 'replace-in-string) + #'replace-in-string + (lambda (str regexp newtext &optional literal) + (replace-regexp-in-string regexp newtext str nil literal)))) + +;;------------------------------------------------------------------- +;; The tokenizer +;;------------------------------------------------------------------- + +(defconst prolog-tokenize-searchkey + (concat "[0-9]+'" + "\\|" + "['\"]" + "\\|" + prolog-left-paren + "\\|" + prolog-right-paren + "\\|" + "%" + "\\|" + "/\\*" + )) + +(defun prolog-tokenize (beg end &optional stopcond) + "Tokenize a region of prolog code between BEG and END. +STOPCOND decides the stop condition of the parsing. Valid values +are 'zerodepth which stops the parsing at the first right parenthesis +where the parenthesis depth is zero, 'skipover which skips over +the current entity (e.g. a list, a string, etc.) and nil. + +The function returns a list with the following information: + 0. parenthesis depth + 3. 'atm if END is inside an atom + 'str if END is inside a string + 'chr if END is in a character code expression (0'x) + nil otherwise + 4. non-nil if END is inside a comment + 5. end position (always equal to END if STOPCOND is nil) +The rest of the elements are undefined." + (save-excursion + (let* ((end2 (1+ end)) + oldp + (depth 0) + (quoted nil) + inside_cmt + (endpos end2) + skiptype ; The type of entity we'll skip over + ) + (goto-char beg) + + (if (and (eq stopcond 'skipover) + (looking-at "[^[({'\"]")) + (setq endpos (point)) ; Stay where we are + (while (and + (re-search-forward prolog-tokenize-searchkey end2 t) + (< (point) end2)) + (progn + (setq oldp (point)) + (goto-char (match-beginning 0)) + (cond + ;; Atoms and strings + ((looking-at "'") + ;; Find end of atom + (if (re-search-forward "[^\\]'" end2 'limit) + ;; Found end of atom + (progn + (setq oldp end2) + (if (and (eq stopcond 'skipover) + (not skiptype)) + (setq endpos (point)) + (setq oldp (point)))) ; Continue tokenizing + (setq quoted 'atm))) + + ((looking-at "\"") + ;; Find end of string + (if (re-search-forward "[^\\]\"" end2 'limit) + ;; Found end of string + (progn + (setq oldp end2) + (if (and (eq stopcond 'skipover) + (not skiptype)) + (setq endpos (point)) + (setq oldp (point)))) ; Continue tokenizing + (setq quoted 'str))) + + ;; Paren stuff + ((looking-at prolog-left-paren) + (setq depth (1+ depth)) + (setq skiptype 'paren)) + + ((looking-at prolog-right-paren) + (setq depth (1- depth)) + (if (and + (or (eq stopcond 'zerodepth) + (and (eq stopcond 'skipover) + (eq skiptype 'paren))) + (= depth 0)) + (progn + (setq endpos (1+ (point))) + (setq oldp end2)))) + + ;; Comment stuff + ((looking-at comment-start) + (end-of-line) + ;; (if (>= (point) end2) + (if (>= (point) end) + (progn + (setq inside_cmt t) + (setq oldp end2)) + (setq oldp (point)))) + + ((looking-at "/\\*") + (if (re-search-forward "\\*/" end2 'limit) + (setq oldp (point)) + (setq inside_cmt t) + (setq oldp end2))) + + ;; 0'char + ((looking-at "0'") + (setq oldp (1+ (match-end 0))) + (if (> oldp end) + (setq quoted 'chr))) + + ;; base'number + ((looking-at "[0-9]+'") + (goto-char (match-end 0)) + (skip-chars-forward "0-9a-zA-Z") + (setq oldp (point))) + + + ) + (goto-char oldp) + )) ; End of while + ) + + ;; Deal with multi-line comments + (and (prolog-inside-mline-comment end) + (setq inside_cmt t)) + + ;; Create return list + (list depth nil nil quoted inside_cmt endpos) + ))) + +(defun prolog-inside-mline-comment (here) + (save-excursion + (goto-char here) + (let* ((next-close (save-excursion (search-forward "*/" nil t))) + (next-open (save-excursion (search-forward "/*" nil t))) + (prev-open (save-excursion (search-backward "/*" nil t))) + (prev-close (save-excursion (search-backward "*/" nil t))) + (unmatched-next-close (and next-close + (or (not next-open) + (> next-open next-close)))) + (unmatched-prev-open (and prev-open + (or (not prev-close) + (> prev-open prev-close)))) + ) + (or unmatched-next-close unmatched-prev-open) + ))) + + +;;------------------------------------------------------------------- +;; Online help +;;------------------------------------------------------------------- + +(defvar prolog-help-function + '((mercury nil) + (eclipse prolog-help-online) + ;; (sicstus prolog-help-info) + (sicstus prolog-find-documentation) + (swi prolog-help-online) + (t prolog-help-online)) + "Alist for the name of the function for finding help on a predicate.") + +(defun prolog-help-on-predicate () + "Invoke online help on the atom under cursor." + (interactive) + + (cond + ;; Redirect help for SICStus to `prolog-find-documentation'. + ((eq prolog-help-function-i 'prolog-find-documentation) + (prolog-find-documentation)) + + ;; Otherwise, ask for the predicate name and then call the function + ;; in prolog-help-function-i + (t + (let* ((word (prolog-atom-under-point)) + (predicate (read-string + (format "Help on predicate%s: " + (if word + (concat " (default " word ")") + "")) + nil nil word)) + ;;point + ) + (if prolog-help-function-i + (funcall prolog-help-function-i predicate) + (error "Sorry, no help method defined for this Prolog system.")))) + )) + +(defun prolog-help-info (predicate) + (let ((buffer (current-buffer)) + oldp + (str (concat "^\\* " (regexp-quote predicate) " */"))) + (require 'info) + (pop-to-buffer nil) + (Info-goto-node prolog-info-predicate-index) + (if (not (re-search-forward str nil t)) + (error (format "Help on predicate `%s' not found." predicate))) + + (setq oldp (point)) + (if (re-search-forward str nil t) + ;; Multiple matches, ask user + (let ((max 2) + n) + ;; Count matches + (while (re-search-forward str nil t) + (setq max (1+ max))) + + (goto-char oldp) + (re-search-backward "[^ /]" nil t) + (recenter 0) + (setq n (read-string ;; was read-input, which is obsolete + (format "Several matches, choose (1-%d): " max) "1")) + (forward-line (- (string-to-number n) 1))) + ;; Single match + (re-search-backward "[^ /]" nil t)) + + ;; (Info-follow-nearest-node (point)) + (prolog-Info-follow-nearest-node) + (re-search-forward (concat "^`" (regexp-quote predicate)) nil t) + (beginning-of-line) + (recenter 0) + (pop-to-buffer buffer))) + +(defun prolog-Info-follow-nearest-node () + (if (featurep 'xemacs) + (Info-follow-nearest-node (point)) + (Info-follow-nearest-node))) + +(defun prolog-help-online (predicate) + (prolog-ensure-process) + (process-send-string "prolog" (concat "help(" predicate ").\n")) + (display-buffer "*prolog*")) + +(defun prolog-help-apropos (string) + "Find Prolog apropos on given STRING. +This function is only available when `prolog-system' is set to `swi'." + (interactive "sApropos: ") + (cond + ((eq prolog-system 'swi) + (prolog-ensure-process) + (process-send-string "prolog" (concat "apropos(" string ").\n")) + (display-buffer "*prolog*")) + (t + (error "Sorry, no Prolog apropos available for this Prolog system.")))) + +(defun prolog-atom-under-point () + "Return the atom under or left to the point." + (save-excursion + (let ((nonatom_chars "[](){},\. \t\n") + start) + (skip-chars-forward (concat "^" nonatom_chars)) + (skip-chars-backward nonatom_chars) + (skip-chars-backward (concat "^" nonatom_chars)) + (setq start (point)) + (skip-chars-forward (concat "^" nonatom_chars)) + (buffer-substring-no-properties start (point)) + ))) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Help function with completion +;; Stolen from Per Mildner's SICStus debugger mode and modified + +(defun prolog-find-documentation () + "Go to the Info node for a predicate in the SICStus Info manual." + (interactive) + (let ((pred (prolog-read-predicate))) + (prolog-goto-predicate-info pred))) + +(defvar prolog-info-alist nil + "Alist with all builtin predicates. +Only for internal use by `prolog-find-documentation'") + +;; Very similar to prolog-help-info except that that function cannot +;; cope with arity and that it asks the user if there are several +;; functors with different arity. This function also uses +;; prolog-info-alist for finding the info node, rather than parsing +;; the predicate index. +(defun prolog-goto-predicate-info (predicate) + "Go to the info page for PREDICATE, which is a PredSpec." + (interactive) + (require 'info) + (string-match "\\(.*\\)/\\([0-9]+\\).*$" predicate) + (let ((buffer (current-buffer)) + (name (match-string 1 predicate)) + (arity (string-to-number (match-string 2 predicate))) + ;oldp + ;(str (regexp-quote predicate)) + ) + (pop-to-buffer nil) + + (Info-goto-node + prolog-info-predicate-index) ;; We must be in the SICStus pages + (Info-goto-node (car (cdr (assoc predicate prolog-info-alist)))) + + (prolog-find-term (regexp-quote name) arity "^`") + + (recenter 0) + (pop-to-buffer buffer)) +) + +(defun prolog-read-predicate () + "Read a PredSpec from the user. +Returned value is a string \"FUNCTOR/ARITY\". +Interaction supports completion." + (let ((default (prolog-atom-under-point))) + ;; If the predicate index is not yet built, do it now + (if (not prolog-info-alist) + (prolog-build-info-alist)) + ;; Test if the default string could be the base for completion. + ;; Discard it if not. + (if (eq (try-completion default prolog-info-alist) nil) + (setq default nil)) + ;; Read the PredSpec from the user + (completing-read + (if (zerop (length default)) + "Help on predicate: " + (concat "Help on predicate (default " default "): ")) + prolog-info-alist nil t nil nil default))) + +(defun prolog-build-info-alist (&optional verbose) + "Build an alist of all builtins and library predicates. +Each element is of the form (\"NAME/ARITY\" . (INFO-NODE1 INFO-NODE2 ...)). +Typically there is just one Info node associated with each name +If an optional argument VERBOSE is non-nil, print messages at the beginning +and end of list building." + (if verbose + (message "Building info alist...")) + (setq prolog-info-alist + (let ((l ()) + (last-entry (cons "" ()))) + (save-excursion + (save-window-excursion + ;; select any window but the minibuffer (as we cannot switch + ;; buffers in minibuffer window. + ;; I am not sure this is the right/best way + (if (active-minibuffer-window) ; nil if none active + (select-window (next-window))) + ;; Do this after going away from minibuffer window + (save-window-excursion + (info)) + (Info-goto-node prolog-info-predicate-index) + (goto-char (point-min)) + (while (re-search-forward + "^\\* \\(.+\\)/\\([0-9]+\\)\\([^\n:*]*\\):" nil t) + (let* ((name (match-string 1)) + (arity (string-to-number (match-string 2))) + (comment (match-string 3)) + (fa (format "%s/%d%s" name arity comment)) + info-node) + (beginning-of-line) + ;; Extract the info node name + (setq info-node (progn + (re-search-forward ":[ \t]*\\([^:]+\\).$") + (match-string 1) + )) + ;; ###### Easier? (from Milan version 0.1.28) + ;; (setq info-node (Info-extract-menu-node-name)) + (if (equal fa (car last-entry)) + (setcdr last-entry (cons info-node (cdr last-entry))) + (setq last-entry (cons fa (list info-node)) + l (cons last-entry l))))) + (nreverse l) + )))) + (if verbose + (message "Building info alist... done."))) + + +;;------------------------------------------------------------------- +;; Miscellaneous functions +;;------------------------------------------------------------------- + +;; For Windows. Change backslash to slash. SICStus handles either +;; path separator but backslash must be doubled, therefore use slash. +(defun prolog-bsts (string) + "Change backslashes to slashes in STRING." + (let ((str1 (copy-sequence string)) + (len (length string)) + (i 0)) + (while (< i len) + (if (char-equal (aref str1 i) ?\\) + (aset str1 i ?/)) + (setq i (1+ i))) + str1)) + +;;(defun prolog-temporary-file () +;; "Make temporary file name for compilation." +;; (make-temp-name +;; (concat +;; (or +;; (getenv "TMPDIR") +;; (getenv "TEMP") +;; (getenv "TMP") +;; (getenv "SYSTEMP") +;; "/tmp") +;; "/prolcomp"))) +;;(setq prolog-temp-filename (prolog-bsts (prolog-temporary-file))) + +(defun prolog-temporary-file () + "Make temporary file name for compilation." + (if prolog-temporary-file-name + ;; We already have a file, erase content and continue + (progn + (write-region "" nil prolog-temporary-file-name nil 'silent) + prolog-temporary-file-name) + ;; Actually create the file and set `prolog-temporary-file-name' + ;; accordingly. + (setq prolog-temporary-file-name + (make-temp-file "prolcomp" nil ".pl")))) + +(defun prolog-goto-prolog-process-buffer () + "Switch to the prolog process buffer and go to its end." + (switch-to-buffer-other-window "*prolog*") + (goto-char (point-max)) +) + +(defun prolog-enable-sicstus-sd () + "Enable the source level debugging facilities of SICStus 3.7 and later." + (interactive) + (require 'pltrace) ; Load the SICStus debugger code + ;; Turn on the source level debugging by default + (add-hook 'prolog-inferior-mode-hook 'pltrace-on) + (if (not prolog-use-sicstus-sd) + (progn + ;; If there is a *prolog* buffer, then call pltrace-on + (if (get-buffer "*prolog*") + ;; Avoid compilation warnings by using eval + (eval '(pltrace-on))) + (setq prolog-use-sicstus-sd t) + ))) + +(defun prolog-disable-sicstus-sd () + "Disable the source level debugging facilities of SICStus 3.7 and later." + (interactive) + (setq prolog-use-sicstus-sd nil) + ;; Remove the hook + (remove-hook 'prolog-inferior-mode-hook 'pltrace-on) + ;; If there is a *prolog* buffer, then call pltrace-off + (if (get-buffer "*prolog*") + ;; Avoid compile warnings by using eval + (eval '(pltrace-off)))) -(defun prolog-consult-region (compile beg end) - "Send the region to the Prolog process made by \"M-x run-prolog\". -If COMPILE (prefix arg) is not nil, use compile mode rather than consult mode." - (interactive "P\nr") - (let ((proc (inferior-prolog-process))) - (comint-send-string proc - (if compile prolog-compile-string - prolog-consult-string)) - (comint-send-region proc beg end) - (comint-send-string proc "\n") ;May be unnecessary - (if prolog-eof-string - (comint-send-string proc prolog-eof-string) - (with-current-buffer (process-buffer proc) - (comint-send-eof))))) ;Send eof to prolog process. - -(defun prolog-consult-region-and-go (compile beg end) - "Send the region to the inferior Prolog, and switch to *prolog* buffer. -If COMPILE (prefix arg) is not nil, use compile mode rather than consult mode." - (interactive "P\nr") - (prolog-consult-region compile beg end) - (pop-to-buffer inferior-prolog-buffer)) - -;; inferior-prolog-mode uses the autoloaded compilation-shell-minor-mode. -(declare-function compilation-forget-errors "compile" ()) - -(defun inferior-prolog-load-file () - "Pass the current buffer's file to the inferior prolog process." - (interactive) - (save-buffer) - (let ((file buffer-file-name) - (proc (inferior-prolog-process))) - (with-current-buffer (process-buffer proc) - (compilation-forget-errors) - (comint-send-string proc (concat "['" (file-relative-name file) "'].\n")) - (pop-to-buffer (current-buffer))))) +(defun prolog-toggle-sicstus-sd () + ;; FIXME: Use define-minor-mode. + "Toggle the source level debugging facilities of SICStus 3.7 and later." + (interactive) + (if prolog-use-sicstus-sd + (prolog-disable-sicstus-sd) + (prolog-enable-sicstus-sd))) + +(defun prolog-debug-on (&optional arg) + "Enable debugging. +When called with prefix argument ARG, disable debugging instead." + (interactive "P") + (if arg + (prolog-debug-off) + (prolog-process-insert-string (get-process "prolog") + prolog-debug-on-string) + (process-send-string "prolog" prolog-debug-on-string))) + +(defun prolog-debug-off () + "Disable debugging." + (interactive) + (prolog-process-insert-string (get-process "prolog") + prolog-debug-off-string) + (process-send-string "prolog" prolog-debug-off-string)) + +(defun prolog-trace-on (&optional arg) + "Enable tracing. +When called with prefix argument ARG, disable tracing instead." + (interactive "P") + (if arg + (prolog-trace-off) + (prolog-process-insert-string (get-process "prolog") + prolog-trace-on-string) + (process-send-string "prolog" prolog-trace-on-string))) + +(defun prolog-trace-off () + "Disable tracing." + (interactive) + (prolog-process-insert-string (get-process "prolog") + prolog-trace-off-string) + (process-send-string "prolog" prolog-trace-off-string)) + +(defun prolog-zip-on (&optional arg) + "Enable zipping (for SICStus 3.7 and later). +When called with prefix argument ARG, disable zipping instead." + (interactive "P") + (if (not (and (eq prolog-system 'sicstus) + (prolog-atleast-version '(3 . 7)))) + (error "Only works for SICStus 3.7 and later")) + (if arg + (prolog-zip-off) + (prolog-process-insert-string (get-process "prolog") + prolog-zip-on-string) + (process-send-string "prolog" prolog-zip-on-string))) + +(defun prolog-zip-off () + "Disable zipping (for SICStus 3.7 and later)." + (interactive) + (prolog-process-insert-string (get-process "prolog") + prolog-zip-off-string) + (process-send-string "prolog" prolog-zip-off-string)) + +;; (defun prolog-create-predicate-index () +;; "Create an index for all predicates in the buffer." +;; (let ((predlist '()) +;; clauseinfo +;; object +;; pos +;; ) +;; (goto-char (point-min)) +;; ;; Replace with prolog-clause-start! +;; (while (re-search-forward "^.+:-" nil t) +;; (setq pos (match-beginning 0)) +;; (setq clauseinfo (prolog-clause-info)) +;; (setq object (prolog-in-object)) +;; (setq predlist (append +;; predlist +;; (list (cons +;; (if (and (eq prolog-system 'sicstus) +;; (prolog-in-object)) +;; (format "%s::%s/%d" +;; object +;; (nth 0 clauseinfo) +;; (nth 1 clauseinfo)) +;; (format "%s/%d" +;; (nth 0 clauseinfo) +;; (nth 1 clauseinfo))) +;; pos +;; )))) +;; (prolog-end-of-predicate)) +;; predlist)) + +(defun prolog-get-predspec () + (save-excursion + (let ((state (prolog-clause-info)) + (object (prolog-in-object))) + (if (or (equal (nth 0 state) "") (equal (prolog-in-string-or-comment) 'cmt)) + nil + (if (and (eq prolog-system 'sicstus) + object) + (format "%s::%s/%d" + object + (nth 0 state) + (nth 1 state)) + (format "%s/%d" + (nth 0 state) + (nth 1 state))) + )))) + +;; For backward compatibility. Stolen from custom.el. +(or (fboundp 'match-string) + ;; Introduced in Emacs 19.29. + (defun match-string (num &optional string) + "Return string of text matched by last search. +NUM specifies which parenthesized expression in the last regexp. + Value is nil if NUMth pair didn't match, or there were less than NUM pairs. +Zero means the entire text matched by the whole regexp or whole string. +STRING should be given if the last search was by `string-match' on STRING." + (if (match-beginning num) + (if string + (substring string (match-beginning num) (match-end num)) + (buffer-substring (match-beginning num) (match-end num)))))) + +(defun prolog-pred-start () + "Return the starting point of the first clause of the current predicate." + (save-excursion + (goto-char (prolog-clause-start)) + ;; Find first clause, unless it was a directive + (if (and (not (looking-at "[:?]-")) + (not (looking-at "[ \t]*[%/]")) ; Comment + + ) + (let* ((pinfo (prolog-clause-info)) + (predname (nth 0 pinfo)) + (arity (nth 1 pinfo)) + (op (point))) + (while (and (re-search-backward + (format "^%s\\([(\\.]\\| *%s\\)" + predname prolog-head-delimiter) nil t) + (= arity (nth 1 (prolog-clause-info))) + ) + (setq op (point))) + (if (eq prolog-system 'mercury) + ;; Skip to the beginning of declarations of the predicate + (progn + (goto-char (prolog-beginning-of-clause)) + (while (and (not (eq (point) op)) + (looking-at + (format ":-[ \t]*\\(pred\\|mode\\)[ \t]+%s" + predname))) + (setq op (point)) + (goto-char (prolog-beginning-of-clause))))) + op) + (point)))) + +(defun prolog-pred-end () + "Return the position at the end of the last clause of the current predicate." + (save-excursion + (goto-char (prolog-clause-end)) ; if we are before the first predicate + (goto-char (prolog-clause-start)) + (let* ((pinfo (prolog-clause-info)) + (predname (nth 0 pinfo)) + (arity (nth 1 pinfo)) + oldp + (notdone t) + (op (point))) + (if (looking-at "[:?]-") + ;; This was a directive + (progn + (if (and (eq prolog-system 'mercury) + (looking-at + (format ":-[ \t]*\\(pred\\|mode\\)[ \t]+\\(%s+\\)" + prolog-atom-regexp))) + ;; Skip predicate declarations + (progn + (setq predname (buffer-substring-no-properties + (match-beginning 2) (match-end 2))) + (while (re-search-forward + (format + "\n*\\(:-[ \t]*\\(pred\\|mode\\)[ \t]+\\)?%s[( \t]" + predname) + nil t)))) + (goto-char (prolog-clause-end)) + (setq op (point))) + ;; It was not a directive, find the last clause + (while (and notdone + (re-search-forward + (format "^%s\\([(\\.]\\| *%s\\)" + predname prolog-head-delimiter) nil t) + (= arity (nth 1 (prolog-clause-info)))) + (setq oldp (point)) + (setq op (prolog-clause-end)) + (if (>= oldp op) + ;; End of clause not found. + (setq notdone nil) + ;; Continue while loop + (goto-char op)))) + op))) + +(defun prolog-clause-start (&optional not-allow-methods) + "Return the position at the start of the head of the current clause. +If NOTALLOWMETHODS is non-nil then do not match on methods in +objects (relevent only if 'prolog-system' is set to 'sicstus)." + (save-excursion + (let ((notdone t) + (retval (point-min))) + (end-of-line) + + ;; SICStus object? + (if (and (not not-allow-methods) + (eq prolog-system 'sicstus) + (prolog-in-object)) + (while (and + notdone + ;; Search for a head or a fact + (re-search-backward + ;; If in object, then find method start. + ;; "^[ \t]+[a-z$].*\\(:-\\|&\\|:: {\\|,\\)" + "^[ \t]+[a-z$].*\\(:-\\|&\\|:: {\\)" ; The comma causes + ; problems since we cannot assume + ; that the line starts at column 0, + ; thus we don't know if the line + ; is a head or a subgoal + (point-min) t)) + (if (>= (prolog-paren-balance) 0) ; To no match on " a) :-" + ;; Start of method found + (progn + (setq retval (point)) + (setq notdone nil))) + ) ; End of while + + ;; Not in object + (while (and + notdone + ;; Search for a text at beginning of a line + ;; ###### + ;; (re-search-backward "^[a-z$']" nil t)) + (let ((case-fold-search nil)) + (re-search-backward + ;; (format "^[%s$']" prolog-lower-case-string) + ;; FIXME: Use [:lower:] + (format "^\\([%s$']\\|[:?]-\\)" prolog-lower-case-string) + nil t))) + (let ((bal (prolog-paren-balance))) + (cond + ((> bal 0) + ;; Start of clause found + (progn + (setq retval (point)) + (setq notdone nil))) + ((and (= bal 0) + (looking-at + (format ".*\\(\\.\\|%s\\|!,\\)[ \t]*\\(%%.*\\|\\)$" + prolog-head-delimiter))) + ;; Start of clause found if the line ends with a '.' or + ;; a prolog-head-delimiter + (progn + (setq retval (point)) + (setq notdone nil)) + ) + (t nil) ; Do nothing + )))) + + retval))) + +(defun prolog-clause-end (&optional not-allow-methods) + "Return the position at the end of the current clause. +If NOTALLOWMETHODS is non-nil then do not match on methods in +objects (relevent only if 'prolog-system' is set to 'sicstus)." + (save-excursion + (beginning-of-line) ; Necessary since we use "^...." for the search. + (if (re-search-forward + (if (and (not not-allow-methods) + (eq prolog-system 'sicstus) + (prolog-in-object)) + (format + "^\\(%s\\|%s\\|[^\n\'\"%%]\\)*&[ \t]*\\(\\|%%.*\\)$\\|[ \t]*}" + prolog-quoted-atom-regexp prolog-string-regexp) + (format + "^\\(%s\\|%s\\|[^\n\'\"%%]\\)*\\.[ \t]*\\(\\|%%.*\\)$" + prolog-quoted-atom-regexp prolog-string-regexp)) + nil t) + (if (and (prolog-in-string-or-comment) + (not (eobp))) + (progn + (forward-char) + (prolog-clause-end)) + (point)) + (point)))) + +(defun prolog-clause-info () + "Return a (name arity) list for the current clause." + (save-excursion + (goto-char (prolog-clause-start)) + (let* ((op (point)) + (predname + (if (looking-at prolog-atom-char-regexp) + (progn + (skip-chars-forward "^ (\\.") + (buffer-substring op (point))) + "")) + (arity 0)) + ;; Retrieve the arity. + (if (looking-at prolog-left-paren) + (let ((endp (save-excursion + (prolog-forward-list) (point)))) + (setq arity 1) + (forward-char 1) ; Skip the opening paren. + (while (progn + (skip-chars-forward "^[({,'\"") + (< (point) endp)) + (if (looking-at ",") + (progn + (setq arity (1+ arity)) + (forward-char 1) ; Skip the comma. + ) + ;; We found a string, list or something else we want + ;; to skip over. Always use prolog-tokenize, + ;; parse-partial-sexp does not have a 'skipover mode. + (goto-char (nth 5 (prolog-tokenize (point) endp 'skipover)))) + ))) + (list predname arity)))) + +(defun prolog-in-object () + "Return object name if the point is inside a SICStus object definition." + ;; Return object name if the last line that starts with a character + ;; that is neither white space nor a comment start + (save-excursion + (if (save-excursion + (beginning-of-line) + (looking-at "\\([^\n ]+\\)[ \t]*::[ \t]*{")) + ;; We were in the head of the object + (match-string 1) + ;; We were not in the head + (if (and (re-search-backward "^[a-z$'}]" nil t) + (looking-at "\\([^\n ]+\\)[ \t]*::[ \t]*{")) + (match-string 1) + nil)))) + +(defun prolog-forward-list () + "Move the point to the matching right parenthesis." + (interactive) + (if prolog-use-prolog-tokenizer-flag + (let ((state (prolog-tokenize (point) (point-max) 'zerodepth))) + (goto-char (nth 5 state))) + (forward-list))) + +;; NB: This could be done more efficiently! +(defun prolog-backward-list () + "Move the point to the matching left parenthesis." + (interactive) + (if prolog-use-prolog-tokenizer-flag + (let ((bal 0) + (paren-regexp (concat prolog-left-paren "\\|" prolog-right-paren)) + (notdone t)) + ;; FIXME: Doesn't this incorrectly count 0'( and 0') ? + (while (and notdone (re-search-backward paren-regexp nil t)) + (cond + ((looking-at prolog-left-paren) + (if (not (prolog-in-string-or-comment)) + (setq bal (1+ bal))) + (if (= bal 0) + (setq notdone nil))) + ((looking-at prolog-right-paren) + (if (not (prolog-in-string-or-comment)) + (setq bal (1- bal)))) + ))) + (backward-list))) + +(defun prolog-beginning-of-clause () + "Move to the beginning of current clause. +If already at the beginning of clause, move to previous clause." + (interactive) + (let ((point (point)) + (new-point (prolog-clause-start))) + (if (and (>= new-point point) + (> point 1)) + (progn + (goto-char (1- point)) + (goto-char (prolog-clause-start))) + (goto-char new-point) + (skip-chars-forward " \t")))) + +;; (defun prolog-previous-clause () +;; "Move to the beginning of the previous clause." +;; (interactive) +;; (forward-char -1) +;; (prolog-beginning-of-clause)) + +(defun prolog-end-of-clause () + "Move to the end of clause. +If already at the end of clause, move to next clause." + (interactive) + (let ((point (point)) + (new-point (prolog-clause-end))) + (if (and (<= new-point point) + (not (eq new-point (point-max)))) + (progn + (goto-char (1+ point)) + (goto-char (prolog-clause-end))) + (goto-char new-point)))) + +;; (defun prolog-next-clause () +;; "Move to the beginning of the next clause." +;; (interactive) +;; (prolog-end-of-clause) +;; (forward-char) +;; (prolog-end-of-clause) +;; (prolog-beginning-of-clause)) + +(defun prolog-beginning-of-predicate () + "Go to the nearest beginning of predicate before current point. +Return the final point or nil if no such a beginning was found." + (interactive) + (let ((op (point)) + (pos (prolog-pred-start))) + (if pos + (if (= op pos) + (if (not (bobp)) + (progn + (goto-char pos) + (backward-char 1) + (setq pos (prolog-pred-start)) + (if pos + (progn + (goto-char pos) + (point))))) + (goto-char pos) + (point))))) + +(defun prolog-end-of-predicate () + "Go to the end of the current predicate." + (interactive) + (let ((op (point))) + (goto-char (prolog-pred-end)) + (if (= op (point)) + (progn + (forward-line 1) + (prolog-end-of-predicate))))) + +(defun prolog-insert-predspec () + "Insert the predspec for the current predicate." + (interactive) + (let* ((pinfo (prolog-clause-info)) + (predname (nth 0 pinfo)) + (arity (nth 1 pinfo))) + (insert (format "%s/%d" predname arity)))) + +(defun prolog-view-predspec () + "Insert the predspec for the current predicate." + (interactive) + (let* ((pinfo (prolog-clause-info)) + (predname (nth 0 pinfo)) + (arity (nth 1 pinfo))) + (message (format "%s/%d" predname arity)))) + +(defun prolog-insert-predicate-template () + "Insert the template for the current clause." + (interactive) + (let* ((n 1) + oldp + (pinfo (prolog-clause-info)) + (predname (nth 0 pinfo)) + (arity (nth 1 pinfo))) + (insert predname) + (if (> arity 0) + (progn + (insert "(") + (when prolog-electric-dot-full-predicate-template + (setq oldp (point)) + (while (< n arity) + (insert ",") + (setq n (1+ n))) + (insert ")") + (goto-char oldp)) + )) + )) + +(defun prolog-insert-next-clause () + "Insert newline and the name of the current clause." + (interactive) + (insert "\n") + (prolog-insert-predicate-template)) + +(defun prolog-insert-module-modeline () + "Insert a modeline for module specification. +This line should be first in the buffer. +The module name should be written manually just before the semi-colon." + (interactive) + (insert "%%% -*- Module: ; -*-\n") + (backward-char 6)) + +(defalias 'prolog-uncomment-region + (if (fboundp 'uncomment-region) #'uncomment-region + (lambda (beg end) + "Uncomment the region between BEG and END." + (interactive "r") + (comment-region beg end -1)))) + +(defun prolog-goto-comment-column (&optional nocreate) + "Move comments on the current line to the correct position. +If NOCREATE is nil (or omitted) and there is no comment on the line, then +a new comment is created." + (interactive) + (beginning-of-line) + (if (or (not nocreate) + (and + (re-search-forward + (format "^\\(\\(%s\\|%s\\|[^\n\'\"%%]\\)*\\)%% *" + prolog-quoted-atom-regexp prolog-string-regexp) + (line-end-position) 'limit) + (progn + (goto-char (match-beginning 0)) + (not (eq (prolog-in-string-or-comment) 'txt))))) + (indent-for-comment))) + +(defun prolog-indent-predicate () + "*Indent the current predicate." + (interactive) + (indent-region (prolog-pred-start) (prolog-pred-end) nil)) + +(defun prolog-indent-buffer () + "*Indent the entire buffer." + (interactive) + (indent-region (point-min) (point-max) nil)) + +(defun prolog-mark-clause () + "Put mark at the end of this clause and move point to the beginning." + (interactive) + (let ((pos (point))) + (goto-char (prolog-clause-end)) + (forward-line 1) + (beginning-of-line) + (set-mark (point)) + (goto-char pos) + (goto-char (prolog-clause-start)))) + +(defun prolog-mark-predicate () + "Put mark at the end of this predicate and move point to the beginning." + (interactive) + (goto-char (prolog-pred-end)) + (let ((pos (point))) + (forward-line 1) + (beginning-of-line) + (set-mark (point)) + (goto-char pos) + (goto-char (prolog-pred-start)))) + +;; Stolen from `cc-mode.el': +(defun prolog-electric-delete (arg) + "Delete preceding character or whitespace. +If `prolog-hungry-delete-key-flag' is non-nil, then all preceding whitespace is +consumed. If however an ARG is supplied, or `prolog-hungry-delete-key-flag' is +nil, or point is inside a literal then the function in the variable +`backward-delete-char' is called." + (interactive "P") + (if (or (not prolog-hungry-delete-key-flag) + arg + (prolog-in-string-or-comment)) + (funcall 'backward-delete-char (prefix-numeric-value arg)) + (let ((here (point))) + (skip-chars-backward " \t\n") + (if (/= (point) here) + (delete-region (point) here) + (funcall 'backward-delete-char 1) + )))) + +;; For XEmacs compatibility (suggested by Per Mildner) +(put 'prolog-electric-delete 'pending-delete 'supersede) + +(defun prolog-electric-if-then-else (arg) + "If `prolog-electric-if-then-else-flag' is non-nil, indent if-then-else constructs. +Bound to the >, ; and ( keys." + (interactive "P") + (self-insert-command (prefix-numeric-value arg)) + (if prolog-electric-if-then-else-flag (prolog-insert-spaces-after-paren))) + +(defun prolog-electric-colon (arg) + "If `prolog-electric-colon-flag' is non-nil, insert the electric `:' construct. +That is, insert space (if appropriate), `:-' and newline if colon is pressed +at the end of a line that starts in the first column (i.e., clause +heads)." + (interactive "P") + (if (and prolog-electric-colon-flag + (null arg) + (eolp) + ;(not (string-match "^\\s " (thing-at-point 'line)))) + (not (string-match "^\\(\\s \\|%\\)" (thing-at-point 'line)))) + (progn + (unless (save-excursion (backward-char 1) (looking-at "\\s ")) + (insert " ")) + (insert ":-\n") + (prolog-indent-line)) + (self-insert-command (prefix-numeric-value arg)))) + +(defun prolog-electric-dash (arg) + "If `prolog-electric-dash-flag' is non-nil, insert the electric `-' construct. +that is, insert space (if appropriate), `-->' and newline if dash is pressed +at the end of a line that starts in the first column (i.e., DCG +heads)." + (interactive "P") + (if (and prolog-electric-dash-flag + (null arg) + (eolp) + ;(not (string-match "^\\s " (thing-at-point 'line)))) + (not (string-match "^\\(\\s \\|%\\)" (thing-at-point 'line)))) + (progn + (unless (save-excursion (backward-char 1) (looking-at "\\s ")) + (insert " ")) + (insert "-->\n") + (prolog-indent-line)) + (self-insert-command (prefix-numeric-value arg)))) + +(defun prolog-electric-dot (arg) + "Insert dot and newline or a head of a new clause. + +If `prolog-electric-dot-flag' is nil, then simply insert dot. +Otherwise:: +When invoked at the end of nonempty line, insert dot and newline. +When invoked at the end of an empty line, insert a recursive call to +the current predicate. +When invoked at the beginning of line, insert a head of a new clause +of the current predicate. + +When called with prefix argument ARG, insert just dot." + (interactive "P") + ;; Check for situations when the electricity should not be active + (if (or (not prolog-electric-dot-flag) + arg + (prolog-in-string-or-comment) + ;; Do not be electric in a floating point number or an operator + (not + (or + ;; (re-search-backward + ;; ###### + ;; "\\(^\\|[])}a-zA-Z_!'0-9]+\\)[ \t]*\\=" nil t))) + (save-excursion + (re-search-backward + ;; "\\(^\\|[])}_!'0-9]+\\)[ \t]*\\=" nil t))) + "\\(^\\|[])}_!'0-9]+\\)[ \t]*\\=" + nil t)) + (save-excursion + (re-search-backward + ;; "\\(^\\|[])}a-zA-Z]+\\)[ \t]*\\=" nil t))) + (format "\\(^\\|[])}%s]+\\)[ \t]*\\=" + prolog-lower-case-string) ;FIXME: [:lower:] + nil t)) + (save-excursion + (re-search-backward + ;; "\\(^\\|[])}a-zA-Z]+\\)[ \t]*\\=" nil t))) + (format "\\(^\\|[])}%s]+\\)[ \t]*\\=" + prolog-upper-case-string) ;FIXME: [:upper:] + nil t)) + ) + ) + ;; Do not be electric if inside a parenthesis pair. + (not (= (prolog-region-paren-balance (prolog-clause-start) (point)) + 0)) + ) + (funcall 'self-insert-command (prefix-numeric-value arg)) + (cond + ;; Beginning of line + ((bolp) + (prolog-insert-predicate-template)) + ;; At an empty line with at least one whitespace + ((save-excursion + (beginning-of-line) + (looking-at "[ \t]+$")) + (prolog-insert-predicate-template) + (when prolog-electric-dot-full-predicate-template + (save-excursion + (end-of-line) + (insert ".\n")))) + ;; Default + (t + (insert ".\n")) + ))) + +(defun prolog-electric-underscore () + "Replace variable with an underscore. +If `prolog-electric-underscore-flag' is non-nil and the point is +on a variable then replace the variable with underscore and skip +the following comma and whitespace, if any. +If the point is not on a variable then insert underscore." + (interactive) + (if prolog-electric-underscore-flag + (let (;start + (case-fold-search nil) + (oldp (point))) + ;; ###### + ;;(skip-chars-backward "a-zA-Z_") + (skip-chars-backward + (format "%s%s_" + ;; FIXME: Why not "a-zA-Z"? + prolog-lower-case-string + prolog-upper-case-string)) + + ;(setq start (point)) + (if (and (not (prolog-in-string-or-comment)) + ;; ###### + ;; (looking-at "\\<[_A-Z][a-zA-Z_0-9]*\\>")) + (looking-at (format "\\<[_%s][%s%s_0-9]*\\>" + ;; FIXME: Use [:upper:] and friends. + prolog-upper-case-string + prolog-lower-case-string + prolog-upper-case-string))) + (progn + (replace-match "_") + (skip-chars-forward ", \t\n")) + (goto-char oldp) + (self-insert-command 1)) + ) + (self-insert-command 1)) + ) + + +(defun prolog-find-term (functor arity &optional prefix) + "Go to the position at the start of the next occurance of a term. +The term is specified with FUNCTOR and ARITY. The optional argument +PREFIX is the prefix of the search regexp." + (let* (;; If prefix is not set then use the default "\\<" + (prefix (if (not prefix) + "\\<" + prefix)) + (regexp (concat prefix functor)) + (i 1)) + + ;; Build regexp for the search if the arity is > 0 + (if (= arity 0) + ;; Add that the functor must be at the end of a word. This + ;; does not work if the arity is > 0 since the closing ) + ;; is not a word constituent. + (setq regexp (concat regexp "\\>")) + ;; Arity is > 0, add parens and commas + (setq regexp (concat regexp "(")) + (while (< i arity) + (setq regexp (concat regexp ".+,")) + (setq i (1+ i))) + (setq regexp (concat regexp ".+)"))) + + ;; Search, and return position + (if (re-search-forward regexp nil t) + (goto-char (match-beginning 0)) + (error "Term not found")) + )) + +(defun prolog-variables-to-anonymous (beg end) + "Replace all variables within a region BEG to END by anonymous variables." + (interactive "r") + (save-excursion + (let ((case-fold-search nil)) + (goto-char end) + (while (re-search-backward "\\<[A-Z_][a-zA-Z_0-9]*\\>" beg t) + (progn + (replace-match "_") + (backward-char))) + ))) + + +(defun prolog-set-atom-regexps () + "Set the `prolog-atom-char-regexp' and `prolog-atom-regexp' variables. +Must be called after `prolog-build-case-strings'." + (setq prolog-atom-char-regexp + (format "[%s%s0-9_$]" + ;; FIXME: why not a-zA-Z? + prolog-lower-case-string + prolog-upper-case-string)) + (setq prolog-atom-regexp + (format "[%s$]%s*" + prolog-lower-case-string + prolog-atom-char-regexp)) + ) + +(defun prolog-build-case-strings () + "Set `prolog-upper-case-string' and `prolog-lower-case-string'. +Uses the current case-table for extracting the relevant information." + (let ((up_string "") + (low_string "")) + ;; Use `map-char-table' if it is defined. Otherwise enumerate all + ;; numbers between 0 and 255. `map-char-table' is probably safer. + ;; + ;; `map-char-table' causes problems under Emacs 23.0.0.1, the + ;; while loop seems to do its job well (Ryszard Szopa) + ;; + ;;(if (and (not (featurep 'xemacs)) + ;; (fboundp 'map-char-table)) + ;; (map-char-table + ;; (lambda (key value) + ;; (cond + ;; ((and + ;; (eq (prolog-int-to-char key) (downcase key)) + ;; (eq (prolog-int-to-char key) (upcase key))) + ;; ;; Do nothing if upper and lower case are the same + ;; ) + ;; ((eq (prolog-int-to-char key) (downcase key)) + ;; ;; The char is lower case + ;; (setq low_string (format "%s%c" low_string key))) + ;; ((eq (prolog-int-to-char key) (upcase key)) + ;; ;; The char is upper case + ;; (setq up_string (format "%s%c" up_string key))) + ;; )) + ;; (current-case-table)) + ;; `map-char-table' was undefined. + (let ((key 0)) + (while (< key 256) + (cond + ((and + (eq (prolog-int-to-char key) (downcase key)) + (eq (prolog-int-to-char key) (upcase key))) + ;; Do nothing if upper and lower case are the same + ) + ((eq (prolog-int-to-char key) (downcase key)) + ;; The char is lower case + (setq low_string (format "%s%c" low_string key))) + ((eq (prolog-int-to-char key) (upcase key)) + ;; The char is upper case + (setq up_string (format "%s%c" up_string key))) + ) + (setq key (1+ key)))) + ;; ) + ;; The strings are single-byte strings + (setq prolog-upper-case-string (prolog-dash-letters up_string)) + (setq prolog-lower-case-string (prolog-dash-letters low_string)) + )) + +;(defun prolog-regexp-dash-continuous-chars (chars) +; (let ((ints (mapcar #'prolog-char-to-int (string-to-list chars))) +; (beg 0) +; (end 0)) +; (if (null ints) +; chars +; (while (and (< (+ beg 1) (length chars)) +; (not (or (= (+ (nth beg ints) 1) (nth (+ beg 1) ints)) +; (= (nth beg ints) (nth (+ beg 1) ints))))) +; (setq beg (+ beg 1))) +; (setq beg (+ beg 1) +; end beg) +; (while (and (< (+ end 1) (length chars)) +; (or (= (+ (nth end ints) 1) (nth (+ end 1) ints)) +; (= (nth end ints) (nth (+ end 1) ints)))) +; (setq end (+ end 1))) +; (if (equal (substring chars end) "") +; (substring chars 0 beg) +; (concat (substring chars 0 beg) "-" +; (prolog-regexp-dash-continuous-chars (substring chars end)))) +; ))) + +(defun prolog-ints-intervals (ints) + "Return a list of intervals (from . to) covering INTS." + (when ints + (setq ints (sort ints '<)) + (let ((prev (car ints)) + (interval-start (car ints)) + intervals) + (while ints + (let ((next (car ints))) + (when (> next (1+ prev)) ; start of new interval + (setq intervals (cons (cons interval-start prev) intervals)) + (setq interval-start next)) + (setq prev next) + (setq ints (cdr ints)))) + (setq intervals (cons (cons interval-start prev) intervals)) + (reverse intervals)))) + +(defun prolog-dash-letters (string) + "Return a condensed regexp covering all letters in STRING." + (let ((intervals (prolog-ints-intervals (mapcar #'prolog-char-to-int + (string-to-list string)))) + codes) + (while intervals + (let* ((i (car intervals)) + (from (car i)) + (to (cdr i)) + (c (cond ((= from to) `(,from)) + ((= (1+ from) to) `(,from ,to)) + (t `(,from ?- ,to))))) + (setq codes (cons c codes))) + (setq intervals (cdr intervals))) + (apply 'concat (reverse codes)))) + +;(defun prolog-condense-character-sets (regexp) +; "Condense adjacent characters in character sets of REGEXP." +; (let ((next -1)) +; (while (setq next (string-match "\\[\\(.*?\\)\\]" regexp (1+ next))) +; (setq regexp (replace-match (prolog-dash-letters (match-string 1 regexp)) +; t t regexp 1)))) +; regexp) + +;; GNU Emacs compatibility: GNU Emacs does not differentiate between +;; ints and chars, or at least these two are interchangeable. +(defalias 'prolog-int-to-char + (if (fboundp 'int-to-char) #'int-to-char #'identity)) + +(defalias 'prolog-char-to-int + (if (fboundp 'char-to-int) #'char-to-int #'identity)) + +;;------------------------------------------------------------------- +;; Menu stuff (both for the editing buffer and for the inferior +;; prolog buffer) +;;------------------------------------------------------------------- + +(unless (fboundp 'region-exists-p) + (defun region-exists-p () + "Non-nil iff the mark is set. Lobotomized version for Emacsen that do not provide their own." + (mark))) + + +;; GNU Emacs ignores `easy-menu-add' so the order in which the menus +;; are defined _is_ important! + +(easy-menu-define + prolog-menu-help (list prolog-mode-map prolog-inferior-mode-map) + "Help menu for the Prolog mode." + ;; FIXME: Does it really deserve a whole menu to itself? + `(,(if (featurep 'xemacs) "Help" + ;; Not sure it's worth the trouble. --Stef + ;; (add-to-list 'menu-bar-final-items + ;; (easy-menu-intern "Prolog-Help")) + "Prolog-help") + ["On predicate" prolog-help-on-predicate prolog-help-function-i] + ["Apropos" prolog-help-apropos (eq prolog-system 'swi)] + "---" + ["Describe mode" describe-mode t])) + +(easy-menu-define + prolog-edit-menu-runtime prolog-mode-map + "Runtime Prolog commands available from the editing buffer" + ;; FIXME: Don't use a whole menu for just "Run Mercury". --Stef + `("System" + ;; Runtime menu name. + ,@(unless (featurep 'xemacs) + '(:label (cond ((eq prolog-system 'eclipse) "ECLiPSe") + ((eq prolog-system 'mercury) "Mercury") + (t "System")))) + + ;; Consult items, NIL for mercury. + ["Consult file" prolog-consult-file + :included (not (eq prolog-system 'mercury))] + ["Consult buffer" prolog-consult-buffer + :included (not (eq prolog-system 'mercury))] + ["Consult region" prolog-consult-region :active (region-exists-p) + :included (not (eq prolog-system 'mercury))] + ["Consult predicate" prolog-consult-predicate + :included (not (eq prolog-system 'mercury))] + + ;; Compile items, NIL for everything but SICSTUS. + ,(if (featurep 'xemacs) "---" + ["---" nil :included (eq prolog-system 'sicstus)]) + ["Compile file" prolog-compile-file + :included (eq prolog-system 'sicstus)] + ["Compile buffer" prolog-compile-buffer + :included (eq prolog-system 'sicstus)] + ["Compile region" prolog-compile-region :active (region-exists-p) + :included (eq prolog-system 'sicstus)] + ["Compile predicate" prolog-compile-predicate + :included (eq prolog-system 'sicstus)] + + ;; Debug items, NIL for Mercury. + ,(if (featurep 'xemacs) "---" + ["---" nil :included (not (eq prolog-system 'mercury))]) + ;; FIXME: Could we use toggle or radio buttons? --Stef + ["Debug" prolog-debug-on :included (not (eq prolog-system 'mercury))] + ["Debug off" prolog-debug-off + ;; In SICStus, these are pairwise disjunctive, + ;; so it's enough with a single "off"-command + :included (not (memq prolog-system '(mercury sicstus)))] + ["Trace" prolog-trace-on :included (not (eq prolog-system 'mercury))] + ["Trace off" prolog-trace-off + :included (not (memq prolog-system '(mercury sicstus)))] + ["Zip" prolog-zip-on :included (and (eq prolog-system 'sicstus) + (prolog-atleast-version '(3 . 7)))] + ["All debug off" prolog-debug-off + :included (eq prolog-system 'sicstus)] + ["Source level debugging" + prolog-toggle-sicstus-sd + :included (and (eq prolog-system 'sicstus) + (prolog-atleast-version '(3 . 7))) + :style toggle + :selected prolog-use-sicstus-sd] + + "---" + ["Run" run-prolog + :suffix (cond ((eq prolog-system 'eclipse) "ECLiPSe") + ((eq prolog-system 'mercury) "Mercury") + (t "Prolog"))])) + +(easy-menu-define + prolog-edit-menu-insert-move prolog-mode-map + "Commands for Prolog code manipulation." + '("Prolog" + ["Comment region" comment-region (region-exists-p)] + ["Uncomment region" prolog-uncomment-region (region-exists-p)] + ["Add comment/move to comment" indent-for-comment t] + ["Convert variables in region to '_'" prolog-variables-to-anonymous + :active (region-exists-p) :included (not (eq prolog-system 'mercury))] + "---" + ["Insert predicate template" prolog-insert-predicate-template t] + ["Insert next clause head" prolog-insert-next-clause t] + ["Insert predicate spec" prolog-insert-predspec t] + ["Insert module modeline" prolog-insert-module-modeline t] + "---" + ["Beginning of clause" prolog-beginning-of-clause t] + ["End of clause" prolog-end-of-clause t] + ["Beginning of predicate" prolog-beginning-of-predicate t] + ["End of predicate" prolog-end-of-predicate t] + "---" + ["Indent line" prolog-indent-line t] + ["Indent region" indent-region (region-exists-p)] + ["Indent predicate" prolog-indent-predicate t] + ["Indent buffer" prolog-indent-buffer t] + ["Align region" align (region-exists-p)] + "---" + ["Mark clause" prolog-mark-clause t] + ["Mark predicate" prolog-mark-predicate t] + ["Mark paragraph" mark-paragraph t] + ;;"---" + ;;["Fontify buffer" font-lock-fontify-buffer t] + )) + +(defun prolog-menu () + "Add the menus for the Prolog editing buffers." + + (easy-menu-add prolog-edit-menu-insert-move) + (easy-menu-add prolog-edit-menu-runtime) + + ;; Add predicate index menu + (set (make-local-variable 'imenu-create-index-function) + 'imenu-default-create-index-function) + ;;Milan (this has problems with object methods...) ###### Does it? (Stefan) + (setq imenu-prev-index-position-function 'prolog-beginning-of-predicate) + (setq imenu-extract-index-name-function 'prolog-get-predspec) + + (if (and prolog-imenu-flag + (< (count-lines (point-min) (point-max)) prolog-imenu-max-lines)) + (imenu-add-to-menubar "Predicates")) + + (easy-menu-add prolog-menu-help)) + +(easy-menu-define + prolog-inferior-menu-all prolog-inferior-mode-map + "Menu for the inferior Prolog buffer." + `("Prolog" + ;; Runtime menu name. + ,@(unless (featurep 'xemacs) + '(:label (cond ((eq prolog-system 'eclipse) "ECLiPSe") + ((eq prolog-system 'mercury) "Mercury") + (t "Prolog")))) + + ;; Debug items, NIL for Mercury. + ,(if (featurep 'xemacs) "---" + ["---" nil :included (not (eq prolog-system 'mercury))]) + ;; FIXME: Could we use toggle or radio buttons? --Stef + ["Debug" prolog-debug-on :included (not (eq prolog-system 'mercury))] + ["Debug off" prolog-debug-off + ;; In SICStus, these are pairwise disjunctive, + ;; so it's enough with a single "off"-command + :included (not (memq prolog-system '(mercury sicstus)))] + ["Trace" prolog-trace-on :included (not (eq prolog-system 'mercury))] + ["Trace off" prolog-trace-off + :included (not (memq prolog-system '(mercury sicstus)))] + ["Zip" prolog-zip-on :included (and (eq prolog-system 'sicstus) + (prolog-atleast-version '(3 . 7)))] + ["All debug off" prolog-debug-off + :included (eq prolog-system 'sicstus)] + ["Source level debugging" + prolog-toggle-sicstus-sd + :included (and (eq prolog-system 'sicstus) + (prolog-atleast-version '(3 . 7))) + :style toggle + :selected prolog-use-sicstus-sd] + + ;; Runtime. + "---" + ["Interrupt Prolog" comint-interrupt-subjob t] + ["Quit Prolog" comint-quit-subjob t] + ["Kill Prolog" comint-kill-subjob t])) + + +(defun prolog-inferior-menu () + "Create the menus for the Prolog inferior buffer. +This menu is dynamically created because one may change systems during +the life of an Emacs session." + (easy-menu-add prolog-inferior-menu-all) + (easy-menu-add prolog-menu-help)) + +(defun prolog-mode-version () + "Echo the current version of Prolog mode in the minibuffer." + (interactive) + (message "Using Prolog mode version %s" prolog-mode-version)) (provide 'prolog) diff --git a/lisp/progmodes/ps-mode.el b/lisp/progmodes/ps-mode.el index 6158952772a..f3418a60729 100644 --- a/lisp/progmodes/ps-mode.el +++ b/lisp/progmodes/ps-mode.el @@ -1,7 +1,6 @@ ;;; ps-mode.el --- PostScript mode for GNU Emacs -;; Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1999, 2001-2011 Free Software Foundation, Inc. ;; Author: Peter Kleiweg <p.c.j.kleiweg@rug.nl> ;; Maintainer: Peter Kleiweg <p.c.j.kleiweg@rug.nl> @@ -1167,5 +1166,4 @@ Use line numbers if `ps-run-error-line-numbers' is not nil" (provide 'ps-mode) -;; arch-tag: dce13d2d-69fb-4ec4-9d5d-6dd29c3f0e6e ;;; ps-mode.el ends here diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 2428ecb7555..4246177495c 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -1,7 +1,6 @@ ;;; python.el --- silly walks for Python -*- coding: iso-8859-1 -*- -;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2003-2011 Free Software Foundation, Inc. ;; Author: Dave Love <fx@gnu.org> ;; Maintainer: FSF @@ -2549,7 +2548,6 @@ with skeleton expansions for compound statement templates. (^ '(- (1+ (current-indentation)))))) ;; Python defines TABs as being 8-char wide. (set (make-local-variable 'tab-width) 8) - (unless font-lock-mode (font-lock-mode 1)) (when python-guess-indent (python-guess-indent)) ;; Let's make it harder for the user to shoot himself in the foot. (unless (= tab-width python-indent) diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index b6158a0e581..9d40b4d8fd7 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -1,8 +1,6 @@ ;;; ruby-mode.el --- Major mode for editing Ruby files -;; Copyright (C) 1994, 1995, 1996 1997, 1998, 1999, 2000, 2001, 2002, -;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1994-2011 Free Software Foundation, Inc. ;; Authors: Yukihiro Matsumoto ;; Nobuyoshi Nakada @@ -153,6 +151,7 @@ This should only be called after matching against `ruby-here-doc-beg-re'." (define-key map (kbd "C-M-h") 'backward-kill-word) (define-key map (kbd "C-j") 'reindent-then-newline-and-indent) (define-key map (kbd "C-m") 'newline) + (define-key map (kbd "C-c C-c") 'comment-region) map) "Keymap used in Ruby mode.") @@ -319,7 +318,7 @@ Also ignores spaces after parenthesis when 'space." (cdr (assq coding-system ruby-encoding-map))) coding-system)) "ascii-8bit")) - (if (looking-at "^#![^\n]*ruby") (beginning-of-line 2)) + (if (looking-at "^#!") (beginning-of-line 2)) (cond ((looking-at "\\s *#.*-\*-\\s *\\(en\\)?coding\\s *:\\s *\\([-a-z0-9_]*\\)\\s *\\(;\\|-\*-\\)") (unless (string= (match-string 2) coding-system) (goto-char (match-beginning 2)) @@ -927,6 +926,7 @@ With ARG, do it many times. Negative ARG means move backward." (condition-case nil (while (> i 0) (skip-syntax-forward " ") + (if (looking-at ",\\s *") (goto-char (match-end 0))) (cond ((looking-at "\\?\\(\\\\[CM]-\\)*\\\\?\\S ") (goto-char (match-end 0))) ((progn @@ -1121,16 +1121,15 @@ See `add-log-current-defun-function'." (syntax-propertize-rules ;; #{ }, #$hoge, #@foo are not comments ("\\(#\\)[{$@]" (1 ".")) - ;; the last $', $", $` in the respective string is not variable - ;; the last ?', ?", ?` in the respective string is not ascii code - ("\\(^\\|[\[ \t\n<+\(,=]\\)\\(['\"`]\\)\\(\\\\.\\|\\2\\|[^'\"`\n\\\\]\\)*?\\\\?[?$]\\(\\2\\)" - (2 "\"") - (4 "\"")) ;; $' $" $` .... are variables ;; ?' ?" ?` are ascii codes - ("\\(^\\|[^\\\\]\\)\\(\\\\\\\\\\)*[?$]\\([#\"'`]\\)" (3 ".")) + ("\\([?$]\\)[#\"'`]" + (1 (unless (save-excursion + ;; Not within a string. + (nth 3 (syntax-ppss (match-beginning 0)))) + (string-to-syntax "\\")))) ;; regexps - ("\\(^\\|[=(,~?:;<>]\\|\\(^\\|\\s \\)\\(if\\|elsif\\|unless\\|while\\|until\\|when\\|and\\|or\\|&&\\|||\\)\\|g?sub!?\\|scan\\|split!?\\)\\s *\\(/\\)[^/\n\\\\]*\\(\\\\.[^/\n\\\\]*\\)*\\(/\\)" + ("\\(^\\|[[=(,~?:;<>]\\|\\(^\\|\\s \\)\\(if\\|elsif\\|unless\\|while\\|until\\|when\\|and\\|or\\|&&\\|||\\)\\|g?sub!?\\|scan\\|split!?\\)\\s *\\(/\\)[^/\n\\\\]*\\(\\\\.[^/\n\\\\]*\\)*\\(/\\)" (4 "\"/") (6 "\"/")) ("^=en\\(d\\)\\_>" (1 "!")) @@ -1180,56 +1179,59 @@ It's useful in that it divides up the match string so that "Return a regexp to find the beginning of a heredoc. This should only be called after matching against `ruby-here-doc-end-re'." - (let ((contents (regexp-quote (match-string 2)))) + (let ((contents (concat + (regexp-quote (concat (match-string 2) (match-string 3))) + (if (string= (match-string 3) "_") "\\B" "\\b")))) (concat "<<" (let ((match (match-string 1))) (if (and match (> (length match) 0)) - (concat "\\(?:-\\([\"']?\\)\\|\\([\"']\\)" match "\\)" - contents "\\b\\(\\1\\|\\2\\)") - (concat "-?\\([\"']\\|\\)" contents "\\b\\1")))))) + (concat "\\(?:-\\([\"']?\\)\\|\\([\"']\\)" + (match-string 1) "\\)" + contents "\\(\\1\\|\\2\\)") + (concat "-?\\([\"']\\|\\)" contents "\\1")))))) (defconst ruby-font-lock-syntactic-keywords `( ;; #{ }, #$hoge, #@foo are not comments - ("\\(#\\)[{$@]" 1 (1 . nil)) - ;; the last $', $", $` in the respective string is not variable - ;; the last ?', ?", ?` in the respective string is not ascii code - ("\\(^\\|[\[ \t\n<+\(,=]\\)\\(['\"`]\\)\\(\\\\.\\|\\2\\|[^'\"`\n\\\\]\\)*?\\\\?[?$]\\(\\2\\)" - (2 (7 . nil)) - (4 (7 . nil))) - ;; $' $" $` .... are variables - ;; ?' ?" ?` are ascii codes - ("\\(^\\|[^\\\\]\\)\\(\\\\\\\\\\)*[?$]\\([#\"'`]\\)" 3 (1 . nil)) - ;; regexps - ("\\(^\\|[=(,~?:;<>]\\|\\(^\\|\\s \\)\\(if\\|elsif\\|unless\\|while\\|until\\|when\\|and\\|or\\|&&\\|||\\)\\|g?sub!?\\|scan\\|split!?\\)\\s *\\(/\\)[^/\n\\\\]*\\(\\\\.[^/\n\\\\]*\\)*\\(/\\)" - (4 (7 . ?/)) - (6 (7 . ?/))) - ("^=en\\(d\\)\\_>" 1 "!") - ("^\\(=\\)begin\\_>" 1 (ruby-comment-beg-syntax)) - ;; Currently, the following case is highlighted incorrectly: - ;; - ;; <<FOO - ;; FOO - ;; <<BAR - ;; <<BAZ - ;; BAZ - ;; BAR - ;; - ;; This is because all here-doc beginnings are highlighted before any endings, - ;; so although <<BAR is properly marked as a beginning, when we get to <<BAZ - ;; it thinks <<BAR is part of a string so it's marked as well. - ;; - ;; This may be fixable by modifying ruby-in-here-doc-p to use - ;; ruby-in-non-here-doc-string-p rather than syntax-ppss-context, - ;; but I don't want to try that until we've got unit tests set up - ;; to make sure I don't break anything else. - (,(concat ruby-here-doc-beg-re ".*\\(\n\\)") - ,(+ 1 (regexp-opt-depth ruby-here-doc-beg-re)) - (ruby-here-doc-beg-syntax)) - (,ruby-here-doc-end-re 3 (ruby-here-doc-end-syntax))) - "Syntactic keywords for Ruby mode. See `font-lock-syntactic-keywords'.") + ("\\(#\\)[{$@]" 1 (1 . nil)) + ;; the last $', $", $` in the respective string is not variable + ;; the last ?', ?", ?` in the respective string is not ascii code + ("\\(^\\|[\[ \t\n<+\(,=]\\)\\(['\"`]\\)\\(\\\\.\\|\\2\\|[^'\"`\n\\\\]\\)*?\\\\?[?$]\\(\\2\\)" + (2 (7 . nil)) + (4 (7 . nil))) + ;; $' $" $` .... are variables + ;; ?' ?" ?` are ascii codes + ("\\(^\\|[^\\\\]\\)\\(\\\\\\\\\\)*[?$]\\([#\"'`]\\)" 3 (1 . nil)) + ;; regexps + ("\\(^\\|[[=(,~?:;<>]\\|\\(^\\|\\s \\)\\(if\\|elsif\\|unless\\|while\\|until\\|when\\|and\\|or\\|&&\\|||\\)\\|g?sub!?\\|scan\\|split!?\\)\\s *\\(/\\)[^/\n\\\\]*\\(\\\\.[^/\n\\\\]*\\)*\\(/\\)" + (4 (7 . ?/)) + (6 (7 . ?/))) + ("^=en\\(d\\)\\_>" 1 "!") + ("^\\(=\\)begin\\_>" 1 (ruby-comment-beg-syntax)) + ;; Currently, the following case is highlighted incorrectly: + ;; + ;; <<FOO + ;; FOO + ;; <<BAR + ;; <<BAZ + ;; BAZ + ;; BAR + ;; + ;; This is because all here-doc beginnings are highlighted before any endings, + ;; so although <<BAR is properly marked as a beginning, when we get to <<BAZ + ;; it thinks <<BAR is part of a string so it's marked as well. + ;; + ;; This may be fixable by modifying ruby-in-here-doc-p to use + ;; ruby-in-non-here-doc-string-p rather than syntax-ppss-context, + ;; but I don't want to try that until we've got unit tests set up + ;; to make sure I don't break anything else. + (,(concat ruby-here-doc-beg-re ".*\\(\n\\)") + ,(+ 1 (regexp-opt-depth ruby-here-doc-beg-re)) + (ruby-here-doc-beg-syntax)) + (,ruby-here-doc-end-re 3 (ruby-here-doc-end-syntax))) + "Syntactic keywords for Ruby mode. See `font-lock-syntactic-keywords'.") (defun ruby-comment-beg-syntax () - "Return the syntax cell for a the first character of a =begin. + "Return the syntax cell for a the first character of a =begin. See the definition of `ruby-font-lock-syntactic-keywords'. This returns a comment-delimiter cell as long as the =begin @@ -1421,6 +1423,7 @@ See `font-lock-syntax-table'.") ;; symbols '("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\|\\(\\w\\|_\\)+\\([!?=]\\|\\b_*\\)\\|#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\)\\)" 2 font-lock-reference-face) + '("\\(^\\s *\\|[\[\{\(,]\\s *\\|\\sw\\s +\\)\\(\\(\\sw\\|_\\)+\\):[^:]" 2 font-lock-reference-face) ;; expression expansion '("#\\({[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\|\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+\\)" 0 font-lock-variable-name-face t) diff --git a/lisp/progmodes/scheme.el b/lisp/progmodes/scheme.el index fa4c02a7442..4151e2bb79a 100644 --- a/lisp/progmodes/scheme.el +++ b/lisp/progmodes/scheme.el @@ -1,7 +1,7 @@ ;;; scheme.el --- Scheme (and DSSSL) editing mode -;; Copyright (C) 1986, 1987, 1988, 1997, 1998, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1986-1988, 1997-1998, 2001-2011 +;; Free Software Foundation, Inc. ;; Author: Bill Rozas <jinx@martigny.ai.mit.edu> ;; Adapted-by: Dave Love <d.love@dl.ac.uk> @@ -580,5 +580,4 @@ that variable's value is a string." (provide 'scheme) -;; arch-tag: a8f06bc1-ad11-42d2-9e36-ce651df37a90 ;;; scheme.el ends here diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index ee7e4c3b1b6..64f8c623779 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1,8 +1,6 @@ ;;; sh-script.el --- shell-script editing commands for Emacs -;; Copyright (C) 1993, 1994, 1995, 1996, 1997, 1999, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1993-1997, 1999, 2001-2011 Free Software Foundation, Inc. ;; Author: Daniel Pfeiffer <occitan@esperanto.org> ;; Version: 2.0f @@ -762,7 +760,7 @@ flow of control or syntax. See `sh-feature'." (shell "break" "case" "continue" "exec" "exit") (zsh sh-append bash - "select")) + "select" "foreach")) "List of keywords not in `sh-leading-keywords'. See `sh-feature'." :type '(repeat (cons (symbol :tag "Shell") diff --git a/lisp/progmodes/simula.el b/lisp/progmodes/simula.el index bccbbf245df..976ec202483 100644 --- a/lisp/progmodes/simula.el +++ b/lisp/progmodes/simula.el @@ -1,7 +1,6 @@ ;;; simula.el --- SIMULA 87 code editing commands for Emacs -;; Copyright (C) 1992, 1994, 1996, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1992, 1994, 1996, 2001-2011 Free Software Foundation, Inc. ;; Author: Hans Henrik Eriksen <hhe@ifi.uio.no> ;; Maintainer: simula-mode@ifi.uio.no diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index 053816d0287..9e49f0e775b 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -1,7 +1,6 @@ ;;; sql.el --- specialized comint.el for SQL interpreters -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Alex Schroeder <alex@gnu.org> ;; Maintainer: Michael Mauger <mmaug@yahoo.com> diff --git a/lisp/progmodes/subword.el b/lisp/progmodes/subword.el index 7df42c8b9a2..1a403f50b1b 100644 --- a/lisp/progmodes/subword.el +++ b/lisp/progmodes/subword.el @@ -1,6 +1,6 @@ ;;; subword.el --- Handling capitalized subwords in a nomenclature -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Masatake YAMATO @@ -277,5 +277,4 @@ Optional argument ARG is the same as for `capitalize-word'." (provide 'subword) -;; arch-tag: b8a01202-8a52-4a71-ae0a-d753fafd67ef ;;; subword.el ends here diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el index 44ccd134a37..eb254676469 100644 --- a/lisp/progmodes/tcl.el +++ b/lisp/progmodes/tcl.el @@ -1,7 +1,6 @@ ;;; tcl.el --- Tcl code editing commands for Emacs -;; Copyright (C) 1994, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994, 1998-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Author: Tom Tromey <tromey@redhat.com> diff --git a/lisp/progmodes/vera-mode.el b/lisp/progmodes/vera-mode.el index 7a22bec4259..f2842721f21 100644 --- a/lisp/progmodes/vera-mode.el +++ b/lisp/progmodes/vera-mode.el @@ -1,7 +1,6 @@ ;;; vera-mode.el --- major mode for editing Vera files. -;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-2011 Free Software Foundation, Inc. ;; Author: Reto Zimmermann <reto@gnu.org> ;; Maintainer: Reto Zimmermann <reto@gnu.org> diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index 77dcac7f675..8bb9256078a 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el @@ -1,7 +1,6 @@ ;; verilog-mode.el --- major mode for editing verilog source in Emacs -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-2011 Free Software Foundation, Inc. ;; Author: Michael McNamara (mac@verilog.com), ;; Wilson Snyder (wsnyder@wsnyder.org) diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index f9d68af9317..cb1d3c24a94 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -1,8 +1,6 @@ ;;; vhdl-mode.el --- major mode for editing VHDL code -;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -;; 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1992-2011 Free Software Foundation, Inc. ;; Authors: Reto Zimmermann <reto@gnu.org> ;; Rodney J. Whitby <software.vhdl-mode@rwhitby.net> diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el index e06dbf46a9a..ae18486c43b 100644 --- a/lisp/progmodes/which-func.el +++ b/lisp/progmodes/which-func.el @@ -1,7 +1,6 @@ ;;; which-func.el --- print current function in mode line -;; Copyright (C) 1994, 1997, 1998, 2001, 2002, 2003, 2004, 2005, 2006 -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994, 1997-1998, 2001-2011 Free Software Foundation, Inc. ;; Author: Alex Rezinsky <alexr@msil.sps.mot.com> ;; (doesn't seem to be responsive any more) @@ -332,5 +331,4 @@ If no function name is found, return nil." (provide 'which-func) -;; arch-tag: fa8a55c7-bfe3-4ffc-95ab-01bf21796827 ;;; which-func.el ends here diff --git a/lisp/progmodes/xscheme.el b/lisp/progmodes/xscheme.el index f83a67f4adf..cd50174f8cd 100644 --- a/lisp/progmodes/xscheme.el +++ b/lisp/progmodes/xscheme.el @@ -1,7 +1,7 @@ ;;; xscheme.el --- run MIT Scheme under Emacs -;; Copyright (C) 1986, 1987, 1989, 1990, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1986-1987, 1989-1990, 2001-2011 +;; Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: languages, lisp diff --git a/lisp/ps-bdf.el b/lisp/ps-bdf.el index 585b5f9eb69..608b266df8d 100644 --- a/lisp/ps-bdf.el +++ b/lisp/ps-bdf.el @@ -1,10 +1,8 @@ ;;; ps-bdf.el --- BDF font file handler for ps-print -;; Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1998-1999, 2001-2011 Free Software Foundation, Inc. ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 +;; 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 @@ -448,5 +446,4 @@ BITMAP-STRING is a string representing bits by hexadecimal digits." (provide 'ps-bdf) -;; arch-tag: 9b875ba8-565a-4ecf-acaa-30cee732c898 ;;; ps-bdf.el ends here diff --git a/lisp/ps-def.el b/lisp/ps-def.el index 9122b8fdc9a..fd499c964da 100644 --- a/lisp/ps-def.el +++ b/lisp/ps-def.el @@ -1,6 +1,6 @@ ;;; ps-def.el --- XEmacs and Emacs definitions for ps-print -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> ;; Kenichi Handa <handa@m17n.org> (multi-byte characters) @@ -402,5 +402,4 @@ (provide 'ps-def) -;; arch-tag: 4edde45b-af10-4685-b8ee-7cd0f951095a ;;; ps-def.el ends here diff --git a/lisp/ps-mule.el b/lisp/ps-mule.el index 95a982f29a2..67c12b00543 100644 --- a/lisp/ps-mule.el +++ b/lisp/ps-mule.el @@ -1,7 +1,6 @@ ;;; ps-mule.el --- provide multi-byte character facility to ps-print -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> ;; Kenichi Handa <handa@m17n.org> (multi-byte characters) @@ -1211,5 +1210,4 @@ V%s 0 /%s-latin1 /%s Latin1Encoding put\n" ;; generated-autoload-file: "ps-print.el" ;; End: -;; arch-tag: bca017b2-66a7-4e59-8584-103e749eadbe ;;; ps-mule.el ends here diff --git a/lisp/ps-print.el b/lisp/ps-print.el index 885fe68be26..5432674410c 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el @@ -1,8 +1,6 @@ ;;; ps-print.el --- print text from the buffer as PostScript -;; Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -;; 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1993-2011 Free Software Foundation, Inc. ;; Author: Jim Thompson (was <thompson@wg2.waii.com>) ;; Jacques Duthen (was <duthen@cegelec-red.fr>) @@ -4328,14 +4326,17 @@ Try: pr -t file | awk '{printf \"%3d %s\n\", length($0), $0}' | sort -r | head" (ps-header-font-size-internal (or ps-header-font-size-internal (ps-get-font-size 'ps-header-font-size))) + (ps-footer-font-size-internal + (or ps-footer-font-size-internal + (ps-get-font-size 'ps-footer-font-size))) (ps-header-title-font-size-internal (or ps-header-title-font-size-internal (ps-get-font-size 'ps-header-title-font-size))) (buf (get-buffer-create "*Line-lengths*")) (ifs ps-font-size-internal) ; initial font size - (icw (ps-avg-char-width 'ps-font-for-text)) ; initial character width (print-width (progn (ps-get-page-dimensions) ps-print-width)) + (icw (ps-avg-char-width 'ps-font-for-text)) ; initial character width (ps-setup (ps-setup)) ; setup for the current buffer (fs-min 5) ; minimum font size cw-min ; minimum character width @@ -4375,6 +4376,9 @@ and on the current ps-print setup." (ps-header-font-size-internal (or ps-header-font-size-internal (ps-get-font-size 'ps-header-font-size))) + (ps-footer-font-size-internal + (or ps-footer-font-size-internal + (ps-get-font-size 'ps-footer-font-size))) (ps-header-title-font-size-internal (or ps-header-title-font-size-internal (ps-get-font-size 'ps-header-title-font-size))) @@ -4384,9 +4388,9 @@ and on the current ps-print setup." (buf (get-buffer-create "*Nb-Pages*")) (ils ps-line-spacing-internal) ; initial line spacing (ifs ps-font-size-internal) ; initial font size - (ilh (ps-line-height 'ps-font-for-text)) ; initial line height (page-height (progn (ps-get-page-dimensions) ps-print-height)) + (ilh (ps-line-height 'ps-font-for-text)) ; initial line height (ps-setup (ps-setup)) ; setup for the current buffer (fs-min 4) ; minimum font size lh-min ; minimum line height @@ -6653,7 +6657,7 @@ If FACE is not a valid face name, use default face." ;; But autoload them here to make the separation invisible. ;;;### (autoloads (ps-mule-end-job ps-mule-begin-job ps-mule-initialize -;;;;;; ps-multibyte-buffer) "ps-mule" "ps-mule.el" "26f1d5db9476d0e84ab55627fbb72b1b") +;;;;;; ps-multibyte-buffer) "ps-mule" "ps-mule.el" "0e9db04f70d1221af96488068afa1192") ;;; Generated autoloads from ps-mule.el (defvar ps-multibyte-buffer nil "\ diff --git a/lisp/ps-samp.el b/lisp/ps-samp.el index 9fab290fc52..d4d41249931 100644 --- a/lisp/ps-samp.el +++ b/lisp/ps-samp.el @@ -1,6 +1,6 @@ ;;; ps-samp.el --- ps-print sample setup code -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Jim Thompson (was <thompson@wg2.waii.com>) ;; Jacques Duthen (was <duthen@cegelec-red.fr>) @@ -309,5 +309,4 @@ (provide 'ps-samp) -;; arch-tag: 99c415d3-be39-43c6-aa32-7ee33ba19600 ;;; ps-samp.el ends here diff --git a/lisp/recentf.el b/lisp/recentf.el index 817434bdd55..d0be69b51fc 100644 --- a/lisp/recentf.el +++ b/lisp/recentf.el @@ -1,7 +1,6 @@ ;;; recentf.el --- setup a menu of recently opened files -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: David Ponce <david@dponce.com> ;; Created: July 19 1999 @@ -1355,11 +1354,7 @@ that were operated on recently." (recentf-auto-cleanup) (let ((hook-setup (if recentf-mode 'add-hook 'remove-hook))) (dolist (hook recentf-used-hooks) - (apply hook-setup hook))) - (run-hooks 'recentf-mode-hook) - (when (called-interactively-p 'interactive) - (message "Recentf mode %sabled" (if recentf-mode "en" "dis")))) - recentf-mode) + (apply hook-setup hook))))) (defun recentf-unload-function () "Unload the recentf library." @@ -1371,5 +1366,4 @@ that were operated on recently." (run-hooks 'recentf-load-hook) -;; arch-tag: 78f1eec9-0d16-4d19-a4eb-2e4529edb62a ;;; recentf.el ends here diff --git a/lisp/rect.el b/lisp/rect.el index 66584089910..174e31f87d0 100644 --- a/lisp/rect.el +++ b/lisp/rect.el @@ -1,7 +1,6 @@ ;;; rect.el --- rectangle functions for GNU Emacs -;; Copyright (C) 1985, 1999, 2000, 2001, 2002, 2003, 2004 -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1999-2011 Free Software Foundation, Inc. ;; Maintainer: Didier Verna <didier@xemacs.org> ;; Keywords: internal @@ -27,10 +26,8 @@ ;; This package provides the operations on rectangles that are documented ;; in the Emacs manual. -;; ### NOTE: this file has been almost completely rewritten by Didier Verna -;; <didier@xemacs.org> in July 1999. The purpose of this rewrite is to be less -;; intrusive and fill lines with whitespaces only when needed. A few functions -;; are untouched though, as noted above their definition. +;; ### NOTE: this file was almost completely rewritten by Didier Verna +;; <didier@xemacs.org> in July 1999. ;;; Global key bindings @@ -40,26 +37,11 @@ ;;;###autoload (define-key ctl-x-r-map "y" 'yank-rectangle) ;;;###autoload (define-key ctl-x-r-map "o" 'open-rectangle) ;;;###autoload (define-key ctl-x-r-map "t" 'string-rectangle) +;;;###autoload (define-key ctl-x-r-map "N" 'rectangle-number-lines) ;;; Code: -;;;###autoload -(defun move-to-column-force (column &optional flag) - "If COLUMN is within a multi-column character, replace it by spaces and tab. -As for `move-to-column', passing anything but nil or t in FLAG will move to -the desired column only if the line is long enough." - (move-to-column column (or flag t))) - -;;;###autoload -(make-obsolete 'move-to-column-force 'move-to-column "21.2") - -;; not used any more --dv -;; extract-rectangle-line stores lines into this list -;; to accumulate them for extract-rectangle and delete-extract-rectangle. -(defvar operate-on-rectangle-lines) - -;; ### NOTE: this function is untouched, but not used anymore apart from -;; `delete-whitespace-rectangle'. `apply-on-rectangle' is used instead. --dv +;; FIXME: this function should be replaced by `apply-on-rectangle' (defun operate-on-rectangle (function start end coerce-tabs) "Call FUNCTION for each line of rectangle with corners at START, END. If COERCE-TABS is non-nil, convert multi-column characters @@ -107,7 +89,6 @@ Point is at the end of the segment of this line within the rectangle." (forward-line 1))) (- endcol startcol))) -;; The replacement for `operate-on-rectangle' -- dv (defun apply-on-rectangle (function start end &rest args) "Call FUNCTION for each line of rectangle with corners at START, END. FUNCTION is called with two arguments: the start and end columns of the @@ -151,9 +132,9 @@ the function is called." (setcdr lines (cons (filter-buffer-substring pt (point) t) (cdr lines)))) )) -;; ### NOTE: this is actually the only function that needs to do complicated -;; stuff like what's happening in `operate-on-rectangle', because the buffer -;; might be read-only. --dv +;; This is actually the only function that needs to do complicated +;; stuff like what's happening in `operate-on-rectangle', because the +;; buffer might be read-only. (defun extract-rectangle-line (startcol endcol lines) (let (start end begextra endextra line) (move-to-column startcol) @@ -186,7 +167,6 @@ the function is called." (defconst spaces-strings '["" " " " " " " " " " " " " " " " "]) -;; this one is untouched --dv (defun spaces-string (n) "Return a string with N spaces." (if (<= n 8) (aref spaces-strings n) @@ -253,14 +233,12 @@ even beep.)" (barf-if-buffer-read-only) (signal 'text-read-only (list (current-buffer))))))) -;; this one is untouched --dv ;;;###autoload (defun yank-rectangle () "Yank the last killed rectangle with upper left corner at point." (interactive "*") (insert-rectangle killed-rectangle)) -;; this one is untoutched --dv ;;;###autoload (defun insert-rectangle (rectangle) "Insert text of RECTANGLE with upper left corner at point. @@ -323,10 +301,6 @@ With a prefix (or a FILL) argument, also fill too short lines." (interactive "*r\nP") (apply-on-rectangle 'delete-whitespace-rectangle-line start end fill)) -;; not used any more --dv -;; string-rectangle uses this variable to pass the string -;; to string-rectangle-line. -(defvar string-rectangle-string) (defvar string-rectangle-history nil) (defun string-rectangle-line (startcol endcol string delete) (move-to-column startcol t) @@ -396,7 +370,45 @@ rectangle which were empty." (delete-region pt (point)) (indent-to endcol))))) +;; Line numbers for `rectangle-number-line-callback'. +(defvar rectangle-number-line-counter) + +(defun rectangle-number-line-callback (start end format-string) + (move-to-column start t) + (insert (format format-string rectangle-number-line-counter)) + (setq rectangle-number-line-counter + (1+ rectangle-number-line-counter))) + +(defun rectange--default-line-number-format (start end start-at) + (concat "%" + (int-to-string (length (int-to-string (+ (count-lines start end) + start-at)))) + "d ")) + +;;;###autoload +(defun rectangle-number-lines (start end start-at &optional format) + "Insert numbers in front of the region-rectangle. + +START-AT, if non-nil, should be a number from which to begin +counting. FORMAT, if non-nil, should be a format string to pass +to `format' along with the line count. When called interactively +with a prefix argument, prompt for START-AT and FORMAT." + (interactive + (if current-prefix-arg + (let* ((start (region-beginning)) + (end (region-end)) + (start-at (read-number "Number to count from: " 1))) + (list start end start-at + (read-string "Format string: " + (rectange--default-line-number-format + start end start-at)))) + (list (region-beginning) (region-end) 1 nil))) + (unless format + (setq format (rectange--default-line-number-format start end start-at))) + (let ((rectangle-number-line-counter start-at)) + (apply-on-rectangle 'rectangle-number-line-callback + start end format))) + (provide 'rect) -;; arch-tag: 178847b3-1f50-4b03-83de-a6e911cc1d16 ;;; rect.el ends here diff --git a/lisp/register.el b/lisp/register.el index 97b6eb0dfc8..517c50ee1e2 100644 --- a/lisp/register.el +++ b/lisp/register.el @@ -1,7 +1,6 @@ ;;; register.el --- register commands for Emacs -;; Copyright (C) 1985, 1993, 1994, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1993-1994, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: internal @@ -353,5 +352,4 @@ START and END are buffer positions giving two corners of rectangle." (extract-rectangle start end)))) (provide 'register) -;; arch-tag: ce14dd68-8265-475f-9341-5d4ec5a53035 ;;; register.el ends here diff --git a/lisp/repeat.el b/lisp/repeat.el index abab47e7dc8..b33039b609b 100644 --- a/lisp/repeat.el +++ b/lisp/repeat.el @@ -1,7 +1,6 @@ ;;; repeat.el --- convenient way to repeat the previous command -;; Copyright (C) 1998, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998, 2001-2011 Free Software Foundation, Inc. ;; Author: Will Mengarini <seldon@eskimo.com> ;; Created: Mo 02 Mar 98 @@ -392,5 +391,4 @@ recently executed command not bound to an input event\"." (provide 'repeat) -;; arch-tag: cd569600-a1ad-4fa7-9062-bb91dfeaf1db ;;; repeat.el ends here diff --git a/lisp/replace.el b/lisp/replace.el index 28f3a845c2a..d89a511a098 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -1,7 +1,6 @@ ;;; replace.el --- replace commands for Emacs -;; Copyright (C) 1985, 1986, 1987, 1992, 1994, 1996, 1997, 2000, 2001, -;; 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 1985-1987, 1992, 1994, 1996-1997, 2000-2011 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -2047,5 +2046,4 @@ make, or the user didn't cancel the call." (lazy-highlight-cleanup lazy-highlight-cleanup) (setq isearch-lazy-highlight-last-string nil))) -;; arch-tag: 16b4cd61-fd40-497b-b86f-b667c4cf88e4 ;;; replace.el ends here diff --git a/lisp/reposition.el b/lisp/reposition.el index f6699f8c088..51dd630a0c6 100644 --- a/lisp/reposition.el +++ b/lisp/reposition.el @@ -1,7 +1,6 @@ ;;; reposition.el --- center a Lisp function or comment on the screen -;; Copyright (C) 1991, 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1991, 1994, 2001-2011 Free Software Foundation, Inc. ;; Author: Michael D. Ernst <mernst@theory.lcs.mit.edu> ;; Created: Jan 1991 diff --git a/lisp/reveal.el b/lisp/reveal.el index ff5c8807de5..574c86a0fa4 100644 --- a/lisp/reveal.el +++ b/lisp/reveal.el @@ -1,7 +1,6 @@ ;;; reveal.el --- Automatically reveal hidden text at point -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> ;; Keywords: outlines @@ -225,5 +224,4 @@ With zero or negative ARG turn mode off." (provide 'reveal) -;; arch-tag: 96ba0242-2274-4ed7-8e10-26bc0707b4d8 ;;; reveal.el ends here diff --git a/lisp/rfn-eshadow.el b/lisp/rfn-eshadow.el index fa7a9336156..9eb2d2abdee 100644 --- a/lisp/rfn-eshadow.el +++ b/lisp/rfn-eshadow.el @@ -1,7 +1,6 @@ ;;; rfn-eshadow.el --- Highlight `shadowed' part of read-file-name input text ;; -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; ;; Author: Miles Bader <miles@gnu.org> ;; Keywords: convenience minibuffer @@ -240,5 +239,4 @@ Returns non-nil if the new state is enabled." (provide 'rfn-eshadow) -;; arch-tag: dcf70a52-0115-4ec2-b1e3-4f8d3541a888 ;;; rfn-eshadow.el ends here diff --git a/lisp/rot13.el b/lisp/rot13.el index f4a8ea92bcf..89b687efdc6 100644 --- a/lisp/rot13.el +++ b/lisp/rot13.el @@ -1,7 +1,6 @@ ;;; rot13.el --- display a buffer in ROT13 -;; Copyright (C) 1988, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1988, 2001-2011 Free Software Foundation, Inc. ;; Author: Howard Gayle ;; Maintainer: FSF @@ -109,5 +108,4 @@ See also `toggle-rot13-mode'." (provide 'rot13) -;; arch-tag: ad5b9ca8-946c-4414-996f-e9b1bf9ec79f ;;; rot13.el ends here diff --git a/lisp/ruler-mode.el b/lisp/ruler-mode.el index 1c809bbd7e0..fc62bf6b633 100644 --- a/lisp/ruler-mode.el +++ b/lisp/ruler-mode.el @@ -1,7 +1,6 @@ ;;; ruler-mode.el --- display a ruler in the header line -;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2001-2011 Free Software Foundation, Inc. ;; Author: David Ponce <david@dponce.com> ;; Maintainer: David Ponce <david@dponce.com> @@ -776,5 +775,4 @@ Optional argument PROPS specifies other text properties to apply." ;; coding: iso-latin-1 ;; End: -;; arch-tag: b2f24546-5605-44c4-b67b-c9a4eeba3ee8 ;;; ruler-mode.el ends here diff --git a/lisp/savehist.el b/lisp/savehist.el index 15c841ac9c7..f1060fb5150 100644 --- a/lisp/savehist.el +++ b/lisp/savehist.el @@ -1,7 +1,6 @@ ;;; savehist.el --- Save minibuffer history. -;; Copyright (C) 1997, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1997, 2005-2011 Free Software Foundation, Inc. ;; Author: Hrvoje Niksic <hniksic@xemacs.org> ;; Maintainer: FSF @@ -389,6 +388,5 @@ trimming of history lists to `history-length' items." (provide 'savehist) -;; arch-tag: b3ce47f4-c5ad-4ebc-ad02-73aba705cf9f ;;; savehist.el ends here diff --git a/lisp/saveplace.el b/lisp/saveplace.el index 35625ca276f..b7d43bd230a 100644 --- a/lisp/saveplace.el +++ b/lisp/saveplace.el @@ -1,7 +1,6 @@ ;;; saveplace.el --- automatically save place in files -;; Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993-1994, 2001-2011 Free Software Foundation, Inc. ;; Author: Karl Fogel <kfogel@red-bean.com> ;; Maintainer: FSF @@ -213,7 +212,9 @@ may have changed\) back to `save-place-alist'." (symbol-name coding-system-for-write))) (let ((print-length nil) (print-level nil)) - (print save-place-alist (current-buffer))) + (pp (sort save-place-alist + (lambda (a b) (string< (car a) (car b)))) + (current-buffer))) (let ((version-control (cond ((null save-place-version-control) nil) @@ -305,5 +306,4 @@ may have changed\) back to `save-place-alist'." (provide 'saveplace) ; why not... -;; arch-tag: 3c2ef47b-0a22-4558-b116-118c9ef454a0 ;;; saveplace.el ends here diff --git a/lisp/sb-image.el b/lisp/sb-image.el index 808cf6b072c..843186218a5 100644 --- a/lisp/sb-image.el +++ b/lisp/sb-image.el @@ -1,7 +1,6 @@ ;;; sb-image --- Image management for speedbar -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2003, 2005-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: file, tags, tools @@ -105,5 +104,4 @@ See `speedbar-expand-image-button-alist' for details." (provide 'sb-image) -;; arch-tag: 6b05accd-e8b8-4290-8379-f063f3dacabb ;;; sb-image.el ends here diff --git a/lisp/scroll-all.el b/lisp/scroll-all.el index 4f9747cb90a..6dbdc9ab90d 100644 --- a/lisp/scroll-all.el +++ b/lisp/scroll-all.el @@ -1,7 +1,6 @@ ;;; scroll-all.el --- scroll all buffers together minor mode -;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997, 2001-2011 Free Software Foundation, Inc. ;; Author: Gary D. Foster <Gary.Foster@corp.sun.com> ;; Keywords: scroll crisp brief lock @@ -116,5 +115,4 @@ apply to all visible windows in the same frame." (provide 'scroll-all) -;; arch-tag: db20089a-b157-45df-b5d4-2430e60acdd8 ;;; scroll-all.el ends here diff --git a/lisp/scroll-bar.el b/lisp/scroll-bar.el index 8b8edab0009..87c24018c07 100644 --- a/lisp/scroll-bar.el +++ b/lisp/scroll-bar.el @@ -1,7 +1,6 @@ ;;; scroll-bar.el --- window system-independent scroll bar support -;; Copyright (C) 1993, 1994, 1995, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993-1995, 1999-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: hardware @@ -351,5 +350,4 @@ EVENT should be a scroll bar click." (provide 'scroll-bar) -;; arch-tag: 6f1d01d0-0b1e-4bf8-86db-d491e0f399f3 ;;; scroll-bar.el ends here diff --git a/lisp/scroll-lock.el b/lisp/scroll-lock.el index b42b26e98ae..0fe39c2ac3e 100644 --- a/lisp/scroll-lock.el +++ b/lisp/scroll-lock.el @@ -1,6 +1,6 @@ ;;; scroll-lock.el --- Scroll lock scrolling. -;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2005-2011 Free Software Foundation, Inc. ;; Author: Ralf Angeli <angeli@iwi.uni-sb.de> ;; Maintainer: FSF @@ -123,5 +123,4 @@ during scrolling." (provide 'scroll-lock) -;; arch-tag: 148fc8e8-67e0-4638-bb34-3291595ab7e1 ;;; scroll-lock.el ends here diff --git a/lisp/select.el b/lisp/select.el index 0f43ce05822..7ca5c3a432d 100644 --- a/lisp/select.el +++ b/lisp/select.el @@ -1,7 +1,6 @@ ;;; select.el --- lisp portion of standard selection support -;; Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993-1994, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: internal diff --git a/lisp/server.el b/lisp/server.el index e3af82231ae..62c59b41cee 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -1,8 +1,6 @@ ;;; server.el --- Lisp code for GNU Emacs running as server process -;; Copyright (C) 1986, 1987, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -;; 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1986-1987, 1992, 1994-2011 Free Software Foundation, Inc. ;; Author: William Sommerfeld <wesommer@athena.mit.edu> ;; Maintainer: FSF diff --git a/lisp/ses.el b/lisp/ses.el index 1d2b326c749..2fc85d27df9 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -1,7 +1,6 @@ ;;; ses.el -- Simple Emacs Spreadsheet -*- coding: utf-8 -*- -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Author: Jonathan Yavner <jyavner@member.fsf.org> ;; Maintainer: Jonathan Yavner <jyavner@member.fsf.org> @@ -3017,5 +3016,4 @@ current column and continues until the next nonblank column." (provide 'ses) -;; arch-tag: 88c1ccf0-4293-4824-8c5d-0757b52217f3 ;;; ses.el ends here diff --git a/lisp/sha1.el b/lisp/sha1.el index 0d97ac6ce4b..3f2e8f2a69b 100644 --- a/lisp/sha1.el +++ b/lisp/sha1.el @@ -1,7 +1,6 @@ ;;; sha1.el --- SHA1 Secure Hash Algorithm in Emacs-Lisp -;; Copyright (C) 1999, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2001-2011 Free Software Foundation, Inc. ;; Author: Shuhei KOBAYASHI <shuhei@aqua.ocn.ne.jp> ;; Keywords: SHA1, FIPS 180-1 diff --git a/lisp/shadowfile.el b/lisp/shadowfile.el index 4250e459f04..c88b55e964b 100644 --- a/lisp/shadowfile.el +++ b/lisp/shadowfile.el @@ -1,7 +1,6 @@ ;;; shadowfile.el --- automatic file copying -;; Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993-1994, 2001-2011 Free Software Foundation, Inc. ;; Author: Boris Goldowsky <boris@gnu.org> ;; Keywords: comm files @@ -832,5 +831,4 @@ look for files that have been changed and need to be copied to other systems." (provide 'shadowfile) -;; arch-tag: e2f4cdd7-2bab-4def-9130-9e69b412b79e ;;; shadowfile.el ends here diff --git a/lisp/shell.el b/lisp/shell.el index 815add76502..fcffc2317d5 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -1,8 +1,6 @@ ;;; shell.el --- specialized comint.el for running the shell -;; Copyright (C) 1988, 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002, -;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1988, 1993-1997, 2000-2011 Free Software Foundation, Inc. ;; Author: Olin Shivers <shivers@cs.cmu.edu> ;; Simon Marshall <simon@gnu.org> diff --git a/lisp/simple.el b/lisp/simple.el index a977be7cf8e..77d096fd796 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1,8 +1,6 @@ ;;; simple.el --- basic editing commands for Emacs -;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, -;; 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, -;; 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985-1987, 1993-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: internal @@ -762,7 +760,7 @@ If BACKWARD-ONLY is non-nil, only delete them before point." (defun just-one-space (&optional n) "Delete all spaces and tabs around point, leaving one space (or N spaces). -If N is negative, deletes carriage return and linefeed characters as well." +If N is negative, delete newlines as well." (interactive "*p") (unless n (setq n 1)) (let ((orig-pos (point)) @@ -1142,8 +1140,6 @@ in *Help* buffer. See also the command `describe-char'." (set-keymap-parent m minibuffer-local-map) (setq read-expression-map m)) -(defvar read-expression-history nil) - (defvar minibuffer-completing-symbol nil "Non-nil means completing a Lisp symbol in the minibuffer.") @@ -2341,7 +2337,11 @@ the use of a shell (with its need to quote arguments)." (error "Shell command in progress"))) (with-current-buffer buffer (setq buffer-read-only nil) - (erase-buffer) + ;; Setting buffer-read-only to nil doesn't suffice + ;; if some text has a non-nil read-only property, + ;; which comint sometimes adds for prompts. + (let ((inhibit-read-only t)) + (erase-buffer)) (display-buffer buffer) (setq default-directory directory) (setq proc (start-process "Shell" buffer shell-file-name @@ -4219,9 +4219,11 @@ Outline mode sets this." "When non-nil, `line-move' moves point by visual lines. This movement is based on where the cursor is displayed on the screen, instead of relying on buffer contents alone. It takes -into account variable-width characters and line continuation." +into account variable-width characters and line continuation. +If nil, `line-move' moves point by logical lines." :type 'boolean - :group 'editing-basics) + :group 'editing-basics + :version "23.1") ;; Returns non-nil if partial move was done. (defun line-move-partial (arg noerror to-end) @@ -5100,12 +5102,10 @@ If optional arg REALLY-WORD is non-nil, it finds just a word." regexp) :group 'fill) -;; This function is used as the auto-fill-function of a buffer -;; when Auto-Fill mode is enabled. -;; It returns t if it really did any work. -;; (Actually some major modes use a different auto-fill function, -;; but this one is the default one.) (defun do-auto-fill () + "The default value for `normal-auto-fill-function'. +This is the default auto-fill function, some major modes use a different one. +Returns t if it really did any work." (let (fc justify give-up (fill-prefix fill-prefix)) (if (or (not (setq justify (current-justification))) @@ -5712,10 +5712,6 @@ appears to have customizations applying to the old default, :version "23.2" :group 'mail) -(define-mail-user-agent 'sendmail-user-agent - 'sendmail-user-agent-compose - 'mail-send-and-exit) - (defun rfc822-goto-eoh () ;; Go to header delimiter line in a mail message, following RFC822 rules (goto-char (point-min)) @@ -5723,37 +5719,9 @@ appears to have customizations applying to the old default, "^\\([:\n]\\|[^: \t\n]+[ \t\n]\\)" nil 'move) (goto-char (match-beginning 0)))) -(defun sendmail-user-agent-compose (&optional to subject other-headers continue - switch-function yank-action - send-actions) - (if switch-function - (let ((special-display-buffer-names nil) - (special-display-regexps nil) - (same-window-buffer-names nil) - (same-window-regexps nil)) - (funcall switch-function "*mail*"))) - (let ((cc (cdr (assoc-string "cc" other-headers t))) - (in-reply-to (cdr (assoc-string "in-reply-to" other-headers t))) - (body (cdr (assoc-string "body" other-headers t)))) - (or (mail continue to subject in-reply-to cc yank-action send-actions) - continue - (error "Message aborted")) - (save-excursion - (rfc822-goto-eoh) - (while other-headers - (unless (member-ignore-case (car (car other-headers)) - '("in-reply-to" "cc" "body")) - (insert (car (car other-headers)) ": " - (cdr (car other-headers)) - (if use-hard-newlines hard-newline "\n"))) - (setq other-headers (cdr other-headers))) - (when body - (forward-line 1) - (insert body)) - t))) - (defun compose-mail (&optional to subject other-headers continue - switch-function yank-action send-actions) + switch-function yank-action send-actions + return-action) "Start composing a mail message to send. This uses the user's chosen mail composition package as selected with the variable `mail-user-agent'. @@ -5778,7 +5746,12 @@ FUNCTION to ARGS, to insert the raw text of the original message. original text has been inserted in this way.) SEND-ACTIONS is a list of actions to call when the message is sent. -Each action has the form (FUNCTION . ARGS)." +Each action has the form (FUNCTION . ARGS). + +RETURN-ACTION, if non-nil, is an action for returning to the +caller. It has the form (FUNCTION . ARGS). The function is +called after the mail has been sent or put aside, and the mail +buffer buried." (interactive (list nil nil nil current-prefix-arg)) @@ -5808,25 +5781,27 @@ To disable this warning, set `compose-mail-user-agent-warnings' to nil." warn-vars " ")))))) (let ((function (get mail-user-agent 'composefunc))) - (funcall function to subject other-headers continue - switch-function yank-action send-actions))) + (funcall function to subject other-headers continue switch-function + yank-action send-actions return-action))) (defun compose-mail-other-window (&optional to subject other-headers continue - yank-action send-actions) + yank-action send-actions + return-action) "Like \\[compose-mail], but edit the outgoing message in another window." - (interactive - (list nil nil nil current-prefix-arg)) + (interactive (list nil nil nil current-prefix-arg)) (compose-mail to subject other-headers continue - 'switch-to-buffer-other-window yank-action send-actions)) - + 'switch-to-buffer-other-window yank-action send-actions + return-action)) (defun compose-mail-other-frame (&optional to subject other-headers continue - yank-action send-actions) + yank-action send-actions + return-action) "Like \\[compose-mail], but edit the outgoing message in another frame." - (interactive - (list nil nil nil current-prefix-arg)) + (interactive (list nil nil nil current-prefix-arg)) (compose-mail to subject other-headers continue - 'switch-to-buffer-other-frame yank-action send-actions)) + 'switch-to-buffer-other-frame yank-action send-actions + return-action)) + (defvar set-variable-value-history nil "History of values entered with `set-variable'. diff --git a/lisp/skeleton.el b/lisp/skeleton.el index 0c3e0e8c413..946e0a4480d 100644 --- a/lisp/skeleton.el +++ b/lisp/skeleton.el @@ -1,7 +1,6 @@ ;;; skeleton.el --- Lisp language extension for writing statement skeletons -*- coding: utf-8 -*- -;; Copyright (C) 1993, 1994, 1995, 1996, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993-1996, 2001-2011 Free Software Foundation, Inc. ;; Author: Daniel Pfeiffer <occitan@esperanto.org> ;; Maintainer: FSF diff --git a/lisp/sort.el b/lisp/sort.el index d4bbf6df056..8ea3decb76f 100644 --- a/lisp/sort.el +++ b/lisp/sort.el @@ -1,7 +1,7 @@ ;;; sort.el --- commands to sort text in an Emacs buffer -;; Copyright (C) 1986, 1987, 1994, 1995, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1986-1987, 1994-1995, 2001-2011 +;; Free Software Foundation, Inc. ;; Author: Howie Kaye ;; Maintainer: FSF diff --git a/lisp/soundex.el b/lisp/soundex.el index bbadf43a5fd..dbe92dc2670 100644 --- a/lisp/soundex.el +++ b/lisp/soundex.el @@ -1,7 +1,6 @@ ;;; soundex.el --- implement Soundex algorithm -;; Copyright (C) 1993, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993, 2001-2011 Free Software Foundation, Inc. ;; Author: Christian Plaunt <chris@bliss.berkeley.edu> ;; Maintainer: FSF @@ -72,5 +71,4 @@ and Searching\", Addison-Wesley (1973), pp. 391-392." (provide 'soundex) -;; arch-tag: b2615a98-feb7-430e-a717-171086738953 ;;; soundex.el ends here diff --git a/lisp/speedbar.el b/lisp/speedbar.el index 7413f73ee50..b84afd797d1 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el @@ -1,8 +1,6 @@ ;;; speedbar --- quick access to files and tags in a frame -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1996-2011 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: file, tags, tools @@ -515,7 +513,7 @@ hierarchy would be replaced with the new directory." :type 'hook) (defcustom speedbar-mode-hook nil - "Hooks called after creating a speedbar buffer." + "Hook run after creating a speedbar buffer." :group 'speedbar :type 'hook) @@ -769,99 +767,95 @@ to toggle this value.") (defvar speedbar-update-flag-disable nil "Permanently disable changing of the update flag.") -(defvar speedbar-syntax-table nil +(defvar speedbar-mode-syntax-table + (let ((st (make-syntax-table))) + ;; Turn off paren matching around here. + (modify-syntax-entry ?\' " " st) + (modify-syntax-entry ?\" " " st) + (modify-syntax-entry ?\( " " st) + (modify-syntax-entry ?\) " " st) + (modify-syntax-entry ?\{ " " st) + (modify-syntax-entry ?\} " " st) + (modify-syntax-entry ?\[ " " st) + (modify-syntax-entry ?\] " " st) + st) "Syntax-table used on the speedbar.") - -(if speedbar-syntax-table - nil - (setq speedbar-syntax-table (make-syntax-table)) - ;; turn off paren matching around here. - (modify-syntax-entry ?\' " " speedbar-syntax-table) - (modify-syntax-entry ?\" " " speedbar-syntax-table) - (modify-syntax-entry ?( " " speedbar-syntax-table) - (modify-syntax-entry ?) " " speedbar-syntax-table) - (modify-syntax-entry ?{ " " speedbar-syntax-table) - (modify-syntax-entry ?} " " speedbar-syntax-table) - (modify-syntax-entry ?[ " " speedbar-syntax-table) - (modify-syntax-entry ?] " " speedbar-syntax-table)) - -(defvar speedbar-key-map nil +(define-obsolete-variable-alias + 'speedbar-syntax-table 'speedbar-mode-syntax-table "24.1") + + +(defvar speedbar-mode-map + (let ((map (make-keymap))) + (suppress-keymap map t) + + ;; Control. + (define-key map "t" 'speedbar-toggle-updates) + (define-key map "g" 'speedbar-refresh) + + ;; Navigation. + (define-key map "n" 'speedbar-next) + (define-key map "p" 'speedbar-prev) + (define-key map "\M-n" 'speedbar-restricted-next) + (define-key map "\M-p" 'speedbar-restricted-prev) + (define-key map "\C-\M-n" 'speedbar-forward-list) + (define-key map "\C-\M-p" 'speedbar-backward-list) + ;; These commands never seemed useful. + ;; (define-key map " " 'speedbar-scroll-up) + ;; (define-key map [delete] 'speedbar-scroll-down) + + ;; Short cuts I happen to find useful. + (define-key map "r" + (lambda () (interactive) + (speedbar-change-initial-expansion-list + speedbar-previously-used-expansion-list-name))) + (define-key map "b" + (lambda () (interactive) + (speedbar-change-initial-expansion-list "quick buffers"))) + (define-key map "f" + (lambda () (interactive) + (speedbar-change-initial-expansion-list "files"))) + + (dframe-update-keymap map) + map) "Keymap used in speedbar buffer.") - -(if speedbar-key-map - nil - (setq speedbar-key-map (make-keymap)) - (suppress-keymap speedbar-key-map t) - - ;; control - (define-key speedbar-key-map "t" 'speedbar-toggle-updates) - (define-key speedbar-key-map "g" 'speedbar-refresh) - - ;; navigation - (define-key speedbar-key-map "n" 'speedbar-next) - (define-key speedbar-key-map "p" 'speedbar-prev) - (define-key speedbar-key-map "\M-n" 'speedbar-restricted-next) - (define-key speedbar-key-map "\M-p" 'speedbar-restricted-prev) - (define-key speedbar-key-map "\C-\M-n" 'speedbar-forward-list) - (define-key speedbar-key-map "\C-\M-p" 'speedbar-backward-list) -;; These commands never seemed useful. -;; (define-key speedbar-key-map " " 'speedbar-scroll-up) -;; (define-key speedbar-key-map [delete] 'speedbar-scroll-down) - - ;; Short cuts I happen to find useful - (define-key speedbar-key-map "r" - (lambda () (interactive) - (speedbar-change-initial-expansion-list - speedbar-previously-used-expansion-list-name))) - (define-key speedbar-key-map "b" - (lambda () (interactive) - (speedbar-change-initial-expansion-list "quick buffers"))) - (define-key speedbar-key-map "f" - (lambda () (interactive) - (speedbar-change-initial-expansion-list "files"))) - - (dframe-update-keymap speedbar-key-map) -) +(define-obsolete-variable-alias 'speedbar-key-map 'speedbar-mode-map "24.1") (defun speedbar-make-specialized-keymap () "Create a keymap for use with a speedbar major or minor display mode. This basically creates a sparse keymap, and makes its parent be -`speedbar-key-map'." +`speedbar-mode-map'." (let ((k (make-sparse-keymap))) - (set-keymap-parent k speedbar-key-map) + (set-keymap-parent k speedbar-mode-map) k)) -(defvar speedbar-file-key-map nil +(defvar speedbar-file-key-map + (let ((map (speedbar-make-specialized-keymap))) + + ;; Basic tree features. + (define-key map "e" 'speedbar-edit-line) + (define-key map "\C-m" 'speedbar-edit-line) + (define-key map "+" 'speedbar-expand-line) + (define-key map "=" 'speedbar-expand-line) + (define-key map "-" 'speedbar-contract-line) + + (define-key map "[" 'speedbar-expand-line-descendants) + (define-key map "]" 'speedbar-contract-line-descendants) + + (define-key map " " 'speedbar-toggle-line-expansion) + + ;; File based commands. + (define-key map "U" 'speedbar-up-directory) + (define-key map "I" 'speedbar-item-info) + (define-key map "B" 'speedbar-item-byte-compile) + (define-key map "L" 'speedbar-item-load) + (define-key map "C" 'speedbar-item-copy) + (define-key map "D" 'speedbar-item-delete) + (define-key map "O" 'speedbar-item-object-delete) + (define-key map "R" 'speedbar-item-rename) + (define-key map "M" 'speedbar-create-directory) + map) "Keymap used in speedbar buffer while files are displayed.") -(if speedbar-file-key-map - nil - (setq speedbar-file-key-map (speedbar-make-specialized-keymap)) - - ;; Basic tree features - (define-key speedbar-file-key-map "e" 'speedbar-edit-line) - (define-key speedbar-file-key-map "\C-m" 'speedbar-edit-line) - (define-key speedbar-file-key-map "+" 'speedbar-expand-line) - (define-key speedbar-file-key-map "=" 'speedbar-expand-line) - (define-key speedbar-file-key-map "-" 'speedbar-contract-line) - - (define-key speedbar-file-key-map "[" 'speedbar-expand-line-descendants) - (define-key speedbar-file-key-map "]" 'speedbar-contract-line-descendants) - - (define-key speedbar-file-key-map " " 'speedbar-toggle-line-expansion) - - ;; file based commands - (define-key speedbar-file-key-map "U" 'speedbar-up-directory) - (define-key speedbar-file-key-map "I" 'speedbar-item-info) - (define-key speedbar-file-key-map "B" 'speedbar-item-byte-compile) - (define-key speedbar-file-key-map "L" 'speedbar-item-load) - (define-key speedbar-file-key-map "C" 'speedbar-item-copy) - (define-key speedbar-file-key-map "D" 'speedbar-item-delete) - (define-key speedbar-file-key-map "O" 'speedbar-item-object-delete) - (define-key speedbar-file-key-map "R" 'speedbar-item-rename) - (define-key speedbar-file-key-map "M" 'speedbar-create-directory) - ) - (defvar speedbar-easymenu-definition-base (append '("Speedbar" @@ -1080,7 +1074,7 @@ selected. If the speedbar frame is active, then select the attached frame." Return nil if it doesn't exist." (frame-width speedbar-frame)) -(defun speedbar-mode () +(define-derived-mode speedbar-mode fundamental-mode "Speedbar" "Major mode for managing a display of directories and tags. \\<speedbar-key-map> The first line represents the default directory of the speedbar frame. @@ -1120,12 +1114,7 @@ tags start with >. Click the name of the tag to go to that position in the selected file. \\{speedbar-key-map}" - ;; NOT interactive (save-excursion - (kill-all-local-variables) - (setq major-mode 'speedbar-mode) - (setq mode-name "Speedbar") - (set-syntax-table speedbar-syntax-table) (setq font-lock-keywords nil) ;; no font-locking please (setq truncate-lines t) (make-local-variable 'frame-title-format) @@ -1138,8 +1127,7 @@ in the selected file. (setq dframe-track-mouse-function #'speedbar-track-mouse)) (setq dframe-help-echo-function #'speedbar-item-info dframe-mouse-click-function #'speedbar-click - dframe-mouse-position-function #'speedbar-position-cursor-on-line) - (run-hooks 'speedbar-mode-hook)) + dframe-mouse-position-function #'speedbar-position-cursor-on-line)) speedbar-buffer) (defmacro speedbar-message (fmt &rest args) diff --git a/lisp/startup.el b/lisp/startup.el index e85abe68f4c..384d81391ab 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1,8 +1,6 @@ ;;; startup.el --- process Emacs shell arguments -;; Copyright (C) 1985, 1986, 1992, 1994, 1995, 1996, 1997, 1998, 1999, -;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1985-1986, 1992, 1994-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: internal @@ -2017,7 +2015,7 @@ Type \\[describe-distribution] for information on ")) (defun display-startup-echo-area-message () (let ((resize-mini-windows t)) - (or noninteractive ;(input-pending-p) init-file-had-error + (or noninteractive ;(input-pending-p) init-file-had-error ;; t if the init file says to inhibit the echo area startup message. (and inhibit-startup-echo-area-message user-init-file @@ -2027,24 +2025,21 @@ Type \\[describe-distribution] for information on ")) (user-login-name) init-file-user))) ;; Wasn't set with custom; see if .emacs has a setq. - (let ((buffer (get-buffer-create " *temp*"))) - (prog1 - (condition-case nil - (with-current-buffer buffer - (insert-file-contents user-init-file) - (re-search-forward - (concat - "([ \t\n]*setq[ \t\n]+" - "inhibit-startup-echo-area-message[ \t\n]+" - (regexp-quote - (prin1-to-string - (if (equal init-file-user "") - (user-login-name) - init-file-user))) - "[ \t\n]*)") - nil t)) - (error nil)) - (kill-buffer buffer))))) + (condition-case nil + (with-temp-buffer + (insert-file-contents user-init-file) + (re-search-forward + (concat + "([ \t\n]*setq[ \t\n]+" + "inhibit-startup-echo-area-message[ \t\n]+" + (regexp-quote + (prin1-to-string + (if (equal init-file-user "") + (user-login-name) + init-file-user))) + "[ \t\n]*)") + nil t)) + (error nil)))) (message "%s" (startup-echo-area-message))))) (defun display-startup-screen (&optional concise) diff --git a/lisp/strokes.el b/lisp/strokes.el index 9006a412755..feeb8fec944 100644 --- a/lisp/strokes.el +++ b/lisp/strokes.el @@ -1,7 +1,6 @@ ;;; strokes.el --- control Emacs through mouse strokes -;; Copyright (C) 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997, 2000-2011 Free Software Foundation, Inc. ;; Author: David Bakhash <cadet@alum.mit.edu> ;; Maintainer: FSF @@ -736,6 +735,11 @@ Optional EVENT is acceptable as the starting event of the stroke." ;; display the stroke as it's being read (save-window-excursion (set-window-configuration strokes-window-configuration) + ;; The frame has been resized, so we need to refill the + ;; strokes buffer so that the strokes canvas is the whole + ;; visible buffer. + (unless (> 1 (abs (- (line-end-position) (window-width)))) + (strokes-fill-current-buffer-with-whitespace)) (when prompt (message "%s" prompt) (setq event (read-event)) @@ -1000,7 +1004,7 @@ If you'd like to create graphical files with strokes, you'll have to be running a version of Emacs with XPM support. You use the binding to `strokes-compose-complex-stroke' to start drawing your strokes. These are just complex strokes, and thus continue drawing with mouse-1 -or mouse-2 and end with mouse-3. Then the stroke image gets inserted +or mouse-2 and end with mouse-3. Then the stroke image gets inserted into the buffer. You treat it somewhat like any other character, which you can copy, paste, delete, move, etc. When all is done, you may want to send the file, or save it. This is done with @@ -1749,5 +1753,4 @@ Store XPM in buffer BUFNAME if supplied \(default is ` *strokes-xpm*'\)" (run-hooks 'strokes-load-hook) (provide 'strokes) -;; arch-tag: 8377f60e-43fb-467a-bbcd-2774f91f833e ;;; strokes.el ends here diff --git a/lisp/subr.el b/lisp/subr.el index 99f632fb586..c72752eb8f2 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1,7 +1,6 @@ ;;; subr.el --- basic lisp subroutines for Emacs -;; Copyright (C) 1985, 1986, 1992, 1994, 1995, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 1985-1986, 1992, 1994-1995, 1999-2011 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -60,7 +59,7 @@ function-definitions that `check-declare' does not recognize, e.g. `defstruct'. To specify a value for FILEONLY without passing an argument list, -set ARGLIST to `t'. This is necessary because `nil' means an +set ARGLIST to t. This is necessary because nil means an empty argument list, rather than an unspecified one. Note that for the purposes of `check-declare', this statement @@ -417,7 +416,7 @@ Unibyte strings are converted to multibyte for comparison." (assoc-string key alist nil)) (defun member-ignore-case (elt list) - "Like `member', but ignores differences in case and text representation. + "Like `member', but ignore differences in case and text representation. ELT must be a string. Upper-case and lower-case letters are treated as equal. Unibyte strings are converted to multibyte for comparison. Non-strings in LIST are ignored." @@ -489,6 +488,7 @@ saving keyboard macros (see `edmacro-mode')." (read-kbd-macro keys)) (defun undefined () + "Beep to tell the user this binding is undefined." (interactive) (ding)) @@ -858,24 +858,37 @@ in the current Emacs session, then this function may return nil." (defsubst event-start (event) "Return the starting position of EVENT. -If EVENT is a mouse or key press or a mouse click, this returns the location -of the event. -If EVENT is a drag, this returns the drag's starting position. -The return value is of the form +EVENT should be a click, drag, or key press event. +If it is a key press event, the return value has the form + (WINDOW POS (0 . 0) 0) +If it is a click or drag event, it has the form (WINDOW AREA-OR-POS (X . Y) TIMESTAMP OBJECT POS (COL . ROW) IMAGE (DX . DY) (WIDTH . HEIGHT)) -The `posn-' functions access elements of such lists." +The `posn-' functions access elements of such lists. +For more information, see Info node `(elisp)Click Events'. + +If EVENT is a mouse or key press or a mouse click, this is the +position of the event. If EVENT is a drag, this is the starting +position of the drag." (if (consp event) (nth 1 event) (list (selected-window) (point) '(0 . 0) 0))) (defsubst event-end (event) "Return the ending location of EVENT. EVENT should be a click, drag, or key press event. -If EVENT is a click event, this function is the same as `event-start'. -The return value is of the form +If EVENT is a key press event, the return value has the form + (WINDOW POS (0 . 0) 0) +If EVENT is a click event, this function is the same as +`event-start'. For click and drag events, the return value has +the form (WINDOW AREA-OR-POS (X . Y) TIMESTAMP OBJECT POS (COL . ROW) IMAGE (DX . DY) (WIDTH . HEIGHT)) -The `posn-' functions access elements of such lists." +The `posn-' functions access elements of such lists. +For more information, see Info node `(elisp)Click Events'. + +If EVENT is a mouse or key press or a mouse click, this is the +position of the event. If EVENT is a drag, this is the starting +position of the drag." (if (consp event) (nth (if (consp (nth 2 event)) 2 1) event) (list (selected-window) (point) '(0 . 0) 0))) @@ -921,8 +934,9 @@ Select the corresponding window as well." (defsubst posn-x-y (position) "Return the x and y coordinates in POSITION. -POSITION should be a list of the form returned by the `event-start' -and `event-end' functions." +The return value has the form (X . Y), where X and Y are given in +pixels. POSITION should be a list of the form returned by +`event-start' and `event-end'." (nth 2 position)) (declare-function scroll-bar-scale "scroll-bar" (num-denom whole)) @@ -961,7 +975,9 @@ and `event-end' functions." (setq spacing 0))) (cons (/ (car pair) (frame-char-width frame)) (- (/ (cdr pair) (+ (frame-char-height frame) spacing)) - (if (null header-line-format) 0 1)))))))) + (if (null (with-current-buffer (window-buffer window) + header-line-format)) + 0 1)))))))) (defun posn-actual-col-row (position) "Return the actual column and row in POSITION, measured in characters. @@ -1002,14 +1018,15 @@ and `event-end' functions." (defsubst posn-object-x-y (position) "Return the x and y coordinates relative to the object of POSITION. -POSITION should be a list of the form returned by the `event-start' -and `event-end' functions." +The return value has the form (DX . DY), where DX and DY are +given in pixels. POSITION should be a list of the form returned +by `event-start' and `event-end'." (nth 8 position)) (defsubst posn-object-width-height (position) "Return the pixel width and height of the object of POSITION. -POSITION should be a list of the form returned by the `event-start' -and `event-end' functions." +The return value has the form (WIDTH . HEIGHT). POSITION should +be a list of the form returned by `event-start' and `event-end'." (nth 9 position)) @@ -1361,9 +1378,8 @@ if it is empty or a duplicate." (defun run-mode-hooks (&rest hooks) "Run mode hooks `delayed-mode-hooks' and HOOKS, or delay HOOKS. -Execution is delayed if `delay-mode-hooks' is non-nil. -If `delay-mode-hooks' is nil, run `after-change-major-mode-hook' -after running the mode hooks. +Execution is delayed if the variable `delay-mode-hooks' is non-nil. +Otherwise, runs the mode hooks and then `after-change-major-mode-hook'. Major mode functions should use this instead of `run-hooks' when running their FOO-mode-hook." (if delay-mode-hooks @@ -1485,26 +1501,6 @@ If TOGGLE has a `:menu-tag', that is used for the menu item's label." ;;; Load history -;; (defvar symbol-file-load-history-loaded nil -;; "Non-nil means we have loaded the file `fns-VERSION.el' in `exec-directory'. -;; That file records the part of `load-history' for preloaded files, -;; which is cleared out before dumping to make Emacs smaller.") - -;; (defun load-symbol-file-load-history () -;; "Load the file `fns-VERSION.el' in `exec-directory' if not already done. -;; That file records the part of `load-history' for preloaded files, -;; which is cleared out before dumping to make Emacs smaller." -;; (unless symbol-file-load-history-loaded -;; (load (expand-file-name -;; ;; fns-XX.YY.ZZ.el does not work on DOS filesystem. -;; (if (eq system-type 'ms-dos) -;; "fns.el" -;; (format "fns-%s.el" emacs-version)) -;; exec-directory) -;; ;; The file name fns-%s.el already has a .el extension. -;; nil nil t) -;; (setq symbol-file-load-history-loaded t))) - (defun symbol-file (symbol &optional type) "Return the name of the file that defined SYMBOL. The value is normally an absolute file name. It can also be nil, @@ -1622,11 +1618,7 @@ extension for a compressed format \(e.g. \".gz\") on FILE will not affect this name matching. Alternatively, FILE can be a feature (i.e. a symbol), in which case FORM -is evaluated whenever that feature is `provide'd. Note that although -provide statements are usually at the end of files, this is not always -the case (e.g., sometimes they are at the start to avoid a recursive -load error). If your FORM should not be evaluated until the code in -FILE has been, do not use the symbol form for FILE in such cases. +is evaluated at the end of any file that `provide's this feature. Usually FILE is just a library name like \"font-lock\" or a feature name like 'font-lock. @@ -1635,11 +1627,27 @@ This function makes or adds to an entry on `after-load-alist'." ;; Add this FORM into after-load-alist (regardless of whether we'll be ;; evaluating it now). (let* ((regexp-or-feature - (if (stringp file) (setq file (purecopy (load-history-regexp file))) file)) + (if (stringp file) + (setq file (purecopy (load-history-regexp file))) + file)) (elt (assoc regexp-or-feature after-load-alist))) (unless elt (setq elt (list regexp-or-feature)) (push elt after-load-alist)) + (when (symbolp regexp-or-feature) + ;; For features, the after-load-alist elements get run when `provide' is + ;; called rather than at the end of the file. So add an indirection to + ;; make sure that `form' is really run "after-load" in case the provide + ;; call happens early. + (setq form + `(when load-file-name + (let ((fun (make-symbol "eval-after-load-helper"))) + (fset fun `(lambda (file) + (if (not (equal file ',load-file-name)) + nil + (remove-hook 'after-load-functions ',fun) + ,',form))) + (add-hook 'after-load-functions fun))))) ;; Add FORM to the element unless it's already there. (unless (member form (cdr elt)) (nconc elt (purecopy (list form)))) @@ -1895,7 +1903,7 @@ This function echoes `.' for each character that the user types. The user ends with RET, LFD, or ESC. DEL or C-h rubs out. C-y yanks the current kill. C-u kills line. C-g quits; if `inhibit-quit' was non-nil around this function, -then it returns nil if the user types C-g, but quit-flag remains set. +then it returns nil if the user types C-g, but `quit-flag' remains set. Once the caller uses the password, it can erase the password by doing (clear-string STRING)." @@ -1993,6 +2001,35 @@ The value of DEFAULT is inserted into PROMPT." t))) n)) +(defun read-char-choice (prompt chars &optional inhibit-keyboard-quit) + "Read and return one of CHARS, prompting for PROMPT. +Any input that is not one of CHARS is ignored. + +If optional argument INHIBIT-KEYBOARD-QUIT is non-nil, ignore +keyboard-quit events while waiting for a valid input." + (unless (consp chars) + (error "Called `read-char-choice' without valid char choices")) + (let ((cursor-in-echo-area t) + (executing-kbd-macro executing-kbd-macro) + char done) + (while (not done) + (unless (get-text-property 0 'face prompt) + (setq prompt (propertize prompt 'face 'minibuffer-prompt))) + (setq char (let ((inhibit-quit inhibit-keyboard-quit)) + (read-key prompt))) + (cond + ((not (numberp char))) + ((memq char chars) + (setq done t)) + ((and executing-kbd-macro (= char -1)) + ;; read-event returns -1 if we are in a kbd macro and + ;; there are no more events in the macro. Attempt to + ;; get an event interactively. + (setq executing-kbd-macro nil)))) + ;; Display the question with the answer. + (message "%s%s" prompt (char-to-string char)) + char)) + (defun sit-for (seconds &optional nodisp obsolete) "Perform redisplay, then wait for SECONDS seconds or until input is available. SECONDS may be a floating-point value. @@ -2034,6 +2071,56 @@ floating point support." (push read unread-command-events) nil)))))) (set-advertised-calling-convention 'sit-for '(seconds &optional nodisp) "22.1") + +(defun y-or-n-p (prompt) + "Ask user a \"y or n\" question. Return t if answer is \"y\". +PROMPT is the string to display to ask the question. It should +end in a space; `y-or-n-p' adds \"(y or n) \" to it. + +No confirmation of the answer is requested; a single character is enough. +Also accepts Space to mean yes, or Delete to mean no. \(Actually, it uses +the bindings in `query-replace-map'; see the documentation of that variable +for more information. In this case, the useful bindings are `act', `skip', +`recenter', and `quit'.\) + +Under a windowing system a dialog box will be used if `last-nonmenu-event' +is nil and `use-dialog-box' is non-nil." + ;; ¡Beware! when I tried to edebug this code, Emacs got into a weird state + ;; where all the keys were unbound (i.e. it somehow got triggered + ;; within read-key, apparently). I had to kill it. + (let ((answer 'recenter)) + (if (and (display-popup-menus-p) + (listp last-nonmenu-event) + use-dialog-box) + (setq answer + (x-popup-dialog t `(,prompt ("yes" . act) ("No" . skip)))) + (setq prompt (concat prompt + (if (eq ?\s (aref prompt (1- (length prompt)))) + "" " ") + "(y or n) ")) + (while + (let* ((key + (let ((cursor-in-echo-area t)) + (when minibuffer-auto-raise + (raise-frame (window-frame (minibuffer-window)))) + (read-key (propertize (if (eq answer 'recenter) + prompt + (concat "Please answer y or n. " + prompt)) + 'face 'minibuffer-prompt))))) + (setq answer (lookup-key query-replace-map (vector key) t)) + (cond + ((memq answer '(skip act)) nil) + ((eq answer 'recenter) (recenter) t) + ((memq answer '(exit-prefix quit)) (signal 'quit nil) t) + (t t))) + (ding) + (discard-input))) + (let ((ret (eq answer 'act))) + (unless noninteractive + (message "%s %s" prompt (if ret "y" "n"))) + ret))) + ;;; Atomic change groups. @@ -2293,11 +2380,16 @@ directory if it does not exist." ;; unless we're in batch mode or dumping Emacs (or noninteractive purify-flag - (file-accessible-directory-p (directory-file-name user-emacs-directory)) - (make-directory user-emacs-directory)) + (file-accessible-directory-p + (directory-file-name user-emacs-directory)) + (let ((umask (default-file-modes))) + (unwind-protect + (progn + (set-default-file-modes ?\700) + (make-directory user-emacs-directory)) + (set-default-file-modes umask)))) (abbreviate-file-name (expand-file-name new-name user-emacs-directory)))))) - ;;;; Misc. useful functions. @@ -2374,13 +2466,8 @@ Note: :data and :device are currently not supported on Windows." "''" ;; Quote everything except POSIX filename characters. ;; This should be safe enough even for really weird shells. - (let ((result "") (start 0) end) - (while (string-match "[^-0-9a-zA-Z_./]" argument start) - (setq end (match-beginning 0) - result (concat result (substring argument start end) - "\\" (substring argument end (1+ end))) - start (1+ end))) - (concat result (substring argument start)))))) + (replace-regexp-in-string "\n" "'\n'" + (replace-regexp-in-string "[^-0-9a-zA-Z_./\n]" "\\\\\\&" argument))))) (defun string-or-null-p (object) "Return t if OBJECT is a string or nil. @@ -2438,7 +2525,7 @@ Replaces `category' properties with their defined properties." (defvar yank-undo-function) (defun insert-for-yank (string) - "Calls `insert-for-yank-1' repetitively for each `yank-handler' segment. + "Call `insert-for-yank-1' repetitively for each `yank-handler' segment. See `insert-for-yank-1' for more details." (let (to) @@ -2464,7 +2551,7 @@ If PARAM is present and non-nil, it replaces STRING as the object `yank-rectangle', PARAM may be a list of strings to insert as a rectangle. If NOEXCLUDE is present and non-nil, the normal removal of the - yank-excluded-properties is not performed; instead FUNCTION is + `yank-excluded-properties' is not performed; instead FUNCTION is responsible for removing those properties. This may be necessary if FUNCTION adjusts point before or after inserting the object. If UNDO is present and non-nil, it is a function that will be called @@ -3122,7 +3209,7 @@ is non-nil, start replacements at that index in STRING. REP is either a string used as the NEWTEXT arg of `replace-match' or a function. If it is a function, it is called with the actual text of each match, and its value is used as the replacement text. When REP is called, -the match-data are the result of matching REGEXP against a substring +the match data are the result of matching REGEXP against a substring of STRING. To replace only the first match (if any), make REGEXP match up to \\' @@ -3328,56 +3415,6 @@ clone should be incorporated in the clone." (overlay-put ol2 'evaporate t) (overlay-put ol2 'text-clones dups))) -;;;; Misc functions moved over from the C side. - -(defun y-or-n-p (prompt) - "Ask user a \"y or n\" question. Return t if answer is \"y\". -The argument PROMPT is the string to display to ask the question. -It should end in a space; `y-or-n-p' adds `(y or n) ' to it. -No confirmation of the answer is requested; a single character is enough. -Also accepts Space to mean yes, or Delete to mean no. \(Actually, it uses -the bindings in `query-replace-map'; see the documentation of that variable -for more information. In this case, the useful bindings are `act', `skip', -`recenter', and `quit'.\) - -Under a windowing system a dialog box will be used if `last-nonmenu-event' -is nil and `use-dialog-box' is non-nil." - ;; ¡Beware! when I tried to edebug this code, Emacs got into a weird state - ;; where all the keys were unbound (i.e. it somehow got triggered - ;; within read-key, apparently). I had to kill it. - (let ((answer 'recenter)) - (if (and (display-popup-menus-p) - (listp last-nonmenu-event) - use-dialog-box) - (setq answer - (x-popup-dialog t `(,prompt ("yes" . act) ("No" . skip)))) - (setq prompt (concat prompt - (if (eq ?\s (aref prompt (1- (length prompt)))) - "" " ") - "(y or n) ")) - (while - (let* ((key - (let ((cursor-in-echo-area t)) - (when minibuffer-auto-raise - (raise-frame (window-frame (minibuffer-window)))) - (read-key (propertize (if (eq answer 'recenter) - prompt - (concat "Please answer y or n. " - prompt)) - 'face 'minibuffer-prompt))))) - (setq answer (lookup-key query-replace-map (vector key) t)) - (cond - ((memq answer '(skip act)) nil) - ((eq answer 'recenter) (recenter) t) - ((memq answer '(exit-prefix quit)) (signal 'quit nil) t) - (t t))) - (ding) - (discard-input))) - (let ((ret (eq answer 'act))) - (unless noninteractive - (message "%s %s" prompt (if ret "y" "n"))) - ret))) - ;;;; Mail user agents. ;; Here we include just enough for other packages to be able @@ -3824,9 +3861,9 @@ which is higher than \"1alpha\"." ;; The following statement ought to be in print.c, but `provide' can't ;; be used there. +;; http://lists.gnu.org/archive/html/emacs-devel/2009-08/msg00236.html (when (hash-table-p (car (read-from-string (prin1-to-string (make-hash-table))))) (provide 'hashtable-print-readable)) -;; arch-tag: f7e0e6e5-70aa-4897-ae72-7a3511ec40bc ;;; subr.el ends here diff --git a/lisp/t-mouse.el b/lisp/t-mouse.el index 1578382d63a..059024c4bce 100644 --- a/lisp/t-mouse.el +++ b/lisp/t-mouse.el @@ -4,8 +4,7 @@ ;; Maintainer: FSF ;; Keywords: mouse gpm linux -;; Copyright (C) 1994, 1995, 1998, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1994-1995, 1998, 2006-2011 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. @@ -84,5 +83,4 @@ It relies on the `gpm' daemon being activated." (provide 't-mouse) -;; arch-tag: a63163b3-bfbe-4eb2-ab4f-201cd164b05d ;;; t-mouse.el ends here diff --git a/lisp/tabify.el b/lisp/tabify.el index 591a9432fe5..da1038a2164 100644 --- a/lisp/tabify.el +++ b/lisp/tabify.el @@ -1,7 +1,6 @@ ;;; tabify.el --- tab conversion commands for Emacs -;; Copyright (C) 1985, 1994, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1994, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Package: emacs @@ -90,5 +89,4 @@ The variable `tab-width' controls the spacing of tab stops." (provide 'tabify) -;; arch-tag: c83893b1-e0cc-4e57-8a09-73fd03466416 ;;; tabify.el ends here diff --git a/lisp/talk.el b/lisp/talk.el index aaf2d2085cd..fd845a7eee0 100644 --- a/lisp/talk.el +++ b/lisp/talk.el @@ -1,7 +1,6 @@ ;;; talk.el --- allow several users to talk to each other through Emacs -;; Copyright (C) 1995, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: comm, frames @@ -120,5 +119,4 @@ Select the first of these windows, displaying the first of the buffers." (provide 'talk) -;; arch-tag: 7ab0ad88-1788-4886-a44c-ae685e6f8a1a ;;; talk.el ends here diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el index ba3cb862bf2..fdac245c53b 100644 --- a/lisp/tar-mode.el +++ b/lisp/tar-mode.el @@ -1,8 +1,6 @@ ;;; tar-mode.el --- simple editing of tar files from GNU emacs -;; Copyright (C) 1990, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1990-1991, 1993-2011 Free Software Foundation, Inc. ;; Author: Jamie Zawinski <jwz@lucid.com> ;; Maintainer: FSF @@ -1247,5 +1245,4 @@ Leaves the region wide." (provide 'tar-mode) -;; arch-tag: 8a585a4a-340e-42c2-89e7-d3b1013a4b78 ;;; tar-mode.el ends here diff --git a/lisp/tempo.el b/lisp/tempo.el index 974f65efaed..9b997f3387c 100644 --- a/lisp/tempo.el +++ b/lisp/tempo.el @@ -1,7 +1,6 @@ ;;; tempo.el --- Flexible template insertion -;; Copyright (C) 1994, 1995, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994-1995, 2001-2011 Free Software Foundation, Inc. ;; Author: David K}gedal <davidk@lysator.liu.se> ;; Created: 16 Feb 1994 @@ -763,5 +762,4 @@ space bar, and looks something like this: (provide 'tempo) -;; arch-tag: b3c0ee36-db3b-47bc-875f-091b4e27a063 ;;; tempo.el ends here diff --git a/lisp/term.el b/lisp/term.el index 9c511592165..ea419234e0f 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -1,7 +1,6 @@ ;;; term.el --- general command interpreter in a window stuff -;; Copyright (C) 1988, 1990, 1992, 1994, 1995, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 1988, 1990, 1992, 1994-1995, 2001-2011 ;; Free Software Foundation, Inc. ;; Author: Per Bothner <per@bothner.com> @@ -1537,29 +1536,24 @@ See also `term-input-ignoredups' and `term-write-input-ring'." (message "Cannot read history file %s" term-input-ring-file-name))) (t - (let ((history-buf (get-buffer-create " *temp*")) - (file term-input-ring-file-name) + (let ((file term-input-ring-file-name) (count 0) (ring (make-ring term-input-ring-size))) - (unwind-protect - (with-current-buffer history-buf - (widen) - (erase-buffer) - (insert-file-contents file) - ;; Save restriction in case file is already visited... - ;; Watch for those date stamps in history files! - (goto-char (point-max)) - (while (and (< count term-input-ring-size) - (re-search-backward "^[ \t]*\\([^#\n].*\\)[ \t]*$" - nil t)) - (let ((history (buffer-substring (match-beginning 1) - (match-end 1)))) - (when (or (null term-input-ignoredups) - (ring-empty-p ring) - (not (string-equal (ring-ref ring 0) history))) - (ring-insert-at-beginning ring history))) - (setq count (1+ count)))) - (kill-buffer history-buf)) + (with-temp-buffer + (insert-file-contents file) + ;; Save restriction in case file is already visited... + ;; Watch for those date stamps in history files! + (goto-char (point-max)) + (while (and (< count term-input-ring-size) + (re-search-backward "^[ \t]*\\([^#\n].*\\)[ \t]*$" + nil t)) + (let ((history (buffer-substring (match-beginning 1) + (match-end 1)))) + (when (or (null term-input-ignoredups) + (ring-empty-p ring) + (not (string-equal (ring-ref ring 0) history))) + (ring-insert-at-beginning ring history))) + (setq count (1+ count)))) (setq term-input-ring ring term-input-ring-index nil))))) diff --git a/lisp/term/AT386.el b/lisp/term/AT386.el index 7b6f8f8e5a0..4453c9e3b8c 100644 --- a/lisp/term/AT386.el +++ b/lisp/term/AT386.el @@ -1,7 +1,6 @@ ;;; AT386.el --- terminal support package for IBM AT keyboards -*- no-byte-compile: t -*- -;; Copyright (C) 1992, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1992, 2001-2011 Free Software Foundation, Inc. ;; Author: Eric S. Raymond <esr@snark.thyrsus.com> ;; Keywords: terminals @@ -57,5 +56,4 @@ (define-key local-function-key-map [ALT] [27]) )) -;; arch-tag: abec1b03-582f-49f8-b8cb-e2fd52ea4bd7 ;;; AT386.el ends here diff --git a/lisp/term/README b/lisp/term/README index 6593c0cabdf..6d2e0acbd20 100644 --- a/lisp/term/README +++ b/lisp/term/README @@ -1,5 +1,4 @@ -Copyright (C) 1993, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 - Free Software Foundation, Inc. +Copyright (C) 1993, 2001-2011 Free Software Foundation, Inc. See the end of the file for license conditions. diff --git a/lisp/term/apollo.el b/lisp/term/apollo.el index fc75a3e5599..c570a20112b 100644 --- a/lisp/term/apollo.el +++ b/lisp/term/apollo.el @@ -3,5 +3,4 @@ "Terminal initialization function for apollo." (tty-run-terminal-initialization (selected-frame) "vt100")) -;; arch-tag: c72f446f-e6b7-4749-90a4-bd68632adacf ;;; apollo.el ends here diff --git a/lisp/term/bobcat.el b/lisp/term/bobcat.el index e7723b0706d..d9ab1a5fb16 100644 --- a/lisp/term/bobcat.el +++ b/lisp/term/bobcat.el @@ -6,5 +6,4 @@ (keyboard-translate ?\177 ?\^h) (keyboard-translate ?\^h ?\177)) -;; arch-tag: 754e4520-0a3e-4e6e-8ca5-9481b1f85cf7 ;;; bobcat.el ends here diff --git a/lisp/term/common-win.el b/lisp/term/common-win.el index f43056976a2..c13d22dde71 100644 --- a/lisp/term/common-win.el +++ b/lisp/term/common-win.el @@ -1,7 +1,6 @@ ;;; common-win.el --- common part of handling window systems -;; Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993-1994, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: terminals diff --git a/lisp/term/cygwin.el b/lisp/term/cygwin.el index df857ba6625..cfce07035cf 100644 --- a/lisp/term/cygwin.el +++ b/lisp/term/cygwin.el @@ -6,5 +6,4 @@ "Terminal initialization function for cygwin." (tty-no-underline)) -;; arch-tag: ca81ce67-3c41-4883-a29b-4c3d64a21191 ;;; cygwin.el ends here diff --git a/lisp/term/internal.el b/lisp/term/internal.el index 02a14233bf6..43b799df1c9 100644 --- a/lisp/term/internal.el +++ b/lisp/term/internal.el @@ -1,7 +1,7 @@ ;;; internal.el --- support for PC internal terminal -;; Copyright (C) 1993, 1994, 1998, 1999, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993-1994, 1998-1999, 2001-2011 +;; Free Software Foundation, Inc. ;; Author: Morten Welinder <terra@diku.dk> @@ -604,5 +604,4 @@ list. You can (and should) also run it if and when the value of (run-hooks 'dos-codepage-setup-hook) )) -;; arch-tag: eea04c06-7311-4b5a-b531-3c1be1b070af ;;; internal.el ends here diff --git a/lisp/term/iris-ansi.el b/lisp/term/iris-ansi.el index 84bc8243b63..490c06148a9 100644 --- a/lisp/term/iris-ansi.el +++ b/lisp/term/iris-ansi.el @@ -1,7 +1,6 @@ ;;; iris-ansi.el --- configure Emacs for SGI xwsh and winterm apps -*- no-byte-compile: t -*- -;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997, 2001-2011 Free Software Foundation, Inc. ;; Author: Dan Nicolaescu <dann@ics.uci.edu> @@ -328,5 +327,4 @@ (set-keymap-parent m (keymap-parent input-decode-map)) (set-keymap-parent input-decode-map m))) -;; arch-tag: b1d0e73a-bb7d-47be-9fb2-6fb126469a1b ;;; iris-ansi.el ends here diff --git a/lisp/term/linux.el b/lisp/term/linux.el index 5ac369721a4..76115e7d58a 100644 --- a/lisp/term/linux.el +++ b/lisp/term/linux.el @@ -18,5 +18,4 @@ ;; The arg only matters in that it is not t or nil. (set-input-meta-mode 'iso-latin-1)) -;; arch-tag: 5d0c4f63-739b-4862-abf3-041fe42adb8f ;;; linux.el ends here diff --git a/lisp/term/lk201.el b/lisp/term/lk201.el index 7bcbd8d754c..23f4d0dbd2c 100644 --- a/lisp/term/lk201.el +++ b/lisp/term/lk201.el @@ -79,5 +79,4 @@ (set-keymap-parent m (keymap-parent input-decode-map)) (set-keymap-parent input-decode-map m))) -;; arch-tag: 7ffb4444-6a23-43e1-b457-43cf4f673c0d ;;; lk201.el ends here diff --git a/lisp/term/news.el b/lisp/term/news.el index 2b2678562d5..ba6346997c5 100644 --- a/lisp/term/news.el +++ b/lisp/term/news.el @@ -1,7 +1,6 @@ ;;; news.el --- keypad and function key bindings for the Sony NEWS keyboard -*- no-byte-compile: t -*- -;; Copyright (C) 1989, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1989, 1993, 2001-2011 Free Software Foundation, Inc. ;; Author: FSF ;; Keywords: terminals @@ -69,5 +68,4 @@ (define-key news-fkey-prefix "x" [kp-8]) )) -;; arch-tag: bfe141a0-623b-4b42-b753-5d9353776c5e ;;; news.el ends here diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el index 77a2d3f2bc0..6286b83258b 100644 --- a/lisp/term/ns-win.el +++ b/lisp/term/ns-win.el @@ -1,7 +1,6 @@ ;;; ns-win.el --- lisp side of interface with NeXT/Open/GNUstep/MacOS X window system -;; Copyright (C) 1993, 1994, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1993-1994, 2005-2011 Free Software Foundation, Inc. ;; Authors: Carl Edman ;; Christian Limpach diff --git a/lisp/term/pc-win.el b/lisp/term/pc-win.el index c13862a8da0..4cb88f6bd23 100644 --- a/lisp/term/pc-win.el +++ b/lisp/term/pc-win.el @@ -1,7 +1,7 @@ ;;; pc-win.el --- setup support for `PC windows' (whatever that is) -;; Copyright (C) 1994, 1996, 1997, 1999, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994, 1996-1997, 1999, 2001-2011 +;; Free Software Foundation, Inc. ;; Author: Morten Welinder <terra@diku.dk> ;; Maintainer: FSF diff --git a/lisp/term/rxvt.el b/lisp/term/rxvt.el index b735e887944..0e9de519c8c 100644 --- a/lisp/term/rxvt.el +++ b/lisp/term/rxvt.el @@ -1,7 +1,6 @@ ;;; rxvt.el --- define function key sequences and standard colors for rxvt -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Author: Eli Zaretskii ;; Keywords: terminals @@ -310,5 +309,4 @@ for the currently selected frame." (* (apply '+ (car (cddr (nth 15 rxvt-standard-colors)))) 0.6)) (set-terminal-parameter nil 'background-mode 'dark))))) -;; arch-tag: 20cf2fb6-6318-4bab-9dbf-1d15048f2257 ;;; rxvt.el ends here diff --git a/lisp/term/sun.el b/lisp/term/sun.el index 383dfd6fdf3..d375656569c 100644 --- a/lisp/term/sun.el +++ b/lisp/term/sun.el @@ -1,7 +1,6 @@ ;;; sun.el --- keybinding for standard default sunterm keys -;; Copyright (C) 1987, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1987, 2001-2011 Free Software Foundation, Inc. ;; Author: Jeff Peck <peck@sun.com> ;; Keywords: terminals @@ -155,5 +154,4 @@ (eval (car hooks)) (setq hooks (cdr hooks)))))) -;; arch-tag: db761d47-fd7d-42b4-aae1-04fa116b6ba6 ;;; sun.el ends here diff --git a/lisp/term/sup-mouse.el b/lisp/term/sup-mouse.el index 14e50063868..a8b78bb3e38 100644 --- a/lisp/term/sup-mouse.el +++ b/lisp/term/sup-mouse.el @@ -1,7 +1,6 @@ ;;; sup-mouse.el --- supdup mouse support for lisp machines -;; Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985-1986, 2001-2011 Free Software Foundation, Inc. ;; Author: Wolfgang Rupprecht ;; Maintainer: FSF @@ -195,5 +194,4 @@ X and Y are 0-based character positions on the frame." (get-window-with-predicate (lambda (w) (coordinates-in-window-p (cons x y) w)))) -;; arch-tag: ec644ed4-cac4-43b8-b3db-cfe83e9098d7 ;;; sup-mouse.el ends here diff --git a/lisp/term/tty-colors.el b/lisp/term/tty-colors.el index df45dc192a7..9a900916830 100644 --- a/lisp/term/tty-colors.el +++ b/lisp/term/tty-colors.el @@ -1,7 +1,6 @@ ;;; tty-colors.el --- color support for character terminals -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Eli Zaretskii ;; Maintainer: FSF diff --git a/lisp/term/tvi970.el b/lisp/term/tvi970.el index 4476165febc..5d852e52105 100644 --- a/lisp/term/tvi970.el +++ b/lisp/term/tvi970.el @@ -1,7 +1,6 @@ ;;; tvi970.el --- terminal support for the Televideo 970 -;; Copyright (C) 1992, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1992, 2001-2011 Free Software Foundation, Inc. ;; Author: Jim Blandy <jimb@occs.cs.oberlin.edu> ;; Keywords: terminals @@ -117,5 +116,4 @@ With a negative argument, select numeric keypad mode." (send-string-to-terminal (if (terminal-parameter nil 'tvi970-keypad-numeric) "\e=" "\e>"))) -;; arch-tag: c1334cf0-1462-41c3-a963-c077d175f8f0 ;;; tvi970.el ends here diff --git a/lisp/term/vt100.el b/lisp/term/vt100.el index 24561fe835f..406c20a0e81 100644 --- a/lisp/term/vt100.el +++ b/lisp/term/vt100.el @@ -1,7 +1,6 @@ ;;; vt100.el --- define VT100 function key sequences in function-key-map -;; Copyright (C) 1989, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1989, 1993, 2001-2011 Free Software Foundation, Inc. ;; Author: FSF ;; Keywords: terminals @@ -49,5 +48,4 @@ With negative argument, switch to 80-column mode." (send-string-to-terminal (if vt100-wide-mode "\e[?3h" "\e[?3l")) (set-frame-width terminal-frame (if vt100-wide-mode 132 80))) -;; arch-tag: 9ff41f24-a7c9-4dee-9cf2-fbaa951eb840 ;;; vt100.el ends here diff --git a/lisp/term/vt102.el b/lisp/term/vt102.el index 1f9bb00efab..0f2e3805f58 100644 --- a/lisp/term/vt102.el +++ b/lisp/term/vt102.el @@ -4,5 +4,4 @@ "Terminal initialization function for vt102." (tty-run-terminal-initialization (selected-frame) "vt100")) -;; arch-tag: 6e839cfc-125a-4574-82f1-c23a51f7c50f ;;; vt102.el ends here diff --git a/lisp/term/vt125.el b/lisp/term/vt125.el index b5a31e8a0f6..029f762ef3f 100644 --- a/lisp/term/vt125.el +++ b/lisp/term/vt125.el @@ -4,5 +4,4 @@ "Terminal initialization function for vt125." (tty-run-terminal-initialization (selected-frame) "vt100")) -;; arch-tag: 1d92d70f-dd55-4a1d-9088-e215a4883801 ;;; vt125.el ends here diff --git a/lisp/term/vt200.el b/lisp/term/vt200.el index 78c65c084ce..09ad64d01f6 100644 --- a/lisp/term/vt200.el +++ b/lisp/term/vt200.el @@ -8,5 +8,4 @@ (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant. (define-key local-function-key-map [f11] [?\e])) -;; arch-tag: 0f78f583-9f32-4237-b106-28bcfff21d89 ;;; vt200.el ends here diff --git a/lisp/term/vt201.el b/lisp/term/vt201.el index 987aee09f3b..cbeba00b651 100644 --- a/lisp/term/vt201.el +++ b/lisp/term/vt201.el @@ -8,5 +8,4 @@ (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant. (define-key local-function-key-map [f11] [?\e])) -;; arch-tag: a6abb38f-60ea-449e-a9e9-3fb8572c52ae ;;; vt201.el ends here diff --git a/lisp/term/vt220.el b/lisp/term/vt220.el index f9439e0eff7..647b79ea357 100644 --- a/lisp/term/vt220.el +++ b/lisp/term/vt220.el @@ -8,5 +8,4 @@ (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant. (define-key local-function-key-map [f11] [?\e])) -;; arch-tag: 98fc4867-a20d-46a1-a276-d7be31e49871 ;;; vt220.el ends here diff --git a/lisp/term/vt240.el b/lisp/term/vt240.el index 0aea10bf982..2da4e7ed3c7 100644 --- a/lisp/term/vt240.el +++ b/lisp/term/vt240.el @@ -8,5 +8,4 @@ (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant. (define-key local-function-key-map [f11] [?\e])) -;; arch-tag: d9f88e9c-02dc-49ff-871c-a415f08e4eb7 ;;; vt240.el ends here diff --git a/lisp/term/vt300.el b/lisp/term/vt300.el index d19f847588b..52198d840ae 100644 --- a/lisp/term/vt300.el +++ b/lisp/term/vt300.el @@ -6,5 +6,4 @@ (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant. (define-key local-function-key-map [f11] [?\e])) -;; arch-tag: 876831c9-a6f2-444a-b033-706e6fbc149f ;;; vt300.el ends here diff --git a/lisp/term/vt320.el b/lisp/term/vt320.el index 1d36c9d933a..9b04a5d6ee4 100644 --- a/lisp/term/vt320.el +++ b/lisp/term/vt320.el @@ -6,5 +6,4 @@ (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant. (define-key local-function-key-map [f11] [?\e])) -;; arch-tag: f9f4c954-0b9e-45f9-b450-a320d32abd9c ;;; vt320.el ends here diff --git a/lisp/term/vt400.el b/lisp/term/vt400.el index 78af2a37197..4c5870c5ad8 100644 --- a/lisp/term/vt400.el +++ b/lisp/term/vt400.el @@ -6,5 +6,4 @@ (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant. (define-key local-function-key-map [f11] [?\e])) -;; arch-tag: a70809c5-6b21-42cc-ba20-536683e5e7d5 ;;; vt400.el ends here diff --git a/lisp/term/vt420.el b/lisp/term/vt420.el index 69b1b31abd7..0476b639c23 100644 --- a/lisp/term/vt420.el +++ b/lisp/term/vt420.el @@ -6,5 +6,4 @@ (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant. (define-key local-function-key-map [f11] [?\e])) -;; arch-tag: df2f897c-3a12-4b3c-9259-df089f96c160 ;;; vt420.el ends here diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el index a1ab5a8225c..0ddf7b3e542 100644 --- a/lisp/term/w32-win.el +++ b/lisp/term/w32-win.el @@ -1,7 +1,6 @@ ;;; w32-win.el --- parse switches controlling interface with W32 window system -;; Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993-1994, 2001-2011 Free Software Foundation, Inc. ;; Author: Kevin Gallo ;; Keywords: terminals @@ -190,17 +189,25 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.") ;;; Set default known names for external libraries (setq dynamic-library-alist - '((xpm "libxpm.dll" "xpm4.dll" "libXpm-nox4.dll") - (png "libpng12d.dll" "libpng12.dll" "libpng.dll" - ;; these are libpng 1.2.8 from GTK+ - "libpng13d.dll" "libpng13.dll") - (jpeg "jpeg62.dll" "libjpeg.dll" "jpeg-62.dll" "jpeg.dll") - (tiff "libtiff3.dll" "libtiff.dll") - (gif "giflib4.dll" "libungif4.dll" "libungif.dll") - (svg "librsvg-2-2.dll") - (gdk-pixbuf "libgdk_pixbuf-2.0-0.dll") - (glib "libglib-2.0-0.dll") - (gobject "libgobject-2.0-0.dll"))) + (list + '(xpm "libxpm.dll" "xpm4.dll" "libXpm-nox4.dll") + ;; Versions of libpng 1.4.x and later are incompatible with + ;; earlier versions. Set up the list of libraries according to + ;; the version we were compiled against. (If we were compiled + ;; without PNG support, libpng-version's value is -1.) + (if (>= libpng-version 10400) + ;; libpng14-14.dll is libpng 1.4.3 from GTK+ + '(png "libpng14-14.dll" "libpng14.dll") + '(png "libpng12d.dll" "libpng12.dll" "libpng3.dll" "libpng.dll" + ;; these are libpng 1.2.8 from GTK+ + "libpng13d.dll" "libpng13.dll")) + '(jpeg "jpeg62.dll" "libjpeg.dll" "jpeg-62.dll" "jpeg.dll") + '(tiff "libtiff3.dll" "libtiff.dll") + '(gif "giflib4.dll" "libungif4.dll" "libungif.dll") + '(svg "librsvg-2-2.dll") + '(gdk-pixbuf "libgdk_pixbuf-2.0-0.dll") + '(glib "libglib-2.0-0.dll") + '(gobject "libgobject-2.0-0.dll"))) ;;; multi-tty support (defvar w32-initialized nil diff --git a/lisp/term/w32console.el b/lisp/term/w32console.el index 0d3aa934b9b..6072613841d 100644 --- a/lisp/term/w32console.el +++ b/lisp/term/w32console.el @@ -1,6 +1,6 @@ ;;; w32console.el -- Setup w32 console keys and colors. -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: FSF ;; Keywords: terminals diff --git a/lisp/term/wyse50.el b/lisp/term/wyse50.el index 5cb2829f5f5..b818c769bab 100644 --- a/lisp/term/wyse50.el +++ b/lisp/term/wyse50.el @@ -1,7 +1,6 @@ ;;; wyse50.el --- terminal support code for Wyse 50 -*- no-byte-compile: t -*- -;; Copyright (C) 1989, 1993, 1994, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1989, 1993-1994, 2001-2011 Free Software Foundation, Inc. ;; Author: Daniel Pfeiffer <occitan@esperanto.org>, ;; Jim Blandy <jimb@occs.cs.oberlin.edu> @@ -156,5 +155,4 @@ M-r M-x move-to-window-line, Funct up-arrow or down-arrow are similar" ;; (nth 1 key-definition))) (fset 'enable-arrow-keys nil)) -;; arch-tag: b6a05d37-eead-4cf6-b997-0f956c68881c ;;; wyse50.el ends here diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index afb706ab972..1ec80d5c277 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el @@ -1,7 +1,6 @@ ;;; x-win.el --- parse relevant switches and set up for X -*-coding: iso-2022-7bit;-*- -;; Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993-1994, 2001-2011 Free Software Foundation, Inc. ;; Author: FSF ;; Keywords: terminals, i18n diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index ccedf4045e4..0db33b5a4de 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el @@ -1,7 +1,6 @@ ;;; xterm.el --- define function key sequences and standard colors for xterm -;; Copyright (C) 1995, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995, 2001-2011 Free Software Foundation, Inc. ;; Author: FSF ;; Keywords: terminals @@ -682,5 +681,4 @@ versions of xterm." (set-terminal-parameter nil 'background-mode 'dark) t)) -;; arch-tag: 12e7ebdd-1e6c-4b25-b0f9-35ace25e855a ;;; xterm.el ends here diff --git a/lisp/terminal.el b/lisp/terminal.el index 84915764c70..d888a653c93 100644 --- a/lisp/terminal.el +++ b/lisp/terminal.el @@ -1,7 +1,7 @@ ;;; terminal.el --- terminal emulator for GNU Emacs -;; Copyright (C) 1986, 1987, 1988, 1989, 1993, 1994, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1986-1989, 1993-1994, 2001-2011 +;; Free Software Foundation, Inc. ;; Author: Richard Mlynarik <mly@eddie.mit.edu> ;; Maintainer: FSF @@ -1335,5 +1335,4 @@ in the directory specified by `te-terminfo-directory'." (provide 'terminal) -;; arch-tag: 0ae1d7d7-90ef-4566-a531-6e7ff8c79b2f ;;; terminal.el ends here diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el index 549b3b3c52a..f1e73dcf480 100644 --- a/lisp/textmodes/artist.el +++ b/lisp/textmodes/artist.el @@ -1,7 +1,6 @@ ;;; artist.el --- draw ascii graphics with your mouse -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; Author: Tomas Abrahamsson <tab@lysator.liu.se> ;; Maintainer: Tomas Abrahamsson <tab@lysator.liu.se> @@ -5557,5 +5556,4 @@ The event, EV, is the mouse event." ;; Don't hesitate to ask me any questions. -;; arch-tag: 3e63b881-aaaa-4b83-a072-220d4661a8a3 ;;; artist.el ends here diff --git a/lisp/textmodes/bib-mode.el b/lisp/textmodes/bib-mode.el index 524902f22c9..728f42779bf 100644 --- a/lisp/textmodes/bib-mode.el +++ b/lisp/textmodes/bib-mode.el @@ -1,7 +1,6 @@ ;;; bib-mode.el --- major mode for editing bib files -;; Copyright (C) 1989, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1989, 2001-2011 Free Software Foundation, Inc. ;; Author: Henry Kautz ;; (according to authors.el) @@ -236,5 +235,4 @@ named by variable `unread-bib-file'." (provide 'bib-mode) -;; arch-tag: e3a97958-3c2c-487f-9557-fafc3c98452d ;;; bib-mode.el ends here diff --git a/lisp/textmodes/bibtex-style.el b/lisp/textmodes/bibtex-style.el index 3e84c37af9e..831d4e86676 100644 --- a/lisp/textmodes/bibtex-style.el +++ b/lisp/textmodes/bibtex-style.el @@ -1,7 +1,6 @@ ;;; bibtex-style.el --- Major mode for BibTeX Style files -;; Copyright (C) 2005, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2005, 2007-2011 Free Software Foundation, Inc. ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> ;; Keywords: tex @@ -152,5 +151,4 @@ (provide 'bibtex-style) -;; arch-tag: b20ad41a-fd36-466e-8fd2-cc6137f9c55c ;;; bibtex-style.el ends here diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 75dd4f80153..2d2c0380a4a 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -1,8 +1,6 @@ ;;; bibtex.el --- BibTeX mode for GNU Emacs -;; Copyright (C) 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, -;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1992, 1994-1999, 2001-2011 Free Software Foundation, Inc. ;; Author: Stefan Schoef <schoef@offis.uni-oldenburg.de> ;; Bengt Martensson <bengt@mathematik.uni-Bremen.de> diff --git a/lisp/textmodes/conf-mode.el b/lisp/textmodes/conf-mode.el index 667818db349..4e6c8bd6b05 100644 --- a/lisp/textmodes/conf-mode.el +++ b/lisp/textmodes/conf-mode.el @@ -1,7 +1,6 @@ ;;; conf-mode.el --- Simple major mode for editing conf/ini/properties files -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Daniel Pfeiffer <occitan@esperanto.org> ;; Keywords: conf ini windows java @@ -178,7 +177,7 @@ not align (only setting space according to `conf-assignment-space')." (defvar conf-font-lock-keywords - `(;; [section] (do this first because it may look like a parameter) + '(;; [section] (do this first because it may look like a parameter) ("^[ \t]*\\[\\(.+\\)\\]" 1 'font-lock-type-face) ;; var=val or var[index]=val ("^[ \t]*\\(.+?\\)\\(?:\\[\\(.*?\\)\\]\\)?[ \t]*=" @@ -621,5 +620,4 @@ For details see `conf-mode'. Example: (provide 'conf-mode) -;; arch-tag: 0a3805b2-0371-4d3a-8498-8897116b2356 ;;; conf-mode.el ends here diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el index 759778eb025..b611261723a 100644 --- a/lisp/textmodes/css-mode.el +++ b/lisp/textmodes/css-mode.el @@ -1,6 +1,6 @@ ;;; css-mode.el --- Major mode to edit CSS files -;; Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2006-2011 Free Software Foundation, Inc. ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> ;; Keywords: hypermedia @@ -483,5 +483,4 @@ (indent-line-to indent))))) (provide 'css-mode) -;; arch-tag: b4d8b8e2-b130-4e74-b3aa-cd8f1ab659d0 ;;; css-mode.el ends here diff --git a/lisp/textmodes/dns-mode.el b/lisp/textmodes/dns-mode.el index ed84b5be914..0d5d28f8e5d 100644 --- a/lisp/textmodes/dns-mode.el +++ b/lisp/textmodes/dns-mode.el @@ -1,7 +1,6 @@ ;;; dns-mode.el --- a mode for viewing/editing Domain Name System master files -;; Copyright (C) 2000, 2001, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2000-2001, 2004-2011 Free Software Foundation, Inc. ;; Author: Simon Josefsson <simon@josefsson.org> ;; Keywords: DNS master zone file SOA comm diff --git a/lisp/textmodes/enriched.el b/lisp/textmodes/enriched.el index c2711a7345c..f6677bf458e 100644 --- a/lisp/textmodes/enriched.el +++ b/lisp/textmodes/enriched.el @@ -1,7 +1,6 @@ ;;; enriched.el --- read and save files in text/enriched format -;; Copyright (C) 1994, 1995, 1996, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994-1996, 2001-2011 Free Software Foundation, Inc. ;; Author: Boris Goldowsky <boris@gnu.org> ;; Keywords: wp, faces @@ -502,5 +501,4 @@ the range of text to assign text property SYMBOL with value VALUE." (message "Warning: invalid <x-display> parameter %s" param)) (list start end 'display prop))) -;; arch-tag: 05cae488-3fea-45cd-ac29-5b02cb64e42b ;;; enriched.el ends here diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 2dd7b1e2c95..2b7e9a19baa 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -1,7 +1,6 @@ ;;; fill.el --- fill commands for Emacs -*- coding: utf-8 -*- -;; Copyright (C) 1985, 1986, 1992, 1994, 1995, 1996, 1997, 1999, 2001, -;; 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 1985-1986, 1992, 1994-1997, 1999, 2001-2011 ;; Free Software Foundation, Inc. ;; Maintainer: FSF diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 5dbcb2d7d77..3c9a4570248 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -1,7 +1,6 @@ ;;; flyspell.el --- on-the-fly spell checker -;; Copyright (C) 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998, 2000-2011 Free Software Foundation, Inc. ;; Author: Manuel Serrano <Manuel.Serrano@sophia.inria.fr> ;; Maintainer: FSF diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 9a494897b74..ab31fed7069 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -1,8 +1,6 @@ ;;; ispell.el --- interface to International Ispell Versions 3.1 and 3.2 -;; Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1994-1995, 1997-2011 Free Software Foundation, Inc. ;; Author: Ken Stevens <k.stevens@ieee.org> ;; Maintainer: Ken Stevens <k.stevens@ieee.org> diff --git a/lisp/textmodes/makeinfo.el b/lisp/textmodes/makeinfo.el index b5f1336d535..4d701a9d268 100644 --- a/lisp/textmodes/makeinfo.el +++ b/lisp/textmodes/makeinfo.el @@ -1,7 +1,6 @@ ;;; makeinfo.el --- run makeinfo conveniently -;; Copyright (C) 1991, 1993, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1991, 1993, 2001-2011 Free Software Foundation, Inc. ;; Author: Robert J. Chassell ;; Maintainer: FSF @@ -289,5 +288,4 @@ line LINE of the window, or centered if LINE is nil." ;;; Place `provide' at end of file. (provide 'makeinfo) -;; arch-tag: 5f810713-3de2-4e20-8030-4bc3dd0d9604 ;;; makeinfo.el ends here diff --git a/lisp/textmodes/nroff-mode.el b/lisp/textmodes/nroff-mode.el index 52538064053..8fb0bd85dab 100644 --- a/lisp/textmodes/nroff-mode.el +++ b/lisp/textmodes/nroff-mode.el @@ -1,7 +1,7 @@ ;;; nroff-mode.el --- GNU Emacs major mode for editing nroff source -;; Copyright (C) 1985, 1986, 1994, 1995, 1997, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985-1986, 1994-1995, 1997, 2001-2011 +;; Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: wp @@ -331,5 +331,4 @@ turns it on if arg is positive, otherwise off." (provide 'nroff-mode) -;; arch-tag: 6e276340-6c65-4f65-b4e3-0ca431ddfb6c ;;; nroff-mode.el ends here diff --git a/lisp/textmodes/page-ext.el b/lisp/textmodes/page-ext.el index 548223e4f2c..6e73fda662b 100644 --- a/lisp/textmodes/page-ext.el +++ b/lisp/textmodes/page-ext.el @@ -1,7 +1,7 @@ ;;; page-ext.el --- extended page handling commands -;; Copyright (C) 1990, 1991, 1993, 1994, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1991, 1993-1994, 2001-2011 +;; Free Software Foundation, Inc. ;; Author: Robert J. Chassell <bob@gnu.org> ;; (according to ack.texi) diff --git a/lisp/textmodes/page.el b/lisp/textmodes/page.el index 1c213fcbea2..1de67615252 100644 --- a/lisp/textmodes/page.el +++ b/lisp/textmodes/page.el @@ -1,7 +1,6 @@ ;;; page.el --- page motion commands for Emacs -;; Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: wp convenience @@ -164,5 +163,4 @@ thus showing a page other than the one point was originally in." ;;; Place `provide' at end of file. (provide 'page) -;; arch-tag: e8d7a0bd-8655-4b6e-b852-f2ee25316a1d ;;; page.el ends here diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el index 4f1bcefa90e..70f11cf66dc 100644 --- a/lisp/textmodes/paragraphs.el +++ b/lisp/textmodes/paragraphs.el @@ -1,7 +1,6 @@ ;;; paragraphs.el --- paragraph and sentence parsing -;; Copyright (C) 1985, 1986, 1987, 1991, 1994, 1995, 1996, 1997, 1999, 2000, -;; 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 1985-1987, 1991, 1994-1997, 1999-2011 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -529,5 +528,4 @@ the current sentence with the one containing the mark." ;; coding: utf-8 ;; End: -;; arch-tag: e727eb1a-527a-4464-b9d7-9d3ec0d1a575 ;;; paragraphs.el ends here diff --git a/lisp/textmodes/picture.el b/lisp/textmodes/picture.el index 98add4cfd28..8148378cee3 100644 --- a/lisp/textmodes/picture.el +++ b/lisp/textmodes/picture.el @@ -1,7 +1,6 @@ ;;; picture.el --- "Picture mode" -- editing using quarter-plane screen model -;; Copyright (C) 1985, 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1994, 2001-2011 Free Software Foundation, Inc. ;; Author: K. Shane Hartman ;; Maintainer: FSF diff --git a/lisp/textmodes/po.el b/lisp/textmodes/po.el index e3a9d6158d4..7810cc6d57a 100644 --- a/lisp/textmodes/po.el +++ b/lisp/textmodes/po.el @@ -1,7 +1,6 @@ ;;; po.el --- basic support of PO translation files -*- coding: latin-1; -*- -;; Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995-1998, 2000-2011 Free Software Foundation, Inc. ;; Authors: François Pinard <pinard@iro.umontreal.ca>, ;; Greg McGary <gkm@magilla.cichlid.com>, @@ -131,5 +130,4 @@ Called through `file-coding-system-alist', before the file is visited for real." (provide 'po) -;; arch-tag: 56748a57-d64c-4200-8f6b-c3a70496eb8c ;;; po.el ends here diff --git a/lisp/textmodes/refbib.el b/lisp/textmodes/refbib.el index 14e74549ff2..557978395c1 100644 --- a/lisp/textmodes/refbib.el +++ b/lisp/textmodes/refbib.el @@ -1,7 +1,6 @@ ;;; refbib.el --- convert refer-style references to ones usable by Latex bib -;; Copyright (C) 1989, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1989, 2001-2011 Free Software Foundation, Inc. ;; Author: Henry Kautz <kautz@research.att.com> ;; Maintainer: FSF @@ -746,5 +745,4 @@ Please send bug reports and suggestions to (provide 'refbib) (provide 'refer-to-bibtex) -;; arch-tag: 664afee2-6e76-4408-ba56-981d8a179586 ;;; refbib.el ends here diff --git a/lisp/textmodes/refer.el b/lisp/textmodes/refer.el index a811c8f6580..7ee0fcf9da6 100644 --- a/lisp/textmodes/refer.el +++ b/lisp/textmodes/refer.el @@ -1,7 +1,6 @@ ;;; refer.el --- look up references in bibliography files -;; Copyright (C) 1992, 1996, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1992, 1996, 2001-2011 Free Software Foundation, Inc. ;; Author: Ashwin Ram <ashwin@cc.gatech.edu> ;; Maintainer: Gernot Heiser <gernot@acm.org> @@ -396,5 +395,4 @@ found on the last `refer-find-entry' or `refer-find-next-entry'." (setq refer-bib-files files)) files)) -;; arch-tag: 151f641b-e79b-462b-9a29-a95c3793f300 ;;; refer.el ends here diff --git a/lisp/textmodes/refill.el b/lisp/textmodes/refill.el index 736fba29322..474872955b4 100644 --- a/lisp/textmodes/refill.el +++ b/lisp/textmodes/refill.el @@ -1,7 +1,6 @@ ;;; refill.el --- `auto-fill' by refilling paragraphs on changes -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; Author: Dave Love <fx@gnu.org> ;; Maintainer: Miles Bader <miles@gnu.org> @@ -258,5 +257,4 @@ refilling if they would cause auto-filling." (provide 'refill) -;; arch-tag: 2c4ce9e8-1daa-4a3b-b6f8-fd6ac5bf6138 ;;; refill.el ends here diff --git a/lisp/textmodes/reftex-auc.el b/lisp/textmodes/reftex-auc.el index 89e8d26bc65..eba19c25ef6 100644 --- a/lisp/textmodes/reftex-auc.el +++ b/lisp/textmodes/reftex-auc.el @@ -1,7 +1,6 @@ ;;; reftex-auc.el --- RefTeX's interface to AUCTeX -;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <dominik@science.uva.nl> ;; Maintainer: auctex-devel@gnu.org @@ -224,5 +223,4 @@ of ENTRY-LIST is a list of cons cells (\"MACRONAME\" . LEVEL). See (defun reftex-notice-new-section () (reftex-notice-new 1 'force)) -;; arch-tag: 4a798e68-3405-421c-a09b-0269aac64ab4 ;;; reftex-auc.el ends here diff --git a/lisp/textmodes/reftex-cite.el b/lisp/textmodes/reftex-cite.el index 2c8a14a3808..78d80da41ac 100644 --- a/lisp/textmodes/reftex-cite.el +++ b/lisp/textmodes/reftex-cite.el @@ -1,7 +1,6 @@ ;;; reftex-cite.el --- creating citations with RefTeX -;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <dominik@science.uva.nl> ;; Maintainer: auctex-devel@gnu.org @@ -1174,5 +1173,4 @@ The sequence in the new file is the same as it was in the old database." (length entries)))) -;; arch-tag: d53d0a5a-ab32-4b52-a846-2a7c3527cd89 ;;; reftex-cite.el ends here diff --git a/lisp/textmodes/reftex-dcr.el b/lisp/textmodes/reftex-dcr.el index 39fc0f4a81c..68202440e1d 100644 --- a/lisp/textmodes/reftex-dcr.el +++ b/lisp/textmodes/reftex-dcr.el @@ -1,7 +1,6 @@ ;;; reftex-dcr.el --- viewing cross references and citations with RefTeX -;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <dominik@science.uva.nl> ;; Maintainer: auctex-devel@gnu.org @@ -482,5 +481,4 @@ Calling this function several times find successive citation locations." (move-marker reftex-global-search-marker nil) (error "All files processed")))) -;; arch-tag: d2f52b56-744e-44ad-830d-1fc193b90eda ;;; reftex-dcr.el ends here diff --git a/lisp/textmodes/reftex-global.el b/lisp/textmodes/reftex-global.el index dc533185b24..ccdab49750b 100644 --- a/lisp/textmodes/reftex-global.el +++ b/lisp/textmodes/reftex-global.el @@ -1,7 +1,6 @@ ;;; reftex-global.el --- operations on entire documents with RefTeX -;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <dominik@science.uva.nl> ;; Maintainer: auctex-devel@gnu.org @@ -475,5 +474,4 @@ With no argument, this command toggles (add-minor-mode 'reftex-isearch-minor-mode "/I" nil nil 'reftex-isearch-minor-mode) -;; arch-tag: 2dbf7633-92c8-4340-8656-7aa019d0f80d ;;; reftex-global.el ends here diff --git a/lisp/textmodes/reftex-index.el b/lisp/textmodes/reftex-index.el index 2da5897827d..f75d8b57909 100644 --- a/lisp/textmodes/reftex-index.el +++ b/lisp/textmodes/reftex-index.el @@ -1,7 +1,6 @@ ;;; reftex-index.el --- index support with RefTeX -;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <dominik@science.uva.nl> ;; Maintainer: auctex-devel@gnu.org @@ -275,8 +274,111 @@ will prompt for other arguments." (and newtag (cdr cell) (not (member newtag (cdr cell))) (push newtag (cdr cell))))) -(defvar reftex-index-map (make-sparse-keymap) +(defvar reftex-index-mode-map + (let ((map (make-sparse-keymap))) + ;; Index map + (define-key map (if (featurep 'xemacs) [(button2)] [(mouse-2)]) + 'reftex-index-mouse-goto-line-and-hide) + (define-key map [follow-link] 'mouse-face) + + (substitute-key-definition + 'next-line 'reftex-index-next map global-map) + (substitute-key-definition + 'previous-line 'reftex-index-previous map global-map) + + (loop for x in + '(("n" . reftex-index-next) + ("p" . reftex-index-previous) + ("?" . reftex-index-show-help) + (" " . reftex-index-view-entry) + ("\C-m" . reftex-index-goto-entry-and-hide) + ("\C-i" . reftex-index-goto-entry) + ("\C-k" . reftex-index-kill) + ("r" . reftex-index-rescan) + ("R" . reftex-index-Rescan) + ("g" . revert-buffer) + ("q" . reftex-index-quit) + ("k" . reftex-index-quit-and-kill) + ("f" . reftex-index-toggle-follow) + ("s" . reftex-index-switch-index-tag) + ("e" . reftex-index-edit) + ("^" . reftex-index-level-up) + ("_" . reftex-index-level-down) + ("}" . reftex-index-restrict-to-section) + ("{" . reftex-index-widen) + (">" . reftex-index-restriction-forward) + ("<" . reftex-index-restriction-backward) + ("(" . reftex-index-toggle-range-beginning) + (")" . reftex-index-toggle-range-end) + ("|" . reftex-index-edit-attribute) + ("@" . reftex-index-edit-visual) + ("*" . reftex-index-edit-key) + ("\C-c=". reftex-index-goto-toc) + ("c" . reftex-index-toggle-context)) + do (define-key map (car x) (cdr x))) + + (loop for key across "0123456789" do + (define-key map (vector (list key)) 'digit-argument)) + (define-key map "-" 'negative-argument) + + ;; The capital letters and the exclamation mark + (loop for key across (concat "!" reftex-index-section-letters) do + (define-key map (vector (list key)) + (list 'lambda '() '(interactive) + (list 'reftex-index-goto-letter key)))) + + (easy-menu-define reftex-index-menu map + "Menu for Index buffer" + '("Index" + ["Goto section A-Z" + (message "To go to a section, just press any of: !%s" + reftex-index-section-letters) t] + ["Show Entry" reftex-index-view-entry t] + ["Go To Entry" reftex-index-goto-entry t] + ["Exit & Go To Entry" reftex-index-goto-entry-and-hide t] + ["Table of Contents" reftex-index-goto-toc t] + ["Quit" reftex-index-quit t] + "--" + ("Update" + ["Rebuilt *Index* Buffer" revert-buffer t] + "--" + ["Rescan One File" reftex-index-rescan reftex-enable-partial-scans] + ["Rescan Entire Document" reftex-index-Rescan t]) + ("Restrict" + ["Restrict to section" reftex-index-restrict-to-section t] + ["Widen" reftex-index-widen reftex-index-restriction-indicator] + ["Next Section" reftex-index-restriction-forward + reftex-index-restriction-indicator] + ["Previous Section" reftex-index-restriction-backward + reftex-index-restriction-indicator]) + ("Edit" + ["Edit Entry" reftex-index-edit t] + ["Edit Key" reftex-index-edit-key t] + ["Edit Attribute" reftex-index-edit-attribute t] + ["Edit Visual" reftex-index-edit-visual t] + "--" + ["Add Parentkey" reftex-index-level-down t] + ["Remove Parentkey " reftex-index-level-up t] + "--" + ["Make Start-of-Range" reftex-index-toggle-range-beginning t] + ["Make End-of-Range" reftex-index-toggle-range-end t] + "--" + ["Kill Entry" reftex-index-kill nil] + "--" + ["Undo" reftex-index-undo nil]) + ("Options" + ["Context" reftex-index-toggle-context :style toggle + :selected reftex-index-include-context] + "--" + ["Follow Mode" reftex-index-toggle-follow :style toggle + :selected reftex-index-follow-mode]) + "--" + ["Help" reftex-index-show-help t])) + + map) "Keymap used for *Index* buffers.") +(define-obsolete-variable-alias + 'reftex-index-map 'reftex-index-mode-map "24.1") (defvar reftex-index-menu) @@ -291,19 +393,14 @@ will prompt for other arguments." (defvar reftex-index-restriction-indicator nil) (defvar reftex-index-restriction-data nil) -(defun reftex-index-mode () +(define-derived-mode reftex-index-mode fundamental-mode "RefTeX Index" "Major mode for managing Index buffers for LaTeX files. This buffer was created with RefTeX. Press `?' for a summary of important key bindings, or check the menu. Here are all local bindings. -\\{reftex-index-map}" - (interactive) - (kill-all-local-variables) - (setq major-mode 'reftex-index-mode - mode-name "RefTeX Index") - (use-local-map reftex-index-map) +\\{reftex-index-mode-map}" (set (make-local-variable 'revert-buffer-function) 'reftex-index-revert) (set (make-local-variable 'reftex-index-restriction-data) nil) (set (make-local-variable 'reftex-index-restriction-indicator) nil) @@ -318,10 +415,9 @@ Here are all local bindings. (make-local-hook 'post-command-hook) (make-local-hook 'pre-command-hook)) (make-local-variable 'reftex-last-follow-point) - (easy-menu-add reftex-index-menu reftex-index-map) + (easy-menu-add reftex-index-menu reftex-index-mode-map) (add-hook 'post-command-hook 'reftex-index-post-command-hook nil t) - (add-hook 'pre-command-hook 'reftex-index-pre-command-hook nil t) - (run-hooks 'reftex-index-mode-hook)) + (add-hook 'pre-command-hook 'reftex-index-pre-command-hook nil t)) (defconst reftex-index-help " AVAILABLE KEYS IN INDEX BUFFER @@ -1032,57 +1128,6 @@ When index is restricted, select the previous section as restriction criterion." (setq reftex-last-follow-point 1) (and message (message "%s" message)))) -;; Index map -(define-key reftex-index-map (if (featurep 'xemacs) [(button2)] [(mouse-2)]) - 'reftex-index-mouse-goto-line-and-hide) -(define-key reftex-index-map [follow-link] 'mouse-face) - -(substitute-key-definition - 'next-line 'reftex-index-next reftex-index-map global-map) -(substitute-key-definition - 'previous-line 'reftex-index-previous reftex-index-map global-map) - -(loop for x in - '(("n" . reftex-index-next) - ("p" . reftex-index-previous) - ("?" . reftex-index-show-help) - (" " . reftex-index-view-entry) - ("\C-m" . reftex-index-goto-entry-and-hide) - ("\C-i" . reftex-index-goto-entry) - ("\C-k" . reftex-index-kill) - ("r" . reftex-index-rescan) - ("R" . reftex-index-Rescan) - ("g" . revert-buffer) - ("q" . reftex-index-quit) - ("k" . reftex-index-quit-and-kill) - ("f" . reftex-index-toggle-follow) - ("s" . reftex-index-switch-index-tag) - ("e" . reftex-index-edit) - ("^" . reftex-index-level-up) - ("_" . reftex-index-level-down) - ("}" . reftex-index-restrict-to-section) - ("{" . reftex-index-widen) - (">" . reftex-index-restriction-forward) - ("<" . reftex-index-restriction-backward) - ("(" . reftex-index-toggle-range-beginning) - (")" . reftex-index-toggle-range-end) - ("|" . reftex-index-edit-attribute) - ("@" . reftex-index-edit-visual) - ("*" . reftex-index-edit-key) - ("\C-c=". reftex-index-goto-toc) - ("c" . reftex-index-toggle-context)) - do (define-key reftex-index-map (car x) (cdr x))) - -(loop for key across "0123456789" do - (define-key reftex-index-map (vector (list key)) 'digit-argument)) -(define-key reftex-index-map "-" 'negative-argument) - -;; The capital letters and the exclamation mark -(loop for key across (concat "!" reftex-index-section-letters) do - (define-key reftex-index-map (vector (list key)) - (list 'lambda '() '(interactive) - (list 'reftex-index-goto-letter key)))) - (defun reftex-index-goto-letter (char) "Go to the CHAR section in the index." (let ((pos (point)) @@ -1101,55 +1146,6 @@ When index is restricted, select the previous section as restriction criterion." (error "This <%s> index does not contain entries starting with `%c'" reftex-index-tag char))))) -(easy-menu-define - reftex-index-menu reftex-index-map - "Menu for Index buffer" - `("Index" - ["Goto section A-Z" - (message "To go to a section, just press any of: !%s" - reftex-index-section-letters) t] - ["Show Entry" reftex-index-view-entry t] - ["Go To Entry" reftex-index-goto-entry t] - ["Exit & Go To Entry" reftex-index-goto-entry-and-hide t] - ["Table of Contents" reftex-index-goto-toc t] - ["Quit" reftex-index-quit t] - "--" - ("Update" - ["Rebuilt *Index* Buffer" revert-buffer t] - "--" - ["Rescan One File" reftex-index-rescan reftex-enable-partial-scans] - ["Rescan Entire Document" reftex-index-Rescan t]) - ("Restrict" - ["Restrict to section" reftex-index-restrict-to-section t] - ["Widen" reftex-index-widen reftex-index-restriction-indicator] - ["Next Section" reftex-index-restriction-forward - reftex-index-restriction-indicator] - ["Previous Section" reftex-index-restriction-backward - reftex-index-restriction-indicator]) - ("Edit" - ["Edit Entry" reftex-index-edit t] - ["Edit Key" reftex-index-edit-key t] - ["Edit Attribute" reftex-index-edit-attribute t] - ["Edit Visual" reftex-index-edit-visual t] - "--" - ["Add Parentkey" reftex-index-level-down t] - ["Remove Parentkey " reftex-index-level-up t] - "--" - ["Make Start-of-Range" reftex-index-toggle-range-beginning t] - ["Make End-of-Range" reftex-index-toggle-range-end t] - "--" - ["Kill Entry" reftex-index-kill nil] - "--" - ["Undo" reftex-index-undo nil]) - ("Options" - ["Context" reftex-index-toggle-context :style toggle - :selected reftex-index-include-context] - "--" - ["Follow Mode" reftex-index-toggle-follow :style toggle - :selected reftex-index-follow-mode]) - "--" - ["Help" reftex-index-show-help t])) - ;;---------------------------------------------------------------------- ;; The Index Phrases File @@ -1183,8 +1179,73 @@ This gets refreshed in every phrases command.") "Font lock keywords for reftex-index-phrases-mode.") (defvar reftex-index-phrases-font-lock-defaults nil "Font lock defaults for reftex-index-phrases-mode.") -(defvar reftex-index-phrases-map (make-sparse-keymap) +(defvar reftex-index-phrases-mode-map + (let ((map (make-sparse-keymap))) + ;; Keybindings and Menu for phrases buffer + (loop for x in + '(("\C-c\C-c" . reftex-index-phrases-save-and-return) + ("\C-c\C-x" . reftex-index-this-phrase) + ("\C-c\C-f" . reftex-index-next-phrase) + ("\C-c\C-r" . reftex-index-region-phrases) + ("\C-c\C-a" . reftex-index-all-phrases) + ("\C-c\C-d" . reftex-index-remaining-phrases) + ("\C-c\C-s" . reftex-index-sort-phrases) + ("\C-c\C-n" . reftex-index-new-phrase) + ("\C-c\C-m" . reftex-index-phrases-set-macro-key) + ("\C-c\C-i" . reftex-index-phrases-info) + ("\C-c\C-t" . reftex-index-find-next-conflict-phrase) + ("\C-i" . self-insert-command)) + do (define-key map (car x) (cdr x))) + + (easy-menu-define reftex-index-phrases-menu map + "Menu for Phrases buffer" + '("Phrases" + ["New Phrase" reftex-index-new-phrase t] + ["Set Phrase Macro" reftex-index-phrases-set-macro-key t] + ["Recreate File Header" reftex-index-initialize-phrases-buffer t] + "--" + ("Sort Phrases" + ["Sort" reftex-index-sort-phrases t] + "--" + "Sort Options" + ["by Search Phrase" (setq reftex-index-phrases-sort-prefers-entry nil) + :style radio :selected (not reftex-index-phrases-sort-prefers-entry)] + ["by Index Entry" (setq reftex-index-phrases-sort-prefers-entry t) + :style radio :selected reftex-index-phrases-sort-prefers-entry] + ["in Blocks" (setq reftex-index-phrases-sort-in-blocks + (not reftex-index-phrases-sort-in-blocks)) + :style toggle :selected reftex-index-phrases-sort-in-blocks]) + ["Describe Phrase" reftex-index-phrases-info t] + ["Next Phrase Conflict" reftex-index-find-next-conflict-phrase t] + "--" + ("Find and Index in Document" + ["Current Phrase" reftex-index-this-phrase t] + ["Next Phrase" reftex-index-next-phrase t] + ["Current and Following" reftex-index-remaining-phrases t] + ["Region Phrases" reftex-index-region-phrases t] + ["All Phrases" reftex-index-all-phrases t] + "--" + "Options" + ["Match Whole Words" (setq reftex-index-phrases-search-whole-words + (not reftex-index-phrases-search-whole-words)) + :style toggle :selected reftex-index-phrases-search-whole-words] + ["Case Sensitive Search" (setq reftex-index-phrases-case-fold-search + (not reftex-index-phrases-case-fold-search)) + :style toggle :selected (not + reftex-index-phrases-case-fold-search)] + ["Wrap Long Lines" (setq reftex-index-phrases-wrap-long-lines + (not reftex-index-phrases-wrap-long-lines)) + :style toggle :selected reftex-index-phrases-wrap-long-lines] + ["Skip Indexed Matches" (setq reftex-index-phrases-skip-indexed-matches + (not reftex-index-phrases-skip-indexed-matches)) + :style toggle :selected reftex-index-phrases-skip-indexed-matches]) + "--" + ["Save and Return" reftex-index-phrases-save-and-return t])) + + map) "Keymap used for *toc* buffer.") +(define-obsolete-variable-alias + 'reftex-index-phrases-map 'reftex-index-phrases-mode-map "24.1") (defun reftex-index-phrase-selection-or-word (arg) @@ -1288,7 +1349,7 @@ If the buffer is non-empty, delete the old header first." (defvar reftex-index-phrases-marker) (defvar reftex-index-phrases-restrict-file nil) ;;;###autoload -(defun reftex-index-phrases-mode () +(define-derived-mode reftex-index-phrases-mode fundamental-mode "Phrases" "Major mode for managing the Index phrases of a LaTeX document. This buffer was created with RefTeX. @@ -1311,18 +1372,12 @@ For more information see the RefTeX User Manual. Here are all local bindings. -\\{reftex-index-phrases-map}" - (interactive) - (kill-all-local-variables) - (setq major-mode 'reftex-index-phrases-mode - mode-name "Phrases") - (use-local-map reftex-index-phrases-map) +\\{reftex-index-phrases-mode-map}" (set (make-local-variable 'font-lock-defaults) reftex-index-phrases-font-lock-defaults) - (easy-menu-add reftex-index-phrases-menu reftex-index-phrases-map) - (set (make-local-variable 'reftex-index-phrases-marker) (make-marker)) - (run-hooks 'reftex-index-phrases-mode-hook)) -(add-hook 'reftex-index-phrases-mode-hook 'turn-on-font-lock) + (easy-menu-add reftex-index-phrases-menu reftex-index-phrases-mode-map) + (set (make-local-variable 'reftex-index-phrases-marker) (make-marker))) +;; (add-hook 'reftex-index-phrases-mode-hook 'turn-on-font-lock) ;; Font Locking stuff (let ((ss (if (featurep 'xemacs) 'secondary-selection ''secondary-selection))) @@ -2040,68 +2095,5 @@ Does not do a save-excursion." reftex-index-phrases-macro-data "\n")))) (reftex-select-with-char prompt help delay))) -;; Keybindings and Menu for phrases buffer - -(loop for x in - '(("\C-c\C-c" . reftex-index-phrases-save-and-return) - ("\C-c\C-x" . reftex-index-this-phrase) - ("\C-c\C-f" . reftex-index-next-phrase) - ("\C-c\C-r" . reftex-index-region-phrases) - ("\C-c\C-a" . reftex-index-all-phrases) - ("\C-c\C-d" . reftex-index-remaining-phrases) - ("\C-c\C-s" . reftex-index-sort-phrases) - ("\C-c\C-n" . reftex-index-new-phrase) - ("\C-c\C-m" . reftex-index-phrases-set-macro-key) - ("\C-c\C-i" . reftex-index-phrases-info) - ("\C-c\C-t" . reftex-index-find-next-conflict-phrase) - ("\C-i" . self-insert-command)) - do (define-key reftex-index-phrases-map (car x) (cdr x))) - -(easy-menu-define - reftex-index-phrases-menu reftex-index-phrases-map - "Menu for Phrases buffer" - '("Phrases" - ["New Phrase" reftex-index-new-phrase t] - ["Set Phrase Macro" reftex-index-phrases-set-macro-key t] - ["Recreate File Header" reftex-index-initialize-phrases-buffer t] - "--" - ("Sort Phrases" - ["Sort" reftex-index-sort-phrases t] - "--" - "Sort Options" - ["by Search Phrase" (setq reftex-index-phrases-sort-prefers-entry nil) - :style radio :selected (not reftex-index-phrases-sort-prefers-entry)] - ["by Index Entry" (setq reftex-index-phrases-sort-prefers-entry t) - :style radio :selected reftex-index-phrases-sort-prefers-entry] - ["in Blocks" (setq reftex-index-phrases-sort-in-blocks - (not reftex-index-phrases-sort-in-blocks)) - :style toggle :selected reftex-index-phrases-sort-in-blocks]) - ["Describe Phrase" reftex-index-phrases-info t] - ["Next Phrase Conflict" reftex-index-find-next-conflict-phrase t] - "--" - ("Find and Index in Document" - ["Current Phrase" reftex-index-this-phrase t] - ["Next Phrase" reftex-index-next-phrase t] - ["Current and Following" reftex-index-remaining-phrases t] - ["Region Phrases" reftex-index-region-phrases t] - ["All Phrases" reftex-index-all-phrases t] - "--" - "Options" - ["Match Whole Words" (setq reftex-index-phrases-search-whole-words - (not reftex-index-phrases-search-whole-words)) - :style toggle :selected reftex-index-phrases-search-whole-words] - ["Case Sensitive Search" (setq reftex-index-phrases-case-fold-search - (not reftex-index-phrases-case-fold-search)) - :style toggle :selected (not - reftex-index-phrases-case-fold-search)] - ["Wrap Long Lines" (setq reftex-index-phrases-wrap-long-lines - (not reftex-index-phrases-wrap-long-lines)) - :style toggle :selected reftex-index-phrases-wrap-long-lines] - ["Skip Indexed Matches" (setq reftex-index-phrases-skip-indexed-matches - (not reftex-index-phrases-skip-indexed-matches)) - :style toggle :selected reftex-index-phrases-skip-indexed-matches]) - "--" - ["Save and Return" reftex-index-phrases-save-and-return t])) - ;;; reftex-index.el ends here diff --git a/lisp/textmodes/reftex-parse.el b/lisp/textmodes/reftex-parse.el index fa0275b58be..6ffbf7a4621 100644 --- a/lisp/textmodes/reftex-parse.el +++ b/lisp/textmodes/reftex-parse.el @@ -1,7 +1,6 @@ ;;; reftex-parse.el --- parser functions for RefTeX -;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <dominik@science.uva.nl> ;; Maintainer: auctex-devel@gnu.org @@ -1070,5 +1069,4 @@ of master file." nrest (- nrest i)))) string)) -;; arch-tag: 6a8168f7-abb9-4576-99dc-fcbc7ba901a3 ;;; reftex-parse.el ends here diff --git a/lisp/textmodes/reftex-ref.el b/lisp/textmodes/reftex-ref.el index 91cc77480eb..b47f2f6c2e9 100644 --- a/lisp/textmodes/reftex-ref.el +++ b/lisp/textmodes/reftex-ref.el @@ -1,7 +1,6 @@ ;;; reftex-ref.el --- code to create labels and references with RefTeX -;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <dominik@science.uva.nl> ;; Maintainer: auctex-devel@gnu.org diff --git a/lisp/textmodes/reftex-sel.el b/lisp/textmodes/reftex-sel.el index bb6531d7980..b4e15fd2776 100644 --- a/lisp/textmodes/reftex-sel.el +++ b/lisp/textmodes/reftex-sel.el @@ -1,7 +1,6 @@ ;;; reftex-sel.el --- the selection modes for RefTeX -;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <dominik@science.uva.nl> ;; Maintainer: auctex-devel@gnu.org @@ -32,12 +31,81 @@ (require 'reftex) ;;; -(defvar reftex-select-label-map nil +;; Common bindings in reftex-select-label-mode-map +;; and reftex-select-bib-mode-map. +(defvar reftex-select-shared-map + (let ((map (make-sparse-keymap))) + (substitute-key-definition + 'next-line 'reftex-select-next map global-map) + (substitute-key-definition + 'previous-line 'reftex-select-previous map global-map) + (substitute-key-definition + 'keyboard-quit 'reftex-select-keyboard-quit map global-map) + (substitute-key-definition + 'newline 'reftex-select-accept map global-map) + + (loop for x in + '((" " . reftex-select-callback) + ("n" . reftex-select-next) + ([(down)] . reftex-select-next) + ("p" . reftex-select-previous) + ([(up)] . reftex-select-previous) + ("f" . reftex-select-toggle-follow) + ("\C-m" . reftex-select-accept) + ([(return)] . reftex-select-accept) + ("q" . reftex-select-quit) + ("." . reftex-select-show-insertion-point) + ("?" . reftex-select-help)) + do (define-key map (car x) (cdr x))) + + ;; The mouse-2 binding + (if (featurep 'xemacs) + (define-key map [(button2)] 'reftex-select-mouse-accept) + (define-key map [(mouse-2)] 'reftex-select-mouse-accept) + (define-key map [follow-link] 'mouse-face)) + + + ;; Digit arguments + (loop for key across "0123456789" do + (define-key map (vector (list key)) 'digit-argument)) + (define-key map "-" 'negative-argument) + map)) + +(defvar reftex-select-label-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map reftex-select-shared-map) + + (loop for key across "aAcgFlrRstx#%" do + (define-key map (vector (list key)) + (list 'lambda '() + "Press `?' during selection to find out about this key." + '(interactive) (list 'throw '(quote myexit) key)))) + + (loop for x in + '(("b" . reftex-select-jump-to-previous) + ("z" . reftex-select-jump) + ("v" . reftex-select-toggle-varioref) + ("V" . reftex-select-toggle-fancyref) + ("m" . reftex-select-mark) + ("u" . reftex-select-unmark) + ("," . reftex-select-mark-comma) + ("-" . reftex-select-mark-to) + ("+" . reftex-select-mark-and) + ([(tab)] . reftex-select-read-label) + ("\C-i" . reftex-select-read-label) + ("\C-c\C-n" . reftex-select-next-heading) + ("\C-c\C-p" . reftex-select-previous-heading)) + do + (define-key map (car x) (cdr x))) + + map) "Keymap used for *RefTeX Select* buffer, when selecting a label. This keymap can be used to configure the label selection process which is started with the command \\[reftex-reference].") +(define-obsolete-variable-alias + 'reftex-select-label-map 'reftex-select-label-mode-map "24.1") -(defun reftex-select-label-mode () +(define-derived-mode reftex-select-label-mode fundamental-mode "LSelect" "Major mode for selecting a label in a LaTeX document. This buffer was created with RefTeX. It only has a meaningful keymap when you are in the middle of a @@ -47,28 +115,42 @@ Press `?' for a summary of important key bindings. During a selection process, these are the local bindings. -\\{reftex-select-label-map}" - - (interactive) - (kill-all-local-variables) +\\{reftex-select-label-mode-map}" (when (featurep 'xemacs) ;; XEmacs needs the call to make-local-hook (make-local-hook 'pre-command-hook) (make-local-hook 'post-command-hook)) - (setq major-mode 'reftex-select-label-mode - mode-name "LSelect") (set (make-local-variable 'reftex-select-marked) nil) (when (syntax-table-p reftex-latex-syntax-table) (set-syntax-table reftex-latex-syntax-table)) ;; We do not set a local map - reftex-select-item does this. - (run-hooks 'reftex-select-label-mode-hook)) - -(defvar reftex-select-bib-map nil + ) + +(defvar reftex-select-bib-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map reftex-select-shared-map) + + (loop for key across "grRaAeE" do + (define-key map (vector (list key)) + (list 'lambda '() + "Press `?' during selection to find out about this key." + '(interactive) (list 'throw '(quote myexit) key)))) + + (loop for x in + '(("\C-i" . reftex-select-read-cite) + ([(tab)] . reftex-select-read-cite) + ("m" . reftex-select-mark) + ("u" . reftex-select-unmark)) + do (define-key map (car x) (cdr x))) + + map) "Keymap used for *RefTeX Select* buffer, when selecting a BibTeX entry. This keymap can be used to configure the BibTeX selection process which is started with the command \\[reftex-citation].") +(define-obsolete-variable-alias + 'reftex-select-bib-map 'reftex-select-bib-mode-map "24.1") -(defun reftex-select-bib-mode () +(define-derived-mode reftex-select-bib-mode fundamental-mode "BSelect" "Major mode for selecting a citation key in a LaTeX document. This buffer was created with RefTeX. It only has a meaningful keymap when you are in the middle of a @@ -78,18 +160,14 @@ Press `?' for a summary of important key bindings. During a selection process, these are the local bindings. -\\{reftex-select-label-map}" - (interactive) - (kill-all-local-variables) +\\{reftex-select-label-mode-map}" (when (featurep 'xemacs) ;; XEmacs needs the call to make-local-hook (make-local-hook 'pre-command-hook) (make-local-hook 'post-command-hook)) - (setq major-mode 'reftex-select-bib-mode - mode-name "BSelect") (set (make-local-variable 'reftex-select-marked) nil) ;; We do not set a local map - reftex-select-item does this. - (run-hooks 'reftex-select-bib-mode-hook)) + ) ;; (defun reftex-get-offset (buf here-am-I &optional typekey toc index file) ;; ;; Find the correct offset data, like insert-docstruct would, but faster. @@ -657,84 +735,4 @@ Useful for large TOC's." (princ help-string)) (reftex-enlarge-to-fit "*RefTeX Help*" t)) -;; Common bindings in reftex-select-label-map and reftex-select-bib-map -(let ((map (make-sparse-keymap))) - (substitute-key-definition - 'next-line 'reftex-select-next map global-map) - (substitute-key-definition - 'previous-line 'reftex-select-previous map global-map) - (substitute-key-definition - 'keyboard-quit 'reftex-select-keyboard-quit map global-map) - (substitute-key-definition - 'newline 'reftex-select-accept map global-map) - - (loop for x in - '((" " . reftex-select-callback) - ("n" . reftex-select-next) - ([(down)] . reftex-select-next) - ("p" . reftex-select-previous) - ([(up)] . reftex-select-previous) - ("f" . reftex-select-toggle-follow) - ("\C-m" . reftex-select-accept) - ([(return)] . reftex-select-accept) - ("q" . reftex-select-quit) - ("." . reftex-select-show-insertion-point) - ("?" . reftex-select-help)) - do (define-key map (car x) (cdr x))) - - ;; The mouse-2 binding - (if (featurep 'xemacs) - (define-key map [(button2)] 'reftex-select-mouse-accept) - (define-key map [(mouse-2)] 'reftex-select-mouse-accept) - (define-key map [follow-link] 'mouse-face)) - - - ;; Digit arguments - (loop for key across "0123456789" do - (define-key map (vector (list key)) 'digit-argument)) - (define-key map "-" 'negative-argument) - - ;; Make two maps - (setq reftex-select-label-map map) - (setq reftex-select-bib-map (copy-keymap map))) - -;; Specific bindings in reftex-select-label-map -(loop for key across "aAcgFlrRstx#%" do - (define-key reftex-select-label-map (vector (list key)) - (list 'lambda '() - "Press `?' during selection to find out about this key." - '(interactive) (list 'throw '(quote myexit) key)))) - -(loop for x in - '(("b" . reftex-select-jump-to-previous) - ("z" . reftex-select-jump) - ("v" . reftex-select-toggle-varioref) - ("V" . reftex-select-toggle-fancyref) - ("m" . reftex-select-mark) - ("u" . reftex-select-unmark) - ("," . reftex-select-mark-comma) - ("-" . reftex-select-mark-to) - ("+" . reftex-select-mark-and) - ([(tab)] . reftex-select-read-label) - ("\C-i" . reftex-select-read-label) - ("\C-c\C-n" . reftex-select-next-heading) - ("\C-c\C-p" . reftex-select-previous-heading)) - do - (define-key reftex-select-label-map (car x) (cdr x))) - -;; Specific bindings in reftex-select-bib-map -(loop for key across "grRaAeE" do - (define-key reftex-select-bib-map (vector (list key)) - (list 'lambda '() - "Press `?' during selection to find out about this key." - '(interactive) (list 'throw '(quote myexit) key)))) - -(loop for x in - '(("\C-i" . reftex-select-read-cite) - ([(tab)] . reftex-select-read-cite) - ("m" . reftex-select-mark) - ("u" . reftex-select-unmark)) - do (define-key reftex-select-bib-map (car x) (cdr x))) - - ;;; reftex-sel.el ends here diff --git a/lisp/textmodes/reftex-toc.el b/lisp/textmodes/reftex-toc.el index 20903706a0e..5d691f456f7 100644 --- a/lisp/textmodes/reftex-toc.el +++ b/lisp/textmodes/reftex-toc.el @@ -1,7 +1,6 @@ ;;; reftex-toc.el --- RefTeX's table of contents mode -;; Copyright (C) 1997, 1998, 1999, 2000, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-2000, 2003-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <dominik@science.uva.nl> ;; Maintainer: auctex-devel@gnu.org @@ -32,8 +31,98 @@ (require 'reftex) ;;; -(defvar reftex-toc-map (make-sparse-keymap) +(defvar reftex-toc-mode-map + (let ((map (make-sparse-keymap))) + + (define-key map (if (featurep 'xemacs) [(button2)] [(mouse-2)]) + 'reftex-toc-mouse-goto-line-and-hide) + (define-key map [follow-link] 'mouse-face) + + (substitute-key-definition + 'next-line 'reftex-toc-next map global-map) + (substitute-key-definition + 'previous-line 'reftex-toc-previous map global-map) + + (loop for x in + '(("n" . reftex-toc-next) + ("p" . reftex-toc-previous) + ("?" . reftex-toc-show-help) + (" " . reftex-toc-view-line) + ("\C-m" . reftex-toc-goto-line-and-hide) + ("\C-i" . reftex-toc-goto-line) + ("\C-c>" . reftex-toc-display-index) + ("r" . reftex-toc-rescan) + ("R" . reftex-toc-Rescan) + ("g" . revert-buffer) + ("q" . reftex-toc-quit) ; + ("k" . reftex-toc-quit-and-kill) + ("f" . reftex-toc-toggle-follow) ; + ("a" . reftex-toggle-auto-toc-recenter) + ("d" . reftex-toc-toggle-dedicated-frame) + ("F" . reftex-toc-toggle-file-boundary) + ("i" . reftex-toc-toggle-index) + ("l" . reftex-toc-toggle-labels) + ("t" . reftex-toc-max-level) + ("c" . reftex-toc-toggle-context) + ;; ("%" . reftex-toc-toggle-commented) + ("\M-%" . reftex-toc-rename-label) + ("x" . reftex-toc-external) + ("z" . reftex-toc-jump) + ("." . reftex-toc-show-calling-point) + ("\C-c\C-n" . reftex-toc-next-heading) + ("\C-c\C-p" . reftex-toc-previous-heading) + (">" . reftex-toc-demote) + ("<" . reftex-toc-promote)) + do (define-key map (car x) (cdr x))) + + (loop for key across "0123456789" do + (define-key map (vector (list key)) 'digit-argument)) + (define-key map "-" 'negative-argument) + + (easy-menu-define + reftex-toc-menu map + "Menu for Table of Contents buffer" + '("TOC" + ["Show Location" reftex-toc-view-line t] + ["Go To Location" reftex-toc-goto-line t] + ["Exit & Go To Location" reftex-toc-goto-line-and-hide t] + ["Show Calling Point" reftex-toc-show-calling-point t] + ["Quit" reftex-toc-quit t] + "--" + ("Edit" + ["Promote" reftex-toc-promote t] + ["Demote" reftex-toc-demote t] + ["Rename Label" reftex-toc-rename-label t]) + "--" + ["Index" reftex-toc-display-index t] + ["External Document TOC " reftex-toc-external t] + "--" + ("Update" + ["Rebuilt *toc* Buffer" revert-buffer t] + ["Rescan One File" reftex-toc-rescan reftex-enable-partial-scans] + ["Rescan Entire Document" reftex-toc-Rescan t]) + ("Options" + "TOC Items" + ["File Boundaries" reftex-toc-toggle-file-boundary :style toggle + :selected reftex-toc-include-file-boundaries] + ["Labels" reftex-toc-toggle-labels :style toggle + :selected reftex-toc-include-labels] + ["Index Entries" reftex-toc-toggle-index :style toggle + :selected reftex-toc-include-index-entries] + ["Context" reftex-toc-toggle-context :style toggle + :selected reftex-toc-include-context] + "--" + ["Follow Mode" reftex-toc-toggle-follow :style toggle + :selected reftex-toc-follow-mode] + ["Auto Recenter" reftex-toggle-auto-toc-recenter :style toggle + :selected reftex-toc-auto-recenter-timer] + ["Dedicated Frame" reftex-toc-toggle-dedicated-frame t]) + "--" + ["Help" reftex-toc-show-help t])) + + map) "Keymap used for *toc* buffer.") +(define-obsolete-variable-alias 'reftex-toc-map 'reftex-toc-mode-map "24.1") (defvar reftex-toc-menu) (defvar reftex-last-window-height nil) @@ -42,19 +131,14 @@ (defvar reftex-toc-include-index-indicator nil) (defvar reftex-toc-max-level-indicator nil) -(defun reftex-toc-mode () +(define-derived-mode reftex-toc-mode fundamental-mode "TOC" "Major mode for managing Table of Contents for LaTeX files. This buffer was created with RefTeX. Press `?' for a summary of important key bindings. Here are all local bindings. -\\{reftex-toc-map}" - (interactive) - (kill-all-local-variables) - (setq major-mode 'reftex-toc-mode - mode-name "TOC") - (use-local-map reftex-toc-map) +\\{reftex-toc-mode-map}" (set (make-local-variable 'transient-mark-mode) t) (when (featurep 'xemacs) (set (make-local-variable 'zmacs-regions) t)) @@ -79,8 +163,7 @@ Here are all local bindings. (make-local-variable 'reftex-last-follow-point) (add-hook 'post-command-hook 'reftex-toc-post-command-hook nil t) (add-hook 'pre-command-hook 'reftex-toc-pre-command-hook nil t) - (easy-menu-add reftex-toc-menu reftex-toc-map) - (run-hooks 'reftex-toc-mode-hook)) + (easy-menu-add reftex-toc-menu reftex-toc-mode-map)) (defvar reftex-last-toc-file nil "Stores the file name from which `reftex-toc' was called. For redo command.") @@ -1006,92 +1089,4 @@ always show the current section in connection with the option (progn (reftex-toggle-auto-toc-recenter)))) -;; Table of Contents map -(define-key reftex-toc-map (if (featurep 'xemacs) [(button2)] [(mouse-2)]) - 'reftex-toc-mouse-goto-line-and-hide) -(define-key reftex-toc-map [follow-link] 'mouse-face) - -(substitute-key-definition - 'next-line 'reftex-toc-next reftex-toc-map global-map) -(substitute-key-definition - 'previous-line 'reftex-toc-previous reftex-toc-map global-map) - -(loop for x in - '(("n" . reftex-toc-next) - ("p" . reftex-toc-previous) - ("?" . reftex-toc-show-help) - (" " . reftex-toc-view-line) - ("\C-m" . reftex-toc-goto-line-and-hide) - ("\C-i" . reftex-toc-goto-line) - ("\C-c>" . reftex-toc-display-index) - ("r" . reftex-toc-rescan) - ("R" . reftex-toc-Rescan) - ("g" . revert-buffer) - ("q" . reftex-toc-quit); - ("k" . reftex-toc-quit-and-kill) - ("f" . reftex-toc-toggle-follow); - ("a" . reftex-toggle-auto-toc-recenter) - ("d" . reftex-toc-toggle-dedicated-frame) - ("F" . reftex-toc-toggle-file-boundary) - ("i" . reftex-toc-toggle-index) - ("l" . reftex-toc-toggle-labels) - ("t" . reftex-toc-max-level) - ("c" . reftex-toc-toggle-context) -; ("%" . reftex-toc-toggle-commented) - ("\M-%" . reftex-toc-rename-label) - ("x" . reftex-toc-external) - ("z" . reftex-toc-jump) - ("." . reftex-toc-show-calling-point) - ("\C-c\C-n" . reftex-toc-next-heading) - ("\C-c\C-p" . reftex-toc-previous-heading) - (">" . reftex-toc-demote) - ("<" . reftex-toc-promote)) - do (define-key reftex-toc-map (car x) (cdr x))) - -(loop for key across "0123456789" do - (define-key reftex-toc-map (vector (list key)) 'digit-argument)) -(define-key reftex-toc-map "-" 'negative-argument) - -(easy-menu-define - reftex-toc-menu reftex-toc-map - "Menu for Table of Contents buffer" - '("TOC" - ["Show Location" reftex-toc-view-line t] - ["Go To Location" reftex-toc-goto-line t] - ["Exit & Go To Location" reftex-toc-goto-line-and-hide t] - ["Show Calling Point" reftex-toc-show-calling-point t] - ["Quit" reftex-toc-quit t] - "--" - ("Edit" - ["Promote" reftex-toc-promote t] - ["Demote" reftex-toc-demote t] - ["Rename Label" reftex-toc-rename-label t]) - "--" - ["Index" reftex-toc-display-index t] - ["External Document TOC " reftex-toc-external t] - "--" - ("Update" - ["Rebuilt *toc* Buffer" revert-buffer t] - ["Rescan One File" reftex-toc-rescan reftex-enable-partial-scans] - ["Rescan Entire Document" reftex-toc-Rescan t]) - ("Options" - "TOC Items" - ["File Boundaries" reftex-toc-toggle-file-boundary :style toggle - :selected reftex-toc-include-file-boundaries] - ["Labels" reftex-toc-toggle-labels :style toggle - :selected reftex-toc-include-labels] - ["Index Entries" reftex-toc-toggle-index :style toggle - :selected reftex-toc-include-index-entries] - ["Context" reftex-toc-toggle-context :style toggle - :selected reftex-toc-include-context] - "--" - ["Follow Mode" reftex-toc-toggle-follow :style toggle - :selected reftex-toc-follow-mode] - ["Auto Recenter" reftex-toggle-auto-toc-recenter :style toggle - :selected reftex-toc-auto-recenter-timer] - ["Dedicated Frame" reftex-toc-toggle-dedicated-frame t]) - "--" - ["Help" reftex-toc-show-help t])) - - ;;; reftex-toc.el ends here diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el index 5b83e7a43ad..1b503c78afd 100644 --- a/lisp/textmodes/reftex-vars.el +++ b/lisp/textmodes/reftex-vars.el @@ -1,7 +1,6 @@ ;;; reftex-vars.el --- configuration variables for RefTeX -;; Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-1999, 2001-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <dominik@science.uva.nl> ;; Maintainer: auctex-devel@gnu.org @@ -1917,5 +1916,4 @@ construct: \\bbb [xxx] {aaa}." (provide 'reftex-vars) -;; arch-tag: 9591ea34-ef39-4431-90b7-c115eaf5e16f ;;; reftex-vars.el ends here diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index 2a2e725e92e..6719a647c36 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el @@ -1,6 +1,5 @@ ;;; reftex.el --- minor mode for doing \label, \ref, \cite, \index in LaTeX -;; Copyright (C) 1997, 1998, 1999, 2000, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-2000, 2003-2011 Free Software Foundation, Inc. ;; Author: Carsten Dominik <dominik@science.uva.nl> ;; Maintainer: auctex-devel@gnu.org @@ -2582,5 +2581,4 @@ With optional NODE, go directly to that node." ;;;============================================================================ -;; arch-tag: 49e0da4e-bd5e-4cfc-a717-fb444fccb9e6 ;;; reftex.el ends here diff --git a/lisp/textmodes/remember.el b/lisp/textmodes/remember.el index ab2c27563b0..1923ab692d8 100644 --- a/lisp/textmodes/remember.el +++ b/lisp/textmodes/remember.el @@ -1,7 +1,6 @@ ;;; remember --- a mode for quickly jotting down things to remember -;; Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2001, 2003-2011 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> ;; Created: 29 Mar 1999 diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el index 5bf1a7c7894..b55146c2ff9 100644 --- a/lisp/textmodes/rst.el +++ b/lisp/textmodes/rst.el @@ -1,7 +1,6 @@ ;;; rst.el --- Mode for viewing and editing reStructuredText-documents. -;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2003-2011 Free Software Foundation, Inc. ;; Authors: Martin Blais <blais@furius.ca>, ;; Stefan Merten <smerten@oekonux.de>, @@ -3234,16 +3233,37 @@ document with \\[rst-compile]." :group 'rst :version "21.1") -(defvar rst-compile-toolsets - '((html . ("rst2html.py" ".html" nil)) - (latex . ("rst2latex.py" ".tex" nil)) - (newlatex . ("rst2newlatex.py" ".tex" nil)) - (pseudoxml . ("rst2pseudoxml.py" ".xml" nil)) - (xml . ("rst2xml.py" ".xml" nil))) +(defcustom rst-compile-toolsets + `((html ,(if (executable-find "rst2html.py") "rst2html.py" "rst2html") + ".html" nil) + (latex ,(if (executable-find "rst2latex.py") "rst2latex.py" "rst2latex") + ".tex" nil) + (newlatex ,(if (executable-find "rst2newlatex.py") "rst2newlatex.py" + "rst2newlatex") + ".tex" nil) + (pseudoxml ,(if (executable-find "rst2pseudoxml.py") "rst2pseudoxml.py" + "rst2pseudoxml") + ".xml" nil) + (xml ,(if (executable-find "rst2xml.py") "rst2xml.py" "rst2xml") + ".xml" nil) + (pdf ,(if (executable-find "rst2pdf.py") "rst2pdf.py" "rst2pdf") + ".pdf" nil) + (s5 ,(if (executable-find "rst2s5.py") "rst2s5.py" "rst2s5") + ".html" nil)) "Table describing the command to use for each toolset. An association list of the toolset to a list of the (command to use, extension of produced filename, options to the tool (nil or a -string)) to be used for converting the document.") +string)) to be used for converting the document." + :type '(alist :options (html latex newlatex pseudoxml xml pdf s5) + :key-type symbol + :value-type (list :tag "Specification" + (file :tag "Command") + (string :tag "File extension") + (choice :tag "Command options" + (const :tag "No options" nil) + (string :tag "Options")))) + :group 'rst + :version "24.1") ;; Note for Python programmers not familiar with association lists: you can set ;; values in an alists like this, e.g. : @@ -3331,7 +3351,7 @@ or of the entire buffer, if the region is not selected." (shell-command-on-region (if mark-active (region-beginning) (point-min)) (if mark-active (region-end) (point-max)) - "rst2pseudoxml.py" + (cadr (assq 'pseudoxml rst-compile-toolsets)) standard-output))) (defvar rst-pdf-program "xpdf" @@ -3340,8 +3360,9 @@ or of the entire buffer, if the region is not selected." (defun rst-compile-pdf-preview () "Convert the document to a PDF file and launch a preview program." (interactive) - (let* ((tmp-filename "/tmp/out.pdf") - (command (format "rst2pdf.py %s %s && %s %s" + (let* ((tmp-filename (make-temp-file "rst-out" nil ".pdf")) + (command (format "%s %s %s && %s %s" + (cadr (assq 'pdf rst-compile-toolsets)) buffer-file-name tmp-filename rst-pdf-program tmp-filename))) (start-process-shell-command "rst-pdf-preview" nil command) @@ -3355,8 +3376,9 @@ or of the entire buffer, if the region is not selected." (defun rst-compile-slides-preview () "Convert the document to an S5 slide presentation and launch a preview program." (interactive) - (let* ((tmp-filename "/tmp/slides.html") - (command (format "rst2s5.py %s %s && %s %s" + (let* ((tmp-filename (make-temp-file "rst-slides" nil ".html")) + (command (format "%s %s %s && %s %s" + (cadr (assq 's5 rst-compile-toolsets)) buffer-file-name tmp-filename rst-slides-program tmp-filename))) (start-process-shell-command "rst-slides-preview" nil command) @@ -3454,11 +3476,10 @@ column is used (fill-column vs. end of previous/next line)." "A portable function that returns non-nil if the mark is active." (cond ((fboundp 'region-active-p) (region-active-p)) - ((boundp 'transient-mark-mode) transient-mark-mode mark-active))) - + ((boundp 'transient-mark-mode) (and transient-mark-mode mark-active)) + (t mark-active))) (provide 'rst) -;; arch-tag: 255ac0a3-a689-44cb-8643-04ca55ae490d ;;; rst.el ends here diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index a525c1a7e2c..2229dc6c9e8 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el @@ -1,7 +1,7 @@ ;;; sgml-mode.el --- SGML- and HTML-editing modes -*- coding: utf-8 -*- -;; Copyright (C) 1992, 1995, 1996, 1998, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1992, 1995-1996, 1998, 2001-2011 +;; Free Software Foundation, Inc. ;; Author: James Clark <jjc@jclark.com> ;; Maintainer: FSF diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el index eb2d4849a32..2dc4e4a88b1 100644 --- a/lisp/textmodes/table.el +++ b/lisp/textmodes/table.el @@ -1,7 +1,6 @@ ;;; table.el --- create and edit WYSIWYG text based embedded tables -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; Keywords: wp, convenience ;; Author: Takaaki Ota <Takaaki.Ota@am.sony.com> diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 08f8257407e..428fc1db3a9 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -1,7 +1,6 @@ ;;; tex-mode.el --- TeX, LaTeX, and SliTeX mode commands -*- coding: utf-8 -*- -;; Copyright (C) 1985, 1986, 1989, 1992, 1994, 1995, 1996, 1997, 1998 -;; 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 1985-1986, 1989, 1992, 1994-1999, 2001-2011 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -791,20 +790,23 @@ Not smaller than the value set by `tex-suscript-height-minimum'." (defun tex-font-lock-verb (start delim) "Place syntax table properties on the \verb construct. START is the position of the \\ and DELIM is the delimiter char." - ;; Do nothing if the \verb construct is itself inside a comment or - ;; verbatim env. + ;; Do nothing if the \verb construct is itself inside a comment or + ;; verbatim env. (unless (nth 8 (save-excursion (syntax-ppss start))) - ;; Let's find the end and mark it. - ;; This may span more than a single line, but we don't bother - ;; placing a syntax-multiline property since such multiline verbs aren't - ;; valid anyway. - (skip-chars-forward (string ?^ delim)) - (unless (eobp) - (when (eq (char-syntax (preceding-char)) ?/) - (put-text-property (1- (point)) (point) - 'syntax-table (string-to-syntax "."))) - (put-text-property (point) (1+ (point)) - 'syntax-table (string-to-syntax "\""))))) + ;; Let's find the end and mark it. + (let ((afterdelim (point))) + (skip-chars-forward (string ?^ delim) (line-end-position)) + (if (eolp) + ;; "LaTeX Error: \verb ended by end of line." + ;; Remove the syntax-table property we've just put on the + ;; start-delimiter, so it doesn't spill over subsequent lines. + (put-text-property (1- afterdelim) afterdelim + 'syntax-table nil) + (when (eq (char-syntax (preceding-char)) ?/) + (put-text-property (1- (point)) (point) + 'syntax-table (string-to-syntax "."))) + (put-text-property (point) (1+ (point)) + 'syntax-table (string-to-syntax "\"")))))) ;; Use string syntax but math face for $...$. (defun tex-font-lock-syntactic-face-function (state) @@ -1810,11 +1812,70 @@ Mark is left at original location." ;; Why use a shell instead of running TeX directly? Because if TeX ;; gets stuck, the user can switch to the shell window and type at it. +(defvar tex-error-parse-syntax-table + (let ((st (make-syntax-table))) + (modify-syntax-entry ?\( "()" st) + (modify-syntax-entry ?\) ")(" st) + (modify-syntax-entry ?\\ "\\" st) + (modify-syntax-entry ?\{ "_" st) + (modify-syntax-entry ?\} "_" st) + (modify-syntax-entry ?\[ "_" st) + (modify-syntax-entry ?\] "_" st) + ;; Single quotations may appear in errors + (modify-syntax-entry ?\" "_" st) + st) + "Syntax-table used while parsing TeX error messages.") + +(defun tex-old-error-file-name () + ;; This is unreliable, partly because we don't try very hard, and + ;; partly because TeX's output format is eminently ambiguous and unfriendly + ;; to automation. + (save-excursion + (save-match-data + (with-syntax-table tex-error-parse-syntax-table + (beginning-of-line) + (backward-up-list 1) + (skip-syntax-forward "(_") + (while (not (let ((try-filename (thing-at-point 'filename))) + (and try-filename + (not (string= "" try-filename)) + (file-readable-p try-filename)))) + (skip-syntax-backward "(_") + (backward-up-list 1) + (skip-syntax-forward "(_")) + (thing-at-point 'filename))))) + +(defconst tex-error-regexp-alist + ;; First alternative handles the newer --file-line-error style: + ;; ./test2.tex:14: Too many }'s. + '(gnu + ;; Second handles the old-style, which spans two lines but doesn't include + ;; any file info: + ;; ! Too many }'s. + ;; l.396 toto} + ("^l\\.\\([1-9][0-9]*\\) \\(?:\\.\\.\\.\\)?\\(.*\\)$" + tex-old-error-file-name 1 nil nil nil + ;; Since there's no filename to highlight, let's highlight the message. + (2 compilation-error-face)) + ;; A few common warning messages. + ("^\\(?:Und\\|Ov\\)erfull \\\\[hv]box .* at lines? \\(\\([1-9][0-9]*\\)\\(?:--\\([1-9][0-9]*\\)\\)?\\)$" + tex-old-error-file-name (2 . 3) nil 1 nil + (1 compilation-warning-face)) + ("^(Font) *\\([^ \n].* on input line \\([1-9][0-9]*\\)\\)\\.$" + tex-old-error-file-name 2 nil 1 1 + (2 compilation-warning-face)) + ;; Included files get output as (<file> ...). + ;; FIXME: there tend to be a crapload of them at the beginning of the + ;; output which aren't that interesting. Maybe we should filter out + ;; all the file name that start with /usr/share? + ;; ("(\\.?/\\([^() \n]+\\)" 1 nil nil 0) + )) + ;; The utility functions: (define-derived-mode tex-shell shell-mode "TeX-Shell" - (set (make-local-variable 'compilation-parse-errors-function) - 'tex-compilation-parse-errors) + (set (make-local-variable 'compilation-error-regexp-alist) + tex-error-regexp-alist) (compilation-shell-minor-mode t)) ;;;###autoload @@ -2312,113 +2373,6 @@ Only applies the FSPEC to the args part of FORMAT." (tex-display-shell) (setq tex-last-buffer-texed (current-buffer))) -(defvar tex-error-parse-syntax-table - (let ((st (make-syntax-table))) - (modify-syntax-entry ?\( "()" st) - (modify-syntax-entry ?\) ")(" st) - (modify-syntax-entry ?\\ "\\" st) - (modify-syntax-entry ?\{ "_" st) - (modify-syntax-entry ?\} "_" st) - (modify-syntax-entry ?\[ "_" st) - (modify-syntax-entry ?\] "_" st) - ;; Single quotations may appear in errors - (modify-syntax-entry ?\" "_" st) - st) - "Syntax-table used while parsing TeX error messages.") - -(defun tex-compilation-parse-errors (limit-search find-at-least) - "Parse the current buffer as TeX error messages. -See the variable `compilation-parse-errors-function' for the interface it uses. - -This function parses only the last TeX compilation. -It works on TeX compilations only. It is necessary for that purpose, -since TeX does not put file names and line numbers on the same line as -for the error messages." - (require 'thingatpt) - (setq compilation-error-list nil) - (let ((default-directory ; Perhaps dir has changed meanwhile. - (file-name-directory (buffer-file-name tex-last-buffer-texed))) - found-desired (num-errors-found 0) - last-filename last-linenum last-position - begin-of-error end-of-error errfilename) - ;; Don't reparse messages already seen at last parse. - (goto-char compilation-parsing-end) - ;; Parse messages. - (while (and (not (or found-desired (eobp))) - ;; First alternative handles the newer --file-line-error style: - ;; ./test2.tex:14: Too many }'s. - ;; Second handles the old-style: - ;; ! Too many }'s. - (prog1 (re-search-forward - "^\\(?:\\([^:\n]+\\):[[:digit:]]+:\\|!\\) " nil 'move) - (setq begin-of-error (match-beginning 0) - end-of-error (match-end 0) - errfilename (match-string 1))) - (re-search-forward - "^l\\.\\([0-9]+\\) \\(\\.\\.\\.\\)?\\(.*\\)$" nil 'move)) - (let* ((this-error (copy-marker begin-of-error)) - (linenum (string-to-number (match-string 1))) - (error-text (regexp-quote (match-string 3))) - try-filename - (filename - ;; Prefer --file-liner-error filename if we have it. - (or errfilename - (save-excursion - (with-syntax-table tex-error-parse-syntax-table - (backward-up-list 1) - (skip-syntax-forward "(_") - (while (not - (and (setq try-filename (thing-at-point - 'filename)) - (not (string= "" try-filename)) - (file-readable-p try-filename))) - (skip-syntax-backward "(_") - (backward-up-list 1) - (skip-syntax-forward "(_")) - (thing-at-point 'filename))))) - (new-file - (or (null last-filename) - (not (string-equal last-filename filename)))) - (error-location - (with-current-buffer - (if (equal filename (concat tex-zap-file ".tex")) - tex-last-buffer-texed - (find-file-noselect filename)) - (save-excursion - (if new-file - (progn - (goto-char (point-min)) - (forward-line (1- linenum)) - (setq last-position nil)) - (goto-char last-position) - (forward-line (- linenum last-linenum))) - ;; first try a forward search for the error text, - ;; then a backward search limited by the last error. - (let ((starting-point (point))) - (or (re-search-forward error-text nil t) - (re-search-backward error-text last-position t) - (goto-char starting-point))) - (point-marker))))) - (goto-char this-error) - (if (and compilation-error-list - (or (and find-at-least - (>= num-errors-found - find-at-least)) - (and limit-search - (>= end-of-error limit-search))) - new-file) - (setq found-desired t) - (setq num-errors-found (1+ num-errors-found) - last-filename filename - last-linenum linenum - last-position error-location - compilation-error-list ; Add the new error - (cons (cons this-error error-location) - compilation-error-list)) - (goto-char end-of-error))))) - (set-marker compilation-parsing-end (point)) - (setq compilation-error-list (nreverse compilation-error-list))) - ;;; The commands: (defun tex-region (beg end) @@ -2915,5 +2869,4 @@ There might be text before point." (provide 'tex-mode) -;; arch-tag: c0a680b1-63aa-4547-84b9-4193c29c0080 ;;; tex-mode.el ends here diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el index 7c331c7809d..d33cbb97dd8 100644 --- a/lisp/textmodes/texinfmt.el +++ b/lisp/textmodes/texinfmt.el @@ -1,8 +1,7 @@ ;;; texinfmt.el --- format Texinfo files into Info files -;; Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, -;; 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985-1986, 1988, 1990-1998, 2000-2011 +;; Free Software Foundation, Inc. ;; Maintainer: Robert J. Chassell <bug-texinfo@gnu.org> ;; Keywords: maint, tex, docs diff --git a/lisp/textmodes/texinfo.el b/lisp/textmodes/texinfo.el index ea691ee8ee4..dfd12a005a9 100644 --- a/lisp/textmodes/texinfo.el +++ b/lisp/textmodes/texinfo.el @@ -1,7 +1,6 @@ ;;; texinfo.el --- major mode for editing Texinfo files -*- coding: utf-8 -*- -;; Copyright (C) 1985, 1988, 1989, 1990, 1991, 1992, 1993, 1996, 1997, -;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 1985, 1988-1993, 1996-1997, 2000-2011 ;; Free Software Foundation, Inc. ;; Author: Robert J. Chassell @@ -1024,5 +1023,4 @@ You are prompted for the job number (use a number shown by a previous (provide 'texinfo) -;; arch-tag: 005d7c38-43b9-4b7d-aa1d-aea69bae73e1 ;;; texinfo.el ends here diff --git a/lisp/textmodes/texnfo-upd.el b/lisp/textmodes/texnfo-upd.el index ff021532c50..12a3e2a620b 100644 --- a/lisp/textmodes/texnfo-upd.el +++ b/lisp/textmodes/texnfo-upd.el @@ -1,7 +1,6 @@ ;;; texnfo-upd.el --- utilities for updating nodes and menus in Texinfo files -;; Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1989-1992, 2001-2011 Free Software Foundation, Inc. ;; Author: Robert J. Chassell ;; Maintainer: bug-texinfo@gnu.org diff --git a/lisp/textmodes/text-mode.el b/lisp/textmodes/text-mode.el index b6868d3a8e8..3f6ad1faf87 100644 --- a/lisp/textmodes/text-mode.el +++ b/lisp/textmodes/text-mode.el @@ -1,7 +1,6 @@ ;;; text-mode.el --- text mode, and its idiosyncratic commands -;; Copyright (C) 1985, 1992, 1994, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1992, 1994, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: wp @@ -182,5 +181,4 @@ The argument NLINES says how many lines to center." (setq nlines (1+ nlines)) (forward-line -1))))) -;; arch-tag: a07ccaad-da13-4d7b-9c61-cd04f5926aab ;;; text-mode.el ends here diff --git a/lisp/textmodes/tildify.el b/lisp/textmodes/tildify.el index c7238936b40..b5af00cc450 100644 --- a/lisp/textmodes/tildify.el +++ b/lisp/textmodes/tildify.el @@ -1,7 +1,6 @@ ;;; tildify.el --- adding hard spaces into texts -;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-2011 Free Software Foundation, Inc. ;; Author: Milan Zamazal <pdm@zamazal.org> ;; Version: 4.5 @@ -353,5 +352,4 @@ further questions)." ;; coding: iso-latin-2 ;; End: -;; arch-tag: fc9b05a6-7355-4639-8170-dcf57853ba22 ;;; tildify.el ends here diff --git a/lisp/textmodes/two-column.el b/lisp/textmodes/two-column.el index c19be4bd66b..68b858162df 100644 --- a/lisp/textmodes/two-column.el +++ b/lisp/textmodes/two-column.el @@ -1,7 +1,6 @@ ;;; two-column.el --- minor mode for editing of two-column text -;; Copyright (C) 1992, 1993, 1994, 1995, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1992-1995, 2001-2011 Free Software Foundation, Inc. ;; Author: Daniel Pfeiffer <occitan@esperanto.org> ;; Adapted-By: ESR, Daniel Pfeiffer @@ -632,5 +631,4 @@ on, this also realigns the two buffers." (provide 'two-column) -;; arch-tag: 2021b5ab-d3a4-4a8c-a21c-1936b0f9e6b1 ;;; two-column.el ends here diff --git a/lisp/textmodes/underline.el b/lisp/textmodes/underline.el index 13a661af430..2adac5a106a 100644 --- a/lisp/textmodes/underline.el +++ b/lisp/textmodes/underline.el @@ -1,7 +1,6 @@ ;;; underline.el --- insert/remove underlining (done by overstriking) in Emacs -;; Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: wp @@ -61,5 +60,4 @@ which specify the range to operate on." (provide 'underline) -;; arch-tag: e7b48582-c3ea-4386-987a-87415f3c372a ;;; underline.el ends here diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el index 62686e22185..020faa197cd 100644 --- a/lisp/thingatpt.el +++ b/lisp/thingatpt.el @@ -1,8 +1,6 @@ ;;; thingatpt.el --- get the `thing' at point -;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, -;; 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1991-1998, 2000-2011 Free Software Foundation, Inc. ;; Author: Mike Williams <mikew@gopher.dosli.govt.nz> ;; Maintainer: FSF @@ -472,5 +470,4 @@ Signal an error if the entire string was not used." "Return the Lisp list at point, or nil if none is found." (form-at-point 'list 'listp)) -;; arch-tag: bb65a163-dae2-4055-aedc-fe11f497f698 ;;; thingatpt.el ends here diff --git a/lisp/thumbs.el b/lisp/thumbs.el index f9f97b12c53..b251ca60246 100644 --- a/lisp/thumbs.el +++ b/lisp/thumbs.el @@ -1,6 +1,6 @@ ;;; thumbs.el --- Thumbnails previewer for images files -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Jean-Philippe Theberge <jphiltheberge@videotron.ca> ;; Maintainer: FSF @@ -816,5 +816,4 @@ ACTION and ARG should be a valid convert command." (provide 'thumbs) -;; arch-tag: f9ac1ef8-83fc-42c0-8069-1fae43fd2e5c ;;; thumbs.el ends here diff --git a/lisp/time-stamp.el b/lisp/time-stamp.el index 3a5309ab218..9a9fc8b4a83 100644 --- a/lisp/time-stamp.el +++ b/lisp/time-stamp.el @@ -1,7 +1,7 @@ ;;; time-stamp.el --- Maintain last change time stamps in files edited by Emacs -;; Copyright (C) 1989, 1993, 1994, 1995, 1997, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1989, 1993-1995, 1997, 2000-2011 +;; Free Software Foundation, Inc. ;; This file is part of GNU Emacs. @@ -706,5 +706,4 @@ around literals." (provide 'time-stamp) -;; arch-tag: 8a12c5c3-25d6-4a71-adc5-24b0e025a1e7 ;;; time-stamp.el ends here diff --git a/lisp/time.el b/lisp/time.el index 006fd758a7c..1bc1cca1112 100644 --- a/lisp/time.el +++ b/lisp/time.el @@ -1,7 +1,7 @@ ;;; time.el --- display time, load and mail indicator in mode line of Emacs -*-coding: utf-8 -*- -;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1996, 2000, 2001, 2002, -;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985-1987, 1993-1994, 1996, 2000-2011 +;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -463,7 +463,9 @@ update which can wait for the next redisplay." "Toggle display of time, load level, and mail flag in mode lines. With a numeric arg, enable this display if arg is positive. -When this display is enabled, it updates automatically every minute. +When this display is enabled, it updates automatically every minute +\(you can control the number of seconds between updates by +customizing `display-time-interval'). If `display-time-day-and-date' is non-nil, the current day and date are displayed as well. This runs the normal hook `display-time-hook' after each update." @@ -574,5 +576,4 @@ For example, the Unix uptime command format is \"%D, %z%2h:%.2m\"." (provide 'time) -;; arch-tag: b9c1623f-b5cb-48e4-b650-482a4d23c5a6 ;;; time.el ends here diff --git a/lisp/timezone.el b/lisp/timezone.el index 2fbcbd58b84..092d491a495 100644 --- a/lisp/timezone.el +++ b/lisp/timezone.el @@ -1,7 +1,7 @@ ;;; timezone.el --- time zone package for GNU Emacs -;; Copyright (C) 1990, 1991, 1992, 1993, 1996, 1999, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1990-1993, 1996, 1999, 2001-2011 +;; Free Software Foundation, Inc. ;; Author: Masanobu Umeda ;; Maintainer: umerin@mse.kyutech.ac.jp @@ -403,5 +403,4 @@ The Gregorian date Sunday, December 31, 1 BC is imaginary." (provide 'timezone) -;; arch-tag: e23d5bc6-f32d-48ba-8996-323e9d654b3f ;;; timezone.el ends here diff --git a/lisp/tmm.el b/lisp/tmm.el index 0cbc72673a4..52704e70a55 100644 --- a/lisp/tmm.el +++ b/lisp/tmm.el @@ -1,7 +1,6 @@ ;;; tmm.el --- text mode access to menu-bar -;; Copyright (C) 1994, 1995, 1996, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994-1996, 2000-2011 Free Software Foundation, Inc. ;; Author: Ilya Zakharevich <ilya@math.mps.ohio-state.edu> ;; Maintainer: FSF @@ -168,14 +167,13 @@ Its value should be an event that has a binding in MENU." ;; It has no other elements. ;; The order of elements in tmm-km-list is the order of the menu bar. (mapc (lambda (elt) - (if (stringp elt) - (setq gl-str elt) - (cond - ((listp elt) (tmm-get-keymap elt not-menu)) - ((vectorp elt) - (dotimes (i (length elt)) - (tmm-get-keymap (cons i (aref elt i)) not-menu)))))) - menu) + (cond + ((stringp elt) (setq gl-str elt)) + ((listp elt) (tmm-get-keymap elt not-menu)) + ((vectorp elt) + (dotimes (i (length elt)) + (tmm-get-keymap (cons i (aref elt i)) not-menu))))) + menu) ;; Choose an element of tmm-km-list; put it in choice. (if (and not-menu (= 1 (length tmm-km-list))) ;; If this is the top-level of an x-popup-menu menu, @@ -368,32 +366,31 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'." (add-hook 'minibuffer-exit-hook 'tmm-delete-map nil t) (unless tmm-c-prompt (error "No active menu entries")) - (let ((win (selected-window))) - (setq tmm-old-mb-map (tmm-define-keys t)) - ;; Get window and hide it for electric mode to get correct size - (save-window-excursion - (let ((completions - (mapcar 'car minibuffer-completion-table))) - (or tmm-completion-prompt - (add-hook 'completion-setup-hook - 'tmm-completion-delete-prompt 'append)) - (unwind-protect - (with-output-to-temp-buffer "*Completions*" - (display-completion-list completions)) - (remove-hook 'completion-setup-hook 'tmm-completion-delete-prompt))) - (set-buffer "*Completions*") - (tmm-remove-inactive-mouse-face) - (when tmm-completion-prompt - (let ((buffer-read-only nil)) - (goto-char (point-min)) - (insert tmm-completion-prompt)))) - (save-selected-window - (other-window 1) ; Electric-pop-up-window does + (setq tmm-old-mb-map (tmm-define-keys t)) + ;; Get window and hide it for electric mode to get correct size + (save-window-excursion + (let ((completions + (mapcar 'car minibuffer-completion-table))) + (or tmm-completion-prompt + (add-hook 'completion-setup-hook + 'tmm-completion-delete-prompt 'append)) + (unwind-protect + (with-output-to-temp-buffer "*Completions*" + (display-completion-list completions)) + (remove-hook 'completion-setup-hook 'tmm-completion-delete-prompt))) + (set-buffer "*Completions*") + (tmm-remove-inactive-mouse-face) + (when tmm-completion-prompt + (let ((buffer-read-only nil)) + (goto-char (point-min)) + (insert tmm-completion-prompt)))) + (save-selected-window + (other-window 1) ; Electric-pop-up-window does ; not work in minibuffer - (Electric-pop-up-window "*Completions*") - (with-current-buffer "*Completions*" - (setq tmm-old-comp-map (tmm-define-keys nil)))) - (insert tmm-c-prompt))) + (Electric-pop-up-window "*Completions*") + (with-current-buffer "*Completions*" + (setq tmm-old-comp-map (tmm-define-keys nil)))) + (insert tmm-c-prompt)) (defun tmm-delete-map () (remove-hook 'minibuffer-exit-hook 'tmm-delete-map t) @@ -497,7 +494,7 @@ It uses the free variable `tmm-table-undef' to keep undefined keys." (if (or in-x-menu (stringp (car-safe elt))) (setq str event event nil km elt) (setq str event event nil km (cons 'keymap elt))))) - (unless (eq km 'ignore) + (unless (or (eq km 'ignore) (null str)) (let ((binding (where-is-internal km nil t))) (when binding (setq binding (key-description binding)) @@ -568,5 +565,4 @@ of `menu-bar-final-items'." (provide 'tmm) -;; arch-tag: e7ddbdb6-4b95-4da3-afbe-ad6063d112f4 ;;; tmm.el ends here diff --git a/lisp/tool-bar.el b/lisp/tool-bar.el index a3292c42046..578de1def97 100644 --- a/lisp/tool-bar.el +++ b/lisp/tool-bar.el @@ -1,7 +1,6 @@ ;;; tool-bar.el --- setting up the tool bar -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; Author: Dave Love <fx@gnu.org> ;; Keywords: mouse frames @@ -139,6 +138,26 @@ Use this function only to make bindings in the global value of `tool-bar-map'. To define items in any other map, use `tool-bar-local-item'." (apply 'tool-bar-local-item icon def key tool-bar-map props)) +(defun tool-bar--image-expression (icon) + "Return an expression that evaluates to an image spec for ICON." + (let* ((fg (face-attribute 'tool-bar :foreground)) + (bg (face-attribute 'tool-bar :background)) + (colors (nconc (if (eq fg 'unspecified) nil (list :foreground fg)) + (if (eq bg 'unspecified) nil (list :background bg)))) + (xpm-spec (list :type 'xpm :file (concat icon ".xpm"))) + (xpm-lo-spec (list :type 'xpm :file + (concat "low-color/" icon ".xpm"))) + (pbm-spec (append (list :type 'pbm :file + (concat icon ".pbm")) colors)) + (xbm-spec (append (list :type 'xbm :file + (concat icon ".xbm")) colors))) + `(find-image (cond ((not (display-color-p)) + ',(list pbm-spec xbm-spec xpm-lo-spec xpm-spec)) + ((< (display-color-cells) 256) + ',(list xpm-lo-spec xpm-spec pbm-spec xbm-spec)) + (t + ',(list xpm-spec pbm-spec xbm-spec)))))) + ;;;###autoload (defun tool-bar-local-item (icon def key map &rest props) "Add an item to the tool bar in map MAP. @@ -151,24 +170,7 @@ ICON is the base name of a file containing the image to use. The function will first try to use low-color/ICON.xpm if `display-color-cells' is less or equal to 256, then ICON.xpm, then ICON.pbm, and finally ICON.xbm, using `find-image'." - (let* ((fg (face-attribute 'tool-bar :foreground)) - (bg (face-attribute 'tool-bar :background)) - (colors (nconc (if (eq fg 'unspecified) nil (list :foreground fg)) - (if (eq bg 'unspecified) nil (list :background bg)))) - (xpm-spec (list :type 'xpm :file (concat icon ".xpm"))) - (xpm-lo-spec (list :type 'xpm :file - (concat "low-color/" icon ".xpm"))) - (pbm-spec (append (list :type 'pbm :file - (concat icon ".pbm")) colors)) - (xbm-spec (append (list :type 'xbm :file - (concat icon ".xbm")) colors)) - (image-exp `(find-image - (cond ((not (display-color-p)) - ',(list pbm-spec xbm-spec xpm-lo-spec xpm-spec)) - ((< (display-color-cells) 256) - ',(list xpm-lo-spec xpm-spec pbm-spec xbm-spec)) - (t - ',(list xpm-spec pbm-spec xbm-spec)))))) + (let* ((image-exp (tool-bar--image-expression icon))) (define-key-after map (vector key) `(menu-item ,(symbol-name key) ,def :image ,image-exp ,@props)))) @@ -203,24 +205,7 @@ holds a keymap." (setq from-map global-map)) (let* ((menu-bar-map (lookup-key from-map [menu-bar])) (keys (where-is-internal command menu-bar-map)) - (fg (face-attribute 'tool-bar :foreground)) - (bg (face-attribute 'tool-bar :background)) - (colors (nconc (if (eq fg 'unspecified) nil (list :foreground fg)) - (if (eq bg 'unspecified) nil (list :background bg)))) - (xpm-spec (list :type 'xpm :file (concat icon ".xpm"))) - (xpm-lo-spec (list :type 'xpm :file - (concat "low-color/" icon ".xpm"))) - (pbm-spec (append (list :type 'pbm :file - (concat icon ".pbm")) colors)) - (xbm-spec (append (list :type 'xbm :file - (concat icon ".xbm")) colors)) - (image-exp `(find-image - (cond ((not (display-color-p)) - ',(list pbm-spec xbm-spec xpm-lo-spec xpm-spec)) - ((< (display-color-cells) 256) - ',(list xpm-lo-spec xpm-spec pbm-spec xbm-spec)) - (t - ',(list xpm-spec pbm-spec xbm-spec))))) + (image-exp (tool-bar--image-expression icon)) submap key) ;; We'll pick up the last valid entry in the list of keys if ;; there's more than one. @@ -257,52 +242,42 @@ holds a keymap." ;;; Set up some global items. Additions/deletions up for grabs. (defun tool-bar-setup () - ;; People say it's bad to have EXIT on the tool bar, since users - ;; might inadvertently click that button. - ;;(tool-bar-add-item-from-menu 'save-buffers-kill-emacs "exit") + (setq tool-bar-separator-image-expression + (tool-bar--image-expression "separator")) (tool-bar-add-item-from-menu 'find-file "new" nil :label "New File" :vert-only t) (tool-bar-add-item-from-menu 'menu-find-file-existing "open" nil - :vert-only t) + :label "Open" :vert-only t) (tool-bar-add-item-from-menu 'dired "diropen" nil :vert-only t) (tool-bar-add-item-from-menu 'kill-this-buffer "close" nil :vert-only t) - (tool-bar-add-item-from-menu 'save-buffer "save" nil :vert-only t - :visible '(or buffer-file-name - (not (eq 'special - (get major-mode - 'mode-class))))) - (tool-bar-add-item-from-menu 'undo "undo" nil :vert-only t - :visible '(not (eq 'special (get major-mode - 'mode-class)))) + (tool-bar-add-item-from-menu 'save-buffer "save" nil + :label "Save") + (define-key-after (default-value 'tool-bar-map) [separator-1] menu-bar-separator) + (tool-bar-add-item-from-menu 'undo "undo" nil) + (define-key-after (default-value 'tool-bar-map) [separator-2] menu-bar-separator) (tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [cut]) - "cut" nil :vert-only t - :visible '(not (eq 'special (get major-mode - 'mode-class)))) + "cut" nil :vert-only t) (tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [copy]) "copy" nil :vert-only t) (tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [paste]) - "paste" nil :vert-only t - :visible '(not (eq 'special (get major-mode - 'mode-class)))) - (tool-bar-add-item-from-menu 'nonincremental-search-forward "search" - nil :label "Search") + "paste" nil :vert-only t) + (define-key-after (default-value 'tool-bar-map) [separator-3] menu-bar-separator) + (tool-bar-add-item-from-menu 'isearch-forward "search" + nil :label "Search" :vert-only t) ;;(tool-bar-add-item-from-menu 'ispell-buffer "spell") ;; There's no icon appropriate for News and we need a command rather ;; than a lambda for Read Mail. ;;(tool-bar-add-item-from-menu 'compose-mail "mail/compose") - - ;; tool-bar-add-item-from-menu itself operates on - ;; (default-value 'tool-bar-map), but when we don't use that function, - ;; we must explicitly operate on the default value. - - (let ((tool-bar-map (default-value 'tool-bar-map))) - (tool-bar-add-item "help" (lambda () - (interactive) - (popup-menu menu-bar-help-menu)) - 'help - :help "Pop up the Help menu"))) + ;; Help button on a tool bar is rather non-standard... + ;; (let ((tool-bar-map (default-value 'tool-bar-map))) + ;; (tool-bar-add-item "help" (lambda () + ;; (interactive) + ;; (popup-menu menu-bar-help-menu)) + ;; 'help + ;; :help "Pop up the Help menu")) +) (if (featurep 'move-toolbar) (defcustom tool-bar-position 'top diff --git a/lisp/tooltip.el b/lisp/tooltip.el index 5987b00f92e..f135d98d716 100644 --- a/lisp/tooltip.el +++ b/lisp/tooltip.el @@ -1,7 +1,6 @@ ;;; tooltip.el --- show tooltip windows -;; Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997, 1999-2011 Free Software Foundation, Inc. ;; Author: Gerd Moellmann <gerd@acm.org> ;; Keywords: help c mouse tools @@ -385,5 +384,4 @@ Value is non-nil if this function handled the tip." (provide 'tooltip) -;; arch-tag: 3d61135e-4618-4a78-af28-183f6df5636f ;;; tooltip.el ends here diff --git a/lisp/tree-widget.el b/lisp/tree-widget.el index d07c8b268d3..77159573c9d 100644 --- a/lisp/tree-widget.el +++ b/lisp/tree-widget.el @@ -1,6 +1,6 @@ ;;; tree-widget.el --- Tree widget -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: David Ponce <david@dponce.com> ;; Maintainer: David Ponce <david@dponce.com> @@ -818,5 +818,4 @@ That is, if TREE :args is nil." (provide 'tree-widget) -;; arch-tag: c3a1ada2-1663-41dc-9d16-2479ed8320e8 ;;; tree-widget.el ends here diff --git a/lisp/tutorial.el b/lisp/tutorial.el index 6961fafb3aa..77ef50843d3 100644 --- a/lisp/tutorial.el +++ b/lisp/tutorial.el @@ -1,6 +1,6 @@ ;;; tutorial.el --- tutorial for Emacs -;; Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2006-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: help, internal @@ -963,5 +963,4 @@ Currently this feature is only used in `help-with-tutorial'." (provide 'tutorial) -;; arch-tag: c8e80aef-c3bb-4ffb-8af6-22171bf0c100 ;;; tutorial.el ends here diff --git a/lisp/type-break.el b/lisp/type-break.el index 83278cbc6cc..e6782fa23f8 100644 --- a/lisp/type-break.el +++ b/lisp/type-break.el @@ -1,7 +1,6 @@ ;;; type-break.el --- encourage rests from typing at appropriate intervals -;; Copyright (C) 1994, 1995, 1997, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994-1995, 1997, 2000-2011 Free Software Foundation, Inc. ;; Author: Noah Friedman ;; Maintainer: Noah Friedman <friedman@splode.com> diff --git a/lisp/uniquify.el b/lisp/uniquify.el index a654b2dcfc5..e894127cdb1 100644 --- a/lisp/uniquify.el +++ b/lisp/uniquify.el @@ -1,7 +1,6 @@ ;;; uniquify.el --- unique buffer names dependent on file name -;; Copyright (C) 1989, 1995, 1996, 1997, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1989, 1995-1997, 2001-2011 Free Software Foundation, Inc. ;; Author: Dick King <king@reasoning.com> ;; Maintainer: FSF @@ -508,5 +507,4 @@ For use on `kill-buffer-hook'." (provide 'uniquify) -;; arch-tag: e763faa3-56c9-4903-8eb8-26e1c45a0065 ;;; uniquify.el ends here diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 44cc511c99c..a557f8d0e38 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,20 @@ +2010-12-16 Miles Bader <Miles Bader <miles@gnu.org>> + + * url-cookie.el: Require 'cl when compiling -- it's necessary for + defstruct. + +2010-12-14 Glenn Morris <rgm@gnu.org> + + * url-cookie.el: Don't require cl when compiling. + (url-cookie-clean-up, url-cookie-generate-header-lines): Use dolist. + (url-cookie-parse-file, url-cookie-store, url-cookie-retrieve) + (url-cookie-handle-set-cookie): Simplify. + +2010-12-13 Chong Yidong <cyd@stupidchicken.com> + + * url-cookie.el (url-cookie-retrieve): Handle null LOCALPART. + Suggested by Lennart Borgman (Bug#7543). + 2010-11-16 Lars Magne Ingebrigtsen <larsi@gnus.org> * url-file.el (url-file-build-filename): Avoid interpreting @@ -14,8 +31,8 @@ 2010-10-04 Lars Magne Ingebrigtsen <larsi@gnus.org> - * url-http.el (url-http-wait-for-headers-change-function): Protect - against url-http-response-status for degenerate documents. + * url-http.el (url-http-wait-for-headers-change-function): + Protect against url-http-response-status for degenerate documents. (url-http-wait-for-headers-change-function): Revert previous change. It lead to really slow loads. @@ -31,7 +48,7 @@ 2010-10-03 Lars Magne Ingebrigtsen <larsi@gnus.org> - * url-vars.el (url-mime-charset-string): Changed the default to + * url-vars.el (url-mime-charset-string): Change the default to nil to avoid sending 1171 bytes of not very useful data to the HTTP server every request. @@ -119,8 +136,8 @@ 2010-07-01 Mark A. Hershberger <mah@everybody.org> * url-http.el (url-http-create-request): Add a CRLF on the end so - that POSTs with content to https urls work. See - <https://bugs.launchpad.net/mediawiki-el/+bug/540759> + that POSTs with content to https urls work. + See <https://bugs.launchpad.net/mediawiki-el/+bug/540759> 2010-06-22 Mark A. Hershberger <mah@everybody.org> @@ -602,8 +619,8 @@ * url-http.el (url-http-proxy): New variable. (url-http-create-request): Use it. Don't use `url-proxy-object'. (url-http): Treat `url' argument as resource to download, and - dynamic variable `url-using-proxy' as proxy to use. Set - `url-current-object' to actual URL, and `url-http-proxy' to proxy + dynamic variable `url-using-proxy' as proxy to use. + Set `url-current-object' to actual URL, and `url-http-proxy' to proxy used. (url-http-handle-cookies): Assume that `url-current-object' does not point to the proxy used. @@ -619,24 +636,24 @@ (url-proxy): Bind it instead of `proxy-object'. * url-http.el (url-http-create-request): Remove url argument, use - the buffer-local variable `url-http-target-url' instead. Both - callers updated. Simplify proxy handling. + the buffer-local variable `url-http-target-url' instead. + Both callers updated. Simplify proxy handling. (url-http): Don't make proxy-object buffer local. * url.el (url-retrieve-internal): Bind url-proxy-object to nil. 2006-11-26 Magnus Henoch <mange@freemail.hu> - * url-http.el (url-http-wait-for-headers-change-function): Use - `when' instead of `if' when possible. + * url-http.el (url-http-wait-for-headers-change-function): + Use `when' instead of `if' when possible. (url-http): Define url-http-response-version. (url-http-parse-response): Set it. (url-http-parse-headers): Use it to determine keep-alive behavior. 2006-11-23 Diane Murray <disumu@x3y2z1.net> (tiny change) - * url-http.el (url-http-content-length-after-change-function): Use - `url-lazy-message'. + * url-http.el (url-http-content-length-after-change-function): + Use `url-lazy-message'. * url-util.el (url-display-percentage): Only show a message if `url-show-status' is non-nil. @@ -1018,8 +1035,8 @@ (url-cookie-generate-header-lines): Likewise. (url-cookie-handle-set-cookie): Likewise. (url-cookie-create): Expect :localpart instead of :path. - (url-cookie-localpart): Renamed from url-cookie-path. - (url-cookie-set-localpart): Renamed from url-cookie-set-path. + (url-cookie-localpart): Rename from url-cookie-path. + (url-cookie-set-localpart): Rename from url-cookie-set-path. (url-cookie-file): Doc fix. (url-cookie-p): Add doc string. @@ -2236,7 +2253,7 @@ message when we have to contact a host so the user always gets at least some feedback. - * lisp/url-expand.el (url-expander-remove-relative-links): Moved and + * lisp/url-expand.el (url-expander-remove-relative-links): Move and renamed function. (url-default-expander): Use it. @@ -2358,11 +2375,9 @@ ;; Local variables: ;; coding: utf-8 -;; add-log-time-zone-rule: t ;; End: - Copyright (C) 1999, 2001, 2002, 2004, 2005, - 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 1999, 2001-2002, 2004-2011 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -2379,4 +2394,3 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. -;; arch-tag: ac117078-3091-4533-be93-098162ac2926 diff --git a/lisp/url/url-about.el b/lisp/url/url-about.el index 4dc7d294d17..b6f54db038e 100644 --- a/lisp/url/url-about.el +++ b/lisp/url/url-about.el @@ -1,7 +1,6 @@ ;;; url-about.el --- Show internal URLs -;; Copyright (C) 2001, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2001, 2004-2011 Free Software Foundation, Inc. ;; Keywords: comm, data, processes, hypermedia @@ -99,5 +98,4 @@ (provide 'url-about) -;; arch-tag: 65dd7fca-db3f-4cb1-8026-7dd37d4a460e ;;; url-about.el ends here diff --git a/lisp/url/url-auth.el b/lisp/url/url-auth.el index d8f51a99436..842e2a3be8d 100644 --- a/lisp/url/url-auth.el +++ b/lisp/url/url-auth.el @@ -1,7 +1,6 @@ ;;; url-auth.el --- Uniform Resource Locator authorization modules -;; Copyright (C) 1996, 1997, 1998, 1999, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-1999, 2004-2011 Free Software Foundation, Inc. ;; Keywords: comm, data, processes, hypermedia @@ -345,5 +344,4 @@ RATING a rating between 1 and 10 of the strength of the authentication. (provide 'url-auth) -;; arch-tag: 04058625-616d-44e4-9dbf-4b46b00b2a91 ;;; url-auth.el ends here diff --git a/lisp/url/url-cache.el b/lisp/url/url-cache.el index 4ef8ab5d902..1615920e64c 100644 --- a/lisp/url/url-cache.el +++ b/lisp/url/url-cache.el @@ -1,7 +1,6 @@ ;;; url-cache.el --- Uniform Resource Locator retrieval tool -;; Copyright (C) 1996, 1997, 1998, 1999, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-1999, 2004-2011 Free Software Foundation, Inc. ;; Keywords: comm, data, processes, hypermedia @@ -211,5 +210,4 @@ If `url-standalone-mode' is non-nil, cached items never expire." (provide 'url-cache) -;; arch-tag: 95b050a6-8e81-4f23-8e63-191b9d1d657c ;;; url-cache.el ends here diff --git a/lisp/url/url-cid.el b/lisp/url/url-cid.el index 09a2bce4401..a5371a423e0 100644 --- a/lisp/url/url-cid.el +++ b/lisp/url/url-cid.el @@ -1,7 +1,6 @@ ;;; url-cid.el --- Content-ID URL loader -;; Copyright (C) 1998, 1999, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1998-1999, 2004-2011 Free Software Foundation, Inc. ;; Keywords: comm, data, processes @@ -59,5 +58,4 @@ (t (message "Unable to handle CID URL: %s" url)))) -;; arch-tag: 23d9ab74-fad4-4dba-b1e7-292871e8bda5 ;;; url-cid.el ends here diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el index e056db38a98..c55063dfba9 100644 --- a/lisp/url/url-cookie.el +++ b/lisp/url/url-cookie.el @@ -1,7 +1,6 @@ -;;; url-cookie.el --- Netscape Cookie support +;;; url-cookie.el --- URL cookie support -;; Copyright (C) 1996, 1997, 1998, 1999, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-1999, 2004-2011 Free Software Foundation, Inc. ;; Keywords: comm, data, processes, hypermedia @@ -26,10 +25,8 @@ (require 'url-util) (require 'url-parse) -(eval-when-compile (require 'cl)) -;; See http://home.netscape.com/newsref/std/cookie_spec.html for the -;; 'open standard' defining this crap. +(eval-when-compile (require 'cl)) ; defstruct (defgroup url-cookie nil "URL cookies." @@ -76,41 +73,23 @@ telling Microsoft that." "Whether the cookies list has changed since the last save operation.") (defun url-cookie-parse-file (&optional fname) - (setq fname (or fname url-cookie-file)) - (condition-case () - (load fname nil t) - (error - ;; It's completely normal for the cookies file not to exist yet. - ;; (message "Could not load cookie file %s" fname) - ))) + "Load FNAME, default `url-cookie-file'." + ;; It's completely normal for the cookies file not to exist yet. + (load (or fname url-cookie-file) t t)) (declare-function url-cookie-p "url-cookie" t t) ; defstruct (defun url-cookie-clean-up (&optional secure) - (let* ( - (var (if secure 'url-cookie-secure-storage 'url-cookie-storage)) - (val (symbol-value var)) - (cur nil) - (new nil) - (cookies nil) - (cur-cookie nil) - (new-cookies nil) - ) - (while val - (setq cur (car val) - val (cdr val) - new-cookies nil - cookies (cdr cur)) - (while cookies - (setq cur-cookie (car cookies) - cookies (cdr cookies)) - (if (or (not (url-cookie-p cur-cookie)) - (url-cookie-expired-p cur-cookie) - (null (url-cookie-expires cur-cookie))) - nil - (setq new-cookies (cons cur-cookie new-cookies)))) - (if (not new-cookies) - nil + (let ((var (if secure 'url-cookie-secure-storage 'url-cookie-storage)) + new new-cookies) + (dolist (cur (symbol-value var)) + (setq new-cookies nil) + (dolist (cur-cookie (cdr cur)) + (or (not (url-cookie-p cur-cookie)) + (url-cookie-expired-p cur-cookie) + (null (url-cookie-expires cur-cookie)) + (setq new-cookies (cons cur-cookie new-cookies)))) + (when new-cookies (setcdr cur new-cookies) (setq new (cons cur new)))) (set var new))) @@ -143,54 +122,42 @@ telling Microsoft that." (setq url-cookies-changed-since-last-save nil)))) (defun url-cookie-store (name value &optional expires domain localpart secure) - "Store a netscape-style cookie." - (let* ((storage (if secure url-cookie-secure-storage url-cookie-storage)) - (tmp storage) - (cur nil) - (found-domain nil)) - - ;; First, look for a matching domain - (setq found-domain (assoc domain storage)) - - (if found-domain + "Store a cookie." + (let ((storage (if secure url-cookie-secure-storage url-cookie-storage)) + tmp found-domain) + ;; First, look for a matching domain. + (if (setq found-domain (assoc domain storage)) ;; Need to either stick the new cookie in existing domain storage ;; or possibly replace an existing cookie if the names match. - (progn - (setq storage (cdr found-domain) - tmp nil) - (while storage - (setq cur (car storage) - storage (cdr storage)) - (if (and (equal localpart (url-cookie-localpart cur)) - (equal name (url-cookie-name cur))) - (progn - (setf (url-cookie-expires cur) expires) - (setf (url-cookie-value cur) value) - (setq tmp t)))) - (if (not tmp) - ;; New cookie - (setcdr found-domain (cons - (url-cookie-create :name name - :value value - :expires expires - :domain domain - :localpart localpart - :secure secure) - (cdr found-domain))))) - ;; Need to add a new top-level domain + (unless (dolist (cur (setq storage (cdr found-domain)) tmp) + (and (equal localpart (url-cookie-localpart cur)) + (equal name (url-cookie-name cur)) + (progn + (setf (url-cookie-expires cur) expires) + (setf (url-cookie-value cur) value) + (setq tmp t)))) + ;; New cookie. + (setcdr found-domain (cons + (url-cookie-create :name name + :value value + :expires expires + :domain domain + :localpart localpart + :secure secure) + (cdr found-domain)))) + ;; Need to add a new top-level domain. (setq tmp (url-cookie-create :name name :value value :expires expires :domain domain :localpart localpart :secure secure)) - (cond - (storage - (setcdr storage (cons (list domain tmp) (cdr storage)))) - (secure - (setq url-cookie-secure-storage (list (list domain tmp)))) - (t - (setq url-cookie-storage (list (list domain tmp)))))))) + (cond (storage + (setcdr storage (cons (list domain tmp) (cdr storage)))) + (secure + (setq url-cookie-secure-storage (list (list domain tmp)))) + (t + (setq url-cookie-storage (list (list domain tmp)))))))) (defun url-cookie-expired-p (cookie) "Return non-nil if COOKIE is expired." @@ -198,19 +165,14 @@ telling Microsoft that." (and exp (> (float-time) (float-time (date-to-time exp)))))) (defun url-cookie-retrieve (host &optional localpart secure) - "Retrieve all the netscape-style cookies for a specified HOST and LOCALPART." + "Retrieve all cookies for a specified HOST and LOCALPART." (let ((storage (if secure (append url-cookie-secure-storage url-cookie-storage) url-cookie-storage)) (case-fold-search t) - (cookies nil) - (cur nil) - (retval nil) - (localpart-match nil)) - (while storage - (setq cur (car storage) - storage (cdr storage) - cookies (cdr cur)) + cookies retval localpart-match) + (dolist (cur storage) + (setq cookies (cdr cur)) (if (and (car cur) (string-match (concat "^.*" @@ -222,35 +184,28 @@ telling Microsoft that." (car cur))) "$") host)) ;; The domains match - a possible hit! - (while cookies - (setq cur (car cookies) - cookies (cdr cookies) - localpart-match (url-cookie-localpart cur)) - (if (and (if (stringp localpart-match) - (string-match (concat "^" (regexp-quote - localpart-match)) - localpart) - (equal localpart localpart-match)) - (not (url-cookie-expired-p cur))) - (setq retval (cons cur retval)))))) + (dolist (cur cookies) + (and (if (and (stringp + (setq localpart-match (url-cookie-localpart cur))) + (stringp localpart)) + (string-match (concat "^" (regexp-quote localpart-match)) + localpart) + (equal localpart localpart-match)) + (not (url-cookie-expired-p cur)) + (setq retval (cons cur retval)))))) retval)) (defun url-cookie-generate-header-lines (host localpart secure) - (let* ((cookies (url-cookie-retrieve host localpart secure)) - (retval nil) - (cur nil) - (chunk nil)) - ;; Have to sort this for sending most specific cookies first + (let ((cookies (url-cookie-retrieve host localpart secure)) + retval chunk) + ;; Have to sort this for sending most specific cookies first. (setq cookies (and cookies (sort cookies - (function - (lambda (x y) - (> (length (url-cookie-localpart x)) - (length (url-cookie-localpart y)))))))) - (while cookies - (setq cur (car cookies) - cookies (cdr cookies) - chunk (format "%s=%s" (url-cookie-name cur) (url-cookie-value cur)) + (lambda (x y) + (> (length (url-cookie-localpart x)) + (length (url-cookie-localpart y))))))) + (dolist (cur cookies) + (setq chunk (format "%s=%s" (url-cookie-name cur) (url-cookie-value cur)) retval (if (and url-cookie-multiple-line (< 80 (+ (length retval) (length chunk) 4))) (concat retval "\r\nCookie: " chunk) @@ -320,40 +275,38 @@ telling Microsoft that." (file-name-directory (url-filename url-current-object)))) (rest nil)) - (while args - (if (not (member (downcase (car (car args))) - '("secure" "domain" "expires" "path"))) - (setq rest (cons (car args) rest))) - (setq args (cdr args))) + (dolist (this args) + (or (member (downcase (car this)) '("secure" "domain" "expires" "path")) + (setq rest (cons this rest)))) ;; Sometimes we get dates that the timezone package cannot handle very ;; gracefully - take care of this here, instead of in url-cookie-expired-p ;; to speed things up. - (if (and expires - (string-match - (concat "^[^,]+, +\\(..\\)-\\(...\\)-\\(..\\) +" - "\\(..:..:..\\) +\\[*\\([^\]]+\\)\\]*$") - expires)) - (setq expires (concat (match-string 1 expires) " " - (match-string 2 expires) " " - (match-string 3 expires) " " - (match-string 4 expires) " [" - (match-string 5 expires) "]"))) + (and expires + (string-match + (concat "^[^,]+, +\\(..\\)-\\(...\\)-\\(..\\) +" + "\\(..:..:..\\) +\\[*\\([^\]]+\\)\\]*$") + expires) + (setq expires (concat (match-string 1 expires) " " + (match-string 2 expires) " " + (match-string 3 expires) " " + (match-string 4 expires) " [" + (match-string 5 expires) "]"))) ;; This one is for older Emacs/XEmacs variants that don't ;; understand this format without tenths of a second in it. ;; Wednesday, 30-Dec-2037 16:00:00 GMT ;; - vs - ;; Wednesday, 30-Dec-2037 16:00:00.00 GMT - (if (and expires - (string-match - "\\([0-9]+\\)-\\([A-Za-z]+\\)-\\([0-9]+\\)[ \t]+\\([0-9]+:[0-9]+:[0-9]+\\)\\(\\.[0-9]+\\)*[ \t]+\\([-+a-zA-Z0-9]+\\)" - expires)) - (setq expires (concat (match-string 1 expires) "-" ; day - (match-string 2 expires) "-" ; month - (match-string 3 expires) " " ; year - (match-string 4 expires) ".00 " ; hour:minutes:seconds - (match-string 6 expires)))) ":" ; timezone + (and expires + (string-match + "\\([0-9]+\\)-\\([A-Za-z]+\\)-\\([0-9]+\\)[ \t]+\\([0-9]+:[0-9]+:[0-9]+\\)\\(\\.[0-9]+\\)*[ \t]+\\([-+a-zA-Z0-9]+\\)" + expires) + (setq expires (concat (match-string 1 expires) "-" ; day + (match-string 2 expires) "-" ; month + (match-string 3 expires) " " ; year + (match-string 4 expires) ".00 " ; hour:minutes:seconds + (match-string 6 expires)))) ":" ; timezone (while (consp trusted) (if (string-match (car trusted) current-url) @@ -363,42 +316,36 @@ telling Microsoft that." (if (string-match (car untrusted) current-url) (setq untrusted (- (match-end 0) (match-beginning 0))) (pop untrusted))) - (if (and trusted untrusted) - ;; Choose the more specific match - (if (> trusted untrusted) - (setq untrusted nil) - (setq trusted nil))) + (and trusted untrusted + ;; Choose the more specific match. + (set (if (> trusted untrusted) 'untrusted 'trusted) nil)) (cond (untrusted - ;; The site was explicity marked as untrusted by the user + ;; The site was explicity marked as untrusted by the user. nil) ((or (eq url-privacy-level 'paranoid) (and (listp url-privacy-level) (memq 'cookies url-privacy-level))) - ;; user never wants cookies + ;; User never wants cookies. nil) ((and url-cookie-confirmation (not trusted) (save-window-excursion (with-output-to-temp-buffer "*Cookie Warning*" (mapcar - (function - (lambda (x) - (princ (format "%s - %s" (car x) (cdr x))))) rest)) + (lambda (x) + (princ (format "%s - %s" (car x) (cdr x)))) rest)) (prog1 (not (funcall url-confirmation-func (format "Allow %s to set these cookies? " (url-host url-current-object)))) (if (get-buffer "*Cookie Warning*") (kill-buffer "*Cookie Warning*"))))) - ;; user wants to be asked, and declined. + ;; User wants to be asked, and declined. nil) ((url-cookie-host-can-set-p (url-host url-current-object) domain) - ;; Cookie is accepted by the user, and passes our security checks - (let ((cur nil)) - (while rest - (setq cur (pop rest)) - (url-cookie-store (car cur) (cdr cur) - expires domain localpart secure)))) + ;; Cookie is accepted by the user, and passes our security checks. + (dolist (cur rest) + (url-cookie-store (car cur) (cdr cur) expires domain localpart secure))) (t (url-lazy-message "%s tried to set a cookie for domain %s - rejected." (url-host url-current-object) domain))))) @@ -429,5 +376,4 @@ to run the `url-cookie-setup-save-timer' function manually." (provide 'url-cookie) -;; arch-tag: 2568751b-6452-4398-aa2d-303edadb54d7 ;;; url-cookie.el ends here diff --git a/lisp/url/url-dav.el b/lisp/url/url-dav.el index 0a8f7b8821d..3d1f6afcb0e 100644 --- a/lisp/url/url-dav.el +++ b/lisp/url/url-dav.el @@ -1,7 +1,6 @@ ;;; url-dav.el --- WebDAV support -;; Copyright (C) 2001, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2001, 2004-2011 Free Software Foundation, Inc. ;; Author: Bill Perry <wmperry@gnu.org> ;; Maintainer: Bill Perry <wmperry@gnu.org> @@ -963,5 +962,4 @@ Returns nil if URL contains no name starting with FILE." (provide 'url-dav) -;; arch-tag: 2b14b7b3-888a-49b8-a490-17276a40e78e ;;; url-dav.el ends here diff --git a/lisp/url/url-dired.el b/lisp/url/url-dired.el index 143c5721b34..bb29fecb655 100644 --- a/lisp/url/url-dired.el +++ b/lisp/url/url-dired.el @@ -1,7 +1,6 @@ ;;; url-dired.el --- URL Dired minor mode -;; Copyright (C) 1996, 1997, 1998, 1999, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-1999, 2004-2011 Free Software Foundation, Inc. ;; Keywords: comm, files @@ -55,5 +54,4 @@ (provide 'url-dired) -;; arch-tag: 2694f21a-43e1-4391-b3cb-cf6e5349f15f ;;; url-dired.el ends here diff --git a/lisp/url/url-expand.el b/lisp/url/url-expand.el index f59dadcadc6..1781c362959 100644 --- a/lisp/url/url-expand.el +++ b/lisp/url/url-expand.el @@ -1,7 +1,6 @@ ;;; url-expand.el --- expand-file-name for URLs -;; Copyright (C) 1999, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1999, 2004-2011 Free Software Foundation, Inc. ;; Keywords: comm, data, processes @@ -144,5 +143,4 @@ path components followed by `..' are removed, along with the `..' itself." (provide 'url-expand) -;; arch-tag: 7b5f744b-b721-49da-be47-484631680a5a ;;; url-expand.el ends here diff --git a/lisp/url/url-file.el b/lisp/url/url-file.el index 22d74b3371b..28fb59cd112 100644 --- a/lisp/url/url-file.el +++ b/lisp/url/url-file.el @@ -1,7 +1,6 @@ ;;; url-file.el --- File retrieval code -;; Copyright (C) 1996, 1997, 1998, 1999, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-1999, 2004-2011 Free Software Foundation, Inc. ;; Keywords: comm, data, processes @@ -241,5 +240,4 @@ to them." (provide 'url-file) -;; arch-tag: 010e914a-7313-494b-8a8c-6495a862157d ;;; url-file.el ends here diff --git a/lisp/url/url-ftp.el b/lisp/url/url-ftp.el index 0d7fcdac466..670094d80ca 100644 --- a/lisp/url/url-ftp.el +++ b/lisp/url/url-ftp.el @@ -1,7 +1,6 @@ ;;; url-ftp.el --- FTP wrapper -;; Copyright (C) 1996, 1997, 1998, 1999, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-1999, 2004-2011 Free Software Foundation, Inc. ;; Keywords: comm, data, processes @@ -41,5 +40,4 @@ (provide 'url-ftp) -;; arch-tag: 9c3e70c4-350f-4d4a-bb51-a1e9b459e7dc ;;; url-ftp.el ends here diff --git a/lisp/url/url-gw.el b/lisp/url/url-gw.el index 4358255bde5..2ba23583528 100644 --- a/lisp/url/url-gw.el +++ b/lisp/url/url-gw.el @@ -1,7 +1,6 @@ ;;; url-gw.el --- Gateway munging for URL loading -;; Copyright (C) 1997, 1998, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1997-1998, 2004-2011 Free Software Foundation, Inc. ;; Author: Bill Perry <wmperry@gnu.org> ;; Keywords: comm, data, processes @@ -276,5 +275,4 @@ Might do a non-blocking connection; use `process-status' to check." (provide 'url-gw) -;; arch-tag: 1c4c0317-6d03-45b8-b3f3-838bd8f9d838 ;;; url-gw.el ends here diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el index a53d24c2de2..fef0ef15e95 100644 --- a/lisp/url/url-handlers.el +++ b/lisp/url/url-handlers.el @@ -1,7 +1,6 @@ ;;; url-handlers.el --- file-name-handler stuff for URL loading -;; Copyright (C) 1996, 1997, 1998, 1999, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-1999, 2004-2011 Free Software Foundation, Inc. ;; Keywords: comm, data, processes, hypermedia @@ -325,5 +324,4 @@ They count bytes from the beginning of the body." (provide 'url-handlers) -;; arch-tag: 7300b99c-cc83-42ff-9147-79b2723c62ac ;;; url-handlers.el ends here diff --git a/lisp/url/url-history.el b/lisp/url/url-history.el index 0cc891b32b7..3827f9a5d41 100644 --- a/lisp/url/url-history.el +++ b/lisp/url/url-history.el @@ -1,7 +1,6 @@ ;;; url-history.el --- Global history tracking for URL package -;; Copyright (C) 1996, 1997, 1998, 1999, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-1999, 2004-2011 Free Software Foundation, Inc. ;; Keywords: comm, data, processes, hypermedia @@ -184,5 +183,4 @@ user for what type to save as." (provide 'url-history) -;; arch-tag: fbbbaf63-db36-4e88-bc9f-2939aa93afb2 ;;; url-history.el ends here diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 9bfb6df1d42..7b82f114703 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -1,7 +1,6 @@ ;;; url-http.el --- HTTP retrieval routines -;; Copyright (C) 1999, 2001, 2004, 2005, 2006, 2007, 2008, 2009, -;; 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2001, 2004-2011 Free Software Foundation, Inc. ;; Author: Bill Perry <wmperry@gnu.org> ;; Keywords: comm, data, processes @@ -1453,5 +1452,4 @@ p3p (provide 'url-http) -;; arch-tag: ba7c59ae-c0f4-4a31-9617-d85f221732ee ;;; url-http.el ends here diff --git a/lisp/url/url-imap.el b/lisp/url/url-imap.el index 8a36025af64..3f7d1ec9238 100644 --- a/lisp/url/url-imap.el +++ b/lisp/url/url-imap.el @@ -1,6 +1,6 @@ ;;; url-imap.el --- IMAP retrieval routines -;; Copyright (C) 1999, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2004-2011 Free Software Foundation, Inc. ;; Author: Simon Josefsson <jas@pdc.kth.se> ;; Keywords: comm, data, processes @@ -76,5 +76,4 @@ ))) (current-buffer))) -;; arch-tag: 034991ff-5425-48ea-b911-c96c90e6f47d ;;; url-imap.el ends here diff --git a/lisp/url/url-irc.el b/lisp/url/url-irc.el index 715eecd211c..d5f2a99a914 100644 --- a/lisp/url/url-irc.el +++ b/lisp/url/url-irc.el @@ -1,7 +1,6 @@ ;;; url-irc.el --- IRC URL interface -;; Copyright (C) 1996, 1997, 1998, 1999, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-1999, 2004-2011 Free Software Foundation, Inc. ;; Keywords: comm, data, processes @@ -91,5 +90,4 @@ PASSWORD - What password to use" (provide 'url-irc) -;; arch-tag: 2e5eecf8-9eb3-436b-9fbd-c26f2fb2bf3e ;;; url-irc.el ends here diff --git a/lisp/url/url-ldap.el b/lisp/url/url-ldap.el index d782594e2e6..bb937a44423 100644 --- a/lisp/url/url-ldap.el +++ b/lisp/url/url-ldap.el @@ -1,6 +1,6 @@ ;;; url-ldap.el --- LDAP Uniform Resource Locator retrieval code -;; Copyright (C) 1998, 1999, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-1999, 2004-2011 Free Software Foundation, Inc. ;; Keywords: comm, data, processes @@ -237,5 +237,4 @@ URL can be a URL string, or a URL vector of the type returned by (provide 'url-ldap) -;; arch-tag: 6230e21c-41ae-4174-bd83-82c835676fc8 ;;; url-ldap.el ends here diff --git a/lisp/url/url-mailto.el b/lisp/url/url-mailto.el index 3628205e26e..c0472a92bb1 100644 --- a/lisp/url/url-mailto.el +++ b/lisp/url/url-mailto.el @@ -1,7 +1,6 @@ ;;; url-mail.el --- Mail Uniform Resource Locator retrieval code -;; Copyright (C) 1996, 1997, 1998, 1999, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-1999, 2004-2011 Free Software Foundation, Inc. ;; Keywords: comm, data, processes @@ -142,5 +141,4 @@ (provide 'url-mailto) -;; arch-tag: 7b7ad52e-8760-497b-9444-75fae14e34c5 ;;; url-mailto.el ends here diff --git a/lisp/url/url-methods.el b/lisp/url/url-methods.el index f7b9f98ad16..3b86ed45565 100644 --- a/lisp/url/url-methods.el +++ b/lisp/url/url-methods.el @@ -1,7 +1,6 @@ ;;; url-methods.el --- Load URL schemes as needed -;; Copyright (C) 1996, 1997, 1998, 1999, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-1999, 2004-2011 Free Software Foundation, Inc. ;; Keywords: comm, data, processes, hypermedia @@ -154,5 +153,4 @@ it has not already been loaded." (provide 'url-methods) -;; arch-tag: 336863f8-5a07-4906-9be5-b3c6bcebbe67 ;;; url-methods.el ends here diff --git a/lisp/url/url-misc.el b/lisp/url/url-misc.el index 1a65f1ee5d0..20e623de6cd 100644 --- a/lisp/url/url-misc.el +++ b/lisp/url/url-misc.el @@ -1,7 +1,6 @@ ;;; url-misc.el --- Misc Uniform Resource Locator retrieval code -;; Copyright (C) 1996, 1997, 1998, 1999, 2002, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-1999, 2002, 2004-2011 Free Software Foundation, Inc. ;; Keywords: comm, data, processes @@ -115,5 +114,4 @@ (provide 'url-misc) -;; arch-tag: 8c544e1b-d8bc-40a6-b319-f1f37fef65a0 ;;; url-misc.el ends here diff --git a/lisp/url/url-news.el b/lisp/url/url-news.el index dcbc6d671f3..6cd3721e498 100644 --- a/lisp/url/url-news.el +++ b/lisp/url/url-news.el @@ -1,7 +1,6 @@ ;;; url-news.el --- News Uniform Resource Locator retrieval code -;; Copyright (C) 1996, 1997, 1998, 1999, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-1999, 2004-2011 Free Software Foundation, Inc. ;; Keywords: comm, data, processes @@ -130,5 +129,4 @@ (provide 'url-news) -;; arch-tag: 8975be13-04e8-4d38-bfff-47918e3ad311 ;;; url-news.el ends here diff --git a/lisp/url/url-nfs.el b/lisp/url/url-nfs.el index c0183d7ea5f..1cda75c59e7 100644 --- a/lisp/url/url-nfs.el +++ b/lisp/url/url-nfs.el @@ -1,7 +1,6 @@ ;;; url-nfs.el --- NFS URL interface -;; Copyright (C) 1996, 1997, 1998, 1999, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-1999, 2004-2011 Free Software Foundation, Inc. ;; Keywords: comm, data, processes @@ -89,5 +88,4 @@ Each can be used any number of times.") (provide 'url-nfs) -;; arch-tag: cdf9c9ba-b7d2-4c29-8b48-7ae9bbc0d437 ;;; url-nfs.el ends here diff --git a/lisp/url/url-ns.el b/lisp/url/url-ns.el index f55dfdca198..2eaa662be55 100644 --- a/lisp/url/url-ns.el +++ b/lisp/url/url-ns.el @@ -1,7 +1,6 @@ ;;; url-ns.el --- Various netscape-ish functions for proxy definitions -;; Copyright (C) 1997, 1998, 1999, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-1999, 2004-2011 Free Software Foundation, Inc. ;; Keywords: comm, data, processes, hypermedia @@ -102,5 +101,4 @@ (provide 'url-ns) -;; arch-tag: 69520992-cf97-40b4-9ad1-c866d3cae5bf ;;; url-ns.el ends here diff --git a/lisp/url/url-parse.el b/lisp/url/url-parse.el index 7cfaf2a6b55..950f666e9c7 100644 --- a/lisp/url/url-parse.el +++ b/lisp/url/url-parse.el @@ -1,7 +1,6 @@ ;;; url-parse.el --- Uniform Resource Locator parser -;; Copyright (C) 1996, 1997, 1998, 1999, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-1999, 2004-2011 Free Software Foundation, Inc. ;; Keywords: comm, data, processes @@ -196,5 +195,4 @@ TYPE USER PASSWORD HOST PORTSPEC FILENAME TARGET ATTRIBUTES FULLNESS." (provide 'url-parse) -;; arch-tag: f338325f-71ab-4bee-93cc-78fb9a03d403 ;;; url-parse.el ends here diff --git a/lisp/url/url-privacy.el b/lisp/url/url-privacy.el index 432d4045e3b..ff89b125c6d 100644 --- a/lisp/url/url-privacy.el +++ b/lisp/url/url-privacy.el @@ -1,7 +1,6 @@ ;;; url-privacy.el --- Global history tracking for URL package -;; Copyright (C) 1996, 1997, 1998, 1999, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-1999, 2004-2011 Free Software Foundation, Inc. ;; Keywords: comm, data, processes, hypermedia @@ -75,5 +74,4 @@ (provide 'url-privacy) -;; arch-tag: fdaf95e4-98f0-4680-94c3-f3eadafabe1d ;;; url-privacy.el ends here diff --git a/lisp/url/url-proxy.el b/lisp/url/url-proxy.el index 4067f5a55ce..3290f7c5141 100644 --- a/lisp/url/url-proxy.el +++ b/lisp/url/url-proxy.el @@ -1,6 +1,6 @@ ;;; url-proxy.el --- Proxy server support -;; Copyright (C) 1999, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2004-2011 Free Software Foundation, Inc. ;; Keywords: comm, data, processes, hypermedia @@ -76,5 +76,4 @@ (provide 'url-proxy) -;; arch-tag: 4ff8882e-e498-42b7-abc5-acb449cdbc62 ;;; url-proxy.el ends here diff --git a/lisp/url/url-util.el b/lisp/url/url-util.el index 62a9a75f2db..6bf3a5831ec 100644 --- a/lisp/url/url-util.el +++ b/lisp/url/url-util.el @@ -1,7 +1,6 @@ ;;; url-util.el --- Miscellaneous helper routines for URL library -;; Copyright (C) 1996, 1997, 1998, 1999, 2001, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-1999, 2001, 2004-2011 Free Software Foundation, Inc. ;; Author: Bill Perry <wmperry@gnu.org> ;; Keywords: comm, data, processes @@ -532,5 +531,4 @@ Creates FILE and its parent directories if they do not exist." (provide 'url-util) -;; arch-tag: 24352abc-5a5a-412e-90cd-313b26bed5c9 ;;; url-util.el ends here diff --git a/lisp/url/url-vars.el b/lisp/url/url-vars.el index 8aba3efdbb6..42d33553e14 100644 --- a/lisp/url/url-vars.el +++ b/lisp/url/url-vars.el @@ -1,7 +1,6 @@ ;;; url-vars.el --- Variables for Uniform Resource Locator tool -;; Copyright (C) 1996, 1997, 1998, 1999, 2001, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-1999, 2001, 2004-2011 Free Software Foundation, Inc. ;; Keywords: comm, data, processes, hypermedia @@ -390,5 +389,4 @@ This should be set, e.g. by mail user agents rendering HTML to avoid (provide 'url-vars) -;; arch-tag: 29205e5f-c5ce-433c-8d5d-38cbaed64b49 ;;; url-vars.el ends here diff --git a/lisp/url/url.el b/lisp/url/url.el index 9d44718625b..7136b6023ce 100644 --- a/lisp/url/url.el +++ b/lisp/url/url.el @@ -1,7 +1,6 @@ ;;; url.el --- Uniform Resource Locator retrieval tool -;; Copyright (C) 1996, 1997, 1998, 1999, 2001, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-1999, 2001, 2004-2011 Free Software Foundation, Inc. ;; Author: Bill Perry <wmperry@gnu.org> ;; Keywords: comm, data, processes, hypermedia @@ -326,5 +325,4 @@ no further processing). URL is either a string or a parsed URL." (provide 'url) -;; arch-tag: bc182f1f-d187-4f10-b961-47af2066579a ;;; url.el ends here diff --git a/lisp/userlock.el b/lisp/userlock.el index 7ca2fff2c50..7a2f7f76b78 100644 --- a/lisp/userlock.el +++ b/lisp/userlock.el @@ -1,7 +1,6 @@ ;;; userlock.el --- handle file access contention between multiple users -;; Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985-1986, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: internal @@ -157,5 +156,4 @@ to get the latest version of the file, then make the change again.") (with-current-buffer standard-output (help-mode)))) -;; arch-tag: a61c5b60-e1c8-44fd-894a-c617f4dfc639 ;;; userlock.el ends here diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el index c356dde8226..d75fcb5f4f1 100644 --- a/lisp/vc/add-log.el +++ b/lisp/vc/add-log.el @@ -1,7 +1,6 @@ ;;; add-log.el --- change log maintenance commands for Emacs -;; Copyright (C) 1985, 1986, 1988, 1993, 1994, 1997, 1998, 2000, 2001, -;; 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 1985-1986, 1988, 1993-1994, 1997-1998, 2000-2011 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -1367,5 +1366,4 @@ old-style time formats for entries are supported." (provide 'add-log) -;; arch-tag: 81eee6fc-088f-4372-a37f-80ad9620e762 ;;; add-log.el ends here diff --git a/lisp/vc/compare-w.el b/lisp/vc/compare-w.el index 6e2ab7327de..4c63e48a3fc 100644 --- a/lisp/vc/compare-w.el +++ b/lisp/vc/compare-w.el @@ -1,7 +1,7 @@ ;;; compare-w.el --- compare text between windows for Emacs -;; Copyright (C) 1986, 1989, 1993, 1997, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1986, 1989, 1993, 1997, 2001-2011 +;; Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: convenience files vc @@ -389,5 +389,4 @@ on third call it again advances points to the next difference and so on." (provide 'compare-w) -;; arch-tag: 4177aab1-48e6-4a98-b7a1-000ee285de46 ;;; compare-w.el ends here diff --git a/lisp/vc/cvs-status.el b/lisp/vc/cvs-status.el index b0e66c055ac..7354e616c99 100644 --- a/lisp/vc/cvs-status.el +++ b/lisp/vc/cvs-status.el @@ -1,7 +1,6 @@ ;;; cvs-status.el --- major mode for browsing `cvs status' output -*- coding: utf-8 -*- -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> ;; Keywords: pcl-cvs cvs status tree vc tools @@ -223,7 +222,6 @@ The tree will be printed no closer than column COLUMN." (let* ((eol (save-excursion (end-of-line) (current-column))) (column (max (+ eol 2) column))) (if (null tags) column - ;;(move-to-column-force column) (let* ((rev (cvs-car tags)) (name (funcall printer (cvs-car rev))) (rest (append (cvs-cdr name) (cvs-cdr tags))) @@ -536,5 +534,4 @@ Optional prefix ARG chooses between two representations." (provide 'cvs-status) -;; arch-tag: db8b5094-d02a-473e-a476-544e89ff5ad0 ;;; cvs-status.el ends here diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index cec4fb24616..a1c9f9d02db 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -1,7 +1,6 @@ ;;; diff-mode.el --- a mode for viewing/editing context diffs -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> ;; Keywords: convenience patch diff vc @@ -1829,10 +1828,13 @@ For use in `add-log-current-defun-function'." (eval-and-compile (require 'smerge-mode)) (save-excursion (diff-beginning-of-hunk 'try-harder) - (let* ((style (diff-hunk-style)) ;Skips the hunk header as well. + (let* ((start (point)) + (style (diff-hunk-style)) ;Skips the hunk header as well. (beg (point)) (props '((diff-mode . fine) (face diff-refine-change))) - (end (progn (diff-end-of-hunk) (point)))) + ;; Be careful to go back to `start' so diff-end-of-hunk gets + ;; to read the hunk header's line info. + (end (progn (goto-char start) (diff-end-of-hunk) (point)))) (remove-overlays beg end 'diff-mode 'fine) @@ -1935,5 +1937,4 @@ I.e. like `add-change-log-entry-other-window' but applied to all hunks." ;; use `combine-after-change-calls' to minimize the slowdown of font-lock. ;; -;; arch-tag: 2571d7ff-bc28-4cf9-8585-42e21890be66 ;;; diff-mode.el ends here diff --git a/lisp/vc/diff.el b/lisp/vc/diff.el index 752b12446fe..4bc3466f13f 100644 --- a/lisp/vc/diff.el +++ b/lisp/vc/diff.el @@ -1,7 +1,6 @@ ;;; diff.el --- run `diff' in compilation-mode -;; Copyright (C) 1992, 1994, 1996, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1992, 1994, 1996, 2001-2011 Free Software Foundation, Inc. ;; Author: Frank Bresz ;; (according to authors.el) @@ -60,7 +59,9 @@ (defun diff-sentinel (code &optional old-temp-file new-temp-file) "Code run when the diff process exits. CODE is the exit code of the process. It should be 0 only if no diffs -were found." +were found. +If optional args OLD-TEMP-FILE and/or NEW-TEMP-FILE are non-nil, +delete the temporary files so named." (if old-temp-file (delete-file old-temp-file)) (if new-temp-file (delete-file new-temp-file)) (save-excursion @@ -110,18 +111,10 @@ specified in `diff-switches' are passed to the diff command." tempfile)) (file-local-copy file-or-buf))) -(defun diff-better-file-name (file) - (if (bufferp file) file - (let ((rel (file-relative-name file)) - (abbr (abbreviate-file-name (expand-file-name file)))) - (if (< (length abbr) (length rel)) - abbr - rel)))) - (defun diff-no-select (old new &optional switches no-async buf) ;; Noninteractive helper for creating and reverting diff buffers - (setq new (diff-better-file-name new) - old (diff-better-file-name old)) + (unless (bufferp new) (setq new (expand-file-name new))) + (unless (bufferp old) (setq old (expand-file-name old))) (or switches (setq switches diff-switches)) ; If not specified, use default. (unless (listp switches) (setq switches (list switches))) (or buf (setq buf (get-buffer-create "*Diff*"))) diff --git a/lisp/vc/ediff-diff.el b/lisp/vc/ediff-diff.el index 70352751d8d..078947e8501 100644 --- a/lisp/vc/ediff-diff.el +++ b/lisp/vc/ediff-diff.el @@ -1,8 +1,6 @@ ;;; ediff-diff.el --- diff-related utilities -;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1994-2011 Free Software Foundation, Inc. ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> ;; Package: ediff diff --git a/lisp/vc/ediff-help.el b/lisp/vc/ediff-help.el index 06a600f0af4..ddd9371b060 100644 --- a/lisp/vc/ediff-help.el +++ b/lisp/vc/ediff-help.el @@ -1,7 +1,6 @@ ;;; ediff-help.el --- Code related to the contents of Ediff help buffers -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-2011 Free Software Foundation, Inc. ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> ;; Package: ediff @@ -318,5 +317,4 @@ the value of this variable and the variables `ediff-help-message-*' in (provide 'ediff-help) -;; arch-tag: 05659813-7fcf-4274-964f-d2f577431a9d ;;; ediff-help.el ends here diff --git a/lisp/vc/ediff-hook.el b/lisp/vc/ediff-hook.el index e917d29a7b4..7598cfdba51 100644 --- a/lisp/vc/ediff-hook.el +++ b/lisp/vc/ediff-hook.el @@ -1,7 +1,6 @@ ;;; ediff-hook.el --- setup for Ediff's menus and autoloads -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995-2011 Free Software Foundation, Inc. ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> ;; Package: ediff @@ -260,5 +259,4 @@ (provide 'ediff-hook) -;; arch-tag: 512f8656-8a4b-4789-af5d-5c6144498df3 ;;; ediff-hook.el ends here diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el index 9665a21cd14..ff1f7f6b017 100644 --- a/lisp/vc/ediff-init.el +++ b/lisp/vc/ediff-init.el @@ -1,7 +1,6 @@ ;;; ediff-init.el --- Macros, variables, and defsubsts used by Ediff -;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994-2011 Free Software Foundation, Inc. ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> ;; Package: ediff @@ -1808,5 +1807,4 @@ Unless optional argument INPLACE is non-nil, return a new string." ;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body)) ;; End: -;; arch-tag: fa31d384-1e70-4d4b-82a7-3e96307c46f5 ;;; ediff-init.el ends here diff --git a/lisp/vc/ediff-merg.el b/lisp/vc/ediff-merg.el index 4c6aee15d1d..a584d0791ff 100644 --- a/lisp/vc/ediff-merg.el +++ b/lisp/vc/ediff-merg.el @@ -1,7 +1,6 @@ ;;; ediff-merg.el --- merging utilities -;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994-2011 Free Software Foundation, Inc. ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> ;; Package: ediff @@ -394,5 +393,4 @@ Combining is done according to the specifications in variable ;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body)) ;; End: -;; arch-tag: 9b798cf9-02ba-487f-a62e-b63aa823dbfb ;;; ediff-merg.el ends here diff --git a/lisp/vc/ediff-mult.el b/lisp/vc/ediff-mult.el index 39bd06fbd97..2aea75aa427 100644 --- a/lisp/vc/ediff-mult.el +++ b/lisp/vc/ediff-mult.el @@ -1,7 +1,6 @@ ;;; ediff-mult.el --- support for multi-file/multi-buffer processing in Ediff -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995-2011 Free Software Foundation, Inc. ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> ;; Package: ediff @@ -458,6 +457,7 @@ It is entered through one of the following commands: Commands: \\{ediff-meta-buffer-map}" + ;; FIXME: Use define-derived-mode. (kill-all-local-variables) (setq major-mode 'ediff-meta-mode) (setq mode-name "MetaEdiff") @@ -2473,5 +2473,4 @@ for operation, or simply indicate which are equal files. If it is nil, then ;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body)) ;; End: -;; arch-tag: c8a76898-f96f-4d9c-be9d-129134017188 ;;; ediff-mult.el ends here diff --git a/lisp/vc/ediff-ptch.el b/lisp/vc/ediff-ptch.el index 393bdcb673c..468d12057ab 100644 --- a/lisp/vc/ediff-ptch.el +++ b/lisp/vc/ediff-ptch.el @@ -1,8 +1,6 @@ ;;; ediff-ptch.el --- Ediff's patch support -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1996-2011 Free Software Foundation, Inc. ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> ;; Package: ediff diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el index 4eec5577e7b..92f52157cb2 100644 --- a/lisp/vc/ediff-util.el +++ b/lisp/vc/ediff-util.el @@ -1,8 +1,6 @@ ;;; ediff-util.el --- the core commands and utilities of ediff -;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1994-2011 Free Software Foundation, Inc. ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> ;; Package: ediff @@ -94,6 +92,7 @@ This mode is entered through one of the following commands: Commands: \\{ediff-mode-map}" + ;; FIXME: Use define-derived-mode. (kill-all-local-variables) (setq major-mode 'ediff-mode) (setq mode-name "Ediff") diff --git a/lisp/vc/ediff-vers.el b/lisp/vc/ediff-vers.el index 581aad3e4dc..804e62a2933 100644 --- a/lisp/vc/ediff-vers.el +++ b/lisp/vc/ediff-vers.el @@ -1,7 +1,6 @@ ;;; ediff-vers.el --- version control interface to Ediff -;; Copyright (C) 1995, 1996, 1997, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995-1997, 2001-2011 Free Software Foundation, Inc. ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> ;; Package: ediff @@ -236,5 +235,4 @@ comparison or merge operations are being performed." ;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body)) ;; End: -;; arch-tag: bbb34f0c-2a90-426a-a77a-c75f479ebbbf ;;; ediff-vers.el ends here diff --git a/lisp/vc/ediff-wind.el b/lisp/vc/ediff-wind.el index 4d6666a86f2..5a7fa0bf950 100644 --- a/lisp/vc/ediff-wind.el +++ b/lisp/vc/ediff-wind.el @@ -1,8 +1,6 @@ ;;; ediff-wind.el --- window manipulation utilities -;; Copyright (C) 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1994-1997, 2000-2011 Free Software Foundation, Inc. ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> ;; Package: ediff diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el index c41a6e4a1af..5e352493dc9 100644 --- a/lisp/vc/ediff.el +++ b/lisp/vc/ediff.el @@ -1,7 +1,6 @@ ;;; ediff.el --- a comprehensive visual interface to diff & patch -;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994-2011 Free Software Foundation, Inc. ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> ;; Created: February 2, 1994 @@ -1562,5 +1561,4 @@ With optional NODE, goes to that node." ;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body)) ;; End: -;; arch-tag: 97c71396-db02-4f41-8b48-6a51c3348fcc ;;; ediff.el ends here diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el index 2bce58f50f2..9ec3e970b5e 100644 --- a/lisp/vc/log-edit.el +++ b/lisp/vc/log-edit.el @@ -1,7 +1,6 @@ ;;; log-edit.el --- Major mode for editing CVS commit messages -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> ;; Keywords: pcl-cvs cvs commit log vc @@ -774,7 +773,7 @@ where LOGBUFFER is the name of the ChangeLog buffer, and each (setq pattern (file-name-nondirectory file))) (setq pattern (concat "\\(^\\|[^[:alnum:]]\\)" - pattern + (regexp-quote pattern) "\\($\\|[^[:alnum:]]\\)")) (let (texts @@ -875,5 +874,4 @@ anyway and put back as the first line of MSG." (provide 'log-edit) -;; arch-tag: 8089b39c-983b-4e83-93cd-ed0a64c7fdcc ;;; log-edit.el ends here diff --git a/lisp/vc/log-view.el b/lisp/vc/log-view.el index ac32cea6202..3b008c69d44 100644 --- a/lisp/vc/log-view.el +++ b/lisp/vc/log-view.el @@ -1,7 +1,6 @@ ;;; log-view.el --- Major mode for browsing RCS/CVS/SCCS log output -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> ;; Keywords: rcs, sccs, cvs, log, vc, tools @@ -542,5 +541,4 @@ the changes that affected other files than the currently considered file(s)." (provide 'log-view) -;; arch-tag: 0d64220b-ce7e-4f62-9c2a-6b04c2f81f4f ;;; log-view.el ends here diff --git a/lisp/vc/pcvs-defs.el b/lisp/vc/pcvs-defs.el index 7dda4533f6e..67f86dd364c 100644 --- a/lisp/vc/pcvs-defs.el +++ b/lisp/vc/pcvs-defs.el @@ -1,8 +1,6 @@ ;;; pcvs-defs.el --- variable definitions for PCL-CVS -;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1991-2011 Free Software Foundation, Inc. ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> ;; Keywords: pcl-cvs @@ -525,5 +523,4 @@ message and replace it with a message telling you to change this variable.") ;; (provide 'pcvs-defs) -;; arch-tag: c7c701d0-d1d4-4aa9-a302-007bb03aca5e ;;; pcvs-defs.el ends here diff --git a/lisp/vc/pcvs-info.el b/lisp/vc/pcvs-info.el index 1ae924ff177..3fd6cd40299 100644 --- a/lisp/vc/pcvs-info.el +++ b/lisp/vc/pcvs-info.el @@ -1,8 +1,6 @@ ;;; pcvs-info.el --- internal representation of a fileinfo entry -;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1991-2011 Free Software Foundation, Inc. ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> ;; Keywords: pcl-cvs @@ -486,5 +484,4 @@ DIR can also be a file." (provide 'pcvs-info) -;; arch-tag: d85dde07-bdc2-400a-882f-92f398c7b0ba ;;; pcvs-info.el ends here diff --git a/lisp/vc/pcvs-parse.el b/lisp/vc/pcvs-parse.el index 560a270a731..c514026b1f1 100644 --- a/lisp/vc/pcvs-parse.el +++ b/lisp/vc/pcvs-parse.el @@ -1,7 +1,6 @@ ;;; pcvs-parse.el --- the CVS output parser -;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1991-2011 Free Software Foundation, Inc. ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> ;; Keywords: pcl-cvs @@ -535,5 +534,4 @@ The remaining KEYS are passed directly to `cvs-create-fileinfo'." (provide 'pcvs-parse) -;; arch-tag: 35418375-1a23-40a0-957d-96b0262f91d6 ;;; pcvs-parse.el ends here diff --git a/lisp/vc/pcvs-util.el b/lisp/vc/pcvs-util.el index 595b762b2fa..752016a0392 100644 --- a/lisp/vc/pcvs-util.el +++ b/lisp/vc/pcvs-util.el @@ -1,7 +1,6 @@ ;;; pcvs-util.el --- utility functions for PCL-CVS -*- byte-compile-dynamic: t -*- -;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1991-2011 Free Software Foundation, Inc. ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> ;; Keywords: pcl-cvs @@ -368,5 +367,4 @@ And reset it unless READ-ONLY is non-nil." (provide 'pcvs-util) -;; arch-tag: 3b2588bb-2ae3-4f1f-bf5b-dea91b1f8a59 ;;; pcvs-util.el ends here diff --git a/lisp/vc/pcvs.el b/lisp/vc/pcvs.el index 305e109b6d6..5595dc0b03f 100644 --- a/lisp/vc/pcvs.el +++ b/lisp/vc/pcvs.el @@ -1,7 +1,6 @@ ;;; pcvs.el --- a front-end to CVS -;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1991-2011 Free Software Foundation, Inc. ;; Author: (The PCL-CVS Trust) pcl-cvs@cyclic.com ;; (Per Cederqvist) ceder@lysator.liu.se @@ -2439,5 +2438,4 @@ The exact behavior is determined also by `cvs-dired-use-hook'." (provide 'pcvs) -;; arch-tag: 8e3a7494-0453-4389-9ab3-a557ce9fab61 ;;; pcvs.el ends here diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el index 32f829f814e..37cdd41ee55 100644 --- a/lisp/vc/smerge-mode.el +++ b/lisp/vc/smerge-mode.el @@ -1,7 +1,6 @@ ;;; smerge-mode.el --- Minor mode to resolve diff3 conflicts -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> ;; Keywords: vc, tools, revision control, merge, diff3, cvs, conflict @@ -46,7 +45,7 @@ (eval-when-compile (require 'cl)) (require 'diff-mode) ;For diff-auto-refine-mode. - +(require 'newcomment) ;;; The real definition comes later. (defvar smerge-mode) @@ -455,6 +454,37 @@ BUF contains a plain diff between match-1 and match-3." (insert ">>>>>>> " name3 "\n") (setq line endline)))))))) +(defconst smerge-resolve--normalize-re "[\n\t][ \t\n]*\\| [ \t\n]+") + +(defun smerge-resolve--extract-comment (beg end) + "Extract the text within the comments that span BEG..END." + (save-excursion + (let ((comments ()) + combeg) + (goto-char beg) + (while (and (< (point) end) + (setq combeg (comment-search-forward end t))) + (let ((beg (point))) + (goto-char combeg) + (comment-forward 1) + (save-excursion + (comment-enter-backward) + (push " " comments) + (push (buffer-substring-no-properties beg (point)) comments)))) + (push " " comments) + (with-temp-buffer + (apply #'insert (nreverse comments)) + (goto-char (point-min)) + (while (re-search-forward smerge-resolve--normalize-re + nil t) + (replace-match " ")) + (buffer-string))))) + +(defun smerge-resolve--normalize (beg end) + (replace-regexp-in-string + smerge-resolve--normalize-re " " + (concat " " (buffer-substring-no-properties beg end) " "))) + (defun smerge-resolve (&optional safe) "Resolve the conflict at point intelligently. This relies on mode-specific knowledge and thus only works in some @@ -472,7 +502,8 @@ major modes. Uses `smerge-resolve-function' to do the actual work." (m2e (match-end 2)) (m3e (match-end 3)) (buf (generate-new-buffer " *smerge*")) - m b o) + m b o + choice) (unwind-protect (progn (cond @@ -557,6 +588,43 @@ major modes. Uses `smerge-resolve-function' to do the actual work." (narrow-to-region m0b m0e) (smerge-remove-props m0b m0e) (insert-file-contents m nil nil nil t))) + ;; If the conflict is only made of comments, and one of the two + ;; changes is only rearranging spaces (e.g. reflowing text) while + ;; the other is a real change, drop the space-rearrangement. + ((and m2e + (comment-only-p m1b m1e) + (comment-only-p m2b m2e) + (comment-only-p m3b m3e) + (let ((t1 (smerge-resolve--extract-comment m1b m1e)) + (t2 (smerge-resolve--extract-comment m2b m2e)) + (t3 (smerge-resolve--extract-comment m3b m3e))) + (cond + ((and (equal t1 t2) (not (equal t2 t3))) + (setq choice 3)) + ((and (not (equal t1 t2)) (equal t2 t3)) + (setq choice 1))))) + (set-match-data md) + (smerge-keep-n choice)) + ;; Idem, when the conflict is contained within a single comment. + ((save-excursion + (and m2e + (nth 4 (syntax-ppss m0b)) + ;; If there's a conflict earlier in the file, + ;; syntax-ppss is not reliable. + (not (re-search-backward smerge-begin-re nil t)) + (progn (goto-char (nth 8 (syntax-ppss m0b))) + (forward-comment 1) + (> (point) m0e)) + (let ((t1 (smerge-resolve--normalize m1b m1e)) + (t2 (smerge-resolve--normalize m2b m2e)) + (t3 (smerge-resolve--normalize m3b m3e))) + (cond + ((and (equal t1 t2) (not (equal t2 t3))) + (setq choice 3)) + ((and (not (equal t1 t2)) (equal t2 t3)) + (setq choice 1)))))) + (set-match-data md) + (smerge-keep-n choice)) (t (error "Don't know how to resolve")))) (if (buffer-name buf) (kill-buffer buf)) @@ -1231,5 +1299,4 @@ If no conflict maker is found, turn off `smerge-mode'." (provide 'smerge-mode) -;; arch-tag: 605c8d1e-e43d-4943-a6f3-1bcc4333e690 ;;; smerge-mode.el ends here diff --git a/lisp/vc/vc-annotate.el b/lisp/vc/vc-annotate.el index 10b88e6f14c..479dbb5caea 100644 --- a/lisp/vc/vc-annotate.el +++ b/lisp/vc/vc-annotate.el @@ -1,7 +1,6 @@ ;;; vc-annotate.el --- VC Annotate Support -;; Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997-1998, 2000-2011 Free Software Foundation, Inc. ;; Author: Martin Lorentzson <emwson@emw.ericsson.se> ;; Maintainer: FSF @@ -676,5 +675,4 @@ The annotations are relative to the current time, unless overridden by OFFSET." (provide 'vc-annotate) -;; arch-tag: c3454a89-80e5-4ffd-8993-671b59612898 ;;; vc-annotate.el ends here diff --git a/lisp/vc/vc-arch.el b/lisp/vc/vc-arch.el index ba91f7f23c6..59cefe047b6 100644 --- a/lisp/vc/vc-arch.el +++ b/lisp/vc/vc-arch.el @@ -1,7 +1,6 @@ ;;; vc-arch.el --- VC backend for the Arch version-control system -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: FSF (see vc.el for full credits) ;; Maintainer: Stefan Monnier <monnier@gnu.org> @@ -638,5 +637,4 @@ CALLBACK expects (ENTRIES &optional MORE-TO-COME); see (provide 'vc-arch) -;; arch-tag: a35c7c1c-5237-429d-88ef-3d718fd2e704 ;;; vc-arch.el ends here diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index 9b0d402c078..9f86a28a575 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el @@ -1,7 +1,6 @@ ;;; vc-bzr.el --- VC backend for the bzr revision control system -;; Copyright (C) 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2006-2011 Free Software Foundation, Inc. ;; Author: Dave Love <fx@gnu.org> ;; Riccardo Murri <riccardo.murri@gmail.com> @@ -95,6 +94,21 @@ Invoke the bzr command adding `BZR_PROGRESS_BAR=none' and (apply 'vc-do-command (or buffer "*vc*") okstatus vc-bzr-program file-or-list bzr-command args))) +(defun vc-bzr-async-command (bzr-command &rest args) + "Wrapper round `vc-do-async-command' using `vc-bzr-program' as COMMAND. +Invoke the bzr command adding `BZR_PROGRESS_BAR=none' and +`LC_MESSAGES=C' to the environment. +Use the current Bzr root directory as the ROOT argument to +`vc-do-async-command', and specify an output buffer named +\"*vc-bzr : ROOT*\". Return this buffer." + (let* ((process-environment + (list* "BZR_PROGRESS_BAR=none" "LC_MESSAGES=C" + process-environment)) + (root (vc-bzr-root default-directory)) + (buffer (format "*vc-bzr : %s*" (expand-file-name root)))) + (apply 'vc-do-async-command buffer root + vc-bzr-program bzr-command args) + buffer)) ;;;###autoload (defconst vc-bzr-admin-dirname ".bzr" @@ -262,31 +276,6 @@ Invoke the bzr command adding `BZR_PROGRESS_BAR=none' and (when rootdir (file-relative-name filename* rootdir)))) -(defun vc-bzr-async-command (command args) - "Run Bzr COMMAND asynchronously with ARGS, displaying the result. -Send the output to a buffer named \"*vc-bzr : NAME*\", where NAME -is the root of the current Bzr branch. Display the buffer in -some window, but don't select it." - ;; TODO: set up hyperlinks. - (let* ((dir default-directory) - (root (vc-bzr-root default-directory)) - (buffer (get-buffer-create - (format "*vc-bzr : %s*" - (expand-file-name root))))) - (with-current-buffer buffer - (setq default-directory root) - (goto-char (point-max)) - (unless (eq (point) (point-min)) - (insert "\n")) - (insert "Running \"" vc-bzr-program " " command) - (dolist (arg args) - (insert " " arg)) - (insert "\"...\n") - ;; Run bzr in the original working directory. - (let ((default-directory dir)) - (apply 'vc-bzr-command command t 'async nil args))) - (display-buffer buffer))) - (defun vc-bzr-pull (prompt) "Pull changes into the current Bzr branch. Normally, this runs \"bzr pull\". However, if the branch is a @@ -309,14 +298,15 @@ prompt for the Bzr command to run." (when (or prompt (not (or bound parent))) (setq args (split-string (read-shell-command - "Run Bzr (like this): " + "Bzr pull command: " (concat vc-bzr-program " " command) 'vc-bzr-history) " " t)) (setq vc-bzr-program (car args) command (cadr args) args (cddr args))) - (vc-bzr-async-command command args))) + (vc-set-async-update + (apply 'vc-bzr-async-command command args)))) (defun vc-bzr-merge-branch () "Merge another Bzr branch into the current one. @@ -325,8 +315,8 @@ source (an upstream branch or a previous merge source) as a default if it is available." (let* ((branch-conf (vc-bzr--branch-conf default-directory)) ;; "bzr merge" without an argument defaults to submit_branch, - ;; then parent_location. We extract the specific location - ;; and add it explicitly to the command line. + ;; then parent_location. Extract the specific location and + ;; add it explicitly to the command line. (location (cond ((string-match @@ -340,7 +330,7 @@ default if it is available." (cmd (split-string (read-shell-command - "Run Bzr (like this): " + "Bzr merge command: " (concat vc-bzr-program " merge --pull" (if location (concat " " location) "")) 'vc-bzr-history) @@ -348,7 +338,8 @@ default if it is available." (vc-bzr-program (car cmd)) (command (cadr cmd)) (args (cddr cmd))) - (vc-bzr-async-command command args))) + (vc-set-async-update + (apply 'vc-bzr-async-command command args)))) (defun vc-bzr-status (file) "Return FILE status according to Bzr. @@ -675,18 +666,22 @@ REV non-nil gets an error." (defun vc-bzr-diff (files &optional rev1 rev2 buffer) "VC bzr backend for diff." - ;; `bzr diff' exits with code 1 if diff is non-empty. - (apply #'vc-bzr-command "diff" (or buffer "*vc-diff*") - (if vc-disable-async-diff 1 'async) files - "--diff-options" (mapconcat 'identity - (vc-switches 'bzr 'diff) - " ") - ;; This `when' is just an optimization because bzr-1.2 is *much* - ;; faster when the revision argument is not given. - (when (or rev1 rev2) - (list "-r" (format "%s..%s" - (or rev1 "revno:-1") - (or rev2 "")))))) + (let* ((switches (vc-switches 'bzr 'diff)) + (args + (append + ;; Only add --diff-options if there are any diff switches. + (unless (zerop (length switches)) + (list "--diff-options" (mapconcat 'identity switches " "))) + ;; This `when' is just an optimization because bzr-1.2 is *much* + ;; faster when the revision argument is not given. + (when (or rev1 rev2) + (list "-r" (format "%s..%s" + (or rev1 "revno:-1") + (or rev2 ""))))))) + ;; `bzr diff' exits with code 1 if diff is non-empty. + (apply #'vc-bzr-command "diff" (or buffer "*vc-diff*") + (if vc-disable-async-diff 1 'async) files + args))) ;; FIXME: vc-{next,previous}-revision need fixing in vc.el to deal with @@ -720,7 +715,11 @@ property containing author and date information." (when (process-buffer proc) (with-current-buffer (process-buffer proc) (setq string (concat (process-get proc :vc-left-over) string)) - (while (string-match "^\\( *[0-9.]+ *\\) \\([^\n ]+\\) +\\([0-9]\\{8\\}\\)\\( |.*\n\\)" string) + ;; Eg: 102020 Gnus developers 20101020 | regexp." + ;; As of bzr 2.2.2, no email address in whoami (which can + ;; lead to spaces in the author field) is allowed but discouraged. + ;; See bug#7792. + (while (string-match "^\\( *[0-9.]+ *\\) \\(.+?\\) +\\([0-9]\\{8\\}\\)\\( |.*\n\\)" string) (let* ((rev (match-string 1 string)) (author (match-string 2 string)) (date (match-string 3 string)) @@ -747,7 +746,7 @@ property containing author and date information." (declare-function vc-annotate-convert-time "vc-annotate" (time)) (defun vc-bzr-annotate-time () - (when (re-search-forward "^ *[0-9.]+ +[^\n ]* +|" nil t) + (when (re-search-forward "^ *[0-9.]+ +.+? +|" nil t) (let ((prop (get-text-property (line-beginning-position) 'help-echo))) (string-match "[0-9]+\\'" prop) (let ((str (match-string-no-properties 0 prop))) @@ -762,7 +761,7 @@ property containing author and date information." Return nil if current line isn't annotated." (save-excursion (beginning-of-line) - (if (looking-at "^ *\\([0-9.]+\\) +[^\n ]* +|") + (if (looking-at "^ *\\([0-9.]+\\) +.* +|") (match-string-no-properties 1)))) (defun vc-bzr-command-discarding-stderr (command &rest args) diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el index a78b59ffba5..6a76359b5f7 100644 --- a/lisp/vc/vc-cvs.el +++ b/lisp/vc/vc-cvs.el @@ -1,7 +1,6 @@ ;;; vc-cvs.el --- non-resident support for CVS version-control -;; Copyright (C) 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1995, 1998-2011 Free Software Foundation, Inc. ;; Author: FSF (see vc.el for full credits) ;; Maintainer: Andre Spiegel <spiegel@gnu.org> @@ -1210,5 +1209,4 @@ is non-nil." (provide 'vc-cvs) -;; arch-tag: 60e1402a-aa53-4607-927a-cf74f144b432 ;;; vc-cvs.el ends here diff --git a/lisp/vc/vc-dav.el b/lisp/vc/vc-dav.el index bd495eaf4b7..27db4b57dc9 100644 --- a/lisp/vc/vc-dav.el +++ b/lisp/vc/vc-dav.el @@ -1,6 +1,6 @@ ;;; vc-dav.el --- vc.el support for WebDAV -;; Copyright (C) 2001, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2001, 2004-2011 Free Software Foundation, Inc. ;; Author: Bill Perry <wmperry@gnu.org> ;; Maintainer: Bill Perry <wmperry@gnu.org> @@ -186,5 +186,4 @@ It should return a status of either 0 (no differences found), or (provide 'vc-dav) -;; arch-tag: 0a0fb9fe-8190-4c0a-a179-5c291d3a467e ;;; vc-dav.el ends here diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index cd40468199f..5f386bcee76 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el @@ -1,7 +1,6 @@ ;;; vc-dir.el --- Directory status display under VC -;; Copyright (C) 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Dan Nicolaescu <dann@ics.uci.edu> ;; Keywords: vc tools @@ -196,7 +195,7 @@ See `run-hooks'." '(menu-item "Show Incoming Log" vc-log-incoming :help "Show a log of changes that will be received with a pull operation")) (define-key map [log] - '(menu-item "Show history" vc-print-log + '(menu-item "Show History" vc-print-log :help "List the change log of the current file set in a window")) (define-key map [rlog] '(menu-item "Show Top of the Tree History " vc-print-root-log @@ -307,33 +306,36 @@ If BODY uses EVENT, it should be a variable, (defvar vc-dir-tool-bar-map (let ((map (make-sparse-keymap))) - (tool-bar-local-item-from-menu 'vc-dir-find-file "open" - map vc-dir-mode-map) - (tool-bar-local-item "bookmark_add" - 'vc-dir-toggle-mark 'vc-dir-toggle-mark map - :help "Toggle mark on current item" - :label "Toggle Mark") - (tool-bar-local-item-from-menu 'vc-dir-previous-line "left-arrow" - map vc-dir-mode-map - :rtl "right-arrow") - (tool-bar-local-item-from-menu 'vc-dir-next-line "right-arrow" - map vc-dir-mode-map - :rtl "left-arrow") + (tool-bar-local-item-from-menu 'find-file "new" map nil + :label "New File" :vert-only t) + (tool-bar-local-item-from-menu 'menu-find-file-existing "open" map nil + :label "Open" :vert-only t) + (tool-bar-local-item-from-menu 'dired "diropen" map nil + :vert-only t) + (tool-bar-local-item-from-menu 'quit-window "close" map vc-dir-mode-map + :vert-only t) + (tool-bar-local-item-from-menu 'vc-next-action "saveas" map + vc-dir-mode-map :label "Commit") (tool-bar-local-item-from-menu 'vc-print-log "info" - map vc-dir-mode-map) - (tool-bar-local-item-from-menu 'revert-buffer "refresh" - map vc-dir-mode-map) - (tool-bar-local-item-from-menu 'nonincremental-search-forward - "search" map nil - :label "Search") - (tool-bar-local-item-from-menu 'vc-dir-query-replace-regexp - "search-replace" map vc-dir-mode-map - :label "Replace") + map vc-dir-mode-map + :label "Log") + (define-key-after map [separator-1] menu-bar-separator) (tool-bar-local-item-from-menu 'vc-dir-kill-dir-status-process "cancel" map vc-dir-mode-map - :label "Cancel") - (tool-bar-local-item-from-menu 'quit-window "exit" - map vc-dir-mode-map) + :label "Stop" :vert-only t) + (tool-bar-local-item-from-menu 'revert-buffer "refresh" + map vc-dir-mode-map :vert-only t) + (define-key-after map [separator-2] menu-bar-separator) + (tool-bar-local-item-from-menu (lookup-key menu-bar-edit-menu [cut]) + "cut" map nil :vert-only t) + (tool-bar-local-item-from-menu (lookup-key menu-bar-edit-menu [copy]) + "copy" map nil :vert-only t) + (tool-bar-local-item-from-menu (lookup-key menu-bar-edit-menu [paste]) + "paste" map nil :vert-only t) + (define-key-after map [separator-3] menu-bar-separator) + (tool-bar-local-item-from-menu 'isearch-forward + "search" map nil + :label "Search" :vert-only t) map)) (defun vc-dir-node-directory (node) @@ -1256,5 +1258,4 @@ These are the commands available for use in the file status buffer: (provide 'vc-dir) -;; arch-tag: 0274a2e3-e8e9-4b1a-a73c-e8b9129d5d15 ;;; vc-dir.el ends here diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el index b6ccae1af1b..c4e0dbfadac 100644 --- a/lisp/vc/vc-dispatcher.el +++ b/lisp/vc/vc-dispatcher.el @@ -1,7 +1,6 @@ ;;; vc-dispatcher.el -- generic command-dispatcher facility. -;; Copyright (C) 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2008-2011 Free Software Foundation, Inc. ;; Author: FSF (see below for full credits) ;; Maintainer: Eric S. Raymond <esr@thyrsus.com> @@ -357,6 +356,60 @@ case, and the process object in the asynchronous case." ',command ',file-or-list ',flags)) status)))) +(defun vc-do-async-command (buffer root command &rest args) + "Run COMMAND asynchronously with ARGS, displaying the result. +Send the output to BUFFER, which should be a buffer or the name +of a buffer, which is created. +ROOT should be the directory in which the command should be run. +Display the buffer in some window, but don't select it." + (let* ((dir default-directory) + window new-window-start) + (setq buffer (get-buffer-create buffer)) + (if (get-buffer-process buffer) + (error "Another VC action on %s is running" root)) + (with-current-buffer buffer + (setq default-directory root) + (goto-char (point-max)) + (unless (eq (point) (point-min)) + (insert "\n")) + (setq new-window-start (point)) + (insert "Running \"" command) + (dolist (arg args) + (insert " " arg)) + (insert "\"...\n") + ;; Run in the original working directory. + (let ((default-directory dir)) + (apply 'vc-do-command t 'async command nil args))) + (setq window (display-buffer buffer)) + (if window + (set-window-start window new-window-start)) + buffer)) + +(defun vc-set-async-update (process-buffer) + "Set a `vc-exec-after' action appropriate to the current buffer. +This action will update the current buffer after the current +asynchronous VC command has completed. PROCESS-BUFFER is the +buffer for the asynchronous VC process. + +If the current buffer is a VC Dir buffer, call `vc-dir-refresh'. +If the current buffer is a Dired buffer, revert it." + (let* ((buf (current-buffer)) + (tick (buffer-modified-tick buf))) + (cond + ((derived-mode-p 'vc-dir-mode) + (with-current-buffer process-buffer + (vc-exec-after + `(if (buffer-live-p ,buf) + (with-current-buffer ,buf + (vc-dir-refresh)))))) + ((derived-mode-p 'dired-mode) + (with-current-buffer process-buffer + (vc-exec-after + `(and (buffer-live-p ,buf) + (= (buffer-modified-tick ,buf) ,tick) + (with-current-buffer ,buf + (revert-buffer))))))))) + ;; These functions are used to ensure that the view the user sees is up to date ;; even if the dispatcher client mode has messed with file contents (as in, ;; for example, VCS keyword expansion). @@ -692,5 +745,4 @@ the buffer contents as a comment." (provide 'vc-dispatcher) -;; arch-tag: 7d08b17f-5470-4799-914b-bfb9fcf6a246 ;;; vc-dispatcher.el ends here diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 48a86454f74..de729c969ae 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -1,6 +1,6 @@ ;;; vc-git.el --- VC backend for the git version control system -;; Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2006-2011 Free Software Foundation, Inc. ;; Author: Alexandre Julliard <julliard@winehq.org> ;; Keywords: vc tools @@ -122,6 +122,9 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." (defvar vc-git-commits-coding-system 'utf-8 "Default coding system for git commits.") +;; History of Git commands. +(defvar vc-git-history nil) + ;;; BACKEND PROPERTIES (defun vc-git-revision-granularity () 'repository) @@ -526,6 +529,21 @@ or an empty string if none." 'help-echo stash-help-echo 'face 'font-lock-variable-name-face)))))) +(defun vc-git-branches () + "Return the existing branches, as a list of strings. +The car of the list is the current branch." + (with-temp-buffer + (call-process "git" nil t nil "branch") + (goto-char (point-min)) + (let (current-branch branches) + (while (not (eobp)) + (when (looking-at "^\\([ *]\\) \\(.+\\)$") + (if (string-equal (match-string 1) "*") + (setq current-branch (match-string 2)) + (push (match-string 2) branches))) + (forward-line 1)) + (cons current-branch (nreverse branches))))) + ;;; STATE-CHANGING FUNCTIONS (defun vc-git-create-repo () @@ -587,6 +605,47 @@ or an empty string if none." (vc-git-command nil 0 file "reset" "-q" "--") (vc-git-command nil nil file "checkout" "-q" "--"))) +(defun vc-git-pull (prompt) + "Pull changes into the current Git branch. +Normally, this runs \"git pull\". If PROMPT is non-nil, prompt +for the Git command to run." + (let* ((root (vc-git-root default-directory)) + (buffer (format "*vc-git : %s*" (expand-file-name root))) + (command "pull") + (git-program "git") + args) + ;; If necessary, prompt for the exact command. + (when prompt + (setq args (split-string + (read-shell-command "Git pull command: " + "git pull" + 'vc-git-history) + " " t)) + (setq git-program (car args) + command (cadr args) + args (cddr args))) + (apply 'vc-do-async-command buffer root git-program command args) + (vc-set-async-update buffer))) + +(defun vc-git-merge-branch () + "Merge changes into the current Git branch. +This prompts for a branch to merge from." + (let* ((root (vc-git-root default-directory)) + (buffer (format "*vc-git : %s*" (expand-file-name root))) + (branches (cdr (vc-git-branches))) + (merge-source + (completing-read "Merge from branch: " + (if (or (member "FETCH_HEAD" branches) + (not (file-readable-p + (expand-file-name ".git/FETCH_HEAD" + root)))) + branches + (cons "FETCH_HEAD" branches)) + nil t))) + (apply 'vc-do-async-command buffer root "git" "merge" + (list merge-source)) + (vc-set-async-update buffer))) + ;;; HISTORY FUNCTIONS (defun vc-git-print-log (files buffer &optional shortlog start-revision limit) @@ -1036,5 +1095,4 @@ Returns nil if not possible." (provide 'vc-git) -;; arch-tag: bd10664a-0e5b-48f5-a877-6c17b135be12 ;;; vc-git.el ends here diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 2a2879aadb8..7a0b8540ca3 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -1,6 +1,6 @@ ;;; vc-hg.el --- VC backend for the mercurial version control system -;; Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2006-2011 Free Software Foundation, Inc. ;; Author: Ivan Kanis ;; Keywords: vc tools @@ -141,6 +141,8 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." ;;; Properties of the backend +(defvar vc-hg-history nil) + (defun vc-hg-revision-granularity () 'repository) (defun vc-hg-checkout-model (files) 'implicit) @@ -607,16 +609,54 @@ REV is the revision to check out into WORKFILE." (mapcar (lambda (arg) (list "-r" arg)) marked-list))) (error "No log entries selected for push")))) -(defun vc-hg-pull () - (interactive) - (let ((marked-list (log-view-get-marked))) - (if marked-list - (apply #'vc-hg-command - nil 0 nil - "pull" - (apply 'nconc - (mapcar (lambda (arg) (list "-r" arg)) marked-list))) - (error "No log entries selected for pull")))) +(defun vc-hg-pull (prompt) + "Issue a Mercurial pull command. +If called interactively with a set of marked Log View buffers, +call \"hg pull -r REVS\" to pull in the specified revisions REVS. + +With a prefix argument or if PROMPT is non-nil, prompt for a +specific Mercurial pull command. The default is \"hg pull -u\", +which fetches changesets from the default remote repository and +then attempts to update the working directory." + (interactive "P") + (let (marked-list) + ;; The `vc-hg-pull' command existed before the `pull' VC action + ;; was implemented. Keep it for backward compatibility. + (if (and (called-interactively-p 'interactive) + (setq marked-list (log-view-get-marked))) + (apply #'vc-hg-command + nil 0 nil + "pull" + (apply 'nconc + (mapcar (lambda (arg) (list "-r" arg)) + marked-list))) + (let* ((root (vc-hg-root default-directory)) + (buffer (format "*vc-hg : %s*" (expand-file-name root))) + (command "pull") + (hg-program "hg") + ;; Fixme: before updating the working copy to the latest + ;; state, should check if it's visiting an old revision. + (args '("-u"))) + ;; If necessary, prompt for the exact command. + (when prompt + (setq args (split-string + (read-shell-command "Run Hg (like this): " "hg pull -u" + 'vc-hg-history) + " " t)) + (setq hg-program (car args) + command (cadr args) + args (cddr args))) + (apply 'vc-do-async-command buffer root hg-program + command args) + (vc-set-async-update buffer))))) + +(defun vc-hg-merge-branch () + "Merge incoming changes into the current working directory. +This runs the command \"hg merge\"." + (let* ((root (vc-hg-root default-directory)) + (buffer (format "*vc-hg : %s*" (expand-file-name root)))) + (apply 'vc-do-async-command buffer root "hg" '("merge")) + (vc-set-async-update buffer))) ;;; Internal functions @@ -635,5 +675,4 @@ and that it passes `vc-hg-global-switches' to it before FLAGS." (provide 'vc-hg) -;; arch-tag: bd094dc5-715a-434f-a331-37b9fb7cd954 ;;; vc-hg.el ends here diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index 37426eb25f2..e7bfd273732 100644 --- a/lisp/vc/vc-hooks.el +++ b/lisp/vc/vc-hooks.el @@ -1,8 +1,6 @@ ;;; vc-hooks.el --- resident support for version-control -;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -;; 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1992-1996, 1998-2011 Free Software Foundation, Inc. ;; Author: FSF (see vc.el for full credits) ;; Maintainer: Andre Spiegel <spiegel@gnu.org> @@ -1052,5 +1050,4 @@ current, and kill the buffer that visits the link." (provide 'vc-hooks) -;; arch-tag: 2e5a6fa7-1d30-48e2-8bd0-e3d335f04f32 ;;; vc-hooks.el ends here diff --git a/lisp/vc/vc-mtn.el b/lisp/vc/vc-mtn.el index a1ca6ab4d65..0b263e9c669 100644 --- a/lisp/vc/vc-mtn.el +++ b/lisp/vc/vc-mtn.el @@ -1,6 +1,6 @@ ;;; vc-mtn.el --- VC backend for Monotone -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2011 Free Software Foundation, Inc. ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> ;; Keywords: vc @@ -341,5 +341,4 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." (provide 'vc-mtn) -;; arch-tag: 2b89ffbc-cbb8-405a-9080-2eafd4becb70 ;;; vc-mtn.el ends here diff --git a/lisp/vc/vc-rcs.el b/lisp/vc/vc-rcs.el index f8d5214d776..d3a64f15f9e 100644 --- a/lisp/vc/vc-rcs.el +++ b/lisp/vc/vc-rcs.el @@ -1,8 +1,6 @@ ;;; vc-rcs.el --- support for RCS version-control -;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -;; 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1992-2011 Free Software Foundation, Inc. ;; Author: FSF (see vc.el for full credits) ;; Maintainer: Andre Spiegel <spiegel@gnu.org> @@ -1467,5 +1465,4 @@ The `:insn' key is a keyword to distinguish it as a vc-rcs.el extension." (provide 'vc-rcs) -;; arch-tag: 759b4916-5b0d-431d-b647-b185b8c652cf ;;; vc-rcs.el ends here diff --git a/lisp/vc/vc-sccs.el b/lisp/vc/vc-sccs.el index 2acd778881a..0ee75e1c24a 100644 --- a/lisp/vc/vc-sccs.el +++ b/lisp/vc/vc-sccs.el @@ -1,8 +1,6 @@ ;;; vc-sccs.el --- support for SCCS version-control -;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -;; 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1992-2011 Free Software Foundation, Inc. ;; Author: FSF (see vc.el for full credits) ;; Maintainer: Andre Spiegel <spiegel@gnu.org> @@ -483,5 +481,4 @@ If NAME is nil or a revision number string it's just passed through." (provide 'vc-sccs) -;; arch-tag: d751dee3-d7b3-47e1-95e3-7ae98c052041 ;;; vc-sccs.el ends here diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el index 3e4c299f096..aefef50cf79 100644 --- a/lisp/vc/vc-svn.el +++ b/lisp/vc/vc-svn.el @@ -1,7 +1,6 @@ ;;; vc-svn.el --- non-resident support for Subversion version-control -;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2003-2011 Free Software Foundation, Inc. ;; Author: FSF (see vc.el for full credits) ;; Maintainer: Stefan Monnier <monnier@gnu.org> @@ -72,9 +71,9 @@ If t, use no switches." t ;`svn' doesn't support common args like -c or -b. "String or list of strings specifying extra switches for svn diff under VC. If nil, use the value of `vc-diff-switches' (or `diff-switches'), -together with \"-x --diff-cmd=diff\" (since svn diff does not -support the default \"-c\" value of `diff-switches'). If you -want to force an empty list of arguments, use t." +together with \"-x --diff-cmd=\"`diff-command' (since 'svn diff' +does not support the default \"-c\" value of `diff-switches'). +If you want to force an empty list of arguments, use t." :type '(choice (const :tag "Unspecified" nil) (const :tag "None" t) (string :tag "Argument String") @@ -171,15 +170,19 @@ want to force an empty list of arguments, use t." (?? . unregistered) ;; This is what vc-svn-parse-status does. (?~ . edited))) - (re (if remote "^\\(.\\)......? \\([ *]\\) +\\(?:[-0-9]+\\)? \\(.*\\)$" - ;; Subexp 2 is a dummy in this case, so the numbers match. - "^\\(.\\)....\\(.\\) \\(.*\\)$")) + (re (if remote "^\\(.\\)\\(.\\).....? \\([ *]\\) +\\(?:[-0-9]+\\)? \\(.*\\)$" + ;; Subexp 3 is a dummy in this case, so the numbers match. + "^\\(.\\)\\(.\\)...\\(.\\) \\(.*\\)$")) result) (goto-char (point-min)) (while (re-search-forward re nil t) (let ((state (cdr (assq (aref (match-string 1) 0) state-map))) - (filename (match-string 3))) - (and remote (string-equal (match-string 2) "*") + (propstat (cdr (assq (aref (match-string 2) 0) state-map))) + (filename (match-string 4))) + (and (memq propstat '(conflict edited)) + (not (eq state 'conflict)) ; conflict always wins + (setq state propstat)) + (and remote (string-equal (match-string 3) "*") ;; FIXME are there other possible combinations? (cond ((eq state 'edited) (setq state 'needs-merge)) ((not state) (setq state 'needs-update)))) @@ -519,7 +522,7 @@ or svn+ssh://." (let* ((switches (if vc-svn-diff-switches (vc-switches 'SVN 'diff) - (list "--diff-cmd=diff" "-x" + (list (concat "--diff-cmd=" diff-command) "-x" (mapconcat 'identity (vc-switches nil 'diff) " ")))) (async (and (not vc-disable-async-diff) (vc-stay-local-p files 'SVN) @@ -643,7 +646,7 @@ and that it passes `vc-svn-global-switches' to it before FLAGS." "Parse output of \"svn status\" command in the current buffer. Set file properties accordingly. Unless FILENAME is non-nil, parse only information about FILENAME and return its status." - (let (file status) + (let (file status propstat) (goto-char (point-min)) (while (re-search-forward ;; Ignore the files with status X. @@ -653,7 +656,9 @@ information about FILENAME and return its status." (setq file (or filename (expand-file-name (buffer-substring (point) (line-end-position))))) - (setq status (char-after (line-beginning-position))) + (setq status (char-after (line-beginning-position)) + ;; Status of the item's properties ([ MC]). + propstat (char-after (1+ (line-beginning-position)))) (if (eq status ??) (vc-file-setprop file 'vc-state 'unregistered) ;; Use the last-modified revision, so that searching in vc-print-log @@ -664,7 +669,7 @@ information about FILENAME and return its status." (vc-file-setprop file 'vc-state (cond - ((eq status ?\ ) + ((and (eq status ?\ ) (eq propstat ?\ )) (if (eq (char-after (match-beginning 1)) ?*) 'needs-update (vc-file-setprop file 'vc-checkout-time @@ -675,9 +680,11 @@ information about FILENAME and return its status." (vc-file-setprop file 'vc-working-revision "0") (vc-file-setprop file 'vc-checkout-time 0) 'added) - ((eq status ?C) + ;; Conflict in contents or properties. + ((or (eq status ?C) (eq propstat ?C)) (vc-file-setprop file 'vc-state 'conflict)) - ((eq status '?M) + ;; Modified contents or properties. + ((or (eq status ?M) (eq propstat ?M)) (if (eq (char-after (match-beginning 1)) ?*) 'needs-merge 'edited)) @@ -744,5 +751,4 @@ information about FILENAME and return its status." (provide 'vc-svn) -;; arch-tag: 02f10c68-2b4d-453a-90fc-1eee6cfb268d ;;; vc-svn.el ends here diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 40f91b70757..be0f568d304 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1,8 +1,6 @@ ;;; vc.el --- drive a version-control system from within Emacs -;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, -;; 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1992-1998, 2000-2011 Free Software Foundation, Inc. ;; Author: FSF (see below for full credits) ;; Maintainer: Andre Spiegel <spiegel@gnu.org> @@ -2299,7 +2297,7 @@ depending on the underlying version-control system." (define-obsolete-function-alias 'vc-revert-buffer 'vc-revert "23.1") ;;;###autoload -(defun vc-update (&optional arg) +(defun vc-pull (&optional arg) "Update the current fileset or branch. On a distributed version control system, this runs a \"pull\" operation to update the current branch, prompting for an argument @@ -2339,7 +2337,7 @@ tip revision are merged into the working file." (error "VC update is unsupported for `%s'" backend))))) ;;;###autoload -(defalias 'vc-pull 'vc-update) +(defalias 'vc-update 'vc-pull) (defun vc-version-backup-file (file &optional rev) "Return name of backup file for revision REV of FILE. @@ -2775,5 +2773,4 @@ Invoke FUNC f ARGS on each VC-managed file f underneath it." (provide 'vc) -;; arch-tag: ca82c1de-3091-4e26-af92-460abc6213a6 ;;; vc.el ends here diff --git a/lisp/vcursor.el b/lisp/vcursor.el index 9e8fbf431f1..d4fc35920a9 100644 --- a/lisp/vcursor.el +++ b/lisp/vcursor.el @@ -1,7 +1,6 @@ ;;; vcursor.el --- manipulate an alternative ("virtual") cursor -;; Copyright (C) 1994, 1996, 1998, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994, 1996, 1998, 2001-2011 Free Software Foundation, Inc. ;; Author: Peter Stephenson <pws@ibmth.df.unipi.it> ;; Maintainer: FSF @@ -1144,5 +1143,4 @@ line is treated like ordinary characters." (provide 'vcursor) -;; arch-tag: cdfe1cdc-2c46-4046-88e4-ed57d20f7aca ;;; vcursor.el ends here diff --git a/lisp/version.el b/lisp/version.el index b4e2c61b570..d28a3004585 100644 --- a/lisp/version.el +++ b/lisp/version.el @@ -1,7 +1,6 @@ ;;; version.el --- record version number of Emacs -*- no-byte-compile: t -*- -;; Copyright (C) 1985, 1992, 1994, 1995, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 1985, 1992, 1994-1995, 1999-2011 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -88,5 +87,4 @@ to the system configuration; look at `system-configuration' instead." ;;version-control: never ;;End: -;; arch-tag: e60dc445-6218-4a4c-a7df-f15a818642a0 ;;; version.el ends here diff --git a/lisp/view.el b/lisp/view.el index f6698ae5a9f..b7b43e35997 100644 --- a/lisp/view.el +++ b/lisp/view.el @@ -1,7 +1,7 @@ ;;; view.el --- peruse file or buffer without editing -;; Copyright (C) 1985, 1989, 1994, 1995, 1997, 2000, 2001, 2002, -;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1989, 1994-1995, 1997, 2000-2011 +;; Free Software Foundation, Inc. ;; Author: K. Shane Hartman ;; Maintainer: Inge Frick <inge@nada.kth.se> @@ -1086,5 +1086,4 @@ If TIMES is negative, search backwards." (provide 'view) -;; arch-tag: 6d0ace36-1d12-4de3-8de3-1fa3231636d7 ;;; view.el ends here diff --git a/lisp/vt-control.el b/lisp/vt-control.el index 6e91ccada69..558978768bc 100644 --- a/lisp/vt-control.el +++ b/lisp/vt-control.el @@ -1,7 +1,6 @@ ;;; vt-control.el --- Common VTxxx control functions -;; Copyright (C) 1993, 1994, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993-1994, 2001-2011 Free Software Foundation, Inc. ;; Author: Rob Riepel <riepel@networking.stanford.edu> ;; Maintainer: Rob Riepel <riepel@networking.stanford.edu> @@ -108,5 +107,4 @@ (provide 'vt-control) -;; arch-tag: d4fed1bf-2524-4ba1-a4fe-86bca3d928a2 ;;; vt-control.el ends here diff --git a/lisp/vt100-led.el b/lisp/vt100-led.el index 3bab04c5777..8a4b4ac288c 100644 --- a/lisp/vt100-led.el +++ b/lisp/vt100-led.el @@ -1,7 +1,6 @@ ;;; vt100-led.el --- functions for LED control on VT-100 terminals & clones -;; Copyright (C) 1988, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1988, 2001-2011 Free Software Foundation, Inc. ;; Author: Howard Gayle ;; Maintainer: FSF @@ -66,5 +65,4 @@ Element 0 is not used.") (provide 'vt100-led) -;; arch-tag: 346e6480-5e31-4234-aafe-257cea4a36d1 ;;; vt100-led.el ends here diff --git a/lisp/w32-fns.el b/lisp/w32-fns.el index 0c6c56f84fb..20f1a1b560e 100644 --- a/lisp/w32-fns.el +++ b/lisp/w32-fns.el @@ -1,7 +1,6 @@ ;;; w32-fns.el --- Lisp routines for Windows NT -;; Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994, 2001-2011 Free Software Foundation, Inc. ;; Author: Geoff Voelker <voelker@cs.washington.edu> ;; Keywords: internal @@ -57,7 +56,7 @@ That includes all Windows systems except for 9X/Me." (defun w32-shell-name () "Return the name of the shell being used." - (or (bound-and-true-p explicit-shell-file-name) + (or (bound-and-true-p shell-file-name) (getenv "ESHELL") (getenv "SHELL") (and (w32-using-nt) "cmd.exe") diff --git a/lisp/w32-vars.el b/lisp/w32-vars.el index 80cdfb57129..d1e8edc40be 100644 --- a/lisp/w32-vars.el +++ b/lisp/w32-vars.el @@ -1,7 +1,6 @@ ;;; w32-vars.el --- MS-Windows specific user options -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2002-2011 Free Software Foundation, Inc. ;; Author: Jason Rumney <jasonr@gnu.org> ;; Keywords: internal diff --git a/lisp/wdired.el b/lisp/wdired.el index 375bc26b869..11ef25d4eac 100644 --- a/lisp/wdired.el +++ b/lisp/wdired.el @@ -1,7 +1,6 @@ ;;; wdired.el --- Rename files editing their names in dired buffers -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Filename: wdired.el ;; Author: Juan León Lahoz García <juanleon1@gmail.com> @@ -841,5 +840,4 @@ Like original function but it skips read-only words." ;; byte-compile-dynamic: t ;; End: -;; arch-tag: bc00902e-526f-4305-bc7f-8862a559184f ;;; wdired.el ends here diff --git a/lisp/whitespace.el b/lisp/whitespace.el index 1a54d8afc3e..8d25a161b47 100644 --- a/lisp/whitespace.el +++ b/lisp/whitespace.el @@ -1,7 +1,6 @@ ;;; whitespace.el --- minor mode to visualize TAB, (HARD) SPACE, NEWLINE -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> @@ -1188,7 +1187,8 @@ See also `whitespace-newline' and `whitespace-display-mappings'." :global t :group 'whitespace (let ((whitespace-style '(newline-mark newline))) - (global-whitespace-mode global-whitespace-newline-mode) + (global-whitespace-mode (if global-whitespace-newline-mode + 1 -1)) ;; sync states (running a batch job) (setq global-whitespace-newline-mode global-whitespace-mode))) @@ -2668,5 +2668,4 @@ It should be added buffer-locally to `write-file-functions'." (run-hooks 'whitespace-load-hook) -;; arch-tag: 1b1e2500-dbd4-4a26-8f7a-5a5edfd3c97e ;;; whitespace.el ends here diff --git a/lisp/wid-browse.el b/lisp/wid-browse.el index 96e6bd236cf..23396a900c0 100644 --- a/lisp/wid-browse.el +++ b/lisp/wid-browse.el @@ -1,7 +1,6 @@ ;;; wid-browse.el --- functions for browsing widgets ;; -;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997, 2001-2011 Free Software Foundation, Inc. ;; ;; Author: Per Abrahamsen <abraham@dina.kvl.dk> ;; Keywords: extensions @@ -279,5 +278,4 @@ With arg, turn widget mode on if and only if arg is positive." (provide 'wid-browse) -;; arch-tag: d5ffb18f-8984-4735-8502-edf70456db21 ;;; wid-browse.el ends here diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 9c7de61d7cd..c9008d092d4 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -1,7 +1,6 @@ ;;; wid-edit.el --- Functions for creating and using widgets -*-byte-compile-dynamic: t;-*- ;; -;; Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-1997, 1999-2011 Free Software Foundation, Inc. ;; ;; Author: Per Abrahamsen <abraham@dina.kvl.dk> ;; Maintainer: FSF @@ -637,8 +636,8 @@ extension (xpm, xbm, gif, jpg, or png) located in specs) (dolist (elt widget-image-conversion) (dolist (ext (cdr elt)) - (push (list :type (car elt) :file (concat image ext) - :ascent 'center) specs))) + (push (list :type (car elt) :file (concat image ext)) + specs))) (find-image (nreverse specs)))) (t ;; Oh well. @@ -2162,21 +2161,13 @@ when he invoked the menu." (defun widget-toggle-value-create (widget) "Insert text representing the `on' and `off' states." - (if (widget-value widget) - (let ((image (widget-get widget :on-glyph))) - (and (display-graphic-p) - (listp image) - (not (eq (car image) 'image)) - (widget-put widget :on-glyph (setq image (eval image)))) - (widget-image-insert widget - (widget-get widget :on) - image)) - (let ((image (widget-get widget :off-glyph))) - (and (display-graphic-p) - (listp image) - (not (eq (car image) 'image)) - (widget-put widget :off-glyph (setq image (eval image)))) - (widget-image-insert widget (widget-get widget :off) image)))) + (let* ((val (widget-value widget)) + (text (widget-get widget (if val :on :off))) + (img (widget-image-find + (widget-get widget (if val :on-glyph :off-glyph))))) + (widget-image-insert widget (or text "") + (if img + (append img '(:ascent center)))))) (defun widget-toggle-action (widget &optional event) ;; Toggle value. @@ -2816,34 +2807,22 @@ Return an alist of (TYPE MATCH)." "An indicator and manipulator for hidden items. The following properties have special meanings for this widget: -:on-image Image filename or spec to display when the item is visible. +:on-glyph Image filename or spec to display when the item is visible. :on Text shown if the \"on\" image is nil or cannot be displayed. -:off-image Image filename or spec to display when the item is hidden. +:off-glyph Image filename or spec to display when the item is hidden. :off Text shown if the \"off\" image is nil cannot be displayed." :format "%[%v%]" :button-prefix "" :button-suffix "" - :on-image "down" + :on-glyph "down" :on "Hide" - :off-image "right" + :off-glyph "right" :off "Show" :value-create 'widget-visibility-value-create :action 'widget-toggle-action :match (lambda (widget value) t)) -(defun widget-visibility-value-create (widget) - ;; Insert text representing the `on' and `off' states. - (let* ((val (widget-value widget)) - (text (widget-get widget (if val :on :off))) - (img (widget-image-find - (widget-get widget (if val :on-image :off-image))))) - (widget-image-insert widget - (if text - (concat widget-push-button-prefix text - widget-push-button-suffix) - "") - (if img - (append img '(:ascent center)))))) +(defalias 'widget-visibility-value-create 'widget-toggle-value-create) ;;; The `documentation-link' Widget. ;; diff --git a/lisp/widget.el b/lisp/widget.el index 962235a25d2..3e6f3132e99 100644 --- a/lisp/widget.el +++ b/lisp/widget.el @@ -1,7 +1,6 @@ ;;; widget.el --- a library of user interface components ;; -;; Copyright (C) 1996, 1997, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-1997, 2001-2011 Free Software Foundation, Inc. ;; ;; Author: Per Abrahamsen <abraham@dina.kvl.dk> ;; Keywords: help, extensions, faces, hypermedia @@ -96,5 +95,4 @@ The third argument DOC is a documentation string for the widget." (provide 'widget) -;; arch-tag: 932c71a3-9aeb-4827-a293-8b88b26d5c58 ;;; widget.el ends here diff --git a/lisp/windmove.el b/lisp/windmove.el index 7757417b28f..5e8d019a971 100644 --- a/lisp/windmove.el +++ b/lisp/windmove.el @@ -1,7 +1,6 @@ ;;; windmove.el --- directional window-selection routines ;; -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2011 Free Software Foundation, Inc. ;; ;; Author: Hovav Shacham (hovav@cs.stanford.edu) ;; Created: 17 October 1998 @@ -568,5 +567,4 @@ Default MODIFIER is 'shift." (provide 'windmove) -;; arch-tag: 56267432-bf1a-4296-a9a0-85c6bd9f2375 ;;; windmove.el ends here diff --git a/lisp/window.el b/lisp/window.el index 45d7875cf20..af5d9a5b16b 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -1,7 +1,6 @@ ;;; window.el --- GNU Emacs window commands aside from those written in C -;; Copyright (C) 1985, 1989, 1992, 1993, 1994, 2000, 2001, 2002, -;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 1985, 1989, 1992-1994, 2000-2011 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -2039,5 +2038,4 @@ Otherwise, consult the value of `truncate-partial-width-windows' (define-key ctl-x-map "+" 'balance-windows) (define-key ctl-x-4-map "0" 'kill-buffer-and-window) -;; arch-tag: b508dfcc-c353-4c37-89fa-e773fe10cea9 ;;; window.el ends here diff --git a/lisp/winner.el b/lisp/winner.el index bd943814e4d..e5855ad8aac 100644 --- a/lisp/winner.el +++ b/lisp/winner.el @@ -1,7 +1,6 @@ ;;; winner.el --- Restore old window configurations -;; Copyright (C) 1997, 1998, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation. Inc. +;; Copyright (C) 1997-1998, 2001-2011 Free Software Foundation. Inc. ;; Author: Ivar Rummelhoff <ivarru@math.uio.no> ;; Created: 27 Feb 1997 @@ -473,5 +472,4 @@ In other words, \"undo\" changes in window configuration." minor-mode-map-alist)) (provide 'winner) -;; arch-tag: 686d1c1b-010e-42ca-a192-b5685112418f ;;; winner.el ends here diff --git a/lisp/woman.el b/lisp/woman.el index 25113419deb..ac4ace62bf1 100644 --- a/lisp/woman.el +++ b/lisp/woman.el @@ -1,7 +1,6 @@ ;;; woman.el --- browse UN*X manual pages `wo (without) man' -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; Author: Francis J. Wright <F.J.Wright@qmul.ac.uk> ;; Maintainer: FSF @@ -2479,10 +2478,22 @@ Start at FROM and re-scan new text as appropriate." (woman0-search-regex-start woman0-search-regex-start) (woman0-search-regex (concat woman0-search-regex-start woman0-search-regex-end)) + processed-first-hunk woman0-rename-alist) (set-marker-insertion-type woman0-if-to t) (while (re-search-forward woman0-search-regex nil t) (setq woman-request (match-string 1)) + + ;; Process escape sequences prior to first request (Bug#7843). + (unless processed-first-hunk + (setq processed-first-hunk t) + (let ((process-escapes-to-marker (point-marker))) + (set-marker-insertion-type process-escapes-to-marker t) + (save-match-data + (save-excursion + (goto-char from) + (woman2-process-escapes process-escapes-to-marker))))) + (cond ((string= woman-request "ig") (woman0-ig)) ((string= woman-request "if") (woman0-if "if")) ((string= woman-request "ie") (woman0-if "ie")) diff --git a/lisp/x-dnd.el b/lisp/x-dnd.el index f071bc49b74..b12cb6c3ab7 100644 --- a/lisp/x-dnd.el +++ b/lisp/x-dnd.el @@ -1,7 +1,6 @@ ;;; x-dnd.el --- drag and drop support for X -*- coding: utf-8 -*- -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2011 Free Software Foundation, Inc. ;; Author: Jan Djärv <jan.h.d@swipnet.se> ;; Maintainer: FSF diff --git a/lisp/xml.el b/lisp/xml.el index 8e8981ac439..3c5e316d0f8 100644 --- a/lisp/xml.el +++ b/lisp/xml.el @@ -1,7 +1,6 @@ ;;; xml.el --- XML parser -;; Copyright (C) 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2000-2011 Free Software Foundation, Inc. ;; Author: Emmanuel Briot <briot@gnat.com> ;; Maintainer: Mark A. Hershberger <mah@everybody.org> @@ -911,5 +910,4 @@ The first line is indented with INDENT-STRING." (provide 'xml) -;; arch-tag: 5864b283-5a68-4b59-a20d-36a72b353b9b ;;; xml.el ends here diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index f802103fbd7..66542578d76 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el @@ -1,7 +1,6 @@ ;;; xt-mouse.el --- support the mouse when emacs run in an xterm -;; Copyright (C) 1994, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994, 2000-2011 Free Software Foundation, Inc. ;; Author: Per Abrahamsen <abraham@dina.kvl.dk> ;; Keywords: mouse, terminals @@ -265,5 +264,4 @@ down the SHIFT key while pressing the mouse button." (provide 'xt-mouse) -;; arch-tag: 84962d4e-fae9-4c13-a9d7-ef4925a4ac03 ;;; xt-mouse.el ends here |