summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKaroly Lorentey <karoly@lorentey.hu>2007-04-22 12:42:47 +0000
committerKaroly Lorentey <karoly@lorentey.hu>2007-04-22 12:42:47 +0000
commit9d0799072a0d09bc14a99eaf372b262d1ba61399 (patch)
tree76acd4ae0559776a5ec27fbd5c25598285ec71d1 /lisp
parente18c709364b095ea0be8ecabe458ac9a642a252f (diff)
parenta20becf321f023c6dc1831595712576d64e2ef4b (diff)
downloademacs-9d0799072a0d09bc14a99eaf372b262d1ba61399.tar.gz
Merged from emacs@sv.gnu.org
Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-674 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-675 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-676 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-677 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-678 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-679 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-680 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-681 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-682 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-683 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-684 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-685 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-686 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-687 Release ERC 5.2. * emacs@sv.gnu.org/emacs--devo--0--patch-688 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-689 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-690 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-691 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-692 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-693 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-694 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-695 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-696 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-697 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-698 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-699 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-700 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-701 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-209 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-210 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-211 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-212 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-213 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-214 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-215 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-601
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog742
-rw-r--r--lisp/arc-mode.el19
-rw-r--r--lisp/autorevert.el4
-rw-r--r--lisp/button.el38
-rw-r--r--lisp/calc/calc.el8
-rw-r--r--lisp/calendar/appt.el8
-rw-r--r--lisp/calendar/cal-china.el6
-rw-r--r--lisp/calendar/cal-coptic.el6
-rw-r--r--lisp/calendar/cal-dst.el18
-rw-r--r--lisp/calendar/cal-french.el6
-rw-r--r--lisp/calendar/cal-hebrew.el6
-rw-r--r--lisp/calendar/cal-islam.el6
-rw-r--r--lisp/calendar/cal-iso.el6
-rw-r--r--lisp/calendar/cal-julian.el6
-rw-r--r--lisp/calendar/cal-mayan.el2
-rw-r--r--lisp/calendar/cal-menu.el6
-rw-r--r--lisp/calendar/cal-move.el6
-rw-r--r--lisp/calendar/cal-persia.el10
-rw-r--r--lisp/calendar/cal-x.el6
-rw-r--r--lisp/calendar/calendar.el24
-rw-r--r--lisp/calendar/diary-lib.el141
-rw-r--r--lisp/calendar/holidays.el6
-rw-r--r--lisp/calendar/lunar.el6
-rw-r--r--lisp/calendar/solar.el6
-rw-r--r--lisp/comint.el9
-rw-r--r--lisp/compare-w.el25
-rw-r--r--lisp/complete.el126
-rw-r--r--lisp/cus-edit.el4
-rw-r--r--lisp/cus-start.el6
-rw-r--r--lisp/desktop.el94
-rw-r--r--lisp/dframe.el4
-rw-r--r--lisp/diff-mode.el6
-rw-r--r--lisp/dired-x.el14
-rw-r--r--lisp/dnd.el2
-rw-r--r--lisp/dos-w32.el3
-rw-r--r--lisp/emacs-lisp/authors.el2
-rw-r--r--lisp/emacs-lisp/byte-opt.el81
-rw-r--r--lisp/emacs-lisp/bytecomp.el33
-rw-r--r--lisp/emacs-lisp/edebug.el49
-rw-r--r--lisp/emacs-lisp/ewoc.el9
-rw-r--r--lisp/emacs-lisp/lisp-mode.el3
-rw-r--r--lisp/emacs-lisp/lisp.el3
-rw-r--r--lisp/emacs-lisp/sregex.el2
-rw-r--r--lisp/emacs-lisp/testcover.el12
-rw-r--r--lisp/emacs-lisp/timer.el17
-rw-r--r--lisp/emacs-lisp/warnings.el13
-rw-r--r--lisp/emulation/viper.el40
-rw-r--r--lisp/erc/ChangeLog1516
-rw-r--r--lisp/erc/ChangeLog.061457
-rw-r--r--lisp/erc/erc-autoaway.el125
-rw-r--r--lisp/erc/erc-backend.el198
-rw-r--r--lisp/erc/erc-button.el16
-rw-r--r--lisp/erc/erc-capab.el30
-rw-r--r--lisp/erc/erc-compat.el8
-rw-r--r--lisp/erc/erc-fill.el11
-rw-r--r--lisp/erc/erc-ibuffer.el3
-rw-r--r--lisp/erc/erc-identd.el34
-rw-r--r--lisp/erc/erc-log.el78
-rw-r--r--lisp/erc/erc-match.el9
-rw-r--r--lisp/erc/erc-menu.el7
-rw-r--r--lisp/erc/erc-netsplit.el2
-rw-r--r--lisp/erc/erc-networks.el8
-rw-r--r--lisp/erc/erc-notify.el5
-rw-r--r--lisp/erc/erc-pcomplete.el4
-rw-r--r--lisp/erc/erc-ring.el3
-rw-r--r--lisp/erc/erc-services.el100
-rw-r--r--lisp/erc/erc-speedbar.el5
-rw-r--r--lisp/erc/erc-spelling.el40
-rw-r--r--lisp/erc/erc-stamp.el18
-rw-r--r--lisp/erc/erc-track.el187
-rw-r--r--lisp/erc/erc.el354
-rw-r--r--lisp/eshell/esh-proc.el2
-rw-r--r--lisp/expand.el15
-rw-r--r--lisp/faces.el6
-rw-r--r--lisp/ffap.el19
-rw-r--r--lisp/files.el16
-rw-r--r--lisp/font-lock.el2
-rw-r--r--lisp/gnus/ChangeLog123
-rw-r--r--lisp/gnus/gmm-utils.el4
-rw-r--r--lisp/gnus/gnus-art.el4
-rw-r--r--lisp/gnus/gnus-msg.el9
-rw-r--r--lisp/gnus/gnus-registry.el2
-rw-r--r--lisp/gnus/gnus-util.el2
-rw-r--r--lisp/gnus/message.el123
-rw-r--r--lisp/gnus/nnmail.el7
-rw-r--r--lisp/help.el2
-rw-r--r--lisp/ido.el10
-rw-r--r--lisp/info.el33
-rw-r--r--lisp/international/mule.el14
-rw-r--r--lisp/isearch.el3
-rw-r--r--lisp/ldefs-boot.el302
-rw-r--r--lisp/loadhist.el28
-rw-r--r--lisp/mail/footnote.el19
-rw-r--r--lisp/mail/rmail.el24
-rw-r--r--lisp/mail/sendmail.el10
-rw-r--r--lisp/mail/smtpmail.el22
-rw-r--r--lisp/man.el9
-rw-r--r--lisp/menu-bar.el4
-rw-r--r--lisp/mouse.el6
-rw-r--r--lisp/net/tls.el15
-rw-r--r--lisp/net/tramp.el27
-rw-r--r--lisp/newcomment.el4
-rw-r--r--lisp/outline.el22
-rw-r--r--lisp/pcomplete.el8
-rw-r--r--lisp/play/5x5.el2
-rw-r--r--lisp/play/animate.el4
-rw-r--r--lisp/play/dissociate.el2
-rw-r--r--lisp/play/doctor.el2
-rw-r--r--lisp/play/gomoku.el2
-rw-r--r--lisp/play/landmark.el2
-rw-r--r--lisp/play/tetris.el2
-rw-r--r--lisp/play/zone.el1
-rw-r--r--lisp/progmodes/cc-awk.el1
-rw-r--r--lisp/progmodes/cc-cmds.el44
-rw-r--r--lisp/progmodes/cc-defs.el18
-rw-r--r--lisp/progmodes/cc-engine.el134
-rw-r--r--lisp/progmodes/cc-fonts.el92
-rw-r--r--lisp/progmodes/cc-langs.el25
-rw-r--r--lisp/progmodes/cc-mode.el10
-rw-r--r--lisp/progmodes/cc-subword.el54
-rw-r--r--lisp/progmodes/cc-vars.el3
-rw-r--r--lisp/progmodes/compile.el3
-rw-r--r--lisp/progmodes/cperl-mode.el5
-rw-r--r--lisp/progmodes/dcl-mode.el5
-rw-r--r--lisp/progmodes/ebnf2ps.el4
-rw-r--r--lisp/progmodes/flymake.el4
-rw-r--r--lisp/progmodes/gdb-ui.el13
-rw-r--r--lisp/progmodes/grep.el20
-rw-r--r--lisp/progmodes/gud.el56
-rw-r--r--lisp/progmodes/hideshow.el8
-rw-r--r--lisp/progmodes/idlw-shell.el19
-rw-r--r--lisp/progmodes/idlwave.el1
-rw-r--r--lisp/progmodes/m4-mode.el11
-rw-r--r--lisp/progmodes/perl-mode.el1
-rw-r--r--lisp/progmodes/python.el9
-rw-r--r--lisp/recentf.el9
-rw-r--r--lisp/replace.el3
-rw-r--r--lisp/simple.el51
-rw-r--r--lisp/startup.el10
-rw-r--r--lisp/subr.el78
-rw-r--r--lisp/t-mouse.el2
-rw-r--r--lisp/term.el54
-rw-r--r--lisp/term/xterm.el43
-rw-r--r--lisp/textmodes/bibtex.el64
-rw-r--r--lisp/textmodes/flyspell.el6
-rw-r--r--lisp/textmodes/org.el9
-rw-r--r--lisp/textmodes/reftex-auc.el1
-rw-r--r--lisp/textmodes/reftex-cite.el1
-rw-r--r--lisp/textmodes/reftex-dcr.el2
-rw-r--r--lisp/textmodes/reftex-global.el1
-rw-r--r--lisp/textmodes/reftex-index.el1
-rw-r--r--lisp/textmodes/reftex-parse.el2
-rw-r--r--lisp/textmodes/reftex-ref.el1
-rw-r--r--lisp/textmodes/reftex-sel.el1
-rw-r--r--lisp/textmodes/reftex-toc.el1
-rw-r--r--lisp/textmodes/reftex-vars.el1
-rw-r--r--lisp/textmodes/reftex.el1
-rw-r--r--lisp/tmm.el90
-rw-r--r--lisp/url/ChangeLog31
-rw-r--r--lisp/url/url-cookie.el18
-rw-r--r--lisp/url/url-http.el58
-rw-r--r--lisp/url/url-parse.el36
-rw-r--r--lisp/url/url-vars.el6
-rw-r--r--lisp/vc-arch.el15
-rw-r--r--lisp/vc-rcs.el9
-rw-r--r--lisp/view.el4
-rw-r--r--lisp/whitespace.el8
-rw-r--r--lisp/wid-edit.el2
-rw-r--r--lisp/woman.el113
-rw-r--r--lisp/xt-mouse.el28
170 files changed, 5134 insertions, 2946 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 47b9b292aa7..9fc26846057 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,694 @@
+2007-04-17 Glenn Morris <rgm@gnu.org>
+
+ * calendar/cal-dst.el (calendar-dst-find-startend): If YEAR cannot
+ be encoded, fall back to current year.
+
+2007-04-14 Kevin Ryde <user42@zip.com.au>
+
+ * arc-mode.el (archive-lzh-summarize): Only apply the "downcase if
+ all upcase" rule to OS-ID 0 "generic". Always downcase for OS-ID
+ M "MSDOS".
+
+2007-04-16 Chong Yidong <cyd@stupidchicken.com>
+
+ * progmodes/python.el (python-end-of-block): Avoid looping forever
+ if python-next-statement fails.
+
+2007-04-16 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de>
+
+ * textmodes/bibtex.el (bibtex-entry-field-alist): Use defcustom.
+
+2007-04-16 Dan Nicolaescu <dann@ics.uci.edu>
+
+ * progmodes/perl-mode.el (perl-indent-level): Mark as safe local var.
+ * progmodes/cperl-mode.el (cperl-indent-level): Likewise.
+
+2007-04-15 Jay Belanger <belanger@truman.edu>
+
+ * calc/calc.el (calc-version): New function.
+ (calc-trail-mode): Shorten the title.
+
+2007-04-15 Chong Yidong <cyd@stupidchicken.com>
+
+ * mail/footnote.el (footnote-style): Clarify docstring to state
+ that customizing this only applies to future footnotes.
+
+2007-04-15 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de>
+
+ * textmodes/bibtex.el (bibtex-field-list): Use functionp.
+ (bibtex-make-field): Check that INIT is a string. Use functionp.
+
+2007-04-14 Glenn Morris <rgm@gnu.org>
+
+ * complete.el (PC-goto-end): New buffer-local variable.
+ (PC-do-completion-end): Make buffer-local.
+ (partial-completion-mode) <choose-completion-string-functions>:
+ Do not go to the end of the minibuffer if PC-goto-end is non-nil.
+ (PC-do-completion): New optional fourth argument GOTO-END. Add a
+ doc string. Set PC-goto-end for choose-completion.
+ (PC-lisp-complete-symbol): Pass non-nil GOTO-END arg to
+ PC-do-completion.
+
+ * textmodes/bibtex.el (bibtex-insert-kill): Pass non-nil NODELIM
+ arg to bibtex-make-field.
+ (bibtex-make-field): Add optional fourth arg NODELIM. Insert
+ delimiters around INIT unless this arg is non-nil.
+
+2007-04-14 Nick Roberts <nickrob@snap.net.nz>
+
+ * tmm.el (tmm-get-keybind): Use copy-sequence to ensure that the
+ global map isn't modified
+
+2007-04-14 Glenn Morris <rgm@gnu.org>
+
+ * calendar/appt.el (appt-disp-window): Do not split small windows.
+ Suggested by Jeff Miller <jmiller@cablespeed.com>.
+
+2007-04-13 Chong Yidong <cyd@stupidchicken.com>
+
+ * progmodes/compile.el (compilation-start): Revert 2007-03-25
+ change.
+
+ * files.el: Ditto.
+
+2007-04-13 Juanma Barranquero <lekktu@gmail.com>
+
+ * cus-edit.el (minibuffer, auto-save): Fix typos in docstrings.
+
+ * term.el (term-buffer-maximum-size, term-exec, term-escape-char)
+ (term-set-escape-char, term-termcap-format, term-get-old-input-default)
+ (term-skip-prompt, term-send-string, term-send-region, term-pager-page)
+ (term-pager-help): Fix typos in docstrings.
+
+ * wid-edit.el (widget-documentation): Fix typo in docstring.
+
+ * progmodes/ebnf2ps.el (ebnf-insert-style, ebnf-merge-style):
+ Fix typos in error messages.
+
+2007-04-13 Martin Rudalics <rudalics@gmx.at>
+
+ * emacs-lisp/edebug.el (edebug-pop-to-buffer): Don't select
+ window marked as dedicated.
+
+ * mail/footnote.el (footnote-latin-string): New variable.
+ (footnote-latin-regexp): Redefined as regexp alternative.
+ (Footnote-latin): Use footnote-latin-string instead of
+ footnote-latin-regexp.
+
+2007-04-13 Glenn Morris <rgm@gnu.org>
+
+ * tmm.el (tmm-get-keybind): Use car-safe to avoid errors with
+ inherited keymaps.
+
+2007-04-12 Chong Yidong <cyd@stupidchicken.com>
+
+ * outline.el (outline-get-next-sibling): Clarify docstring.
+ (outline-get-last-sibling): Handle case where we are at the first
+ heading. Clarify docstring.
+
+2007-04-12 Nick Roberts <nickrob@snap.net.nz>
+
+ * progmodes/gud.el (gud-minor-mode-map): Make go button same
+ length as stop button to lessen flicker.
+ (jdb): Add gud-print.
+ (gud-find-expr): Jdb prints the expression with the value, so
+ don't insert it in the output.
+
+2007-04-11 Jason Rumney <jasonr@gnu.org>
+
+ * dnd.el (dnd-get-local-file-name): Decode both upper and lower
+ case hex. Do not try to decode non-hex letters.
+
+2007-04-11 Markus Triska <markus.triska@gmx.at>
+
+ * emacs-lisp/byte-opt.el (byte-optimize-backward-char)
+ (byte-optimize-backward-word): Remove (move to bytecomp.el).
+ (byte-optimize-form-code-walker): Evaluate pure function calls if
+ possible.
+ (byte-optimize-all-constp): New function.
+
+ * emacs-lisp/bytecomp.el (byte-compile-char-before): Improve
+ numeric argument case.
+ (byte-compile-backward-char, byte-compile-backward-word): New
+ functions, performing rewriting previously done in byte-opt.el.
+ Fix their "Fixme" item (restriction to numeric arguments).
+
+2007-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * desktop.el (desktop-save, desktop-create-buffer): Replace mapcar with
+ dolist.
+ (after-init-hook): Don't quote lambda.
+ (desktop-first-buffer): Don't wrap it in eval-when-compile.
+ (desktop-internal-v2s): Remove unused var `el'.
+ (desktop-buffer-major-mode, desktop-buffer-locals): Move out of
+ desktop-restore-file-buffer.
+ (desktop-buffer-ok-count, desktop-buffer-fail-count): Move out of
+ desktop-create-buffer.
+
+2007-04-10 Chong Yidong <cyd@stupidchicken.com>
+
+ * woman.el (woman-decode-buffer): Postpone macro-set check...
+ (woman-decode-region): ...to here.
+
+2007-04-10 Thien-Thi Nguyen <ttn@gnu.org>
+
+ * startup.el (tty-handle-args): Use %S to log ARGS.
+
+2007-04-10 Glenn Morris <rgm@gnu.org>
+
+ * dframe.el (dframe-frame-mode): Do not set auto-show-mode, since
+ it is obsolete and has no effect.
+
+ * dos-w32.el (default-buffer-file-type): Add defvar to quieten
+ byte-compiler.
+
+ * progmodes/cperl-mode.el (cperl-mode): Remove unnecessary call to
+ obsolete function make-local-hook.
+
+ * progmodes/dcl-mode.el (top-level): Move (require 'tempo) to
+ start to quieten byte-compiler.
+
+2007-04-10 Markus Triska <markus.triska@gmx.at>
+
+ * emacs-lisp/byte-opt.el (byte-optimize-char-before): Remove (move
+ to bytecomp.el as byte-compile-char-before).
+ * emacs-lisp/bytecomp.el (byte-compile-char-before):
+ New function (modified replacement for byte-optimize-char-before in
+ byte-opt.el).
+
+2007-04-09 Alan Mackenzie <acm@muc.de>
+
+ * startup.el (inhibit-splash-screen): Emphatically state that it
+ can't be set in site-start.el.
+
+2007-04-09 Masatake YAMATO <jet@gyve.org>
+
+ * progmodes/cc-subword.el (c-capitalize-subword): More closely
+ mimic the behavior of `capitalize-word'. Do not move point with a
+ negative argument. Based on tiny change by Paul Curry.
+
+2007-04-09 Paul Curry <dashteacup@gmail.com> (tiny change)
+
+ * progmodes/cc-subword.el (c-downcase-subword, c-upcase-subword):
+ Don't move point if ARG is negative.
+
+2007-04-09 Alan Mackenzie <acm@muc.de>
+
+ Changes to make `narrow-to-defun' and `mark-defun' work properly
+ in CC Mode:
+
+ * progmodes/cc-defs.el (c-beginning-of-defun-1):
+ * progmodes/cc-cmds.el (c-beginning-of-defun, c-end-of-defun):
+ Bind beginning/end-of-defun-function to nil around calls to
+ beginning/end-of-defun.
+
+ * progmodes/cc-langs.el (beginning-of-defun-function)
+ (end-of-defun-function): New c-lang-setvar's.
+
+ * progmodes/cc-awk.el (c-awk-beginning-of-defun): Add "(or arg
+ (setq arg 1))" to enable non-interactive call.
+
+2007-04-09 Eli Zaretskii <eliz@gnu.org>
+
+ * simple.el (set-mark-command): Doc fix.
+
+2007-04-09 Nick Roberts <nickrob@snap.net.nz>
+
+ * progmodes/gud.el (gdb): Restore existing session if user
+ tries to start a second one in graphical mode.
+
+2007-04-08 Martin Rudalics <rudalics@gmx.at>
+
+ * cus-start.el <scroll-preserve-screen-position>: Add choices.
+
+2007-04-08 Johan Bockg,Ae(Brd <bojohan+news@dd.chalmers.se>
+
+ * term/xterm.el (terminal-init-xterm): Fix key definitions.
+ Add binding for C-M-SPC.
+
+2007-04-08 Richard Stallman <rms@gnu.org>
+
+ * pcomplete.el (pcomplete-read-event): One single definition,
+ and not a defsubst.
+
+2007-04-08 Chong Yidong <cyd@stupidchicken.com>
+
+ * progmodes/cc-cmds.el (c-end-of-defun): Tidy up, to eliminate
+ byte-compiler warning "value unused".
+
+2007-04-08 Andreas Schwab <schwab@suse.de>
+
+ * term/xterm.el (terminal-init-xterm): Add bindings for keypad keys.
+
+2007-04-07 Glenn Morris <rgm@gnu.org>
+
+ * calendar/calendar.el (diary-font-lock-keywords, diary-live-p):
+ Autoload these functions.
+ (diary-date-forms): Add a custom :set form.
+
+ * calendar/diary-lib.el (diary-set-maybe-redraw): Move definition
+ before first use.
+ (diary-font-lock-keywords): New function with old code for
+ initialization of variable of same name.
+
+2007-04-07 David Hansen <david.hansen@gmx.net> (tiny change)
+
+ * progmodes/cc-cmds.el (c-electric-paren): Fix space-before-funcall
+ clean-up: only insert space when on identifier, etc.
+
+2007-04-07 Chong Yidong <cyd@stupidchicken.com>
+
+ * progmodes/grep.el (grep-find-use-xargs): Rewrite docstring.
+
+ * net/tls.el (open-tls-stream): Properly handle case where there
+ is no associated buffer.
+
+2007-04-07 Glenn Morris <rgm@gnu.org>
+
+ * ffap.el (ffap-file-at-point): Lower the priority of the
+ ffap-ftp-sans-slash-regexp check.
+
+2007-04-06 Alan Mackenzie <acm@muc.de>
+
+ Fix fontification of labels, and other things with ":".
+
+ * progmodes/cc-engine.el (c-forward-label): The function now
+ returns 'goto-target, 'qt-2kwds-colon, 'qt-1kwd-colon, as well as
+ the former t.
+
+ * progmodes/cc-fonts.el (c-font-lock-declarations): Interpret the
+ new return code from c-forward-label, fontifying tokens properly.
+ Add some general comments throughout the file.
+
+2007-04-06 Chong Yidong <cyd@stupidchicken.com>
+
+ * textmodes/flyspell.el (flyspell-duplicate, flyspell-incorrect):
+ Revert 2006-01-27 change.
+
+ * diff-mode.el (diff-mode): Revert 2007-03-04 change.
+
+ * menu-bar.el (menu-bar-tools-menu): Revert 2003-07-25 change.
+
+ * desktop.el (desktop-create-buffer, desktop-save):
+ Revert 2004-11-12 change for lack of copyright papers.
+
+ * dired-x.el (dired-guess-shell-case-fold-search): Delete var.
+ (dired-guess-default): Respect case.
+
+ * isearch.el (isearch-forward): Revert 1998-08-26 doc change.
+
+ * emacs-lisp/byte-opt.el (byte-optimize-pure-func): Remove function;
+ was originally checked in as byte-optimize-concat on 1997-11-02.
+
+ * mail/sendmail.el (mail-text, mail-mode): Revert extant pieces of
+ 1995-05-19 doc changes.
+
+2007-04-06 Kim F. Storm <storm@cua.dk>
+
+ * loadhist.el (read-feature): Reimplement. New optional arg LOADED-P.
+ (unload-feature): Update interactive spec accordingly.
+
+ * progmodes/grep.el (grep-program): Remove commentary about zgrep.
+
+2007-04-06 John Paul Wallington <jpw@pobox.com>
+
+ * subr.el (with-case-table): Use `make-symbol' to avoid variable
+ capture. Restore the table in the same buffer.
+
+ * font-lock.el (lisp-font-lock-keywords-2): Add `with-case-table'.
+
+2007-04-05 Chong Yidong <cyd@stupidchicken.com>
+
+ * emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
+ Print entire form.
+
+2007-04-05 Nick Roberts <nickrob@snap.net.nz>
+
+ * progmodes/gdb-ui.el (breakpoint-disabled): Tweak face (again)
+ for low-color displays.
+
+2007-04-05 Glenn Morris <rgm@gnu.org>
+
+ * play/5x5.el, play/animate.el, play/dissociate.el, play/doctor.el,
+ * play/gomoku.el, play/landmark.el, play/tetris.el, play/zone.el:
+ Seed random number generator on loading.
+
+ * emacs-lisp/authors.el (top-level): Provide self.
+
+ * play/animate.el (top-level): Provide self.
+
+2007-04-04 Alan Mackenzie <acm@muc.de>
+
+ * progmodes/cc-vars.el (c-special-indent-hook): Amend doc-string
+ to mention c-syntactic-indentation.
+
+2007-04-04 Chong Yidong <cyd@stupidchicken.com>
+
+ * subr.el (with-case-table): New macro.
+
+ * international/mule.el (ascii-case-table): New var.
+
+ * mail/smtpmail.el (smtpmail-via-smtp): Use ascii-case-table when
+ downcasing.
+
+2007-04-03 Nick Roberts <nickrob@snap.net.nz>
+
+ * progmodes/gud.el (gud-minor-mode-map): Simplify.
+
+ * t-mouse.el (t-mouse-make-event-element): Don't use the left edge
+ of the window if we're outside it e.g menu-bar.
+
+ * xt-mouse.el (xterm-mouse-event): Don't use the left edge of the
+ window if we're outside it e.g menu-bar.
+
+2007-04-03 Eli Zaretskii <eliz@gnu.org>
+
+ * mail/rmail.el (rmail-convert-to-babyl-format): Don't try to
+ decode base-64 encoded body if its content-type is something other
+ than text/* or message/*.
+
+2007-04-03 Juanma Barranquero <lekktu@gmail.com>
+
+ * simple.el (activate-mark-hook): Fix typo in docstring.
+
+2007-04-03 Nick Roberts <nickrob@snap.net.nz>
+
+ * tmm.el (tmm-c-prompt): Initialize.
+ (tmm-menubar): Deal with extended menu-items at top level.
+ (tmm-get-keybind): Handle bindings redefined/undefined locally.
+ (tmm-prompt): Handle visibility of top level menu-items.
+
+ * progmodes/gud.el (gud-menu-map): Simplify.
+ (gud-minor-mode-map): Add tool-bar like bindings to the text mode
+ menubar.
+
+2007-04-02 Chong Yidong <cyd@stupidchicken.com>
+
+ * mail/smtpmail.el (smtpmail-via-smtp): Revert last change.
+
+ * comint.el (comint-send-input): Widen the buffer first.
+
+ * info.el (Info-fontify-maximum-menu-size): Revert to 100000.
+
+2007-04-01 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Only obey
+ emacs-lisp-docstring-fill-column in emacs-lisp-mode.
+
+ * newcomment.el (comment-search-forward): Discard comment starters
+ before point.
+
+2007-04-01 Guanpeng Xu <herberteuler@hotmail.com>
+
+ * mouse.el (mouse-set-secondary): Update mouse-secondary-overlay.
+
+2007-04-01 Chong Yidong <cyd@stupidchicken.com>
+
+ * mail/smtpmail.el (smtpmail-via-smtp): Use standard case table
+ when downcasing.
+
+ * button.el (previous-button): Rewrite to account for adjacent buttons.
+
+2007-04-01 J.D. Smith <jdsmith@as.arizona.edu>
+
+ * progmodes/idlwave.el (idlwave-auto-fill):
+ Revert paragraph-separate change.
+
+ * progmodes/idlw-shell.el (idlwave-shell-break-in):
+ Simplify module calc.
+ (idlwave-shell-set-bp-in-module): Compute module.
+
+2007-03-31 Glenn Morris <rgm@gnu.org>
+
+ * emacs-lisp/timer.el (run-at-time): Doc fix.
+
+ * emacs-lisp/warnings.el (display-warning): If we create the
+ buffer displaying the warning, disable undo there.
+
+2007-03-31 Michael Albinus <michael.albinus@gmx.de>
+
+ * net/tramp.el (tramp-register-file-name-handler)
+ (tramp-register-completion-file-name-handler): New defsubst,
+ derived from `tramp-register-file-name-handlers'. The split is
+ necessary because Tramp's file name handlers must be registered at
+ different startup places.
+
+2007-03-31 Chong Yidong <cyd@stupidchicken.com>
+
+ * progmodes/hideshow.el (turn-off-hideshow): New function.
+ (hs-minor-mode): Use it instead of a lambda expression in
+ change-major-mode-hook.
+
+2007-03-31 David Kastrup <dak@gnu.org>
+
+ * woman.el (woman-Cyg-to-Win): Don't convert cons cells
+ corresponding to MANPATH_MAP entries.
+ (woman-man.conf-path, woman-parse-man.conf): Doc fix.
+ (woman-parse-man.conf): Use more discriminating man.conf name.
+ (woman-parse-man.conf): Parse MANPATH_MAP entries.
+ (woman-manpath): Doc fix and type fix.
+ (woman-cached-data): Check for MANPATH_MAP entries.
+ (woman-expand-directory-path): Treat MANPATH_MAP entries.
+
+2007-03-31 Stuart Herring <herring@lanl.gov>
+
+ * emacs-lisp/sregex.el (sregexq): Doc fix.
+
+2007-03-31 Markus Triska <markus.triska@gmx.at>
+
+ * flymake.el (flymake-err-line-patterns): Doc fix.
+
+2007-03-30 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * info.el (info-tool-bar-map): Use "exit" for Info-exit.
+ Move to the right.
+
+2007-03-30 Alan Mackenzie <acm@muc.de>
+
+ * progmodes/cc-cmds.el (c-forward-to-nth-EOF-}): Fix EOB bug.
+
+2007-03-30 Thien-Thi Nguyen <ttn@gnu.org>
+
+ * emacs-lisp/ewoc.el (ewoc--insert-new-node): Take additional arg DLL.
+ Use it, passed in explicitly, instead of from the dynamic binding.
+ (ewoc-create, ewoc-enter-before): Update to use new call sequence.
+
+2007-03-30 Juanma Barranquero <lekktu@gmail.com>
+
+ * simple.el (blink-matching-open): When in minibuffer, don't
+ search for a match inside the prompt.
+
+2007-03-30 Nick Roberts <nickrob@snap.net.nz>
+
+ * tmm.el (tmm-menubar): Select the right menu item with the mouse.
+ (tmm-prompt): Don't make the mouse user select the first menu
+ item twice.
+
+2007-03-30 Chong Yidong <cyd@stupidchicken.com>
+
+ * eshell/esh-proc.el (eshell/kill): Tweak regexp to recognize
+ SIGUSR1 and SIGUSR2.
+
+2007-03-29 Kim F. Storm <storm@cua.dk>
+
+ * ido.el (ido-read-internal): When reading file or dir, only override
+ minibuffer-local-filename-completion-map, otherwise only override
+ minibuffer-local-completion-map.
+
+2007-03-29 Glenn Morris <rgm@gnu.org>
+
+ * complete.el (partial-completion-mode): Set PC-do-completion-end
+ to nil after use.
+ (PC-lisp-complete-symbol): Create and use a marker at `end',
+ rather than using point-marker.
+
+2007-03-28 Chong Yidong <cyd@stupidchicken.com>
+
+ * simple.el (next-error-highlight): Doc fix.
+ (compose-mail): Revert 2007-03-19 change.
+
+2007-03-28 Richard Stallman <rms@gnu.org>
+
+ * emacs-lisp/edebug.el (edebug-display): Don't go to
+ edebug-outside-buffer if it is dead.
+
+2007-03-28 Juanma Barranquero <lekktu@gmail.com>
+
+ * view.el (view-mode): Fix typos in docstring.
+
+2007-03-28 Stephen Berman <Stephen.Berman@gmx.net>
+
+ * recentf.el (recentf-save-file): Add a custom :set function.
+
+2007-03-28 Glenn Morris <rgm@gnu.org>
+
+ * complete.el (PC-do-completion-end): New variable.
+ (partial-completion-mode) <choose-completion-string-functions>:
+ Use PC-do-completion-end in the non-minibuffer case to replace the
+ correct amount of text.
+ (PC-do-completion): Set PC-do-completion-end for c-c-s-f.
+ (PC-lisp-complete-symbol): Give marker the after-insertion type,
+ to deal with improvements inserted after point.
+
+2007-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * button.el (make-text-button): Add explicit `button' property.
+ (default-button): Don't put a `button' property on it.
+
+ * progmodes/python.el (python-mode): Skip comments when parsing.
+
+ * vc-arch.el (vc-with-current-file-buffer): New macro.
+ (vc-arch-file-source-p): Use it to avoid infloop.
+
+2007-03-28 David Hansen <david.hansen@gmx.net> (tiny change)
+
+ * emacs-lisp/lisp.el (lisp-complete-symbol):
+ Fix call to get-buffer-window to find windows in other frames.
+
+2007-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * comint.el (comint-proc-query, comint-dynamic-list-completions):
+ Fix calls to get-buffer-window to find windows in other frames.
+ Reported by David Hansen <david.hansen@gmx.net>.
+
+2007-03-27 Kevin Ryde <user42@zip.com.au>
+
+ * info.el (Info-display-images-node): On a text-only terminal,
+ show the "text" or "alt" parts of the image blobs.
+
+2007-03-27 Glenn Morris <rgm@gnu.org>
+
+ * complete.el (PC-do-completion): Compute completion-base-size in
+ the non-filename case, rather than setting to nil.
+ (PC-lisp-complete-end): New variable.
+ (PC-lisp-complete-symbol): Use PC-lisp-complete-end to store the
+ original end in a series of consecutive invocations.
+
+ * calendar/calendar.el (calendar-mode-hook): Declare it.
+
+ * calendar/diary-lib.el (diary-live-p): Do not check for
+ diary-selective-display.
+
+2007-03-26 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * replace.el (occur-next-error): *Occur* might not be displayed in the
+ selected frame. Reported by David Hansen <david.hansen@gmx.net>.
+
+2007-03-26 Richard Stallman <rms@gnu.org>
+
+ * textmodes/flyspell.el (flyspell-large-region):
+ Use ispell-call-process-region.
+
+2007-03-26 Johan Bockg,Ae(Brd <bojohan+sf@dd.chalmers.se>
+
+ * emacs-lisp/bytecomp.el (byte-compile-file-form-defmumble):
+ Use prin1 instead of princ.
+
+2007-03-25 Chong Yidong <cyd@stupidchicken.com>
+
+ * faces.el (face-set-after-frame-default): Revert 2007-03-10 change.
+ Merge in X resources before global face.
+
+ * progmodes/compile.el (compilation-start): Save compilation-directory
+ rather than default-directory as local var.
+ (compilation-directory): Mark as safe local var.
+
+ * files.el: Don't mark default-directory as a safe local var.
+
+2007-03-25 Alan Mackenzie <acm@muc.de>
+
+ * progmodes/cc-mode.el (c-before-change): Fix BOB bug.
+ * progmodes/cc-engine.el: Fix typo.
+
+2007-03-25 Juri Linkov <juri@jurta.org>
+
+ * compare-w.el (compare-windows): Rename customization group
+ `compare-w' to `compare-windows'.
+ (compare-windows-whitespace, compare-ignore-whitespace)
+ (compare-ignore-case, compare-windows-sync)
+ (compare-windows-sync-string-size, compare-windows-recenter)
+ (compare-windows-highlight, compare-windows): Change group name in
+ the `group' tag from `compare-w' to `compare-windows'.
+ (compare-windows-sync): Add option `nil' for no sync. Doc fix.
+
+2007-03-24 Markus Triska <markus.triska@gmx.at>
+
+ * expand.el: Change example to always enable abbrev-mode,
+ and remove redundant `function'.
+ (expand-abbrev-hook): Add autoload cookie.
+
+2007-03-24 Ryan Yeske <rcyeske@gmail.com>
+
+ * emacs-lisp/testcover.el (testcover-start, testcover-end)
+ (testcover-mark-all, testcover-unmark-all): Add prompts to
+ interactive specs.
+
+2007-03-24 Jason Rumney <jasonr@gnu.org>
+
+ * autorevert.el (find-file-hook, auto-revert-tail-mode):
+ Use file size in bytes for auto-revert-tail-pos not characters.
+
+2007-03-24 Thien-Thi Nguyen <ttn@gnu.org>
+
+ * vc-rcs.el (vc-rcs-annotate-command):
+ Set text property :vc-annotate-prefix on the annotation text.
+ (vc-rcs-annotate-time): Instead of searching for ": ",
+ search for end of text propertized with :vc-annotate-prefix.
+
+2007-03-24 Martin Rudalics <rudalics@gmx.at>
+
+ * whitespace.el (top level): Remove calls putting
+ permanent-local nil property since these are no-ops.
+
+ * man.el (Man-support-local-filenames): Assure that
+ default-directory exists when doing call-process.
+
+2007-03-23 David Vazquez <xeos00@gmail.com> (tiny change)
+
+ * progmodes/m4-mode.el (m4-m4-buffer, m4-m4-region):
+ Fix omission bug: Use m4-program-options to construct shell command.
+
+2007-03-23 David Kastrup <dak@gnu.org>
+
+ * progmodes/cc-mode.el (c-make-emacs-variables-local):
+ Use `mapcar' rather than `mapcan' to silence compiler warning.
+
+2007-03-22 Ralf Angeli <angeli@caeruleus.net>
+
+ * textmodes/reftex.el, textmodes/reftex-vars.el,
+ * textmodes/reftex-toc.el, textmodes/reftex-sel.el,
+ * textmodes/reftex-ref.el, textmodes/reftex-parse.el,
+ * textmodes/reftex-index.el, textmodes/reftex-global.el,
+ * textmodes/reftex-dcr.el, textmodes/reftex-cite.el,
+ * textmodes/reftex-auc.el: Add maintainer address.
+
+2007-03-22 Carsten Dominik <dominik@science.uva.nl>
+
+ * textmodes/org.el (org-agenda-mode, org-table-edit-formulas):
+ Make sure that `global-font-lock-mode' does not turn on font-lock
+ in these buffers.
+
+2007-03-21 Kim F. Storm <storm@cua.dk>
+
+ * xt-mouse.el (xt-mouse-epoch): New variable.
+ (xterm-mouse-event): Use float-time.
+
+2007-03-21 Nick Roberts <nickrob@snap.net.nz>
+
+ * xt-mouse.el (xterm-mouse-event): Compute a timestamp using
+ current-time.
+
+2007-03-21 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * complete.el (read-file-name-internal): Don't add the final > if the
+ completion is not finished (re-application of this patch, which was
+ accidentally undone by Eli).
+
+2007-03-21 Chong Yidong <cyd@stupidchicken.com>
+
+ * emulation/viper.el (viper-non-hook-settings): Handle mouse
+ clicks in describe-key and describe-key-briefly advice a little better.
+
2007-03-21 Juanma Barranquero <lekktu@gmail.com>
* server.el (server-process-filter): Cancel any pending isearch.
@@ -71,8 +762,8 @@
2007-03-19 Martin Rudalics <rudalics@gmx.at>
- * font-lock.el (lisp-font-lock-keywords-1): Highlight
- define-globalized-minor-mode as a keyword.
+ * font-lock.el (lisp-font-lock-keywords-1):
+ Highlight define-globalized-minor-mode as a keyword.
2007-03-19 Kim F. Storm <storm@cua.dk>
@@ -110,8 +801,7 @@
2007-03-18 Detlev Zundel <dzu@gnu.org>
* emacs-lisp/re-builder.el (reb-update-overlays): Do not mark
- zero-width regexps as invalid but rather at least count them
- correctly.
+ zero-width regexps as invalid but rather at least count them correctly.
2007-03-18 Thien-Thi Nguyen <ttn@gnu.org>
@@ -143,8 +833,8 @@
2007-03-17 Chong Yidong <cyd@stupidchicken.com>
- * simple.el (line-move-1): Respect
- `inhibit-line-move-field-capture' property.
+ * simple.el (line-move-1):
+ Respect `inhibit-line-move-field-capture' property.
2007-03-13 Chong Yidong <cyd@stupidchicken.com>
@@ -157,7 +847,7 @@
2007-03-12 Lawrence Mitchell <wence@gmx.li> (tiny change)
* tempo.el (tempo-insert): Deal with 'r> if it appears
- specified with a prompt argument.
+ specified with a prompt argument.
2007-03-12 Carsten Dominik <dominik@science.uva.nl>
@@ -403,7 +1093,7 @@
* emacs-lisp/lisp-mode.el (calculate-lisp-indent):
Redo previous change.
-2007-03-04 Kevin Rodgers <kevin.d.rodgers@gmail.com> (tiny change)
+2007-03-04 Kevin Rodgers <kevin.d.rodgers@gmail.com> (tiny change)
* diff-mode.el (diff-mode): Doc fix.
@@ -493,7 +1183,7 @@
* ps-print.el: Replace (defvar VAR nil) by (defvar VAR).
(ps-setup): Print which Emacsen is running ps-print package.
-2007-03-01 Stuart Herring <herring@lanl.gov> (tiny change)
+2007-03-01 Stuart Herring <herring@lanl.gov>
* files.el (set-auto-mode-0): Use `indirect-function'.
(hack-one-local-variable): Don't reapply current major mode.
@@ -537,7 +1227,7 @@
* help.el (where-is): Fail gracefully when not passed a command.
-2007-02-28 Stuart Herring <herring@lanl.gov> (tiny change)
+2007-02-28 Stuart Herring <herring@lanl.gov>
* find-lisp.el (find-lisp-default-directory-predicate):
Fix bug: Do symlink check on expanded filename.
@@ -1437,7 +2127,7 @@
2007-01-27 Guanpeng Xu <herberteuler@hotmail.com>
* add-log.el (add-log-current-defun): Skip the semicolon ``;'' for
- enum/union/struct/class definition.
+ enum/union/struct/class definition.
Revert change to call `forward-sexp' multiple times.
2007-01-27 Chong Yidong <cyd@stupidchicken.com>
@@ -2044,7 +2734,7 @@
* international/mule-cmds.el (select-safe-coding-system-interactively):
Fix message.
-2006-12-30 Kevin Rodgers <kevin.d.rodgers@gmail.com> (tiny change)
+2006-12-30 Kevin Rodgers <kevin.d.rodgers@gmail.com> (tiny change)
* files.el (backup-buffer): Show entire backup file name in msg.
@@ -2501,20 +3191,20 @@
2006-12-09 Martin Rudalics <rudalics@gmx.at>
* wdired.el (wdired-change-to-wdired-mode, wdired-finish-edit)
- (wdired-search-and-rename): Simplify code.
+ (wdired-search-and-rename): Simplify code.
(wdired-preprocess-files, wdired-preprocess-perms): Make
- read-only property of preceding character rear-nonsticky to
- avoid that it can be modified. Put old-name and old-link
- properties on character preceding name and replace
- put-text-property by add-text-properties.
- (wdired-get-filename, wdired-get-previous-link): Get old-name
- and old-link properties from character preceding name and
- simplify code.
+ read-only property of preceding character rear-nonsticky to
+ avoid that it can be modified. Put old-name and old-link
+ properties on character preceding name and replace
+ put-text-property by add-text-properties.
+ (wdired-get-filename, wdired-get-previous-link): Get old-name
+ and old-link properties from character preceding name and
+ simplify code.
(wdired-preprocess-perms, wdired-set-bit, wdired-toggle-bit)
- (wdired-perms-to-number): Make local-map property
- rear-nonsticky to avoid that text following permissions may be
- modified. Use add-text-properties instead of put-text-property
- when changing a permission bit.
+ (wdired-perms-to-number): Make local-map property
+ rear-nonsticky to avoid that text following permissions may be
+ modified. Use add-text-properties instead of put-text-property
+ when changing a permission bit.
(wdired-change-to-dired-mode): Remove stickiness properties.
2006-12-09 Juanma Barranquero <lekktu@gmail.com>
@@ -12650,7 +13340,7 @@
English aspell dictionary is installed, use the first entry of
ispell-dictionary-alist-1.
-2006-01-27 Kevin Rodgers <ihs_4664@yahoo.com> (tiny change)
+2006-01-27 Kevin Rodgers <ihs_4664@yahoo.com> (tiny change)
* textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate):
Doc fix.
@@ -14672,7 +15362,7 @@
(hi-lock-find-patterns, hi-lock-font-lock-hook):
Replace hi-lock-buffer-mode with hi-lock-mode.
-2005-12-10 Kevin Rodgers <ihs_4664@yahoo.com> (tiny change)
+2005-12-10 Kevin Rodgers <ihs_4664@yahoo.com> (tiny change)
* emacs-lisp/lisp.el (lisp-complete-symbol): Regenerate the
completion list, even after a partial completion has been
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el
index 1b0f3a3d584..8630d3e8b06 100644
--- a/lisp/arc-mode.el
+++ b/lisp/arc-mode.el
@@ -1415,7 +1415,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
(time2 (archive-l-e (+ p 17) 2)) ;and UNIX format in level 2 header.)
(hdrlvl (char-after (+ p 20))) ;header level
thsize ;total header size (base + extensions)
- fnlen efnname fiddle ifnname width p2
+ fnlen efnname osid fiddle ifnname width p2
neh ;beginning of next extension header (level 1 and 2)
mode modestr uid gid text dir prname
gname uname modtime moddate)
@@ -1474,7 +1474,22 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
(setq thsize (- neh p))))
(if (= hdrlvl 0) ;total header size
(setq thsize hsize))
- (setq fiddle (if efnname (string= efnname (upcase efnname))))
+ ;; OS ID field not present in level 0 header, use code 0 "generic"
+ ;; in that case as per lha program header.c get_header()
+ (setq osid (cond ((= hdrlvl 0) 0)
+ ((= hdrlvl 1) (char-after (+ p 22 fnlen 2)))
+ ((= hdrlvl 2) (char-after (+ p 23)))))
+ ;; Filename fiddling must follow the lha program, otherwise the name
+ ;; passed to "lha pq" etc won't match (which for an extract silently
+ ;; results in no output). As of version 1.14i it goes from the OS ID,
+ ;; - For 'M' MSDOS: msdos_to_unix_filename() downcases always, and
+ ;; converts "\" to "/".
+ ;; - For 0 generic: generic_to_unix_filename() downcases if there's
+ ;; no lower case already present, and converts "\" to "/".
+ ;; - For 'm' MacOS: macos_to_unix_filename() changes "/" to ":" and
+ ;; ":" to "/"
+ (setq fiddle (cond ((= ?M osid) t)
+ ((= 0 osid) (string= efnname (upcase efnname)))))
(setq ifnname (if fiddle (downcase efnname) efnname))
(setq prname (if dir (concat dir ifnname) ifnname))
(setq width (if prname (string-width prname) 0))
diff --git a/lisp/autorevert.el b/lisp/autorevert.el
index bd9d6fe76e8..170ca4b88c2 100644
--- a/lisp/autorevert.el
+++ b/lisp/autorevert.el
@@ -278,7 +278,7 @@ the list of old buffers.")
(add-hook 'find-file-hook
(lambda ()
(set (make-local-variable 'auto-revert-tail-pos)
- (save-restriction (widen) (1- (point-max))))))
+ (nth 7 (file-attributes buffer-file-name)))))
;; Functions:
@@ -341,7 +341,7 @@ Use `auto-revert-mode' for changes other than appends!"
(add-hook 'before-save-hook (lambda () (auto-revert-tail-mode 0)) nil t)
(or (local-variable-p 'auto-revert-tail-pos) ; don't lose prior position
(set (make-local-variable 'auto-revert-tail-pos)
- (save-restriction (widen) (1- (point-max)))))
+ (nth 7 (file-attributes buffer-file-name))))
;; let auto-revert-mode set up the mechanism for us if it isn't already
(or auto-revert-mode
(let ((auto-revert-tail-mode t))
diff --git a/lisp/button.el b/lisp/button.el
index d3c4cd8ea9e..423aef5f78f 100644
--- a/lisp/button.el
+++ b/lisp/button.el
@@ -89,9 +89,6 @@ Mode-specific keymaps may want to use this as their parent keymap.")
;; Prevent insertions adjacent to the text-property buttons from
;; inheriting its properties.
(put 'default-button 'rear-nonsticky t)
-;; Text property buttons don't have a `button' property of their own, so
-;; they inherit this.
-(put 'default-button 'button t)
;; A `category-symbol' property for the default button type
(put 'button 'button-category-symbol 'default-button)
@@ -316,7 +313,11 @@ Also see `insert-text-button'."
(setcar (cdr type-entry)
(button-category-symbol (car (cdr type-entry))))))
;; Now add all the text properties at once
- (add-text-properties beg end properties)
+ (add-text-properties beg end
+ ;; Each button should have a non-eq `button'
+ ;; property so that next-single-property-change can
+ ;; detect boundaries reliably.
+ (cons 'button (cons (list t) properties)))
;; Return something that can be used to get at the button.
beg)
@@ -365,16 +366,29 @@ instead of starting at the next button."
(next-button pos))))
(defun previous-button (pos &optional count-current)
- "Return the Nth button before position POS in the current buffer.
+ "Return the previous button before position POS in the current buffer.
If COUNT-CURRENT is non-nil, count any button at POS in the search,
instead of starting at the next button."
- (unless count-current
- (setq pos (previous-single-char-property-change pos 'button)))
- (and (> pos (point-min))
- (or (button-at (1- pos))
- ;; We must have originally been on a button, and are now in
- ;; the inter-button space. Recurse to find a button.
- (previous-button pos))))
+ (let ((button (button-at pos)))
+ (if button
+ (if count-current
+ button
+ ;; We started out on a button, so move to its start and look
+ ;; for the previous button boundary.
+ (setq pos (previous-single-char-property-change
+ (button-start button) 'button))
+ (let ((new-button (button-at pos)))
+ (if new-button
+ ;; We are in a button again; this can happen if there
+ ;; are adjacent buttons (or at bob).
+ (unless (= pos (button-start button)) new-button)
+ ;; We are now in the space between buttons.
+ (previous-button pos))))
+ ;; We started out in the space between buttons.
+ (setq pos (previous-single-char-property-change pos 'button))
+ (or (button-at pos)
+ (and (> pos (point-min))
+ (button-at (1- pos)))))))
;; User commands
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index 75e1c83df03..12b1dc6da02 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -1148,6 +1148,11 @@ If nil, selections displayed but ignored.")
(defvar calc-alg-map) ; Defined in calc-ext.el
+(defun calc-version ()
+ "Return version of this version of Calc."
+ (interactive)
+ (message (concat "Calc version " calc-version)))
+
(defun calc-mode ()
"Calculator major mode.
@@ -1258,8 +1263,7 @@ commands given here will actually operate on the *Calculator* stack."
(set (make-local-variable 'calc-main-buffer) buf))
(when (= (buffer-size) 0)
(let ((buffer-read-only nil))
- (insert (propertize (concat "Emacs Calculator v" calc-version
- " by Dave Gillespie\n")
+ (insert (propertize (concat "Emacs Calculator Trail\n")
'font-lock-face 'italic))))
(run-mode-hooks 'calc-trail-mode-hook))
diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el
index 82fa0e66dbf..02865c994e3 100644
--- a/lisp/calendar/appt.el
+++ b/lisp/calendar/appt.el
@@ -233,8 +233,8 @@ The variable `appt-audible' controls the audible reminder."
;; vars appt-msg-window and appt-visible are dropped.
(let ((appt-display-format
(if (eq appt-display-format 'ignore)
- (cond (appt-msg-window 'window)
- (appt-visible 'echo))
+ (cond (appt-msg-window 'window)
+ (appt-visible 'echo))
appt-display-format)))
(cond ((eq appt-display-format 'window)
(funcall appt-disp-window-function
@@ -457,7 +457,9 @@ NEW-TIME is a string giving the date."
(same-window-p (buffer-name appt-disp-buf)))
;; By default, split the bottom window and use the lower part.
(appt-select-lowest-window)
- (select-window (split-window)))
+ ;; Split the window, unless it's too small to do so.
+ (when (>= (window-height) (* 2 window-min-height))
+ (select-window (split-window))))
(switch-to-buffer appt-disp-buf))
(calendar-set-mode-line
(format " Appointment in %s minutes. %s " min-to-app new-time))
diff --git a/lisp/calendar/cal-china.el b/lisp/calendar/cal-china.el
index a838141db1c..7f6646dda64 100644
--- a/lisp/calendar/cal-china.el
+++ b/lisp/calendar/cal-china.el
@@ -43,12 +43,6 @@
;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold
;; and Nachum Dershowitz, Cambridge University Press (2001).
-;; Comments, corrections, and improvements should be sent to
-;; Edward M. Reingold Department of Computer Science
-;; (217) 333-6733 University of Illinois at Urbana-Champaign
-;; reingold@cs.uiuc.edu 1304 West Springfield Avenue
-;; Urbana, Illinois 61801
-
;;; Code:
(defvar date)
diff --git a/lisp/calendar/cal-coptic.el b/lisp/calendar/cal-coptic.el
index 23de17a16a8..b5cf96949c6 100644
--- a/lisp/calendar/cal-coptic.el
+++ b/lisp/calendar/cal-coptic.el
@@ -34,12 +34,6 @@
;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold
;; and Nachum Dershowitz, Cambridge University Press (2001).
-;; Comments, corrections, and improvements should be sent to
-;; Edward M. Reingold Department of Computer Science
-;; (217) 333-6733 University of Illinois at Urbana-Champaign
-;; reingold@cs.uiuc.edu 1304 West Springfield Avenue
-;; Urbana, Illinois 61801
-
;;; Code:
(defvar date)
diff --git a/lisp/calendar/cal-dst.el b/lisp/calendar/cal-dst.el
index 3aea69b8ccf..6159d7e9dc1 100644
--- a/lisp/calendar/cal-dst.el
+++ b/lisp/calendar/cal-dst.el
@@ -31,12 +31,6 @@
;; This collection of functions implements the features of calendar.el and
;; holiday.el that deal with daylight saving time.
-;; Comments, corrections, and improvements should be sent to
-;; Edward M. Reingold Department of Computer Science
-;; (217) 333-6733 University of Illinois at Urbana-Champaign
-;; reingold@cs.uiuc.edu 1304 West Springfield Avenue
-;; Urbana, Illinois 61801
-
;;; Code:
(require 'calendar)
@@ -266,12 +260,20 @@ Returns a list (YEAR START END), where START and END are
expressions that when evaluated return the start and end dates,
respectively. This function first attempts to use pre-calculated
data from `calendar-dst-transition-cache', otherwise it calls
-`calendar-dst-find-data' (and adds the results to the cache)."
+`calendar-dst-find-data' (and adds the results to the cache).
+If dates in YEAR cannot be handled by `encode-time' (e.g. if they
+are too large to be represented as a lisp integer), then rather
+than an error this function returns the result appropriate for
+the current year."
(let ((e (assoc year calendar-dst-transition-cache))
f)
(or e
(progn
- (setq e (calendar-dst-find-data (encode-time 1 0 0 1 1 year))
+ (setq e (calendar-dst-find-data
+ (condition-case nil
+ (encode-time 1 0 0 1 1 year)
+ (error
+ (encode-time 1 0 0 1 1 (nth 5 (decode-time))))))
f (nth 4 e)
e (list year f (nth 5 e))
calendar-dst-transition-cache
diff --git a/lisp/calendar/cal-french.el b/lisp/calendar/cal-french.el
index 99af7042472..439dbd34632 100644
--- a/lisp/calendar/cal-french.el
+++ b/lisp/calendar/cal-french.el
@@ -37,12 +37,6 @@
;; E. M. Reingold, N. Dershowitz, and S. M. Clamen, Software--Practice and
;; Experience, Volume 23, Number 4 (April, 1993), pages 383-404.
-;; Comments, corrections, and improvements should be sent to
-;; Edward M. Reingold Department of Computer Science
-;; (217) 333-6733 University of Illinois at Urbana-Champaign
-;; reingold@cs.uiuc.edu 1304 West Springfield Avenue
-;; Urbana, Illinois 61801
-
;;; Code:
(defvar date)
diff --git a/lisp/calendar/cal-hebrew.el b/lisp/calendar/cal-hebrew.el
index a61bea8eacf..9f32d9df471 100644
--- a/lisp/calendar/cal-hebrew.el
+++ b/lisp/calendar/cal-hebrew.el
@@ -35,12 +35,6 @@
;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold
;; and Nachum Dershowitz, Cambridge University Press (2001).
-;; Comments, corrections, and improvements should be sent to
-;; Edward M. Reingold Department of Computer Science
-;; (217) 333-6733 University of Illinois at Urbana-Champaign
-;; reingold@cs.uiuc.edu 1304 West Springfield Avenue
-;; Urbana, Illinois 61801
-
;;; Code:
(defvar date)
diff --git a/lisp/calendar/cal-islam.el b/lisp/calendar/cal-islam.el
index 28faed4d397..57c0f9de65e 100644
--- a/lisp/calendar/cal-islam.el
+++ b/lisp/calendar/cal-islam.el
@@ -34,12 +34,6 @@
;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold
;; and Nachum Dershowitz, Cambridge University Press (2001).
-;; Comments, corrections, and improvements should be sent to
-;; Edward M. Reingold Department of Computer Science
-;; (217) 333-6733 University of Illinois at Urbana-Champaign
-;; reingold@cs.uiuc.edu 1304 West Springfield Avenue
-;; Urbana, Illinois 61801
-
;;; Code:
(defvar date)
diff --git a/lisp/calendar/cal-iso.el b/lisp/calendar/cal-iso.el
index 93b39cd4d15..052087e2558 100644
--- a/lisp/calendar/cal-iso.el
+++ b/lisp/calendar/cal-iso.el
@@ -34,12 +34,6 @@
;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold
;; and Nachum Dershowitz, Cambridge University Press (2001).
-;; Comments, corrections, and improvements should be sent to
-;; Edward M. Reingold Department of Computer Science
-;; (217) 333-6733 University of Illinois at Urbana-Champaign
-;; reingold@cs.uiuc.edu 1304 West Springfield Avenue
-;; Urbana, Illinois 61801
-
;;; Code:
(defvar date)
diff --git a/lisp/calendar/cal-julian.el b/lisp/calendar/cal-julian.el
index 768e57bbab5..ff6a3f72e1b 100644
--- a/lisp/calendar/cal-julian.el
+++ b/lisp/calendar/cal-julian.el
@@ -34,12 +34,6 @@
;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold
;; and Nachum Dershowitz, Cambridge University Press (2001).
-;; Comments, corrections, and improvements should be sent to
-;; Edward M. Reingold Department of Computer Science
-;; (217) 333-6733 University of Illinois at Urbana-Champaign
-;; reingold@cs.uiuc.edu 1304 West Springfield Avenue
-;; Urbana, Illinois 61801
-
;;; Code:
(defvar date)
diff --git a/lisp/calendar/cal-mayan.el b/lisp/calendar/cal-mayan.el
index 20703cb85b6..2cb6d31022e 100644
--- a/lisp/calendar/cal-mayan.el
+++ b/lisp/calendar/cal-mayan.el
@@ -43,8 +43,6 @@
;; reingold@cs.uiuc.edu 1304 West Springfield Avenue
;; Urbana, Illinois 61801
-;; Comments, improvements, and bug reports should be sent to Reingold.
-
;; Technical details of the Mayan calendrical calculations can be found in
;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold
;; and Nachum Dershowitz, Cambridge University Press (2001), and in
diff --git a/lisp/calendar/cal-menu.el b/lisp/calendar/cal-menu.el
index 1320f778cc6..25929976dbd 100644
--- a/lisp/calendar/cal-menu.el
+++ b/lisp/calendar/cal-menu.el
@@ -31,12 +31,6 @@
;; This collection of functions implements menu bar and popup menu support for
;; calendar.el.
-;; Comments, corrections, and improvements should be sent to
-;; Edward M. Reingold Department of Computer Science
-;; (217) 333-6733 University of Illinois at Urbana-Champaign
-;; reingold@cs.uiuc.edu 1304 West Springfield Avenue
-;; Urbana, Illinois 61801
-
;;; Code:
(defvar displayed-month)
diff --git a/lisp/calendar/cal-move.el b/lisp/calendar/cal-move.el
index b12289c7456..3a08b98bf00 100644
--- a/lisp/calendar/cal-move.el
+++ b/lisp/calendar/cal-move.el
@@ -30,12 +30,6 @@
;; This collection of functions implements movement in the calendar for
;; calendar.el.
-;; Comments, corrections, and improvements should be sent to
-;; Edward M. Reingold Department of Computer Science
-;; (217) 333-6733 University of Illinois at Urbana-Champaign
-;; reingold@cs.uiuc.edu 1304 West Springfield Avenue
-;; Urbana, Illinois 61801
-
;;; Code:
(defvar displayed-month)
diff --git a/lisp/calendar/cal-persia.el b/lisp/calendar/cal-persia.el
index 6055de121af..a37f9c1f27e 100644
--- a/lisp/calendar/cal-persia.el
+++ b/lisp/calendar/cal-persia.el
@@ -30,16 +30,6 @@
;; This collection of functions implements the features of calendar.el and
;; diary.el that deal with the Persian calendar.
-;; Technical details of all the calendrical calculations can be found in
-;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold
-;; and Nachum Dershowitz, Cambridge University Press (2001).
-
-;; Comments, corrections, and improvements should be sent to
-;; Edward M. Reingold Department of Computer Science
-;; (217) 333-6733 University of Illinois at Urbana-Champaign
-;; reingold@cs.uiuc.edu 1304 West Springfield Avenue
-;; Urbana, Illinois 61801
-
;;; Code:
(defvar date)
diff --git a/lisp/calendar/cal-x.el b/lisp/calendar/cal-x.el
index b7f1748ff34..5f2c89e82c5 100644
--- a/lisp/calendar/cal-x.el
+++ b/lisp/calendar/cal-x.el
@@ -31,12 +31,6 @@
;; This collection of functions implements dedicated frames in X for
;; calendar.el.
-;; Comments, corrections, and improvements should be sent to
-;; Edward M. Reingold Department of Computer Science
-;; (217) 333-6733 University of Illinois at Urbana-Champaign
-;; reingold@cs.uiuc.edu 1304 West Springfield Avenue
-;; Urbana, Illinois 61801
-
;;; Code:
(require 'calendar)
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index fa7a68acd30..03f9a95fe37 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -90,12 +90,6 @@
;; reingold@cs.uiuc.edu with the SUBJECT "send-paper-cal" (no quotes) and
;; the message BODY containing your mailing address (snail).
-;; Comments, corrections, and improvements should be sent to
-;; Edward M. Reingold Department of Computer Science
-;; (217) 333-6733 University of Illinois at Urbana-Champaign
-;; reingold@cs.uiuc.edu 1304 West Springfield Avenue
-;; Urbana, Illinois 61801
-
;;; Code:
(defvar displayed-month)
@@ -301,6 +295,11 @@ calendar."
:type 'boolean
:group 'holidays)
+(defcustom calendar-mode-hook nil
+ "Hook run when entering `calendar-mode'."
+ :type 'hook
+ :group 'calendar-hooks)
+
;;;###autoload
(defcustom calendar-load-hook nil
"List of functions to be called after the calendar is first loaded.
@@ -624,6 +623,10 @@ See the documentation of `diary-date-forms' for an explanation."
(choice symbol regexp)))))
:group 'diary)
+(autoload 'diary-font-lock-keywords "diary-lib")
+(autoload 'diary-live-p "diary-lib")
+(defvar diary-font-lock-keywords)
+
(defcustom diary-date-forms
(if european-calendar-style
european-date-diary-pattern
@@ -661,6 +664,15 @@ a portion of the first word of the diary entry."
(repeat (list :inline t :format "%v"
(symbol :tag "Keyword")
(choice symbol regexp)))))
+ :initialize 'custom-initialize-default
+ :set (lambda (symbol value)
+ (unless (equal value (eval symbol))
+ (custom-set-default symbol value)
+ (setq diary-font-lock-keywords (diary-font-lock-keywords))
+ ;; Need to redraw not just to get new font-locking, but also
+ ;; to pick up any newly recognized entries.
+ (and (diary-live-p)
+ (diary))))
:group 'diary)
;;;###autoload
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el
index 72620a7f9bb..df01a508031 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -29,12 +29,6 @@
;; This collection of functions implements the diary features as described
;; in calendar.el.
-;; Comments, corrections, and improvements should be sent to
-;; Edward M. Reingold Department of Computer Science
-;; (217) 333-6733 University of Illinois at Urbana-Champaign
-;; reingold@cs.uiuc.edu 1304 West Springfield Avenue
-;; Urbana, Illinois 61801
-
;;; Code:
(require 'calendar)
@@ -263,6 +257,16 @@ search."
(setq attr-list (cdr attr-list)))))
(list entry ret-attr))))
+(defun diary-set-maybe-redraw (symbol value)
+ "Set SYMBOL's value to VALUE, and redraw the diary if necessary.
+Redraws the diary if it is being displayed (note this is not the same as
+just visiting the `diary-file'), and SYMBOL's value is to be changed."
+ (let ((oldvalue (eval symbol)))
+ (custom-set-default symbol value)
+ (and (not (equal value oldvalue))
+ (diary-live-p)
+ ;; Note this assumes diary was called without prefix arg.
+ (diary))))
;; This can be removed once the kill/yank treatment of invisible text
;; (see etc/TODO) is fixed. -- gm
@@ -292,27 +296,22 @@ Only used if `diary-header-line-flag' is non-nil."
(defvar diary-saved-point) ; internal
+;; The first version of this also checked for diary-selective-display
+;; in the non-fancy case. This was an attempt to distinguish between
+;; displaying the diary and just visiting the diary file. However,
+;; when using fancy diary, calling diary when there are no entries to
+;; display does not create the fancy buffer, nor does it switch on
+;; selective-display in the diary buffer. This means some
+;; customizations will not take effect, eg:
+;; http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-03/msg00466.html
+;; So the check for selective-display was dropped. This means the
+;; diary will be displayed if one customizes a diary variable while
+;; just visiting the diary-file. This is i) unlikely, and ii) no great loss.
(defun diary-live-p ()
- "Return non-nil if the diary is being displayed.
-This is not the same as just visiting the `diary-file'."
+ "Return non-nil if the diary is being displayed."
(or (get-buffer fancy-diary-buffer)
- (when diary-file
- (let ((dbuff (find-buffer-visiting
- (substitute-in-file-name diary-file))))
- (when dbuff
- (with-current-buffer dbuff
- diary-selective-display))))))
-
-(defun diary-set-maybe-redraw (symbol value)
- "Set SYMBOL's value to VALUE, and redraw the diary if necessary.
-Redraws the diary if it is being displayed (note this is not the same as
-just visiting the `diary-file'), and SYMBOL's value is to be changed."
- (let ((oldvalue (eval symbol)))
- (custom-set-default symbol value)
- (and (not (equal value oldvalue))
- (diary-live-p)
- ;; Note this assumes diary was called without prefix arg.
- (diary))))
+ (and diary-file
+ (find-buffer-visiting (substitute-in-file-name diary-file)))))
(defcustom number-of-diary-entries 1
"Specifies how many days of diary entries are to be displayed initially.
@@ -1990,51 +1989,53 @@ names."
(eval-when-compile (require 'cal-hebrew)
(require 'cal-islam))
-(defvar diary-font-lock-keywords
- (append
- (diary-font-lock-date-forms calendar-month-name-array
- nil calendar-month-abbrev-array)
- (when (or (memq 'mark-hebrew-diary-entries
- nongregorian-diary-marking-hook)
- (memq 'list-hebrew-diary-entries
- nongregorian-diary-listing-hook))
- (require 'cal-hebrew)
- (diary-font-lock-date-forms
- calendar-hebrew-month-name-array-leap-year
- hebrew-diary-entry-symbol))
- (when (or (memq 'mark-islamic-diary-entries
- nongregorian-diary-marking-hook)
- (memq 'list-islamic-diary-entries
- nongregorian-diary-listing-hook))
- (require 'cal-islam)
- (diary-font-lock-date-forms
- calendar-islamic-month-name-array
- islamic-diary-entry-symbol))
- (list
- (cons
- (concat "^" (regexp-quote diary-include-string) ".*$")
- 'font-lock-keyword-face)
- (cons
- (concat "^" (regexp-quote diary-nonmarking-symbol)
- "?\\(" (regexp-quote sexp-diary-entry-symbol) "\\)")
- '(1 font-lock-reference-face))
- (cons
- (concat "^" (regexp-quote diary-nonmarking-symbol))
- 'font-lock-reference-face)
- (cons
- (concat "^" (regexp-quote diary-nonmarking-symbol)
- "?\\(" (regexp-quote hebrew-diary-entry-symbol) "\\)")
- '(1 font-lock-reference-face))
- (cons
- (concat "^" (regexp-quote diary-nonmarking-symbol)
- "?\\(" (regexp-quote islamic-diary-entry-symbol) "\\)")
- '(1 font-lock-reference-face))
- '(diary-font-lock-sexps . font-lock-keyword-face)
- `(,(concat "\\(^\\|\\s-\\)"
- diary-time-regexp "\\(-" diary-time-regexp "\\)?")
- . 'diary-time)))
- "Forms to highlight in `diary-mode'.")
-
+(defun diary-font-lock-keywords ()
+ "Return a value for the variable `diary-font-lock-keywords'."
+ (append
+ (diary-font-lock-date-forms calendar-month-name-array
+ nil calendar-month-abbrev-array)
+ (when (or (memq 'mark-hebrew-diary-entries
+ nongregorian-diary-marking-hook)
+ (memq 'list-hebrew-diary-entries
+ nongregorian-diary-listing-hook))
+ (require 'cal-hebrew)
+ (diary-font-lock-date-forms
+ calendar-hebrew-month-name-array-leap-year
+ hebrew-diary-entry-symbol))
+ (when (or (memq 'mark-islamic-diary-entries
+ nongregorian-diary-marking-hook)
+ (memq 'list-islamic-diary-entries
+ nongregorian-diary-listing-hook))
+ (require 'cal-islam)
+ (diary-font-lock-date-forms
+ calendar-islamic-month-name-array
+ islamic-diary-entry-symbol))
+ (list
+ (cons
+ (concat "^" (regexp-quote diary-include-string) ".*$")
+ 'font-lock-keyword-face)
+ (cons
+ (concat "^" (regexp-quote diary-nonmarking-symbol)
+ "?\\(" (regexp-quote sexp-diary-entry-symbol) "\\)")
+ '(1 font-lock-reference-face))
+ (cons
+ (concat "^" (regexp-quote diary-nonmarking-symbol))
+ 'font-lock-reference-face)
+ (cons
+ (concat "^" (regexp-quote diary-nonmarking-symbol)
+ "?\\(" (regexp-quote hebrew-diary-entry-symbol) "\\)")
+ '(1 font-lock-reference-face))
+ (cons
+ (concat "^" (regexp-quote diary-nonmarking-symbol)
+ "?\\(" (regexp-quote islamic-diary-entry-symbol) "\\)")
+ '(1 font-lock-reference-face))
+ '(diary-font-lock-sexps . font-lock-keyword-face)
+ `(,(concat "\\(^\\|\\s-\\)"
+ diary-time-regexp "\\(-" diary-time-regexp "\\)?")
+ . 'diary-time))))
+
+(defvar diary-font-lock-keywords (diary-font-lock-keywords)
+ "Forms to highlight in `diary-mode'.")
;; Following code from Dave Love <fx@gnu.org>.
;; Import Outlook-format appointments from mail messages in Gnus or
diff --git a/lisp/calendar/holidays.el b/lisp/calendar/holidays.el
index 6f53a47221a..fc6e6315916 100644
--- a/lisp/calendar/holidays.el
+++ b/lisp/calendar/holidays.el
@@ -45,12 +45,6 @@
;; reingold@cs.uiuc.edu with the SUBJECT "send-paper-cal" (no quotes) and
;; the message BODY containing your mailing address (snail).
-;; Comments, corrections, and improvements should be sent to
-;; Edward M. Reingold Department of Computer Science
-;; (217) 333-6733 University of Illinois at Urbana-Champaign
-;; reingold@cs.uiuc.edu 1304 West Springfield Avenue
-;; Urbana, Illinois 61801
-
;;; Code:
(defvar displayed-month)
diff --git a/lisp/calendar/lunar.el b/lisp/calendar/lunar.el
index 33da7cef8e0..8aa062d69c3 100644
--- a/lisp/calendar/lunar.el
+++ b/lisp/calendar/lunar.el
@@ -43,12 +43,6 @@
;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold
;; and Nachum Dershowitz, Cambridge University Press (2001).
-;; Comments, corrections, and improvements should be sent to
-;; Edward M. Reingold Department of Computer Science
-;; (217) 333-6733 University of Illinois at Urbana-Champaign
-;; reingold@cs.uiuc.edu 1304 West Springfield Avenue
-;; Urbana, Illinois 61801
-
;;; Code:
(defvar date)
diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el
index c4a8352a8d8..4281c0e1307 100644
--- a/lisp/calendar/solar.el
+++ b/lisp/calendar/solar.el
@@ -53,12 +53,6 @@
;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold
;; and Nachum Dershowitz, Cambridge University Press (2001).
-;; Comments, corrections, and improvements should be sent to
-;; Edward M. Reingold Department of Computer Science
-;; (217) 333-6733 University of Illinois at Urbana-Champaign
-;; reingold@cs.uiuc.edu 1304 West Springfield Avenue
-;; Urbana, Illinois 61801
-
;;; Code:
(defvar date)
diff --git a/lisp/comint.el b/lisp/comint.el
index ee102c423b4..7d81f357e22 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -1502,6 +1502,7 @@ Similarly for Soar, Scheme, etc."
;; Note that the input string does not include its terminal newline.
(let ((proc (get-buffer-process (current-buffer))))
(if (not proc) (error "Current buffer has no process")
+ (widen)
(let* ((pmark (process-mark proc))
(intxt (if (>= (point) (marker-position pmark))
(progn (if comint-eol-on-send (end-of-line))
@@ -1646,8 +1647,8 @@ and moves the prompt overlay."
(let ((inhibit-read-only t)
(inhibit-modification-hooks t))
(add-text-properties (overlay-start comint-last-prompt-overlay)
- (overlay-end comint-last-prompt-overlay)
- (overlay-properties comint-last-prompt-overlay)))))
+ (overlay-end comint-last-prompt-overlay)
+ (overlay-properties comint-last-prompt-overlay)))))
(defun comint-carriage-motion (start end)
"Interpret carriage control characters in the region from START to END.
@@ -2593,7 +2594,7 @@ its response can be seen."
(proc-mark (process-mark proc)))
(display-buffer proc-buf)
(set-buffer proc-buf) ; but it's not the selected *window*
- (let ((proc-win (get-buffer-window proc-buf))
+ (let ((proc-win (get-buffer-window proc-buf 0))
(proc-pt (marker-position proc-mark)))
(comint-send-string proc str) ; send the query
(accept-process-output proc) ; wait for some output
@@ -2959,7 +2960,7 @@ See also `comint-dynamic-complete-filename'."
(defun comint-dynamic-list-completions (completions)
"List in help buffer sorted COMPLETIONS.
Typing SPC flushes the help buffer."
- (let ((window (get-buffer-window "*Completions*")))
+ (let ((window (get-buffer-window "*Completions*" 0)))
(setq completions (sort completions 'string-lessp))
(if (and (eq last-command this-command)
window (window-live-p window) (window-buffer window)
diff --git a/lisp/compare-w.el b/lisp/compare-w.el
index e81c6cd3bc2..19ad84e11c0 100644
--- a/lisp/compare-w.el
+++ b/lisp/compare-w.el
@@ -32,7 +32,7 @@
;;; Code:
-(defgroup compare-w nil
+(defgroup compare-windows nil
"Compare text between windows."
:prefix "compare-"
:group 'tools)
@@ -52,18 +52,18 @@ any text before that point.
If the function returns the same value for both windows, then the
whitespace is considered to match, and is skipped."
:type '(choice regexp function)
- :group 'compare-w)
+ :group 'compare-windows)
(defcustom compare-ignore-whitespace nil
"*Non-nil means `compare-windows' ignores whitespace."
:type 'boolean
- :group 'compare-w
+ :group 'compare-windows
:version "22.1")
(defcustom compare-ignore-case nil
"*Non-nil means `compare-windows' ignores case differences."
:type 'boolean
- :group 'compare-w)
+ :group 'compare-windows)
(defcustom compare-windows-sync 'compare-windows-sync-default-function
"*Function or regexp that is used to synchronize points in two
@@ -87,10 +87,11 @@ regexp containing some field separator or a newline, depending on
the nature of the difference units separator. The variable can
be made buffer-local.
-If the value of this variable is `nil', then function `ding' is
-called to beep or flash the screen when points are mismatched."
- :type '(choice regexp function)
- :group 'compare-w
+If the value of this variable is `nil' (option \"No sync\"), then
+no synchronization is performed, and the function `ding' is called
+to beep or flash the screen when points are mismatched."
+ :type '(choice function regexp (const :tag "No sync" nil))
+ :group 'compare-windows
:version "22.1")
(defcustom compare-windows-sync-string-size 32
@@ -102,7 +103,7 @@ difference regions more coarse-grained.
The default value 32 is good for the most cases."
:type 'integer
- :group 'compare-w
+ :group 'compare-windows
:version "22.1")
(defcustom compare-windows-recenter nil
@@ -113,7 +114,7 @@ matching points side-by-side.
The value `(-1 0)' is useful if windows are split vertically,
and the value `((4) (4))' for horizontally split windows."
:type '(list sexp sexp)
- :group 'compare-w
+ :group 'compare-windows
:version "22.1")
(defcustom compare-windows-highlight t
@@ -125,13 +126,13 @@ out all highlighting later with the command `compare-windows-dehighlight'."
:type '(choice (const :tag "No highlighting" nil)
(const :tag "Persistent highlighting" persistent)
(other :tag "Highlight until next command" t))
- :group 'compare-w
+ :group 'compare-windows
:version "22.1")
(defface compare-windows
'((t :inherit lazy-highlight))
"Face for highlighting of compare-windows difference regions."
- :group 'compare-w
+ :group 'compare-windows
:version "22.1")
(defvar compare-windows-overlay1 nil)
diff --git a/lisp/complete.el b/lisp/complete.el
index ce5094d1aef..b1bb36f9dfa 100644
--- a/lisp/complete.el
+++ b/lisp/complete.el
@@ -187,6 +187,17 @@ If nil, means use the colon-separated path in the variable $INCPATH instead."
(define-key global-map [remap lisp-complete-symbol] 'PC-lisp-complete-symbol)))))
+(defvar PC-do-completion-end nil
+ "Internal variable used by `PC-do-completion'.")
+
+(make-variable-buffer-local 'PC-do-completion-end)
+
+(defvar PC-goto-end nil
+ "Internal variable set in `PC-do-completion', used in
+`choose-completion-string-functions'.")
+
+(make-variable-buffer-local 'PC-goto-end)
+
;;;###autoload
(define-minor-mode partial-completion-mode
"Toggle Partial Completion mode.
@@ -239,7 +250,16 @@ second TAB brings up the `*Completions*' buffer."
(if partial-completion-mode 'add-hook 'remove-hook)
'choose-completion-string-functions
(lambda (choice buffer mini-p base-size)
- (if mini-p (goto-char (point-max)))
+ ;; When completing M-: (lisp- ) with point before the ), it is
+ ;; not appropriate to go to point-max (unlike the filename case).
+ (if (and (not PC-goto-end)
+ mini-p)
+ (goto-char (point-max))
+ ;; Need a similar hack for the non-minibuffer-case -- gm.
+ (when PC-do-completion-end
+ (goto-char PC-do-completion-end)
+ (setq PC-do-completion-end nil)))
+ (setq PC-goto-end nil)
nil))
;; Build the env-completion and mapping table.
(when (and partial-completion-mode (null PC-env-vars-alist))
@@ -410,13 +430,19 @@ of `minibuffer-completion-table' and the minibuffer contents.")
(let ((result (try-completion string alist predicate)))
(if (eq result t) string result)))
-(defun PC-do-completion (&optional mode beg end)
+;; TODO document MODE magic...
+(defun PC-do-completion (&optional mode beg end goto-end)
+ "Internal function to do the work of partial completion.
+Text to be completed lies between BEG and END. Normally when
+replacing text in the minibuffer, this function replaces up to
+point-max (as is appropriate for completing a file name). If
+GOTO-END is non-nil, however, it instead replaces up to END."
(or beg (setq beg (minibuffer-prompt-end)))
(or end (setq end (point-max)))
(let* ((table minibuffer-completion-table)
(pred minibuffer-completion-predicate)
(filename (funcall PC-completion-as-file-name-predicate))
- (dirname nil) ; non-nil only if a filename is being completed
+ (dirname nil) ; non-nil only if a filename is being completed
;; The following used to be "(dirlength 0)" which caused the erasure of
;; the entire buffer text before `point' when inserting a completion
;; into a buffer.
@@ -681,7 +707,7 @@ of `minibuffer-completion-table' and the minibuffer contents.")
(forward-char 1)
(if (and (< (point) end)
(and (looking-at " ")
- (memq (aref prefix i)
+ (memq (aref prefix i)
PC-delims-list)))
;; replace " " by the actual delimiter
(progn
@@ -689,12 +715,12 @@ of `minibuffer-completion-table' and the minibuffer contents.")
(insert (substring prefix i (1+ i))))
;; insert a new character
(progn
- (and filename (looking-at "\\*")
- (progn
- (delete-char 1)
- (setq end (1- end))))
+ (and filename (looking-at "\\*")
+ (progn
+ (delete-char 1)
+ (setq end (1- end))))
(setq improved t)
- (insert (substring prefix i (1+ i)))
+ (insert (substring prefix i (1+ i)))
(setq end (1+ end)))))
(setq i (1+ i)))
(or pt (setq pt (point)))
@@ -729,7 +755,7 @@ of `minibuffer-completion-table' and the minibuffer contents.")
;; We changed it... would it be complete without the space?
(if (test-completion (buffer-substring 1 (1- end))
- table pred)
+ table pred)
(delete-region (1- end) end)))
(if improved
@@ -743,13 +769,30 @@ of `minibuffer-completion-table' and the minibuffer contents.")
(and completion-auto-help
(eq last-command this-command))
(eq mode 'help))
- (with-output-to-temp-buffer "*Completions*"
- (display-completion-list (sort helpposs 'string-lessp))
- (with-current-buffer standard-output
- ;; Record which part of the buffer we are completing
- ;; so that choosing a completion from the list
- ;; knows how much old text to replace.
- (setq completion-base-size dirlength)))
+ (let ((prompt-end (minibuffer-prompt-end)))
+ (with-output-to-temp-buffer "*Completions*"
+ (display-completion-list (sort helpposs 'string-lessp))
+ (setq PC-do-completion-end end
+ PC-goto-end goto-end)
+ (with-current-buffer standard-output
+ ;; Record which part of the buffer we are completing
+ ;; so that choosing a completion from the list
+ ;; knows how much old text to replace.
+ ;; This was briefly nil in the non-dirname case.
+ ;; However, if one calls PC-lisp-complete-symbol
+ ;; on "(ne-f" with point on the hyphen, PC offers
+ ;; all completions starting with "(ne", some of
+ ;; which do not match the "-f" part (maybe it
+ ;; should not, but it does). In such cases,
+ ;; completion gets confused trying to figure out
+ ;; how much to replace, so we tell it explicitly
+ ;; (ie, the number of chars in the buffer before beg).
+ ;;
+ ;; Note that choose-completion-string-functions
+ ;; plays around with point.
+ (setq completion-base-size (if dirname
+ dirlength
+ (- beg prompt-end))))))
(PC-temp-minibuffer-message " [Next char not unique]"))
nil)))))
@@ -799,6 +842,10 @@ of `minibuffer-completion-table' and the minibuffer contents.")
(setq quit-flag nil
unread-command-events '(7))))))))
+;; Does not need to be buffer-local (?) because only used when one
+;; PC-l-c-s immediately follows another.
+(defvar PC-lisp-complete-end nil
+ "Internal variable used by `PC-lisp-complete-symbol'.")
(defun PC-lisp-complete-symbol ()
"Perform completion on Lisp symbol preceding point.
@@ -811,6 +858,12 @@ Otherwise, all symbols with function definitions, values
or properties are considered."
(interactive)
(let* ((end (point))
+ ;; To complete the word under point, rather than just the portion
+ ;; before point, use this:
+;;; (save-excursion
+;;; (with-syntax-table lisp-mode-syntax-table
+;;; (forward-sexp 1)
+;;; (point))))
(beg (save-excursion
(with-syntax-table lisp-mode-syntax-table
(backward-sexp 1)
@@ -825,7 +878,39 @@ or properties are considered."
(or (boundp sym) (fboundp sym)
(symbol-plist sym))))))
(PC-not-minibuffer t))
- (PC-do-completion nil beg end)))
+ ;; http://lists.gnu.org/archive/html/emacs-devel/2007-03/msg01211.html
+ ;;
+ ;; This deals with cases like running PC-l-c-s on "M-: (n-f".
+ ;; The first call to PC-l-c-s expands this to "(ne-f", and moves
+ ;; point to the hyphen [1]. If one calls PC-l-c-s immediately after,
+ ;; then without the last-command check, one is offered all
+ ;; completions of "(ne", which is presumably not what one wants.
+ ;;
+ ;; This is arguably (at least, it seems to be the existing intended
+ ;; behaviour) what one _does_ want if point has been explicitly
+ ;; positioned on the hyphen. Note that if PC-do-completion (qv) binds
+ ;; completion-base-size to nil, then completion does not replace the
+ ;; correct amount of text in such cases.
+ ;;
+ ;; Neither of these problems occur when using PC for filenames in the
+ ;; minibuffer, because in that case PC-do-completion is called without
+ ;; an explicit value for END, and so uses (point-max). This is fine for
+ ;; a filename, because the end of the filename must be at the end of
+ ;; the minibuffer. The same is not true for lisp symbols.
+ ;;
+ ;; [1] An alternate fix would be to not move point to the hyphen
+ ;; in such cases, but that would make the behaviour different from
+ ;; that for filenames. It seems PC moves point to the site of the
+ ;; first difference between the possible completions.
+ ;;
+ ;; Alternatively alternatively, maybe end should be computed in
+ ;; the same way as beg. That would change the behaviour though.
+ (if (equal last-command 'PC-lisp-complete-symbol)
+ (PC-do-completion nil beg PC-lisp-complete-end t)
+ (if PC-lisp-complete-end
+ (move-marker PC-lisp-complete-end end)
+ (setq PC-lisp-complete-end (copy-marker end t)))
+ (PC-do-completion nil beg end t))))
(defun PC-complete-as-file-name ()
"Perform completion on file names preceding point.
@@ -1026,10 +1111,11 @@ absolute rather than relative to some directory on the SEARCH-PATH."
(if (string-match "<\\([^\"<>]*\\)>?\\'" (ad-get-arg 0))
(let* ((string (ad-get-arg 0))
(action (ad-get-arg 2))
- (name (substring string (match-beginning 1) (match-end 1)))
+ (name (match-string 1 string))
(str2 (substring string (match-beginning 0)))
(completion-table
- (mapcar (lambda (x) (format "<%s>" x))
+ (mapcar (lambda (x)
+ (format (if (string-match "/\\'" x) "<%s" "<%s>") x))
(PC-include-file-all-completions
name (PC-include-file-path)))))
(setq ad-return-value
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index d8fdf966374..4dae3bab018 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -422,7 +422,7 @@
:group 'development)
(defgroup minibuffer nil
- "Controling the behavior of the minibuffer."
+ "Controlling the behavior of the minibuffer."
:link '(custom-manual "(emacs)Minibuffer")
:group 'environment)
@@ -443,7 +443,7 @@
:group 'environment)
(defgroup auto-save nil
- "Preventing accidential loss of data."
+ "Preventing accidental loss of data."
:group 'files)
(defgroup processes-basics nil
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index b7aa673f1b8..a4f5d580718 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -338,7 +338,11 @@ since it could result in memory overflow and make Emacs crash."
(split-height-threshold windows integer)
(window-min-height windows integer)
(window-min-width windows integer)
- (scroll-preserve-screen-position windows boolean)
+ (scroll-preserve-screen-position
+ windows (choice
+ (const :tag "Off (nil)" :value nil)
+ (const :tag "Full screen (t)" :value t)
+ (other :tag "Always" 1)))
(display-buffer-reuse-frames windows boolean "21.1")
;; xdisp.c
(scroll-step windows integer)
diff --git a/lisp/desktop.el b/lisp/desktop.el
index 4328b8e3839..92f6a448574 100644
--- a/lisp/desktop.el
+++ b/lisp/desktop.el
@@ -45,9 +45,9 @@
;; "Saving Emacs Sessions" in the GNU Emacs Manual.
;; When the desktop module is loaded, the function `desktop-kill' is
-;; added to the `kill-emacs-hook'. This function is responsible for
+;; added to the `kill-emacs-hook'. This function is responsible for
;; saving the desktop when Emacs is killed. Furthermore an anonymous
-;; function is added to the `after-init-hook'. This function is
+;; function is added to the `after-init-hook'. This function is
;; responsible for loading the desktop when Emacs is started.
;; Special handling.
@@ -55,12 +55,12 @@
;; Variables `desktop-buffer-mode-handlers' and `desktop-minor-mode-handlers'
;; are supplied to handle special major and minor modes respectively.
;; `desktop-buffer-mode-handlers' is an alist of major mode specific functions
-;; to restore a desktop buffer. Elements must have the form
+;; to restore a desktop buffer. Elements must have the form
;;
;; (MAJOR-MODE . RESTORE-BUFFER-FUNCTION).
;;
;; Functions listed are called by `desktop-create-buffer' when `desktop-read'
-;; evaluates the desktop file. Buffers with a major mode not specified here,
+;; evaluates the desktop file. Buffers with a major mode not specified here,
;; are restored by the default handler `desktop-restore-file-buffer'.
;; `desktop-minor-mode-handlers' is an alist of functions to restore
;; non-standard minor modes. Elements must have the form
@@ -85,7 +85,7 @@
;; '(bar-mode . bar-desktop-restore))
;; in the module itself, and make shure that the mode function is
-;; autoloaded. See the docstrings of `desktop-buffer-mode-handlers' and
+;; autoloaded. See the docstrings of `desktop-buffer-mode-handlers' and
;; `desktop-minor-mode-handlers' for more info.
;; Minor modes.
@@ -100,7 +100,7 @@
;; The variables `desktop-minor-mode-table' and `desktop-minor-mode-handlers'
;; are used to handle non-conventional minor modes. `desktop-save' uses
;; `desktop-minor-mode-table' to map minor mode variables to minor mode
-;; functions before writing `desktop-minor-modes'. If a minor mode has a
+;; functions before writing `desktop-minor-modes'. If a minor mode has a
;; variable name that is different form its function name, an entry
;; (NAME RESTORE-FUNCTION)
@@ -619,8 +619,7 @@ QUOTE may be `may' (value may be quoted),
(setq newlist (cons q.txt newlist)))
(setq p (cdr p)))
(if p
- (let ((last (desktop-internal-v2s p))
- (el (car newlist)))
+ (let ((last (desktop-internal-v2s p)))
(or anynil (setq anynil (null (car last))))
(or anynil
(setq newlist (cons '(must . ".") newlist)))
@@ -782,7 +781,8 @@ See also `desktop-base-file-name'."
";; Desktop file format version " desktop-file-version "\n"
";; Emacs version " emacs-version "\n\n"
";; Global section:\n")
- (mapc (function desktop-outvar) desktop-globals-to-save)
+ (dolist (varspec desktop-globals-to-save)
+ (desktop-outvar varspec))
(if (memq 'kill-ring desktop-globals-to-save)
(insert
"(setq kill-ring-yank-pointer (nthcdr "
@@ -790,22 +790,20 @@ See also `desktop-base-file-name'."
" kill-ring))\n"))
(insert "\n;; Buffer section -- buffers listed in same order as in buffer list:\n")
- (mapc #'(lambda (l)
- (when (apply 'desktop-save-buffer-p l)
- (insert "("
- (if (or (not (integerp eager))
- (unless (zerop eager)
- (setq eager (1- eager))
- t))
- "desktop-create-buffer"
- "desktop-append-buffer-args")
- " "
- desktop-file-version)
- (mapc #'(lambda (e)
- (insert "\n " (desktop-value-to-string e)))
- l)
- (insert ")\n\n")))
- info)
+ (dolist (l info)
+ (when (apply 'desktop-save-buffer-p l)
+ (insert "("
+ (if (or (not (integerp eager))
+ (unless (zerop eager)
+ (setq eager (1- eager))
+ t))
+ "desktop-create-buffer"
+ "desktop-append-buffer-args")
+ " "
+ desktop-file-version)
+ (dolist (e l)
+ (insert "\n " (desktop-value-to-string e)))
+ (insert ")\n\n")))
(setq default-directory dirname)
(let ((coding-system-for-write 'emacs-mule))
(write-region (point-min) (point-max) filename nil 'nomessage)))))
@@ -941,14 +939,13 @@ directory DIRNAME."
(desktop-clear)
(desktop-read desktop-dirname))
+(defvar desktop-buffer-major-mode)
+(defvar desktop-buffer-locals)
;; ----------------------------------------------------------------------------
(defun desktop-restore-file-buffer (desktop-buffer-file-name
desktop-buffer-name
desktop-buffer-misc)
"Restore a file buffer."
- (eval-when-compile ; Just to silence the byte compiler
- (defvar desktop-buffer-major-mode)
- (defvar desktop-buffer-locals))
(if desktop-buffer-file-name
(if (or (file-exists-p desktop-buffer-file-name)
(let ((msg (format "Desktop: File \"%s\" no longer exists."
@@ -985,8 +982,12 @@ directory DIRNAME."
;; called from Desktop file only.
;; Just to silence the byte compiler.
-(eval-when-compile
- (defvar desktop-first-buffer)) ; Dynamically bound in `desktop-read'
+
+(defvar desktop-first-buffer) ; Dynamically bound in `desktop-read'
+
+;; Bound locally in `desktop-read'.
+(defvar desktop-buffer-ok-count)
+(defvar desktop-buffer-fail-count)
(defun desktop-create-buffer
(desktop-file-version
@@ -1000,10 +1001,6 @@ directory DIRNAME."
desktop-buffer-misc
&optional
desktop-buffer-locals)
- ;; Just to silence the byte compiler. Bound locally in `desktop-read'.
- (eval-when-compile
- (defvar desktop-buffer-ok-count)
- (defvar desktop-buffer-fail-count))
;; To make desktop files with relative file names possible, we cannot
;; allow `default-directory' to change. Therefore we save current buffer.
(save-current-buffer
@@ -1045,21 +1042,22 @@ directory DIRNAME."
((equal '(nil) desktop-buffer-minor-modes) ; backwards compatible
(auto-fill-mode 0))
(t
- (mapc #'(lambda (minor-mode)
- ;; Give minor mode module a chance to add a handler.
- (desktop-load-file minor-mode)
- (let ((handler (cdr (assq minor-mode desktop-minor-mode-handlers))))
- (if handler
- (funcall handler desktop-buffer-locals)
- (when (functionp minor-mode)
- (funcall minor-mode 1)))))
- desktop-buffer-minor-modes)))
- ;; Even though point and mark are non-nil when written by `desktop-save',
- ;; they may be modified by handlers wanting to set point or mark themselves.
+ (dolist (minor-mode desktop-buffer-minor-modes)
+ ;; Give minor mode module a chance to add a handler.
+ (desktop-load-file minor-mode)
+ (let ((handler (cdr (assq minor-mode desktop-minor-mode-handlers))))
+ (if handler
+ (funcall handler desktop-buffer-locals)
+ (when (functionp minor-mode)
+ (funcall minor-mode 1)))))))
+ ;; Even though point and mark are non-nil when written by
+ ;; `desktop-save', they may be modified by handlers wanting to set
+ ;; point or mark themselves.
(when desktop-buffer-point
(goto-char
(condition-case err
- ;; Evaluate point. Thus point can be something like '(search-forward ...
+ ;; Evaluate point. Thus point can be something like
+ ;; '(search-forward ...
(eval desktop-buffer-point)
(error (message "%s" (error-message-string err)) 1))))
(when desktop-buffer-mark
@@ -1167,7 +1165,7 @@ If there are no buffers left to create, kill the timer."
;; functions are processed after `after-init-hook'.
(add-hook
'after-init-hook
- '(lambda ()
+ (lambda ()
(let ((key "--no-desktop"))
(when (member key command-line-args)
(setq command-line-args (delete key command-line-args))
@@ -1176,5 +1174,5 @@ If there are no buffers left to create, kill the timer."
(provide 'desktop)
-;;; arch-tag: 221907c3-1771-4fd3-9c2e-c6f700c6ede9
+;; arch-tag: 221907c3-1771-4fd3-9c2e-c6f700c6ede9
;;; desktop.el ends here
diff --git a/lisp/dframe.el b/lisp/dframe.el
index a640540a46a..eda6d45bf21 100644
--- a/lisp/dframe.el
+++ b/lisp/dframe.el
@@ -354,9 +354,7 @@ CREATE-HOOK are hooks to run after creating a frame."
t))))
;; Enable mouse tracking in emacs
(if dframe-track-mouse-function
- (set (make-local-variable 'track-mouse) t)) ;this could be messy.
- ;; disable auto-show-mode for Emacs
- (setq auto-show-mode nil))
+ (set (make-local-variable 'track-mouse) t))) ;this could be messy.
;;;; DISABLED: This causes problems for users with multiple frames.
;;;; ;; Set this up special just for the passed in buffer
;;;; ;; Terminal minibuffer stuff does not require this.
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el
index 543e1bd6a39..3cd2fb37dbb 100644
--- a/lisp/diff-mode.el
+++ b/lisp/diff-mode.el
@@ -985,8 +985,7 @@ See `after-change-functions' for the meaning of BEG, END and LEN."
(define-derived-mode diff-mode fundamental-mode "Diff"
"Major mode for viewing/editing context diffs.
Supports unified and context diffs as well as (to a lesser extent)
-normal diffs. If you edit the buffer manually, diff-mode will try
-to update the hunk headers for you on-the-fly.
+normal diffs.
When the buffer is read-only, the ESC prefix is not necessary.
If you edit the buffer manually, diff-mode will try to update the hunk
@@ -996,9 +995,6 @@ You can also switch between context diff and unified diff with \\[diff-context->
or vice versa with \\[diff-unified->context] and you can also reverse the direction of
a diff with \\[diff-reverse-direction].
-When the buffer is read-only, the Meta- modifier is not necessary
-to run the Diff mode commands:
-
\\{diff-mode-map}"
(set (make-local-variable 'font-lock-defaults) diff-font-lock-defaults)
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index 1a1cdd5a542..f5e6250b475 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -45,12 +45,8 @@
;; (add-hook 'dired-load-hook
;; (function (lambda ()
;; (load "dired-x")
-;; ;; Set global variables here. For example:
+;; ;; Set variables here. For example:
;; ;; (setq dired-guess-shell-gnutar "gtar")
-;; )))
-;; (add-hook 'dired-mode-hook
-;; (function (lambda ()
-;; ;; Set buffer-local variables here. For example:
;; ;; (dired-omit-mode 1)
;; )))
;;
@@ -1130,17 +1126,11 @@ You can set this variable in your ~/.emacs. For example, to add rules for
:group 'dired-x
:type '(alist :key-type regexp :value-type (repeat sexp)))
-(defcustom dired-guess-shell-case-fold-search t
- "If non-nil, `dired-guess-shell-alist-default' and
-`dired-guess-shell-alist-user' are matched case-insensitively."
- :group 'dired-x
- :type 'boolean)
-
(defun dired-guess-default (files)
"Guess a shell commands for FILES. Return command or list of commands.
See `dired-guess-shell-alist-user'."
- (let* ((case-fold-search dired-guess-shell-case-fold-search)
+ (let* ((case-fold-search t)
;; Prepend the user's alist to the default alist.
(alist (append dired-guess-shell-alist-user
dired-guess-shell-alist-default))
diff --git a/lisp/dnd.el b/lisp/dnd.el
index 2b523476a4f..df081539cf0 100644
--- a/lisp/dnd.el
+++ b/lisp/dnd.el
@@ -146,7 +146,7 @@ Return nil if URI is not a local file."
(substring uri (match-end 0))))))
(when (and f must-exist)
(setq f (replace-regexp-in-string
- "%[A-Z0-9][A-Z0-9]"
+ "%[A-Fa-f0-9][A-Fa-f0-9]"
(lambda (arg)
(format "%c" (string-to-number (substring arg 1) 16)))
f nil t))
diff --git a/lisp/dos-w32.el b/lisp/dos-w32.el
index 94ba5def7b5..aeebb9c3d08 100644
--- a/lisp/dos-w32.el
+++ b/lisp/dos-w32.el
@@ -74,6 +74,9 @@ against the file name, and TYPE is nil for text, t for binary.")
(setq alist (cdr alist)))
found)))
+;; Silence compiler. Defined in src/buffer.c on DOS_NT.
+(defvar default-buffer-file-type)
+
;; Don't check for untranslated file systems here.
(defun find-buffer-file-type (filename)
(let ((match (find-buffer-file-type-match filename))
diff --git a/lisp/emacs-lisp/authors.el b/lisp/emacs-lisp/authors.el
index d93d80e0c8e..31464269567 100644
--- a/lisp/emacs-lisp/authors.el
+++ b/lisp/emacs-lisp/authors.el
@@ -688,5 +688,7 @@ the Emacs source tree, from which to build the file."
(authors root)
(write-file file)))
+(provide 'authors)
+
;;; arch-tag: 659d5900-5ff2-43b0-954c-a315cc1e4dc1
;;; authors.el ends here
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index dd7e042499c..2c9dc8e3314 100644
--- a/lisp/emacs-lisp/byte-opt.el
+++ b/lisp/emacs-lisp/byte-opt.el
@@ -545,8 +545,8 @@
(eq (car-safe (nth 2 last)) 'cdr)
(eq (cadr (nth 2 last)) var))))
(progn
- (byte-compile-warn "value returned by `%s' is not used"
- (prin1-to-string (car form)))
+ (byte-compile-warn "value returned from %s is unused"
+ (prin1-to-string form))
nil)))
(byte-compile-log " %s called for effect; deleted" fn)
;; appending a nil here might not be necessary, but it can't hurt.
@@ -557,8 +557,20 @@
;; Otherwise, no args can be considered to be for-effect,
;; even if the called function is for-effect, because we
;; don't know anything about that function.
- (cons fn (mapcar 'byte-optimize-form (cdr form)))))))
-
+ (let ((args (mapcar #'byte-optimize-form (cdr form))))
+ (if (and (get fn 'pure)
+ (byte-optimize-all-constp args))
+ (list 'quote (apply fn (mapcar #'eval args)))
+ (cons fn args)))))))
+
+(defun byte-optimize-all-constp (list)
+ "Non-nil iff all elements of LIST satisfy `byte-compile-constp'."
+ (let ((constant t))
+ (while (and list constant)
+ (unless (byte-compile-constp (car list))
+ (setq constant nil))
+ (setq list (cdr list)))
+ constant))
(defun byte-optimize-form (form &optional for-effect)
"The source-level pass of the optimizer."
@@ -1117,55 +1129,6 @@
(byte-optimize-predicate form))
form))
-(put 'concat 'byte-optimizer 'byte-optimize-pure-func)
-(put 'symbol-name 'byte-optimizer 'byte-optimize-pure-func)
-(put 'regexp-opt 'byte-optimizer 'byte-optimize-pure-func)
-(put 'regexp-quote 'byte-optimizer 'byte-optimize-pure-func)
-(put 'string-to-syntax 'byte-optimizer 'byte-optimize-pure-func)
-(defun byte-optimize-pure-func (form)
- "Do constant folding for pure functions.
-This assumes that the function will not have any side-effects and that
-its return value depends solely on its arguments.
-If the function can signal an error, this might change the semantics
-of FORM by signaling the error at compile-time."
- (let ((args (cdr form))
- (constant t))
- (while (and args constant)
- (or (byte-compile-constp (car args))
- (setq constant nil))
- (setq args (cdr args)))
- (if constant
- (list 'quote (eval form))
- form)))
-
-;; Avoid having to write forward-... with a negative arg for speed.
-;; Fixme: don't be limited to constant args.
-(put 'backward-char 'byte-optimizer 'byte-optimize-backward-char)
-(defun byte-optimize-backward-char (form)
- (cond ((and (= 2 (safe-length form))
- (numberp (nth 1 form)))
- (list 'forward-char (eval (- (nth 1 form)))))
- ((= 1 (safe-length form))
- '(forward-char -1))
- (t form)))
-
-(put 'backward-word 'byte-optimizer 'byte-optimize-backward-word)
-(defun byte-optimize-backward-word (form)
- (cond ((and (= 2 (safe-length form))
- (numberp (nth 1 form)))
- (list 'forward-word (eval (- (nth 1 form)))))
- ((= 1 (safe-length form))
- '(forward-word -1))
- (t form)))
-
-(put 'char-before 'byte-optimizer 'byte-optimize-char-before)
-(defun byte-optimize-char-before (form)
- (cond ((= 2 (safe-length form))
- `(char-after (1- ,(nth 1 form))))
- ((= 1 (safe-length form))
- '(char-after (1- (point))))
- (t form)))
-
;; Fixme: delete-char -> delete-region (byte-coded)
;; optimize string-as-unibyte, string-as-multibyte, string-make-unibyte,
;; string-make-multibyte for constant args.
@@ -1290,6 +1253,18 @@ of FORM by signaling the error at compile-time."
(setq side-effect-and-error-free-fns (cdr side-effect-and-error-free-fns)))
nil)
+
+;; pure functions are side-effect free functions whose values depend
+;; only on their arguments. For these functions, calls with constant
+;; arguments can be evaluated at compile time. This may shift run time
+;; errors to compile time.
+
+(let ((pure-fns
+ '(concat symbol-name regexp-opt regexp-quote string-to-syntax)))
+ (while pure-fns
+ (put (car pure-fns) 'pure t)
+ (setq pure-fns (cdr pure-fns)))
+ nil)
(defun byte-compile-splice-in-already-compiled-code (form)
;; form is (byte-code "..." [...] n)
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index f74e48c4635..f1761c125ac 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -2341,7 +2341,7 @@ list that represents a doc string reference.
(eq (car (car (cdr tail))) 'declare))
(let ((declaration (car (cdr tail))))
(setcdr tail (cdr (cdr tail)))
- (princ `(if macro-declaration-function
+ (prin1 `(if macro-declaration-function
(funcall macro-declaration-function
',name ',declaration))
outbuffer)))))
@@ -3148,6 +3148,9 @@ That command is designed for interactive use only" fn))
;; more complicated compiler macros
+(byte-defop-compiler char-before)
+(byte-defop-compiler backward-char)
+(byte-defop-compiler backward-word)
(byte-defop-compiler list)
(byte-defop-compiler concat)
(byte-defop-compiler fset)
@@ -3159,6 +3162,34 @@ That command is designed for interactive use only" fn))
(byte-defop-compiler19 (/ byte-quo) byte-compile-quo)
(byte-defop-compiler19 nconc)
+(defun byte-compile-char-before (form)
+ (cond ((= 2 (length form))
+ (byte-compile-form (list 'char-after (if (numberp (nth 1 form))
+ (1- (nth 1 form))
+ `(1- ,(nth 1 form))))))
+ ((= 1 (length form))
+ (byte-compile-form '(char-after (1- (point)))))
+ (t (byte-compile-subr-wrong-args form "0-1"))))
+
+;; backward-... ==> forward-... with negated argument.
+(defun byte-compile-backward-char (form)
+ (cond ((= 2 (length form))
+ (byte-compile-form (list 'forward-char (if (numberp (nth 1 form))
+ (- (nth 1 form))
+ `(- ,(nth 1 form))))))
+ ((= 1 (length form))
+ (byte-compile-form '(forward-char -1)))
+ (t (byte-compile-subr-wrong-args form "0-1"))))
+
+(defun byte-compile-backward-word (form)
+ (cond ((= 2 (length form))
+ (byte-compile-form (list 'forward-word (if (numberp (nth 1 form))
+ (- (nth 1 form))
+ `(- ,(nth 1 form))))))
+ ((= 1 (length form))
+ (byte-compile-form '(forward-word -1)))
+ (t (byte-compile-subr-wrong-args form "0-1"))))
+
(defun byte-compile-list (form)
(let ((count (length (cdr form))))
(cond ((= count 0)
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index 2777ea775e9..9ae33599f09 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -364,31 +364,39 @@ Return the result of the last expression in BODY."
(defun edebug-pop-to-buffer (buffer &optional window)
;; Like pop-to-buffer, but select window where BUFFER was last shown.
- ;; Select WINDOW if it provided and it still exists. Otherwise,
+ ;; Select WINDOW if it is provided and still exists. Otherwise,
;; if buffer is currently shown in several windows, choose one.
;; Otherwise, find a new window, possibly splitting one.
- (setq window (if (and (windowp window) (edebug-window-live-p window)
- (eq (window-buffer window) buffer))
- window
- (if (eq (window-buffer (selected-window)) buffer)
- (selected-window)
- (edebug-get-buffer-window buffer))))
- (if window
- (select-window window)
- (if (one-window-p)
- (split-window))
- ;; (message "next window: %s" (next-window)) (sit-for 1)
- (if (eq (get-buffer-window edebug-trace-buffer) (next-window))
- ;; Don't select trace window
- nil
- (select-window (next-window))))
- (set-window-buffer (selected-window) buffer)
- (set-window-hscroll (selected-window) 0);; should this be??
+ (setq window
+ (cond
+ ((and (windowp window) (edebug-window-live-p window)
+ (eq (window-buffer window) buffer))
+ window)
+ ((eq (window-buffer (selected-window)) buffer)
+ ;; Selected window already displays BUFFER.
+ (selected-window))
+ ((edebug-get-buffer-window buffer))
+ ((one-window-p 'nomini)
+ ;; When there's one window only, split it.
+ (split-window))
+ ((let ((trace-window (get-buffer-window edebug-trace-buffer)))
+ (catch 'found
+ (dolist (elt (window-list nil 'nomini))
+ (unless (or (eq elt (selected-window)) (eq elt trace-window)
+ (window-dedicated-p elt))
+ ;; Found a non-dedicated window not showing
+ ;; `edebug-trace-buffer', use it.
+ (throw 'found elt))))))
+ ;; All windows are dedicated or show `edebug-trace-buffer', split
+ ;; selected one.
+ (t (split-window))))
+ (select-window window)
+ (set-window-buffer window buffer)
+ (set-window-hscroll window 0);; should this be??
;; Selecting the window does not set the buffer until command loop.
;;(set-buffer buffer)
)
-
(defun edebug-get-displayed-buffer-points ()
;; Return a list of buffer point pairs, for all displayed buffers.
(let (list)
@@ -2755,7 +2763,8 @@ MSG is printed after `::::} '."
) ; if edebug-save-windows
;; Restore current buffer always, in case application needs it.
- (set-buffer edebug-outside-buffer)
+ (if (buffer-name edebug-outside-buffer)
+ (set-buffer edebug-outside-buffer))
;; Restore point, and mark.
;; Needed even if restoring windows because
;; that doesn't restore point and mark in the current buffer.
diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el
index 3649757f782..9fec81ec2c5 100644
--- a/lisp/emacs-lisp/ewoc.el
+++ b/lisp/emacs-lisp/ewoc.el
@@ -191,8 +191,9 @@ BUT if it is the header or the footer in EWOC return nil instead."
(not (eq dll node))))
(setq node (ewoc--node-right node))))))
-(defun ewoc--insert-new-node (node data pretty-printer)
+(defun ewoc--insert-new-node (node data pretty-printer dll)
"Insert before NODE a new node for DATA, displayed by PRETTY-PRINTER.
+Fourth arg DLL -- from `(ewoc--dll EWOC)' -- is for internal purposes.
Call PRETTY-PRINTER with point at NODE's start, thus pushing back
NODE and leaving the new node's start there. Return the new node."
(save-excursion
@@ -262,8 +263,8 @@ fourth arg NOSEP non-nil inhibits this."
(unless header (setq header ""))
(unless footer (setq footer ""))
(setf (ewoc--node-start-marker dll) (copy-marker pos)
- foot (ewoc--insert-new-node dll footer hf-pp)
- head (ewoc--insert-new-node foot header hf-pp)
+ foot (ewoc--insert-new-node dll footer hf-pp dll)
+ head (ewoc--insert-new-node foot header hf-pp dll)
(ewoc--hf-pp new-ewoc) hf-pp
(ewoc--footer new-ewoc) foot
(ewoc--header new-ewoc) head))
@@ -301,7 +302,7 @@ Return the new node."
"Enter a new element DATA before NODE in EWOC.
Return the new node."
(ewoc--set-buffer-bind-dll ewoc
- (ewoc--insert-new-node node data (ewoc--pretty-printer ewoc))))
+ (ewoc--insert-new-node node data (ewoc--pretty-printer ewoc) dll)))
(defun ewoc-next (ewoc node)
"Return the node in EWOC that follows NODE.
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 09cb8436c89..164756dfdc3 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -1280,7 +1280,8 @@ and initial semicolons."
"\\|\\s-*\\([(;:\"]\\|`(\\|#'(\\)"))
(paragraph-separate
(concat paragraph-separate "\\|\\s-*\".*[,\\.]$"))
- (fill-column (if (integerp emacs-lisp-docstring-fill-column)
+ (fill-column (if (and (integerp emacs-lisp-docstring-fill-column)
+ (derived-mode-p 'emacs-lisp-mode))
emacs-lisp-docstring-fill-column
fill-column)))
(fill-paragraph justify))
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el
index 947b4063ad4..5254a8389b4 100644
--- a/lisp/emacs-lisp/lisp.el
+++ b/lisp/emacs-lisp/lisp.el
@@ -582,8 +582,7 @@ symbols with function definitions are considered. Otherwise, all
symbols with function definitions, values or properties are
considered."
(interactive)
-
- (let ((window (get-buffer-window "*Completions*")))
+ (let ((window (get-buffer-window "*Completions*" 0)))
(if (and (eq last-command this-command)
window (window-live-p window) (window-buffer window)
(buffer-name (window-buffer window)))
diff --git a/lisp/emacs-lisp/sregex.el b/lisp/emacs-lisp/sregex.el
index 447691d4046..8041aefc077 100644
--- a/lisp/emacs-lisp/sregex.el
+++ b/lisp/emacs-lisp/sregex.el
@@ -425,7 +425,7 @@ Here are the clauses allowed in an `sregex' or `sregexq' expression:
Stands for \"\\\\'\", matching the empty string at the end of text.
- the symbol `point'
- Stands for \"\\\\=\", matching the empty string at point.
+ Stands for \"\\\\=\\=\", matching the empty string at point.
- the symbol `word-boundary'
Stands for \"\\\\b\", matching the empty string at the beginning or
diff --git a/lisp/emacs-lisp/testcover.el b/lisp/emacs-lisp/testcover.el
index d8c171e111d..7d7e788523b 100644
--- a/lisp/emacs-lisp/testcover.el
+++ b/lisp/emacs-lisp/testcover.el
@@ -190,7 +190,7 @@ call to one of the `testcover-1value-functions'."
changes the instrumentation from edebug to testcover--much faster, no
problems with type-ahead or post-command-hook, etc. If BYTE-COMPILE is
non-nil, byte-compiles each function after instrumenting."
- (interactive "f")
+ (interactive "fStart covering file: ")
(let ((buf (find-file filename))
(load-read-function 'testcover-read)
(edebug-all-defs t))
@@ -428,10 +428,10 @@ FUN should be `testcover-reinstrument' for compositional functions,
list)
result))
-(defun testcover-end (buffer)
+(defun testcover-end (filename)
"Turn off instrumentation of all macros and functions in FILENAME."
- (interactive "b")
- (let ((buf (find-file-noselect buffer)))
+ (interactive "fStop covering file: ")
+ (let ((buf (find-file-noselect filename)))
(eval-buffer buf t)))
@@ -513,7 +513,7 @@ eliminated by adding more test cases."
(defun testcover-mark-all (&optional buffer)
"Mark all forms in BUFFER that did not get completley tested during
coverage tests. This function creates many overlays."
- (interactive "b")
+ (interactive "bMark forms in buffer: ")
(if buffer
(switch-to-buffer buffer))
(goto-char 1)
@@ -523,7 +523,7 @@ coverage tests. This function creates many overlays."
(defun testcover-unmark-all (buffer)
"Remove all overlays from FILENAME."
- (interactive "b")
+ (interactive "bUnmark forms in buffer: ")
(condition-case nil
(progn
(set-buffer buffer)
diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el
index db6586838bb..092611632ca 100644
--- a/lisp/emacs-lisp/timer.el
+++ b/lisp/emacs-lisp/timer.el
@@ -360,11 +360,16 @@ This function is called, by name, directly by the C code."
(defun run-at-time (time repeat function &rest args)
"Perform an action at time TIME.
Repeat the action every REPEAT seconds, if REPEAT is non-nil.
-TIME should be a string like \"11:23pm\", nil meaning now, a number of seconds
-from now, a value from `current-time', or t (with non-nil REPEAT)
-meaning the next integral multiple of REPEAT.
-REPEAT may be an integer or floating point number.
-The action is to call FUNCTION with arguments ARGS.
+TIME should be one of: a string giving an absolute time like
+\"11:23pm\" (the acceptable formats are those recognized by
+`diary-entry-time'; note that such times are interpreted as times
+today, even if in the past); a string giving a relative time like
+\"2 hours 35 minutes\" (the acceptable formats are those
+recognized by `timer-duration'); nil meaning now; a number of
+seconds from now; a value from `encode-time'; or t (with non-nil
+REPEAT) meaning the next integral multiple of REPEAT. REPEAT may
+be an integer or floating point number. The action is to call
+FUNCTION with arguments ARGS.
This function returns a timer object which you can use in `cancel-timer'."
(interactive "sRun at time: \nNRepeat interval: \naFunction: ")
@@ -385,7 +390,7 @@ This function returns a timer object which you can use in `cancel-timer'."
(if (numberp time)
(setq time (timer-relative-time (current-time) time)))
- ;; Handle relative times like "2 hours and 35 minutes"
+ ;; Handle relative times like "2 hours 35 minutes"
(if (stringp time)
(let ((secs (timer-duration time)))
(if secs
diff --git a/lisp/emacs-lisp/warnings.el b/lisp/emacs-lisp/warnings.el
index b75f0fd242f..99b0b3f3448 100644
--- a/lisp/emacs-lisp/warnings.el
+++ b/lisp/emacs-lisp/warnings.el
@@ -218,8 +218,9 @@ Default is :warning.
but raise suspicion of a possible problem.
:debug -- info for debugging only.
-BUFFER-NAME, if specified, is the name of the buffer for logging the
-warning. By default, it is `*Warnings*'.
+BUFFER-NAME, if specified, is the name of the buffer for logging
+the warning. By default, it is `*Warnings*'. If this function
+has to create the buffer, it disables undo in the buffer.
See the `warnings' custom group for user customization features.
@@ -227,16 +228,22 @@ See also `warning-series', `warning-prefix-function' and
`warning-fill-prefix' for additional programming features."
(unless level
(setq level :warning))
+ (unless buffer-name
+ (setq buffer-name "*Warnings*"))
(if (assq level warning-level-aliases)
(setq level (cdr (assq level warning-level-aliases))))
(or (< (warning-numeric-level level)
(warning-numeric-level warning-minimum-log-level))
(warning-suppress-p type warning-suppress-log-types)
(let* ((typename (if (consp type) (car type) type))
- (buffer (get-buffer-create (or buffer-name "*Warnings*")))
+ (old (get-buffer buffer-name))
+ (buffer (get-buffer-create buffer-name))
(level-info (assq level warning-levels))
start end)
(with-current-buffer buffer
+ ;; If we created the buffer, disable undo.
+ (unless old
+ (setq buffer-undo-list t))
(goto-char (point-max))
(when (and warning-series (symbolp warning-series))
(setq warning-series
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el
index ddd37b16cc2..67ec3660c65 100644
--- a/lisp/emulation/viper.el
+++ b/lisp/emulation/viper.el
@@ -1027,14 +1027,46 @@ It also can't undo some Viper settings."
(defadvice describe-key (before viper-describe-key-ad protect activate)
"Force to read key via `viper-read-key-sequence'."
- (interactive (list (viper-read-key-sequence "Describe key: "))
- ))
+ (interactive (let (key)
+ (setq key (viper-read-key-sequence
+ "Describe key (or click or menu item): "))
+ (list key
+ (prefix-numeric-value current-prefix-arg)
+ ;; If KEY is a down-event, read also the
+ ;; corresponding up-event.
+ (and (vectorp key)
+ (let ((last-idx (1- (length key))))
+ (and (eventp (aref key last-idx))
+ (memq 'down (event-modifiers
+ (aref key last-idx)))))
+ (or (and (eventp (aref key 0))
+ (memq 'down (event-modifiers
+ (aref key 0)))
+ ;; For the C-down-mouse-2 popup
+ ;; menu, there is no subsequent up-event.
+ (= (length key) 1))
+ (and (> (length key) 1)
+ (eventp (aref key 1))
+ (memq 'down (event-modifiers (aref key 1)))))
+ (read-event))))))
(defadvice describe-key-briefly
(before viper-describe-key-briefly-ad protect activate)
"Force to read key via `viper-read-key-sequence'."
- (interactive (list (viper-read-key-sequence "Describe key briefly: "))))
-
+ (interactive (let (key)
+ (setq key (viper-read-key-sequence
+ "Describe key (or click or menu item): "))
+ ;; If KEY is a down-event, read and discard the
+ ;; corresponding up-event.
+ (and (vectorp key)
+ (let ((last-idx (1- (length key))))
+ (and (eventp (aref key last-idx))
+ (memq 'down (event-modifiers (aref key last-idx)))))
+ (read-event))
+ (list key
+ (if current-prefix-arg
+ (prefix-numeric-value current-prefix-arg))
+ 1))))
(defadvice find-file (before viper-add-suffix-advice activate)
"Use `read-file-name' for reading arguments."
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog
index 62e7eaa21fe..70ffa4ede48 100644
--- a/lisp/erc/ChangeLog
+++ b/lisp/erc/ChangeLog
@@ -1,3 +1,259 @@
+2007-04-01 Michael Olson <mwolson@gnu.org>
+
+ * erc.el (erc-version-string): Release ERC 5.2.
+
+ * erc-auto.in, erc-chess.el, erc-list.el, erc-speak.el:
+ * erc-viper.el: Update copyright notices.
+
+ * erc.texi: Make Emacs Lisp source code in this document
+ essentially public domain. Update version to 5.2.
+ (Obtaining ERC): Mention extras tarball.
+ (Releases): Mention local GNU mirror.
+ (Sample Configuration): Remove notice.
+
+ * FOR-RELEASE (5.3): Add item for erc-nicklist.
+ Mark NEWS as done. Mark extras tarball as done.
+
+ * Makefile (VERSION): Increment to 5.2.
+ (TESTING): Remove.
+ (EXTRAS): New variable containing the contents of our "Emacs 22
+ extras" tarball.
+ (SOURCE): Remove $(TESTING).
+ (MISC): Add COPYING and ChangeLog.06. Fix ChangeLog.NNNN ->
+ ChangeLog.NN.
+ (release): Use $(SNAPDIR) instead of erc-$(VERSION).
+ (extras): New rule which implements the building of the extras
+ tarball.
+ (upload-extras): New rule to upload the extras tarball. It's
+ yucky to replicate upload, but oh well.
+
+ * NEWS: Mention extras tarball. Note which files have been
+ renamed. Note that erc-list is enabled by default, except in
+ Emacs 22.
+
+ * README.extras: New file which serves as a README for the extras
+ tarball.
+
+2007-03-31 Michael Olson <mwolson@gnu.org>
+
+ * NEWS: Update for the 5.2 release.
+
+ * FOR-RELEASE: Finish up 5.2 manual item. Add documentation item
+ for 5.3.
+
+ * erc.texi (Sample Session): Flesh out. Mention #erc.
+ (Modules): Defer to 5.3 release.
+ (Advanced Usage): Move Sample Configuration chapter ahead of
+ unfinished chapters.
+ (Sample Configuration): Write.
+ (Options): Mention how to see available ERC options. Defer to 5.3
+ release.
+ (Tips and Tricks): Remove, since it seems better to just include
+ tips and tricks in the sample configuration, commented out.
+
+ * erc-bbdb.el (erc-bbdb-search-name-and-create): Make prompt more
+ informative about how to skip merging.
+ (erc-bbdb-insinuate-and-show-entry-1): Move contents of
+ erc-bbdb-insinuate-and-show-entry here.
+ (erc-bbdb-insinuate-and-show-entry): Run
+ erc-bbdb-insinuate-and-show-entry-1 "outside" of the calling
+ function, so that we can avoid triggering a process-filter error
+ if the user hits C-g.
+
+2007-03-30 Michael Olson <mwolson@gnu.org>
+
+ * FOR-RELEASE: Solve C-c C-SPC keybinding dilemma.
+
+ * erc-autoaway.el (erc-autoaway-idle-method): Use `if' rather than
+ `cond' and `set' rather than `set-default'.
+
+ * erc-log.el: Avoid compiler warning by requiring erc-network
+ during compilation.
+ (erc-generate-log-file-name-function): Add tag to each option.
+ Add erc-generate-log-file-name-network.
+ (erc-generate-log-file-name-network): New function which generates
+ a log file name that uses network name rather than server name,
+ when possible.
+
+ * erc-track.el (track): Assimilate track-when-inactive module,
+ since there's no need to have two modules in one file -- an option
+ will do. Remove track-modified-channels alias. Call
+ erc-track-minor-mode-maybe, and tear down the minor mode when
+ disabling.
+ (erc-track-when-inactive): New option which determines whether to
+ track visible buffers when inactive. The default is not to do so.
+ (erc-track-visibility): Mention erc-track-when-inactive.
+ (erc-buffer-visible): Use erc-track-when-inactive.
+ (erc-track-enable-keybindings): New option which determines
+ whether to enable the global-level tracking keybindings. The
+ default is to do so, unless they would override another binding,
+ in which case we prompt the user about it.
+ (erc-track-minor-mode-map): Move global keybindings here.
+ (erc-track-minor-mode): New minor mode which only enables the
+ keybindings and does nothing else.
+ (erc-track-minor-mode-maybe): New function which starts
+ erc-track-minor-mode, but only if it hasn't already been started,
+ an ERC buffer exists, and the user OK's it, depending on the value
+ of `erc-track-enable-keybindings'.
+ (erc-track-switch-buffer): Display a message if someone calls this
+ without first enabling erc-track-mode.
+
+2007-03-17 Michael Olson <mwolson@gnu.org>
+
+ * erc.texi (Development): Mention ErcDevelopment page on
+ emacswiki.
+ (Getting Started): Mention ~/.emacs.d/.ercrc.el and the Customize
+ interface.
+ (Sample Session): New section that has a very rough draft for a
+ sample ERC session.
+ (Special Features): New section that explains some of the special
+ features of ERC. Taken from ErcFeatures on emacswiki, with
+ enhancements.
+
+2007-03-12 Diane Murray <disumu@x3y2z1.net>
+
+ * erc-autoaway.el (erc-autoaway-idle-method): When setting the new
+ value, disable and re-enable `erc-autoaway-mode' only if it was
+ already enabled. This fixes a bug where autoaway was enabled just
+ by loading the file.
+
+2007-03-10 Diane Murray <disumu@x3y2z1.net>
+
+ * erc-capab.el: Added more information to the Usage section.
+ (erc-capab-identify-prefix): Doc fix.
+ (erc-capab-identify-unidentified): New face.
+ (290): Removed. Definition moved to erc-backend.el.
+ (erc-capab-identify-send-messages): Renamed from
+ `erc-capab-send-identify-messages'.
+ (erc-capab-identify-setup): Use it.
+ (erc-capab-identify-get-unidentified-nickname): Renamed from
+ `erc-capab-get-unidentified-nickname'.
+ (erc-capab-identify-add-prefix): Use it. Use
+ `erc-capab-identify-unidentified' as the face.
+
+ * erc-backend.el (290): Moved here from erc-capab.el.
+
+ * erc.el (erc-select): Added an autoload cookie.
+ (erc-message-type-member, erc-restore-text-properties): Use
+ `erc-get-parsed-vector'.
+ (erc-auto-query): Set the default to 'bury since many new users
+ expect private messages from others to be in dedicated query
+ buffers, not the server buffer.
+ (erc-common-server-suffixes): Use "freenode" for freenode.net, not
+ "OPN". Added oftc.net.
+
+ * NEWS: Added note about erc-auto-query's new default setting.
+
+2007-03-03 Michael Olson <mwolson@gnu.org>
+
+ * erc.el (erc-open, erc): Docfixes.
+
+2007-03-02 Michael Olson <mwolson@gnu.org>
+
+ * FOR-RELEASE: Make section for 5.3 release and move erc-backend
+ cleanup there. Awaiting discussion before doing other things.
+ Add tasks for merging filename changes from the 5.2 release
+ branch, and for making a tarball of modules not in Emacs 22. Add
+ item to remind me to update NEWS. Mark backtab entry as done.
+
+ * erc-button.el (button): Add call to `erc-button-add-keys'.
+ (erc-button-keys-added): New variable tracking whether we've added
+ the keys yet.
+ (erc-button-add-keys): New function that adds the <backtab> key to
+ erc-mode-map.
+
+ * erc.texi: Change version to 5.2 (pre-release).
+
+2007-02-15 Michael Olson <mwolson@gnu.org>
+
+ * CREDITS: Update.
+
+ * erc-backend.el (erc-server-send-ping-interval): Change to use a
+ default of 30 seconds. Improve customize interface.
+ (erc-server-send-ping-timeout): New option that determines when to
+ consider a connection stalled and restart it. The default is
+ after 120 seconds.
+ (erc-server-send-ping): Use erc-server-send-ping-timeout instead
+ of erc-server-send-ping-interval. If
+ erc-server-send-ping-timeout is nil, do not ever kill and restart
+ a hung IRC process.
+
+ * erc.el (erc-modules): Include the name of the module in its
+ description. This should make it easier for people to find and
+ enable a particular module.
+
+2007-02-15 Vivek Dasmohapatra <vivek@etla.org>
+
+ * erc.el (erc-cmd-RECONNECT): Kill old process if it is still
+ alive.
+ (erc-message-english-PART): Properly escape "%" characters in
+ reason.
+
+ * erc-backend.el (erc-server-reconnecting): New variable that is
+ set when the user requests a reconnect, but the old process is
+ still alive. This forces the reconnect to work even though the
+ process is killed manually during reconnect.
+ (erc-server-connect): Initialize it.
+ (erc-server-reconnect-p): Use it.
+ (erc-process-sentinel-1): Set it to nil after the first reconnect
+ attempt.
+
+2007-02-07 Diane Murray <disumu@x3y2z1.net>
+
+ * erc-menu.el (erc-menu-definition): Fixed so that the separator
+ is between "Current channel" and "Pals, fools and other keywords",
+ not at the bottom of the "Current channel" submenu.
+
+2007-01-25 Diane Murray <disumu@x3y2z1.net>
+
+ * erc-networks.el (erc-server-alist): Removed SSL server for now
+ since `erc-server-select' doesn't know to use `erc-ssl'.
+
+ * erc-networks.el (erc-server-alist, erc-networks-alist): Added
+ definitions for oftc.net.
+
+ * erc-services.el (erc-nickserv-alist): Fixed OFTC message regexp.
+
+2007-01-22 Michael Olson <mwolson@gnu.org>
+
+ * erc-backend.el (erc-server-error-occurred): New variable that
+ indicates when an error has been signaled by the server. This
+ should fix an infinite reconnect bug when giving some servers a
+ bogus :full-name. Thanks to Angelina Carlton for the report.
+ (erc-server-connect): Initialize erc-server-error-occurred.
+ (erc-server-reconnect-p): Use it.
+ (ERROR): Set it.
+
+ * erc-services.el (erc-nickserv-alist): Alphabetize and add Ars
+ and QuakeNet. Standardize look of entries. Fix type mismatch
+ error in customize interface.
+ (erc-nickserv-passwords): Alphabetize and add missing entries from
+ erc-nickserv-alist.
+
+2007-01-21 Michael Olson <mwolson@gnu.org>
+
+ * erc.el (erc-header-line-format): Document how to disable the
+ header line, and add a customization type for it. Also, make the
+ changes take effect immediately.
+
+2007-01-19 Michael Olson <mwolson@gnu.org>
+
+ * erc.texi (Modules): Document new menu module. Thanks to Leo
+ for noticing.
+
+2007-01-16 Diane Murray <disumu@x3y2z1.net>
+
+ * erc-stamp.el (erc-insert-timestamp-left): Fixed so that the
+ whitespace string filler is hidden correctly when timestamps are
+ hidden.
+ (erc-toggle-timestamps): New function to use instead of
+ `erc-show-timestamps' and `erc-hide-timestamps'.
+
+ * erc.el (erc-restore-text-properties): Moved here from
+ erc-fill.el since it could be useful in general.
+
+ * erc-fill.el (erc-restore-text-properties): Removed.
+
2007-01-13 Michael Olson <mwolson@gnu.org>
* erc.el (erc-command-regexp): New variable that is used to match
@@ -73,6 +329,10 @@
(erc-format-lag-time): New function.
(erc-update-mode-line-buffer): Use it.
+2007-01-10 Michael Olson <mwolson@gnu.org>
+
+ * erc.el: Fix typo in url-irc-function instructions.
+
2007-01-09 Michael Olson <mwolson@gnu.org>
* erc.el (erc-system-name): New option that determines the system
@@ -89,1260 +349,10 @@
(erc-menu-add, erc-menu-remove): New functions that add and remove
the ERC menu.
-2006-12-28 Michael Olson <mwolson@gnu.org>
-
- * erc-list.el: Change header to mention that this is part of ERC,
- rather than GNU Emacs.
-
- * erc-networks.el (erc-server-alist): Add Ars OpenIRC and
- LinuxChix networks. Thanks to Angelina Carlton for mentioning
- them. Properly escape periods in Konfido.Net and Kewl.Org.
- (erc-networks-alist): Add entries for Ars and LinuxChix, though
- the latter does not actually provide an announced network name.
-
- * erc-services.el (erc-nickserv-identify-mode): Add 'both method,
- which waits for a NickServ message if the network supports it,
- otherwise sends the password after connecting.
- (erc-nickserv-identify-mode): Default to 'both.
- (erc-nickserv-passwords): Add OFTC and Azzurra to custom options.
- (erc-nickserv-alist): Indentation fix.
- (erc-nickserv-identify-on-connect)
- (erc-nickserv-identify-on-nick-change): Handle 'both method.
-
-2006-12-28 Leo <sdl.web@gmail.com> (tiny change)
-
- * erc.el (erc-iswitchb): Wrap body in unwind-protect so that
- hitting C-g does not leave iswitchb-mode on.
-
-2006-12-27 Michael Olson <mwolson@gnu.org>
-
- * erc.el (erc-cmd-RECONNECT): New command that calls
- erc-server-reconnect.
-
- * erc-backend.el (erc-server-reconnect-count): New server variable
- that keeps track of reconnection attempts.
- (erc-server-reconnect-attempts): New option that determines the
- number of reconnection attempts that ERC will make per server.
- (erc-server-reconnect-timeout): New option that determines the
- amount of time, in seconds, that ERC will wait between successive
- reconnect attempts.
- (erc-server-reconnect): New function that reestablishes the
- current IRC connection. Move some commands from
- erc-process-sentinel-1 here.
- (erc-process-sentinel-1): If we have been disconnected, loop until
- we either reconnect or run out of attempts.
- (erc-server-reconnect-p): Move higher and make this a defsubst,
- since I'm worried about the current buffer changing from
- underneath us. Implement limit of number of reconnect attempts..
-
- * erc.texi (Getting Started): Update for /RECONNECT command.
-
-2006-12-26 Michael Olson <mwolson@gnu.org>
-
- * erc.el (erc-open): Restore old point correctly, or at least get
- closer to doing so than before.
-
-2006-12-13 Leo <sdl.web@gmail.com> (tiny change)
-
- * erc.el (erc-iswitchb): Temporarily enable iswitchb mode if it
- isn't active already, instead of leaving it on.
-
-2006-12-10 Juanma Barranquero <lekktu@gmail.com>
-
- * erc-ezbounce.el (erc-ezb-init-session-list): Doc fix.
-
-2006-12-08 Michael Olson <mwolson@gnu.org>
-
- * erc.el: Re-evaluate contributions from a contributor, and found
- them under 15 lines of non-obvious code, so it is safe to remove
- the copyright notice.
- (erc-modules): Remove list module.
-
- * erc-list.el: Remove, since a contributor who has not completed
- their assignment has contributed significantly more than 15 lines
- of code to this file.
-
-2006-11-28 Juanma Barranquero <lekktu@gmail.com>
-
- * erc.el (erc-cmd-BANLIST, erc-cmd-MASSUNBAN): Simplify.
- (erc-prompt-for-channel-key, erc-ignore-reply-list, erc-send-post-hook)
- (erc-active-buffer, erc-join-buffer, erc-frame-alist, erc-with-buffer)
- (erc-modules, erc-display-message-highlight, erc-process-input-line)
- (erc-cmd-HELP, erc-server-hooks, erc-echo-notice-in-user-buffers)
- (erc-format-my-nick, erc-echo-notice-in-user-and-target-buffers)
- (erc-echo-notice-in-first-user-buffer, erc-connection-established)
- (erc-update-user-nick, erc-update-channel-member, erc-highlight-notice)
- (erc-command-symbol, erc-add-query, erc-process-script-line)
- (erc-determine-parameters, erc-client-info, erc-popup-input-buffer):
- (erc-script-echo): Fix typos in docstrings.
- (erc-channel-user-op-p, erc-channel-user-voice-p, erc-startup-file-list)
- (define-erc-module, erc-once-with-server-event)
- (erc-once-with-server-event-global, erc-debug-irc-protocol)
- (erc-log-irc-protocol, erc-cmd-LOAD, erc-update-user)
- (erc-update-current-channel-member, erc-load-script):
- (erc-mode-line-away-status-format): Doc fixes.
-
-2006-11-20 Andrea Russo <rastandy@inventati.org> (tiny change)
-
- * erc-dcc.el (erc-dcc-chat-setup): Initialize `erc-input-marker'
- before calling `erc-display-prompt'.
-
-2006-11-24 Juanma Barranquero <lekktu@gmail.com>
-
- * erc.el (erc-after-connect, erc-open-ssl-stream)
- (erc-display-line-1, erc-display-line):
- * erc-backend.el (005): Fix space/tab mixup in docstrings.
-
-2006-11-20 Michael Olson <mwolson@gnu.org>
-
- * erc.el (erc-version-string): Call this Version 5.2 stable
- pre-release, since it diverges slightly from our 5.2 branch, in
- that unstable features are not included.
- (erc-update-modules): Display better error message when module not
- found.
-
-2006-11-12 Michael Olson <mwolson@gnu.org>
-
- * erc-log.el: Save all log buffers when Emacs exits, in case
- someone ignores the warning about open processes. Remove the
- advice code in the commentary.
- (erc-save-query-buffers): Docfix.
- (erc-log-save-all-buffers): New function that saves all ERC
- buffers to logs.
- (erc-current-logfile): Fix bug in filename selection, where the
- current buffer was erroneously being preferred over the given
- buffer.
-
-2006-11-08 Michael Olson <mwolson@gnu.org>
-
- * erc.el (erc-string-to-port): Avoid error when a numerical port
- is passed. Thanks to Zekeriya KOÇ for the report.
-
-2006-11-08 Åukasz Demianiuk <ldemianiuk@gmail.com> (tiny change)
-
- * erc.el (erc-header-line): Fix typo.
-
-2006-11-06 Juanma Barranquero <lekktu@gmail.com>
-
- * erc-dcc.el (erc-dcc-send-file): Fix typo in error message.
-
- * erc.el (read-passwd):
- * erc-autoaway.el (erc-autoaway-reestablish-idletimer):
- * erc-truncate.el (truncate): Fix typo in docstring.
-
-2006-10-21 Michael Olson <mwolson@gnu.org>
-
- * erc.el (erc-iswitchb): Fix bug when hitting C-c C-b without
- first loading iswitchb. Thanks to Leo for the report.
-
-2006-10-10 Michael Olson <mwolson@gnu.org>
-
- * erc.el (erc-default-port): Make the default be 6667 instead of
- ircd. since Mac OS X apparently has problems with looking up that
- port name.
-
- * erc-backend.el (353): Receive names after displaying the initial
- message, instead of before.
-
-2006-10-05 Diane Murray <disumu@x3y2z1.net>
-
- * erc.el (erc-my-nick-face): New face.
- (erc): Use FULL-NAME argument, not `erc-user-full-name'. This
- fixes a bug where the :full-name argument passed to the function
- was not respected.
- (erc-format-my-nick): Use `erc-my-nick-face'. This should help
- make it easier to find messages you sent in conversations when
- `erc-show-my-nick' is non-nil.
- (erc-compute-server): Doc fix.
-
-2006-10-01 John J Foerch <jjfoerch@earthlink.net> (tiny change)
-
- * erc-stamp.el (erc-insert-timestamp-right): Exclude the newline
- from the erc-timestamp field.
-
-2006-09-11 Michael Olson <mwolson@gnu.org>
-
- * erc-nicklist.el (erc-nicklist-insert-contents): Add missing
- parenthesis. Thanks to Stephan Stahl for the report.
-
-2006-09-10 Eric Hanchrow <offby1@blarg.net> (tiny change)
-
- * erc.el (erc-cmd-IGNORE): Prompt user if this might be a regexp
- instead of a single user.
-
-2006-09-10 Michael Olson <mwolson@gnu.org>
-
- * erc.el (erc-generate-new-buffer-name): If this is a server
- buffer and a process exists already, create a new buffer.
- (erc-open): If the IRC session was continued, restore the old
- point. Thanks to Stephan Stahl for the report.
- (erc-member-ignore-case): Coding style tweak.
- (erc-cmd-UNIGNORE): Quote the user before comparison. If we don't
- find the user listed verbatim, try to match them against the list
- using string-match. In this case, prompt as to whether the regexp
- should be removed.
- (erc-ignored-user-p): Remove CL-ism.
-
- * erc-autoaway.el (erc-autoaway-possibly-set-away): Check to see
- whether we are already away.
-
- * erc-menu.el: Fix potential compiler warning.
-
-2006-09-07 Diane Murray <disumu@x3y2z1.net>
-
- * erc.el: Updated Commentary and URL.
- (erc-iswitchb, erc-display-line, erc-set-modes, erc-update-modes)
- (erc-arrange-session-in-multiple-windows): No need to check if
- `erc-server-process' is bound.
- (erc-server-buffer-live-p): Doc fix.
- (erc-part-from-channel): Don't use any initial contents at prompt.
- (erc-format-nick, erc-format-@nick): Doc fix. Use `when'.
- (s367): Fixed to support only banmask and channel which is the
- standard. Also, there's no reason to add a message to each banned
- user entry trying to persuade the user to use /banlist instead of
- /mode #channel +b. That part of the message was a little
- confusing, anyways.
- (s367-set-by): New catalog entry. The user who set the ban and
- the time of ban seem to be specific to only certain servers such
- as freenode.
-
- * erc-autoaway.el (erc-autoaway-idletimer): Doc fix.
-
- * erc-backend.el (erc-server-process-alive): No need to check if
- `erc-server-process' is bound.
- (367): Use s367 or s367-set-by where appropriate.
-
- * erc-compat.el: Fixed URL.
-
- * erc-dcc.el: Updated copyright years. Added Usage section.
- Changed supported Emacs version number from 21.3.50 to 22 in
- Commentary.
-
- * erc-ibuffer.el (erc-server-name, erc-target, erc-away): No need
- to check if `erc-server-process' is bound.
-
- * erc-nicklist.el: Added to the Commentary section an explanation
- that `erc-nicklist-quit' should be called from within the nicklist
- buffer. Set file coding to utf-8 so a contributor's name is
- displayed correctly.
- (erc-nicklist-icons-directory): Use customize type directory
- instead of string.
- (erc-nicklist-insert-contents): Set bbdb-nick to an empty string
- if it wasn't found. This fixes a bug where an error would occur
- when using `string=' on bbdb-nick if it was nil.
-
- * erc-replace.el: Removed URL from file information since it
- doesn't exist.
-
- * erc-sound.el: Updated copyright years. Fixed Commentary and
- added Usage section.
- (define-erc-module): Add and remove `erc-ctcp-query-SOUND' to
- `erc-ctcp-query-SOUND-hook' here. Removed the keybinding
- definitions.
- (erc-play-sound, erc-default-sound, erc-cmd-SOUND)
- (erc-ctcp-query-SOUND): Doc fix.
- (erc-play-command): Removed, not necessary anymore.
- (erc-ctcp-query-SOUND-hook): Set to nil as default. Moved up
- higher in code, added docstring.
- (erc-play-sound): Use `play-sound-file'. It exists in GNU Emacs
- as well since version 21 or earlier. Removed commented-out older
- version of function.
-
- * NEWS: Fixed formatting, added channel tracking change.
-
-2006-09-03 Diane Murray <disumu@x3y2z1.net>
-
- * erc.el: M-x erc RET can now be used to start ERC.
- (erc-open): Renamed from `erc'.
- (erc-before-connect): Change erc-select to erc.
- (erc): Renamed from `erc-select'. Use `erc-open'.
- (erc-select): Defined as alias of `erc'.
- (erc-ssl): Renamed from `erc-select-ssl'. Use `erc'.
- (erc-select-ssl): Defined as alias of `erc-ssl'.
- (erc-cmd-SERVER): Use `erc'.
- (erc-query, erc-handle-irc-url): Use `erc-open'.
-
- * erc-backend.el (erc-process-sentinel-1, JOIN): Use `erc-open'.
-
- * erc-menu.el (erc-menu-definition): Use `erc'.
-
- * erc-networks.el: Updated copyright years.
- (erc-server-select): Use keyword arguments when calling `erc'.
-
- * erc.texi (Getting Started, Connecting): Changed erc-select to
- erc.
-
- * NEWS: Added note about these changes.
-
-2006-08-20 Diane Murray <disumu@x3y2z1.net>
-
- * erc-backend.el (erc-process-sentinel-1): Doc fix. Let
- `erc-server-reconnect-p' check all condition cases.
- (erc-server-reconnect-p): Moved rest of checks from
- `erc-process-sentinel-1' to here. Now takes an argument, EVENT.
-
-2006-08-21 Diane Murray <disumu@x3y2z1.net>
-
- * erc-track.el (erc-track-mode-line-mouse-face): New variable.
- (erc-make-mode-line-buffer-name): Add help-echo and mouse-face
- properties to channel name.
-
-2006-08-20 Michael Olson <mwolson@gnu.org>
-
- * erc.el (erc-with-server-buffer): New macro that switches to the
- current ERC server buffer and runs some code. If no server buffer
- is available, return nil. This is a useful way to access
- variables in the server buffer.
- (erc-open-server-buffer-p): New function that returns non-nil if
- the given buffer is an ERC server buffer that has an open IRC
- process.
-
-2006-08-14 Diane Murray <disumu@x3y2z1.net>
-
- * erc-menu.el: Updated copyright years. Removed EmacsWiki URL.
- (erc-menu-definition): Name the menu "ERC" instead of "IRC" to
- avoid confusion with rcirc and other clients.
-
- * erc-backend.el (erc-server-banned): New variable.
- (erc-server-connect): Set `erc-server-banned' to nil.
- (erc-process-sentinel-1): Use `erc-server-reconnect-p'.
- (erc-server-reconnect-p): New function. Return non-nil if the
- user wants automatic reconnects and if the user has not been
- banned from the server. This should fix a bug where ERC gets into
- a loop trying to reconnect with no way to stop it when the user is
- denied access to the server due to a server ban. It might also
- help when Tor users are blocked from freenode if freenode servers
- send the 465 message before disconnecting.
- (465): Handle "banned from server" error notices.
-
-2006-08-13 Romain Francoise <romain@orebokech.com>
-
- * erc-match.el (erc-log-matches-make-buffer): End `y-or-n-p'
- prompt with a space.
-
-2006-08-11 Michael Olson <mwolson@gnu.org>
-
- * erc-fill.el (erc-fill): Skip any initial empty lines so that we
- avoid errors when inserting disconnect messages and other messages
- that begin with newlines.
-
-2006-08-07 Michael Olson <mwolson@gnu.org>
-
- * erc-backend.el (erc-process-sentinel-1): Use erc-display-message
- in several places instead of inserting text.
- (erc-process-sentinel): Move to the input-marker before removing
- the prompt.
-
- * erc.el (erc-port): Fix customization options.
- (erc-display-message): Handle null type explicitly. Previously,
- this was relying on a chance side-effect. Cosmetic indentation
- tweak.
- (english): Add 'finished and 'terminated entries to the catalog.
- Add initial and terminal newlines to 'disconnected and
- 'disconnected-noreconnect entries. Avoid long lines.
-
-2006-08-06 Michael Olson <mwolson@gnu.org>
-
- * erc-backend.el (erc-server-send-queue): Update from Circe
- version of this function.
-
- * erc.el (erc-arrange-session-in-multiple-windows): Fix bug with
- multi-tty Emacs.
- (erc-select-startup-file): Fix bug introduced by recent change.
-
-2006-08-05 Michael Olson <mwolson@gnu.org>
-
- * erc-log.el (erc-log-standardize-name): New function that returns
- a filename that is safe for use for a log file.
- (erc-current-logfile): Use it.
-
- * erc.el (erc-startup-file-list): Search in ~/.emacs.d first,
- since that is a fairly standard directory.
- (erc-select-startup-file): Re-write to use
- convert-standard-filename, which will ensure that MS-DOS systems
- look for the _ercrc.el file.
-
-2006-08-02 Michael Olson <mwolson@gnu.org>
-
- * erc.el (erc-version-string): Release ERC 5.1.4.
-
- * Makefile, NEWS, erc.texi: Update for the 5.1.4 release.
-
- * erc.el (erc-active-buffer): Fix bug that caused messages to go
- to the wrong buffer. Thanks to offby1 for the report.
-
- * erc-backend.el (erc-coding-system-for-target): Handle case where
- target is nil. Thanks to Kai Fan for the patch.
-
-2006-07-29 Michael Olson <mwolson@gnu.org>
-
- * erc-log.el (erc-log-setup-logging): Don't offer to save the
- buffer. It will be saved automatically killed. Thanks to Johan
- Bockgård and Tassilo Horn for pointing this out.
-
-2006-07-27 Johan Bockgård <bojohan@users.sourceforge.net>
-
- * erc.el (define-erc-module): Make find-function and find-variable
- find the names constructed by `define-erc-module' in Emacs 22.
-
-2006-07-14 Michael Olson <mwolson@gnu.org>
-
- * erc-log.el (log): Make sure that we enable logging on
- already-opened buffers as well, in case the user toggles this
- module after loading ERC. Also be sure to remove logging ability
- from all ERC buffers when the module is disabled.
- (erc-log-setup-logging): Set buffer-file-name to nil rather than
- the empty string. This should fix some errors that occur when
- quitting Emacs without first killing all ERC buffers.
- (erc-log-disable-logging): New function that removes the logging
- ability from the current buffer.
-
- * erc-spelling.el (spelling): Use dolist and buffer-live-p.
-
-2006-07-12 Michael Olson <mwolson@gnu.org>
-
- * erc-match.el (erc-log-matches): Bind inhibit-read-only rather
- than call toggle-read-only.
-
- * erc.el (erc-handle-irc-url): Move here from erc-goodies.el and
- add autoload cookie.
-
-2006-07-09 Michael Olson <mwolson@gnu.org>
-
- * erc.el (erc-version-string): Release ERC 5.1.3.
-
- * erc.texi: Update for the 5.1.3 release.
-
- * erc-autoaway.el (erc-autoaway-set-back): Fix bug after returning
- from being set automatically away and current buffer is not an ERC
- buffer.
-
- * erc-identd.el: Fix compiler error.
-
- * erc.texi (Development): Use @subheading instead of @subsection.
- (Advanced Usage): Add menu.
- (Connecting): Fully document how to connect to an IRC server.
- (Options, Tips and Tricks, Sample Configuration): New unwritten
- sections.
-
- * erc.el (erc-server, erc-port, erc-nick, erc-nick-uniquifier)
- (erc-user-full-name, erc-password): Docfixes and customization
- interface tweaks.
- (erc-try-new-nick-p): Rename from
- `erc-manual-set-nick-on-bad-nick-p' and invert meaning.
- (erc-nickname-in-use): Use `erc-try-new-nick-p'. Check the length
- of `erc-nick-uniquifier', in case someone wants multiple
- characters.
- (erc-compute-server, erc-compute-nick, erc-compute-full-name)
- (erc-compute-port): Docfixes.
-
- * erc-log.el (log): Move all add-hook calls here, rather than
- executing them immediately, and also cause them to be un-hooked
- when the module is removed.
- (erc-save-buffer-on-part): Move next to
- `erc-save-queries-on-quit'.
- (erc-save-buffer-on-quit, erc-save-queries-on-quit): Default to t.
- (erc-log-write-after-send, erc-log-write-after-insert): Default to
- nil. This makes things fast, but reasonably failsafe, by default.
-
-2006-07-08 Michael Olson <mwolson@gnu.org>
-
- * erc-log.el (erc-log-insert-log-on-open): Make this nil by
- default, since most IRC clients don't do this.
- (erc-log-write-after-send): New option that determines whether the
- log file will be written to after every sent message.
- (erc-log-write-after-insert): New option that determines whether
- the log file will be written to when new text is added to a logged
- ERC buffer.
- (log): Use the aforementioned options.
-
- * erc.texi (Modules): Document the "completion" module.
-
- * erc-pcomplete.el (pcomplete-erc-nicks): Make sure that we don't
- have a nil element in the list when ignore-self is non-nil.
-
-2006-07-05 Michael Olson <mwolson@gnu.org>
-
- * erc.el (erc-modules): Add the `page' module to the list.
-
- * erc.texi (Modules): Add entries for `list' and `page' modules.
- Change "spell" to "spelling".
- (History): Use past tense throughout.
-
-2006-07-02 Michael Olson <mwolson@gnu.org>
-
- * erc-backend.el (erc-call-hooks): Fix (stringp nil) error that
- can happen when doing /PART.
-
- * erc.el (erc-quit-reason-various-alist)
- (erc-part-reason-various-alist): In the example, use "^$" as an
- example, since "" matches anything.
- (erc-quit-reason-various, erc-part-reason-various): If no argument
- is given, and no matches are found, use our default reason instead
- of "nil".
-
-2006-06-30 Michael Olson <mwolson@gnu.org>
-
- * erc.texi (Modules): Mention identd.
- (Releases): Update mailing list address and download location.
- (Development): Refactor. Provide updated directions for Arch.
- Make URLs clickable.
- (Keystroke Summary): Typo fix. Use more Texinfo syntax.
- (Getting Started): Give simpler example. We do not need to
- explicitly load every module.
- (History): Update.
-
- * erc.el (erc-version-modules): Remove, since we do not use this
- function anymore.
- (erc-latest-version, erc-ediff-latest-version): Remove, since this
- was only useful back when ERC consisted of one file.
- (erc-modules): Add line for identd.
- (erc-get-channel-mode-from-keypress): Typo fix.
-
- * erc-imenu.el: Remove unnecessary lines in header.
-
- * erc-goodies.el (erc-handle-irc-url): Docfix.
-
- * erc-identd.el: Define an ERC module for this.
- (erc-identd-start): Don't create a process buffer if possible.
- Otherwise, use conventional hidden names for process buffers.
-
-2006-06-29 Michael Olson <mwolson@gnu.org>
-
- * erc-backend.el (erc-coding-system-for-target): Match
- case-insensitively. Use a pattern match instead of `assoc', as
- per the documentation for `erc-encoding-coding-alist'.
-
- * erc-track.el (erc-track-shorten-aggressively): Fix typo.
-
-2006-06-27 Michael Olson <mwolson@gnu.org>
-
- * erc.el: Update maintainer information and URLs.
-
-2006-06-14 Michael Olson <mwolson@gnu.org>
-
- * erc.el (erc-active-buffer): If the active buffer has been
- deleted, default to the server buffer.
- (erc-toggle-flood-control): When the user hits C-c C-f, make flood
- control really toggle, not unconditionally turn off.
-
-2006-06-12 Michael Olson <mwolson@gnu.org>
-
- * NEWS: Add items since the 5.1.2 release.
-
- * erc-autoaway.el (erc-autoaway-caused-away): New variable that
- indicates whether the current away status was caused by this
- module.
- (erc-autoaway-set-back): Only set back if this module set the user
- away.
- (erc-autoaway-set-away): Update `erc-autoaway-caused-away'.
- (erc-autoaway-reset-indicators): New function that resets some
- indicators when the user is no longer away.
- (autoaway): Add the above function to the 305 hook.
-
-2006-06-05 Romain Francoise <romain@orebokech.com>
-
- * erc.texi (History): Fix various typos.
-
-2006-06-04 Michael Olson <mwolson@gnu.org>
-
- * erc-autoaway.el (erc-autoaway-idle-method): Move after the
- definition of the autoaway module.
- (autoaway): Don't do anything if erc-autoaway-idle-method is
- unbound. This prevents an error on startup.
-
-2006-06-03 Michael Olson <mwolson@gnu.org>
-
- * erc-autoaway.el: Thanks to Mark Plaksin for the ideas and patch.
- (erc-autoaway-idle-method): Renamed from
- `erc-autoaway-use-emacs-idle'. We have more than two choices for
- how to do this, so it's best to make this take symbol values.
- Improve documentation. Remove warning against Emacs idle-time;
- the point is moot now that we get user idle time via a different
- method. Make sure we disable and re-enable the module when
- changing this value.
- (autoaway): Conditionalize on the above option. If using the idle
- timer or user idle methods, don't add anything to the
- send-completed or server-001 hooks, since it is unnecessary.
- (erc-autoaway-reestablish-idletimer, erc-autoaway-message):
- Docfix.
- (erc-autoaway-idle-seconds): Use erc-autoaway-idle-method.
- (erc-autoaway-reset-idle-irc): Renamed from
- `erc-autoaway-reset-idle'. Don't pass line to
- `erc-autoaway-set-away', since it is not used.
- (erc-autoaway-reset-idle-user): New function that resets the idle
- state for user idle time.
- (erc-autoaway-set-back): Remove line argument, since it is not
- used.
-
-2006-06-01 Michael Olson <mwolson@gnu.org>
-
- * erc.el (erc-buffer-filter): Make sure all buffers returned from
- this are live.
-
-2006-05-01 Edward O'Connor <ted@oconnor.cx>
-
- * erc-goodies.el (erc-handle-irc-url): New function, suitable as
- a value for `url-irc-function'.
-
-2006-04-18 Diane Murray <disumu@x3y2z1.net>
-
- * erc-pcomplete.el (pcomplete-erc-nicks): Added new optional
- argument IGNORE-SELF. If this is non-nil, don't return the user's
- current nickname. Doc fix.
- (pcomplete/erc-mode/complete-command): Don't complete the current
- nickname.
-
-2006-04-05 Diane Murray <disumu@x3y2z1.net>
-
- * erc.el (erc-cmd-SV): Removed the exclamation point. Show the
- build date as it's shown in `emacs-version'.
-
- * erc-capab.el (erc-capab-identify-add-prefix): Insert the prefix
- with the same face property as the previous character.
-
-2006-04-02 Michael Olson <mwolson@gnu.org>
-
- * erc-backend.el, erc-ezbounce.el, erc-join.el, erc-netsplit.el,
- erc.el: Make sure to include a newline inside of negated classes,
- so that a newline is not matched.
-
-2006-04-01 Michael Olson <mwolson@gnu.org>
-
- * erc-backend.el (erc-server-connect-function): Don't try to
- detect the existence of the `open-network-stream-nowait' function,
- since I can't find it in Emacs21, XEmacs21, or Emacs22.
-
-2006-03-26 Michael Olson <mwolson@gnu.org>
-
- * erc.el (erc-header-line): New face that will be used to colorize
- the text of the header-line, provided that
- `erc-header-line-face-method' is non-nil.
- (erc-prompt-face): Fix formatting.
- (erc-header-line-face-method): New option that determines the
- method used for colorizing header-line text. This may be a
- function, nil, or non-nil.
- (erc-update-mode-line-buffer): Use the aforementioned option and
- face to colorize the header-line text, if that is what the user
- wants.
- (erc-send-input): If flood control is not activated, don't split
- the input line.
-
-2006-03-25 Michael Olson <mwolson@gnu.org>
-
- * erc.el (erc-cmd-QUOTE): Install patch from Aravind Gottipati
- that fixes the case where there is no leading whitespace. Only
- remove the first space character, though.
-
- * erc-identd.el (erc-identd-start): Fix a bug by making sure that
- erc-identd-process is set properly.
- (erc-identd-start, erc-identd-stop): Add autoload cookies.
- (erc-identd-start): Pass :host parameter so this works with Emacs
- 22.
-
-2006-03-09 Diane Murray <disumu@x3y2z1.net>
-
- * erc-button.el (erc-button-keymap): Use <backtab> rather than
- <C-tab> for `erc-button-previous' as it is a more standard key
- binding for this type of function.
-
-2006-02-28 Diane Murray <disumu@x3y2z1.net>
-
- * erc-capab.el: Removed things that were accidentally committed on
- 2006-02-20. Removed Todo section.
- (erc-capab-unidentified): Removed.
-
-2006-02-26 Michael Olson <mwolson@gnu.org>
-
- * erc-capab.el: Use (eval-when-compile (require 'cl)).
- (erc-capab-unidentified): Fix compiler warning by specifying
- group.
-
-2006-02-20 Diane Murray <disumu@x3y2z1.net>
-
- * erc-capab.el (erc-capab-send-identify-messages): Fixed comment
- to explain thoughts better. `erc-server-parameters' is an
- associated list when it's set, not a string.
-
-2006-02-19 Michael Olson <mwolson@gnu.org>
-
- * erc-capab.el (erc-capab-send-identify-messages): Make sure some
- parameters are strings before using them. Thanks to Alejandro
- Benitez for the report.
-
- * erc.el (erc-version-string): Release ERC 5.1.2.
-
-2006-02-19 Diane Murray <disumu@x3y2z1.net>
-
- * erc-button.el (erc-button-keymap): Bind `erc-button-previous' to
- <C-tab>.
- (erc-button-previous): New function.
-
-2006-02-15 Michael Olson <mwolson@gnu.org>
-
- * NEWS: Add category for ERC 5.2.
-
- * erc.el (erc): Move to the end of the buffer when a continued
- session is detected. Thanks to e1f and indio for the report and
- testing a potential fix.
-
-2006-02-14 Michael Olson <mwolson@gnu.org>
-
- * debian/changelog: Prepare a new Debian package.
-
- * Makefile (debprepare): New rule that creates an ERC snapshot
- directory for use in both new Debian releases and revisions for
- Debian packages.
- (debrelease, debrevision-mwolson): Use debprepare.
-
- * NEWS: Bring up-to-date.
-
- * erc-stamp.el (erc-insert-timestamp-right): For now, put
- timestamps before rather than after erc-fill-column when
- erc-timestamp-right-column is nil. This way we won't surprise
- anyone unpleasantly, or so it is hoped.
-
-2006-02-13 Michael Olson <mwolson@gnu.org>
-
- * erc-dcc.el: Use (eval-when-compile (require 'cl)).
-
-2006-02-12 Michael Olson <mwolson@gnu.org>
-
- * erc-autoaway.el, erc-dcc.el, erc-ezbounce.el, erc-fill.el
- * erc-goodies.el, erc-hecomplete.el, erc-ibuffer.el, erc-identd.el
- * erc-imenu.el, erc-join.el, erc-lang.el, erc-list.el, erc-log.el
- * erc-match.el, erc-menu.el, erc-netsplit.el, erc-networks.el
- * erc-notify.el, erc-page.el, erc-pcomplete.el, erc-replace.el
- * erc-ring.el, erc-services.el, erc-sound.el, erc-speedbar.el
- * erc-spelling.el, erc-track.el, erc-truncate.el, erc-xdcc.el:
- Add 2006 to copyright years, to comply with the changed guidelines.
-
-2006-02-11 Michael Olson <mwolson@gnu.org>
-
- * erc.el (erc-update-modules): Handle erc-capab-identify
- correctly. Make some requirements shorter, so that it's easier to
- see why they are needed.
-
- * erc-capab.el: Add autoload cookie for capab-identify.
- (erc-capab-send-identify-messages, erc-capab-identify-activate):
- Minor whitespace fix in code.
-
- * erc-stamp.el (erc-timestamp-use-align-to): Renamed from
- `erc-timestamp-right-align-by-pixel'. Set the default based on
- whether we are in Emacs 22, and using X. Improve documentation.
- (erc-insert-aligned): Remove calculation of offset, since
- :align-to pos works after all. Unlike the previous solution, this
- one works when erc-stamp.el is compiled.
- (erc-insert-timestamp-right): Don't add length of string, and then
- later remove its displayed width. This puts timestamps after
- erc-fill-column when erc-timestamp-right-column is nil, rather
- than before it. It also fixes a subtle bug. Remove use of
- `current-window', since there is no variable by that name in
- Emacs21, Emacs22, or XEmacs21 beta. Check to see whether
- `erc-fill-column' is non-nil before using it.
-
-2006-02-11 Diane Murray <disumu@x3y2z1.net>
-
- * erc-list.el: Define `list' module which sets the alias
- `erc-cmd-LIST' to `erc-list-channels' when enabled and
- `erc-list-channels-simple' when disabled.
- (erc-list-channels): Was `erc-cmd-LIST', renamed.
- (erc-list-channels-simple): New function.
-
- * erc.el (erc-modules): Added `list' to enabled modules. Changed
- `capab-identify' description. Moved customization options left in
- source code.
-
- * erc-menu.el (erc-menu-definition): Use `erc-list-channels'.
-
- * erc-capab.el: Put a little more detail into Usage section.
- (define-erc-module): Run `erc-capab-identify-setup' in all open
- server buffers when enabling.
- (erc-capab-identify-setup): Make PROC and PARSED optional
- arguments.
- (erc-capab-identify-add-prefix): Simplified nickname regexp. This
- should now also match nicknames that are formatted differently
- than the default.
-
- * erc-spelling.el (define-erc-module): Make sure there's a buffer
- before calling `with-current-buffer'.
-
-2006-02-10 Michael Olson <mwolson@gnu.org>
-
- * Makefile (debbuild): Split from debrelease.
- (debrevision-mwolson): New rule that causes a Debian revision to
- be built.
-
- * erc.el (erc-migrate-modules): Use a better algorithm. Thanks to
- Johan Bockgård.
- (erc-modules): Change use of 'pcomplete to 'completion.
-
-2006-02-09 Diane Murray <disumu@x3y2z1.net>
-
- * erc.el (erc-get-parsed-vector, erc-get-parsed-vector-nick)
- * erc-capab.el: Require erc.
- (erc-capab-send-identify-messages): Use `erc-server-send'.
- (erc-capab-identify-remove/set-identified-flag): Use 1 and 0 as
- the flags so we can also check whether the `erc-identified' text
- property is there at all.
- (erc-capab-identify-add-prefix): Use `erc-capab-find-parsed'.
- This fixes a bug where the prefix wasn't inserted when timestamps
- are inserted on the right. Tweaked nickname regexp.
- (erc-capab-find-parsed): New function.
- (erc-capab-get-unidentified-nickname): Updated to check for 0
- flag. Only get nickname if there's a nickuserhost associated with
- this message.
-
- * erc-capab.el: New file. Adds the new module
- `erc-capab-identify', which allows flagging of unidentified users
- on servers running an ircd based on dancer - irc.freenode.net, for
- example.
-
- * erc.el (erc-modules): Added `capab-identify' to options.
- (erc-get-parsed-vector, erc-get-parsed-vector-nick)
- (erc-get-parsed-vector-type): Moved here from erc-match.el.
-
- * erc-match.el (erc-get-parsed-vector, erc-get-parsed-vector-nick)
- (erc-get-parsed-vector-type): Moved these functions to erc.el
- since they can be useful outside of the text matching module.
-
- * NEWS: Added erc-capab.el.
-
- * erc-dcc.el, erc-stamp.el, erc-xdcc.el: Changed "Emacs IRC Client"
- to "ERC".
-
-2006-02-07 Michael Olson <mwolson@gnu.org>
-
- * ChangeLog.01, ChangeLog.02, ChangeLog.03, ChangeLog.04,
- ChangeLog.05: Rename from ChangeLog.NNNN in order to disambiguate
- the filenames in DOS.
-
- * erc-goodies.el: Comment fix.
-
- * erc-hecomplete.el: Rename from erc-complete.el. Update
- commentary. Use define-erc-module so that it's possible to
- actually use this.
- (erc-hecomplete): Rename function from `erc-complete'.
- (erc-hecomplete): Rename group from `erc-old-complete'. Docfix.
-
- * erc-join.el: Rename from erc-autojoin.el.
-
- * erc-networks.el: Rename from erc-nets.el.
-
- * erc-services.el: Rename from erc-nickserv.el.
-
- * erc-stamp.el (erc-insert-aligned): Don't take 3rd argument. Use
- the simpler `indent-to' function when
- `erc-timestamp-right-align-by-pixel' is nil.
- (erc-insert-timestamp-right): If the timestamp goes on the
- following line, don't add timestamp properties to the spaces in
- front of it.
-
- * erc.el (erc-migrate-modules): New function that eases migration
- of module names.
- (erc-modules): Call erc-migrate-modules in the :get accessor.
- (erc-modules, erc-update-modules): Update for new modules names.
- (erc-cmd-SMV): Remove, since this does not give useful output due
- to the version strings being removed from ERC modules.
-
-2006-02-05 Michael Olson <mwolson@gnu.org>
-
- * erc-spelling.el (erc-spelling-init): If
- `erc-spelling-dictionaries' is nil, do not set
- ispell-local-dictionary. Before, it was being set to nil, which
- was causing a long delay while the ispell process restarted.
- (erc-spelling-unhighlight-word): New function that removes
- flyspell properties from a spell-checked word.
- (erc-spelling-flyspell-verify): Don't spell-check nicks or words
- that have '/' before them.
-
-2006-02-04 Michael Olson <mwolson@gnu.org>
-
- * erc-autojoin.el: Use (eval-when-compile (require 'cl)).
-
- * erc-complete.el (erc-nick-completion-exclude-myself)
- (erc-try-complete-nick): Use better function for getting list of
- channel users.
-
- * erc-goodies.el: Docfix.
-
- * erc-stamp.el: Use new arch tagline, since the other one wasn't
- being treated properly.
-
- * erc.el (erc-version-string): Release ERC 5.1.1.
-
-2006-02-03 Zhang Wei <id.brep@gmail.com>
-
- * erc.el (erc-version-string): Don't hard-code Emacs version.
- (erc-version): Use emacs-version.
-
-2006-01-31 Michael Olson <mwolson@gnu.org>
-
- * erc-stamp.el: Update copyright years.
-
-2006-01-30 Simon Josefsson <jas@extundo.com>
-
- * erc.el (erc-open-ssl-stream): Use tls.el.
-
-2006-01-30 Michael Olson <mwolson@gnu.org>
-
- * erc-stamp.el (erc-timestamp-right-align-by-pixel): New option
- that determines whether to use pixel values to align right
- timestamps. The default is not to do so, since it only works with
- Emacs22 on X, and even then some people have trouble.
- (erc-insert-aligned): Use `erc-timestamp-right-align-by-pixel'.
-
-2006-01-29 Michael Olson <mwolson@gnu.org>
-
- * ChangeLog, ChangeLog.2005, ChangeLog.2004, ChangeLog.2003,
- ChangeLog.2002, ChangeLog.2001: Add "See ChangeLog.NNNN" line for
- earlier changes. Use utf-8 encoding. Fix some accent typos.
-
- * erc-speedbar.el (erc-speedbar-buttons): Fix reference to free
- variable.
- (erc-speedbar-goto-buffer): Fix compiler warning.
-
- * erc-ibuffer.el: Use `define-ibuffer-filter' instead of
- `ibuffer-degine-limiter'. Use `define-ibuffer-column' instead of
- `ibuffer-define-column'. Require 'ibuf-ext so that the macros
- work without compiler warnings.
-
- * man/erc.texi (Obtaining ERC, Installation): Note that these
- sections may be skipped if using the version of ERC that comes
- with Emacs.
-
-2006-01-29 Edward O'Connor <ted@oconnor.cx>
-
- * erc-viper.el: Remove. Now that ERC is included in Emacs, these
- work-arounds live in Viper itself.
-
-2006-01-28 Michael Olson <mwolson@gnu.org>
-
- * erc-*.el, erc.texi, NEWS: Add Arch taglines as per Emacs
- guidelines.
-
- * erc-*.el: Space out copyright years like the rest of Emacs. Use
- the Emacs copyright statement. Refer to ourselves as ERC rather
- than "Emacs IRC Client", since there are now several IRC clients
- for Emacs.
-
- * erc-compat.el (erc-emacs-build-time): Define as a variable.
-
- * erc-log.el (erc-log-setup-logging): Use write-file-functions.
-
- * erc-ibuffer.el: Require 'erc.
-
- * erc-stamp.el (erc-insert-aligned): Only use the special text
- property when window-system is X.
-
- * erc.texi: Adapt for inclusion in Emacs.
-
-2006-01-28 Johan Bockgård <bojohan@users.sourceforge.net>
-
- * erc.el (erc-format-message): More `cl' breakage; don't use
- `oddp'.
-
-2006-01-27 Michael Olson <mwolson@gnu.org>
-
- * debian/changelog: Update for new release.
-
- * debian/control (Description): Update.
-
- * debian/rules: Concatenate ChangeLog for 2005.
-
- * Makefile (MISC): Include ChangeLog.2005 and erc.texi.
- (debrelease, release): Copy images directory.
-
- * NEWS: Spelling fixes. Add items for recent changes.
-
- * erc.el (erc): Move call to erc-update-modules before the call to
- erc-mode. This should fix a timestamp display issue.
- (erc-version-string): Release ERC 5.1.
-
-2006-01-26 Michael Olson <mwolson@gnu.org>
-
- * erc-stamp.el (erc-insert-aligned): New function that inserts
- text in an perfectly-aligned way relative to the right margin. It
- only works well with Emacs22. A sane fallback is provided for
- other versions of Emacs.
- (erc-insert-timestamp-right): Use the new function.
-
-2006-01-25 Edward O'Connor <ted@oconnor.cx>
-
- * erc.el (erc-modules): Ensure that `erc-button-mode' gets enabled
- before `erc-match-mode'.
-
- * erc-match.el (match): Append `erc-match-message' to
- `erc-insert-modify-hook'.
-
-2006-01-25 Michael Olson <mwolson@gnu.org>
-
- * FOR-RELEASE: Mark last release requirement as done.
-
- * Makefile (realclean, distclean): Remove docs.
-
- * erc.texi: Take care of all pre-5.1 items.
-
- * erc-backend.el (erc-server-send, erc-server-send-queue): Wrap
- `process-send-string' in `condition-case' to avoid an error when
- quitting ERC.
-
- * erc-stamp.el (erc-insert-timestamp-right): Try to deal with
- variable-width characters in the timestamp and on the same line.
- The latter is a kludge, but it seems to work with most of the
- input I've thrown at it so far. It's certainly better than going
- past the end of line consistently when we have variable-width
- characters on the same line. When `erc-timestamp-intangible' is
- non-nil, add intangible properties to the whitespace as well, so
- that hitting <end> does what you'd expect.
-
- * erc.el (erc-flood-protect, erc-toggle-flood-control): Update
- this to only use boolean values for `erc-flood-protect'. Update
- documentation.
- (erc-cmd-QUIT): Set the active buffer to be the server buffer, so
- that any QUIT-related messages go there.
- (erc): Try to be more clever about re-using channel buffers when
- automatically re-connecting. Thanks to e1f for noticing.
-
-2006-01-23 Michael Olson <mwolson@gnu.org>
-
- * ChangeLog.2005: Remove erroneous line.
-
- * FOR-RELEASE: Make that the Makefile tweaking is complete.
- (NEWS): Mark as done.
-
- * Makefile (MANUAL): New option indicating the name of the manual.
- (PREFIX, ELISPDIR, INFODIR): New options that specify the
- directories to install lisp code and info manuals to. PREFIX is
- used only by ELISPDIR and INFODIR.
- (all): Call `lisp' and create the manual.
- (lisp): Compile lisp code.
- (%.info, %.html): New rules that make Info files and HTML files,
- respectively, from a TexInfo source.
- (doc): Create both the Info and HTML versions of the manual. This
- is for the user -- we never call it automatically.
- (install-info): Install Info files.
- (install-bin): Install compiled and source Lisp files.
- (todo): Remove, since it seems pointless.
-
- * NEWS: Update.
-
- * README: Add Installation instructions. Tweak layout.
-
- * erc.texi: Work on some pre-5.1 items.
-
- * erc-stamp.el, erc-track.el: Move some functions and options in
- order to get rid of a few compiler warnings.
-
- * erc.el (erc-modules): Enable readonly by default. This will
- prevent new users from accidentally removing old messages, which
- could be disconcerting. Also enable stamp by default, since
- timestamps are a fairly standard feature among IRC clients.
-
- * erc-button.el: Munge whitespace.
-
- * erc-identd.el (erc-identd-start): Instead of throwing an error,
- just try to use the obsolete function.
-
-2006-01-22 Michael Olson <mwolson@gnu.org>
-
- * erc-backend.el (erc-decode-string-from-target): Make sure that
- we have a string as an argument. If not, coerce it to the empty
- string. Hopefully, this will work painlessly around an edge case
- related to quitting ERC around the same time a message comes in.
-
-2006-01-22 Johan Bockgård <bojohan@users.sourceforge.net>
-
- * erc-track.el: Use `(eval-when-compile (require 'cl))' (for
- `case'). Doc fixes.
- (erc-find-parsed-property): Simplify.
- (erc-track-get-active-buffer): Fix logic. Simplify.
- (erc-track-switch-buffer): Remove unused variable `dir'. Simplify.
-
- * erc-speak.el: Doc fixes.
- (erc-speak-region): `propertize' --> `erc-propertize'.
-
- * erc-dcc.el (erc-dcc-chat-parse-output): `propertize' -->
- `erc-propertize'.
-
- * erc-button.el (erc-button-add-button): Take erc-fill-prefix into
- account when wrapping URLs.
-
- * erc-bbdb.el (erc-bbdb-elide-display): Doc fix.
-
- * erc-backend.el (define-erc-response-handler): Doc fix.
-
-2006-01-22 Michael Olson <mwolson@gnu.org>
-
- * erc.el (erc-update-modules): Use `require' instead of `load',
- but prevent it from causing errors, in order to preserve the
- previous behavior.
-
-2006-01-21 Michael Olson <mwolson@gnu.org>
-
- * FOR-RELEASE (Source): Mark cl task as done.
- * Makefile (erc-auto.el): Call erc-generate-autoloads rather than
- generate-autoloads.
- (erc-auto.el, %.elc): Don't show command, just its output.
+See ChangeLog.06 for earlier changes.
- * NEWS: Add items from 2005-01-01 to 2005-08-13.
-
- * debian/copyright (Copyright): Update.
-
- * erc-auto.in (erc-generate-autoloads): Rename from
- generate-autoloads.
-
- * erc.el, erc-autoaway.el, erc-backend.el: Use
- erc-server-process-alive instead of erc-process-alive.
-
- * erc.el, erc-backend.el, erc-ezbounce.el, erc-list.el,
- erc-log.el, erc-match.el, erc-nets.el, erc-netsplit.el,
- erc-nicklist.el, erc-nickserv.el, erc-notify.el, erc-pcomplete.el:
- Use (eval-when-compile (require 'cl)), so that compilation doesn't
- fail.
-
- * erc-fill.el, erc-truncate.el: Whitespace munging.
-
- * erc.el: Update copyright notice. Remove eval-after-load code.
- (erc-with-buffer): Docfix.
- (erc-once-with-server-event, erc-once-with-server-event-global)
- (erc-with-buffer, erc-with-all-buffers-of-server): Use erc-gensym
- instead of gensym.
- (erc-banlist-update): Use erc-delete-if instead of delete-if.
- (erc): Call `erc-update-modules' here.
-
- * erc-backend.el: Require 'erc-compat to minimize compiler
- warnings.
- (erc-decode-parsed-server-response): Docfix.
- (erc-server-process-alive): Move here from erc.el and rename from
- `erc-process-alive'.
- (erc-server-send, erc-remove-channel-users): Make sure process is
- alive before sending data to it.
-
- * erc-bbdb.el: Update copyright years.
- (erc-bbdb-whois): Remove overexuberant comment.
-
- * erc-button.el: Require erc-fill, since we make liberal use of
- `erc-fill-column'.
-
- * erc-compat.el (erc-const-expr-p, erc-list*, erc-assert): New
- functions, the latter of which provides an `assert' equivalent.
- (erc-remove-if-not): New function that provides a simple
- implementation of `remove-if-not'.
- (erc-gensym): New function that provides a simple implementation
- of `gensym'.
- (erc-delete-if): New function that provides a simple
- implementation of `delete-if'.
- (erc-member-if): New function that provides a simple
- implementation of `member-if'.
- (field-end): Remove this, since it is unused, and later versions
- of XEmacs have this function already.
- (erc-function-arglist): Moved here from erc.el.
- (erc-delete-dups): New compatibility function for dealing with
- XEmacs.
- (erc-subseq): New function copied from cl-extra.el.
-
- * erc-dcc.el: Require pcomplete during compilation to avoid
- compiler warnings.
- (erc-unpack-int, erc-dcc-send-filter)
- (erc-dcc-get-filter): Use erc-assert instead of assert.
- (pcomplete/erc-mode/DCC): Use erc-remove-if-not instead of
- remove-if-not.
-
- * erc-match.el (erc-log-matches): Fix compiler warning.
-
- * erc-nicklist.el: Update copyright notice.
- (erc-nicklist-menu): Change use of caadr to (car (cadr ...)).
- (erc-nicklist-bitlbee-connected-p): Remove.
- (erc-nicklist-insert-medium-name-or-icon): Accept channel
- argument. Use it to determine whether we are on bitlbee. Now
- that bitlbee names its channel "&bitlbee", this is trivial.
- (erc-nicklist-insert-contents): Pass channel as specified above.
- Don't try to determine whether we are on bitlbee here.
- (erc-nicklist-channel-users-info): Use erc-remove-if-not instead
- of remove-if-not.
- (erc-nicklist-search-for-nick): Use erc-member-if instead of
- member-if.
-
- * erc-notify.el (erc-notify-QUIT): Use erc-delete-if with a
- partially-evaluated lambda expression instead of `delete' and
- `find'.
-
- * erc-track.el: Use erc-assert.
- (erc-track-modified-channels): Remove use of `return'.
- (erc-track-modified-channels): Use `cadr' instead of `second',
- since otherwise we would need yet another eval-when-compile line.
-
-2006-01-19 Michael Olson <mwolson@gnu.org>
-
- * erc-backend.el (erc-process-sentinel-1): Remove attempt to
- detect SIGPIPE, since it doesn't work.
-
-2006-01-10 Diane Murray <disumu@x3y2z1.net>
-
- * erc-spelling.el: Updated copyright years.
- (define-erc-module): Enable/disable `flyspell-mode' for all open
- ERC buffers as well.
- (erc-spelling-dictionaries): Reworded customize description.
-
- * erc.el (erc-command-symbol): New function.
- (erc-extract-command-from-line): Use `erc-command-symbol'. This
- fixes a bug where "Symbol's function definition is void:
- erc-cmd-LIST" would be shown after typing /list at the prompt (the
- command was interned because erc-menu.el uses it and is enabled by
- default whereas erc-list.el is not).
-
- * NEWS: Started a list of renamed variables.
-
- * erc.el: Reworded the message sent when defining variable
- aliases.
- (erc-command-indicator-face): Doc fix.
- (erc-modules): Enable the match module by default which makes
- current nickname highlighting on as the default.
-
- * erc-button.el: Updated copyright years.
- (erc-button): New face.
- (erc-button-face): Use `erc-button'.
- (erc-button-nickname-face): New customizable variable.
- (erc-button-add-nickname-buttons, erc-button-add-buttons-1): Send
- new argument to `erc-button-add-button'.
- (erc-button-add-button): Doc fix. Added new argument to function
- definition, NICK-P. If it's a nickname, use
- `erc-button-nickname-face', otherwise use `erc-button-face'. This
- makes channel tracking and buttons work better together when
- `erc-button-buttonize-nicks' is enabled, since there is a nickname
- on just about every line.
-
- * erc-track.el (erc-track-use-faces): Doc fix.
- (erc-track-faces-priority-list): Added `erc-button' to list.
- (erc-track-priority-faces-only): Doc fix.
-
-2006-01-09 Diane Murray <disumu@x3y2z1.net>
-
- * erc-button.el (erc-button-url-regexp): Use `concat' so the
- regexp is not one long line.
- (erc-button-alist): Fixed so that customizing works correctly.
- Reorganized. Removed lambda functions with more than two lines.
- Doc fix.
- (erc-button-describe-symbol, erc-button-beats-to-time): New
- functions. Moved from `erc-button-alist'.
-
-2006-01-07 Michael Olson <mwolson@gnu.org>
-
- * erc-backend.el (erc-process-sentinel-1): Don't try to re-open a
- process if a SIGPIPE occurs. This happens when a new message
- comes in at the same time a /quit is requested.
- (erc-process-sentinel): Use string-match rather than string= to do
- these comparisons. Matching literal newlines makes me nervous.
-
- * erc-track.el (erc-track-remove-from-mode-line): Handle case
- where global-mode-string is not a list. Emacs22 permits this.
-
-
-See ChangeLog.05 for earlier changes.
-
- Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -1366,4 +376,4 @@ See ChangeLog.05 for earlier changes.
;; add-log-time-zone-rule: t
;; End:
-;; arch-tag: 865a75f6-2bcb-46df-bf0c-b514dadf688a
+;; arch-tag: 3369b6e5-96b1-4b32-96cd-9a905c747496
diff --git a/lisp/erc/ChangeLog.06 b/lisp/erc/ChangeLog.06
new file mode 100644
index 00000000000..f7d891cb5f6
--- /dev/null
+++ b/lisp/erc/ChangeLog.06
@@ -0,0 +1,1457 @@
+2006-12-28 Michael Olson <mwolson@gnu.org>
+
+ * erc-list.el: Change header to mention that this is part of ERC,
+ rather than GNU Emacs.
+
+ * erc-networks.el (erc-server-alist): Add Ars OpenIRC and
+ LinuxChix networks. Thanks to Angelina Carlton for mentioning
+ them. Properly escape periods in Konfido.Net and Kewl.Org.
+ (erc-networks-alist): Add entries for Ars and LinuxChix, though
+ the latter does not actually provide an announced network name.
+
+ * erc-services.el (erc-nickserv-identify-mode): Add 'both method,
+ which waits for a NickServ message if the network supports it,
+ otherwise sends the password after connecting.
+ (erc-nickserv-identify-mode): Default to 'both.
+ (erc-nickserv-passwords): Add OFTC and Azzurra to custom options.
+ (erc-nickserv-alist): Indentation fix.
+ (erc-nickserv-identify-on-connect)
+ (erc-nickserv-identify-on-nick-change): Handle 'both method.
+
+2006-12-28 Leo <sdl.web@gmail.com> (tiny change)
+
+ * erc.el (erc-iswitchb): Wrap body in unwind-protect so that
+ hitting C-g does not leave iswitchb-mode on.
+
+2006-12-27 Michael Olson <mwolson@gnu.org>
+
+ * erc.el (erc-cmd-RECONNECT): New command that calls
+ erc-server-reconnect.
+
+ * erc-backend.el (erc-server-reconnect-count): New server variable
+ that keeps track of reconnection attempts.
+ (erc-server-reconnect-attempts): New option that determines the
+ number of reconnection attempts that ERC will make per server.
+ (erc-server-reconnect-timeout): New option that determines the
+ amount of time, in seconds, that ERC will wait between successive
+ reconnect attempts.
+ (erc-server-reconnect): New function that reestablishes the
+ current IRC connection. Move some commands from
+ erc-process-sentinel-1 here.
+ (erc-process-sentinel-1): If we have been disconnected, loop until
+ we either reconnect or run out of attempts.
+ (erc-server-reconnect-p): Move higher and make this a defsubst,
+ since I'm worried about the current buffer changing from
+ underneath us. Implement limit of number of reconnect attempts..
+
+ * erc.texi (Getting Started): Update for /RECONNECT command.
+
+2006-12-26 Michael Olson <mwolson@gnu.org>
+
+ * erc.el (erc-open): Restore old point correctly, or at least get
+ closer to doing so than before.
+
+2006-12-13 Leo <sdl.web@gmail.com> (tiny change)
+
+ * erc.el (erc-iswitchb): Temporarily enable iswitchb mode if it
+ isn't active already, instead of leaving it on.
+
+2006-12-10 Juanma Barranquero <lekktu@gmail.com>
+
+ * erc-ezbounce.el (erc-ezb-init-session-list): Doc fix.
+
+2006-12-08 Michael Olson <mwolson@gnu.org>
+
+ * erc.el: Re-evaluate contributions from a contributor, and found
+ them under 15 lines of non-obvious code, so it is safe to remove
+ the copyright notice.
+ (erc-modules): Remove list module.
+
+ * erc-list.el: Remove, since a contributor who has not completed
+ their assignment has contributed significantly more than 15 lines
+ of code to this file.
+
+2006-11-28 Juanma Barranquero <lekktu@gmail.com>
+
+ * erc.el (erc-cmd-BANLIST, erc-cmd-MASSUNBAN): Simplify.
+ (erc-prompt-for-channel-key, erc-ignore-reply-list, erc-send-post-hook)
+ (erc-active-buffer, erc-join-buffer, erc-frame-alist, erc-with-buffer)
+ (erc-modules, erc-display-message-highlight, erc-process-input-line)
+ (erc-cmd-HELP, erc-server-hooks, erc-echo-notice-in-user-buffers)
+ (erc-format-my-nick, erc-echo-notice-in-user-and-target-buffers)
+ (erc-echo-notice-in-first-user-buffer, erc-connection-established)
+ (erc-update-user-nick, erc-update-channel-member, erc-highlight-notice)
+ (erc-command-symbol, erc-add-query, erc-process-script-line)
+ (erc-determine-parameters, erc-client-info, erc-popup-input-buffer):
+ (erc-script-echo): Fix typos in docstrings.
+ (erc-channel-user-op-p, erc-channel-user-voice-p, erc-startup-file-list)
+ (define-erc-module, erc-once-with-server-event)
+ (erc-once-with-server-event-global, erc-debug-irc-protocol)
+ (erc-log-irc-protocol, erc-cmd-LOAD, erc-update-user)
+ (erc-update-current-channel-member, erc-load-script):
+ (erc-mode-line-away-status-format): Doc fixes.
+
+2006-11-20 Andrea Russo <rastandy@inventati.org> (tiny change)
+
+ * erc-dcc.el (erc-dcc-chat-setup): Initialize `erc-input-marker'
+ before calling `erc-display-prompt'.
+
+2006-11-24 Juanma Barranquero <lekktu@gmail.com>
+
+ * erc.el (erc-after-connect, erc-open-ssl-stream)
+ (erc-display-line-1, erc-display-line):
+ * erc-backend.el (005): Fix space/tab mixup in docstrings.
+
+2006-11-20 Michael Olson <mwolson@gnu.org>
+
+ * erc.el (erc-version-string): Call this Version 5.2 stable
+ pre-release, since it diverges slightly from our 5.2 branch, in
+ that unstable features are not included.
+ (erc-update-modules): Display better error message when module not
+ found.
+
+2006-11-12 Michael Olson <mwolson@gnu.org>
+
+ * erc-log.el: Save all log buffers when Emacs exits, in case
+ someone ignores the warning about open processes. Remove the
+ advice code in the commentary.
+ (erc-save-query-buffers): Docfix.
+ (erc-log-save-all-buffers): New function that saves all ERC
+ buffers to logs.
+ (erc-current-logfile): Fix bug in filename selection, where the
+ current buffer was erroneously being preferred over the given
+ buffer.
+
+2006-11-08 Michael Olson <mwolson@gnu.org>
+
+ * erc.el (erc-string-to-port): Avoid error when a numerical port
+ is passed. Thanks to Zekeriya KOÇ for the report.
+
+2006-11-08 Åukasz Demianiuk <ldemianiuk@gmail.com> (tiny change)
+
+ * erc.el (erc-header-line): Fix typo.
+
+2006-11-06 Juanma Barranquero <lekktu@gmail.com>
+
+ * erc-dcc.el (erc-dcc-send-file): Fix typo in error message.
+
+ * erc.el (read-passwd):
+ * erc-autoaway.el (erc-autoaway-reestablish-idletimer):
+ * erc-truncate.el (truncate): Fix typo in docstring.
+
+2006-10-21 Michael Olson <mwolson@gnu.org>
+
+ * erc.el (erc-iswitchb): Fix bug when hitting C-c C-b without
+ first loading iswitchb. Thanks to Leo for the report.
+
+2006-10-10 Michael Olson <mwolson@gnu.org>
+
+ * erc.el (erc-default-port): Make the default be 6667 instead of
+ ircd. since Mac OS X apparently has problems with looking up that
+ port name.
+
+ * erc-backend.el (353): Receive names after displaying the initial
+ message, instead of before.
+
+2006-10-05 Diane Murray <disumu@x3y2z1.net>
+
+ * erc.el (erc-my-nick-face): New face.
+ (erc): Use FULL-NAME argument, not `erc-user-full-name'. This
+ fixes a bug where the :full-name argument passed to the function
+ was not respected.
+ (erc-format-my-nick): Use `erc-my-nick-face'. This should help
+ make it easier to find messages you sent in conversations when
+ `erc-show-my-nick' is non-nil.
+ (erc-compute-server): Doc fix.
+
+2006-10-01 John J Foerch <jjfoerch@earthlink.net> (tiny change)
+
+ * erc-stamp.el (erc-insert-timestamp-right): Exclude the newline
+ from the erc-timestamp field.
+
+2006-09-11 Michael Olson <mwolson@gnu.org>
+
+ * erc-nicklist.el (erc-nicklist-insert-contents): Add missing
+ parenthesis. Thanks to Stephan Stahl for the report.
+
+2006-09-10 Eric Hanchrow <offby1@blarg.net> (tiny change)
+
+ * erc.el (erc-cmd-IGNORE): Prompt user if this might be a regexp
+ instead of a single user.
+
+2006-09-10 Michael Olson <mwolson@gnu.org>
+
+ * erc.el (erc-generate-new-buffer-name): If this is a server
+ buffer and a process exists already, create a new buffer.
+ (erc-open): If the IRC session was continued, restore the old
+ point. Thanks to Stephan Stahl for the report.
+ (erc-member-ignore-case): Coding style tweak.
+ (erc-cmd-UNIGNORE): Quote the user before comparison. If we don't
+ find the user listed verbatim, try to match them against the list
+ using string-match. In this case, prompt as to whether the regexp
+ should be removed.
+ (erc-ignored-user-p): Remove CL-ism.
+
+ * erc-autoaway.el (erc-autoaway-possibly-set-away): Check to see
+ whether we are already away.
+
+ * erc-menu.el: Fix potential compiler warning.
+
+2006-09-07 Diane Murray <disumu@x3y2z1.net>
+
+ * erc.el: Updated Commentary and URL.
+ (erc-iswitchb, erc-display-line, erc-set-modes, erc-update-modes)
+ (erc-arrange-session-in-multiple-windows): No need to check if
+ `erc-server-process' is bound.
+ (erc-server-buffer-live-p): Doc fix.
+ (erc-part-from-channel): Don't use any initial contents at prompt.
+ (erc-format-nick, erc-format-@nick): Doc fix. Use `when'.
+ (s367): Fixed to support only banmask and channel which is the
+ standard. Also, there's no reason to add a message to each banned
+ user entry trying to persuade the user to use /banlist instead of
+ /mode #channel +b. That part of the message was a little
+ confusing, anyways.
+ (s367-set-by): New catalog entry. The user who set the ban and
+ the time of ban seem to be specific to only certain servers such
+ as freenode.
+
+ * erc-autoaway.el (erc-autoaway-idletimer): Doc fix.
+
+ * erc-backend.el (erc-server-process-alive): No need to check if
+ `erc-server-process' is bound.
+ (367): Use s367 or s367-set-by where appropriate.
+
+ * erc-compat.el: Fixed URL.
+
+ * erc-dcc.el: Updated copyright years. Added Usage section.
+ Changed supported Emacs version number from 21.3.50 to 22 in
+ Commentary.
+
+ * erc-ibuffer.el (erc-server-name, erc-target, erc-away): No need
+ to check if `erc-server-process' is bound.
+
+ * erc-nicklist.el: Added to the Commentary section an explanation
+ that `erc-nicklist-quit' should be called from within the nicklist
+ buffer. Set file coding to utf-8 so a contributor's name is
+ displayed correctly.
+ (erc-nicklist-icons-directory): Use customize type directory
+ instead of string.
+ (erc-nicklist-insert-contents): Set bbdb-nick to an empty string
+ if it wasn't found. This fixes a bug where an error would occur
+ when using `string=' on bbdb-nick if it was nil.
+
+ * erc-replace.el: Removed URL from file information since it
+ doesn't exist.
+
+ * erc-sound.el: Updated copyright years. Fixed Commentary and
+ added Usage section.
+ (define-erc-module): Add and remove `erc-ctcp-query-SOUND' to
+ `erc-ctcp-query-SOUND-hook' here. Removed the keybinding
+ definitions.
+ (erc-play-sound, erc-default-sound, erc-cmd-SOUND)
+ (erc-ctcp-query-SOUND): Doc fix.
+ (erc-play-command): Removed, not necessary anymore.
+ (erc-ctcp-query-SOUND-hook): Set to nil as default. Moved up
+ higher in code, added docstring.
+ (erc-play-sound): Use `play-sound-file'. It exists in GNU Emacs
+ as well since version 21 or earlier. Removed commented-out older
+ version of function.
+
+ * NEWS: Fixed formatting, added channel tracking change.
+
+2006-09-03 Diane Murray <disumu@x3y2z1.net>
+
+ * erc.el: M-x erc RET can now be used to start ERC.
+ (erc-open): Renamed from `erc'.
+ (erc-before-connect): Change erc-select to erc.
+ (erc): Renamed from `erc-select'. Use `erc-open'.
+ (erc-select): Defined as alias of `erc'.
+ (erc-ssl): Renamed from `erc-select-ssl'. Use `erc'.
+ (erc-select-ssl): Defined as alias of `erc-ssl'.
+ (erc-cmd-SERVER): Use `erc'.
+ (erc-query, erc-handle-irc-url): Use `erc-open'.
+
+ * erc-backend.el (erc-process-sentinel-1, JOIN): Use `erc-open'.
+
+ * erc-menu.el (erc-menu-definition): Use `erc'.
+
+ * erc-networks.el: Updated copyright years.
+ (erc-server-select): Use keyword arguments when calling `erc'.
+
+ * erc.texi (Getting Started, Connecting): Changed erc-select to
+ erc.
+
+ * README: Changed erc-select to erc.
+
+ * NEWS: Added note about these changes.
+
+ * FOR-RELEASE: Marked this item as done.
+
+2006-08-21 Diane Murray <disumu@x3y2z1.net>
+
+ * erc-track.el (erc-track-mode-line-mouse-face): New variable.
+ (erc-make-mode-line-buffer-name): Add help-echo and mouse-face
+ properties to channel name.
+
+2006-08-20 Michael Olson <mwolson@gnu.org>
+
+ * erc-identd.el (erc-identd): New customization group.
+ (erc-identd-port): New option that specifies the port to use if
+ none is given as an argument to erc-identd-start.
+ (identd): Place erc-identd-quickstart in erc-connect-pre-hook
+ instead of erc-identd-start so that we deal with the different
+ meaning of the first argument.
+ (erc-identd-start): Use erc-identd-port.
+ (erc-identd-quickstart): New function that ignores any arguments
+ and calls erc-identd-start.
+
+ * erc.el (erc-with-server-buffer): New macro that switches to the
+ current ERC server buffer and runs some code. If no server buffer
+ is available, return nil. This is a useful way to access
+ variables in the server buffer.
+ (erc-get-server-user, erc-add-server-user)
+ (erc-remove-server-user, erc-change-user-nickname)
+ (erc-get-server-nickname-list, erc-get-server-nickname-alist)
+ (erc-ison-p, erc-active-buffer, erc-cmd-IGNORE)
+ (erc-cmd-UNIGNORE, erc-cmd-IDLE, erc-cmd-NICK, erc-cmd-BANLIST)
+ (erc-cmd-MASSUNBAN, erc-nickname-in-use, erc-ignored-user-p)
+ (erc-format-channel-modes): Use it.
+ (erc-once-with-server-event, erc-once-with-server-event-global)
+ (erc-with-buffer, erc-with-all-buffers-of-server): Use make-symbol
+ instead of gensym.
+ (erc-open-server-buffer-p): New function that returns non-nil if
+ the given buffer is an ERC server buffer that has an open IRC
+ process.
+ (erc-with-buffer): Use buffer-live-p here to set a good example,
+ though it isn't really needed here.
+ (erc-away): Mention erc-away-time.
+ (erc): Don't propagate the erc-away setting, since it makes more
+ sense to access it from the server buffer. Set up the prompt
+ before connecting rather than after. Run erc-connect-pre-hook
+ with the buffer as an argument, instead of no arguments.
+ (erc-cmd-GAWAY): Use erc-open-server-buffer-p instead of
+ erc-server-buffer-p so that only open connections are set away.
+ (erc-cmd-GQUIT): Use erc-open-server-buffer-p.
+ (erc-process-away): Docfix. Don't set erc-away in channel
+ buffers.
+ (erc-set-current-nick): Make this uniform with the style used in
+ erc-current-nick.
+ (erc-away-time): Rename from erc-away-p, since this is no longer a
+ boolean-style predicate.
+ (erc-format-away-status): Use it.
+ (erc-initialize-log-marker): Accept a `buffer' argument.
+ (erc-connect-pre-hook): Docfix.
+ (erc-connection-established): Make sure this runs in the correct
+ buffer.
+ (erc-set-initial-user-mode): Accept a `buffer' argument.
+
+ * erc-stamp.el (erc-add-timestamp): Use erc-away-time.
+
+ * erc-spelling.el (erc-spelling-init): Use
+ erc-with-server-buffer. Accept `buffer' argument.
+ (spelling): Call erc-spelling-init with the `buffer' argument.
+
+ * erc-speedbar.el (erc-speedbar-buttons): Use erc-server-buffer-p.
+
+ * erc-pcomplete.el (pcomplete/erc-mode/UNIGNORE)
+ (pcomplete-erc-all-nicks): Use erc-with-server-buffer.
+
+ * erc-notify.el (erc-notify-timer, erc-cmd-NOTIFY): Use
+ erc-with-server-buffer.
+
+ * erc-networks.el (erc-network, erc-current-network)
+ (erc-network-name): Use erc-with-server-buffer.
+
+ * erc-netsplit.el (erc-cmd-WHOLEFT): Use erc-with-server-buffer.
+
+ * erc-match.el (erc-log-matches, erc-log-matches-come-back): Use
+ erc-away-time.
+
+ * erc-log.el (log): Use erc-away-time. Remove unnecessary check.
+ Pass `buffer' argument to erc-log-setup-logging instead of setting
+ the current buffer. Ditto for erc-log-disable-logging.
+ (erc-log-setup-logging, erc-log-disable-loggin): Accept a `buffer'
+ argument.
+
+ * erc-list.el (erc-chanlist): Use erc-with-server-buffer.
+
+ * erc-ibuffer.el (erc-away): Use erc-away-time.
+
+ * erc-dcc.el (erc-dcc-get-filter): Temporarily make the buffer
+ read only instead of permanently doing so.
+
+ * erc-compat.el (erc-gensym, *erc-sym-counter*): Remove, since
+ Emacs Lisp has make-symbol, which is better.
+
+ * erc-chess.el (erc-chess-handler, erc-cmd-CHESS): Use
+ erc-with-server-buffer.
+
+ * erc-capab.el (capab-identify): Only deal with server buffers
+ that have an open IRC process.
+ (erc-capab-identify-add-prefix): Use erc-with-server-buffer.
+
+ * erc-backend.el (erc-server-connected): Docfix. Recommend the
+ `erc-server-process-alive' function.
+ (erc-coding-system-for-target): Supply a default target if one is
+ not given.
+ (erc-server-send): Simplify slightly.
+ (erc-call-hooks): Use erc-with-server-buffer.
+ (erc-server-connect, erc-server-setup-periodical-ping): Accept
+ `buffer' argument.
+
+ * erc-autoaway.el (erc-autoaway-reestablish-idletimer): Move
+ higher to avoid an automatic load snafu.
+ (erc-autoaway-some-server-buffer): New function that returns an
+ ERC server buffer with a live connection, or nil otherwise.
+ (erc-autoaway-insinuate-maybe): New function that adds the
+ autoaway reset function to post-command-hook if at least one ERC
+ process is alive.
+ (erc-autoaway-remove-maybe): New function that removes the
+ autoaway reset function from post-command-hook if no ERC process
+ is alive.
+ (autoaway): Don't touch post-command-hook unless an IRC process is
+ already open. Remove our addition to post-command-hook as soon as
+ there are no more IRC processes open. Reset the indicators before
+ connecting to an IRC server, which fixes a bug when re-connecting.
+ (erc-autoaway-reset-idle-user): Call erc-autoaway-remove-maybe if
+ there are no more IRC processes open.
+ (erc-autoaway-set-back): Pick an open IRC process. Accept an
+ argument which is a function call if we can't find one.
+ (erc-autoaway-some-open-server-buffer): New function which returns
+ an ERC server buffer with an open connection and a user that is
+ not away.
+ (erc-autoaway-possibly-set-away, erc-autoaway-set-away): Use it.
+ (erc-autoaway-set-away): Accept a `notest' argument which is used
+ to avoid testing the same thing twice.
+ (erc-autoaway-last-sent-time, erc-autoaway-caused-away): Move
+ higher in file to fix byte-compile warning.
+
+2006-08-20 Diane Murray <disumu@x3y2z1.net>
+
+ * erc-backend.el (erc-process-sentinel-1): Doc fix. Let
+ `erc-server-reconnect-p' check all condition cases.
+ (erc-server-reconnect-p): Moved rest of checks from
+ `erc-process-sentinel-1' to here. Now takes an argument, EVENT.
+
+2006-08-14 Diane Murray <disumu@x3y2z1.net>
+
+ * erc-menu.el: Updated copyright years. Removed EmacsWiki URL.
+ (erc-menu-definition): Name the menu "ERC" instead of "IRC" to
+ avoid confusion with rcirc and other clients.
+
+ * erc-backend.el (erc-server-banned): New variable.
+ (erc-server-connect): Set `erc-server-banned' to nil.
+ (erc-process-sentinel-1): Use `erc-server-reconnect-p'.
+ (erc-server-reconnect-p): New function. Return non-nil if the
+ user wants automatic reconnects and if the user has not been
+ banned from the server. This should fix a bug where ERC gets into
+ a loop trying to reconnect with no way to stop it when the user is
+ denied access to the server due to a server ban. It might also
+ help when Tor users are blocked from freenode if freenode servers
+ send the 465 message before disconnecting.
+ (465): Handle "banned from server" error notices.
+
+2006-08-13 Romain Francoise <romain@orebokech.com>
+
+ * erc-match.el (erc-log-matches-make-buffer): End `y-or-n-p'
+ prompt with a space.
+
+2006-08-13 Michael Olson <mwolson@gnu.org>
+
+ * erc-backend.el (erc-server-timed-out): New variable that
+ indicates whether the current connection has timed out due to
+ failure to respond to a ping.
+ (erc-server-send-ping): Set erc-server-timed-out to t.
+ (erc-server-connect): Initialize erc-server-timed-out to nil.
+ (erc-process-sentinel-1): Consult erc-server-timed-out.
+
+2006-08-11 Michael Olson <mwolson@gnu.org>
+
+ * erc-fill.el (erc-fill): Skip any initial empty lines so that we
+ avoid errors when inserting disconnect messages and other messages
+ that begin with newlines.
+
+2006-08-07 Michael Olson <mwolson@gnu.org>
+
+ * erc-backend.el (erc-process-sentinel-1): Use erc-display-message
+ in several places instead of inserting text.
+ (erc-process-sentinel): Move to the input-marker before removing
+ the prompt.
+
+ * erc.el (erc-port): Fix customization options.
+ (erc-display-message): Handle null type explicitly. Previously,
+ this was relying on a chance side-effect. Cosmetic indentation
+ tweak.
+ (english): Add 'finished and 'terminated entries to the catalog.
+ Add initial and terminal newlines to 'disconnected and
+ 'disconnected-noreconnect entries. Avoid long lines.
+ (erc-cmd-QUIT): Bind the current erc-server-process to
+ server-proc. If the IRC server responds quickly, it is possible
+ for the connection to close, and hence server buffer to be killed,
+ if erc-kill-server-buffer-on-quit is non-nil. This avoids that
+ problem.
+
+2006-08-06 Michael Olson <mwolson@gnu.org>
+
+ * erc-backend.el (erc-server-send-queue): Update from Circe
+ version of this function.
+ (erc-server-ping-timer-alist): New variable that keeps track of
+ ping timers according to their associated server.
+ (erc-server-last-received-time): New variable that specifies the
+ time of the last message we received from the server. This is
+ used to detect hung processes.
+ (erc-server-send-ping): New function that sends a ping to the IRC
+ process corresponding with the given buffer. Split from
+ erc-server-setup-periodical-ping. If the server buffer no longer
+ exists, cancel the timer. If the server process has not given us
+ a message, including PING responses, since the last PING, kill it.
+ This is necessary to deal with some aberrant freenode behavior.
+ Idea taken from rcirc.
+ (erc-server-setup-periodical-ping): Rename from
+ erc-server-setup-periodical-server-ping.
+ (erc-server-filter-function): Use erc-current-time instead of
+ current-time.
+
+ * erc.el (erc-arrange-session-in-multiple-windows): Fix bug with
+ multi-tty Emacs.
+ (erc-select-startup-file): Fix bug introduced by recent change.
+ (erc-cmd-QUIT): If the IRC process has not terminated itself
+ within 4 seconds of completing our quit-hook, kill it manually.
+ Freenode in particular needs this.
+ (erc-connection-established): Use erc-server-setup-periodical-ping
+ instead of erc-server-setup-periodical-server-ping.
+
+2006-08-05 Michael Olson <mwolson@gnu.org>
+
+ * erc-log.el (erc-log-standardize-name): New function that returns
+ a filename that is safe for use for a log file.
+ (erc-current-logfile): Use it.
+
+ * erc.el (erc-startup-file-list): Search in ~/.emacs.d first,
+ since that is a fairly standard directory.
+ (erc-select-startup-file): Re-write to use
+ convert-standard-filename, which will ensure that MS-DOS systems
+ look for the _ercrc.el file.
+
+2006-08-02 Michael Olson <mwolson@gnu.org>
+
+ * erc.el (erc-version-string): Release ERC 5.1.4.
+
+ * Makefile, NEWS, erc.texi: Update for the 5.1.4 release.
+
+ * erc.el (erc-active-buffer): Fix bug that caused messages to go
+ to the wrong buffer. Thanks to offby1 for the report.
+
+ * erc-backend.el (erc-coding-system-for-target): Handle case where
+ target is nil. Thanks to Kai Fan for the patch.
+
+2006-07-29 Michael Olson <mwolson@gnu.org>
+
+ * erc-log.el (erc-log-setup-logging): Don't offer to save the
+ buffer. It will be saved automatically killed. Thanks to Johan
+ Bockgård and Tassilo Horn for pointing this out.
+
+2006-07-27 Johan Bockgård <bojohan@users.sourceforge.net>
+
+ * erc.el (define-erc-module): Make find-function and find-variable
+ find the names constructed by `define-erc-module' in Emacs 22.
+
+2006-07-14 Michael Olson <mwolson@gnu.org>
+
+ * erc-log.el (log): Make sure that we enable logging on
+ already-opened buffers as well, in case the user toggles this
+ module after loading ERC. Also be sure to remove logging ability
+ from all ERC buffers when the module is disabled.
+ (erc-log-setup-logging): Set buffer-file-name to nil rather than
+ the empty string. This should fix some errors that occur when
+ quitting Emacs without first killing all ERC buffers.
+ (erc-log-disable-logging): New function that removes the logging
+ ability from the current buffer.
+
+ * erc-spelling.el (spelling): Use dolist and buffer-live-p.
+
+2006-07-12 Michael Olson <mwolson@gnu.org>
+
+ * erc-match.el (erc-log-matches): Bind inhibit-read-only rather
+ than call toggle-read-only.
+
+ * erc.el (erc-handle-irc-url): Move here from erc-goodies.el and
+ add autoload cookie.
+
+2006-07-09 Michael Olson <mwolson@gnu.org>
+
+ * erc.el (erc-version-string): Release ERC 5.1.3.
+
+ * erc.texi: Update for the 5.1.3 release.
+
+ * erc-autoaway.el (erc-autoaway-set-back): Fix bug after returning
+ from being set automatically away and current buffer is not an ERC
+ buffer.
+
+ * erc-identd.el: Fix compiler error.
+
+ * erc.texi (Development): Use @subheading instead of @subsection.
+ (Advanced Usage): Add menu.
+ (Connecting): Fully document how to connect to an IRC server.
+ (Options, Tips and Tricks, Sample Configuration): New unwritten
+ sections.
+
+ * erc.el (erc-server, erc-port, erc-nick, erc-nick-uniquifier)
+ (erc-user-full-name, erc-password): Docfixes and customization
+ interface tweaks.
+ (erc-try-new-nick-p): Rename from
+ `erc-manual-set-nick-on-bad-nick-p' and invert meaning.
+ (erc-nickname-in-use): Use `erc-try-new-nick-p'. Check the length
+ of `erc-nick-uniquifier', in case someone wants multiple
+ characters.
+ (erc-compute-server, erc-compute-nick, erc-compute-full-name)
+ (erc-compute-port): Docfixes.
+
+ * erc-log.el (log): Move all add-hook calls here, rather than
+ executing them immediately, and also cause them to be un-hooked
+ when the module is removed.
+ (erc-save-buffer-on-part): Move next to
+ `erc-save-queries-on-quit'.
+ (erc-save-buffer-on-quit, erc-save-queries-on-quit): Default to t.
+ (erc-log-write-after-send, erc-log-write-after-insert): Default to
+ nil. This makes things fast, but reasonably failsafe, by default.
+
+2006-07-08 Michael Olson <mwolson@gnu.org>
+
+ * erc-log.el (erc-log-insert-log-on-open): Make this nil by
+ default, since most IRC clients don't do this.
+ (erc-log-write-after-send): New option that determines whether the
+ log file will be written to after every sent message.
+ (erc-log-write-after-insert): New option that determines whether
+ the log file will be written to when new text is added to a logged
+ ERC buffer.
+ (log): Use the aforementioned options.
+
+ * erc.texi (Modules): Document the "completion" module.
+
+ * erc-pcomplete.el (pcomplete-erc-nicks): Make sure that we don't
+ have a nil element in the list when ignore-self is non-nil.
+
+2006-07-05 Michael Olson <mwolson@gnu.org>
+
+ * erc.el (erc-modules): Use `set' instead of `set-default', since
+ this setting should never be buffer-local. Add the `page' module
+ to the list.
+
+ * erc.texi (Modules): Add entries for `list' and `page' modules.
+ Change "spell" to "spelling".
+ (History): Use past tense throughout.
+
+2006-07-02 Michael Olson <mwolson@gnu.org>
+
+ * erc-backend.el (erc-call-hooks): Fix (stringp nil) error that
+ can happen when doing /PART.
+
+ * erc.el (erc-quit-reason-various-alist)
+ (erc-part-reason-various-alist): In the example, use "^$" as an
+ example, since "" matches anything.
+ (erc-quit-reason-various, erc-part-reason-various): If no argument
+ is given, and no matches are found, use our default reason instead
+ of "nil".
+
+2006-06-30 Michael Olson <mwolson@gnu.org>
+
+ * erc.texi (Modules): Mention identd.
+ (Releases): Update mailing list address and download location.
+ (Development): Refactor. Provide updated directions for Arch.
+ Make URLs clickable.
+ (Keystroke Summary): Typo fix. Use more Texinfo syntax.
+ (Getting Started): Give simpler example. We do not need to
+ explicitly load every module.
+ (History): Update.
+
+ * erc-autoaway.el, erc-join.el, erc-backend.el, erc-bbdb.el:
+ erc-button.el, erc-chess.el, erc-compat.el, erc-hecomplete.el:
+ erc-dcc.el, erc-ezbounce.el, erc-fill.el, erc-ibuffer.el:
+ erc-imenu.el, erc-list.el, erc-log.el, erc-match.el, erc-menu.el:
+ erc-networks.el, erc-netsplit.el, erc-nicklist.el:
+ erc-services.el, erc-pcomplete.el, erc-replace.el, erc-ring.el:
+ erc-speedbar.el, erc-spelling.el, erc-stamp.el, erc-track.el:
+ erc.el: Remove version strings.
+
+ * erc.el (erc-cmd-SMV): Remove, since we do not have meaningful
+ module versions anymore.
+ (erc-version-modules): Remove, since we do not use this function
+ anymore.
+ (erc-latest-version, erc-ediff-latest-version): Remove, since this
+ was only useful back when ERC consisted of one file.
+ (erc-modules): Add line for identd.
+ (erc-get-channel-mode-from-keypress): Typo fix.
+
+ * erc-imenu.el: Remove unnecessary lines in header.
+
+ * erc-goodies.el (erc-handle-irc-url): Docfix.
+
+ * erc-identd.el: Define an ERC module for this.
+ (erc-identd-start): Don't create a process buffer if possible.
+ Otherwise, use conventional hidden names for process buffers.
+
+2006-06-29 Michael Olson <mwolson@gnu.org>
+
+ * erc-backend.el (erc-coding-system-for-target): Match
+ case-insensitively. Use a pattern match instead of `assoc', as
+ per the documentation for `erc-encoding-coding-alist'.
+
+ * erc-track.el (erc-track-shorten-aggressively): Fix typo.
+
+2006-06-27 Michael Olson <mwolson@gnu.org>
+
+ * erc.el: Update maintainer information and URLs.
+
+2006-06-14 Michael Olson <mwolson@gnu.org>
+
+ * erc.el (erc-active-buffer): If the active buffer has been
+ deleted, default to the server buffer.
+ (erc-toggle-flood-control): When the user hits C-c C-f, make flood
+ control really toggle, not unconditionally turn off.
+
+2006-06-12 Michael Olson <mwolson@gnu.org>
+
+ * NEWS: Add items since the 5.1.2 release.
+
+ * erc-autoaway.el (erc-autoaway-caused-away): New variable that
+ indicates whether the current away status was caused by this
+ module.
+ (erc-autoaway-set-back): Only set back if this module set the user
+ away.
+ (erc-autoaway-set-away): Update `erc-autoaway-caused-away'.
+ (erc-autoaway-reset-indicators): New function that resets some
+ indicators when the user is no longer away.
+ (autoaway): Add the above function to the 305 hook.
+
+2006-06-05 Romain Francoise <romain@orebokech.com>
+
+ * erc.texi (History): Fix various typos.
+
+2006-06-04 Michael Olson <mwolson@gnu.org>
+
+ * erc-autoaway.el (erc-autoaway-idle-method): Move after the
+ definition of the autoaway module.
+ (autoaway): Don't do anything if erc-autoaway-idle-method is
+ unbound. This prevents an error on startup.
+
+2006-06-03 Michael Olson <mwolson@gnu.org>
+
+ * erc-autoaway.el: Thanks to Mark Plaksin for the ideas and patch.
+ (erc-autoaway-idle-method): Renamed from
+ `erc-autoaway-use-emacs-idle'. We have more than two choices for
+ how to do this, so it's best to make this take symbol values.
+ Improve documentation. Remove warning against Emacs idle-time;
+ the point is moot now that we get user idle time via a different
+ method. Make sure we disable and re-enable the module when
+ changing this value.
+ (autoaway): Conditionalize on the above option. If using the idle
+ timer or user idle methods, don't add anything to the
+ send-completed or server-001 hooks, since it is unnecessary.
+ (erc-autoaway-reestablish-idletimer, erc-autoaway-message):
+ Docfix.
+ (erc-autoaway-idle-seconds): Use erc-autoaway-idle-method.
+ (erc-autoaway-reset-idle-irc): Renamed from
+ `erc-autoaway-reset-idle'. Don't pass line to
+ `erc-autoaway-set-away', since it is not used.
+ (erc-autoaway-reset-idle-user): New function that resets the idle
+ state for user idle time.
+ (erc-autoaway-set-back): Remove line argument, since it is not
+ used.
+
+2006-06-01 Michael Olson <mwolson@gnu.org>
+
+ * erc.el (erc-buffer-filter): Make sure all buffers returned from
+ this are live.
+
+2006-05-01 Edward O'Connor <ted@oconnor.cx>
+
+ * erc-goodies.el (erc-handle-irc-url): New function, suitable as
+ a value for `url-irc-function'.
+
+2006-04-18 Diane Murray <disumu@x3y2z1.net>
+
+ * erc-pcomplete.el (pcomplete-erc-nicks): Added new optional
+ argument IGNORE-SELF. If this is non-nil, don't return the user's
+ current nickname. Doc fix.
+ (pcomplete/erc-mode/complete-command): Don't complete the current
+ nickname.
+
+2006-04-05 Diane Murray <disumu@x3y2z1.net>
+
+ * erc.el (erc-cmd-SV): Removed the exclamation point. Show the
+ build date as it's shown in `emacs-version'.
+
+ * erc-capab.el (erc-capab-identify-add-prefix): Insert the prefix
+ with the same face property as the previous character.
+
+2006-04-02 Michael Olson <mwolson@gnu.org>
+
+ * erc-backend.el, erc-ezbounce.el, erc-join.el, erc-netsplit.el,
+ erc.el: Make sure to include a newline inside of negated classes,
+ so that a newline is not matched.
+
+2006-04-01 Michael Olson <mwolson@gnu.org>
+
+ * erc-backend.el (erc-server-connect-function): Don't try to
+ detect the existence of the `open-network-stream-nowait' function,
+ since I can't find it in Emacs21, XEmacs21, or Emacs22.
+
+2006-03-27 Michael Olson <mwolson@gnu.org>
+
+ * erc.texi: Update direntry. Remove unneeded local variables.
+
+2006-03-26 Michael Olson <mwolson@gnu.org>
+
+ * erc.el (erc-header-line): New face that will be used to colorize
+ the text of the header-line, provided that
+ `erc-header-line-face-method' is non-nil.
+ (erc-prompt-face): Fix formatting.
+ (erc-header-line-face-method): New option that determines the
+ method used for colorizing header-line text. This may be a
+ function, nil, or non-nil.
+ (erc-update-mode-line-buffer): Use the aforementioned option and
+ face to colorize the header-line text, if that is what the user
+ wants.
+ (erc-send-input): If flood control is not activated, don't split
+ the input line.
+
+2006-03-25 Michael Olson <mwolson@gnu.org>
+
+ * erc.el (erc-cmd-QUOTE): Install patch from Aravind Gottipati
+ that fixes the case where there is no leading whitespace. Only
+ remove the first space character, though.
+
+ * erc-identd.el (erc-identd-start): Fix a bug by making sure that
+ erc-identd-process is set properly.
+ (erc-identd-start, erc-identd-stop): Add autoload cookies.
+ (erc-identd-start): Pass :host parameter so this works with Emacs
+ 22.
+
+2006-03-09 Diane Murray <disumu@x3y2z1.net>
+
+ * erc-button.el (erc-button-keymap): Use <backtab> rather than
+ <C-tab> for `erc-button-previous' as it is a more standard key
+ binding for this type of function.
+
+2006-02-28 Diane Murray <disumu@x3y2z1.net>
+
+ * erc-capab.el: Removed things that were accidentally committed on
+ 2006-02-20. Removed Todo section.
+ (erc-capab-unidentified): Removed.
+
+2006-02-26 Michael Olson <mwolson@gnu.org>
+
+ * erc-capab.el: Use (eval-when-compile (require 'cl)).
+ (erc-capab-unidentified): Fix compiler warning by specifying
+ group.
+
+2006-02-20 Diane Murray <disumu@x3y2z1.net>
+
+ * erc-capab.el (erc-capab-send-identify-messages): Fixed comment
+ to explain thoughts better. `erc-server-parameters' is an
+ associated list when it's set, not a string.
+
+2006-02-19 Michael Olson <mwolson@gnu.org>
+
+ * erc-capab.el (erc-capab-send-identify-messages): Make sure some
+ parameters are strings before using them. Thanks to Alejandro
+ Benitez for the report.
+
+ * erc.el (erc-version-string): Release ERC 5.1.2.
+
+2006-02-19 Diane Murray <disumu@x3y2z1.net>
+
+ * erc-button.el (erc-button-keymap): Bind `erc-button-previous' to
+ <C-tab>.
+ (erc-button-previous): New function.
+
+2006-02-15 Michael Olson <mwolson@gnu.org>
+
+ * NEWS: Add category for ERC 5.2.
+
+ * erc.el (erc): Move to the end of the buffer when a continued
+ session is detected. Thanks to e1f and indio for the report and
+ testing a potential fix.
+
+2006-02-14 Michael Olson <mwolson@gnu.org>
+
+ * debian/changelog: Prepare a new Debian package.
+
+ * Makefile (debprepare): New rule that creates an ERC snapshot
+ directory for use in both new Debian releases and revisions for
+ Debian packages.
+ (debrelease, debrevision-mwolson): Use debprepare.
+
+ * NEWS: Bring up-to-date.
+
+ * erc-stamp.el (erc-insert-timestamp-right): For now, put
+ timestamps before rather than after erc-fill-column when
+ erc-timestamp-right-column is nil. This way we won't surprise
+ anyone unpleasantly, or so it is hoped.
+
+2006-02-13 Michael Olson <mwolson@gnu.org>
+
+ * erc-dcc.el: Use (eval-when-compile (require 'cl)).
+
+2006-02-12 Michael Olson <mwolson@gnu.org>
+
+ * erc-autoaway.el, erc-dcc.el, erc-ezbounce.el, erc-fill.el
+ * erc-goodies.el, erc-hecomplete.el, erc-ibuffer.el, erc-identd.el
+ * erc-imenu.el, erc-join.el, erc-lang.el, erc-list.el, erc-log.el
+ * erc-match.el, erc-menu.el, erc-netsplit.el, erc-networks.el
+ * erc-notify.el, erc-page.el, erc-pcomplete.el, erc-replace.el
+ * erc-ring.el, erc-services.el, erc-sound.el, erc-speedbar.el
+ * erc-spelling.el, erc-track.el, erc-truncate.el, erc-xdcc.el:
+ Add 2006 to copyright years, to comply with the changed guidelines.
+
+2006-02-11 Michael Olson <mwolson@gnu.org>
+
+ * erc.el (erc-update-modules): Handle erc-capab-identify
+ correctly. Make some requirements shorter, so that it's easier to
+ see why they are needed.
+
+ * erc-capab.el: Add autoload cookie for capab-identify.
+ (erc-capab-send-identify-messages, erc-capab-identify-activate):
+ Minor whitespace fix in code.
+
+ * erc-stamp.el (erc-timestamp-use-align-to): Renamed from
+ `erc-timestamp-right-align-by-pixel'. Set the default based on
+ whether we are in Emacs 22, and using X. Improve documentation.
+ (erc-insert-aligned): Remove calculation of offset, since
+ :align-to pos works after all. Unlike the previous solution, this
+ one works when erc-stamp.el is compiled.
+ (erc-insert-timestamp-right): Don't add length of string, and then
+ later remove its displayed width. This puts timestamps after
+ erc-fill-column when erc-timestamp-right-column is nil, rather
+ than before it. It also fixes a subtle bug. Remove use of
+ `current-window', since there is no variable by that name in
+ Emacs21, Emacs22, or XEmacs21 beta. Check to see whether
+ `erc-fill-column' is non-nil before using it.
+
+2006-02-11 Diane Murray <disumu@x3y2z1.net>
+
+ * erc-list.el: Define `list' module which sets the alias
+ `erc-cmd-LIST' to `erc-list-channels' when enabled and
+ `erc-list-channels-simple' when disabled.
+ (erc-list-channels): Was `erc-cmd-LIST', renamed.
+ (erc-list-channels-simple): New function.
+
+ * erc.el (erc-modules): Added `list' to enabled modules. Changed
+ `capab-identify' description. Moved customization options left in
+ source code.
+
+ * erc-menu.el (erc-menu-definition): Use `erc-list-channels'.
+
+ * erc-capab.el: Put a little more detail into Usage section.
+ (define-erc-module): Run `erc-capab-identify-setup' in all open
+ server buffers when enabling.
+ (erc-capab-identify-setup): Make PROC and PARSED optional
+ arguments.
+ (erc-capab-identify-add-prefix): Simplified nickname regexp. This
+ should now also match nicknames that are formatted differently
+ than the default.
+
+ * erc-spelling.el (define-erc-module): Make sure there's a buffer
+ before calling `with-current-buffer'.
+
+2006-02-10 Michael Olson <mwolson@gnu.org>
+
+ * Makefile (debbuild): Split from debrelease.
+ (debrevision-mwolson): New rule that causes a Debian revision to
+ be built.
+
+ * erc.el (erc-migrate-modules): Use a better algorithm. Thanks to
+ Johan Bockgård.
+ (erc-modules): Change use of 'pcomplete to 'completion.
+
+2006-02-09 Diane Murray <disumu@x3y2z1.net>
+
+ * erc.el (erc-get-parsed-vector, erc-get-parsed-vector-nick)
+ * erc-capab.el: Require erc.
+ (erc-capab-send-identify-messages): Use `erc-server-send'.
+ (erc-capab-identify-remove/set-identified-flag): Use 1 and 0 as
+ the flags so we can also check whether the `erc-identified' text
+ property is there at all.
+ (erc-capab-identify-add-prefix): Use `erc-capab-find-parsed'.
+ This fixes a bug where the prefix wasn't inserted when timestamps
+ are inserted on the right. Tweaked nickname regexp.
+ (erc-capab-find-parsed): New function.
+ (erc-capab-get-unidentified-nickname): Updated to check for 0
+ flag. Only get nickname if there's a nickuserhost associated with
+ this message.
+
+ * erc-capab.el: New file. Adds the new module
+ `erc-capab-identify', which allows flagging of unidentified users
+ on servers running an ircd based on dancer - irc.freenode.net, for
+ example.
+
+ * erc.el (erc-modules): Added `capab-identify' to options.
+ (erc-get-parsed-vector, erc-get-parsed-vector-nick)
+ (erc-get-parsed-vector-type): Moved here from erc-match.el.
+
+ * erc-match.el (erc-get-parsed-vector, erc-get-parsed-vector-nick)
+ (erc-get-parsed-vector-type): Moved these functions to erc.el
+ since they can be useful outside of the text matching module.
+
+ * NEWS: Added erc-capab.el.
+
+ * erc-dcc.el, erc-stamp.el, erc-xdcc.el: Changed "Emacs IRC Client"
+ to "ERC".
+
+2006-02-07 Michael Olson <mwolson@gnu.org>
+
+ * ChangeLog.01, ChangeLog.02, ChangeLog.03, ChangeLog.04,
+ ChangeLog.05: Rename from ChangeLog.NNNN in order to disambiguate
+ the filenames in DOS.
+
+ * erc-goodies.el: Comment fix.
+
+ * erc-hecomplete.el: Rename from erc-complete.el. Update
+ commentary. Use define-erc-module so that it's possible to
+ actually use this.
+ (erc-hecomplete): Rename function from `erc-complete'.
+ (erc-hecomplete): Rename group from `erc-old-complete'. Docfix.
+
+ * erc-join.el: Rename from erc-autojoin.el.
+
+ * erc-networks.el: Rename from erc-nets.el.
+
+ * erc-services.el: Rename from erc-nickserv.el.
+
+ * erc-stamp.el (erc-insert-aligned): Don't take 3rd argument. Use
+ the simpler `indent-to' function when
+ `erc-timestamp-right-align-by-pixel' is nil.
+ (erc-insert-timestamp-right): If the timestamp goes on the
+ following line, don't add timestamp properties to the spaces in
+ front of it.
+
+ * erc.el (erc-migrate-modules): New function that eases migration
+ of module names.
+ (erc-modules): Call erc-migrate-modules in the :get accessor.
+ (erc-modules, erc-update-modules): Update for new modules names.
+ (erc-cmd-SMV): Remove, since this does not give useful output due
+ to the version strings being removed from ERC modules.
+
+2006-02-05 Michael Olson <mwolson@gnu.org>
+
+ * erc-spelling.el (erc-spelling-init): If
+ `erc-spelling-dictionaries' is nil, do not set
+ ispell-local-dictionary. Before, it was being set to nil, which
+ was causing a long delay while the ispell process restarted.
+ (erc-spelling-unhighlight-word): New function that removes
+ flyspell properties from a spell-checked word.
+ (erc-spelling-flyspell-verify): Don't spell-check nicks or words
+ that have '/' before them.
+
+2006-02-04 Michael Olson <mwolson@gnu.org>
+
+ * erc-autojoin.el: Use (eval-when-compile (require 'cl)).
+
+ * erc-complete.el (erc-nick-completion-exclude-myself)
+ (erc-try-complete-nick): Use better function for getting list of
+ channel users.
+
+ * erc-goodies.el: Docfix.
+
+ * erc-stamp.el: Use new arch tagline, since the other one wasn't
+ being treated properly.
+
+ * erc.el (erc-version-string): Release ERC 5.1.1.
+
+2006-02-03 Zhang Wei <id.brep@gmail.com>
+
+ * erc.el (erc-version-string): Don't hard-code Emacs version.
+ (erc-version): Use emacs-version.
+
+2006-01-31 Michael Olson <mwolson@gnu.org>
+
+ * erc-stamp.el: Update copyright years.
+
+2006-01-30 Simon Josefsson <jas@extundo.com>
+
+ * erc.el (erc-open-ssl-stream): Use tls.el.
+
+2006-01-30 Michael Olson <mwolson@gnu.org>
+
+ * erc-stamp.el (erc-timestamp-right-align-by-pixel): New option
+ that determines whether to use pixel values to align right
+ timestamps. The default is not to do so, since it only works with
+ Emacs22 on X, and even then some people have trouble.
+ (erc-insert-aligned): Use `erc-timestamp-right-align-by-pixel'.
+
+2006-01-29 Michael Olson <mwolson@gnu.org>
+
+ * ChangeLog, ChangeLog.2005, ChangeLog.2004, ChangeLog.2003,
+ ChangeLog.2002, ChangeLog.2001: Add "See ChangeLog.NNNN" line for
+ earlier changes. Use utf-8 encoding. Fix some accent typos.
+
+ * erc-speedbar.el (erc-speedbar-buttons): Fix reference to free
+ variable.
+ (erc-speedbar-goto-buffer): Fix compiler warning.
+
+ * erc-ibuffer.el: Use `define-ibuffer-filter' instead of
+ `ibuffer-degine-limiter'. Use `define-ibuffer-column' instead of
+ `ibuffer-define-column'. Require 'ibuf-ext so that the macros
+ work without compiler warnings.
+
+ * man/erc.texi (Obtaining ERC, Installation): Note that these
+ sections may be skipped if using the version of ERC that comes
+ with Emacs.
+
+2006-01-29 Edward O'Connor <ted@oconnor.cx>
+
+ * erc-viper.el: Remove. Now that ERC is included in Emacs, these
+ work-arounds live in Viper itself.
+
+2006-01-28 Michael Olson <mwolson@gnu.org>
+
+ * erc-*.el, erc.texi, NEWS: Add Arch taglines as per Emacs
+ guidelines.
+
+ * erc-*.el: Space out copyright years like the rest of Emacs. Use
+ the Emacs copyright statement. Refer to ourselves as ERC rather
+ than "Emacs IRC Client", since there are now several IRC clients
+ for Emacs.
+
+ * erc-compat.el (erc-emacs-build-time): Define as a variable.
+
+ * erc-log.el (erc-log-setup-logging): Use write-file-functions.
+
+ * erc-ibuffer.el: Require 'erc.
+
+ * erc-stamp.el (erc-insert-aligned): Only use the special text
+ property when window-system is X.
+
+ * erc.texi: Adapt for inclusion in Emacs.
+
+2006-01-28 Johan Bockgård <bojohan@users.sourceforge.net>
+
+ * erc.el (erc-format-message): More `cl' breakage; don't use
+ `oddp'.
+
+2006-01-27 Michael Olson <mwolson@gnu.org>
+
+ * debian/changelog: Update for new release.
+
+ * debian/control (Description): Update.
+
+ * debian/rules: Concatenate ChangeLog for 2005.
+
+ * Makefile (MISC): Include ChangeLog.2005 and erc.texi.
+ (debrelease, release): Copy images directory.
+
+ * NEWS: Spelling fixes. Add items for recent changes.
+
+ * erc.el (erc): Move call to erc-update-modules before the call to
+ erc-mode. This should fix a timestamp display issue.
+ (erc-version-string): Release ERC 5.1.
+
+2006-01-26 Michael Olson <mwolson@gnu.org>
+
+ * erc-stamp.el (erc-insert-aligned): New function that inserts
+ text in an perfectly-aligned way relative to the right margin. It
+ only works well with Emacs22. A sane fallback is provided for
+ other versions of Emacs.
+ (erc-insert-timestamp-right): Use the new function.
+
+2006-01-25 Edward O'Connor <ted@oconnor.cx>
+
+ * erc.el (erc-modules): Ensure that `erc-button-mode' gets enabled
+ before `erc-match-mode'.
+
+ * erc-match.el (match): Append `erc-match-message' to
+ `erc-insert-modify-hook'.
+
+2006-01-25 Michael Olson <mwolson@gnu.org>
+
+ * FOR-RELEASE: Mark last release requirement as done.
+
+ * Makefile (realclean, distclean): Remove docs.
+
+ * erc.texi: Take care of all pre-5.1 items.
+
+ * erc-backend.el (erc-server-send, erc-server-send-queue): Wrap
+ `process-send-string' in `condition-case' to avoid an error when
+ quitting ERC.
+
+ * erc-stamp.el (erc-insert-timestamp-right): Try to deal with
+ variable-width characters in the timestamp and on the same line.
+ The latter is a kludge, but it seems to work with most of the
+ input I've thrown at it so far. It's certainly better than going
+ past the end of line consistently when we have variable-width
+ characters on the same line. When `erc-timestamp-intangible' is
+ non-nil, add intangible properties to the whitespace as well, so
+ that hitting <end> does what you'd expect.
+
+ * erc.el (erc-flood-protect, erc-toggle-flood-control): Update
+ this to only use boolean values for `erc-flood-protect'. Update
+ documentation.
+ (erc-cmd-QUIT): Set the active buffer to be the server buffer, so
+ that any QUIT-related messages go there.
+ (erc): Try to be more clever about re-using channel buffers when
+ automatically re-connecting. Thanks to e1f for noticing.
+
+2006-01-23 Michael Olson <mwolson@gnu.org>
+
+ * ChangeLog.2005: Remove erroneous line.
+
+ * FOR-RELEASE: Make that the Makefile tweaking is complete.
+ (NEWS): Mark as done.
+
+ * Makefile (MANUAL): New option indicating the name of the manual.
+ (PREFIX, ELISPDIR, INFODIR): New options that specify the
+ directories to install lisp code and info manuals to. PREFIX is
+ used only by ELISPDIR and INFODIR.
+ (all): Call `lisp' and create the manual.
+ (lisp): Compile lisp code.
+ (%.info, %.html): New rules that make Info files and HTML files,
+ respectively, from a TexInfo source.
+ (doc): Create both the Info and HTML versions of the manual. This
+ is for the user -- we never call it automatically.
+ (install-info): Install Info files.
+ (install-bin): Install compiled and source Lisp files.
+ (todo): Remove, since it seems pointless.
+
+ * NEWS: Update.
+
+ * README: Add Installation instructions. Tweak layout.
+
+ * erc.texi: Work on some pre-5.1 items.
+
+ * erc-stamp.el, erc-track.el: Move some functions and options in
+ order to get rid of a few compiler warnings.
+
+ * erc.el (erc-modules): Enable readonly by default. This will
+ prevent new users from accidentally removing old messages, which
+ could be disconcerting. Also enable stamp by default, since
+ timestamps are a fairly standard feature among IRC clients.
+
+ * erc-button.el: Munge whitespace.
+
+ * erc-identd.el (erc-identd-start): Instead of throwing an error,
+ just try to use the obsolete function.
+
+2006-01-22 Michael Olson <mwolson@gnu.org>
+
+ * erc-backend.el (erc-decode-string-from-target): Make sure that
+ we have a string as an argument. If not, coerce it to the empty
+ string. Hopefully, this will work painlessly around an edge case
+ related to quitting ERC around the same time a message comes in.
+
+2006-01-22 Johan Bockgård <bojohan@users.sourceforge.net>
+
+ * erc-track.el: Use `(eval-when-compile (require 'cl))' (for
+ `case'). Doc fixes.
+ (erc-find-parsed-property): Simplify.
+ (erc-track-get-active-buffer): Fix logic. Simplify.
+ (erc-track-switch-buffer): Remove unused variable `dir'. Simplify.
+
+ * erc-speak.el: Doc fixes.
+ (erc-speak-region): `propertize' --> `erc-propertize'.
+
+ * erc-dcc.el (erc-dcc-chat-parse-output): `propertize' -->
+ `erc-propertize'.
+
+ * erc-button.el (erc-button-add-button): Take erc-fill-prefix into
+ account when wrapping URLs.
+
+ * erc-bbdb.el (erc-bbdb-elide-display): Doc fix.
+
+ * erc-backend.el (define-erc-response-handler): Doc fix.
+
+2006-01-22 Michael Olson <mwolson@gnu.org>
+
+ * erc.el (erc-update-modules): Use `require' instead of `load',
+ but prevent it from causing errors, in order to preserve the
+ previous behavior.
+
+2006-01-21 Michael Olson <mwolson@gnu.org>
+
+ * FOR-RELEASE (Source): Mark cl task as done.
+
+ * Makefile (erc-auto.el): Call erc-generate-autoloads rather than
+ generate-autoloads.
+ (erc-auto.el, %.elc): Don't show command, just its output.
+
+ * NEWS: Add items from 2005-01-01 to 2005-08-13.
+
+ * debian/copyright (Copyright): Update.
+
+ * erc-auto.in (erc-generate-autoloads): Rename from
+ generate-autoloads.
+
+ * erc.el, erc-autoaway.el, erc-backend.el: Use
+ erc-server-process-alive instead of erc-process-alive.
+
+ * erc.el, erc-backend.el, erc-ezbounce.el, erc-list.el,
+ erc-log.el, erc-match.el, erc-nets.el, erc-netsplit.el,
+ erc-nicklist.el, erc-nickserv.el, erc-notify.el, erc-pcomplete.el:
+ Use (eval-when-compile (require 'cl)), so that compilation doesn't
+ fail.
+
+ * erc-fill.el, erc-truncate.el: Whitespace munging.
+
+ * erc.el: Update copyright notice. Remove eval-after-load code.
+ (erc-with-buffer): Docfix.
+ (erc-once-with-server-event, erc-once-with-server-event-global)
+ (erc-with-buffer, erc-with-all-buffers-of-server): Use erc-gensym
+ instead of gensym.
+ (erc-banlist-update): Use erc-delete-if instead of delete-if.
+ (erc): Call `erc-update-modules' here.
+
+ * erc-backend.el: Require 'erc-compat to minimize compiler
+ warnings.
+ (erc-decode-parsed-server-response): Docfix.
+ (erc-server-process-alive): Move here from erc.el and rename from
+ `erc-process-alive'.
+ (erc-server-send, erc-remove-channel-users): Make sure process is
+ alive before sending data to it.
+
+ * erc-bbdb.el: Update copyright years.
+ (erc-bbdb-whois): Remove overexuberant comment.
+
+ * erc-button.el: Require erc-fill, since we make liberal use of
+ `erc-fill-column'.
+
+ * erc-compat.el (erc-const-expr-p, erc-list*, erc-assert): New
+ functions, the latter of which provides an `assert' equivalent.
+ (erc-remove-if-not): New function that provides a simple
+ implementation of `remove-if-not'.
+ (erc-gensym): New function that provides a simple implementation
+ of `gensym'.
+ (erc-delete-if): New function that provides a simple
+ implementation of `delete-if'.
+ (erc-member-if): New function that provides a simple
+ implementation of `member-if'.
+ (field-end): Remove this, since it is unused, and later versions
+ of XEmacs have this function already.
+ (erc-function-arglist): Moved here from erc.el.
+ (erc-delete-dups): New compatibility function for dealing with
+ XEmacs.
+ (erc-subseq): New function copied from cl-extra.el.
+
+ * erc-dcc.el: Require pcomplete during compilation to avoid
+ compiler warnings.
+ (erc-unpack-int, erc-dcc-send-filter)
+ (erc-dcc-get-filter): Use erc-assert instead of assert.
+ (pcomplete/erc-mode/DCC): Use erc-remove-if-not instead of
+ remove-if-not.
+
+ * erc-match.el (erc-log-matches): Fix compiler warning.
+
+ * erc-nicklist.el: Update copyright notice.
+ (erc-nicklist-menu): Change use of caadr to (car (cadr ...)).
+ (erc-nicklist-bitlbee-connected-p): Remove.
+ (erc-nicklist-insert-medium-name-or-icon): Accept channel
+ argument. Use it to determine whether we are on bitlbee. Now
+ that bitlbee names its channel "&bitlbee", this is trivial.
+ (erc-nicklist-insert-contents): Pass channel as specified above.
+ Don't try to determine whether we are on bitlbee here.
+ (erc-nicklist-channel-users-info): Use erc-remove-if-not instead
+ of remove-if-not.
+ (erc-nicklist-search-for-nick): Use erc-member-if instead of
+ member-if.
+
+ * erc-notify.el (erc-notify-QUIT): Use erc-delete-if with a
+ partially-evaluated lambda expression instead of `delete' and
+ `find'.
+
+ * erc-track.el: Use erc-assert.
+ (erc-track-modified-channels): Remove use of `return'.
+ (erc-track-modified-channels): Use `cadr' instead of `second',
+ since otherwise we would need yet another eval-when-compile line.
+
+2006-01-19 Michael Olson <mwolson@gnu.org>
+
+ * erc-backend.el (erc-process-sentinel-1): Remove attempt to
+ detect SIGPIPE, since it doesn't work.
+
+2006-01-10 Diane Murray <disumu@x3y2z1.net>
+
+ * erc-spelling.el: Updated copyright years.
+ (define-erc-module): Enable/disable `flyspell-mode' for all open
+ ERC buffers as well.
+ (erc-spelling-dictionaries): Reworded customize description.
+
+ * erc.el (erc-command-symbol): New function.
+ (erc-extract-command-from-line): Use `erc-command-symbol'. This
+ fixes a bug where "Symbol's function definition is void:
+ erc-cmd-LIST" would be shown after typing /list at the prompt (the
+ command was interned because erc-menu.el uses it and is enabled by
+ default whereas erc-list.el is not).
+
+ * NEWS: Started a list of renamed variables.
+
+ * erc.el: Reworded the message sent when defining variable
+ aliases.
+ (erc-command-indicator-face): Doc fix.
+ (erc-modules): Enable the match module by default which makes
+ current nickname highlighting on as the default.
+
+ * erc-button.el: Updated copyright years.
+ (erc-button): New face.
+ (erc-button-face): Use `erc-button'.
+ (erc-button-nickname-face): New customizable variable.
+ (erc-button-add-nickname-buttons, erc-button-add-buttons-1): Send
+ new argument to `erc-button-add-button'.
+ (erc-button-add-button): Doc fix. Added new argument to function
+ definition, NICK-P. If it's a nickname, use
+ `erc-button-nickname-face', otherwise use `erc-button-face'. This
+ makes channel tracking and buttons work better together when
+ `erc-button-buttonize-nicks' is enabled, since there is a nickname
+ on just about every line.
+
+ * erc-track.el (erc-track-use-faces): Doc fix.
+ (erc-track-faces-priority-list): Added `erc-button' to list.
+ (erc-track-priority-faces-only): Doc fix.
+
+2006-01-09 Diane Murray <disumu@x3y2z1.net>
+
+ * erc-button.el (erc-button-url-regexp): Use `concat' so the
+ regexp is not one long line.
+ (erc-button-alist): Fixed so that customizing works correctly.
+ Reorganized. Removed lambda functions with more than two lines.
+ Doc fix.
+ (erc-button-describe-symbol, erc-button-beats-to-time): New
+ functions. Moved from `erc-button-alist'.
+
+2006-01-07 Michael Olson <mwolson@gnu.org>
+
+ * erc-backend.el (erc-process-sentinel-1): Don't try to re-open a
+ process if a SIGPIPE occurs. This happens when a new message
+ comes in at the same time a /quit is requested.
+ (erc-process-sentinel): Use string-match rather than string= to do
+ these comparisons. Matching literal newlines makes me nervous.
+
+ * erc-track.el (erc-track-remove-from-mode-line): Handle case
+ where global-mode-string is not a list. Emacs22 permits this.
+
+
+See ChangeLog.05 for earlier changes.
+
+ Copyright (C) 2006, 2007 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 2, 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; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+
+;; Local Variables:
+;; coding: utf-8
+;; add-log-time-zone-rule: t
+;; End:
+
+;; arch-tag: 865a75f6-2bcb-46df-bf0c-b514dadf688a
diff --git a/lisp/erc/erc-autoaway.el b/lisp/erc/erc-autoaway.el
index 9d90d0ae5e9..91a1150802b 100644
--- a/lisp/erc/erc-autoaway.el
+++ b/lisp/erc/erc-autoaway.el
@@ -40,6 +40,49 @@ yourself back when you type something."
"The Emacs idletimer.
This is only used when `erc-autoaway-idle-method' is set to 'emacs.")
+(defvar erc-autoaway-last-sent-time (erc-current-time)
+ "The last time the user sent something.")
+
+(defvar erc-autoaway-caused-away nil
+ "Indicates whether this module was responsible for setting the
+user's away status.")
+
+(eval-when-compile (defvar erc-autoaway-idle-seconds))
+
+(defun erc-autoaway-reestablish-idletimer ()
+ "Reestablish the Emacs idletimer.
+If `erc-autoaway-idle-method' is 'emacs, you must call this
+function each time you change `erc-autoaway-idle-seconds'."
+ (interactive)
+ (when erc-autoaway-idletimer
+ (erc-cancel-timer erc-autoaway-idletimer))
+ (setq erc-autoaway-idletimer
+ (run-with-idle-timer erc-autoaway-idle-seconds
+ t
+ 'erc-autoaway-set-away
+ erc-autoaway-idle-seconds)))
+
+(defun erc-autoaway-some-server-buffer ()
+ "Return some ERC server buffer if its connection is alive.
+If none is found, return nil."
+ (car (erc-buffer-list #'erc-open-server-buffer-p)))
+
+(defun erc-autoaway-insinuate-maybe (&optional server &rest ignored)
+ "Add autoaway reset function to `post-command-hook' if at least one
+ERC process is alive.
+
+This is used when `erc-autoaway-idle-method' is 'user."
+ (when (or server (erc-autoaway-some-server-buffer))
+ (add-hook 'post-command-hook 'erc-autoaway-reset-idle-user)))
+
+(defun erc-autoaway-remove-maybe (&rest ignored)
+ "Remove the autoaway reset function from `post-command-hook' if
+no ERC process is alive.
+
+This is used when `erc-autoaway-idle-method' is 'user."
+ (unless (erc-autoaway-some-server-buffer)
+ (remove-hook 'post-command-hook 'erc-autoaway-reset-idle-user)))
+
;;;###autoload (autoload 'erc-autoaway-mode "erc-autoaway")
(define-erc-module autoaway nil
"In ERC autoaway mode, you can be set away automatically.
@@ -65,24 +108,31 @@ set you no longer away.
Related variables: `erc-public-away-p' and `erc-away-nickname'."
;; Enable:
((when (boundp 'erc-autoaway-idle-method)
+ (add-hook 'erc-connect-pre-hook 'erc-autoaway-reset-indicators)
+ (setq erc-autoaway-last-sent-time (erc-current-time))
(cond
((eq erc-autoaway-idle-method 'irc)
(add-hook 'erc-send-completed-hook 'erc-autoaway-reset-idle-irc)
(add-hook 'erc-server-001-functions 'erc-autoaway-reset-idle-irc))
((eq erc-autoaway-idle-method 'user)
- (add-hook 'post-command-hook 'erc-autoaway-reset-idle-user))
+ (add-hook 'erc-after-connect 'erc-autoaway-insinuate-maybe)
+ (add-hook 'erc-disconnected-hook 'erc-autoaway-remove-maybe)
+ (erc-autoaway-insinuate-maybe))
((eq erc-autoaway-idle-method 'emacs)
(erc-autoaway-reestablish-idletimer)))
(add-hook 'erc-timer-hook 'erc-autoaway-possibly-set-away)
(add-hook 'erc-server-305-functions 'erc-autoaway-reset-indicators)))
;; Disable:
((when (boundp 'erc-autoaway-idle-method)
+ (remove-hook 'erc-connect-pre-hook 'erc-autoaway-reset-indicators)
(cond
((eq erc-autoaway-idle-method 'irc)
(remove-hook 'erc-send-completed-hook 'erc-autoaway-reset-idle-irc)
(remove-hook 'erc-server-001-functions 'erc-autoaway-reset-idle-irc))
((eq erc-autoaway-idle-method 'user)
- (remove-hook 'post-command-hook 'erc-autoaway-reset-idle-user))
+ (remove-hook 'post-command-hook 'erc-autoaway-reset-idle-user)
+ (remove-hook 'erc-after-connect 'erc-autoaway-insinuate-maybe)
+ (remove-hook 'erc-disconnected-hook 'erc-autoaway-remove-maybe))
((eq erc-autoaway-idle-method 'emacs)
(erc-cancel-timer erc-autoaway-idletimer)
(setq erc-autoaway-idletimer nil)))
@@ -104,9 +154,12 @@ definitions of being idle."
(const :tag "Emacs idle time" emacs)
(const :tag "Last IRC action" irc))
:set (lambda (sym val)
- (erc-autoaway-disable)
- (set-default sym val)
- (erc-autoaway-enable)))
+ (if erc-autoaway-mode
+ (progn
+ (erc-autoaway-disable)
+ (set sym val)
+ (erc-autoaway-enable))
+ (set sym val))))
(defcustom erc-auto-set-away t
"*If non-nil, set away after `erc-autoaway-idle-seconds' seconds of idling.
@@ -133,21 +186,6 @@ See `erc-auto-discard-away'."
:group 'erc-autoaway
:type 'regexp)
-(eval-when-compile (defvar erc-autoaway-idle-seconds))
-
-(defun erc-autoaway-reestablish-idletimer ()
- "Reestablish the Emacs idletimer.
-If `erc-autoaway-idle-method' is 'emacs, you must call this
-function each time you change `erc-autoaway-idle-seconds'."
- (interactive)
- (when erc-autoaway-idletimer
- (erc-cancel-timer erc-autoaway-idletimer))
- (setq erc-autoaway-idletimer
- (run-with-idle-timer erc-autoaway-idle-seconds
- t
- 'erc-autoaway-set-away
- erc-autoaway-idle-seconds)))
-
(defcustom erc-autoaway-idle-seconds 1800
"*Number of seconds after which ERC will set you automatically away.
If you are changing this variable using lisp instead of customizing it,
@@ -167,19 +205,12 @@ in seconds."
:group 'erc-autoaway
:type 'string)
-(defvar erc-autoaway-last-sent-time (erc-current-time)
- "The last time the user sent something.")
-
-(defvar erc-autoaway-caused-away nil
- "Indicates whether this module was responsible for setting the
-user's away status.")
-
(defun erc-autoaway-reset-idle-user (&rest stuff)
"Reset the stored user idle time.
This is one global variable since a user talking on one net can
talk on another net too."
(when erc-auto-discard-away
- (erc-autoaway-set-back))
+ (erc-autoaway-set-back #'erc-autoaway-remove-maybe))
(setq erc-autoaway-last-sent-time (erc-current-time)))
(defun erc-autoaway-reset-idle-irc (line &rest stuff)
@@ -192,12 +223,24 @@ talk on another net too."
(erc-autoaway-set-back))
(setq erc-autoaway-last-sent-time (erc-current-time)))
-(defun erc-autoaway-set-back ()
- "Discard the away state globally."
- (let ((server-buffer (car (erc-buffer-list #'erc-server-buffer-p))))
- (when (and erc-autoaway-caused-away
- (with-current-buffer server-buffer (erc-away-p)))
- (erc-cmd-GAWAY ""))))
+(defun erc-autoaway-set-back (&optional none-alive-func)
+ "Discard the away state globally.
+
+NONE-ALIVE-FUNC is the function to call if no ERC processes are alive."
+ (let ((server-buffer (erc-autoaway-some-server-buffer)))
+ (if (and erc-autoaway-caused-away
+ (buffer-live-p server-buffer)
+ (with-current-buffer server-buffer erc-away))
+ (erc-cmd-GAWAY "")
+ (when none-alive-func (funcall none-alive-func)))))
+
+(defun erc-autoaway-some-open-server-buffer ()
+ "Return some ERC server buffer if its connection is alive and the
+user is not away.
+If none is found, return nil."
+ (car (erc-buffer-list (lambda ()
+ (and (erc-open-server-buffer-p)
+ (not erc-away))))))
(defun erc-autoaway-possibly-set-away (current-time)
"Set autoaway when `erc-auto-set-away' is true and the idletime is
@@ -207,7 +250,7 @@ exceeds `erc-autoaway-idle-seconds'."
;; whenever the server sends something to the client.
(when (and erc-auto-set-away
(not erc-autoaway-caused-away)
- (not (erc-away-p)))
+ (erc-autoaway-some-open-server-buffer))
(let ((idle-time (erc-time-diff erc-autoaway-last-sent-time
current-time)))
(when (>= idle-time erc-autoaway-idle-seconds)
@@ -215,15 +258,17 @@ exceeds `erc-autoaway-idle-seconds'."
nil 'notice nil
(format "Setting automatically away after %i seconds of idle-time"
idle-time))
- (erc-autoaway-set-away idle-time)))))
+ (erc-autoaway-set-away idle-time t)))))
+
+(defun erc-autoaway-set-away (idle-time &optional notest)
+ "Set the away state globally.
-(defun erc-autoaway-set-away (idle-time)
- "Set the away state globally."
+If NOTEST is specified, do not check to see whether there is an
+activer server buffer available."
;; Note that the idle timer runs, even when Emacs is inactive. In
;; order to prevent flooding when we connect, we test for an
;; existing process.
- (when (and (erc-server-process-alive)
- (not (erc-away-p)))
+ (when (or notest (erc-autoaway-some-open-server-buffer))
(setq erc-autoaway-caused-away t)
(erc-cmd-GAWAY (format erc-autoaway-message idle-time))))
diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el
index fbe6f22e1d6..08cb738d360 100644
--- a/lisp/erc/erc-backend.el
+++ b/lisp/erc/erc-backend.el
@@ -174,9 +174,15 @@ WALLCHOPS - supports sending messages to all operators in a channel")
;;; Server and connection state
+(defvar erc-server-ping-timer-alist nil
+ "Mapping of server buffers to their specific ping timer.")
+
(defvar erc-server-connected nil
- "Non-nil if the `current-buffer' is associated with an open IRC connection.
-This variable is buffer-local.")
+ "Non-nil if the current buffer has been used by ERC to establish
+an IRC connection.
+
+If you wish to determine whether an IRC connection is currently
+active, use the `erc-server-process-alive' function instead.")
(make-variable-buffer-local 'erc-server-connected)
(defvar erc-server-reconnect-count 0
@@ -187,10 +193,23 @@ This variable is buffer-local.")
"Non-nil if the user requests a quit.")
(make-variable-buffer-local 'erc-server-quitting)
+(defvar erc-server-reconnecting nil
+ "Non-nil if the user requests an explicit reconnect, and the
+current IRC process is still alive.")
+(make-variable-buffer-local 'erc-server-reconnecting)
+
+(defvar erc-server-timed-out nil
+ "Non-nil if the IRC server failed to respond to a ping.")
+(make-variable-buffer-local 'erc-server-timed-out)
+
(defvar erc-server-banned nil
"Non-nil if the user is denied access because of a server ban.")
(make-variable-buffer-local 'erc-server-banned)
+(defvar erc-server-error-occurred nil
+ "Non-nil if the user triggers some server error.")
+(make-variable-buffer-local 'erc-server-error-occurred)
+
(defvar erc-server-lines-sent nil
"Line counter.")
(make-variable-buffer-local 'erc-server-lines-sent)
@@ -210,6 +229,11 @@ This is useful for flood protection.")
This is useful for flood protection.")
(make-variable-buffer-local 'erc-server-last-ping-time)
+(defvar erc-server-last-received-time nil
+ "Time the last message was received from the server.
+This is useful for detecting hung connections.")
+(make-variable-buffer-local 'erc-server-last-received-time)
+
(defvar erc-server-lag nil
"Calculated server lag time in seconds.
This variable is only set in a server buffer.")
@@ -387,11 +411,24 @@ protection algorithm."
;; Ping handling
-(defcustom erc-server-send-ping-interval 90
+(defcustom erc-server-send-ping-interval 30
"*Interval of sending pings to the server, in seconds.
If this is set to nil, pinging the server is disabled."
:group 'erc-server
- :type '(choice (const nil) (integer :tag "Seconds")))
+ :type '(choice (const :tag "Disabled" nil)
+ (integer :tag "Seconds")))
+
+(defcustom erc-server-send-ping-timeout 120
+ "*If the time between ping and response is greater than this, reconnect.
+The time is in seconds.
+
+This must be greater than or equal to the value for
+`erc-server-send-ping-interval'.
+
+If this is set to nil, never try to reconnect."
+ :group 'erc-server
+ :type '(choice (const :tag "Disabled" nil)
+ (integer :tag "Seconds")))
(defvar erc-server-ping-handler nil
"This variable holds the periodic ping timer.")
@@ -424,20 +461,40 @@ Currently this is called by `erc-send-input'."
(upcase-word 1)
(buffer-string)))
-(defun erc-server-setup-periodical-server-ping (&rest ignore)
- "Set up a timer to periodically ping the current server."
- (and erc-server-ping-handler (erc-cancel-timer erc-server-ping-handler))
- (when erc-server-send-ping-interval
- (setq erc-server-ping-handler
- (run-with-timer
- 4 erc-server-send-ping-interval
- (lambda (buf)
- (when (buffer-live-p buf)
- (with-current-buffer buf
- (erc-server-send
- (format "PING %.0f"
- (erc-current-time))))))
- (current-buffer)))))
+(defun erc-server-send-ping (buf)
+ "Send a ping to the IRC server buffer in BUF.
+Additionally, detect whether the IRC process has hung."
+ (if (buffer-live-p buf)
+ (with-current-buffer buf
+ (if (and erc-server-send-ping-timeout
+ (>
+ (erc-time-diff (erc-current-time)
+ erc-server-last-received-time)
+ erc-server-send-ping-timeout))
+ (progn
+ ;; if the process is hung, kill it
+ (setq erc-server-timed-out t)
+ (delete-process erc-server-process))
+ (erc-server-send (format "PING %.0f" (erc-current-time)))))
+ ;; remove timer if the server buffer has been killed
+ (let ((timer (assq buf erc-server-ping-timer-alist)))
+ (when timer
+ (erc-cancel-timer (cdr timer))
+ (setcdr timer nil)))))
+
+(defun erc-server-setup-periodical-ping (buffer)
+ "Set up a timer to periodically ping the current server.
+The current buffer is given by BUFFER."
+ (with-current-buffer buffer
+ (and erc-server-ping-handler (erc-cancel-timer erc-server-ping-handler))
+ (when erc-server-send-ping-interval
+ (setq erc-server-ping-handler (run-with-timer
+ 4 erc-server-send-ping-interval
+ #'erc-server-send-ping
+ buffer))
+ (setq erc-server-ping-timer-alist (cons (cons buffer
+ erc-server-ping-handler)
+ erc-server-ping-timer-alist)))))
(defun erc-server-process-alive ()
"Return non-nil when `erc-server-process' is open or running."
@@ -447,40 +504,47 @@ Currently this is called by `erc-send-input'."
;;;; Connecting to a server
-(defun erc-server-connect (server port)
- "Perform the connection and login.
-We will store server variables in the current buffer."
+(defun erc-server-connect (server port buffer)
+ "Perform the connection and login using the specified SERVER and PORT.
+We will store server variables in the buffer given by BUFFER."
(let ((msg (erc-format-message 'connect ?S server ?p port)))
(message "%s" msg)
- (setq erc-server-process
- (funcall erc-server-connect-function
- (format "erc-%s-%s" server port)
- (current-buffer) server port))
- (message "%s...done" msg))
- ;; Misc server variables
- (setq erc-server-quitting nil)
- (setq erc-server-banned nil)
- (setq erc-server-last-sent-time (erc-current-time))
- (setq erc-server-last-ping-time (erc-current-time))
- (setq erc-server-lines-sent 0)
- ;; last peers (sender and receiver)
- (setq erc-server-last-peers '(nil . nil))
- ;; process handlers
- (set-process-sentinel erc-server-process 'erc-process-sentinel)
- (set-process-filter erc-server-process 'erc-server-filter-function)
- ;; we do our own encoding and decoding
- (when (fboundp 'set-process-coding-system)
- (set-process-coding-system erc-server-process 'raw-text))
- (set-marker (process-mark erc-server-process) (point))
+ (let ((process (funcall erc-server-connect-function
+ (format "erc-%s-%s" server port)
+ nil server port)))
+ (message "%s...done" msg)
+ ;; Misc server variables
+ (with-current-buffer buffer
+ (setq erc-server-process process)
+ (setq erc-server-quitting nil)
+ (setq erc-server-reconnecting nil)
+ (setq erc-server-timed-out nil)
+ (setq erc-server-banned nil)
+ (setq erc-server-error-occurred nil)
+ (let ((time (erc-current-time)))
+ (setq erc-server-last-sent-time time)
+ (setq erc-server-last-ping-time time)
+ (setq erc-server-last-received-time time))
+ (setq erc-server-lines-sent 0)
+ ;; last peers (sender and receiver)
+ (setq erc-server-last-peers '(nil . nil)))
+ ;; we do our own encoding and decoding
+ (when (fboundp 'set-process-coding-system)
+ (set-process-coding-system process 'raw-text))
+ ;; process handlers
+ (set-process-sentinel process 'erc-process-sentinel)
+ (set-process-filter process 'erc-server-filter-function)
+ (set-process-buffer process buffer)))
(erc-log "\n\n\n********************************************\n")
- (message (erc-format-message 'login ?n (erc-current-nick)))
+ (message (erc-format-message
+ 'login ?n
+ (with-current-buffer buffer (erc-current-nick))))
;; wait with script loading until we receive a confirmation (first
;; MOTD line)
(if (eq erc-server-connect-function 'open-network-stream-nowait)
;; it's a bit unclear otherwise that it's attempting to establish a
;; connection
- (erc-display-message nil nil (current-buffer)
- "Opening connection..\n")
+ (erc-display-message nil nil buffer "Opening connection..\n")
(erc-login)))
(defun erc-server-reconnect ()
@@ -501,6 +565,7 @@ Make sure you are in an ERC buffer when running this."
(defun erc-server-filter-function (process string)
"The process filter for the ERC server."
(with-current-buffer (process-buffer process)
+ (setq erc-server-last-received-time (erc-current-time))
;; If you think this is written in a weird way - please refer to the
;; docstring of `erc-server-processing-p'
(if erc-server-processing-p
@@ -529,16 +594,20 @@ Make sure you are in an ERC buffer when running this."
(defsubst erc-server-reconnect-p (event)
"Return non-nil if ERC should attempt to reconnect automatically.
EVENT is the message received from the closed connection process."
- (and erc-server-auto-reconnect
- (not erc-server-banned)
- ;; make sure we don't infinitely try to reconnect, unless the
- ;; user wants that
- (or (eq erc-server-reconnect-attempts t)
- (and (integerp erc-server-reconnect-attempts)
- (< erc-server-reconnect-count erc-server-reconnect-attempts)))
- (not (string-match "^deleted" event))
- ;; open-network-stream-nowait error for connection refused
- (not (string-match "^failed with code 111" event))))
+ (or erc-server-reconnecting
+ (and erc-server-auto-reconnect
+ (not erc-server-banned)
+ (not erc-server-error-occurred)
+ ;; make sure we don't infinitely try to reconnect, unless the
+ ;; user wants that
+ (or (eq erc-server-reconnect-attempts t)
+ (and (integerp erc-server-reconnect-attempts)
+ (< erc-server-reconnect-count
+ erc-server-reconnect-attempts)))
+ (or erc-server-timed-out
+ (not (string-match "^deleted" event)))
+ ;; open-network-stream-nowait error for connection refused
+ (not (string-match "^failed with code 111" event)))))
(defun erc-process-sentinel-1 (event)
"Called when `erc-process-sentinel' has decided that we're disconnecting.
@@ -562,6 +631,7 @@ Conditionally try to reconnect and take appropriate action."
(if (erc-server-reconnect-p event)
(condition-case err
(progn
+ (setq erc-server-reconnecting nil)
(erc-server-reconnect)
(setq erc-server-reconnect-count 0))
(error (when (integerp erc-server-reconnect-attempts)
@@ -611,6 +681,7 @@ Conditionally try to reconnect and take appropriate action."
"Return the coding system or cons cell appropriate for TARGET.
This is determined via `erc-encoding-coding-alist' or
`erc-server-coding-system'."
+ (unless target (setq target (erc-default-target)))
(or (when target
(let ((case-fold-search t))
(catch 'match
@@ -656,14 +727,11 @@ See `erc-server-flood-margin' for an explanation of the flood
protection algorithm."
(erc-log (concat "erc-server-send: " string "(" (buffer-name) ")"))
(setq erc-server-last-sent-time (erc-current-time))
- (let ((buf (erc-server-buffer))
- (encoding (erc-coding-system-for-target
- (or target (erc-default-target)))))
+ (let ((encoding (erc-coding-system-for-target target)))
(when (consp encoding)
(setq encoding (car encoding)))
- (if (and buf
- (erc-server-process-alive))
- (with-current-buffer buf
+ (if (erc-server-process-alive)
+ (erc-with-server-buffer
(let ((str (concat string "\r\n")))
(if forcep
(progn
@@ -903,10 +971,8 @@ Finds hooks by looking in the `erc-server-responses' hashtable."
(let ((hook (or (erc-get-hook (erc-response.command message))
'erc-default-server-functions)))
(run-hook-with-args-until-success hook process message)
- (let ((server-buffer (erc-server-buffer)))
- (when (buffer-live-p server-buffer)
- (with-current-buffer server-buffer
- (run-hook-with-args 'erc-timer-hook (erc-current-time)))))))
+ (erc-with-server-buffer
+ (run-hook-with-args 'erc-timer-hook (erc-current-time)))))
(add-hook 'erc-default-server-functions 'erc-handle-unknown-server-response)
@@ -1062,6 +1128,7 @@ add things to `%s' instead."
(define-erc-response-handler (ERROR)
"Handle an ERROR command from the server." nil
+ (setq erc-server-error-occurred t)
(erc-display-message
parsed 'error nil 'ERROR
?s (erc-response.sender parsed) ?c (erc-response.contents parsed)))
@@ -1446,6 +1513,9 @@ A server may send more than one 005 message."
See `erc-display-server-message'." nil
(erc-display-server-message proc parsed))
+(define-erc-response-handler (290)
+ "Handle dancer-ircd CAPAB messages." nil nil)
+
(define-erc-response-handler (301)
"AWAY notice." nil
(erc-display-message parsed 'notice 'active 's301
diff --git a/lisp/erc/erc-button.el b/lisp/erc/erc-button.el
index 1fd224fb956..435c72bba23 100644
--- a/lisp/erc/erc-button.el
+++ b/lisp/erc/erc-button.el
@@ -56,10 +56,12 @@
"This mode buttonizes all messages according to `erc-button-alist'."
((add-hook 'erc-insert-modify-hook 'erc-button-add-buttons 'append)
(add-hook 'erc-send-modify-hook 'erc-button-add-buttons 'append)
- (add-hook 'erc-complete-functions 'erc-button-next))
+ (add-hook 'erc-complete-functions 'erc-button-next)
+ (add-hook 'erc-mode-hook 'erc-button-add-keys))
((remove-hook 'erc-insert-modify-hook 'erc-button-add-buttons)
(remove-hook 'erc-send-modify-hook 'erc-button-add-buttons)
- (remove-hook 'erc-complete-functions 'erc-button-next)))
+ (remove-hook 'erc-complete-functions 'erc-button-next)
+ (remove-hook 'erc-mode-hook 'erc-button-add-keys)))
;; Make XEmacs use `erc-button-face'.
(when (featurep 'xemacs)
@@ -241,6 +243,16 @@ PAR is a number of a regexp grouping whose text will be passed to
This syntax table should make all the legal nick characters word
constituents.")
+(defvar erc-button-keys-added nil
+ "Internal variable used to keep track of whether we've added the
+global-level ERC button keys yet.")
+
+(defun erc-button-add-keys ()
+ "Add ERC mode-level button movement keys. This is only done once."
+ (unless erc-button-keys-added
+ (define-key erc-mode-map (kbd "<backtab>") 'erc-button-previous)
+ (setq erc-button-keys-added t)))
+
(defun erc-button-add-buttons ()
"Find external references in the current buffer and make buttons of them.
\"External references\" are things like URLs, as
diff --git a/lisp/erc/erc-capab.el b/lisp/erc/erc-capab.el
index 268c4bfe68a..b7ccade02e0 100644
--- a/lisp/erc/erc-capab.el
+++ b/lisp/erc/erc-capab.el
@@ -56,8 +56,10 @@
;; (erc-capab-identify-mode 1)
;; `erc-capab-identify-prefix' will now be added to the beginning of
-;; unidentified users' nicknames. The default is an asterisk, "*". If
-;; the value of this variable is nil or you disable this module (see
+;; unidentified users' nicknames. The default is an asterisk, "*".
+;; You can customize the prefix and the face used to display it,
+;; `erc-capab-identify-unidentified'. If the value of
+;; `erc-capab-identify-prefix' is nil or you disable this module (see
;; `erc-capab-identify-disable'), no prefix will be inserted, but the
;; flag sent by the server will still be stripped.
@@ -73,14 +75,19 @@
:group 'erc)
(defcustom erc-capab-identify-prefix "*"
- "The prefix used for unidentified users."
+ "The prefix used for unidentified users.
+
+If you change this from the default \"*\", be sure to use a
+character not found in IRC nicknames to avoid confusion."
:group 'erc-capab
:type '(choice string (const nil)))
-;;; Define module:
+(defface erc-capab-identify-unidentified '((t)) ; same as `erc-default-face'
+ "Face to use for `erc-capab-identify-prefix'."
+ :group 'erc-capab
+ :group 'erc-faces)
-(define-erc-response-handler (290)
- "Handle dancer-ircd CAPAB messages." nil nil)
+;;; Define module:
;;;###autoload (autoload 'erc-capab-identify-mode "erc-capab" nil t)
(define-erc-module capab-identify nil
@@ -124,9 +131,9 @@ Optional argument PARSED is the current message, a response struct.
These arguments are sent to this function when called as a hook in
`erc-server-005-functions'."
(unless erc-capab-identify-sent
- (erc-capab-send-identify-messages)))
+ (erc-capab-identify-send-messages)))
-(defun erc-capab-send-identify-messages ()
+(defun erc-capab-identify-send-messages ()
"Send CAPAB IDENTIFY messages if the server supports it."
(when (and (stringp erc-server-version)
(string-match "^\\(dancer-ircd\\|hyperion\\)" erc-server-version)
@@ -175,7 +182,7 @@ PARSED is an `erc-parsed' response struct."
(when (and erc-capab-identify-prefix
(erc-with-server-buffer erc-capab-identify-activated))
(goto-char (or (erc-find-parsed-property) (point-min)))
- (let ((nickname (erc-capab-get-unidentified-nickname
+ (let ((nickname (erc-capab-identify-get-unidentified-nickname
(erc-get-parsed-vector (point)))))
(when (and nickname
(goto-char (point-min))
@@ -183,10 +190,9 @@ PARSED is an `erc-parsed' response struct."
(re-search-forward (regexp-quote nickname) nil t))
(goto-char (match-beginning 0))
(insert (erc-propertize erc-capab-identify-prefix
- 'face (get-char-property (- (point) 1)
- 'face)))))))
+ 'face 'erc-capab-identify-unidentified))))))
-(defun erc-capab-get-unidentified-nickname (parsed)
+(defun erc-capab-identify-get-unidentified-nickname (parsed)
"Return the nickname of the user if unidentified.
PARSED is an `erc-parsed' response struct."
(when (and (erc-response-p parsed)
diff --git a/lisp/erc/erc-compat.el b/lisp/erc/erc-compat.el
index 60cbe992d19..dcfcfe84c98 100644
--- a/lisp/erc/erc-compat.el
+++ b/lisp/erc/erc-compat.el
@@ -161,14 +161,6 @@ avoid corrupting the original SEQ."
(setq newseq (cons el newseq))))
(nreverse newseq)))
-;; Provide a simpler replacement for `gensym'.
-(defvar *erc-sym-counter* 0)
-(defun erc-gensym ()
- "Generate a new uninterned symbol."
- (let ((num (prog1 *erc-sym-counter*
- (setq *erc-sym-counter* (1+ *erc-sym-counter*)))))
- (make-symbol (format "*erc-sym-%d*" num))))
-
;; Copied from cl-extra.el
(defun erc-subseq (seq start &optional end)
"Return the subsequence of SEQ from START to END.
diff --git a/lisp/erc/erc-fill.el b/lisp/erc/erc-fill.el
index 26ca86f04c6..fc1c71babdf 100644
--- a/lisp/erc/erc-fill.el
+++ b/lisp/erc/erc-fill.el
@@ -1,6 +1,7 @@
;;; erc-fill.el --- Filling IRC messages in various ways
-;; Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2002, 2003, 2004, 2006,
+;; 2007 Free Software Foundation, Inc.
;; Author: Andreas Fuchs <asf@void.at>
;; Mario Lang <mlang@delysid.org>
@@ -187,14 +188,6 @@ You can put this on `erc-insert-modify-hook' and/or `erc-send-modify-hook'."
(length (format-time-string erc-timestamp-format))
0))
-(defun erc-restore-text-properties ()
- "Restore the property 'erc-parsed for the region."
- (let* ((parsed-posn (text-property-not-all (point-min) (point-max)
- 'erc-parsed nil))
- (parsed-prop (when parsed-posn
- (get-text-property parsed-posn 'erc-parsed))))
- (put-text-property (point-min) (point-max) 'erc-parsed parsed-prop)))
-
(provide 'erc-fill)
;;; erc-fill.el ends here
diff --git a/lisp/erc/erc-ibuffer.el b/lisp/erc/erc-ibuffer.el
index 5266d837d64..25ad1319bd6 100644
--- a/lisp/erc/erc-ibuffer.el
+++ b/lisp/erc/erc-ibuffer.el
@@ -127,8 +127,7 @@
(define-ibuffer-column erc-away (:name "A")
(if (and erc-server-process
(processp erc-server-process)
- (with-current-buffer (process-buffer erc-server-process)
- erc-away))
+ (erc-away-time))
"A"
" "))
diff --git a/lisp/erc/erc-identd.el b/lisp/erc/erc-identd.el
index c7f7c615e92..8a70a743edb 100644
--- a/lisp/erc/erc-identd.el
+++ b/lisp/erc/erc-identd.el
@@ -42,12 +42,26 @@
(defvar erc-identd-process nil)
+(defgroup erc-identd nil
+ "Run a local identd server."
+ :group 'erc)
+
+(defcustom erc-identd-port 8113
+ "Port to run the identd server on if not specified in the argument for
+`erc-identd-start'.
+
+This can be either a string or a number."
+ :group 'erc-identd
+ :type '(choice (const :tag "None" nil)
+ (integer :tag "Port number")
+ (string :tag "Port string")))
+
;;;###autoload (autoload 'erc-identd-mode "erc-identd")
(define-erc-module identd nil
"This mode launches an identd server on port 8113."
- ((add-hook 'erc-connect-pre-hook 'erc-identd-start)
+ ((add-hook 'erc-connect-pre-hook 'erc-identd-quickstart)
(add-hook 'erc-disconnected-hook 'erc-identd-stop))
- ((remove-hook 'erc-connect-pre-hook 'erc-identd-start)
+ ((remove-hook 'erc-connect-pre-hook 'erc-identd-quickstart)
(remove-hook 'erc-disconnected-hook 'erc-identd-stop)))
(defun erc-identd-filter (proc string)
@@ -71,12 +85,11 @@ run from inetd. The idea is to provide a simple identd server
when you need one, without having to install one globally on your
system."
(interactive (list (read-string "Serve identd requests on port: " "8113")))
- (if (null port)
- (setq port 8113)
- (if (stringp port)
- (setq port (string-to-number port))))
- (if erc-identd-process
- (delete-process erc-identd-process))
+ (unless port (setq port erc-identd-port))
+ (when (stringp port)
+ (setq port (string-to-number port)))
+ (when erc-identd-process
+ (delete-process erc-identd-process))
(setq erc-identd-process
(make-network-process :name "identd"
:buffer nil
@@ -85,6 +98,11 @@ system."
:filter 'erc-identd-filter))
(set-process-query-on-exit-flag erc-identd-process nil))
+(defun erc-identd-quickstart (&rest ignored)
+ "Start the identd server with the default port.
+The default port is specified by `erc-identd-port'."
+ (erc-identd-start))
+
;;;###autoload
(defun erc-identd-stop (&rest ignore)
(interactive)
diff --git a/lisp/erc/erc-log.el b/lisp/erc/erc-log.el
index 22c9b3622d3..9801192bca0 100644
--- a/lisp/erc/erc-log.el
+++ b/lisp/erc/erc-log.el
@@ -85,7 +85,9 @@
;;; Code:
(require 'erc)
-(eval-when-compile (require 'cl))
+(eval-when-compile
+ (require 'erc-networks)
+ (require 'cl))
(defgroup erc-log nil
"Logging facilities for ERC."
@@ -100,10 +102,12 @@ NICK is the current nick,
SERVER and PORT are the parameters used to connect BUFFERs
`erc-server-process'."
:group 'erc-log
- :type '(choice (const erc-generate-log-file-name-long)
- (const erc-generate-log-file-name-short)
- (const erc-generate-log-file-name-with-date)
- (symbol)))
+ :type '(choice (const :tag "Long style" erc-generate-log-file-name-long)
+ (const :tag "Long, but with network name rather than server"
+ erc-generate-log-file-name-network)
+ (const :tag "Short" erc-generate-log-file-name-short)
+ (const :tag "With date" erc-generate-log-file-name-with-date)
+ (symbol :tag "Other function")))
(defcustom erc-truncate-buffer-on-save nil
"Truncate any ERC (channel, query, server) buffer when it is saved."
@@ -197,7 +201,7 @@ also be a predicate function. To only log when you are not set away, use:
\(setq erc-enable-logging
(lambda (buffer)
(with-current-buffer buffer
- (not erc-away))))"
+ (null (erc-away-time)))))"
;; enable
((when erc-log-write-after-insert
(add-hook 'erc-insert-post-hook 'erc-save-buffer-in-logs))
@@ -211,8 +215,7 @@ also be a predicate function. To only log when you are not set away, use:
;; append, so that 'erc-initialize-log-marker runs first
(add-hook 'erc-connect-pre-hook 'erc-log-setup-logging 'append)
(dolist (buffer (erc-buffer-list))
- (when (buffer-live-p buffer)
- (with-current-buffer buffer (erc-log-setup-logging)))))
+ (erc-log-setup-logging buffer)))
;; disable
((remove-hook 'erc-insert-post-hook 'erc-save-buffer-in-logs)
(remove-hook 'erc-send-post-hook 'erc-save-buffer-in-logs)
@@ -223,30 +226,38 @@ also be a predicate function. To only log when you are not set away, use:
(remove-hook 'erc-part-hook 'erc-conditional-save-buffer)
(remove-hook 'erc-connect-pre-hook 'erc-log-setup-logging)
(dolist (buffer (erc-buffer-list))
- (when (buffer-live-p buffer)
- (with-current-buffer buffer (erc-log-disable-logging))))))
+ (erc-log-disable-logging buffer))))
(define-key erc-mode-map "\C-c\C-l" 'erc-save-buffer-in-logs)
;;; functionality referenced from erc.el
-(defun erc-log-setup-logging ()
+(defun erc-log-setup-logging (buffer)
"Setup the buffer-local logging variables in the current buffer.
-This function is destined to be run from `erc-connect-pre-hook'."
- (when (erc-logging-enabled)
- (auto-save-mode -1)
- (setq buffer-file-name nil)
- (set (make-local-variable 'write-file-functions)
- '(erc-save-buffer-in-logs))
- (when erc-log-insert-log-on-open
- (ignore-errors (insert-file-contents (erc-current-logfile))
- (move-marker erc-last-saved-position
- (1- (point-max)))))))
-
-(defun erc-log-disable-logging ()
- "Disable logging in the current buffer."
- (when (erc-logging-enabled)
- (setq buffer-offer-save nil
- erc-enable-logging nil)))
+This function is destined to be run from `erc-connect-pre-hook'.
+The current buffer is given by BUFFER."
+ (when (erc-logging-enabled buffer)
+ (with-current-buffer buffer
+ (auto-save-mode -1)
+ (setq buffer-file-name nil)
+ (cond ((boundp 'write-file-functions)
+ (set (make-local-variable 'write-file-functions)
+ '(erc-save-buffer-in-logs)))
+ ((boundp 'local-write-file-hooks)
+ (setq local-write-file-hooks '(erc-save-buffer-in-logs)))
+ (t
+ (set (make-local-variable 'write-file-hooks)
+ '(erc-save-buffer-in-logs))))
+ (when erc-log-insert-log-on-open
+ (ignore-errors (insert-file-contents (erc-current-logfile))
+ (move-marker erc-last-saved-position
+ (1- (point-max))))))))
+
+(defun erc-log-disable-logging (buffer)
+ "Disable logging in BUFFER."
+ (when (erc-logging-enabled buffer)
+ (with-current-buffer buffer
+ (setq buffer-offer-save nil
+ erc-enable-logging nil))))
(defun erc-log-all-but-server-buffers (buffer)
"Returns t if logging should be enabled in BUFFER.
@@ -340,6 +351,19 @@ This function is a possible value for `erc-generate-log-file-name-function'."
;; we need a make-safe-file-name function.
(convert-standard-filename file)))
+(defun erc-generate-log-file-name-network (buffer target nick server port)
+ "Generates a log-file name using the network name rather than server name.
+This results in a file name of the form #channel!nick@network.txt.
+This function is a possible value for `erc-generate-log-file-name-function'."
+ (require 'erc-networks)
+ (let ((file (concat
+ (if target (concat target "!"))
+ nick "@"
+ (or (with-current-buffer buffer (erc-network-name)) server)
+ ".txt")))
+ ;; we need a make-safe-file-name function.
+ (convert-standard-filename file)))
+
;;;###autoload
(defun erc-save-buffer-in-logs (&optional buffer)
"Append BUFFER contents to the log file, if logging is enabled.
diff --git a/lisp/erc/erc-match.el b/lisp/erc/erc-match.el
index 50e4cfbc521..35ba1b13492 100644
--- a/lisp/erc/erc-match.el
+++ b/lisp/erc/erc-match.el
@@ -1,6 +1,7 @@
;;; erc-match.el --- Highlight messages matching certain regexps
-;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005, 2006,
+;; 2007 Free Software Foundation, Inc.
;; Author: Andreas Fuchs <asf@void.at>
;; Keywords: comm, faces
@@ -540,7 +541,7 @@ deactivate/activate match logging in the latter. See
(when (and
(or (eq erc-log-matches-flag t)
(and (eq erc-log-matches-flag 'away)
- erc-away))
+ (erc-away-time)))
match-buffer-name)
(let ((line (format-spec erc-log-match-format
(format-spec-make
@@ -572,7 +573,7 @@ deactivate/activate match logging in the latter. See
(defun erc-log-matches-come-back (proc parsed)
"Display a notice that messages were logged while away."
- (when (and erc-away
+ (when (and (erc-away-time)
(eq erc-log-matches-flag 'away))
(mapc
(lambda (match-type)
@@ -583,7 +584,7 @@ deactivate/activate match logging in the latter. See
(with-current-buffer buffer
(get-text-property (1- (point-max))
'timestamp))))
- (away-time (erc-emacs-time-to-erc-time erc-away)))
+ (away-time (erc-emacs-time-to-erc-time (erc-away-time))))
(when (and away-time last-msg-time
(erc-time-gt last-msg-time away-time))
(erc-display-message
diff --git a/lisp/erc/erc-menu.el b/lisp/erc/erc-menu.el
index a5826625bde..888da702d62 100644
--- a/lisp/erc/erc-menu.el
+++ b/lisp/erc/erc-menu.el
@@ -1,6 +1,7 @@
;; erc-menu.el -- Menu-bar definitions for ERC
-;; Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2002, 2004, 2005, 2006,
+;; 2007 Free Software Foundation, Inc.
;; Author: Mario Lang <mlang@delysid.org>
;; Keywords: comm, processes, menu
@@ -75,8 +76,8 @@
(erc-channel-user-op-p (erc-current-nick))]
["Set a key..." erc-set-channel-key
(erc-channel-user-op-p (erc-current-nick))])
- ["Leave this channel..." erc-part-from-channel erc-channel-users]
- "-")
+ ["Leave this channel..." erc-part-from-channel erc-channel-users])
+ "-"
(list "Pals, fools and other keywords"
["Add pal..." erc-add-pal]
["Delete pal..." erc-delete-pal]
diff --git a/lisp/erc/erc-netsplit.el b/lisp/erc/erc-netsplit.el
index 567c91cc075..b4c26b1bb88 100644
--- a/lisp/erc/erc-netsplit.el
+++ b/lisp/erc/erc-netsplit.el
@@ -184,7 +184,7 @@ join from that split has been detected or not.")
;;;###autoload
(defun erc-cmd-WHOLEFT ()
"Show who's gone."
- (with-current-buffer (erc-server-buffer)
+ (erc-with-server-buffer
(if (null erc-netsplit-list)
(erc-display-message
nil 'notice 'active
diff --git a/lisp/erc/erc-networks.el b/lisp/erc/erc-networks.el
index 9f8c5528d04..4631ceae3ae 100644
--- a/lisp/erc/erc-networks.el
+++ b/lisp/erc/erc-networks.el
@@ -317,6 +317,7 @@
("Novernet: Random server" Novernet "irc.novernet.com" ((6665 6669) 7000 ))
("Nullrouted: Random server" Nullrouted "irc.nullrouted.org" ((6666 6669) 7000 ))
("NullusNet: Random server" NullusNet "irc.nullus.net" 6667)
+ ("OFTC: Random server" OFTC "irc.oftc.net" ((6667 6670) 7000))
("OpChat: Random server" OpChat "irc.opchat.org" ((6667 6669)))
("Othernet: Random server" Othernet "irc.othernet.org" 6667)
("Othernet: US, FL, Miami" Othernet "miami.fl.us.othernet.org" 6667)
@@ -611,6 +612,7 @@ PORTS is either a number, a list of numbers, or a list of port ranges."
(Novernet "novernet.com")
(Nullrouted "nullrouted.org")
(NullusNet "nullus.net")
+ (OFTC "oftc.net")
(OpChat "opchat.org")
(Openprojects "openprojects.net")
(Othernet "othernet.org")
@@ -737,12 +739,12 @@ search for a match in `erc-networks-alist'."
(defun erc-network ()
"Return the value of `erc-network' for the current server."
- (with-current-buffer (erc-server-buffer) erc-network))
+ (erc-with-server-buffer erc-network))
(defun erc-current-network ()
"Deprecated. Use `erc-network' instead. Return the name of this server's
network as a symbol."
- (with-current-buffer (erc-server-buffer)
+ (erc-with-server-buffer
(intern (downcase (symbol-name erc-network)))))
(erc-make-obsolete 'erc-current-network 'erc-network
@@ -750,7 +752,7 @@ network as a symbol."
(defun erc-network-name ()
"Returns the name of the current network as a string."
- (with-current-buffer (erc-server-buffer) (symbol-name erc-network)))
+ (erc-with-server-buffer (symbol-name erc-network)))
(defun erc-set-network-name (proc parsed)
"Set `erc-network' to the value returned by `erc-determine-network'."
diff --git a/lisp/erc/erc-notify.el b/lisp/erc/erc-notify.el
index 82784c624c0..d34e38ade43 100644
--- a/lisp/erc/erc-notify.el
+++ b/lisp/erc/erc-notify.el
@@ -121,8 +121,7 @@ changes."
(ison-list (delete "" (split-string
(erc-response.contents parsed))))
(new-list ison-list)
- (old-list (with-current-buffer (erc-server-buffer)
- erc-last-ison)))
+ (old-list (erc-with-server-buffer erc-last-ison)))
(while new-list
(when (not (erc-member-ignore-case (car new-list) old-list))
(run-hook-with-args 'erc-notify-signon-hook server (car new-list))
@@ -204,7 +203,7 @@ with args, toggle notify status of people."
(cond
((null args)
;; Print current notificated people (online)
- (let ((ison (with-current-buffer (erc-server-buffer) erc-last-ison)))
+ (let ((ison (erc-with-server-buffer erc-last-ison)))
(if (not ison)
(erc-display-message
nil 'notice 'active "No ison-list yet!")
diff --git a/lisp/erc/erc-pcomplete.el b/lisp/erc/erc-pcomplete.el
index 951ba25898c..f207bcc1b8b 100644
--- a/lisp/erc/erc-pcomplete.el
+++ b/lisp/erc/erc-pcomplete.el
@@ -180,7 +180,7 @@ the most recent speakers are listed first."
(while (pcomplete-here (pcomplete-erc-nicks))))
(defun pcomplete/erc-mode/UNIGNORE ()
- (pcomplete-here (with-current-buffer (erc-server-buffer) erc-ignore-list)))
+ (pcomplete-here (erc-with-server-buffer erc-ignore-list)))
;;; Functions that provide possible completions.
@@ -233,7 +233,7 @@ If optional argument IGNORE-SELF is non-nil, don't return the current nick."
(defun pcomplete-erc-all-nicks (&optional postfix)
"Returns a list of all nicks on the current server."
(let (nicks)
- (with-current-buffer (process-buffer erc-server-process)
+ (erc-with-server-buffer
(maphash (lambda (nick user)
(setq nicks (cons (concat nick postfix) nicks)))
erc-server-users))
diff --git a/lisp/erc/erc-ring.el b/lisp/erc/erc-ring.el
index 911a154e915..95c313a23f6 100644
--- a/lisp/erc/erc-ring.el
+++ b/lisp/erc/erc-ring.el
@@ -1,6 +1,7 @@
;; erc-ring.el -- Command history handling for erc using ring.el
-;; Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2002, 2003, 2004, 2006,
+;; 2007 Free Software Foundation, Inc.
;; Author: Alex Schroeder <alex@gnu.org>
;; Keywords: comm
diff --git a/lisp/erc/erc-services.el b/lisp/erc/erc-services.el
index 5d03a7b6365..a2cc1b19782 100644
--- a/lisp/erc/erc-services.el
+++ b/lisp/erc/erc-services.el
@@ -168,15 +168,18 @@ Example of use:
:type '(repeat
(list :tag "Network"
(choice :tag "Network name"
- (const freenode)
- (const OFTC)
+ (const Ars)
+ (const Austnet)
+ (const Azzurra)
+ (const BitlBee)
+ (const BRASnet)
(const DALnet)
+ (const freenode)
(const GalaxyNet)
- (const SlashNET)
- (const BRASnet)
(const iip)
- (const Austnet)
- (const Azzurra)
+ (const OFTC)
+ (const QuakeNet)
+ (const SlashNET)
(symbol :tag "Network name"))
(repeat :tag "Nickname and password"
(cons :tag "Identity"
@@ -186,68 +189,63 @@ Example of use:
;; Variables:
(defcustom erc-nickserv-alist
- '((BitlBee
- nil
- nil
+ '((Ars
+ nil nil
+ "Census"
+ "IDENTIFY" nil nil)
+ (Austnet
+ "NickOP!service@austnet.org"
+ "/msg\\s-NickOP@austnet.org\\s-identify\\s-<password>"
+ "nickop@austnet.org"
+ "identify" nil nil)
+ (Azzurra
+ "NickServ!service@azzurra.org"
+ "/ns\\s-IDENTIFY\\s-password"
+ "NickServ"
+ "IDENTIFY" nil nil)
+ (BitlBee
+ nil nil
"&bitlbee"
- "identify"
- nil)
+ "identify" nil nil)
+ (BRASnet
+ "NickServ!services@brasnet.org"
+ "/NickServ\\s-IDENTIFY\\s-senha"
+ "NickServ"
+ "IDENTIFY" nil "")
(DALnet
"NickServ!service@dal.net"
"/msg\\s-NickServ@services.dal.net\\s-IDENTIFY\\s-<password>"
"NickServ@services.dal.net"
- "IDENTIFY"
- nil)
+ "IDENTIFY" nil nil)
(freenode
"NickServ!NickServ@services."
"/msg\\s-NickServ\\s-IDENTIFY\\s-<password>"
"NickServ"
- "IDENTIFY"
- nil)
+ "IDENTIFY" nil nil)
(GalaxyNet
"NS!nickserv@galaxynet.org"
"Please\\s-change\\s-nicks\\s-or\\s-authenticate."
"NS@services.galaxynet.org"
- "AUTH"
- t)
- (SlashNET
- "NickServ!services@services.slashnet.org"
- "/msg\\s-NickServ\\s-IDENTIFY\\s-password"
- "NickServ@services.slashnet.org"
- "IDENTIFY"
- nil)
+ "AUTH" t nil)
(iip
"Trent@anon.iip"
"type\\s-/squery\\s-Trent\\s-identify\\s-<password>"
"Trent@anon.iip"
- "IDENTIFY"
- nil
- "SQUERY")
- (BRASnet
- "NickServ!services@brasnet.org"
- "/NickServ\\s-IDENTIFY\\s-senha"
- "NickServ"
- "IDENTIFY"
- nil
- "")
- (Austnet
- "NickOP!service@austnet.org"
- "/msg\\s-NickOP@austnet.org\\s-identify\\s-<password>"
- "nickop@austnet.org"
- "identify"
- nil)
- (Azzurra
- "NickServ!service@azzurra.org"
- "/ns\\s-IDENTIFY\\s-password"
- "NickServ"
- "IDENTIFY"
- nil)
+ "IDENTIFY" nil "SQUERY")
(OFTC
"NickServ!services@services.oftc.net"
- "/msg\\s-NickServ\\s-IDENTIFY\\s-\^_password"
+ "type\\s-/msg\\s-NickServ\\s-IDENTIFY\\s-password."
"NickServ"
- "IDENTIFY"
- nil))
+ "IDENTIFY" nil nil)
+ (QuakeNet
+ nil nil
+ "Q@CServe.quakenet.org"
+ "auth" t nil)
+ (SlashNET
+ "NickServ!services@services.slashnet.org"
+ "/msg\\s-NickServ\\s-IDENTIFY\\s-password"
+ "NickServ@services.slashnet.org"
+ "IDENTIFY" nil nil))
"Alist of NickServer details, sorted by network.
Every element in the list has the form
\(SYMBOL NICKSERV REGEXP NICK KEYWORD USE-CURRENT ANSWER)
@@ -265,8 +263,10 @@ ANSWER is the command to use for the answer. The default is 'privmsg.
:type '(repeat
(list :tag "Nickserv data"
(symbol :tag "Network name")
- (string :tag "Nickserv's nick!user@host")
- (regexp :tag "Identify request sent by Nickserv")
+ (choice (string :tag "Nickserv's nick!user@host")
+ (const :tag "No message sent by Nickserv" nil))
+ (choice (regexp :tag "Identify request sent by Nickserv")
+ (const :tag "No message sent by Nickserv" nil))
(string :tag "Identify to")
(string :tag "Identify keyword")
(boolean :tag "Use current nick in identify message?")
diff --git a/lisp/erc/erc-speedbar.el b/lisp/erc/erc-speedbar.el
index 551b83fb5ac..0d88589838e 100644
--- a/lisp/erc/erc-speedbar.el
+++ b/lisp/erc/erc-speedbar.el
@@ -1,6 +1,7 @@
;;; erc-speedbar.el --- Speedbar support for ERC
-;; Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2002, 2003, 2004, 2006,
+;; 2007 Free Software Foundation, Inc.
;; Author: Mario Lang <mlang@delysid.org>
;; Contributor: Eric M. Ludlam <eric@siege-engine.com>
@@ -113,7 +114,7 @@ This will add a speedbar major display mode."
(erase-buffer)
(let (serverp chanp queryp)
(with-current-buffer buffer
- (setq serverp (eq buffer (process-buffer erc-server-process)))
+ (setq serverp (erc-server-buffer-p))
(setq chanp (erc-channel-p (erc-default-target)))
(setq queryp (erc-query-buffer-p)))
(cond (serverp
diff --git a/lisp/erc/erc-spelling.el b/lisp/erc/erc-spelling.el
index 484ddb36d52..a15ca17987f 100644
--- a/lisp/erc/erc-spelling.el
+++ b/lisp/erc/erc-spelling.el
@@ -41,12 +41,10 @@
;; called AFTER the server buffer is initialized.
((add-hook 'erc-connect-pre-hook 'erc-spelling-init)
(dolist (buffer (erc-buffer-list))
- (when (buffer-live-p buffer)
- (with-current-buffer buffer (erc-spelling-init)))))
+ (erc-spelling-init buffer)))
((remove-hook 'erc-connect-pre-hook 'erc-spelling-init)
(dolist (buffer (erc-buffer-list))
- (when (buffer-live-p buffer)
- (with-current-buffer buffer (flyspell-mode 0))))))
+ (with-current-buffer buffer (flyspell-mode 0)))))
(defcustom erc-spelling-dictionaries nil
"An alist mapping buffer names to dictionaries.
@@ -60,24 +58,22 @@ name here."
(string :tag "Dictionary"))))
:group 'erc-spelling)
-(defun erc-spelling-init ()
- "Enable flyspell mode in an ERC buffer."
- (let ((name (downcase (buffer-name)))
- (dicts erc-spelling-dictionaries))
- (when dicts
- (while (and dicts
- (not (string= name (downcase (caar dicts)))))
- (setq dicts (cdr dicts)))
- (setq ispell-local-dictionary
- (if dicts
- (cadr (car dicts))
- (let ((server (erc-server-buffer)))
- (if server
- (with-current-buffer server
- ispell-local-dictionary)
- nil))))))
- (setq flyspell-generic-check-word-p 'erc-spelling-flyspell-verify)
- (flyspell-mode 1))
+(defun erc-spelling-init (buffer)
+ "Enable flyspell mode in an ERC buffer.
+The current buffer is given by BUFFER."
+ (with-current-buffer buffer
+ (let ((name (downcase (buffer-name)))
+ (dicts erc-spelling-dictionaries))
+ (when dicts
+ (while (and dicts
+ (not (string= name (downcase (caar dicts)))))
+ (setq dicts (cdr dicts)))
+ (setq ispell-local-dictionary
+ (if dicts
+ (cadr (car dicts))
+ (erc-with-server-buffer ispell-local-dictionary)))))
+ (setq flyspell-generic-check-word-p 'erc-spelling-flyspell-verify)
+ (flyspell-mode 1)))
(defun erc-spelling-unhighlight-word (word)
"Unhighlight the given WORD.
diff --git a/lisp/erc/erc-stamp.el b/lisp/erc/erc-stamp.el
index 5a9977aaead..0b8017ffe0b 100644
--- a/lisp/erc/erc-stamp.el
+++ b/lisp/erc/erc-stamp.el
@@ -147,7 +147,7 @@ or `erc-send-modify-hook'."
(error "Timestamp function unbound"))
(when (and (fboundp erc-insert-away-timestamp-function)
erc-away-timestamp-format
- (with-current-buffer (erc-server-buffer) erc-away)
+ (erc-away-time)
(not erc-timestamp-format))
(funcall erc-insert-away-timestamp-function
(erc-format-timestamp ct erc-away-timestamp-format)))
@@ -203,6 +203,7 @@ space before a right timestamp in any saved logs."
(s (if ignore-p (make-string len ? ) string)))
(unless ignore-p (setq erc-timestamp-last-inserted string))
(erc-put-text-property 0 len 'field 'erc-timestamp s)
+ (erc-put-text-property 0 len 'invisible 'timestamp s)
(insert s)))
(defun erc-insert-aligned (string pos)
@@ -319,6 +320,21 @@ set, and timestamping is already active."
(setq erc-hide-timestamps nil)
(erc-munge-invisibility-spec))
+(defun erc-toggle-timestamps ()
+ "Hide or show timestamps in ERC buffers.
+
+Note that timestamps can only be shown for a message using this
+function if `erc-timestamp-format' was set and timestamping was
+enabled when the message was inserted."
+ (interactive)
+ (if erc-hide-timestamps
+ (setq erc-hide-timestamps nil)
+ (setq erc-hide-timestamps t))
+ (mapc (lambda (buffer)
+ (with-current-buffer buffer
+ (erc-munge-invisibility-spec)))
+ (erc-buffer-list)))
+
(defun erc-echo-timestamp (before now)
"Print timestamp text-property of an IRC message.
Argument BEFORE is where point was before it got moved and
diff --git a/lisp/erc/erc-track.el b/lisp/erc/erc-track.el
index 0fa550a5838..4a8b673d46b 100644
--- a/lisp/erc/erc-track.el
+++ b/lisp/erc/erc-track.el
@@ -1,6 +1,7 @@
;;; erc-track.el --- Track modified channel buffers
-;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005, 2006,
+;; 2007 Free Software Foundation, Inc.
;; Author: Mario Lang <mlang@delysid.org>
;; Keywords: comm, faces
@@ -46,12 +47,33 @@
"Track active buffers and show activity in the modeline."
:group 'erc)
+(defcustom erc-track-enable-keybindings 'ask
+ "Whether to enable the ERC track keybindings, namely:
+`C-c C-SPC' and `C-c C-@', which both do the same thing.
+
+The default is to check to see whether these keys are used
+already: if not, then enable the ERC track minor mode, which
+provides these keys. Otherwise, do not touch the keys.
+
+This can alternatively be set to either t or nil, which indicate
+respectively always to enable ERC track minor mode or never to
+enable ERC track minor mode.
+
+The reason for using this default value is to both (1) adhere to
+the Emacs development guidelines which say not to touch keys of
+the form C-c C-<something> and also (2) to meet the expectations
+of long-time ERC users, many of whom rely on these keybindings."
+ :group 'erc-track
+ :type '(choice (const :tag "Ask, if used already" ask)
+ (const :tag "Enable" t)
+ (const :tag "Disable" nil)))
+
(defcustom erc-track-visibility t
"Where do we look for buffers to determine their visibility?
The value of this variable determines, when a buffer is considered
visible or invisible. New messages in invisible buffers are tracked,
while switching to visible buffers when they are tracked removes them
-from the list. See also `erc-track-when-inactive-mode'.
+from the list. See also `erc-track-when-inactive'.
Possible values are:
@@ -488,45 +510,124 @@ START is the minimum length of the name used."
(equal (erc-unique-substrings '("abc" "abcdefg"))
'("abc" "abcd"))))))
+;;; Minor mode
+
+;; Play nice with other IRC clients (and Emacs development rules) by
+;; making this a minor mode
+
+(defvar erc-track-minor-mode-map (make-sparse-keymap)
+ "Keymap for rcirc track minor mode.")
+
+(define-key erc-track-minor-mode-map (kbd "C-c C-@") 'erc-track-switch-buffer)
+(define-key erc-track-minor-mode-map (kbd "C-c C-SPC")
+ 'erc-track-switch-buffer)
+
+;;;###autoload
+(define-minor-mode erc-track-minor-mode
+ "Global minor mode for tracking ERC buffers and showing activity in the
+mode line.
+
+This exists for the sole purpose of providing the C-c C-SPC and
+C-c C-@ keybindings. Make sure that you have enabled the track
+module, otherwise the keybindings will not do anything useful."
+ :init-value nil
+ :lighter ""
+ :keymap erc-track-minor-mode-map
+ :global t
+ :group 'erc-track)
+
+(defun erc-track-minor-mode-maybe ()
+ "Enable `erc-track-minor-mode', depending on `erc-track-enable-keybindings'."
+ (unless (or erc-track-minor-mode
+ ;; don't start the minor mode until we have an ERC
+ ;; process running, because we don't want to prompt the
+ ;; user while starting Emacs
+ (null (erc-buffer-list)))
+ (cond ((eq erc-track-enable-keybindings 'ask)
+ (let ((key (or (and (key-binding (kbd "C-c C-SPC")) "C-SPC")
+ (and (key-binding (kbd "C-c C-@")) "C-@"))))
+ (if key
+ (if (y-or-n-p
+ (concat "The C-c " key " binding is in use;"
+ " override it for tracking? "))
+ (progn
+ (message (concat "Will change it; set"
+ " `erc-track-enable-keybindings'"
+ " to disable this message"))
+ (sleep-for 3)
+ (erc-track-minor-mode 1))
+ (message (concat "Not changing it; set"
+ " `erc-track-enable-keybindings'"
+ " to disable this message"))
+ (sleep-for 3))
+ (erc-track-minor-mode 1))))
+ ((eq erc-track-enable-keybindings t)
+ (erc-track-minor-mode 1))
+ (t nil))))
+
;;; Module
;;;###autoload (autoload 'erc-track-mode "erc-track" nil t)
-(define-erc-module track track-modified-channels
+(define-erc-module track nil
"This mode tracks ERC channel buffers with activity."
- ((erc-track-add-to-mode-line erc-track-position-in-mode-line)
- (setq erc-modified-channels-object (erc-modified-channels-object nil))
- (erc-update-mode-line)
- (if (featurep 'xemacs)
- (defadvice switch-to-buffer (after erc-update (&rest args) activate)
- (erc-modified-channels-update))
- (add-hook 'window-configuration-change-hook 'erc-modified-channels-update))
- (add-hook 'erc-insert-post-hook 'erc-track-modified-channels)
- (add-hook 'erc-disconnected-hook 'erc-modified-channels-update))
- ((erc-track-remove-from-mode-line)
- (if (featurep 'xemacs)
- (ad-disable-advice 'switch-to-buffer 'after 'erc-update)
- (remove-hook 'window-configuration-change-hook
- 'erc-modified-channels-update))
- (remove-hook 'erc-disconnected-hook 'erc-modified-channels-update)
- (remove-hook 'erc-insert-post-hook 'erc-track-modified-channels)))
-
-;;;###autoload (autoload 'erc-track-when-inactive-mode "erc-track" nil t)
-(define-erc-module track-when-inactive nil
- "This mode enables channel tracking even for visible buffers,
-if you are inactivity."
- ((if (featurep 'xemacs)
- (defadvice switch-to-buffer (after erc-update-when-inactive (&rest args) activate)
- (erc-user-is-active))
- (add-hook 'window-configuration-change-hook 'erc-user-is-active))
- (add-hook 'erc-send-completed-hook 'erc-user-is-active)
- (add-hook 'erc-server-001-functions 'erc-user-is-active))
- ((erc-track-remove-from-mode-line)
- (if (featurep 'xemacs)
- (ad-disable-advice 'switch-to-buffer 'after 'erc-update-when-inactive)
- (remove-hook 'window-configuration-change-hook 'erc-user-is-active))
- (remove-hook 'erc-send-completed-hook 'erc-user-is-active)
- (remove-hook 'erc-server-001-functions 'erc-user-is-active)
- (remove-hook 'erc-timer-hook 'erc-user-is-active)))
+ ;; Enable:
+ ((when (boundp 'erc-track-when-inactive)
+ (if erc-track-when-inactive
+ (progn
+ (if (featurep 'xemacs)
+ (defadvice switch-to-buffer (after erc-update-when-inactive
+ (&rest args) activate)
+ (erc-user-is-active))
+ (add-hook 'window-configuration-change-hook 'erc-user-is-active))
+ (add-hook 'erc-send-completed-hook 'erc-user-is-active)
+ (add-hook 'erc-server-001-functions 'erc-user-is-active))
+ (erc-track-add-to-mode-line erc-track-position-in-mode-line)
+ (setq erc-modified-channels-object (erc-modified-channels-object nil))
+ (erc-update-mode-line)
+ (if (featurep 'xemacs)
+ (defadvice switch-to-buffer (after erc-update (&rest args) activate)
+ (erc-modified-channels-update))
+ (add-hook 'window-configuration-change-hook
+ 'erc-modified-channels-update))
+ (add-hook 'erc-insert-post-hook 'erc-track-modified-channels)
+ (add-hook 'erc-disconnected-hook 'erc-modified-channels-update))
+ ;; enable the tracking keybindings
+ (erc-track-minor-mode-maybe)))
+ ;; Disable:
+ ((when (boundp 'erc-track-when-inactive)
+ (erc-track-remove-from-mode-line)
+ (if erc-track-when-inactive
+ (progn
+ (if (featurep 'xemacs)
+ (ad-disable-advice 'switch-to-buffer 'after
+ 'erc-update-when-inactive)
+ (remove-hook 'window-configuration-change-hook
+ 'erc-user-is-active))
+ (remove-hook 'erc-send-completed-hook 'erc-user-is-active)
+ (remove-hook 'erc-server-001-functions 'erc-user-is-active)
+ (remove-hook 'erc-timer-hook 'erc-user-is-active))
+ (if (featurep 'xemacs)
+ (ad-disable-advice 'switch-to-buffer 'after 'erc-update)
+ (remove-hook 'window-configuration-change-hook
+ 'erc-modified-channels-update))
+ (remove-hook 'erc-disconnected-hook 'erc-modified-channels-update)
+ (remove-hook 'erc-insert-post-hook 'erc-track-modified-channels))
+ ;; disable the tracking keybindings
+ (when erc-track-minor-mode
+ (erc-track-minor-mode -1)))))
+
+(defcustom erc-track-when-inactive nil
+ "Enable channel tracking even for visible buffers, if you are
+inactive."
+ :group 'erc-track
+ :type 'boolean
+ :set (lambda (sym val)
+ (if erc-track-mode
+ (progn
+ (erc-track-disable)
+ (set sym val)
+ (erc-track-enable))
+ (set sym val))))
;;; Visibility
@@ -545,7 +646,7 @@ only consider active buffers visible.")
(defun erc-buffer-visible (buffer)
"Return non-nil when the buffer is visible."
- (if erc-track-when-inactive-mode
+ (if erc-track-when-inactive
(when erc-buffer-activity; could be nil
(and (get-buffer-window buffer erc-track-visibility)
(<= (erc-time-diff erc-buffer-activity (erc-current-time))
@@ -815,7 +916,9 @@ relative to `erc-track-switch-direction'"
switch back to the last non-ERC buffer visited. Next is defined by
`erc-track-switch-direction', a negative argument will reverse this."
(interactive "p")
- (when erc-track-mode
+ (if (not erc-track-mode)
+ (message (concat "Enable the ERC track module if you want to use the"
+ " tracking minor mode"))
(cond (erc-modified-channels-alist
;; if we're not in erc-mode, set this buffer to return to
(unless (eq major-mode 'erc-mode)
@@ -828,12 +931,6 @@ switch back to the last non-ERC buffer visited. Next is defined by
(buffer-live-p erc-track-last-non-erc-buffer))
(switch-to-buffer erc-track-last-non-erc-buffer)))))
-;; These bindings are global, because they pop us from any other
-;; buffer to an active ERC buffer!
-
-(global-set-key (kbd "C-c C-@") 'erc-track-switch-buffer)
-(global-set-key (kbd "C-c C-SPC") 'erc-track-switch-buffer)
-
(provide 'erc-track)
;;; erc-track.el ends here
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 927dce02d64..37c2c2e0883 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -66,7 +66,7 @@
;;; Code:
-(defconst erc-version-string "Version 5.2 stable pre-release"
+(defconst erc-version-string "Version 5.2"
"ERC version. This is used by function `erc-version'.")
(eval-when-compile (require 'cl))
@@ -324,7 +324,7 @@ Each function should accept two arguments, NEW-NICK and OLD-NICK."
(defcustom erc-connect-pre-hook '(erc-initialize-log-marker)
"Hook called just before `erc' calls `erc-connect'.
-Functions are run in the buffer-to-be."
+Functions are passed a buffer as the first argument."
:group 'erc-hooks
:type 'hook)
@@ -392,14 +392,14 @@ in the current buffer's `erc-channel-users' hash table."
(defsubst erc-get-server-user (nick)
"Finds the USER corresponding to NICK in the current server's
`erc-server-users' hash table."
- (with-current-buffer (process-buffer erc-server-process)
+ (erc-with-server-buffer
(gethash (erc-downcase nick) erc-server-users)))
(defsubst erc-add-server-user (nick user)
"This function is for internal use only.
Adds USER with nickname NICK to the `erc-server-users' hash table."
- (with-current-buffer (process-buffer erc-server-process)
+ (erc-with-server-buffer
(puthash (erc-downcase nick) user erc-server-users)))
(defsubst erc-remove-server-user (nick)
@@ -410,7 +410,7 @@ hash table. This user is not removed from the
`erc-channel-users' lists of other buffers.
See also: `erc-remove-user'."
- (with-current-buffer (process-buffer erc-server-process)
+ (erc-with-server-buffer
(remhash (erc-downcase nick) erc-server-users)))
(defun erc-change-user-nickname (user new-nick)
@@ -421,7 +421,7 @@ Changes the nickname of USER to NEW-NICK in the
other buffers are also changed."
(let ((nick (erc-server-user-nickname user)))
(setf (erc-server-user-nickname user) new-nick)
- (with-current-buffer (process-buffer erc-server-process)
+ (erc-with-server-buffer
(remhash (erc-downcase nick) erc-server-users)
(puthash (erc-downcase new-nick) user erc-server-users))
(dolist (buf (erc-server-user-buffers user))
@@ -514,16 +514,15 @@ See also: `erc-sort-channel-users-by-activity'"
(defun erc-get-server-nickname-list ()
"Returns a list of known nicknames on the current server."
- (if (erc-server-process-alive)
- (with-current-buffer (erc-server-buffer)
- (let (nicks)
- (when (hash-table-p erc-server-users)
- (maphash (lambda (n user)
- (setq nicks
- (cons (erc-server-user-nickname user)
- nicks)))
- erc-server-users)
- nicks)))))
+ (erc-with-server-buffer
+ (let (nicks)
+ (when (hash-table-p erc-server-users)
+ (maphash (lambda (n user)
+ (setq nicks
+ (cons (erc-server-user-nickname user)
+ nicks)))
+ erc-server-users)
+ nicks))))
(defun erc-get-channel-nickname-list ()
"Returns a list of known nicknames on the current channel."
@@ -538,16 +537,15 @@ See also: `erc-sort-channel-users-by-activity'"
(defun erc-get-server-nickname-alist ()
"Returns an alist of known nicknames on the current server."
- (if (erc-server-process-alive)
- (with-current-buffer (erc-server-buffer)
- (let (nicks)
- (when (hash-table-p erc-server-users)
- (maphash (lambda (n user)
- (setq nicks
- (cons (cons (erc-server-user-nickname user) nil)
- nicks)))
- erc-server-users)
- nicks)))))
+ (erc-with-server-buffer
+ (let (nicks)
+ (when (hash-table-p erc-server-users)
+ (maphash (lambda (n user)
+ (setq nicks
+ (cons (cons (erc-server-user-nickname user) nil)
+ nicks)))
+ erc-server-users)
+ nicks))))
(defun erc-get-channel-nickname-alist ()
"Returns an alist of known nicknames on the current channel."
@@ -1293,7 +1291,7 @@ capabilities."
(unless (erc-server-buffer-p)
(error
"You should only run `erc-once-with-server-event' in a server buffer"))
- (let ((fun (erc-gensym))
+ (let ((fun (make-symbol "fun"))
(hook (erc-get-hook event)))
(put fun 'erc-original-buffer (current-buffer))
(fset fun `(lambda (proc parsed)
@@ -1316,7 +1314,7 @@ not be run.
When FORMS execute, the current buffer is the server buffer associated with the
connection over which the data was received that triggered EVENT."
- (let ((fun (erc-gensym))
+ (let ((fun (make-symbol "fun"))
(hook (erc-get-hook event)))
(fset fun `(lambda (proc parsed)
(remove-hook ',hook ',fun)
@@ -1370,7 +1368,7 @@ If BUFFER is nil, the current buffer is used."
(defun erc-ison-p (nick)
"Return non-nil if NICK is online."
(interactive "sNick: ")
- (with-current-buffer (erc-server-buffer)
+ (erc-with-server-buffer
(let ((erc-online-p 'unknown))
(erc-once-with-server-event
303
@@ -1420,7 +1418,7 @@ server buffer.")
(defun erc-active-buffer ()
"Return the value of `erc-active-buffer' for the current server.
Defaults to the server buffer."
- (with-current-buffer (erc-server-buffer)
+ (erc-with-server-buffer
(if (buffer-live-p erc-active-buffer)
erc-active-buffer
(setq erc-active-buffer (current-buffer)))))
@@ -1603,10 +1601,10 @@ See `erc-get-buffer' for details.
See also `with-current-buffer'.
\(fn (TARGET [PROCESS]) BODY...)"
- (let ((buf (erc-gensym))
- (proc (erc-gensym))
- (target (erc-gensym))
- (process (erc-gensym)))
+ (let ((buf (make-symbol "buf"))
+ (proc (make-symbol "proc"))
+ (target (make-symbol "target"))
+ (process (make-symbol "process")))
`(let* ((,target ,(car spec))
(,process ,(cadr spec))
(,buf (if (bufferp ,target)
@@ -1616,7 +1614,7 @@ See also `with-current-buffer'.
erc-server-process))))
(if (and ,target ,proc)
(erc-get-buffer ,target ,proc))))))
- (when ,buf
+ (when (buffer-live-p ,buf)
(with-current-buffer ,buf
,@body)))))
(put 'erc-with-buffer 'lisp-indent-function 1)
@@ -1671,8 +1669,8 @@ FORMS will be evaluated in all buffers having the process PROCESS and
where PRED matches or in all buffers of the server process if PRED is
nil."
;; Make the evaluation have the correct order
- (let ((pre (erc-gensym))
- (pro (erc-gensym)))
+ (let ((pre (make-symbol "pre"))
+ (pro (make-symbol "pro")))
`(let ((,pro ,process)
(,pre ,pred))
(mapcar (lambda (buffer)
@@ -1755,7 +1753,10 @@ all channel buffers on all servers."
(make-variable-buffer-local 'erc-invitation)
(defvar erc-away nil
- "Non-nil indicates that we are away.")
+ "Non-nil indicates that we are away.
+
+Use `erc-away-time' to access this if you might be in a channel
+buffer rather than a server buffer.")
(make-variable-buffer-local 'erc-away)
(defvar erc-channel-list nil
@@ -1813,43 +1814,43 @@ removed from the list will be disabled."
:type
'(set
:greedy t
- (const :tag "Set away status automatically" autoaway)
- (const :tag "Join channels automatically" autojoin)
- (const :tag "Buttonize URLs, nicknames, and other text" button)
- (const
- :tag
- "Mark unidentified users on freenode and other servers supporting CAPAB"
- capab-identify)
- (const :tag "Wrap long lines" fill)
- (const :tag "Launch an identd server on port 8113" identd)
- (const :tag "Highlight or remove IRC control characters"
+ (const :tag "autoaway: Set away status automatically" autoaway)
+ (const :tag "autojoin: Join channels automatically" autojoin)
+ (const :tag "button: Buttonize URLs, nicknames, and other text" button)
+ (const :tag "capab: Mark unidentified users on servers supporting CAPAB"
+ capab-identify)
+ (const :tag "completion: Complete nicknames and commands (programmable)"
+ completion)
+ (const :tag "hecomplete: Complete nicknames and commands (old)" hecomplete)
+ (const :tag "fill: Wrap long lines" fill)
+ (const :tag "identd: Launch an identd server on port 8113" identd)
+ (const :tag "irccontrols: Highlight or remove IRC control characters"
irccontrols)
- (const :tag "Save buffers in logs" log)
- (const :tag "Highlight pals, fools, and other keywords" match)
- (const :tag "Display a menu in ERC buffers" menu)
- (const :tag "Detect netsplits" netsplit)
- (const :tag "Don't display non-IRC commands after evaluation"
+ (const :tag "log: Save buffers in logs" log)
+ (const :tag "match: Highlight pals, fools, and other keywords" match)
+ (const :tag "menu: Display a menu in ERC buffers" menu)
+ (const :tag "netsplit: Detect netsplits" netsplit)
+ (const :tag "noncommands: Don't display non-IRC commands after evaluation"
noncommands)
- (const :tag "Notify when the online status of certain users changes"
+ (const :tag
+ "notify: Notify when the online status of certain users changes"
notify)
- (const :tag "Complete nicknames and commands (programmable)"
- completion)
- (const :tag "Complete nicknames and commands (old)" hecomplete)
- (const :tag "Process CTCP PAGE requests from IRC" page)
- (const :tag "Make displayed lines read-only" readonly)
- (const :tag "Replace text in messages" replace)
- (const :tag "Enable an input history" ring)
- (const :tag "Scroll to the bottom of the buffer" scrolltobottom)
- (const :tag "Identify to Nickserv (IRC Services) automatically"
+ (const :tag "page: Process CTCP PAGE requests from IRC" page)
+ (const :tag "readonly: Make displayed lines read-only" readonly)
+ (const :tag "replace: Replace text in messages" replace)
+ (const :tag "ring: Enable an input history" ring)
+ (const :tag "scrolltobottom: Scroll to the bottom of the buffer"
+ scrolltobottom)
+ (const :tag "services: Identify to Nickserv (IRC Services) automatically"
services)
- (const :tag "Convert smileys to pretty icons" smiley)
- (const :tag "Play sounds when you receive CTCP SOUND requests"
+ (const :tag "smiley: Convert smileys to pretty icons" smiley)
+ (const :tag "sound: Play sounds when you receive CTCP SOUND requests"
sound)
- (const :tag "Add timestamps to messages" stamp)
- (const :tag "Check spelling" spelling)
- (const :tag "Track channel activity in the mode-line" track)
- (const :tag "Truncate buffers to a certain size" truncate)
- (const :tag "Translate morse code in messages" unmorse)
+ (const :tag "stamp: Add timestamps to messages" stamp)
+ (const :tag "spelling: Check spelling" spelling)
+ (const :tag "track: Track channel activity in the mode-line" track)
+ (const :tag "truncate: Truncate buffers to a certain size" truncate)
+ (const :tag "unmorse: Translate morse code in messages" unmorse)
(repeat :tag "Others" :inline t symbol))
:group 'erc)
@@ -1902,9 +1903,7 @@ removed from the list will be disabled."
(defun erc-open (&optional server port nick full-name
connect passwd tgt-list channel process)
- "ERC is a powerful, modular, and extensible IRC client.
-
-Connect to SERVER on PORT as NICK with FULL-NAME.
+ "Connect to SERVER on PORT as NICK with FULL-NAME.
If CONNECT is non-nil, connect to the server. Otherwise assume
already connected and just create a separate buffer for the new
@@ -1969,10 +1968,6 @@ Returns the buffer for the given server or channel."
(erc-set-active-buffer buffer)
;; last invitation channel
(setq erc-invitation nil)
- ;; away flag
- ;; Should only be used in session-buffers
- (setq erc-away (let ((serverbuf (erc-server-buffer)))
- (and serverbuf (with-current-buffer serverbuf erc-away))))
;; Server channel list
(setq erc-channel-list ())
;; login-time 'nick in use' error
@@ -1987,25 +1982,25 @@ Returns the buffer for the given server or channel."
(setq erc-dbuf
(when erc-log-p
(get-buffer-create (concat "*ERC-DEBUG: " server "*"))))
- (erc-determine-parameters server port nick full-name)
-
- ;; Saving log file on exit
- (run-hooks 'erc-connect-pre-hook)
-
- (when connect
- (erc-server-connect erc-session-server erc-session-port))
- (erc-update-mode-line)
- (set-marker erc-insert-marker (point))
+ ;; set up prompt
(unless continued-session
(goto-char (point-max))
(insert "\n"))
- (set-marker (process-mark erc-server-process) (point))
(if continued-session
(goto-char old-point)
(set-marker erc-insert-marker (point))
(erc-display-prompt)
(goto-char (point-max)))
+ (erc-determine-parameters server port nick full-name)
+
+ ;; Saving log file on exit
+ (run-hook-with-args 'erc-connect-pre-hook buffer)
+
+ (when connect
+ (erc-server-connect erc-session-server erc-session-port buffer))
+ (erc-update-mode-line)
+
;; Now display the buffer in a window as per user wishes.
(unless (eq buffer old-buffer)
(when erc-log-p
@@ -2016,11 +2011,13 @@ Returns the buffer for the given server or channel."
buffer))
-(defun erc-initialize-log-marker ()
- "Initialize the `erc-last-saved-position' marker to a sensible position."
+(defun erc-initialize-log-marker (buffer)
+ "Initialize the `erc-last-saved-position' marker to a sensible position.
+BUFFER is the current buffer."
+ (with-current-buffer buffer
(setq erc-last-saved-position (make-marker))
(move-marker erc-last-saved-position
- (1- (marker-position erc-insert-marker))))
+ (1- (marker-position erc-insert-marker)))))
;; interactive startup
@@ -2120,8 +2117,12 @@ functions in here get called with the parameters SERVER and NICK."
(nick (erc-compute-nick))
password
(full-name (erc-compute-full-name)))
- "Select connection parameters and run ERC.
-Non-interactively, it takes keyword arguments
+ "ERC is a powerful, modular, and extensible IRC client.
+This function is the main entry point for ERC.
+
+It permits you to select connection parameters, and then starts ERC.
+
+Non-interactively, it takes the keyword arguments
(server (erc-compute-server))
(port (erc-compute-port))
(nick (erc-compute-nick))
@@ -2132,12 +2133,13 @@ That is, if called with
(erc :server \"irc.freenode.net\" :full-name \"Harry S Truman\")
-server and full-name will be set to those values, whereas
+then the server and full-name will be set to those values, whereas
`erc-compute-port', `erc-compute-nick' and `erc-compute-full-name' will
be invoked for the values of the other parameters."
(interactive (erc-select-read-args))
(erc-open server port nick full-name t password))
+;;;###autoload
(defalias 'erc-select 'erc)
(defun erc-ssl (&rest r)
@@ -2428,7 +2430,7 @@ See also `erc-format-message' and `erc-display-line'."
This function relies on the erc-parsed text-property being
present."
- (let ((prop-val (get-text-property position 'erc-parsed)))
+ (let ((prop-val (erc-get-parsed-vector position)))
(and prop-val (member (erc-response.command prop-val) list))))
(defvar erc-send-input-line-function 'erc-send-input-line)
@@ -2586,20 +2588,19 @@ If no USER argument is specified, list the contents of `erc-ignore-list'."
(erc-display-line
(erc-make-notice (format "Now ignoring %s" user))
'active)
- (with-current-buffer (erc-server-buffer)
- (add-to-list 'erc-ignore-list user)))
- (if (null (with-current-buffer (erc-server-buffer) erc-ignore-list))
+ (erc-with-server-buffer (add-to-list 'erc-ignore-list user)))
+ (if (null (erc-with-server-buffer erc-ignore-list))
(erc-display-line (erc-make-notice "Ignore list is empty") 'active)
(erc-display-line (erc-make-notice "Ignore list:") 'active)
(mapc #'(lambda (item)
(erc-display-line (erc-make-notice item)
'active))
- (with-current-buffer (erc-server-buffer) erc-ignore-list))))
+ (erc-with-server-buffer erc-ignore-list))))
t)
(defun erc-cmd-UNIGNORE (user)
"Remove the user specified in USER from the ignore list."
- (let ((ignored-nick (car (with-current-buffer (erc-server-buffer)
+ (let ((ignored-nick (car (erc-with-server-buffer
(erc-member-ignore-case (regexp-quote user)
erc-ignore-list)))))
(unless ignored-nick
@@ -2614,7 +2615,7 @@ If no USER argument is specified, list the contents of `erc-ignore-list'."
(erc-display-line
(erc-make-notice (format "No longer ignoring %s" user))
'active)
- (with-current-buffer (erc-server-buffer)
+ (erc-with-server-buffer
(setq erc-ignore-list (delete ignored-nick erc-ignore-list)))))
t)
@@ -2673,8 +2674,8 @@ If no reason is given, unset away status."
"Mark the user as being away everywhere, the reason being indicated by LINE."
;; on all server buffers.
(erc-with-all-buffers-of-server nil
- #'erc-server-buffer-p
- (erc-cmd-AWAY line)))
+ #'erc-open-server-buffer-p
+ (erc-cmd-AWAY line)))
(put 'erc-cmd-GAWAY 'do-not-parse-args t)
(defun erc-cmd-CTCP (nick cmd &rest args)
@@ -2866,10 +2867,9 @@ If SERVER is non-nil, use that, rather than the current server."
(defun erc-cmd-IDLE (nick)
"Show the length of time NICK has been idle."
- (let ((serverbuf (erc-server-buffer))
- (origbuf (current-buffer))
+ (let ((origbuf (current-buffer))
symlist)
- (with-current-buffer serverbuf
+ (erc-with-server-buffer
(add-to-list 'symlist
(cons (erc-once-with-server-event
311 `(string= ,nick
@@ -3027,8 +3027,8 @@ The rest of LINE is the message to send."
(defun erc-cmd-NICK (nick)
"Change current nickname to NICK."
(erc-log (format "cmd: NICK: %s (erc-bad-nick: %S)" nick erc-bad-nick))
- (let ((nicklen (cdr (assoc "NICKLEN" (with-current-buffer (erc-server-buffer)
- erc-server-parameters)))))
+ (let ((nicklen (cdr (assoc "NICKLEN" (erc-with-server-buffer
+ erc-server-parameters)))))
(and nicklen (> (length nick) (string-to-number nicklen))
(erc-display-message
nil 'notice 'active 'nick-too-long
@@ -3167,7 +3167,8 @@ the message given by REASON."
((string-match "^\\s-*\\(.*\\)$" reason)
(let* ((s (match-string 1 reason))
(buffer (erc-server-buffer))
- (reason (funcall erc-quit-reason (if (equal s "") nil s))))
+ (reason (funcall erc-quit-reason (if (equal s "") nil s)))
+ server-proc)
(with-current-buffer (if (and buffer
(bufferp buffer))
buffer
@@ -3175,10 +3176,18 @@ the message given by REASON."
(erc-log (format "cmd: QUIT: %s" reason))
(setq erc-server-quitting t)
(erc-set-active-buffer (erc-server-buffer))
+ (setq server-proc erc-server-process)
(erc-server-send (format "QUIT :%s" reason)))
- (run-hook-with-args 'erc-quit-hook erc-server-process)
+ (run-hook-with-args 'erc-quit-hook server-proc)
(when erc-kill-queries-on-quit
- (erc-kill-query-buffers erc-server-process)))
+ (erc-kill-query-buffers server-proc))
+ ;; if the process has not been killed within 4 seconds, kill it
+ (run-at-time 4 nil
+ (lambda (proc)
+ (when (and (processp proc)
+ (memq (process-status proc) '(run open)))
+ (delete-process proc)))
+ server-proc))
t)
(t nil)))
@@ -3189,9 +3198,7 @@ the message given by REASON."
(defun erc-cmd-GQUIT (reason)
"Disconnect from all servers at once with the same quit REASON."
- (erc-with-all-buffers-of-server nil #'(lambda ()
- (and (erc-server-buffer-p)
- (erc-server-process-alive)))
+ (erc-with-all-buffers-of-server nil #'erc-open-server-buffer-p
(erc-cmd-QUIT reason)))
(defalias 'erc-cmd-GQ 'erc-cmd-GQUIT)
@@ -3199,8 +3206,17 @@ the message given by REASON."
(defun erc-cmd-RECONNECT ()
"Try to reconnect to the current IRC server."
- (setq erc-server-reconnect-count 0)
- (erc-server-reconnect)
+ (let ((buffer (or (erc-server-buffer) (current-buffer)))
+ (process nil))
+ (with-current-buffer (if (bufferp buffer) buffer (current-buffer))
+ (setq erc-server-quitting nil)
+ (setq erc-server-reconnecting t)
+ (setq erc-server-reconnect-count 0)
+ (setq process (get-buffer-process (erc-server-buffer)))
+ (if process
+ (delete-process process)
+ (erc-server-reconnect))
+ (setq erc-server-reconnecting nil)))
t)
(defun erc-cmd-SERVER (server)
@@ -3373,7 +3389,7 @@ The ban list is fetched from the server if necessary."
(setq erc-server-367-functions 'erc-banlist-store
erc-channel-banlist nil)
;; fetch the ban list then callback
- (with-current-buffer (erc-server-buffer)
+ (erc-with-server-buffer
(erc-once-with-server-event
368
`(with-current-buffer ,chnl-name
@@ -3443,7 +3459,7 @@ Unban all currently banned users in the current channel."
(let ((old-367-hook erc-server-367-functions))
(setq erc-server-367-functions 'erc-banlist-store)
;; fetch the ban list then callback
- (with-current-buffer (erc-server-buffer)
+ (erc-with-server-buffer
(erc-once-with-server-event
368
`(with-current-buffer ,chnl
@@ -3737,7 +3753,7 @@ To change how this query window is displayed, use `let' to bind
(erc-update-mode-line)
buf))
-(defcustom erc-auto-query nil
+(defcustom erc-auto-query 'bury
"If non-nil, create a query buffer each time you receive a private message.
If the buffer doesn't already exist it is created. This can be
@@ -3811,7 +3827,7 @@ See also `erc-display-error-notice'."
(setq erc-nick-change-attempt-count (+ erc-nick-change-attempt-count 1))
(let ((newnick (nth 1 erc-default-nicks))
(nicklen (cdr (assoc "NICKLEN"
- (with-current-buffer (erc-server-buffer)
+ (erc-with-server-buffer
erc-server-parameters)))))
(setq erc-bad-nick t)
;; try to use a different nick
@@ -4101,24 +4117,29 @@ See also: `erc-echo-notice-in-user-buffers',
"Run just after connection.
Set user modes and run `erc-after-connect' hook."
- (unless erc-server-connected ; only once per session
- (let ((server (or erc-server-announced-name (erc-response.sender parsed)))
- (nick (car (erc-response.command-args parsed ))))
- (setq erc-server-connected t)
- (erc-update-mode-line)
- (erc-set-initial-user-mode nick)
- (erc-server-setup-periodical-server-ping)
- (run-hook-with-args 'erc-after-connect server nick))))
-
-(defun erc-set-initial-user-mode (nick)
- "If `erc-user-mode' is non-nil for NICK, set the user modes."
- (when erc-user-mode
- (let ((mode (if (functionp erc-user-mode)
- (funcall erc-user-mode)
- erc-user-mode)))
- (when (stringp mode)
- (erc-log (format "changing mode for %s to %s" nick mode))
- (erc-server-send (format "MODE %s %s" nick mode))))))
+ (with-current-buffer (process-buffer proc)
+ (unless erc-server-connected ; only once per session
+ (let ((server (or erc-server-announced-name
+ (erc-response.sender parsed)))
+ (nick (car (erc-response.command-args parsed)))
+ (buffer (process-buffer proc)))
+ (setq erc-server-connected t)
+ (erc-update-mode-line)
+ (erc-set-initial-user-mode nick buffer)
+ (erc-server-setup-periodical-ping buffer)
+ (run-hook-with-args 'erc-after-connect server nick)))))
+
+(defun erc-set-initial-user-mode (nick buffer)
+ "If `erc-user-mode' is non-nil for NICK, set the user modes.
+The server buffer is given by BUFFER."
+ (with-current-buffer buffer
+ (when erc-user-mode
+ (let ((mode (if (functionp erc-user-mode)
+ (funcall erc-user-mode)
+ erc-user-mode)))
+ (when (stringp mode)
+ (erc-log (format "changing mode for %s to %s" nick mode))
+ (erc-server-send (format "MODE %s %s" nick mode)))))))
(defun erc-display-error-notice (parsed string)
"Display STRING as an error notice.
@@ -4345,14 +4366,12 @@ If non-nil, return from being away."
erc-nick)))
(cond
(away-p
- (erc-with-all-buffers-of-server proc nil
- (setq erc-away (current-time))))
+ (setq erc-away (current-time)))
(t
(let ((away-time erc-away))
;; away must be set to NIL BEFORE sending anything to prevent
;; an infinite recursion
- (erc-with-all-buffers-of-server proc nil
- (setq erc-away nil))
+ (setq erc-away nil)
(save-excursion
(set-buffer (erc-active-buffer))
(when erc-public-away-p
@@ -5037,8 +5056,9 @@ strings over to the next call."
(defun erc-set-current-nick (nick)
"Set the current nickname to NICK."
- (with-current-buffer (or (erc-server-buffer)
- (current-buffer))
+ (with-current-buffer (if (buffer-live-p (erc-server-buffer))
+ (erc-server-buffer)
+ (current-buffer))
(setq erc-server-current-nick nick)))
(defun erc-current-nick ()
@@ -5119,7 +5139,7 @@ Takes a full SPEC of a user in the form \"nick!login@host\", and
matches against all the regexp's in `erc-ignore-list'. If any
match, returns that regexp."
(catch 'found
- (dolist (ignored (with-current-buffer (erc-server-buffer) erc-ignore-list))
+ (dolist (ignored (erc-with-server-buffer erc-ignore-list))
(if (string-match ignored spec)
(throw 'found ignored)))))
@@ -5673,12 +5693,12 @@ entry of `channel-members'."
""))
user))))
-(defun erc-away-p ()
- "Return t if the current ERC process is set away."
- (save-excursion
- (and (erc-server-buffer-live-p)
- (set-buffer (process-buffer erc-server-process))
- erc-away)))
+(defun erc-away-time ()
+ "Return non-nil if the current ERC process is set away.
+
+In particular, the time that we were set away is returned.
+See `current-time' for details on the time format."
+ (erc-with-server-buffer erc-away))
;; Mode line handling
@@ -5706,9 +5726,17 @@ The following characters are replaced:
"A string to be formatted and shown in the header-line in `erc-mode'.
Only used starting in Emacs 21.
+Set this to nil if you do not want the header line to be
+displayed.
+
See `erc-mode-line-format' for which characters are can be used."
:group 'erc-mode-line-and-header
- :type 'string)
+ :set (lambda (sym val)
+ (set sym val)
+ (when (fboundp 'erc-update-mode-line)
+ (erc-update-mode-line nil)))
+ :type '(choice (const :tag "Disabled" nil)
+ string))
(defcustom erc-header-line-uses-help-echo-p t
"Show the contents of the header line in the echo area or as a tooltip
@@ -5734,7 +5762,8 @@ Otherwise, use the `erc-header-line' face."
(defcustom erc-common-server-suffixes
'(("openprojects.net$" . "OPN")
- ("freenode.net$" . "OPN"))
+ ("freenode.net$" . "freenode")
+ ("oftc.net$" . "OFTC"))
"Alist of common server name suffixes.
This variable is used in mode-line display to save screen
real estate. Set it to nil if you want to avoid changing
@@ -5786,9 +5815,7 @@ This should be a string with substitution variables recognized by
(defun erc-format-away-status ()
"Return a formatted `erc-mode-line-away-status-format'
if `erc-away' is non-nil."
- (let ((a (when (erc-server-buffer-live-p)
- (with-current-buffer (process-buffer erc-server-process)
- erc-away))))
+ (let ((a (erc-away-time)))
(if a
(format-time-string erc-mode-line-away-status-format a)
"")))
@@ -5813,9 +5840,7 @@ if `erc-away' is non-nil."
(defun erc-format-lag-time ()
"Return the estimated lag time to server, `erc-server-lag'."
- (let ((lag (when (erc-server-buffer-live-p)
- (with-current-buffer (process-buffer erc-server-process)
- erc-server-lag))))
+ (let ((lag (erc-with-server-buffer erc-server-lag)))
(cond (lag (format "lag:%.0f" lag))
(t ""))))
@@ -6137,7 +6162,8 @@ functions."
(format "%s (%s@%s) has left channel %s%s"
nick user host channel
(if (not (string= reason ""))
- (format ": %s" reason)
+ (format ": %s"
+ (erc-replace-regexp-in-string "%" "%%" reason))
"")))))
@@ -6232,6 +6258,13 @@ This function should be on `erc-kill-channel-hook'."
"Find the next occurrence of the `erc-parsed' text property."
(text-property-not-all (point-min) (point-max) 'erc-parsed nil))
+(defun erc-restore-text-properties ()
+ "Restore the property 'erc-parsed for the region."
+ (let ((parsed-posn (erc-find-parsed-property)))
+ (put-text-property
+ (point-min) (point-max)
+ 'erc-parsed (when parsed-posn (erc-get-parsed-vector parsed-posn)))))
+
(defun erc-get-parsed-vector (point)
"Return the whole parsed vector on POINT."
(get-text-property point 'erc-parsed))
@@ -6263,8 +6296,7 @@ Otherwise, connect to HOST:PORT as USER and /join CHANNEL."
(lambda ()
(and (string-equal erc-session-server host)
(= erc-session-port port)
- erc-server-connected
- (eq (erc-server-buffer) (current-buffer))))))))
+ (erc-open-server-buffer-p)))))))
(with-current-buffer (or server-buffer (current-buffer))
(if (and server-buffer channel)
(erc-cmd-JOIN channel)
diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el
index d3dabbf04b5..96d8255a3ab 100644
--- a/lisp/eshell/esh-proc.el
+++ b/lisp/eshell/esh-proc.el
@@ -181,7 +181,7 @@ The signals which will cause this to happen are matched by
(setq signum (abs (string-to-number id))))
((stringp id)
(let (case-fold-search)
- (if (string-match "^-\\([A-Z]+\\)$" id)
+ (if (string-match "^-\\([A-Z]+[12]?\\)$" id)
(setq signum
(intern (concat "SIG" (match-string 1 id))))
(error "kill: bad signal spec `%s'" id))))
diff --git a/lisp/expand.el b/lisp/expand.el
index ebcf90ccfc2..c34c18b4483 100644
--- a/lisp/expand.el
+++ b/lisp/expand.el
@@ -51,17 +51,17 @@
;;
;; and enter Abbrev mode with the following hook :
;;
-;; (add-hook 'c-mode-hook (function (lambda ()
-;; (expand-add-abbrevs c-mode-abbrev-table c-expand-list)
-;; (abbrev-mode))))
+;; (add-hook 'c-mode-hook
+;; (lambda ()
+;; (expand-add-abbrevs c-mode-abbrev-table c-expand-list)
+;; (abbrev-mode 1)))
;;
;; you can also init some post-process hooks :
;;
;; (add-hook 'expand-load-hook
-;; (function
-;; (lambda ()
-;; (add-hook 'expand-expand-hook 'indent-according-to-mode)
-;; (add-hook 'expand-jump-hook 'indent-according-to-mode))))
+;; (lambda ()
+;; (add-hook 'expand-expand-hook 'indent-according-to-mode)
+;; (add-hook 'expand-jump-hook 'indent-according-to-mode)))
;;
;; Remarks:
;;
@@ -336,6 +336,7 @@ This variable is local to a buffer.")
'expand-abbrev-hook)))
(put 'expand-abbrev-hook 'no-self-insert t)
+;;;###autoload
(defun expand-abbrev-hook ()
"Abbrev hook used to do the expansion job of expand abbrevs.
See `expand-add-abbrevs'. Value is non-nil if expansion was done."
diff --git a/lisp/faces.el b/lisp/faces.el
index 904db10efa5..47fb2fa0295 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -1803,13 +1803,9 @@ Initialize colors of certain faces from frame parameters."
(condition-case ()
(progn
(face-spec-set face (face-user-default-spec face) frame)
- (internal-merge-in-global-face face frame)
(if (memq (window-system frame) '(x w32 mac))
(make-face-x-resource-internal face frame))
- ;; If the user has customized the face, don't let X
- ;; resources override the customizations.
- (if (get face 'theme-face)
- (custom-theme-recalc-face face)))
+ (internal-merge-in-global-face face frame))
(error nil)))
;; Apply the attributes specified by frame parameters. This
;; rewrites parameters changed by make-face-x-resource-internal
diff --git a/lisp/ffap.el b/lisp/ffap.el
index e49c77f4d47..5bba729fce3 100644
--- a/lisp/ffap.el
+++ b/lisp/ffap.el
@@ -1147,7 +1147,8 @@ which may actually result in an url rather than a filename."
(error nil))
string))
(abs (file-name-absolute-p name))
- (default-directory default-directory))
+ (default-directory default-directory)
+ (oname name))
(unwind-protect
(cond
;; Immediate rejects (/ and // and /* are too common in C/C++):
@@ -1164,13 +1165,7 @@ which may actually result in an url rather than a filename."
(not abs) (string-match ffap-shell-prompt-regexp name)
(ffap-file-exists-string (substring name (match-end 0)))))
;; Accept remote names without actual checking (too slow):
- ((if abs
- (ffap-file-remote-p name)
- ;; Try adding a leading "/" (common omission in ftp file names):
- (and
- ffap-ftp-sans-slash-regexp
- (string-match ffap-ftp-sans-slash-regexp name)
- (ffap-file-remote-p (concat "/" name)))))
+ ((and abs (ffap-file-remote-p name)))
;; Ok, not remote, try the existence test even if it is absolute:
((and abs (ffap-file-exists-string name)))
;; If it contains a colon, get rid of it (and return if exists)
@@ -1193,6 +1188,14 @@ which may actually result in an url rather than a filename."
(ffap-file-remote-p try)
(ffap-file-exists-string try))))))
try))
+ ;; Try adding a leading "/" (common omission in ftp file names).
+ ;; Note that this uses oname, which still has any colon part.
+ ;; This should have a lower priority than the alist stuff,
+ ;; else it matches things like "ffap.el:1234:56:Warning".
+ ((and (not abs)
+ ffap-ftp-sans-slash-regexp
+ (string-match ffap-ftp-sans-slash-regexp oname)
+ (ffap-file-remote-p (concat "/" oname))))
;; Alist failed? Try to guess an active remote connection
;; from buffer variables, and try once more, both as an
;; absolute and relative file name on that remote host.
diff --git a/lisp/files.el b/lisp/files.el
index f11c6d37834..39d9d6a78b2 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2435,14 +2435,14 @@ asking you for confirmation."
(mapc (lambda (pair)
(put (car pair) 'safe-local-variable (cdr pair)))
- '((buffer-read-only . booleanp) ;; C source code
- (default-directory . stringp) ;; C source code
- (fill-column . integerp) ;; C source code
- (indent-tabs-mode . booleanp) ;; C source code
- (left-margin . integerp) ;; C source code
- (no-update-autoloads . booleanp)
- (tab-width . integerp) ;; C source code
- (truncate-lines . booleanp))) ;; C source code
+ '((buffer-read-only . booleanp) ;; C source code
+ (default-directory . stringp) ;; C source code
+ (fill-column . integerp) ;; C source code
+ (indent-tabs-mode . booleanp) ;; C source code
+ (left-margin . integerp) ;; C source code
+ (no-update-autoloads . booleanp)
+ (tab-width . integerp) ;; C source code
+ (truncate-lines . booleanp))) ;; C source code
(put 'c-set-style 'safe-local-eval-function t)
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index eb2a7964cec..162db36311f 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -2226,7 +2226,7 @@ other modes in which C preprocessor directives are used. e.g. `asm-mode' and
"condition-case" "track-mouse"
"eval-after-load" "eval-and-compile" "eval-when-compile"
"eval-when" "eval-at-startup" "eval-next-after-load"
- "with-category-table"
+ "with-case-table" "with-category-table"
"with-current-buffer" "with-electric-help"
"with-local-quit" "with-no-warnings"
"with-output-to-string" "with-output-to-temp-buffer"
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index add0bb47c25..8f094dd6537 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,73 @@
+2007-04-10 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * gnus-msg.el (gnus-inews-yank-articles): Use
+ message-exchange-point-and-mark instead of exchange-point-and-mark.
+
+2007-04-09 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * message.el (message-yank-original): Make sure cited text ends with
+ newline; don't exchange point and mark.
+
+2007-04-07 Chong Yidong <cyd@stupidchicken.com>
+
+ * tls.el (open-tls-stream): Properly handle case where there
+ is no associated buffer.
+
+2007-04-03 Thien-Thi Nguyen <ttn@gnu.org>
+
+ * gnus-msg.el (gnus-inews-yank-articles): Fix bug: After
+ message-yank-original, make sure (< mark TEXT point).
+
+2007-03-31 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * nnmail.el (nnmail-spool-file): Mark as obsolete.
+ (nnmail-get-new-mail): Reformat.
+
+ * gnus-registry.el (gnus-registry-cache-save): Add FIXME comment.
+
+ * gmm-utils.el: Fix Commentary.
+ (gmm-tool-bar-from-list): Fix typo in doc string.
+
+2007-03-27 Thien-Thi Nguyen <ttn@gnu.org>
+
+ * message.el (message-yank-original): Fix bug:
+ Don't switch point and mark unnecessarily.
+
+2007-03-25 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de>
+
+ * gnus-msg.el (gnus-setup-message, gnus-inews-add-send-actions): Move
+ evaluation of gnus-extended-version to ensure correct generation of the
+ User-Agent header when message-generate-headers-first is used.
+
+2007-03-24 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * gnus-art.el (gnus-button-alist): Also catch `<f1> k ...'.
+ (gnus-treat-display-x-face): Fix doc string.
+
+2007-03-20 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de>
+
+ * message.el (message-required-news-headers):
+ * gnus-util.el (gnus-intern-safe): Fix typo in docstring.
+
+2007-03-15 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * message.el (message-generate-new-buffers): Change the meaning of the
+ nil value; add `standard' to the choices; treat t as `unique'; improve
+ doc string.
+ (gnus-select-frame-set-input-focus): Autoload.
+ (message-buffer-name): Search for the existing message buffer if
+ message-generate-new-buffers is nil or `standard'; treat the value t of
+ message-generate-new-buffers as `unique'.
+ (message-pop-to-buffer): Raise the frame already displaying the message
+ buffer; clear the echo area after querying.
+ (message-setup): Pass the `continue' argument to compose-mail.
+ (message-mail): Prefer `switch-function' if it is given; search for the
+ existing message buffer if the `continue' argument is non-nil; pass
+ continue and switch-function arguments to compose-mail by way of
+ message-setup.
+ (message-mail-other-window): Adjust argument of message-setup.
+ (message-mail-other-frame): Ditto.
+
2007-02-28 Katsumi Yamaoka <yamaoka@jpl.org>
* message.el (message-make-in-reply-to): Quote name containing
@@ -1514,15 +1584,6 @@
* gnus-start.el (gnus-no-server-1): Mention
`gnus-level-default-subscribed' in doc string.
-2005-11-26 Dave Love <fx@gnu.org>
-
- * tls.el (open-tls-stream): Rename arg SERVICE to PORT.
- (tls-program, tls-success): Provide openssl alternative.
-
- * starttls.el: Doc fixes.
- (starttls-open-stream-gnutls, starttls-open-stream): Rename arg
- SERVICE to PORT.
-
2005-12-09 Reiner Steib <Reiner.Steib@gmx.de>
* gnus-start.el (gnus-start-draft-setup): Enforce
@@ -2577,14 +2638,6 @@
* gnus-art.el (gnus-emphasis-alist): Disable the strikethru thingy.
-2005-06-02 Katsumi Yamaoka <yamaoka@jpl.org>
-
- * pop3.el (pop3-md5): Run md5 in the binary mode.
- (pop3-md5-program-args): New variable.
-
- * starttls.el (starttls-set-process-query-on-exit-flag):
- Use eval-and-compile.
-
2005-05-31 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-art.el (article-display-x-face): Replace
@@ -2620,16 +2673,6 @@
(nntp-open-ssl-stream): Ditto.
(nntp-open-tls-stream): Ditto.
- * pgg.el: Don't bind itimer vars; don't autoload itimer functions.
- (pgg-run-at-time-1): New macro.
- (pgg-run-at-time): Use it.
-
- * starttls.el (starttls-set-process-query-on-exit-flag): Alias to
- set-process-query-on-exit-flag or process-kill-without-query.
- (starttls-open-stream-gnutls): Use it instead of
- process-kill-without-query.
- (starttls-open-stream): Ditto.
-
2005-05-31 Simon Josefsson <jas@extundo.com>
* imap.el (imap-ssl-open): Use imap-process-connection-type,
@@ -3547,13 +3590,6 @@
* gnus-msg.el (gnus-summary-resend-default-address): Add :version.
- * tls.el (tls-process-connection-type, tls-success)
- (tls-certtool-program): Add :version.
-
- * starttls.el (starttls-gnutls-program, starttls-use-gnutls)
- (starttls-extra-arguments, starttls-process-connection-type)
- (starttls-connect, starttls-failure, starttls-success):
-
* spam-stat.el (spam-stat): Add :version.
* sieve.el (sieve): Add :version.
@@ -4041,12 +4077,6 @@
* message.el (message-tokenize-header): Fix 2004-09-06 change
which used point-min in the wrong place.
-2004-10-12 Simon Josefsson <jas@extundo.com>
-
- * net/tls.el (tls-certtool-program): New variable.
- (tls-certificate-information): New function, based on
- ssl-certificate-information.
-
2004-10-11 Reiner Steib <Reiner.Steib@gmx.de>
* message.el (message-bury): Use `window-dedicated-p'.
@@ -4486,19 +4516,6 @@
* sieve.el (sieve-deactivate-all): Fix format string mismatch.
-2004-05-26 Simon Josefsson <jas@extundo.com>
-
- * starttls.el: Merge with my GNUTLS based starttls.el.
- (starttls-gnutls-program, starttls-use-gnutls)
- (starttls-extra-arguments, starttls-process-connection-type)
- (starttls-connect, starttls-failure, starttls-success): New variables.
- (starttls-program, starttls-extra-args): Doc fix.
- (starttls-negotiate-gnutls, starttls-open-stream-gnutls):
- New functions.
- (starttls-negotiate, starttls-open-stream):
- Check `starttls-use-gnutls' and pass on to corresponding *-gnutls
- function if it is set.
-
2004-08-30 Andreas Schwab <schwab@suse.de>
* rfc2231.el (rfc2231-parse-string): Restore whitespace syntax for
diff --git a/lisp/gnus/gmm-utils.el b/lisp/gnus/gmm-utils.el
index 84b69edb575..9241e96d042 100644
--- a/lisp/gnus/gmm-utils.el
+++ b/lisp/gnus/gmm-utils.el
@@ -26,7 +26,7 @@
;; This library provides self-contained utility functions. The functions are
;; used in Gnus, Message and MML, but within this library there are no
-;; dependencies on Gnus, Message, or MML or Gnus.
+;; dependencies on Gnus, Message, or MML.
;;; Code:
@@ -217,7 +217,7 @@ Within each entry of ICON-LIST, the first element is a menu
command, the second element is an icon file name and the third
element is a test function. You can use \\[describe-key]
<menu-entry> to find out the name of a menu command. The fourth
-and all following elements are passed a the PROPS argument to the
+and all following elements are passed as the PROPS argument to the
function `tool-bar-local-item'.
If ZAP-LIST is a list, remove those item from the default
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index c6ac13af6c9..552f3a68f49 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -1332,7 +1332,7 @@ See Info node `(gnus)Customizing Articles' for details."
(executable-find "icontopbm")))
'head)
"Display X-Face headers.
-Valid values are nil, t, `head', `last', an integer or a predicate.
+Valid values are nil and `head'.
See Info node `(gnus)Customizing Articles' and Info node
`(gnus)X-Face' for details."
:group 'gnus-article-treat
@@ -6620,7 +6620,7 @@ positives are possible."
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"
0 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-variable 2)
- ("`\\(\\b\\(C-h\\|<?[Ff]1>?\\)[ \t\n]+k[ \t\n]+\\([^']+\\)\\)'"
+ ("`\\(\\(C-h\\|<?[Ff]1>?\\)[ \t\n]+k[ \t\n]+\\([^']+\\)\\)'"
;; Unlike the other regexps we really have to require quoting
;; here to determine where it ends.
1 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-key 3)
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el
index cace5028f96..055fc75626a 100644
--- a/lisp/gnus/gnus-msg.el
+++ b/lisp/gnus/gnus-msg.el
@@ -393,6 +393,13 @@ Thank you for your help in stamping out bugs.
(setq mml-buffer-list nil)
(add-hook 'message-header-setup-hook 'gnus-inews-insert-gcc)
(add-hook 'message-header-setup-hook 'gnus-inews-insert-archive-gcc)
+ ;; message-newsreader and message-mailer were formerly set in
+ ;; gnus-inews-add-send-actions, but this is too late when
+ ;; message-generate-headers-first is used. --ansel
+ (add-hook 'message-mode-hook
+ (lambda nil
+ (setq message-newsreader
+ (setq message-mailer (gnus-extended-version)))))
;; #### FIXME: for a reason that I did not manage to identify yet,
;; the variable `gnus-newsgroup-name' does not honor a dynamically
;; scoped or setq'ed value from a caller like `C-u gnus-summary-mail'.
@@ -514,7 +521,6 @@ Gcc: header for archiving purposes."
(setq message-post-method
`(lambda (arg)
(gnus-post-method arg ,gnus-newsgroup-name)))
- (setq message-newsreader (setq message-mailer (gnus-extended-version)))
(message-add-action
`(when (gnus-buffer-exists-p ,buffer)
(set-window-configuration ,winconf))
@@ -765,6 +771,7 @@ active, the entire article will be yanked."
(nnheader-narrow-to-headers)
(nnheader-parse-naked-head)))))
(message-yank-original)
+ (message-exchange-point-and-mark)
(setq beg (or beg (mark t))))
(when articles
(insert "\n")))
diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el
index f32ed6f1414..3e4d3d0127c 100644
--- a/lisp/gnus/gnus-registry.el
+++ b/lisp/gnus/gnus-registry.el
@@ -154,6 +154,8 @@ way."
(gnus-load file)
(gnus-message 5 "Reading %s...done" file))))
+;; FIXME: Get rid of duplicated code, cf. `gnus-save-newsrc-file' in
+;; `gnus-start.el'. --rsteib
(defun gnus-registry-cache-save ()
"Save the registry cache file."
(interactive)
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index 4f8e8539e88..25d6dfd47b6 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -122,7 +122,7 @@ This is a compatibility function for different Emacsen."
(put 'gnus-eval-in-buffer-window 'edebug-form-spec '(form body))
(defmacro gnus-intern-safe (string hashtable)
- "Set hash value. Arguments are STRING, VALUE, and HASHTABLE."
+ "Get hash value. Arguments are STRING and HASHTABLE."
`(let ((symbol (intern ,string ,hashtable)))
(or (boundp symbol)
(set symbol nil))
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 55a7653dba1..baf98611308 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -226,7 +226,7 @@ Also see `message-required-news-headers' and
"*Headers to be generated or prompted for when posting an article.
RFC977 and RFC1036 require From, Date, Newsgroups, Subject,
Message-ID. Organization, Lines, In-Reply-To, Expires, and
-User-Agent are optional. If don't you want message to insert some
+User-Agent are optional. If you don't want message to insert some
header, remove it from this list."
:group 'message-news
:group 'message-headers
@@ -433,16 +433,36 @@ nil means let mailer mail back a message to report errors."
:type 'boolean)
(defcustom message-generate-new-buffers 'unique
- "*Non-nil means create a new message buffer whenever `message-setup' is called.
-If this is a function, call that function with three parameters: The type,
-the to address and the group name. (Any of these may be nil.) The function
-should return the new buffer name."
+ "*Say whether to create a new message buffer to compose a message.
+Valid values include:
+
+nil
+ Generate the buffer name in the Message way (e.g., *mail*, *news*,
+ *mail to whom*, *news on group*, etc.) and continue editing in the
+ existing buffer of that name. If there is no such buffer, it will
+ be newly created.
+
+`unique' or t
+ Create the new buffer with the name generated in the Message way.
+
+`unsent'
+ Similar to `unique' but the buffer name begins with \"*unsent \".
+
+`standard'
+ Similar to nil but the buffer name is simpler like *mail message*.
+
+function
+ If this is a function, call that function with three parameters:
+ The type, the To address and the group name (any of these may be nil).
+ The function should return the new buffer name."
:group 'message-buffers
:link '(custom-manual "(message)Message Buffers")
- :type '(choice (const :tag "off" nil)
- (const :tag "unique" unique)
- (const :tag "unsent" unsent)
- (function fun)))
+ :type '(choice (const nil)
+ (sexp :tag "unique" :format "unique\n" :value unique
+ :match (lambda (widget value) (memq value '(unique t))))
+ (const unsent)
+ (const standard)
+ (function :format "\n %{%t%}: %v")))
(defcustom message-kill-buffer-on-exit nil
"*Non-nil means that the message buffer will be killed after sending a message."
@@ -1622,7 +1642,8 @@ functionality to work."
(autoload 'rmail-output "rmailout")
(autoload 'gnus-delay-article "gnus-delay")
(autoload 'gnus-make-local-hook "gnus-util")
- (autoload 'gnus-extract-address-components "gnus-util"))
+ (autoload 'gnus-extract-address-components "gnus-util")
+ (autoload 'gnus-select-frame-set-input-focus "gnus-util"))
@@ -3325,12 +3346,16 @@ prefix, and don't delete any headers."
(delete-windows-on message-reply-buffer t)
(push-mark (save-excursion
(insert-buffer-substring message-reply-buffer)
+ (unless (bolp)
+ (insert ?\n))
(point)))
(unless arg
- (funcall message-cite-function))
- (message-exchange-point-and-mark)
- (unless (bolp)
- (insert ?\n))
+ (funcall message-cite-function)
+ (unless (eq (char-before (mark t)) ?\n)
+ (let ((pt (point)))
+ (goto-char (mark t))
+ (insert-before-markers ?\n)
+ (goto-char pt))))
(unless modified
(setq message-checksum (message-checksum))))))
@@ -5501,7 +5526,7 @@ between beginning of field and beginning of line."
"Return a new (unique) buffer name based on TYPE and TO."
(cond
;; Generate a new buffer name The Message Way.
- ((eq message-generate-new-buffers 'unique)
+ ((memq message-generate-new-buffers '(unique t))
(generate-new-buffer-name
(concat "*" type
(if to
@@ -5525,20 +5550,51 @@ between beginning of field and beginning of line."
"")
(if (and group (not (string= group ""))) (concat " on " group) "")
"*")))
- ;; Use standard name.
+ ;; Search for the existing message buffer with the specified name.
(t
- (format "*%s message*" type))))
+ (let* ((new (if (eq message-generate-new-buffers 'standard)
+ (generate-new-buffer-name (concat "*" type " message*"))
+ (let ((message-generate-new-buffers 'unique))
+ (message-buffer-name type to group))))
+ (regexp (concat "\\`"
+ (regexp-quote
+ (if (string-match "<[0-9]+>\\'" new)
+ (substring new 0 (match-beginning 0))
+ new))
+ "\\(?:<\\([0-9]+\\)>\\)?\\'"))
+ (case-fold-search nil))
+ (or (cdar
+ (last
+ (sort
+ (delq nil
+ (mapcar
+ (lambda (b)
+ (when (and (string-match regexp (setq b (buffer-name b)))
+ (eq (with-current-buffer b major-mode)
+ 'message-mode))
+ (cons (string-to-number (or (match-string 1 b) "1"))
+ b)))
+ (buffer-list)))
+ 'car-less-than-car)))
+ new)))))
(defun message-pop-to-buffer (name)
"Pop to buffer NAME, and warn if it already exists and is modified."
(let ((buffer (get-buffer name)))
(if (and buffer
(buffer-name buffer))
- (progn
- (set-buffer (pop-to-buffer buffer))
+ (let ((window (get-buffer-window buffer 0)))
+ (if window
+ ;; Raise the frame already displaying the message buffer.
+ (progn
+ (gnus-select-frame-set-input-focus (window-frame window))
+ (select-window window))
+ (set-buffer (pop-to-buffer buffer)))
(when (and (buffer-modified-p)
- (not (y-or-n-p
- "Message already being composed; erase? ")))
+ (not (prog1
+ (y-or-n-p
+ "Message already being composed; erase? ")
+ (message nil))))
(error "Message being composed")))
(set-buffer (pop-to-buffer name)))
(erase-buffer)
@@ -5598,7 +5654,8 @@ between beginning of field and beginning of line."
nil
mua)))
-(defun message-setup (headers &optional replybuffer actions switch-function)
+(defun message-setup (headers &optional replybuffer actions
+ continue switch-function)
(let ((mua (message-mail-user-agent))
subject to field yank-action)
(if (not (and message-this-is-mail mua))
@@ -5621,7 +5678,7 @@ between beginning of field and beginning of line."
(format "%s" (car item))
(cdr item)))
headers)
- nil switch-function yank-action actions)))))
+ continue switch-function yank-action actions)))))
(defun message-headers-to-generate (headers included-headers excluded-headers)
"Return a list that includes all headers from HEADERS.
@@ -5770,11 +5827,21 @@ are not included."
other-headers continue switch-function
yank-action send-actions)
"Start editing a mail message to be sent.
-OTHER-HEADERS is an alist of header/value pairs."
+OTHER-HEADERS is an alist of header/value pairs. CONTINUE says whether
+to continue editing a message already being composed. SWITCH-FUNCTION
+is a function used to switch to and display the mail buffer."
(interactive)
(let ((message-this-is-mail t) replybuffer)
(unless (message-mail-user-agent)
- (message-pop-to-buffer (message-buffer-name "mail" to)))
+ (funcall
+ (or switch-function 'message-pop-to-buffer)
+ ;; Search for the existing message buffer if `continue' is non-nil.
+ (let ((message-generate-new-buffers
+ (when (or (not continue)
+ (eq message-generate-new-buffers 'standard)
+ (functionp message-generate-new-buffers))
+ message-generate-new-buffers)))
+ (message-buffer-name "mail" to))))
;; FIXME: message-mail should do something if YANK-ACTION is not
;; insert-buffer.
(and (consp yank-action) (eq (car yank-action) 'insert-buffer)
@@ -5783,7 +5850,7 @@ OTHER-HEADERS is an alist of header/value pairs."
(nconc
`((To . ,(or to "")) (Subject . ,(or subject "")))
(when other-headers other-headers))
- replybuffer send-actions)
+ replybuffer send-actions continue switch-function)
;; FIXME: Should return nil if failure.
t))
@@ -6655,7 +6722,7 @@ you."
(message-pop-to-buffer (message-buffer-name "mail" to))))
(let ((message-this-is-mail t))
(message-setup `((To . ,(or to "")) (Subject . ,(or subject "")))
- nil nil 'switch-to-buffer-other-window)))
+ nil nil nil 'switch-to-buffer-other-window)))
;;;###autoload
(defun message-mail-other-frame (&optional to subject)
@@ -6670,7 +6737,7 @@ you."
(message-pop-to-buffer (message-buffer-name "mail" to))))
(let ((message-this-is-mail t))
(message-setup `((To . ,(or to "")) (Subject . ,(or subject "")))
- nil nil 'switch-to-buffer-other-frame)))
+ nil nil nil 'switch-to-buffer-other-frame)))
;;;###autoload
(defun message-news-other-window (&optional newsgroups subject)
diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el
index 736e58cd5a2..b080088b2ef 100644
--- a/lisp/gnus/nnmail.el
+++ b/lisp/gnus/nnmail.el
@@ -247,6 +247,10 @@ This variable is a list of mail source specifiers.
This variable is obsolete; `mail-sources' should be used instead."
:group 'nnmail-files
:type 'sexp)
+(make-obsolete-variable 'nnmail-spool-file
+ "This option is obsolete in Gnus 5.9. \
+Use `mail-sources' instead.")
+;; revision 5.29 / p0-85 / Gnus 5.9
(defcustom nnmail-resplit-incoming nil
"*If non-nil, re-split incoming procmail sorted mail."
@@ -1749,7 +1753,8 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
&optional group spool-func)
"Read new incoming mail."
(let* ((sources (or mail-sources
- (if (listp nnmail-spool-file) nnmail-spool-file
+ (if (listp nnmail-spool-file)
+ nnmail-spool-file
(list nnmail-spool-file))))
fetching-sources
(group-in group)
diff --git a/lisp/help.el b/lisp/help.el
index d0783dd0351..926c43c300d 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -642,7 +642,7 @@ temporarily enables it to allow getting help on disabled items and buttons."
(list
key
(prefix-numeric-value current-prefix-arg)
- ;; If KEY is a down-event, read and discard the
+ ;; If KEY is a down-event, read and include the
;; corresponding up-event. Note that there are also
;; down-events on scroll bars and mode lines: the actual
;; event then is in the second element of the vector.
diff --git a/lisp/ido.el b/lisp/ido.el
index 3eef048390e..80ed82c2583 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -1940,8 +1940,14 @@ If INITIAL is non-nil, it specifies the initial input string."
(if (and ido-matches (eq ido-try-merged-list 'auto))
(setq ido-try-merged-list t))
(let
- ((minibuffer-local-completion-map ido-completion-map)
- (minibuffer-local-filename-completion-map ido-completion-map)
+ ((minibuffer-local-completion-map
+ (if (memq ido-cur-item '(file dir))
+ minibuffer-local-completion-map
+ ido-completion-map))
+ (minibuffer-local-filename-completion-map
+ (if (memq ido-cur-item '(file dir))
+ ido-completion-map
+ minibuffer-local-filename-completion-map))
(max-mini-window-height (or ido-max-window-height
(and (boundp 'max-mini-window-height) max-mini-window-height)))
(ido-completing-read t)
diff --git a/lisp/info.el b/lisp/info.el
index ec2ff23b57e..6f9b1863ee4 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -145,7 +145,7 @@ The Lisp code is executed when the node is selected.")
:type 'boolean
:group 'info)
-(defcustom Info-fontify-maximum-menu-size 1000000
+(defcustom Info-fontify-maximum-menu-size 100000
"*Maximum size of menu to fontify if `font-lock-mode' is non-nil.
Set to nil to disable node fontification."
:type 'integer
@@ -1315,16 +1315,25 @@ any double quotes or backslashes must be escaped (\\\",\\\\)."
nil t)
(let* ((start (match-beginning 1))
(parameter-alist (Info-split-parameter-string (match-string 2)))
- (src (cdr (assoc-string "src" parameter-alist)))
- (image-file (if src (if (file-name-absolute-p src) src
- (concat default-directory src))
- ""))
- (image (if (file-exists-p image-file)
- (create-image image-file)
- "[broken image]")))
- (if (not (get-text-property start 'display))
- (add-text-properties
- start (point) `(display ,image rear-nonsticky (display)))))))
+ (src (cdr (assoc-string "src" parameter-alist))))
+ (if (display-images-p)
+ (let* ((image-file (if src (if (file-name-absolute-p src) src
+ (concat default-directory src))
+ ""))
+ (image (if (file-exists-p image-file)
+ (create-image image-file)
+ "[broken image]")))
+ (if (not (get-text-property start 'display))
+ (add-text-properties
+ start (point) `(display ,image rear-nonsticky (display)))))
+ ;; text-only display, show alternative text if provided, or
+ ;; otherwise a clue that there's meant to be a picture
+ (delete-region start (point))
+ (insert (or (cdr (assoc-string "text" parameter-alist))
+ (cdr (assoc-string "alt" parameter-alist))
+ (and src
+ (concat "[image:" src "]"))
+ "[image]"))))))
(set-buffer-modified-p nil)))
;; Texinfo 4.7 adds cookies of the form ^@^H[NAME CONTENTS ^@^H].
@@ -3235,7 +3244,6 @@ If FORK is non-nil, it i spassed to `Info-goto-node'."
(defvar info-tool-bar-map
(if (display-graphic-p)
(let ((map (make-sparse-keymap)))
- (tool-bar-local-item-from-menu 'Info-exit "close" map Info-mode-map)
(tool-bar-local-item-from-menu 'Info-history-back "left-arrow" map Info-mode-map)
(tool-bar-local-item-from-menu 'Info-history-forward "right-arrow" map Info-mode-map)
(tool-bar-local-item-from-menu 'Info-prev "prev-node" map Info-mode-map)
@@ -3245,6 +3253,7 @@ If FORK is non-nil, it i spassed to `Info-goto-node'."
(tool-bar-local-item-from-menu 'Info-goto-node "jump-to" map Info-mode-map)
(tool-bar-local-item-from-menu 'Info-index "index" map Info-mode-map)
(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)
map)))
(defvar Info-menu-last-node nil)
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index fc7b0276a0f..e873aadb8b4 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -392,6 +392,20 @@ code-point in CCS. Currently not supported and just ignored."
char))))))))
+;; Save the ASCII case table in case we need it later. Some locales
+;; (such as Turkish) modify the case behavior of ASCII characters,
+;; which can interfere with networking code that uses ASCII strings.
+
+(defvar ascii-case-table
+ ;; Code copied from copy-case-table to avoid requiring case-table.el
+ (let ((tbl (copy-sequence (standard-case-table)))
+ (up (char-table-extra-slot (standard-case-table) 0)))
+ (if up (set-char-table-extra-slot tbl 0 (copy-sequence up)))
+ (set-char-table-extra-slot tbl 1 nil)
+ (set-char-table-extra-slot tbl 2 nil)
+ tbl)
+ "Case table for the ASCII character set.")
+
;; Coding system stuff
;; Coding system is a symbol that has the property `coding-system'.
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 8c248dbc255..f246de141f4 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -531,8 +531,7 @@ Type \\[isearch-yank-char] to yank char from buffer onto end of search\
string and search for it.
Type \\[isearch-yank-line] to yank rest of line onto end of search string\
and search for it.
-Type \\[isearch-yank-kill] to yank last killed text onto end of search string\
- and search for it.
+Type \\[isearch-yank-kill] to yank the last string of killed text.
Type \\[isearch-quote-char] to quote control character to search for it.
\\[isearch-abort] while searching or when search has failed cancels input\
back to what has
diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el
index f9dac3493f1..3932fd83f52 100644
--- a/lisp/ldefs-boot.el
+++ b/lisp/ldefs-boot.el
@@ -4,7 +4,7 @@
;;;### (autoloads (5x5-crack 5x5-crack-xor-mutate 5x5-crack-mutating-best
;;;;;; 5x5-crack-mutating-current 5x5-crack-randomly 5x5) "5x5"
-;;;;;; "play/5x5.el" (17888 36936))
+;;;;;; "play/5x5.el" (17963 21010))
;;; Generated autoloads from play/5x5.el
(autoload (quote 5x5) "5x5" "\
@@ -852,7 +852,7 @@ Not documented
;;;***
;;;### (autoloads (animate-birthday-present animate-sequence animate-string)
-;;;;;; "animate" "play/animate.el" (17888 32280))
+;;;;;; "animate" "play/animate.el" (17963 21010))
;;; Generated autoloads from play/animate.el
(autoload (quote animate-string) "animate" "\
@@ -1611,7 +1611,7 @@ Calls `update-directory-autoloads' on the command line arguments.
;;;### (autoloads (global-auto-revert-mode turn-on-auto-revert-tail-mode
;;;;;; auto-revert-tail-mode turn-on-auto-revert-mode auto-revert-mode)
-;;;;;; "autorevert" "autorevert.el" (17963 19298))
+;;;;;; "autorevert" "autorevert.el" (17963 20867))
;;; Generated autoloads from autorevert.el
(autoload (quote auto-revert-mode) "autorevert" "\
@@ -2598,8 +2598,8 @@ name of buffer configuration.
;;;***
;;;### (autoloads (insert-text-button make-text-button insert-button
-;;;;;; make-button define-button-type) "button" "button.el" (17888
-;;;;;; 32278))
+;;;;;; make-button define-button-type) "button" "button.el" (17963
+;;;;;; 21008))
;;; Generated autoloads from button.el
(defvar button-map (let ((map (make-sparse-keymap))) (define-key map " " (quote push-button)) (define-key map [mouse-2] (quote push-button)) map) "\
@@ -2687,7 +2687,7 @@ Also see `make-text-button'.
;;;;;; batch-byte-compile-if-not-done display-call-tree byte-compile
;;;;;; compile-defun byte-compile-file byte-recompile-directory
;;;;;; byte-force-recompile byte-compile-warnings-safe-p) "bytecomp"
-;;;;;; "emacs-lisp/bytecomp.el" (17963 19282))
+;;;;;; "emacs-lisp/bytecomp.el" (17963 20998))
;;; 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)
@@ -2925,7 +2925,7 @@ See the documentation for `calculator-mode' for more information.
;;;;;; mark-holidays-in-calendar view-calendar-holidays-initially
;;;;;; calendar-remove-frame-by-deleting mark-diary-entries-in-calendar
;;;;;; view-diary-entries-initially calendar-offset) "calendar"
-;;;;;; "calendar/calendar.el" (17963 20580))
+;;;;;; "calendar/calendar.el" (17963 20998))
;;; Generated autoloads from calendar/calendar.el
(defvar calendar-offset 0 "\
@@ -3523,7 +3523,7 @@ it fails.
;;;***
;;;### (autoloads (c-guess-basic-syntax) "cc-engine" "progmodes/cc-engine.el"
-;;;;;; (17963 19063))
+;;;;;; (17963 20867))
;;; Generated autoloads from progmodes/cc-engine.el
(autoload (quote c-guess-basic-syntax) "cc-engine" "\
@@ -3535,7 +3535,7 @@ Return the syntactic context of the current line.
;;;### (autoloads (pike-mode idl-mode java-mode objc-mode c++-mode
;;;;;; c-mode c-initialize-cc-mode) "cc-mode" "progmodes/cc-mode.el"
-;;;;;; (17963 19063))
+;;;;;; (17963 20867))
;;; Generated autoloads from progmodes/cc-mode.el
(autoload (quote c-initialize-cc-mode) "cc-mode" "\
@@ -3751,7 +3751,7 @@ and exists only for compatibility reasons.
;;;***
-;;;### (autoloads nil "cc-vars" "progmodes/cc-vars.el" (17888 36581))
+;;;### (autoloads nil "cc-vars" "progmodes/cc-vars.el" (17963 21010))
;;; Generated autoloads from progmodes/cc-vars.el
(put 'c-basic-offset 'safe-local-variable 'integerp)
(put 'c-backslash-column 'safe-local-variable 'integerp)
@@ -4483,7 +4483,7 @@ read/written by MS-DOS software, or for display on the MS-DOS terminal.
;;;### (autoloads (comint-redirect-results-list-from-process comint-redirect-results-list
;;;;;; comint-redirect-send-command-to-process comint-redirect-send-command
;;;;;; comint-run make-comint make-comint-in-buffer) "comint" "comint.el"
-;;;;;; (17963 19298))
+;;;;;; (17963 21008))
;;; Generated autoloads from comint.el
(defvar comint-output-filter-functions (quote (comint-postoutput-scroll-to-bottom comint-watch-for-password-prompt)) "\
@@ -4573,8 +4573,8 @@ REGEXP-GROUP is the regular expression group in REGEXP to use.
;;;***
-;;;### (autoloads (compare-windows) "compare-w" "compare-w.el" (17888
-;;;;;; 32279))
+;;;### (autoloads (compare-windows) "compare-w" "compare-w.el" (17963
+;;;;;; 20867))
;;; Generated autoloads from compare-w.el
(autoload (quote compare-windows) "compare-w" "\
@@ -4611,7 +4611,7 @@ on third call it again advances points to the next difference and so on.
;;;;;; compilation-shell-minor-mode compilation-mode compilation-start
;;;;;; compile compilation-disable-input compile-command compilation-search-path
;;;;;; compilation-ask-about-save compilation-window-height compilation-mode-hook)
-;;;;;; "compile" "progmodes/compile.el" (17963 19298))
+;;;;;; "compile" "progmodes/compile.el" (17963 20998))
;;; Generated autoloads from progmodes/compile.el
(defvar compilation-mode-hook nil "\
@@ -4647,6 +4647,7 @@ describing how the process finished.")
Functions to call when a compilation process finishes.
Each function is called with two arguments: the compilation buffer,
and a string describing how the process finished.")
+(put 'compilation-directory 'safe-local-variable 'stringp)
(defvar compilation-ask-about-save t "\
*Non-nil means \\[compile] asks which buffers to save before compiling.
@@ -4773,7 +4774,7 @@ This is the value of `next-error-function' in Compilation buffers.
;;;***
;;;### (autoloads (partial-completion-mode) "complete" "complete.el"
-;;;;;; (17963 19063))
+;;;;;; (17963 21000))
;;; Generated autoloads from complete.el
(defvar partial-completion-mode nil "\
@@ -6751,7 +6752,7 @@ Not documented
;;;***
;;;### (autoloads (diary-mode diary-mail-entries diary) "diary-lib"
-;;;;;; "calendar/diary-lib.el" (17963 20580))
+;;;;;; "calendar/diary-lib.el" (17963 20998))
;;; Generated autoloads from calendar/diary-lib.el
(autoload (quote diary) "diary-lib" "\
@@ -6848,9 +6849,6 @@ You can also switch between context diff and unified diff with \\[diff-context->
or vice versa with \\[diff-unified->context] and you can also reverse the direction of
a diff with \\[diff-reverse-direction].
-When the buffer is read-only, the Meta- modifier is not necessary
-to run the Diff mode commands:
-
\\{diff-mode-map}
\(fn)" t nil)
@@ -7671,7 +7669,7 @@ for users who call this function in `.emacs'.
;;;***
;;;### (autoloads (dissociated-press) "dissociate" "play/dissociate.el"
-;;;;;; (17888 32280))
+;;;;;; (17963 21010))
;;; Generated autoloads from play/dissociate.el
(autoload (quote dissociated-press) "dissociate" "\
@@ -7732,7 +7730,7 @@ Locate SOA record and increment the serial field.
;;;***
-;;;### (autoloads (doctor) "doctor" "play/doctor.el" (17888 32280))
+;;;### (autoloads (doctor) "doctor" "play/doctor.el" (17963 21010))
;;; Generated autoloads from play/doctor.el
(autoload (quote doctor) "doctor" "\
@@ -8488,7 +8486,7 @@ With prefix arg NOCONFIRM, execute current line as-is without editing.
;;;### (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" (17963 19041))
+;;;;;; "emacs-lisp/edebug.el" (17963 20999))
;;; Generated autoloads from emacs-lisp/edebug.el
(defvar edebug-all-defs nil "\
@@ -9196,7 +9194,7 @@ Not documented
;;;***
;;;### (autoloads (erc-handle-irc-url erc erc-select-read-args) "erc"
-;;;;;; "erc/erc.el" (17888 32279))
+;;;;;; "erc/erc.el" (17963 21006))
;;; Generated autoloads from erc/erc.el
(autoload (quote erc-select-read-args) "erc" "\
@@ -9205,8 +9203,12 @@ Prompt the user for values of nick, server, port, and password.
\(fn)" nil nil)
(autoload (quote erc) "erc" "\
-Select connection parameters and run ERC.
-Non-interactively, it takes keyword arguments
+ERC is a powerful, modular, and extensible IRC client.
+This function is the main entry point for ERC.
+
+It permits you to select connection parameters, and then starts ERC.
+
+Non-interactively, it takes the keyword arguments
(server (erc-compute-server))
(port (erc-compute-port))
(nick (erc-compute-nick))
@@ -9217,12 +9219,14 @@ That is, if called with
(erc :server \"irc.freenode.net\" :full-name \"Harry S Truman\")
-server and full-name will be set to those values, whereas
+then the server and full-name will be set to those values, whereas
`erc-compute-port', `erc-compute-nick' and `erc-compute-full-name' will
be invoked for the values of the other parameters.
\(fn &key (SERVER (erc-compute-server)) (PORT (erc-compute-port)) (NICK (erc-compute-nick)) PASSWORD (FULL-NAME (erc-compute-full-name)))" t nil)
+(defalias (quote erc-select) (quote erc))
+
(autoload (quote erc-handle-irc-url) "erc" "\
Use ERC to IRC on HOST:PORT in CHANNEL as USER with PASSWORD.
If ERC is already connected to HOST:PORT, simply /join CHANNEL.
@@ -9232,26 +9236,26 @@ Otherwise, connect to HOST:PORT as USER and /join CHANNEL.
;;;***
-;;;### (autoloads nil "erc-autoaway" "erc/erc-autoaway.el" (17888
-;;;;;; 32279))
+;;;### (autoloads nil "erc-autoaway" "erc/erc-autoaway.el" (17963
+;;;;;; 21006))
;;; Generated autoloads from erc/erc-autoaway.el
(autoload 'erc-autoaway-mode "erc-autoaway")
;;;***
-;;;### (autoloads nil "erc-button" "erc/erc-button.el" (17888 32279))
+;;;### (autoloads nil "erc-button" "erc/erc-button.el" (17963 21006))
;;; Generated autoloads from erc/erc-button.el
(autoload 'erc-button-mode "erc-button" nil t)
;;;***
-;;;### (autoloads nil "erc-capab" "erc/erc-capab.el" (17888 32277))
+;;;### (autoloads nil "erc-capab" "erc/erc-capab.el" (17963 21006))
;;; Generated autoloads from erc/erc-capab.el
(autoload 'erc-capab-identify-mode "erc-capab" nil t)
;;;***
-;;;### (autoloads nil "erc-compat" "erc/erc-compat.el" (17888 32279))
+;;;### (autoloads nil "erc-compat" "erc/erc-compat.el" (17963 21006))
;;; Generated autoloads from erc/erc-compat.el
(autoload 'erc-define-minor-mode "erc-compat")
@@ -9352,8 +9356,8 @@ Add EZBouncer convenience functions to ERC.
;;;***
-;;;### (autoloads (erc-fill) "erc-fill" "erc/erc-fill.el" (17888
-;;;;;; 32279))
+;;;### (autoloads (erc-fill) "erc-fill" "erc/erc-fill.el" (17963
+;;;;;; 21006))
;;; Generated autoloads from erc/erc-fill.el
(autoload 'erc-fill-mode "erc-fill" nil t)
@@ -9373,7 +9377,7 @@ You can put this on `erc-insert-modify-hook' and/or `erc-send-modify-hook'.
;;;***
;;;### (autoloads (erc-identd-stop erc-identd-start) "erc-identd"
-;;;;;; "erc/erc-identd.el" (17888 32279))
+;;;;;; "erc/erc-identd.el" (17963 21006))
;;; Generated autoloads from erc/erc-identd.el
(autoload 'erc-identd-mode "erc-identd")
@@ -9412,7 +9416,7 @@ Not documented
;;;***
;;;### (autoloads (erc-save-buffer-in-logs erc-logging-enabled) "erc-log"
-;;;;;; "erc/erc-log.el" (17888 32279))
+;;;;;; "erc/erc-log.el" (17963 21006))
;;; Generated autoloads from erc/erc-log.el
(autoload 'erc-log-mode "erc-log" nil t)
@@ -9444,7 +9448,7 @@ You can save every individual message by putting this function on
;;;### (autoloads (erc-delete-dangerous-host erc-add-dangerous-host
;;;;;; erc-delete-keyword erc-add-keyword erc-delete-fool erc-add-fool
;;;;;; erc-delete-pal erc-add-pal) "erc-match" "erc/erc-match.el"
-;;;;;; (17888 32279))
+;;;;;; (17963 21006))
;;; Generated autoloads from erc/erc-match.el
(autoload 'erc-match-mode "erc-match")
@@ -9490,14 +9494,14 @@ Delete dangerous-host interactively to `erc-dangerous-hosts'.
;;;***
-;;;### (autoloads nil "erc-menu" "erc/erc-menu.el" (17888 32279))
+;;;### (autoloads nil "erc-menu" "erc/erc-menu.el" (17963 21006))
;;; Generated autoloads from erc/erc-menu.el
(autoload 'erc-menu-mode "erc-menu" nil t)
;;;***
;;;### (autoloads (erc-cmd-WHOLEFT) "erc-netsplit" "erc/erc-netsplit.el"
-;;;;;; (17888 32279))
+;;;;;; (17963 21006))
;;; Generated autoloads from erc/erc-netsplit.el
(autoload 'erc-netsplit-mode "erc-netsplit")
@@ -9509,7 +9513,7 @@ Show who's gone.
;;;***
;;;### (autoloads (erc-server-select erc-determine-network) "erc-networks"
-;;;;;; "erc/erc-networks.el" (17888 32279))
+;;;;;; "erc/erc-networks.el" (17963 21006))
;;; Generated autoloads from erc/erc-networks.el
(autoload (quote erc-determine-network) "erc-networks" "\
@@ -9527,7 +9531,7 @@ Interactively select a server to connect to using `erc-server-alist'.
;;;***
;;;### (autoloads (pcomplete/erc-mode/NOTIFY erc-cmd-NOTIFY) "erc-notify"
-;;;;;; "erc/erc-notify.el" (17888 32279))
+;;;;;; "erc/erc-notify.el" (17963 21006))
;;; Generated autoloads from erc/erc-notify.el
(autoload 'erc-notify-mode "erc-notify" nil t)
@@ -9551,8 +9555,8 @@ Not documented
;;;***
-;;;### (autoloads nil "erc-pcomplete" "erc/erc-pcomplete.el" (17888
-;;;;;; 32279))
+;;;### (autoloads nil "erc-pcomplete" "erc/erc-pcomplete.el" (17963
+;;;;;; 21006))
;;; Generated autoloads from erc/erc-pcomplete.el
(autoload 'erc-completion-mode "erc-pcomplete" nil t)
@@ -9564,14 +9568,14 @@ Not documented
;;;***
-;;;### (autoloads nil "erc-ring" "erc/erc-ring.el" (17888 32279))
+;;;### (autoloads nil "erc-ring" "erc/erc-ring.el" (17963 21006))
;;; Generated autoloads from erc/erc-ring.el
(autoload 'erc-ring-mode "erc-ring" nil t)
;;;***
;;;### (autoloads (erc-nickserv-identify erc-nickserv-identify-mode)
-;;;;;; "erc-services" "erc/erc-services.el" (17888 32279))
+;;;;;; "erc-services" "erc/erc-services.el" (17963 21006))
;;; Generated autoloads from erc/erc-services.el
(autoload 'erc-services-mode "erc-services" nil t)
@@ -9595,7 +9599,7 @@ When called interactively, read the password using `read-passwd'.
;;;***
;;;### (autoloads (erc-speedbar-browser) "erc-speedbar" "erc/erc-speedbar.el"
-;;;;;; (17888 32279))
+;;;;;; (17963 21006))
;;; Generated autoloads from erc/erc-speedbar.el
(autoload (quote erc-speedbar-browser) "erc-speedbar" "\
@@ -9606,23 +9610,39 @@ This will add a speedbar major display mode.
;;;***
-;;;### (autoloads nil "erc-spelling" "erc/erc-spelling.el" (17888
-;;;;;; 32279))
+;;;### (autoloads nil "erc-spelling" "erc/erc-spelling.el" (17963
+;;;;;; 21006))
;;; Generated autoloads from erc/erc-spelling.el
(autoload 'erc-spelling-mode "erc-spelling" nil t)
;;;***
-;;;### (autoloads nil "erc-stamp" "erc/erc-stamp.el" (17888 32279))
+;;;### (autoloads nil "erc-stamp" "erc/erc-stamp.el" (17963 21006))
;;; Generated autoloads from erc/erc-stamp.el
(autoload 'erc-timestamp-mode "erc-stamp" nil t)
;;;***
-;;;### (autoloads nil "erc-track" "erc/erc-track.el" (17888 32279))
+;;;### (autoloads (erc-track-minor-mode) "erc-track" "erc/erc-track.el"
+;;;;;; (17963 21006))
;;; Generated autoloads from erc/erc-track.el
+
+(defvar erc-track-minor-mode nil "\
+Non-nil if Erc-Track minor mode is enabled.
+See the command `erc-track-minor-mode' for a description of this minor-mode.")
+
+(custom-autoload (quote erc-track-minor-mode) "erc-track" nil)
+
+(autoload (quote erc-track-minor-mode) "erc-track" "\
+Global minor mode for tracking ERC buffers and showing activity in the
+mode line.
+
+This exists for the sole purpose of providing the C-c C-SPC and
+C-c C-@ keybindings. Make sure that you have enabled the track
+module, otherwise the keybindings will not do anything useful.
+
+\(fn &optional ARG)" t nil)
(autoload 'erc-track-mode "erc-track" nil t)
- (autoload 'erc-track-when-inactive-mode "erc-track" nil t)
;;;***
@@ -10344,8 +10364,8 @@ Edit the hotlist of directory servers in a specialized buffer.
;;;***
-;;;### (autoloads (ewoc-create) "ewoc" "emacs-lisp/ewoc.el" (17888
-;;;;;; 32279))
+;;;### (autoloads (ewoc-create) "ewoc" "emacs-lisp/ewoc.el" (17963
+;;;;;; 21003))
;;; Generated autoloads from emacs-lisp/ewoc.el
(autoload (quote ewoc-create) "ewoc" "\
@@ -10416,7 +10436,8 @@ file modes.
;;;***
;;;### (autoloads (expand-jump-to-next-slot expand-jump-to-previous-slot
-;;;;;; expand-add-abbrevs) "expand" "expand.el" (17888 32279))
+;;;;;; expand-abbrev-hook expand-add-abbrevs) "expand" "expand.el"
+;;;;;; (17963 20867))
;;; Generated autoloads from expand.el
(autoload (quote expand-add-abbrevs) "expand" "\
@@ -10443,6 +10464,12 @@ If ARG is omitted, point is placed at the end of the expanded text.
\(fn TABLE ABBREVS)" nil nil)
+(autoload (quote expand-abbrev-hook) "expand" "\
+Abbrev hook used to do the expansion job of expand abbrevs.
+See `expand-add-abbrevs'. Value is non-nil if expansion was done.
+
+\(fn)" nil nil)
+
(autoload (quote expand-jump-to-previous-slot) "expand" "\
Move the cursor to the previous slot in the last abbrev expansion.
This is used only in conjunction with `expand-add-abbrevs'.
@@ -11317,7 +11344,7 @@ Not documented
;;;***
;;;### (autoloads (flymake-mode-off flymake-mode-on flymake-mode)
-;;;;;; "flymake" "progmodes/flymake.el" (17888 36581))
+;;;;;; "flymake" "progmodes/flymake.el" (17963 21005))
;;; Generated autoloads from progmodes/flymake.el
(autoload (quote flymake-mode) "flymake" "\
@@ -11341,7 +11368,7 @@ Turn flymake mode off.
;;;### (autoloads (flyspell-buffer flyspell-region flyspell-mode-off
;;;;;; turn-off-flyspell turn-on-flyspell flyspell-mode flyspell-prog-mode)
-;;;;;; "flyspell" "textmodes/flyspell.el" (17888 32281))
+;;;;;; "flyspell" "textmodes/flyspell.el" (17963 20998))
;;; Generated autoloads from textmodes/flyspell.el
(autoload (quote flyspell-prog-mode) "flyspell" "\
@@ -11679,7 +11706,7 @@ and choose the directory as the fortune-file.
;;;***
;;;### (autoloads (gdb-enable-debug gdba) "gdb-ui" "progmodes/gdb-ui.el"
-;;;;;; (17963 18447))
+;;;;;; (17963 21011))
;;; Generated autoloads from progmodes/gdb-ui.el
(autoload (quote gdba) "gdb-ui" "\
@@ -11831,7 +11858,7 @@ at places they belong to.
;;;***
;;;### (autoloads (gmm-tool-bar-from-list gmm-widget-p gmm-error
-;;;;;; gmm-message) "gmm-utils" "gnus/gmm-utils.el" (17888 32279))
+;;;;;; gmm-message) "gmm-utils" "gnus/gmm-utils.el" (17963 21006))
;;; Generated autoloads from gnus/gmm-utils.el
(autoload (quote gmm-message) "gmm-utils" "\
@@ -11862,7 +11889,7 @@ Within each entry of ICON-LIST, the first element is a menu
command, the second element is an icon file name and the third
element is a test function. You can use \\[describe-key]
<menu-entry> to find out the name of a menu command. The fourth
-and all following elements are passed a the PROPS argument to the
+and all following elements are passed as the PROPS argument to the
function `tool-bar-local-item'.
If ZAP-LIST is a list, remove those item from the default
@@ -12022,7 +12049,7 @@ If CLEAN, obsolete (ignore).
;;;***
;;;### (autoloads (gnus-article-prepare-display) "gnus-art" "gnus/gnus-art.el"
-;;;;;; (17888 36581))
+;;;;;; (17963 21004))
;;; Generated autoloads from gnus/gnus-art.el
(autoload (quote gnus-article-prepare-display) "gnus-art" "\
@@ -12373,7 +12400,7 @@ Update the .newsrc.eld file to reflect the change of nntp server.
;;;***
;;;### (autoloads (gnus-button-reply gnus-button-mailto gnus-msg-mail)
-;;;;;; "gnus-msg" "gnus/gnus-msg.el" (17888 32279))
+;;;;;; "gnus-msg" "gnus/gnus-msg.el" (17963 21010))
;;; Generated autoloads from gnus/gnus-msg.el
(autoload (quote gnus-msg-mail) "gnus-msg" "\
@@ -12510,7 +12537,7 @@ Add NUM into sorted LIST by side effect.
;;;***
;;;### (autoloads (gnus-registry-install-hooks gnus-registry-initialize)
-;;;;;; "gnus-registry" "gnus/gnus-registry.el" (17888 32279))
+;;;;;; "gnus-registry" "gnus/gnus-registry.el" (17963 21006))
;;; Generated autoloads from gnus/gnus-registry.el
(autoload (quote gnus-registry-initialize) "gnus-registry" "\
@@ -12613,7 +12640,7 @@ Add the window configuration CONF to `gnus-buffer-configuration'.
;;;***
-;;;### (autoloads (gomoku) "gomoku" "play/gomoku.el" (17888 32280))
+;;;### (autoloads (gomoku) "gomoku" "play/gomoku.el" (17963 21010))
;;; Generated autoloads from play/gomoku.el
(autoload (quote gomoku) "gomoku" "\
@@ -12713,10 +12740,10 @@ The default find program for `grep-find-command'.
This variable's value takes effect when `grep-compute-defaults' is called.")
(defvar grep-find-use-xargs nil "\
-Whether \\[grep-find] uses the `xargs' utility by default.
-
-If `exec', it uses `find -exec'; if `gnu', it uses `find -print0' and `xargs -0';
-if not nil and not `gnu', it uses `find -print' and `xargs'.
+Non-nil means that `grep-find' uses the `xargs' utility by default.
+If `exec', use `find -exec'.
+If `gnu', use `find -print0' and `xargs -0'.
+Any other non-nil value means to use `find -print' and `xargs'.
This variable's value takes effect when `grep-compute-defaults' is called.")
@@ -12824,7 +12851,7 @@ the form \"WINDOW-ID PIXMAP-ID\". Value is non-nil if successful.
;;;***
;;;### (autoloads (gdb-script-mode jdb pdb perldb xdb dbx sdb gdb)
-;;;;;; "gud" "progmodes/gud.el" (17963 19063))
+;;;;;; "gud" "progmodes/gud.el" (17963 21011))
;;; Generated autoloads from progmodes/gud.el
(autoload (quote gdb) "gud" "\
@@ -13535,8 +13562,8 @@ how the hiding is done:
;;;***
-;;;### (autoloads (hs-minor-mode) "hideshow" "progmodes/hideshow.el"
-;;;;;; (17963 19041))
+;;;### (autoloads (turn-off-hideshow hs-minor-mode) "hideshow" "progmodes/hideshow.el"
+;;;;;; (17963 21006))
;;; Generated autoloads from progmodes/hideshow.el
(defvar hs-special-modes-alist (quote ((c-mode "{" "}" "/[*/]" nil hs-c-like-adjust-block-beginning) (c++-mode "{" "}" "/[*/]" nil hs-c-like-adjust-block-beginning) (bibtex-mode ("^@\\S(*\\(\\s(\\)" 1)) (java-mode "{" "}" "/[*/]" nil hs-c-like-adjust-block-beginning))) "\
@@ -13588,6 +13615,11 @@ Key bindings:
\(fn &optional ARG)" t nil)
+(autoload (quote turn-off-hideshow) "hideshow" "\
+Unconditionally turn off `hs-minor-mode'.
+
+\(fn)" nil nil)
+
;;;***
;;;### (autoloads (global-highlight-changes highlight-compare-with-file
@@ -14545,7 +14577,7 @@ with no args, if that value is non-nil.
;;;***
;;;### (autoloads (idlwave-shell) "idlw-shell" "progmodes/idlw-shell.el"
-;;;;;; (17888 37036))
+;;;;;; (17963 21008))
;;; Generated autoloads from progmodes/idlw-shell.el
(autoload (quote idlwave-shell) "idlw-shell" "\
@@ -14571,7 +14603,7 @@ See also the variable `idlwave-shell-prompt-pattern'.
;;;***
;;;### (autoloads (idlwave-mode) "idlwave" "progmodes/idlwave.el"
-;;;;;; (17888 36588))
+;;;;;; (17963 21008))
;;; Generated autoloads from progmodes/idlwave.el
(autoload (quote idlwave-mode) "idlwave" "\
@@ -14707,7 +14739,7 @@ The main features of this mode are
;;;;;; ido-find-file-in-dir ido-switch-buffer-other-frame ido-insert-buffer
;;;;;; ido-kill-buffer ido-display-buffer ido-switch-buffer-other-window
;;;;;; ido-switch-buffer ido-mode ido-mode) "ido" "ido.el" (17963
-;;;;;; 19298))
+;;;;;; 21001))
;;; Generated autoloads from ido.el
(defvar ido-mode nil "\
@@ -15501,7 +15533,7 @@ of `inferior-lisp-program'). Runs the hooks from
;;;### (autoloads (Info-speedbar-browser Info-goto-emacs-key-command-node
;;;;;; Info-goto-emacs-command-node Info-mode info-apropos Info-index
;;;;;; Info-directory Info-on-current-buffer info-standalone info-emacs-manual
-;;;;;; info info-other-window) "info" "info.el" (17888 36929))
+;;;;;; info info-other-window) "info" "info.el" (17963 21008))
;;; Generated autoloads from info.el
(autoload (quote info-other-window) "info" "\
@@ -16612,7 +16644,7 @@ Not documented
;;;***
;;;### (autoloads (lm lm-test-run) "landmark" "play/landmark.el"
-;;;;;; (17888 32280))
+;;;;;; (17963 21010))
;;; Generated autoloads from play/landmark.el
(defalias (quote landmark-repeat) (quote lm-test-run))
@@ -17148,8 +17180,8 @@ This function is suitable for execution in a .emacs file.
;;;***
-;;;### (autoloads (m4-mode) "m4-mode" "progmodes/m4-mode.el" (17888
-;;;;;; 32281))
+;;;### (autoloads (m4-mode) "m4-mode" "progmodes/m4-mode.el" (17963
+;;;;;; 20866))
;;; Generated autoloads from progmodes/m4-mode.el
(autoload (quote m4-mode) "m4-mode" "\
@@ -17593,7 +17625,7 @@ Previous contents of that buffer are killed first.
;;;***
-;;;### (autoloads (man-follow man) "man" "man.el" (17888 32280))
+;;;### (autoloads (man-follow man) "man" "man.el" (17963 20867))
;;; Generated autoloads from man.el
(defalias (quote manual-entry) (quote man))
@@ -17678,7 +17710,7 @@ turn on menu bars; otherwise, turn off menu bars.
;;;;;; message-cite-function message-yank-prefix message-citation-line-function
;;;;;; message-send-mail-function message-user-organization-file
;;;;;; message-signature-separator message-from-style) "message"
-;;;;;; "gnus/message.el" (17963 18449))
+;;;;;; "gnus/message.el" (17963 20999))
;;; Generated autoloads from gnus/message.el
(defvar message-from-style (quote default) "\
@@ -17816,7 +17848,9 @@ M-RET `message-newline-and-reformat' (break the line and reformat).
(autoload (quote message-mail) "message" "\
Start editing a mail message to be sent.
-OTHER-HEADERS is an alist of header/value pairs.
+OTHER-HEADERS is an alist of header/value pairs. CONTINUE says whether
+to continue editing a message already being composed. SWITCH-FUNCTION
+is a function used to switch to and display the mail buffer.
\(fn &optional TO SUBJECT OTHER-HEADERS CONTINUE SWITCH-FUNCTION YANK-ACTION SEND-ACTIONS)" t nil)
@@ -18976,7 +19010,7 @@ Open a network connection to HOST on PORT.
;;;;;; uncomment-region comment-kill comment-set-column comment-indent
;;;;;; comment-indent-default comment-normalize-vars comment-multi-line
;;;;;; comment-padding comment-style comment-column) "newcomment"
-;;;;;; "newcomment.el" (17888 32280))
+;;;;;; "newcomment.el" (17963 21008))
;;; Generated autoloads from newcomment.el
(defalias (quote indent-for-comment) (quote comment-indent))
@@ -19507,7 +19541,7 @@ The Custom feature is intended to make this obsolete.
;;;;;; org-remember-handler org-remember org-remember-apply-template
;;;;;; org-remember-annotation org-store-link orgtbl-mode turn-on-orgtbl
;;;;;; org-global-cycle org-cycle org-mode) "org" "textmodes/org.el"
-;;;;;; (17963 19299))
+;;;;;; (17963 20865))
;;; Generated autoloads from textmodes/org.el
(autoload (quote org-mode) "org" "\
@@ -21663,7 +21697,7 @@ If EXTENSION is any other symbol, it is ignored.
;;;***
;;;### (autoloads (jython-mode python-mode run-python) "python" "progmodes/python.el"
-;;;;;; (17963 19313))
+;;;;;; (17963 20999))
;;; Generated autoloads from progmodes/python.el
(add-to-list (quote interpreter-mode-alist) (quote ("jython" . jython-mode)))
@@ -22122,7 +22156,7 @@ Construct a regexp interactively.
;;;***
-;;;### (autoloads (recentf-mode) "recentf" "recentf.el" (17888 32281))
+;;;### (autoloads (recentf-mode) "recentf" "recentf.el" (17963 20999))
;;; Generated autoloads from recentf.el
(defvar recentf-mode nil "\
@@ -22295,7 +22329,7 @@ refilling if they would cause auto-filling.
;;;***
;;;### (autoloads (reftex-reset-scanning-information reftex-mode
-;;;;;; turn-on-reftex) "reftex" "textmodes/reftex.el" (17888 32281))
+;;;;;; turn-on-reftex) "reftex" "textmodes/reftex.el" (17963 20865))
;;; Generated autoloads from textmodes/reftex.el
(autoload (quote turn-on-reftex) "reftex" "\
@@ -22345,7 +22379,7 @@ This enforces rescanning the buffer on next use.
;;;***
;;;### (autoloads (reftex-citation) "reftex-cite" "textmodes/reftex-cite.el"
-;;;;;; (17888 32281))
+;;;;;; (17963 20865))
;;; Generated autoloads from textmodes/reftex-cite.el
(autoload (quote reftex-citation) "reftex-cite" "\
@@ -22375,7 +22409,7 @@ While entering the regexp, completion on knows citation keys is possible.
;;;***
;;;### (autoloads (reftex-isearch-minor-mode) "reftex-global" "textmodes/reftex-global.el"
-;;;;;; (17888 32281))
+;;;;;; (17963 20865))
;;; Generated autoloads from textmodes/reftex-global.el
(autoload (quote reftex-isearch-minor-mode) "reftex-global" "\
@@ -22392,7 +22426,7 @@ With no argument, this command toggles
;;;***
;;;### (autoloads (reftex-index-phrases-mode) "reftex-index" "textmodes/reftex-index.el"
-;;;;;; (17888 32281))
+;;;;;; (17963 20865))
;;; Generated autoloads from textmodes/reftex-index.el
(autoload (quote reftex-index-phrases-mode) "reftex-index" "\
@@ -22425,7 +22459,7 @@ Here are all local bindings.
;;;***
;;;### (autoloads (reftex-all-document-files) "reftex-parse" "textmodes/reftex-parse.el"
-;;;;;; (17888 32281))
+;;;;;; (17963 20865))
;;; Generated autoloads from textmodes/reftex-parse.el
(autoload (quote reftex-all-document-files) "reftex-parse" "\
@@ -22437,8 +22471,8 @@ of master file.
;;;***
-;;;### (autoloads nil "reftex-vars" "textmodes/reftex-vars.el" (17888
-;;;;;; 32281))
+;;;### (autoloads nil "reftex-vars" "textmodes/reftex-vars.el" (17963
+;;;;;; 20865))
;;; Generated autoloads from textmodes/reftex-vars.el
(put 'reftex-vref-is-default 'safe-local-variable (lambda (x) (or (stringp x) (symbolp x))))
(put 'reftex-fref-is-default 'safe-local-variable (lambda (x) (or (stringp x) (symbolp x))))
@@ -22666,7 +22700,7 @@ variable.
;;;;;; rmail-highlight-face rmail-highlighted-headers rmail-retry-ignored-headers
;;;;;; rmail-displayed-headers rmail-ignored-headers rmail-dont-reply-to-names
;;;;;; rmail-movemail-variant-p) "rmail" "mail/rmail.el" (17963
-;;;;;; 18438))
+;;;;;; 21010))
;;; Generated autoloads from mail/rmail.el
(autoload (quote rmail-movemail-variant-p) "rmail" "\
@@ -23961,16 +23995,16 @@ Like Text Mode but with these additional commands:
\\[mail-send-and-exit] mail-send-and-exit (send the message and exit)
Here are commands that move to a header field (and create it if there isn't):
- \\[mail-to] move to To: \\[mail-subject] move to Subject:
- \\[mail-cc] move to CC: \\[mail-bcc] move to BCC:
+ \\[mail-to] move to To: \\[mail-subject] move to Subj:
+ \\[mail-bcc] move to BCC: \\[mail-cc] move to CC:
\\[mail-fcc] move to FCC: \\[mail-reply-to] move to Reply-To:
\\[mail-mail-reply-to] move to Mail-Reply-To:
\\[mail-mail-followup-to] move to Mail-Followup-To:
-\\[mail-text] mail-text (move to beginning of message text).
+\\[mail-text] move to message text.
\\[mail-signature] mail-signature (insert `mail-signature-file' file).
\\[mail-yank-original] mail-yank-original (insert current message, in Rmail).
\\[mail-fill-yanked-message] mail-fill-yanked-message (fill what was yanked).
-\\[mail-sent-via] mail-sent-via (add a Sent-via field for each To or CC).
+\\[mail-sent-via] mail-sent-via (add a sent-via field for each To or CC).
Turning on Mail mode runs the normal hooks `text-mode-hook' and
`mail-mode-hook' (in that order).
@@ -24445,7 +24479,7 @@ Turning on Sieve mode runs `sieve-mode-hook'.
;;;***
-;;;### (autoloads nil "simple" "simple.el" (17963 19313))
+;;;### (autoloads nil "simple" "simple.el" (17963 21011))
;;; Generated autoloads from simple.el
(put 'fill-prefix 'safe-local-variable 'string-or-null-p)
@@ -24648,7 +24682,7 @@ interactively. If there's no argument, do it at the current buffer
;;;***
;;;### (autoloads (smtpmail-send-queued-mail smtpmail-send-it) "smtpmail"
-;;;;;; "mail/smtpmail.el" (17888 36928))
+;;;;;; "mail/smtpmail.el" (17963 21010))
;;; Generated autoloads from mail/smtpmail.el
(autoload (quote smtpmail-send-it) "smtpmail" "\
@@ -25708,7 +25742,7 @@ Studlify-case the current buffer.
;;;***
-;;;### (autoloads (locate-library) "subr" "subr.el" (17963 19313))
+;;;### (autoloads (locate-library) "subr" "subr.el" (17963 21011))
;;; Generated autoloads from subr.el
(autoload (quote locate-library) "subr" "\
@@ -25762,7 +25796,7 @@ before, and `sc-post-hook' is run after the guts of this function.
;;;***
-;;;### (autoloads (t-mouse-mode) "t-mouse" "t-mouse.el" (17963 19313))
+;;;### (autoloads (t-mouse-mode) "t-mouse" "t-mouse.el" (17963 21011))
;;; Generated autoloads from t-mouse.el
(defvar t-mouse-mode nil "\
@@ -26591,7 +26625,7 @@ subprocess started.
;;;***
;;;### (autoloads (testcover-this-defun) "testcover" "emacs-lisp/testcover.el"
-;;;;;; (17888 32279))
+;;;;;; (17963 20867))
;;; Generated autoloads from emacs-lisp/testcover.el
(autoload (quote testcover-this-defun) "testcover" "\
@@ -26601,7 +26635,7 @@ Start coverage on function under point.
;;;***
-;;;### (autoloads (tetris) "tetris" "play/tetris.el" (17963 18455))
+;;;### (autoloads (tetris) "tetris" "play/tetris.el" (17963 21010))
;;; Generated autoloads from play/tetris.el
(autoload (quote tetris) "tetris" "\
@@ -27577,7 +27611,7 @@ relative only to the time worked today, and not to past time.
;;;### (autoloads (with-timeout run-with-idle-timer add-timeout run-with-timer
;;;;;; run-at-time cancel-function-timers cancel-timer) "timer"
-;;;;;; "emacs-lisp/timer.el" (17888 32279))
+;;;;;; "emacs-lisp/timer.el" (17963 21006))
;;; Generated autoloads from emacs-lisp/timer.el
(defalias (quote disable-timeout) (quote cancel-timer))
@@ -27597,11 +27631,16 @@ and idle timers such as are scheduled by `run-with-idle-timer'.
(autoload (quote run-at-time) "timer" "\
Perform an action at time TIME.
Repeat the action every REPEAT seconds, if REPEAT is non-nil.
-TIME should be a string like \"11:23pm\", nil meaning now, a number of seconds
-from now, a value from `current-time', or t (with non-nil REPEAT)
-meaning the next integral multiple of REPEAT.
-REPEAT may be an integer or floating point number.
-The action is to call FUNCTION with arguments ARGS.
+TIME should be one of: a string giving an absolute time like
+\"11:23pm\" (the acceptable formats are those recognized by
+`diary-entry-time'; note that such times are interpreted as times
+today, even if in the past); a string giving a relative time like
+\"2 hours 35 minutes\" (the acceptable formats are those
+recognized by `timer-duration'); nil meaning now; a number of
+seconds from now; a value from `encode-time'; or t (with non-nil
+REPEAT) meaning the next integral multiple of REPEAT. REPEAT may
+be an integer or floating point number. The action is to call
+FUNCTION with arguments ARGS.
This function returns a timer object which you can use in `cancel-timer'.
@@ -27700,7 +27739,7 @@ PATTERN regexp.
;;;***
;;;### (autoloads (tmm-prompt tmm-menubar-mouse tmm-menubar) "tmm"
-;;;;;; "tmm.el" (17888 32281))
+;;;;;; "tmm.el" (17963 21011))
;;; Generated autoloads from tmm.el
(define-key global-map "\M-`" 'tmm-menubar)
(define-key global-map [menu-bar mouse-1] 'tmm-menubar-mouse)
@@ -27972,7 +28011,7 @@ BUFFER defaults to `trace-buffer'.
;;;### (autoloads (tramp-unload-tramp tramp-completion-handle-file-name-completion
;;;;;; tramp-completion-handle-file-name-all-completions tramp-unload-file-name-handlers
;;;;;; tramp-file-name-handler tramp-completion-file-name-regexp
-;;;;;; tramp-file-name-regexp) "tramp" "net/tramp.el" (17963 19047))
+;;;;;; tramp-file-name-regexp) "tramp" "net/tramp.el" (17963 21006))
;;; Generated autoloads from net/tramp.el
(defvar tramp-unified-filenames (not (featurep (quote xemacs))) "\
@@ -28056,11 +28095,15 @@ Falls back to normal file name handler if no tramp file name handler exists.
Invoke tramp file name completion handler.
Falls back to normal file name handler if no tramp file name handler exists." (let ((fn (assoc operation tramp-completion-file-name-handler-alist))) (if fn (save-match-data (apply (cdr fn) args)) (tramp-completion-run-real-handler operation args))))
-(defsubst tramp-register-file-name-handlers nil "\
-Add tramp file name handlers to `file-name-handler-alist'." (add-to-list (quote file-name-handler-alist) (cons tramp-file-name-regexp (quote tramp-file-name-handler))) (when (or (not (boundp (quote partial-completion-mode))) (symbol-value (quote partial-completion-mode)) (featurep (quote ido))) (add-to-list (quote file-name-handler-alist) (cons tramp-completion-file-name-regexp (quote tramp-completion-file-name-handler))) (put (quote tramp-completion-file-name-handler) (quote safe-magic) t)) (let ((jka (rassoc (quote jka-compr-handler) file-name-handler-alist))) (when jka (setq file-name-handler-alist (cons jka (delete jka file-name-handler-alist))))))
+(defsubst tramp-register-file-name-handler nil "\
+Add tramp file name handler to `file-name-handler-alist'." (add-to-list (quote file-name-handler-alist) (cons tramp-file-name-regexp (quote tramp-file-name-handler))) (let ((jka (rassoc (quote jka-compr-handler) file-name-handler-alist))) (when jka (setq file-name-handler-alist (cons jka (delete jka file-name-handler-alist))))))
+
+(defsubst tramp-register-completion-file-name-handler nil "\
+Add tramp completion file name handler to `file-name-handler-alist'." (when (or (not (boundp (quote partial-completion-mode))) (symbol-value (quote partial-completion-mode)) (featurep (quote ido))) (add-to-list (quote file-name-handler-alist) (cons tramp-completion-file-name-regexp (quote tramp-completion-file-name-handler))) (put (quote tramp-completion-file-name-handler) (quote safe-magic) t)) (let ((jka (rassoc (quote jka-compr-handler) file-name-handler-alist))) (when jka (setq file-name-handler-alist (cons jka (delete jka file-name-handler-alist))))))
+(tramp-register-file-name-handler)
(add-hook
'after-init-hook
- '(lambda () (tramp-register-file-name-handlers)))
+ '(lambda () (tramp-register-completion-file-name-handler)))
(autoload (quote tramp-unload-file-name-handlers) "tramp" "\
Not documented
@@ -28774,7 +28817,7 @@ Not documented
;;;***
;;;### (autoloads (url-http-options url-http-file-attributes url-http-file-exists-p
-;;;;;; url-http) "url-http" "url/url-http.el" (17888 36646))
+;;;;;; url-http) "url-http" "url/url-http.el" (17963 21008))
;;; Generated autoloads from url/url-http.el
(autoload (quote url-http) "url-http" "\
@@ -29487,7 +29530,7 @@ colors. `vc-annotate-background' specifies the background color.
;;;***
-;;;### (autoloads nil "vc-arch" "vc-arch.el" (17888 32281))
+;;;### (autoloads nil "vc-arch" "vc-arch.el" (17963 20999))
;;; Generated autoloads from vc-arch.el
(defun vc-arch-registered (file)
(if (vc-find-root file "{arch}/=tagging-method")
@@ -29518,7 +29561,7 @@ colors. `vc-annotate-background' specifies the background color.
;;;***
;;;### (autoloads (vc-rcs-master-templates) "vc-rcs" "vc-rcs.el"
-;;;;;; (17888 32281))
+;;;;;; (17963 20867))
;;; Generated autoloads from vc-rcs.el
(defvar vc-rcs-master-templates (quote ("%sRCS/%s,v" "%s%s,v" "%sRCS/%s")) "\
@@ -30208,8 +30251,8 @@ Not documented
;;;### (autoloads (View-exit-and-edit view-mode-enter view-mode view-buffer-other-frame
;;;;;; view-buffer-other-window view-buffer view-file-other-frame
-;;;;;; view-file-other-window view-file) "view" "view.el" (17888
-;;;;;; 32281))
+;;;;;; view-file-other-window view-file) "view" "view.el" (17963
+;;;;;; 20999))
;;; Generated autoloads from view.el
(defvar view-mode nil "\
@@ -30372,7 +30415,7 @@ p searches backward for last regular expression.
\\[View-leave] quit View mode and maybe switch buffers, but don't kill this buffer.
\\[View-kill-and-leave] quit View mode, kill current buffer and go back to other buffer.
-The effect of \\[View-leave] , \\[View-quit] and \\[View-kill-and-leave] depends on how view-mode was entered. If it was
+The effect of \\[View-leave], \\[View-quit] and \\[View-kill-and-leave] depends on how view-mode was entered. If it was
entered by view-file, view-file-other-window, view-file-other-frame, or
\\[dired-view-file] (\\[view-file], \\[view-file-other-window],
\\[view-file-other-frame], or the Dired mode v command),
@@ -30380,7 +30423,7 @@ then \\[View-quit] will try to kill the current buffer.
If view-mode was entered from another buffer, by \\[view-buffer],
\\[view-buffer-other-window], \\[view-buffer-other frame], \\[view-file],
\\[view-file-other-window], or \\[view-file-other-frame],
-then \\[View-leave] , \\[View-quit] and \\[View-kill-and-leave] will return to that buffer.
+then \\[View-leave], \\[View-quit] and \\[View-kill-and-leave] will return to that buffer.
Entry to view-mode runs the normal hook `view-mode-hook'.
@@ -30435,7 +30478,7 @@ Turn on VIP emulation of VI.
;;;***
;;;### (autoloads (viper-mode toggle-viper-mode) "viper" "emulation/viper.el"
-;;;;;; (17888 32279))
+;;;;;; (17963 20865))
;;; Generated autoloads from emulation/viper.el
(autoload (quote toggle-viper-mode) "viper" "\
@@ -30452,7 +30495,7 @@ Turn on Viper emulation of Vi in Emacs. See Info node `(viper)Top'.
;;;***
;;;### (autoloads (warn lwarn display-warning) "warnings" "emacs-lisp/warnings.el"
-;;;;;; (17888 32279))
+;;;;;; (17963 21006))
;;; Generated autoloads from emacs-lisp/warnings.el
(defvar warning-prefix-function nil "\
@@ -30499,8 +30542,9 @@ Default is :warning.
but raise suspicion of a possible problem.
:debug -- info for debugging only.
-BUFFER-NAME, if specified, is the name of the buffer for logging the
-warning. By default, it is `*Warnings*'.
+BUFFER-NAME, if specified, is the name of the buffer for logging
+the warning. By default, it is `*Warnings*'. If this function
+has to create the buffer, it disables undo in the buffer.
See the `warnings' custom group for user customization features.
@@ -30607,7 +30651,7 @@ and off otherwise.
;;;;;; whitespace-buffer whitespace-toggle-ateol-check whitespace-toggle-spacetab-check
;;;;;; whitespace-toggle-indent-check whitespace-toggle-trailing-check
;;;;;; whitespace-toggle-leading-check) "whitespace" "whitespace.el"
-;;;;;; (17888 32281))
+;;;;;; (17963 20867))
;;; Generated autoloads from whitespace.el
(autoload (quote whitespace-toggle-leading-check) "whitespace" "\
@@ -30843,7 +30887,7 @@ With arg, turn Winner mode on if and only if arg is positive.
;;;***
;;;### (autoloads (woman-find-file woman-dired-find-file woman) "woman"
-;;;;;; "woman.el" (17963 19299))
+;;;;;; "woman.el" (17963 21006))
;;; Generated autoloads from woman.el
(autoload (quote woman) "woman" "\
@@ -31017,8 +31061,8 @@ If PARSE-NS is non-nil, then QNAMES are expanded.
;;;***
-;;;### (autoloads (xterm-mouse-mode) "xt-mouse" "xt-mouse.el" (17888
-;;;;;; 32281))
+;;;### (autoloads (xterm-mouse-mode) "xt-mouse" "xt-mouse.el" (17963
+;;;;;; 21011))
;;; Generated autoloads from xt-mouse.el
(defvar xterm-mouse-mode nil "\
@@ -31088,7 +31132,7 @@ Zippy goes to the analyst.
;;;***
-;;;### (autoloads (zone) "zone" "play/zone.el" (17888 32281))
+;;;### (autoloads (zone) "zone" "play/zone.el" (17963 21010))
;;; Generated autoloads from play/zone.el
(autoload (quote zone) "zone" "\
@@ -31228,7 +31272,7 @@ Zone out, completely.
;;;;;; "url/url-vars.el" "url/vc-dav.el" "vc-hooks.el" "vcursor.el"
;;;;;; "version.el" "vms-patch.el" "vmsproc.el" "vt-control.el"
;;;;;; "vt100-led.el" "w32-fns.el" "w32-vars.el" "widget.el" "window.el"
-;;;;;; "x-dnd.el") (17963 20717 345010))
+;;;;;; "x-dnd.el") (17963 21179 886390))
;;;***
diff --git a/lisp/loadhist.el b/lisp/loadhist.el
index 39d51a280f5..84a865573af 100644
--- a/lisp/loadhist.el
+++ b/lisp/loadhist.el
@@ -111,17 +111,18 @@ A library name is equivalent to the file name that `load-library' would load."
(setq dependents (cons (car x) dependents))))
dependents))
-(defun read-feature (prompt)
- "Read a feature name \(string\) from the minibuffer.
-Prompt with PROMPT and completing from `features', and
-return the feature \(symbol\)."
- (intern (completing-read prompt
- (mapcar (lambda (feature)
- (list (symbol-name feature)))
- features)
- ;; Complete only features loaded from a file
- #'(lambda (f) (feature-file (intern (car f))))
- t)))
+(defun read-feature (prompt &optional loaded-p)
+ "Read feature name from the minibuffer, prompting with string PROMPT.
+If optional second arg LOADED-P is non-nil, the feature must be loaded
+from a file."
+ (intern
+ (completing-read prompt
+ (cons nil features)
+ (and loaded-p
+ #'(lambda (f)
+ (and f ; ignore nil
+ (feature-file f))))
+ loaded-p)))
(defvaralias 'loadhist-hook-functions 'unload-feature-special-hooks)
(defvar unload-feature-special-hooks
@@ -162,7 +163,10 @@ the package's feature list (before anything is unbound) in the
variable `unload-hook-features-list' and could remove features from it
in the event that the package has done something normally-ill-advised,
such as redefining an Emacs function."
- (interactive (list (read-feature "Feature: ") current-prefix-arg))
+ (interactive
+ (list
+ (read-feature "Unload feature: " t)
+ current-prefix-arg))
(unless (featurep feature)
(error "%s is not a currently loaded feature" (symbol-name feature)))
(unless force
diff --git a/lisp/mail/footnote.el b/lisp/mail/footnote.el
index 2dd2e7af175..7992438df25 100644
--- a/lisp/mail/footnote.el
+++ b/lisp/mail/footnote.el
@@ -267,14 +267,17 @@ Wrapping around the alphabet implies successive repetitions of letters."
;; Latin-1
-(defconst footnote-latin-regexp "¹²³ºª§¶"
+(defconst footnote-latin-string "¹²³ºª§¶"
+ "String of Latin-1 footnoting characters.")
+
+(defconst footnote-latin-regexp (concat "[" footnote-latin-string "]")
"Regexp for Latin-1 footnoting characters.")
(defun Footnote-latin (n)
"Latin-1 footnote style.
Use a range of Latin-1 non-ASCII characters for footnoting."
- (string (aref footnote-latin-regexp
- (mod (1- n) (length footnote-latin-regexp)))))
+ (string (aref footnote-latin-string
+ (mod (1- n) (length footnote-latin-string)))))
;;; list of all footnote styles
(defvar footnote-style-alist
@@ -291,14 +294,18 @@ See footnote-han.el, footnote-greek.el and footnote-hebrew.el for more
exciting styles.")
(defcustom footnote-style 'numeric
- "*Style used for footnoting.
+ "*Default style used for footnoting.
numeric == 1, 2, 3, ...
english-lower == a, b, c, ...
english-upper == A, B, C, ...
roman-lower == i, ii, iii, iv, v, ...
roman-upper == I, II, III, IV, V, ...
latin == ¹ ² ³ º ª § ¶
-See also variables `footnote-start-tag' and `footnote-end-tag'."
+See also variables `footnote-start-tag' and `footnote-end-tag'.
+
+Customizing this variable has no effect on buffers already
+displaying footnotes. You can change the style of existing
+buffers using the command `Footnote-set-style'."
:type (cons 'choice (mapcar (lambda (x) (list 'const (car x)))
footnote-style-alist))
:group 'footnote)
@@ -654,7 +661,7 @@ delete the footnote with that number."
(while (< i notes)
(setq alist-ptr (nth i footnote-pointer-marker-alist))
(setq alist-txt (nth i footnote-text-marker-alist))
- (unless (eq (1+ i) (car alist-ptr))
+ (unless (= (1+ i) (car alist-ptr))
(Footnote-renumber (car alist-ptr) (1+ i) alist-ptr alist-txt))
(setq i (1+ i))))))
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 5e534b2d47d..bfdd5048877 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -1959,9 +1959,13 @@ is non-nil if the user has supplied the password interactively.
(base64-header-field-end
(save-excursion
(goto-char start)
- (re-search-forward
- "^content-transfer-encoding:\\(\n?[\t ]\\)*base64\\(\n?[\t ]\\)*"
- header-end t))))
+ (and (re-search-forward
+ "^content-transfer-encoding:\\(\n?[\t ]\\)*base64\\(\n?[\t ]\\)*"
+ header-end t)
+ ;; Don't try to decode non-text data.
+ (re-search-forward
+ "^content-type:\\(\n?[\t ]\\)\\(text\\|message\\)/"
+ header-end t)))))
(if quoted-printable-header-field-end
(save-excursion
(unless
@@ -2061,10 +2065,16 @@ is non-nil if the user has supplied the password interactively.
"^content-transfer-encoding:\\(\n?[\t ]\\)*quoted-printable\\(\n?[\t ]\\)*"
header-end t)))
(base64-header-field-end
- (save-excursion
- (re-search-forward
- "^content-transfer-encoding:\\(\n?[\t ]\\)*base64\\(\n?[\t ]\\)*"
- header-end t)))
+ (and
+ (save-excursion
+ (re-search-forward
+ "^content-transfer-encoding:\\(\n?[\t ]\\)*base64\\(\n?[\t ]\\)*"
+ header-end t))
+ ;; Don't decode non-text data.
+ (save-excursion
+ (re-search-forward
+ "^content-type:\\(\n?[\t ]\\)\\(text\\|message\\)/"
+ header-end t))))
(size
;; Get the numeric value from the Content-Length field.
(save-excursion
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 2bb1a6ed0fa..c0fcdf8ff43 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -620,16 +620,16 @@ Like Text Mode but with these additional commands:
\\[mail-send-and-exit] mail-send-and-exit (send the message and exit)
Here are commands that move to a header field (and create it if there isn't):
- \\[mail-to] move to To: \\[mail-subject] move to Subject:
- \\[mail-cc] move to CC: \\[mail-bcc] move to BCC:
+ \\[mail-to] move to To: \\[mail-subject] move to Subj:
+ \\[mail-bcc] move to BCC: \\[mail-cc] move to CC:
\\[mail-fcc] move to FCC: \\[mail-reply-to] move to Reply-To:
\\[mail-mail-reply-to] move to Mail-Reply-To:
\\[mail-mail-followup-to] move to Mail-Followup-To:
-\\[mail-text] mail-text (move to beginning of message text).
+\\[mail-text] move to message text.
\\[mail-signature] mail-signature (insert `mail-signature-file' file).
\\[mail-yank-original] mail-yank-original (insert current message, in Rmail).
\\[mail-fill-yanked-message] mail-fill-yanked-message (fill what was yanked).
-\\[mail-sent-via] mail-sent-via (add a Sent-via field for each To or CC).
+\\[mail-sent-via] mail-sent-via (add a sent-via field for each To or CC).
Turning on Mail mode runs the normal hooks `text-mode-hook' and
`mail-mode-hook' (in that order)."
(make-local-variable 'mail-reply-action)
@@ -1392,7 +1392,7 @@ Create a Mail-Followup-To field if none."
nil)))
(defun mail-text ()
- "Move point to beginning of message text."
+ "Move point to beginning of text field."
(interactive)
(expand-abbrev)
(goto-char (mail-text-start)))
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index e1e742a1d72..66c4bdd8df7 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -691,20 +691,22 @@ This is relative to `smtpmail-queue-dir'.")
(>= (car response-code) 400))
(throw 'done nil)))
(dolist (line (cdr (cdr response-code)))
- (let ((name (mapcar (lambda (s) (intern (downcase s)))
- (split-string (substring line 4) "[ ]"))))
+ (let ((name
+ (with-case-table ascii-case-table
+ (mapcar (lambda (s) (intern (downcase s)))
+ (split-string (substring line 4) "[ ]")))))
(and (eq (length name) 1)
(setq name (car name)))
- (and name
+ (and name
(cond ((memq (if (consp name) (car name) name)
'(verb xvrb 8bitmime onex xone
- expn size dsn etrn
- enhancedstatuscodes
- help xusr
- auth=login auth starttls))
- (setq supported-extensions
- (cons name supported-extensions)))
- (smtpmail-warn-about-unknown-extensions
+ expn size dsn etrn
+ enhancedstatuscodes
+ help xusr
+ auth=login auth starttls))
+ (setq supported-extensions
+ (cons name supported-extensions)))
+ (smtpmail-warn-about-unknown-extensions
(message "Unknown extension %s" name)))))))
(if (and do-starttls
diff --git a/lisp/man.el b/lisp/man.el
index a6aced25e3d..0484c032e34 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -628,7 +628,14 @@ a new value."
(setq Man-support-local-filenames
(with-temp-buffer
(and (equal (condition-case nil
- (call-process manual-program nil t nil "--help")
+ (let ((default-directory
+ ;; Assure that `default-directory' exists
+ ;; and is readable.
+ (if (and (file-directory-p default-directory)
+ (file-readable-p default-directory))
+ default-directory
+ (expand-file-name "~/"))))
+ (call-process manual-program nil t nil "--help"))
(error nil))
0)
(progn
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 9595fb941f1..023e5286815 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -1201,8 +1201,8 @@ mail status in mode line"))
'(menu-item "Compile..." compile
:help "Invoke compiler or Make, view compilation errors"))
(define-key menu-bar-tools-menu [grep]
- '(menu-item "Search Files (with grep)..." grep
- :help "Search files for strings or regexps (with grep)"))
+ '(menu-item "Search Files (Grep)..." grep
+ :help "Search files for strings or regexps (with Grep)"))
;; The "Help" menu items
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 8e9d931c15c..94d19d99a21 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -1521,7 +1521,11 @@ This must be bound to a mouse drag event."
(with-current-buffer (window-buffer (posn-window posn))
(if (numberp (posn-point posn))
(setq beg (posn-point posn)))
- (move-overlay mouse-secondary-overlay beg (posn-point end)))))
+ (move-overlay mouse-secondary-overlay beg (posn-point end))
+ (x-set-selection
+ 'SECONDARY
+ (buffer-substring (overlay-start mouse-secondary-overlay)
+ (overlay-end mouse-secondary-overlay))))))
(defun mouse-drag-secondary (start-event)
"Set the secondary selection to the text that the mouse is dragged over.
diff --git a/lisp/net/tls.el b/lisp/net/tls.el
index 9de74ca19d4..cdbb7bef5a7 100644
--- a/lisp/net/tls.el
+++ b/lisp/net/tls.el
@@ -125,12 +125,17 @@ BUFFER is the buffer (or buffer-name) to associate with the process.
with any buffer
Third arg is name of the host to connect to, or its IP address.
Fourth arg PORT is an integer specifying a port to connect to."
- (let ((cmds tls-program) cmd done)
+ (let ((cmds tls-program)
+ (use-temp-buffer (null buffer))
+ process cmd done)
+ (if use-temp-buffer
+ (setq buffer (generate-new-buffer " TLS")))
(message "Opening TLS connection to `%s'..." host)
(while (and (not done) (setq cmd (pop cmds)))
(message "Opening TLS connection with `%s'..." cmd)
- (let* ((process-connection-type tls-process-connection-type)
- (process (start-process
+ (let ((process-connection-type tls-process-connection-type)
+ response)
+ (setq process (start-process
name buffer shell-file-name shell-command-switch
(format-spec
cmd
@@ -139,7 +144,6 @@ Fourth arg PORT is an integer specifying a port to connect to."
?p (if (integerp port)
(int-to-string port)
port)))))
- response)
(while (and process
(memq (process-status process) '(open run))
(save-excursion
@@ -155,6 +159,9 @@ Fourth arg PORT is an integer specifying a port to connect to."
(delete-process process))))
(message "Opening TLS connection to `%s'...%s"
host (if done "done" "failed"))
+ (when use-temp-buffer
+ (if done (set-process-buffer process nil))
+ (kill-buffer buffer))
done))
(provide 'tls)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 7ff9b2d956b..20ac73d0f75 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -4422,10 +4422,20 @@ Falls back to normal file name handler if no tramp file name handler exists."
(tramp-completion-run-real-handler operation args)))))
;;;###autoload
-(defsubst tramp-register-file-name-handlers ()
- "Add tramp file name handlers to `file-name-handler-alist'."
+(defsubst tramp-register-file-name-handler ()
+ "Add tramp file name handler to `file-name-handler-alist'."
(add-to-list 'file-name-handler-alist
(cons tramp-file-name-regexp 'tramp-file-name-handler))
+ ;; If jka-compr is already loaded, move it to the front of
+ ;; `file-name-handler-alist'.
+ (let ((jka (rassoc 'jka-compr-handler file-name-handler-alist)))
+ (when jka
+ (setq file-name-handler-alist
+ (cons jka (delete jka file-name-handler-alist))))))
+
+;;;###autoload
+(defsubst tramp-register-completion-file-name-handler ()
+ "Add tramp completion file name handler to `file-name-handler-alist'."
;; `partial-completion-mode' is unknown in XEmacs. So we should
;; load it unconditionally there. In the GNU Emacs case, method/
;; user/host name completion shall be bound to `partial-completion-mode'.
@@ -4443,13 +4453,18 @@ Falls back to normal file name handler if no tramp file name handler exists."
(setq file-name-handler-alist
(cons jka (delete jka file-name-handler-alist))))))
+;; `tramp-file-name-handler' must be registered before evaluation of
+;; site-start and init files, because there might exist remote files
+;; already, f.e. files kept via recentf-mode.
+;;;###autoload(tramp-register-file-name-handler)
;; During autoload, it shall be checked whether
-;; `partial-completion-mode' is active. Therefore registering will be
-;; delayed.
+;; `partial-completion-mode' is active. Therefore registering of
+;; `tramp-completion-file-name-handler' will be delayed.
;;;###autoload(add-hook
;;;###autoload 'after-init-hook
-;;;###autoload '(lambda () (tramp-register-file-name-handlers)))
-(tramp-register-file-name-handlers)
+;;;###autoload '(lambda () (tramp-register-completion-file-name-handler)))
+(tramp-register-file-name-handler)
+(tramp-register-completion-file-name-handler)
;;;###autoload
(defun tramp-unload-file-name-handlers ()
diff --git a/lisp/newcomment.el b/lisp/newcomment.el
index 7fce0f7bde8..b0a166465fa 100644
--- a/lisp/newcomment.el
+++ b/lisp/newcomment.el
@@ -391,7 +391,9 @@ and raises an error or returns nil if NOERROR is non-nil."
pt (or limit (point-max)) nil nil
(list nil nil nil (nth 3 s) nil nil nil nil)
t)))
- (if (not (and (nth 8 s) (not (nth 3 s))))
+ (if (or (not (and (nth 8 s) (not (nth 3 s))))
+ ;; Make sure the comment starts after PT.
+ (< (nth 8 s) pt))
(unless noerror (error "No comment"))
;; We found the comment.
(let ((pos (point))
diff --git a/lisp/outline.el b/lisp/outline.el
index 579997754f2..d0c121a12c4 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -1000,7 +1000,8 @@ Stop at the first and last subheadings of a superior heading."
(error "No following same-level heading"))))))
(defun outline-get-next-sibling ()
- "Move to next heading of the same level, and return point or nil if none."
+ "Move to next heading of the same level, and return point.
+If there is no such heading, return nil."
(let ((level (funcall outline-level)))
(outline-next-visible-heading 1)
(while (and (not (eobp)) (> (funcall outline-level) level))
@@ -1026,15 +1027,18 @@ Stop at the first and last subheadings of a superior heading."
(error "No previous same-level heading"))))))
(defun outline-get-last-sibling ()
- "Move to previous heading of the same level, and return point or nil if none."
- (let ((level (funcall outline-level)))
+ "Move to previous heading of the same level, and return point.
+If there is no such heading, return nil."
+ (let ((opoint (point))
+ (level (funcall outline-level)))
(outline-previous-visible-heading 1)
- (while (and (> (funcall outline-level) level)
- (not (bobp)))
- (outline-previous-visible-heading 1))
- (if (< (funcall outline-level) level)
- nil
- (point))))
+ (when (and (/= (point) opoint) (outline-on-heading-p))
+ (while (and (> (funcall outline-level) level)
+ (not (bobp)))
+ (outline-previous-visible-heading 1))
+ (if (< (funcall outline-level) level)
+ nil
+ (point)))))
(defun outline-headers-as-kill (beg end)
"Save the visible outline headers in region at the start of the kill ring.
diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el
index c4840059f64..c1da9fb9132 100644
--- a/lisp/pcomplete.el
+++ b/lisp/pcomplete.el
@@ -33,7 +33,6 @@
;; To use pcomplete with shell-mode, for example, you will need the
;; following in your .emacs file:
;;
-;; (load "pcmpl-auto")
;; (add-hook 'shell-mode-hook 'pcomplete-shell-setup)
;;
;; Most of the code below simply provides support mechanisms for
@@ -947,10 +946,9 @@ generate the completions list. This means that the hook
(unless (fboundp 'event-matches-key-specifier-p)
(defalias 'event-matches-key-specifier-p 'eq))
-(if (fboundp 'read-event)
- (defsubst pcomplete-read-event (&optional prompt)
- (read-event prompt))
- (defsubst pcomplete-read-event (&optional prompt)
+(defun pcomplete-read-event (&optional prompt)
+ (if (fboundp 'read-event)
+ (read-event prompt)
(aref (read-key-sequence prompt) 0)))
(unless (fboundp 'event-basic-type)
diff --git a/lisp/play/5x5.el b/lisp/play/5x5.el
index 5dad84fadc5..5cf0c37fb62 100644
--- a/lisp/play/5x5.el
+++ b/lisp/play/5x5.el
@@ -519,6 +519,8 @@ in progress because it is an animated attempt."
(y-or-n-p prompt)
t))
+(random t)
+
(provide '5x5)
;;; arch-tag: ec4dabd5-572d-41ea-b48c-ec5ce0d68fa9
diff --git a/lisp/play/animate.el b/lisp/play/animate.el
index 9bad228315a..9d180a5f338 100644
--- a/lisp/play/animate.el
+++ b/lisp/play/animate.el
@@ -189,5 +189,9 @@ You can specify the one's name by NAME; the default value is \"Sarah\"."
(animate-string "my sunshine" 18 34)
(animate-string "to stay!" 19 34))
+(random t)
+
+(provide 'animate)
+
;;; arch-tag: 275289a3-6ac4-41da-b527-a1147045392f
;;; animate.el ends here
diff --git a/lisp/play/dissociate.el b/lisp/play/dissociate.el
index 8f88bdb9788..1c0e89e7c7d 100644
--- a/lisp/play/dissociate.el
+++ b/lisp/play/dissociate.el
@@ -99,6 +99,8 @@ Default is 2."
(funcall search-function overlap opoint t))))))
(sit-for 0))))
+(random t)
+
(provide 'dissociate)
;;; arch-tag: 90d197d1-409b-45c5-a0b5-fbfb2e06334f
diff --git a/lisp/play/doctor.el b/lisp/play/doctor.el
index cd88b9cb315..4c3cc5b4ce8 100644
--- a/lisp/play/doctor.el
+++ b/lisp/play/doctor.el
@@ -1657,6 +1657,8 @@ Hack on previous word, setting global variable OWNER to correct result."
(defun doctor-chat () (doctor-type (doc$ chatlst)))
+(random t)
+
(provide 'doctor)
;; arch-tag: 579380f6-4902-4ea5-bccb-6339e30e1257
diff --git a/lisp/play/gomoku.el b/lisp/play/gomoku.el
index c05a46b90f6..8c04f254a0b 100644
--- a/lisp/play/gomoku.el
+++ b/lisp/play/gomoku.el
@@ -1209,6 +1209,8 @@ If the game is finished, this command requests for another game."
(move-to-column (+ gomoku-x-offset
(* gomoku-square-width (1- gomoku-board-width)))))
+(random t)
+
(provide 'gomoku)
;;; arch-tag: b1b8205e-77fc-4597-b373-3ea2c04311eb
diff --git a/lisp/play/landmark.el b/lisp/play/landmark.el
index 4fe126fec0a..e8d0b21f47d 100644
--- a/lisp/play/landmark.el
+++ b/lisp/play/landmark.el
@@ -1705,6 +1705,8 @@ Use \\[describe-mode] for more info."
;;;allout-layout: (0 : -1 -1 0)
;;;End:
+(random t)
+
(provide 'landmark)
;;; arch-tag: ae5031be-96e6-459e-a3df-1df53117d3f2
diff --git a/lisp/play/tetris.el b/lisp/play/tetris.el
index f1901a129dd..11f6364e609 100644
--- a/lisp/play/tetris.el
+++ b/lisp/play/tetris.el
@@ -652,6 +652,8 @@ tetris-mode keybindings:
(tetris-mode)
(tetris-start-game))
+(random t)
+
(provide 'tetris)
;;; arch-tag: fb780d53-3ff0-49f0-8e19-f7f13cf2d49e
diff --git a/lisp/play/zone.el b/lisp/play/zone.el
index 05f73b8030a..256a316c3cf 100644
--- a/lisp/play/zone.el
+++ b/lisp/play/zone.el
@@ -692,6 +692,7 @@ If nil, `zone-pgm-random-life' chooses a value from 0-3 (inclusive).")
(life (or zone-pgm-random-life-wait (random 4)))
(kill-buffer nil))))
+(random t)
;;;;;;;;;;;;;;;
(provide 'zone)
diff --git a/lisp/progmodes/cc-awk.el b/lisp/progmodes/cc-awk.el
index b0c15bff903..b3e0e381135 100644
--- a/lisp/progmodes/cc-awk.el
+++ b/lisp/progmodes/cc-awk.el
@@ -988,6 +988,7 @@ nor helpful.
Note that this function might do hidden buffer changes. See the
comment at the start of cc-engine.el for more info."
(interactive "p")
+ (or arg (setq arg 1))
(save-match-data
(c-save-buffer-state ; ensures the buffer is writable.
nil
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el
index 4f9e1947738..79043c87b63 100644
--- a/lisp/progmodes/cc-cmds.el
+++ b/lisp/progmodes/cc-cmds.el
@@ -1262,11 +1262,11 @@ newline cleanups are done if appropriate; see the variable `c-cleanup-list'."
(backward-char)
(skip-chars-backward " \t")
(setq beg (point))
- (c-save-buffer-state () (c-on-identifier))
- ;; Don't add a space into #define FOO()....
- (not (and (c-beginning-of-macro)
- (c-forward-over-cpp-define-id)
- (eq (point) beg)))))
+ (and (c-save-buffer-state () (c-on-identifier))
+ ;; Don't add a space into #define FOO()....
+ (not (and (c-beginning-of-macro)
+ (c-forward-over-cpp-define-id)
+ (eq (point) beg))))))
(save-excursion
(delete-region beg end)
(goto-char beg)
@@ -1477,9 +1477,7 @@ No indentation or other \"electric\" behavior is performed."
(c-syntactic-re-search-forward "{")
(backward-char)
(setq n (1- n)))
- (;; (or (eq where 'at-header) (eq where 'outwith-function)
-;; (eq where 'at-function-end) (eq where 'in-trailer))
- (memq where '(at-header outwith-function at-function-end in-trailer))
+ ((memq where '(at-header outwith-function at-function-end in-trailer))
(c-syntactic-skip-backward "^}")
(when (eq (char-before) ?\})
(backward-sexp)
@@ -1513,7 +1511,8 @@ defun."
(or arg (setq arg 1))
(c-save-buffer-state
- ((start (point))
+ (beginning-of-defun-function end-of-defun-function
+ (start (point))
where paren-state pos)
;; Move back out of any macro/comment/string we happen to be in.
@@ -1526,8 +1525,7 @@ defun."
(if (< arg 0)
;; Move forward to the closing brace of a function.
(progn
- (if ;; (or (eq where 'at-function-end) (eq where 'outwith-function))
- (memq where '(at-function-end outwith-function))
+ (if (memq where '(at-function-end outwith-function))
(setq arg (1+ arg)))
(if (< arg 0)
(setq arg (c-forward-to-nth-EOF-} (- arg) where)))
@@ -1587,13 +1585,11 @@ defun."
((eq where 'in-trailer)
(c-syntactic-skip-backward "^}")
(setq n (1- n)))
- (;; (or (eq where 'at-function-end) (eq where 'outwith-function)
-;; (eq where 'at-header) (eq where 'in-header))
- (memq where '(at-function-end outwith-function at-header in-header))
- (c-syntactic-re-search-forward "{")
- (backward-char)
- (forward-sexp)
- (setq n (1- n)))
+ ((memq where '(at-function-end outwith-function at-header in-header))
+ (when (c-syntactic-re-search-forward "{" nil 'eob)
+ (backward-char)
+ (forward-sexp)
+ (setq n (1- n))))
(t (error "c-forward-to-nth-EOF-}: `where' is %s" where)))
;; Each time round the loop, go forward to a "}" at the outermost level.
@@ -1618,7 +1614,8 @@ the open-parenthesis that starts a defun; see `beginning-of-defun'."
(or arg (setq arg 1))
(c-save-buffer-state
- ((start (point))
+ (beginning-of-defun-function end-of-defun-function
+ (start (point))
where paren-state pos)
;; Move back out of any macro/comment/string we happen to be in.
@@ -1631,15 +1628,12 @@ the open-parenthesis that starts a defun; see `beginning-of-defun'."
(if (< arg 0)
;; Move backwards to the } of a function
(progn
- (if ;; (or (eq where 'at-header) (eq where 'outwith-function))
- (memq where '(at-header outwith-function))
+ (if (memq where '(at-header outwith-function))
(setq arg (1+ arg)))
(if (< arg 0)
(setq arg (c-backward-to-nth-BOF-{ (- arg) where)))
- (when (and (= arg 0)
- (c-syntactic-skip-backward "^}")
- (eq (char-before) ?\}))
- t))
+ (if (= arg 0)
+ (c-syntactic-skip-backward "^}")))
;; Move forward to the } of a function
(if (> arg 0)
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el
index 43fa0ab5937..8c10df649de 100644
--- a/lisp/progmodes/cc-defs.el
+++ b/lisp/progmodes/cc-defs.el
@@ -74,12 +74,12 @@
; (eval-after-load "font-lock" ; 2006-07-09. font-lock is now preloaded
; '
(if (and (not (featurep 'cc-fix)) ; only load the file once.
- (featurep 'xemacs) ; There is now (2005/12) code in GNU Emacs CVS
- ; to make the call to f-l-c-k throw an error.
- (let (font-lock-keywords)
- (font-lock-compile-keywords '("\\<\\>"))
- font-lock-keywords)) ; did the previous call foul this up?
- (load "cc-fix")) ;)
+ (featurep 'xemacs) ; There is now (2005/12) code in GNU Emacs CVS
+ ; to make the call to f-l-c-k throw an error.
+ (let (font-lock-keywords)
+ (font-lock-compile-keywords '("\\<\\>"))
+ font-lock-keywords)) ; did the previous call foul this up?
+ (load "cc-fix")) ;)
;; The above takes care of the delayed loading, but this is necessary
;; to ensure correct byte compilation.
@@ -708,7 +708,8 @@ be after it."
;; c-parse-state to between 3 and 60 times faster when
;; braces are hung. It can also degrade performance by
;; about as much when braces are not hung.
- '(let (pos)
+ '(let (beginning-of-defun-function end-of-defun-function
+ pos)
(while (not pos)
(save-restriction
(widen)
@@ -731,7 +732,8 @@ be after it."
))
(goto-char pos)))
;; Emacs, which doesn't have buffer-syntactic-context-depth
- (beginning-of-defun))
+ (let (beginning-of-defun-function end-of-defun-function)
+ (beginning-of-defun)))
;; if defun-prompt-regexp is non-nil, b-o-d won't leave us at the
;; open brace.
(and defun-prompt-regexp
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index a901ee07454..717016af7ea 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -1917,9 +1917,8 @@ comment at the start of cc-engine.el for more info."
;; Is the region (beg end) WS, and is there WS (or BOB/EOB) next to the
;; region? This is a "heuristic" function. .....
;;
- ;; The motivation for the second bit is to check whether the removal of this
- ;; space is to check whether removing this region would coalesce two
- ;; symbols.
+ ;; The motivation for the second bit is to check whether removing this
+ ;; region would coalesce two symbols.
;;
;; FIXME!!! This function doesn't check virtual semicolons in any way. Be
;; careful about using this function for, e.g. AWK. (2007/3/7)
@@ -5372,7 +5371,7 @@ comment at the start of cc-engine.el for more info."
;; True if there's a prefix match outside the outermost
;; paren pair that surrounds the declarator.
got-prefix-before-parens
-y ;; True if there's a suffix match outside the outermost
+ ;; True if there's a suffix match outside the outermost
;; paren pair that surrounds the declarator. The value is
;; the position of the first suffix match.
got-suffix-after-parens
@@ -5878,19 +5877,23 @@ y ;; True if there's a suffix match outside the outermost
(defun c-forward-label (&optional assume-markup preceding-token-end limit)
;; Assuming that point is at the beginning of a token, check if it starts a
- ;; label and if so move over it and return t, otherwise don't move and
- ;; return nil. "Label" here means "most things with a colon".
+ ;; label and if so move over it and return non-nil (t in default situations,
+ ;; specific symbols (see below) for interesting situations), otherwise don't
+ ;; move and return nil. "Label" here means "most things with a colon".
;;
;; More precisely, a "label" is regarded as one of:
- ;; (i) a goto target like "foo:";
- ;; (ii) A case label - either the entire construct "case FOO:" or just the
- ;; bare "case", should the colon be missing;
- ;; (iii) a keyword which needs a colon, like "default:" or "private:";
+ ;; (i) a goto target like "foo:" - returns the symbol `goto-target';
+ ;; (ii) A case label - either the entire construct "case FOO:", or just the
+ ;; bare "case", should the colon be missing. We return t;
+ ;; (iii) a keyword which needs a colon, like "default:" or "private:"; We
+ ;; return t;
;; (iv) One of QT's "extended" C++ variants of
- ;; "private:"/"protected:"/"public:"/"more:" looking like "public slots:".
+ ;; "private:"/"protected:"/"public:"/"more:" looking like "public slots:".
+ ;; Returns the symbol `qt-2kwds-colon'.
+ ;; (v) QT's construct "signals:". Returns the symbol `qt-1kwd-colon'.
;; (v) One of the keywords matched by `c-opt-extra-label-key' (without any
;; colon). Currently (2006-03), this applies only to Objective C's
- ;; keywords "@private", "@protected", and "@public".
+ ;; keywords "@private", "@protected", and "@public". Returns t.
;;
;; One of the things which will NOT be recognised as a label is a bit-field
;; element of a struct, something like "int foo:5".
@@ -5919,8 +5922,10 @@ y ;; True if there's a suffix match outside the outermost
;; This function might do hidden buffer changes.
(let ((start (point))
+ label-end
qt-symbol-idx
- macro-start) ; if we're in one.
+ macro-start ; if we're in one.
+ label-type)
(cond
;; "case" or "default" (Doesn't apply to AWK).
((looking-at c-label-kwds-regexp)
@@ -5933,25 +5938,26 @@ y ;; True if there's a suffix match outside the outermost
;; Find the label end.
(goto-char kwd-end)
- (if (and (c-syntactic-re-search-forward
- ;; Stop on chars that aren't allowed in expressions,
- ;; and on operator chars that would be meaningless
- ;; there. FIXME: This doesn't cope with ?: operators.
- "[;{=,@]\\|\\(\\=\\|[^:]\\):\\([^:]\\|\\'\\)"
- limit t t nil 1)
- (match-beginning 2))
-
- (progn
- (goto-char (match-beginning 2)) ; just after the :
- (c-put-c-type-property (1- (point)) 'c-decl-end)
- t)
-
- ;; It's an unfinished label. We consider the keyword enough
- ;; to recognize it as a label, so that it gets fontified.
- ;; Leave the point at the end of it, but don't put any
- ;; `c-decl-end' marker.
- (goto-char kwd-end)
- t)))
+ (setq label-type
+ (if (and (c-syntactic-re-search-forward
+ ;; Stop on chars that aren't allowed in expressions,
+ ;; and on operator chars that would be meaningless
+ ;; there. FIXME: This doesn't cope with ?: operators.
+ "[;{=,@]\\|\\(\\=\\|[^:]\\):\\([^:]\\|\\'\\)"
+ limit t t nil 1)
+ (match-beginning 2))
+
+ (progn ; there's a proper :
+ (goto-char (match-beginning 2)) ; just after the :
+ (c-put-c-type-property (1- (point)) 'c-decl-end)
+ t)
+
+ ;; It's an unfinished label. We consider the keyword enough
+ ;; to recognize it as a label, so that it gets fontified.
+ ;; Leave the point at the end of it, but don't put any
+ ;; `c-decl-end' marker.
+ (goto-char kwd-end)
+ t))))
;; @private, @protected, @public, in Objective C, or similar.
((and c-opt-extra-label-key
@@ -5963,7 +5969,7 @@ y ;; True if there's a suffix match outside the outermost
(when c-record-type-identifiers
(c-record-ref-id (cons (match-beginning 1) (point))))
(c-put-c-type-property (1- (point)) 'c-decl-end)
- t)
+ (setq label-type t))
;; All other cases of labels.
((and c-recognize-colon-labels ; nil for AWK and IDL, otherwise t.
@@ -6039,26 +6045,49 @@ y ;; True if there's a suffix match outside the outermost
(c-forward-syntactic-ws)
(c-forward-label nil pte start))))))))))
+ ;; Point is still at the beginning of the possible label construct.
+ ;;
;; Check that the next nonsymbol token is ":", or that we're in one
;; of QT's "slots" declarations. Allow '(' for the sake of macro
;; arguments. FIXME: Should build this regexp from the language
;; constants.
- (when (c-syntactic-re-search-forward
- "[ \t[:?;{=*/%&|,<>!@+-]" limit t t) ; not at EOB
- (backward-char)
- (setq qt-symbol-idx
- (and (c-major-mode-is 'c++-mode)
- (string-match
- "\\(p\\(r\\(ivate\\|otected\\)\\|ublic\\)\\|more\\)\\>"
- (buffer-substring start (point)))))
- (c-forward-syntactic-ws limit)
- (when (or (looking-at ":\\([^:]\\|\\'\\)") ; A single colon.
- (and qt-symbol-idx
- (search-forward-regexp "\\=slots\\>" limit t)
- (progn (c-forward-syntactic-ws limit)
- (looking-at ":\\([^:]\\|\\'\\)")))) ; A single colon
- (forward-char) ; to after the colon.
- t)))
+ (cond
+ ;; public: protected: private:
+ ((and
+ (c-major-mode-is 'c++-mode)
+ (search-forward-regexp
+ "\\=p\\(r\\(ivate\\|otected\\)\\|ublic\\)\\>[^_]" nil t)
+ (progn (backward-char)
+ (c-forward-syntactic-ws limit)
+ (looking-at ":\\([^:]\\|\\'\\)"))) ; A single colon.
+ (forward-char)
+ (setq label-type t))
+ ;; QT double keyword like "protected slots:" or goto target.
+ ((progn (goto-char start) nil))
+ ((when (c-syntactic-re-search-forward
+ "[ \t\n[:?;{=*/%&|,<>!@+-]" limit t t) ; not at EOB
+ (backward-char)
+ (setq label-end (point))
+ (setq qt-symbol-idx
+ (and (c-major-mode-is 'c++-mode)
+ (string-match
+ "\\(p\\(r\\(ivate\\|otected\\)\\|ublic\\)\\|more\\)\\>"
+ (buffer-substring start (point)))))
+ (c-forward-syntactic-ws limit)
+ (cond
+ ((looking-at ":\\([^:]\\|\\'\\)") ; A single colon.
+ (forward-char)
+ (setq label-type
+ (if (string= "signals" ; Special QT macro
+ (buffer-substring-no-properties start label-end))
+ 'qt-1kwd-colon
+ 'goto-target)))
+ ((and qt-symbol-idx
+ (search-forward-regexp "\\=slots\\>" limit t)
+ (progn (c-forward-syntactic-ws limit)
+ (looking-at ":\\([^:]\\|\\'\\)"))) ; A single colon
+ (forward-char)
+ (setq label-type 'qt-2kwds-colon)))))))
(save-restriction
(narrow-to-region start (point))
@@ -6069,6 +6098,7 @@ y ;; True if there's a suffix match outside the outermost
(while (progn
(when (looking-at c-nonlabel-token-key)
(goto-char start)
+ (setq label-type nil)
(throw 'check-label nil))
(and (c-safe (c-forward-sexp)
(c-forward-syntactic-ws)
@@ -6088,12 +6118,12 @@ y ;; True if there's a suffix match outside the outermost
(c-put-c-type-property (1- (point-max)) 'c-decl-end)
(goto-char (point-max))
- t)))
+ )))
(t
;; Not a label.
- (goto-char start)
- nil))))
+ (goto-char start)))
+ label-type))
(defun c-forward-objc-directive ()
;; Assuming the point is at the beginning of a token, try to move
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index a880ae9a1fe..0df09eda481 100644
--- a/lisp/progmodes/cc-fonts.el
+++ b/lisp/progmodes/cc-fonts.el
@@ -704,8 +704,13 @@ casts and declarations are fontified. Used on level 2 and higher."
))
(defun c-font-lock-complex-decl-prepare (limit)
+ ;; This function will be called from font-lock for a region bounded by POINT
+ ;; and LIMIT, as though it were to identify a keyword for
+ ;; font-lock-keyword-face. It always returns NIL to inhibit this and
+ ;; prevent a repeat invocation. See elisp/lispref page "Search-based
+ ;; Fontification".
+ ;;
;; Called before any of the matchers in `c-complex-decl-matchers'.
- ;; Nil is always returned.
;;
;; This function does hidden buffer changes.
@@ -742,10 +747,15 @@ casts and declarations are fontified. Used on level 2 and higher."
nil)
(defun c-font-lock-<>-arglists (limit)
+ ;; This function will be called from font-lock for a region bounded by POINT
+ ;; and LIMIT, as though it were to identify a keyword for
+ ;; font-lock-keyword-face. It always returns NIL to inhibit this and
+ ;; prevent a repeat invocation. See elisp/lispref page "Search-based
+ ;; Fontification".
+ ;;
;; Fontify types and references in names containing angle bracket
;; arglists from the point to LIMIT. Note that
- ;; `c-font-lock-declarations' already has handled many of them. Nil
- ;; is always returned.
+ ;; `c-font-lock-declarations' already has handled many of them.
;;
;; This function might do hidden buffer changes.
@@ -971,9 +981,14 @@ casts and declarations are fontified. Used on level 2 and higher."
font-lock-keyword-face))
(defun c-font-lock-declarations (limit)
+ ;; This function will be called from font-lock for a region bounded by POINT
+ ;; and LIMIT, as though it were to identify a keyword for
+ ;; font-lock-keyword-face. It always returns NIL to inhibit this and
+ ;; prevent a repeat invocation. See elisp/lispref page "Search-based
+ ;; Fontification".
+ ;;
;; Fontify all the declarations, casts and labels from the point to LIMIT.
- ;; Assumes that strings and comments have been fontified already. Nil is
- ;; always returned.
+ ;; Assumes that strings and comments have been fontified already.
;;
;; This function might do hidden buffer changes.
@@ -1009,6 +1024,7 @@ casts and declarations are fontified. Used on level 2 and higher."
;; `c-forward-decl-or-cast-1' and `c-forward-label' for
;; later fontification.
(c-record-type-identifiers t)
+ label-type
c-record-ref-identifiers
;; Make `c-forward-type' calls mark up template arglists if
;; it finds any. That's necessary so that we later will
@@ -1174,39 +1190,31 @@ casts and declarations are fontified. Used on level 2 and higher."
(c-fontify-recorded-types-and-refs)
nil))
- ;; It was a false alarm.
+ ;; It was a false alarm. Check if we're in a label (or other
+ ;; construct with `:' except bitfield) instead.
(goto-char start-pos)
- ;; The below code attempts to fontify the case constants in
- ;; c-label-face-name, but it cannot catch every case [sic].
- ;; And do we want to fontify case constants anyway?
- (c-forward-label t match-pos nil)
-;;; (when (c-forward-label t match-pos nil)
-;;; ;; Can't use `c-fontify-types-and-refs' here since we
-;;; ;; should use the label face.
-;;; (save-excursion
-;;; (while c-record-ref-identifiers
-;;; (let ((elem (car c-record-ref-identifiers))
-;;; c-record-type-identifiers)
-;;; (goto-char (cdr elem))
-;;; ;; Find the end of any label.
-;;; (while (and (re-search-forward "\\sw\\|:" nil t)
-;;; (progn (backward-char 1) t)
-;;; (or (re-search-forward
-;;; "\\=0[Xx][0-9A-Fa-f]+\\|\\([0-9]+\\)" nil t)
-;;; (c-forward-name)))
-;;; (c-backward-syntactic-ws)
-;;; (let ((end (point)))
-;;; ;; Now find the start of the bit we regard as the label.
-;;; (when (and (c-simple-skip-symbol-backward)
-;;; (not (c-get-char-property (point) 'face)))
-;;; (c-put-font-lock-face (point) end c-label-face-name))
-;;; (goto-char end))))
-;;; (setq c-record-ref-identifiers (cdr c-record-ref-identifiers))))
-;;; ;; `c-forward-label' probably has added a `c-decl-end'
-;;; ;; marker, so return t to `c-find-decl-spots' to signal
-;;; ;; that.
-;;; t)
- )))
+ (when (setq label-type (c-forward-label t match-pos nil))
+ ;; Can't use `c-fontify-types-and-refs' here since we
+ ;; use the label face at times.
+ (cond ((eq label-type 'goto-target)
+ (c-put-font-lock-face (caar c-record-ref-identifiers)
+ (cdar c-record-ref-identifiers)
+ c-label-face-name))
+ ((eq label-type 'qt-1kwd-colon)
+ (c-put-font-lock-face (caar c-record-ref-identifiers)
+ (cdar c-record-ref-identifiers)
+ 'font-lock-keyword-face))
+ ((eq label-type 'qt-2kwds-colon)
+ (mapc
+ (lambda (kwd)
+ (c-put-font-lock-face (car kwd) (cdr kwd)
+ 'font-lock-keyword-face))
+ c-record-ref-identifiers)))
+ (setq c-record-ref-identifiers nil)
+ ;; `c-forward-label' has probably added a `c-decl-end'
+ ;; marker, so return t to `c-find-decl-spots' to signal
+ ;; that.
+ t))))
nil)))
@@ -1285,6 +1293,14 @@ on level 2 only and so aren't combined with `c-complex-decl-matchers'."
"Complex font lock matchers for types and declarations. Used on level
3 and higher."
+ ;; Note: This code in this form dumps a number of funtions into the
+ ;; resulting constant, `c-matchers-3'. At run time, font lock will call
+ ;; each of them as a "FUNCTION" (see Elisp page "Search-based
+ ;; Fontification"). The font lock region is delimited by POINT and the
+ ;; single parameter, LIMIT. Each of these functions returns NIL (thus
+ ;; inhibiting spurious font-lock-keyword-face highlighting and another
+ ;; call).
+
t `(;; Initialize some things before the search functions below.
c-font-lock-complex-decl-prepare
@@ -1397,6 +1413,8 @@ on level 2 only and so aren't combined with `c-complex-decl-matchers'."
;; Fontify the type in C++ "new" expressions.
,@(when (c-major-mode-is 'c++-mode)
+ ;; This pattern is a probably a "(MATCHER . ANCHORED-HIGHLIGHTER)"
+ ;; (see Elisp page "Search-based Fontification").
`(("\\<new\\>"
(c-font-lock-c++-new))))
))
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index fe01ab02ae3..906cbfb19a7 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -221,11 +221,6 @@ the evaluated constant value at compile time."
;; with the group symbol for each group and should return non-nil
;; if that group is to be included.
;;
- ;; OP-FILTER filters the individual operators in each group. It
- ;; can be t to choose all operators, a regexp to test against each
- ;; operator, or a function which will be called for each operator
- ;; and should return non-nil for those to include.
- ;;
;; If XLATE is given, it's a function which is called for each
;; matching operator and its return value is collected instead.
;; If it returns a list, the elements are spliced directly into
@@ -1376,6 +1371,26 @@ EOL terminated statements."
(c-lang-const c-vsemi-status-unknown-p-fn))
+;;; Defun functions
+
+;; The Emacs variables beginning-of-defun-function and
+;; end-of-defun-function will be set so that commands like
+;; `mark-defun' and `narrow-to-defun' work right. The key sequences
+;; C-M-a and C-M-e are, however, bound directly to the CC Mode
+;; functions, allowing optimisation for large n.
+(c-lang-defconst beginning-of-defun-function
+ "Function to which beginning-of-defun-function will be set."
+ t 'c-beginning-of-defun
+ awk 'c-awk-beginning-of-defun)
+(c-lang-setvar beginning-of-defun-function
+ (c-lang-const beginning-of-defun-function))
+
+(c-lang-defconst end-of-defun-function
+ "Function to which end-of-defun-function will be set."
+ t 'c-end-of-defun
+ awk 'c-awk-end-of-defun)
+(c-lang-setvar end-of-defun-function (c-lang-const end-of-defun-function))
+
;;; In-comment text handling.
(c-lang-defconst c-paragraph-start
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 1407b497305..f5da0eecc2e 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -158,8 +158,8 @@
;; These are typically standard emacs variables such as `comment-start'.
(defmacro c-make-emacs-variables-local ()
`(progn
- ,@(mapcan (lambda (init)
- `((make-local-variable ',(car init))))
+ ,@(mapcar (lambda (init)
+ `(make-local-variable ',(car init)))
(cdr c-emacs-variable-inits))))
(defun c-init-language-vars-for (mode)
@@ -509,9 +509,9 @@ preferably use the `c-mode-menu' language constant directly."
type type-pos
marked-id term-pos
(end1
- (if (eq (get-text-property end 'face) 'font-lock-comment-face)
- (previous-single-property-change end 'face)
- end)))
+ (or (and (eq (get-text-property end 'face) 'font-lock-comment-face)
+ (previous-single-property-change end 'face))
+ end)))
(when (>= end1 beg) ; Don't hassle about changes entirely in comments.
;; Find a limit for the search for a `c-type' property
(while
diff --git a/lisp/progmodes/cc-subword.el b/lisp/progmodes/cc-subword.el
index 29494fdc6a7..a6a365d316b 100644
--- a/lisp/progmodes/cc-subword.el
+++ b/lisp/progmodes/cc-subword.el
@@ -218,38 +218,52 @@ Optional argument ARG is the same as for `transpose-words'."
(interactive "*p")
(transpose-subr 'c-forward-subword arg))
-(defun c-capitalize-subword (arg)
- "Do the same as `capitalize-word' but on subwords.
-See the command `c-subword-mode' for a description of subwords.
-Optional argument ARG is the same as for `capitalize-word'."
- (interactive "p")
- (let ((count (abs arg))
- (direction (if (< 0 arg) 1 -1)))
- (dotimes (i count)
- (when (re-search-forward
- (concat "[" c-alpha "]")
- nil t)
- (goto-char (match-beginning 0)))
- (let* ((p (point))
- (pp (1+ p))
- (np (c-forward-subword direction)))
- (upcase-region p pp)
- (downcase-region pp np)
- (goto-char np)))))
+
(defun c-downcase-subword (arg)
"Do the same as `downcase-word' but on subwords.
See the command `c-subword-mode' for a description of subwords.
Optional argument ARG is the same as for `downcase-word'."
(interactive "p")
- (downcase-region (point) (c-forward-subword arg)))
+ (let ((start (point)))
+ (downcase-region (point) (c-forward-subword arg))
+ (when (< arg 0)
+ (goto-char start))))
(defun c-upcase-subword (arg)
"Do the same as `upcase-word' but on subwords.
See the command `c-subword-mode' for a description of subwords.
Optional argument ARG is the same as for `upcase-word'."
(interactive "p")
- (upcase-region (point) (c-forward-subword arg)))
+ (let ((start (point)))
+ (upcase-region (point) (c-forward-subword arg))
+ (when (< arg 0)
+ (goto-char start))))
+
+(defun c-capitalize-subword (arg)
+ "Do the same as `capitalize-word' but on subwords.
+See the command `c-subword-mode' for a description of subwords.
+Optional argument ARG is the same as for `capitalize-word'."
+ (interactive "p")
+ (let ((count (abs arg))
+ (start (point))
+ (advance (if (< arg 0) nil t)))
+ (dotimes (i count)
+ (if advance
+ (progn (re-search-forward
+ (concat "[" c-alpha "]")
+ nil t)
+ (goto-char (match-beginning 0)))
+ (c-backward-subword))
+ (let* ((p (point))
+ (pp (1+ p))
+ (np (c-forward-subword)))
+ (upcase-region p pp)
+ (downcase-region pp np)
+ (goto-char (if advance np p))))
+ (unless advance
+ (goto-char start))))
+
;;
diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el
index cbf2b44de23..8d28cba79ad 100644
--- a/lisp/progmodes/cc-vars.el
+++ b/lisp/progmodes/cc-vars.el
@@ -890,7 +890,8 @@ Only currently supported behavior is `alignleft'."
(defcustom c-special-indent-hook nil
"*Hook for user defined special indentation adjustments.
-This hook gets called after a line is indented by the mode."
+This hook gets called after each line is indented by the mode. It is only
+called if `c-syntactic-indentation' is non-nil."
:type 'hook
:group 'c)
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index aa77caf0670..ce933cb13d5 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -391,6 +391,7 @@ be added."
,(expand-file-name "compilation.txt" data-directory))
:group 'compilation)
+;;;###autoload(put 'compilation-directory 'safe-local-variable 'stringp)
(defvar compilation-directory nil
"Directory to restore to when doing `recompile'.")
@@ -625,7 +626,7 @@ Faces `compilation-error-face', `compilation-warning-face',
(cons (match-string-no-properties idx) dir))
mouse-face highlight
keymap compilation-button-map
- help-echo "mouse-2: visit this directory")))
+ help-echo "mouse-2: visit destination directory")))
;; Data type `reverse-ordered-alist' retriever. This function retrieves the
;; KEY element from the ALIST, creating it in the right position if not already
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index 0b8287503f8..a07fb5ee44f 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -233,6 +233,7 @@ for constructs with multiline if/unless/while/until/for/foreach condition."
"*Indentation of CPerl statements with respect to containing block."
:type 'integer
:group 'cperl-indentation-details)
+(put 'cperl-indent-level 'safe-local-variable 'integerp)
(defcustom cperl-lineup-step nil
"*`cperl-lineup' will always lineup at multiple of this number.
@@ -1871,9 +1872,7 @@ or as help on variables `cperl-tips', `cperl-problems',
(easy-menu-add cperl-menu)) ; A NOP in Emacs.
(run-mode-hooks 'cperl-mode-hook)
(if cperl-hook-after-change
- (progn
- (make-local-hook 'after-change-functions)
- (add-hook 'after-change-functions 'cperl-after-change-function nil t)))
+ (add-hook 'after-change-functions 'cperl-after-change-function nil t))
;; After hooks since fontification will break this
(if cperl-pod-here-scan
(or cperl-syntaxify-by-font-lock
diff --git a/lisp/progmodes/dcl-mode.el b/lisp/progmodes/dcl-mode.el
index 618de7a3345..bdec1bf9ef4 100644
--- a/lisp/progmodes/dcl-mode.el
+++ b/lisp/progmodes/dcl-mode.el
@@ -71,6 +71,9 @@
;;; Code:
+(require 'tempo)
+
+
;;; *** Customization *****************************************************
@@ -1935,8 +1938,6 @@ section at the end of the current buffer."
;; standard Emacs. I would have liked something closer to the functionality
;; of LSE templates...
-
-(require 'tempo)
(defvar dcl-tempo-tags nil
"Tempo tags for DCL mode.")
diff --git a/lisp/progmodes/ebnf2ps.el b/lisp/progmodes/ebnf2ps.el
index 23ba4b55f33..55f61222796 100644
--- a/lisp/progmodes/ebnf2ps.el
+++ b/lisp/progmodes/ebnf2ps.el
@@ -2609,7 +2609,7 @@ See `ebnf-style-database' documentation."
(and (assoc name ebnf-style-database)
(error "Style name already exists: %s" name))
(or (assoc inherits ebnf-style-database)
- (error "Style inheritance name does'nt exist: %s" inherits))
+ (error "Style inheritance name doesn't exist: %s" inherits))
(setq ebnf-style-database
(cons (cons name (cons inherits (ebnf-check-style-values values)))
ebnf-style-database)))
@@ -2639,7 +2639,7 @@ See `ebnf-style-database' documentation."
See `ebnf-style-database' documentation."
(interactive "SStyle name: \nXStyle values: ")
(let ((style (or (assoc name ebnf-style-database)
- (error "Style name does'nt exist: %s" name)))
+ (error "Style name doesn't exist: %s" name)))
(merge (ebnf-check-style-values values))
val elt new check)
;; modify value of existing variables
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 8d126c8a413..4903d7d26ec 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -931,8 +931,8 @@ Convert it to flymake internal format."
2 4 nil 5))
;; compilation-error-regexp-alist)
(flymake-reformat-err-line-patterns-from-compile-el compilation-error-regexp-alist-alist))
- "Patterns for matching error/warning lines.
-\(REGEXP FILE-IDX LINE-IDX ERR-TEXT-IDX).
+ "Patterns for matching error/warning lines. Each pattern has the form
+\(REGEXP FILE-IDX LINE-IDX COL-IDX ERR-TEXT-IDX).
Use `flymake-reformat-err-line-patterns-from-compile-el' to add patterns
from compile.el")
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index b598f2de1f7..4dbc9893f61 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -1771,10 +1771,15 @@ static char *magick[] = {
:group 'gud)
(defface breakpoint-disabled
- ;; We use different values of grey for different background types,
- ;; so that on low-color displays it will end up as something visible
- ;; if it has to be approximated.
- '((t :foreground "grey70"))
+ '((((class color) (min-colors 88)) :foreground "grey70")
+ ;; Ensure that on low-color displays that we end up something visible.
+ (((class color) (min-colors 8) (background light))
+ :foreground "black")
+ (((class color) (min-colors 8) (background dark))
+ :foreground "white")
+ (((type tty) (class mono))
+ :inverse-video t)
+ (t :background "gray"))
"Face for disabled breakpoint icon in fringe."
:group 'gud)
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index fe2bbdec14e..2c43abfd50c 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -315,17 +315,7 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies
This gets tacked on the end of the generated expressions.")
;;;###autoload
-(defvar grep-program
- ;; Currently zgrep has trouble. It runs egrep instead of grep,
- ;; and it doesn't pass along long options right.
- "grep"
- ;; (if (equal (condition-case nil ; in case "zgrep" isn't in exec-path
- ;; (call-process "zgrep" nil nil nil
- ;; "foo" null-device)
- ;; (error nil))
- ;; 1)
- ;; "zgrep"
- ;; "grep")
+(defvar grep-program "grep"
"The default grep program for `grep-command' and `grep-find-command'.
This variable's value takes effect when `grep-compute-defaults' is called.")
@@ -336,10 +326,10 @@ This variable's value takes effect when `grep-compute-defaults' is called.")
;;;###autoload
(defvar grep-find-use-xargs nil
- "Whether \\[grep-find] uses the `xargs' utility by default.
-
-If `exec', it uses `find -exec'; if `gnu', it uses `find -print0' and `xargs -0';
-if not nil and not `gnu', it uses `find -print' and `xargs'.
+ "Non-nil means that `grep-find' uses the `xargs' utility by default.
+If `exec', use `find -exec'.
+If `gnu', use `find -print0' and `xargs -0'.
+Any other non-nil value means to use `find -print' and `xargs'.
This variable's value takes effect when `grep-compute-defaults' is called.")
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 8db7c28219e..3d252190eff 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -147,8 +147,7 @@ Used to grey out relevant toolbar icons.")
([refresh] "Refresh" . gud-refresh)
([run] menu-item "Run" gud-run
:enable (not gud-running)
- :visible (and (memq gud-minor-mode '(gdbmi gdb dbx jdb))
- (not (eq gud-minor-mode 'gdba))))
+ :visible (memq gud-minor-mode '(gdbmi gdb dbx jdb)))
([go] menu-item (if gdb-active-process "Continue" "Run") gud-go
:visible (and (not gud-running)
(eq gud-minor-mode 'gdba)))
@@ -214,7 +213,45 @@ Used to grey out relevant toolbar icons.")
:name "Gud")
(easy-mmode-defmap gud-minor-mode-map
- `(([menu-bar debug] . ("Gud" . ,gud-menu-map)))
+ (append
+ `(([menu-bar debug] . ("Gud" . ,gud-menu-map)))
+ ;; Get tool bar like functionality from the menu bar on a text only
+ ;; terminal.
+ (unless window-system
+ `(([menu-bar down]
+ . (,(propertize "down" 'face 'font-lock-doc-face) . gud-down))
+ ([menu-bar up]
+ . (,(propertize "up" 'face 'font-lock-doc-face) . gud-up))
+ ([menu-bar finish]
+ . (,(propertize "finish" 'face 'font-lock-doc-face) . gud-finish))
+ ([menu-bar step]
+ . (,(propertize "step" 'face 'font-lock-doc-face) . gud-step))
+ ([menu-bar next]
+ . (,(propertize "next" 'face 'font-lock-doc-face) . gud-next))
+ ([menu-bar until] menu-item
+ ,(propertize "until" 'face 'font-lock-doc-face) gud-until
+ :visible (memq gud-minor-mode '(gdbmi gdba gdb perldb)))
+ ([menu-bar cont] menu-item
+ ,(propertize "cont" 'face 'font-lock-doc-face) gud-cont
+ :visible (not (eq gud-minor-mode 'gdba)))
+ ([menu-bar run] menu-item
+ ,(propertize "run" 'face 'font-lock-doc-face) gud-run
+ :visible (memq gud-minor-mode '(gdbmi gdb dbx jdb)))
+ ([menu-bar go] menu-item
+ ,(propertize " go " 'face 'font-lock-doc-face) gud-go
+ :visible (and (not gud-running)
+ (eq gud-minor-mode 'gdba)))
+ ([menu-bar stop] menu-item
+ ,(propertize "stop" 'face 'font-lock-doc-face) gud-stop-subjob
+ :visible (or gud-running
+ (not (eq gud-minor-mode 'gdba))))
+ ([menu-bar print]
+ . (,(propertize "print" 'face 'font-lock-doc-face) . gud-print))
+ ([menu-bar tools] . undefined)
+ ([menu-bar buffer] . undefined)
+ ([menu-bar options] . undefined)
+ ([menu-bar edit] . undefined)
+ ([menu-bar file] . undefined))))
"Map used in visited files.")
(let ((m (assq 'gud-minor-mode minor-mode-map-alist)))
@@ -686,14 +723,13 @@ text command mode to debug multiple programs within one Emacs
session."
(interactive (list (gud-query-cmdline 'gdb)))
- (if (and gud-comint-buffer
+ (when (and gud-comint-buffer
(buffer-name gud-comint-buffer)
(get-buffer-process gud-comint-buffer)
(with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)))
- (let ((same-window-regexps))
- (display-buffer gud-comint-buffer)
+ (gdb-restore-windows)
(error
- "Multiple debugging requires restarting in text command mode")))
+ "Multiple debugging requires restarting in text command mode"))
(gud-common-init command-line nil 'gud-gdb-marker-filter)
(set (make-local-variable 'gud-minor-mode) 'gdb)
@@ -2268,6 +2304,8 @@ gud, see `gud-mode'."
(gud-def gud-up "up\C-Mwhere" "<" "Up one stack frame.")
(gud-def gud-down "down\C-Mwhere" ">" "Up one stack frame.")
(gud-def gud-run "run" nil "Run the program.") ;if VM start using jdb
+ (gud-def gud-print "print %e" "\C-p" "Evaluate Java expression at point.")
+
(setq comint-prompt-regexp "^> \\|^[^ ]+\\[[0-9]+\\] ")
(setq paragraph-start comint-prompt-regexp)
@@ -2817,7 +2855,9 @@ Obeying it means displaying in another window the specified file and line."
(when (looking-at comint-prompt-regexp)
(set-marker gud-delete-prompt-marker (point))
(set-marker-insertion-type gud-delete-prompt-marker t))
- (insert (concat expr " = ")))))
+ (unless (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer)
+ 'jdb)
+ (insert (concat expr " = "))))))
expr))
;; The next eight functions are hacked from gdbsrc.el by
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el
index 3bc1c55cc7d..9f01787b336 100644
--- a/lisp/progmodes/hideshow.el
+++ b/lisp/progmodes/hideshow.el
@@ -184,7 +184,6 @@
;; (5) Hideshow interacts badly with Ediff and `vc-diff'. At the moment, the
;; suggested workaround is to turn off hideshow entirely, for example:
;;
-;; (defun turn-off-hideshow () (hs-minor-mode -1))
;; (add-hook 'ediff-prepare-buffer-hook 'turn-off-hideshow)
;; (add-hook 'vc-before-checkin-hook 'turn-off-hideshow)
;;
@@ -908,7 +907,7 @@ Key bindings:
(hs-grok-mode-type)
;; Turn off this mode if we change major modes.
(add-hook 'change-major-mode-hook
- (lambda () (hs-minor-mode -1))
+ 'turn-off-hideshow
nil t)
(easy-menu-add hs-minor-mode-menu)
(set (make-local-variable 'line-move-ignore-invisible) t)
@@ -920,6 +919,11 @@ Key bindings:
(hs-show-all)))
(run-hooks 'hs-minor-mode-hook))
+;;;###autoload
+(defun turn-off-hideshow ()
+ "Unconditionally turn off `hs-minor-mode'."
+ (hs-minor-mode -1))
+
;;---------------------------------------------------------------------------
;; load-time actions
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el
index aa2d1b32d10..bcecdeafa0f 100644
--- a/lisp/progmodes/idlw-shell.el
+++ b/lisp/progmodes/idlw-shell.el
@@ -2698,7 +2698,7 @@ in the current routine."
(class (nth 2 module)))
(if module
(progn
- (setq module (idlwave-make-full-name (nth 2 module) (car module)))
+ (setq module (idlwave-make-full-name class name))
(idlwave-shell-module-source-query module type)
(idlwave-shell-set-bp-in-module name type class))
(error "No identifier at point"))))
@@ -2707,14 +2707,15 @@ in the current routine."
(defun idlwave-shell-set-bp-in-module (name type class)
"Set breakpoint in module. Assumes that `idlwave-shell-sources-alist'
contains an entry for that module."
- (let ((source-file
- (car-safe (cdr-safe
- (or
- (assoc (upcase (idlwave-make-full-name class name))
- idlwave-shell-sources-alist)
- (nth 3 (idlwave-best-rinfo-assoc name type class
- (idlwave-routines)))))))
- buf)
+ (let* ((module (idlwave-make-full-name class name))
+ (source-file
+ (car-safe (cdr-safe
+ (or
+ (assoc (upcase module)
+ idlwave-shell-sources-alist)
+ (nth 3 (idlwave-best-rinfo-assoc name type class
+ (idlwave-routines)))))))
+ buf)
(if (or (not source-file)
(not (file-regular-p source-file))
(not (setq buf
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index c4349e9c092..d29e56ce75d 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -3487,6 +3487,7 @@ if `idlwave-auto-fill-split-string' is non-nil."
(idlwave-indent-line)
;; Prevent actions do-auto-fill which calls indent-line-function.
(let (idlwave-do-actions
+ (paragraph-separate ".")
(fill-nobreak-predicate
(if (and (idlwave-in-quote)
idlwave-auto-fill-split-string)
diff --git a/lisp/progmodes/m4-mode.el b/lisp/progmodes/m4-mode.el
index 734a86b0b99..bd31f731693 100644
--- a/lisp/progmodes/m4-mode.el
+++ b/lisp/progmodes/m4-mode.el
@@ -118,14 +118,19 @@
(defun m4-m4-buffer ()
"Send contents of the current buffer to m4."
(interactive)
- (shell-command-on-region (point-min) (point-max) m4-program "*m4-output*"
- nil)
+ (shell-command-on-region
+ (point-min) (point-max)
+ (mapconcat 'identity (cons m4-program m4-program-options) "\s")
+ "*m4-output*" nil)
(switch-to-buffer-other-window "*m4-output*"))
(defun m4-m4-region ()
"Send contents of the current region to m4."
(interactive)
- (shell-command-on-region (point) (mark) m4-program "*m4-output*" nil)
+ (shell-command-on-region
+ (point) (mark)
+ (mapconcat 'identity (cons m4-program m4-program-options) "\s")
+ "*m4-output*" nil)
(switch-to-buffer-other-window "*m4-output*"))
;;;###autoload
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index 078e94ffbf4..255f63aed41 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -391,6 +391,7 @@ The expansion is entirely correct because it uses the C preprocessor."
"*Indentation of Perl statements with respect to containing block."
:type 'integer
:group 'perl)
+(put 'perl-indent-level 'safe-local-variable 'integerp)
(defcustom perl-continued-statement-offset 4
"*Extra indent for lines not starting new statements."
:type 'integer
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 226d4bdc62d..e57c7e639c9 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -981,11 +981,15 @@ don't move and return nil. Otherwise return t."
(_ (if (python-comment-line-p)
(python-skip-comments/blanks t)))
(ci (current-indentation))
- (open (python-open-block-statement-p)))
+ (open (python-open-block-statement-p))
+ opoint)
(if (and (zerop ci) (not open))
(not (goto-char point))
(catch 'done
- (while (zerop (python-next-statement))
+ (setq opoint (point))
+ (while (and (zerop (python-next-statement))
+ (not (= opoint (point))))
+ (setq opoint (point))
(when (or (and open (<= (current-indentation) ci))
(< (current-indentation) ci))
(python-skip-comments/blanks t)
@@ -2225,6 +2229,7 @@ with skeleton expansions for compound statement templates.
;; . python-font-lock-syntactic-face-function)
))
(set (make-local-variable 'parse-sexp-lookup-properties) t)
+ (set (make-local-variable 'parse-sexp-ignore-comments) t)
(set (make-local-variable 'comment-start) "# ")
(set (make-local-variable 'indent-line-function) #'python-indent-line)
(set (make-local-variable 'indent-region-function) #'python-indent-region)
diff --git a/lisp/recentf.el b/lisp/recentf.el
index 12e4dd7ec57..c55f15c69e9 100644
--- a/lisp/recentf.el
+++ b/lisp/recentf.el
@@ -72,7 +72,14 @@ See the command `recentf-save-list'."
(defcustom recentf-save-file "~/.recentf"
"*File to save the recent list into."
:group 'recentf
- :type 'file)
+ :type 'file
+ :initialize 'custom-initialize-default
+ :set (lambda (symbol value)
+ (let ((oldvalue (eval symbol)))
+ (custom-set-default symbol value)
+ (and (not (equal value oldvalue))
+ recentf-mode
+ (recentf-load-list)))))
(defcustom recentf-save-file-modes 384 ;; 0600
"Mode bits of recentf save file, as an integer, or nil.
diff --git a/lisp/replace.el b/lisp/replace.el
index a42f4ff4b57..a8dfd043c72 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -844,7 +844,8 @@ Compatibility function for \\[next-error] invocations."
#'next-single-property-change)
"No more matches")
;; In case the *Occur* buffer is visible in a nonselected window.
- (set-window-point (get-buffer-window (current-buffer)) (point))
+ (let ((win (get-buffer-window (current-buffer) t)))
+ (if win (set-window-point win (point))))
(occur-mode-goto-occurrence)))
(defface match
diff --git a/lisp/simple.el b/lisp/simple.el
index 5901a1e3067..fc3a0b3d218 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -118,8 +118,10 @@ If no other buffer exists, the buffer `*scratch*' is returned."
(defcustom next-error-highlight 0.5
"*Highlighting of locations in selected source buffers.
-If number, highlight the locus in `next-error' face for given time in seconds.
-If t, highlight the locus indefinitely until some other locus replaces it.
+If a number, highlight the locus in `next-error' face for the given time
+in seconds, or until the next command is executed.
+If t, highlight the locus until the next command is executed, or until
+some other locus replaces it.
If nil, don't highlight the locus in the source buffer.
If `fringe-arrow', indicate the locus by the fringe arrow."
:type '(choice (number :tag "Highlight for specified time")
@@ -3083,7 +3085,7 @@ START and END specify the portion of the current buffer to be copied."
(defvar activate-mark-hook nil
"Hook run when the mark becomes active.
It is also run at the end of a command, if the mark is active and
-it is possible that the region may have changed")
+it is possible that the region may have changed.")
(defvar deactivate-mark-hook nil
"Hook run when the mark becomes inactive.")
@@ -3193,28 +3195,28 @@ will pop twice."
:group 'editing)
(defun set-mark-command (arg)
- "Set mark at where point is, or jump to mark.
-With no prefix argument, set mark, and push old mark position on local
-mark ring; also push mark on global mark ring if last mark was set in
+ "Set mark where point is, or jump to mark.
+Setting the mark also sets the \"region\", which is the closest
+equivalent in Emacs to what some editors call the \"selection\".
+
+With no prefix argument, set mark and push old mark position on local
+mark ring. Also, push mark on global mark ring, if last mark was set in
another buffer. Immediately repeating the command activates
`transient-mark-mode' temporarily.
-With argument, e.g. \\[universal-argument] \\[set-mark-command], \
-jump to mark, and pop a new position
-for mark off the local mark ring \(this does not affect the global
-mark ring\). Use \\[pop-global-mark] to jump to a mark off the global
+With prefix argument \(e.g., \\[universal-argument] \\[set-mark-command]\), \
+jump to mark, and set mark from
+position popped off the local mark ring \(this does not affect the global
+mark ring\). Use \\[pop-global-mark] to jump to a mark popped off the global
mark ring \(see `pop-global-mark'\).
If `set-mark-command-repeat-pop' is non-nil, repeating
-the \\[set-mark-command] command with no prefix pops the next position
+the \\[set-mark-command] command with no prefix argument pops the next position
off the local (or global) mark ring and jumps there.
-With a double \\[universal-argument] prefix argument, e.g. \\[universal-argument] \
-\\[universal-argument] \\[set-mark-command], unconditionally
-set mark where point is.
-
-Setting the mark also sets the \"region\", which is the closest
-equivalent in Emacs to what some editors call the \"selection\".
+With a double \\[universal-argument] prefix argument \(e.g., \\[universal-argument] \
+\\[universal-argument] \\[set-mark-command]\), unconditionally
+set mark where point is, even if `set-mark-command-repeat-pop' is non-nil.
Novice Emacs Lisp programmers often try to use the mark for the wrong
purposes. See the documentation of `set-mark' for more information."
@@ -4468,7 +4470,7 @@ it skips the contents of comments that end before point."
(save-excursion
(save-restriction
(if blink-matching-paren-distance
- (narrow-to-region (max (point-min)
+ (narrow-to-region (max (minibuffer-prompt-end)
(- (point) blink-matching-paren-distance))
oldpos))
(condition-case ()
@@ -4718,16 +4720,9 @@ SEND-ACTIONS is a list of actions to call when the message is sent.
Each action has the form (FUNCTION . ARGS)."
(interactive
(list nil nil nil current-prefix-arg))
- (let ((function (get mail-user-agent 'composefunc))
- result-buffer)
- (if switch-function
- (save-window-excursion
- (prog1
- (funcall function to subject other-headers continue
- nil yank-action send-actions)
- (funcall switch-function (current-buffer))))
- (funcall function to subject other-headers continue
- nil yank-action send-actions))))
+ (let ((function (get mail-user-agent 'composefunc)))
+ (funcall function to subject other-headers continue
+ switch-function yank-action send-actions)))
(defun compose-mail-other-window (&optional to subject other-headers continue
yank-action send-actions)
diff --git a/lisp/startup.el b/lisp/startup.el
index f1cc3e253ae..5b51a14c08f 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -51,8 +51,8 @@ The value is nil if the selected frame is on a text-only-terminal.")
"Non-nil inhibits the startup screen.
It also inhibits display of the initial message in the `*scratch*' buffer.
-This is for use in your personal init file, once you are familiar
-with the contents of the startup screen."
+This is for use in your personal init file (but NOT site-start.el), once
+you are familiar with the contents of the startup screen."
:type 'boolean
:group 'initialization)
@@ -514,7 +514,7 @@ opening the first frame (e.g. open a connection to an X server).")
;; Handle the X-like command-line arguments "-fg", "-bg", "-name", etc.
(defun tty-handle-args (args)
(let (rest)
- (message "%s" args)
+ (message "%S" args)
(while (and args
(not (equal (car args) "--")))
(let* ((argi (pop args))
@@ -961,11 +961,11 @@ opening the first frame (e.g. open a connection to an X server).")
(with-current-buffer (window-buffer)
(deactivate-mark)))
- ;; If the user has a file of abbrevs, read it.
+ ;; If the user has a file of abbrevs, read it.
;; FIXME: after the 22.0 release this should be changed so
;; that it does not read the abbrev file when -batch is used
;; on the command line.
- (when (and (file-exists-p abbrev-file-name)
+ (when (and (file-exists-p abbrev-file-name)
(file-readable-p abbrev-file-name))
(quietly-read-abbrev-file abbrev-file-name))
diff --git a/lisp/subr.el b/lisp/subr.el
index 4b5c5e3f076..bdde66fc885 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -579,7 +579,7 @@ KEY is a string or vector representing a sequence of keystrokes."
;;;; substitute-key-definition and its subroutines.
(defvar key-substitution-in-progress nil
- "Used internally by `substitute-key-definition'.")
+ "Used internally by `substitute-key-definition'.")
(defun substitute-key-definition (olddef newdef keymap &optional oldmap prefix)
"Replace OLDDEF with NEWDEF for any keys in KEYMAP now defined as OLDDEF.
@@ -821,11 +821,11 @@ and `event-end' functions."
(defun posn-set-point (position)
"Move point to POSITION.
Select the corresponding window as well."
- (if (not (windowp (posn-window position)))
- (error "Position not in text area of window"))
- (select-window (posn-window position))
- (if (numberp (posn-point position))
- (goto-char (posn-point position))))
+ (if (not (windowp (posn-window position)))
+ (error "Position not in text area of window"))
+ (select-window (posn-window position))
+ (if (numberp (posn-point position))
+ (goto-char (posn-point position))))
(defsubst posn-x-y (position)
"Return the x and y coordinates in POSITION.
@@ -949,20 +949,26 @@ is converted into a string by expressing it in decimal."
;;;; Obsolescence declarations for variables, and aliases.
(make-obsolete-variable 'directory-sep-char "do not use it." "21.1")
-(make-obsolete-variable 'mode-line-inverse-video "use the appropriate faces instead." "21.1")
-(make-obsolete-variable 'unread-command-char
- "use `unread-command-events' instead. That variable is a list of events
+(make-obsolete-variable
+ 'mode-line-inverse-video
+ "use the appropriate faces instead."
+ "21.1")
+(make-obsolete-variable
+ 'unread-command-char
+ "use `unread-command-events' instead. That variable is a list of events
to reread, so it now uses nil to mean `no event', instead of -1."
- "before 19.15")
+ "before 19.15")
;; Lisp manual only updated in 22.1.
(define-obsolete-variable-alias 'executing-macro 'executing-kbd-macro
- "before 19.34")
+ "before 19.34")
(defvaralias 'x-lost-selection-hooks 'x-lost-selection-functions)
-(make-obsolete-variable 'x-lost-selection-hooks 'x-lost-selection-functions "22.1")
+(make-obsolete-variable 'x-lost-selection-hooks
+ 'x-lost-selection-functions "22.1")
(defvaralias 'x-sent-selection-hooks 'x-sent-selection-functions)
-(make-obsolete-variable 'x-sent-selection-hooks 'x-sent-selection-functions "22.1")
+(make-obsolete-variable 'x-sent-selection-hooks
+ 'x-sent-selection-functions "22.1")
(defvaralias 'messages-buffer-max-lines 'message-log-max)
@@ -1534,7 +1540,7 @@ FILE should be the name of a library, with no directory name."
(when (featurep 'make-network-process)
(defun open-network-stream (name buffer host service)
- "Open a TCP connection for a service to a host.
+ "Open a TCP connection for a service to a host.
Returns a subprocess-object to represent the connection.
Input and output work as for subprocesses; `delete-process' closes it.
@@ -1548,14 +1554,15 @@ BUFFER is the buffer (or buffer name) to associate with the process.
HOST is name of the host to connect to, or its IP address.
SERVICE is name of the service desired, or an integer specifying
a port number to connect to."
- (make-network-process :name name :buffer buffer
- :host host :service service)))
+ (make-network-process :name name :buffer buffer
+ :host host :service service)))
;; compatibility
-(make-obsolete 'process-kill-without-query
- "use `process-query-on-exit-flag' or `set-process-query-on-exit-flag'."
- "22.1")
+(make-obsolete
+ 'process-kill-without-query
+ "use `process-query-on-exit-flag' or `set-process-query-on-exit-flag'."
+ "22.1")
(defun process-kill-without-query (process &optional flag)
"Say no query needed if PROCESS is running when Emacs is exited.
Optional second argument if non-nil says to require a query.
@@ -1588,8 +1595,8 @@ Legitimate radix values are 8, 10 and 16.")
'read-quoted-char-radix 8
"*Radix for \\[quoted-insert] and other uses of `read-quoted-char'.
Legitimate radix values are 8, 10 and 16."
- :type '(choice (const 8) (const 10) (const 16))
- :group 'editing-basics)
+ :type '(choice (const 8) (const 10) (const 16))
+ :group 'editing-basics)
(defun read-quoted-char (&optional prompt)
"Like `read-char', but do not allow quitting.
@@ -2232,9 +2239,9 @@ If UNDO is present and non-nil, it is a function that will be called
(text-properties-at (1- end)))
(put-text-property (1- end) end 'rear-nonsticky t))
- (if (eq yank-undo-function t) ;; not set by FUNCTION
+ (if (eq yank-undo-function t) ;; not set by FUNCTION
(setq yank-undo-function (nth 3 handler))) ;; UNDO
- (if (nth 4 handler) ;; COMMAND
+ (if (nth 4 handler) ;; COMMAND
(setq this-command (nth 4 handler)))))
(defun insert-buffer-substring-no-properties (buffer &optional start end)
@@ -2497,6 +2504,20 @@ in BODY."
(let ((combine-after-change-calls t))
. ,body)
(combine-after-change-execute)))
+
+(defmacro with-case-table (table &rest body)
+ "Execute the forms in BODY with TABLE as the current case table.
+The value returned is the value of the last form in BODY."
+ (declare (indent 1) (debug t))
+ (let ((old-case-table (make-symbol "table"))
+ (old-buffer (make-symbol "buffer")))
+ `(let ((,old-case-table (current-case-table))
+ (,old-buffer (current-buffer)))
+ (unwind-protect
+ (progn (set-case-table ,table)
+ ,@body)
+ (with-current-buffer ,old-buffer
+ (set-case-table ,old-case-table))))))
;;;; Constructing completion tables.
@@ -2765,7 +2786,7 @@ Unless optional argument INPLACE is non-nil, return a new string."
newstr))
(defun replace-regexp-in-string (regexp rep string &optional
- fixedcase literal subexp start)
+ fixedcase literal subexp start)
"Replace all matches for REGEXP with REP in STRING.
Return a new string containing the replacements.
@@ -2815,7 +2836,7 @@ and replace a sub-expression, e.g.
rep
(funcall rep (match-string 0 str)))
fixedcase literal str subexp)
- (cons (substring string start mb) ; unmatched prefix
+ (cons (substring string start mb) ; unmatched prefix
matches)))
(setq start me))
;; Reconstruct a string from the pieces.
@@ -2836,7 +2857,8 @@ that can be added."
(defun remove-from-invisibility-spec (element)
"Remove ELEMENT from `buffer-invisibility-spec'."
(if (consp buffer-invisibility-spec)
- (setq buffer-invisibility-spec (delete element buffer-invisibility-spec))))
+ (setq buffer-invisibility-spec
+ (delete element buffer-invisibility-spec))))
;;;; Syntax tables.
@@ -3182,7 +3204,7 @@ Usually the separator is \".\", but it can be any other string.")
(defvar version-regexp-alist
'(("^[-_+ ]?a\\(lpha\\)?$" . -3)
- ("^[-_+]$" . -3) ; treat "1.2.3-20050920" and "1.2-3" as alpha releases
+ ("^[-_+]$" . -3) ; treat "1.2.3-20050920" and "1.2-3" as alpha releases
("^[-_+ ]cvs$" . -3) ; treat "1.2.3-CVS" as alpha release
("^[-_+ ]?b\\(eta\\)?$" . -2)
("^[-_+ ]?\\(pre\\|rc\\)$" . -1))
@@ -3256,7 +3278,7 @@ See documentation for `version-separator' and `version-regexp-alist'."
;; Change .x.y to 0.x.y
(if (and (>= (length ver) (length version-separator))
(string-equal (substring ver 0 (length version-separator))
- version-separator))
+ version-separator))
(setq ver (concat "0" ver)))
(save-match-data
(let ((i 0)
diff --git a/lisp/t-mouse.el b/lisp/t-mouse.el
index c8a7e9b6536..eca2ce2b9fe 100644
--- a/lisp/t-mouse.el
+++ b/lisp/t-mouse.el
@@ -144,7 +144,7 @@ For example, \"2\" for /dev/tty2."
(event (if w
(posn-at-x-y (- x left) (- y top) w t)
(append (list nil 'menu-bar)
- (nthcdr 2 (posn-at-x-y x y w t))))))
+ (nthcdr 2 (posn-at-x-y x y))))))
(setcar (nthcdr 3 event) time)
event))
diff --git a/lisp/term.el b/lisp/term.el
index a853c12ec39..4ec195662ca 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -627,7 +627,7 @@ executed once when the buffer is created."
"Keyboard map for sending characters directly to the inferior process.")
(defvar term-escape-char nil
"Escape character for char sub-mode of term mode.
-Do not change it directly; use `term-set-escape-char' instead.")
+Do not change it directly; use `term-set-escape-char' instead.")
(defvar term-raw-escape-map nil)
(defvar term-pager-break-map nil)
@@ -714,7 +714,7 @@ Buffer local variable.")
(defvar term-buffer-maximum-size 2048
"*The maximum size in lines for term buffers.
Term buffers are truncated from the top to be no greater than this number.
-Notice that a setting of 0 means 'don't truncate anything'. This variable
+Notice that a setting of 0 means \"don't truncate anything\". This variable
is buffer-local.")
;;;
@@ -856,7 +856,7 @@ is buffer-local.")
;; Set up term-raw-map, etc.
(defun term-set-escape-char (c)
- "Change term-escape-char and keymaps that depend on it."
+ "Change `term-escape-char' and keymaps that depend on it."
(when term-escape-char
(define-key term-raw-map term-escape-char 'term-send-raw))
(setq c (make-string 1 c))
@@ -1100,7 +1100,7 @@ Entry to this mode runs the hooks on `term-mode-hook'."
(make-local-variable 'term-current-face)
(make-local-variable 'term-pending-frame)
(setq term-pending-frame nil)
- ;; Cua-mode's keybindings interfere with the term keybindings, disable it.
+ ;; Cua-mode's keybindings interfere with the term keybindings, disable it.
(set (make-local-variable 'cua-mode) nil)
(run-mode-hooks 'term-mode-hook)
(when (featurep 'xemacs)
@@ -1196,7 +1196,7 @@ without any interpretation."
"Insert the last stretch of killed text at the position clicked on."
(interactive "e\nP")
(if (featurep 'xemacs)
- (term-send-raw-string
+ (term-send-raw-string
(or (condition-case () (x-get-selection) (error ()))
(x-get-cutbuffer)
(error "No selection or cut buffer available")))
@@ -1314,7 +1314,7 @@ commands to use in that buffer.
"Start up a process in buffer for term modes.
Blasts any old process running in the buffer. Doesn't set the buffer mode.
You can use this to cheaply run a series of processes in the same term
-buffer. The hook term-exec-hook is run after each exec."
+buffer. The hook `term-exec-hook' is run after each exec."
(save-excursion
(set-buffer buffer)
(let ((proc (get-buffer-process buffer))) ; Blast any old process.
@@ -1344,7 +1344,7 @@ buffer. The hook term-exec-hook is run after each exec."
(run-hooks 'term-exec-hook)
buffer)))
-(defun term-sentinel (proc msg)
+(defun term-sentinel (proc msg)
"Sentinel for term buffers.
The main purpose is to get rid of the local keymap."
(let ((buffer (process-buffer proc)))
@@ -1404,7 +1404,7 @@ The main purpose is to get rid of the local keymap."
:kb=^?:kD=^[[3~:sc=\\E7:rc=\\E8:r1=\\Ec:"
;;; : -undefine ic
;;; don't define :te=\\E[2J\\E[?47l\\E8:ti=\\E7\\E[?47h\
- "termcap capabilities supported")
+ "Termcap capabilities supported.")
;;; This auxiliary function cranks up the process for term-exec in
;;; the appropriate environment.
@@ -2046,9 +2046,9 @@ Similarly for Soar, Scheme, etc."
(funcall term-input-sender proc input)))))
(defun term-get-old-input-default ()
- "Default for term-get-old-input.
+ "Default for `term-get-old-input'.
Take the current line, and discard any initial text matching
-term-prompt-regexp."
+`term-prompt-regexp'."
(save-excursion
(beginning-of-line)
(term-skip-prompt)
@@ -2068,7 +2068,7 @@ Calls `term-get-old-input' to get old input."
(insert input))))
(defun term-skip-prompt ()
- "Skip past the text matching regexp term-prompt-regexp.
+ "Skip past the text matching regexp `term-prompt-regexp'.
If this takes us past the end of the current line, don't skip at all."
(let ((eol (save-excursion (end-of-line) (point))))
(when (and (looking-at term-prompt-regexp)
@@ -2099,7 +2099,7 @@ If a prefix argument is given (\\[universal-argument]), then no prompt skip
-- go straight to column 0.
The prompt skip is done by skipping text matching the regular expression
-term-prompt-regexp, a buffer local variable."
+`term-prompt-regexp', a buffer local variable."
(interactive "P")
(beginning-of-line)
(when (null arg) (term-skip-prompt)))
@@ -2182,8 +2182,8 @@ If your process is choking on big inputs, try lowering the value.")
(defun term-send-string (proc str)
"Send to PROC the contents of STR as input.
-This is equivalent to process-send-string, except that long input strings
-are broken up into chunks of size term-input-chunk-size. Processes
+This is equivalent to `process-send-string', except that long input strings
+are broken up into chunks of size `term-input-chunk-size'. Processes
are given a chance to output between chunks. This can help prevent processes
from hanging when you send them long inputs on some OS's."
(let* ((len (length str))
@@ -2197,7 +2197,7 @@ from hanging when you send them long inputs on some OS's."
(defun term-send-region (proc start end)
"Send to PROC the region delimited by START and END.
-This is a replacement for process-send-region that tries to keep
+This is a replacement for `process-send-region' that tries to keep
your process from hanging on long inputs. See `term-send-string'."
(term-send-string proc (buffer-substring start end)))
@@ -2876,7 +2876,7 @@ See `term-prompt-regexp'."
;; (setq term-terminal-state 0))
((eq char ?M) ;; scroll reversed (terminfo: ri)
(if (or (< (term-current-row) term-scroll-start)
- (>= (1- (term-current-row))
+ (>= (1- (term-current-row))
term-scroll-start))
;; Scrolling up will not move outside
;; the scroll region.
@@ -2902,7 +2902,7 @@ See `term-prompt-regexp'."
(when term-saved-cursor
(term-goto (nth 0 term-saved-cursor)
(nth 1 term-saved-cursor))
- (setq term-ansi-current-bg-color
+ (setq term-ansi-current-bg-color
(nth 2 term-saved-cursor)
term-ansi-current-bold
(nth 3 term-saved-cursor)
@@ -3190,7 +3190,7 @@ See `term-prompt-regexp'."
(when term-ansi-current-underline
(setq term-current-face
(append '(:underline t) term-current-face))))))
-
+
;;; (message "Debug %S" term-current-face)
(setq term-ansi-face-already-done nil))
@@ -3219,7 +3219,7 @@ See `term-prompt-regexp'."
((eq char ?A)
(term-handle-deferred-scroll)
(let ((tcr (term-current-row)))
- (term-down
+ (term-down
(if (< (- tcr term-terminal-parameter) term-scroll-start)
;; If the amount to move is before scroll start, move
;; to scroll start.
@@ -3231,7 +3231,7 @@ See `term-prompt-regexp'."
((eq char ?B)
(let ((tcr (term-current-row)))
(unless (= tcr (1- term-scroll-end))
- (term-down
+ (term-down
(if (> (+ tcr term-terminal-parameter) term-scroll-end)
(- term-scroll-end 1 tcr)
(max 1 term-terminal-parameter)) t))))
@@ -3495,7 +3495,7 @@ The top-most line is line 0."
((term-pager-continue deficit)))))
(defun term-pager-page (arg)
- "Proceed past the **MORE** break, allowing the next page of output to appear"
+ "Proceed past the **MORE** break, allowing the next page of output to appear."
(interactive "p")
(term-pager-line (* arg term-height)))
@@ -3564,7 +3564,7 @@ The top-most line is line 0."
(put 'term-fake-pager-disable 'menu-enable 'term-pager-count))
(defun term-pager-help ()
- "Provide help on commands available in a terminal-emulator **MORE** break"
+ "Provide help on commands available in a terminal-emulator **MORE** break."
(interactive)
(message "Terminal-emulator pager break help...")
(sit-for 0)
@@ -3606,9 +3606,9 @@ all pending output has been dealt with."))
(defun term-handle-scroll (down)
(let ((scroll-needed
- (- (+ (term-current-row) down)
+ (- (+ (term-current-row) down)
(if (< down 0) term-scroll-start term-scroll-end))))
- (when (or (and (< down 0) (< scroll-needed 0))
+ (when (or (and (< down 0) (< scroll-needed 0))
(and (> down 0) (> scroll-needed 0)))
(let ((save-point (copy-marker (point))) (save-top))
(goto-char term-home-marker)
@@ -3706,7 +3706,7 @@ all pending output has been dealt with."))
;; contain a space, to force the previous line to continue to wrap.
;; We could do this always, but it seems preferable to not add the
;; extra space when wrapped is false.
- (when wrapped
+ (when wrapped
(insert ? ))
(insert ?\n)
(put-text-property saved-point (point) 'face 'default)
@@ -3797,8 +3797,8 @@ Should only be called when point is at the start of a screen line."
;; we need to go one line past it in order to ensure correct
;; scrolling.
(if (< save-current-row term-scroll-start)
- ;; If point is before scroll start,
- (progn
+ ;; If point is before scroll start,
+ (progn
(setq lines (- lines (- term-scroll-start save-current-row)))
(term-down (- term-scroll-start save-current-row))
(setq start (point)))
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el
index 9ac820dda72..f601976cd63 100644
--- a/lisp/term/xterm.el
+++ b/lisp/term/xterm.el
@@ -163,6 +163,22 @@
(define-key xterm-function-map "\e[4~" [select])
(define-key xterm-function-map "\e[29~" [print])
+(define-key xterm-function-map "\eOj" [kp-multiply])
+(define-key xterm-function-map "\eOk" [kp-add])
+(define-key xterm-function-map "\eOl" [kp-separator])
+(define-key xterm-function-map "\eOm" [kp-subtract])
+(define-key xterm-function-map "\eOo" [kp-divide])
+(define-key xterm-function-map "\eOp" [kp-0])
+(define-key xterm-function-map "\eOq" [kp-1])
+(define-key xterm-function-map "\eOr" [kp-2])
+(define-key xterm-function-map "\eOs" [kp-3])
+(define-key xterm-function-map "\eOt" [kp-4])
+(define-key xterm-function-map "\eOu" [kp-5])
+(define-key xterm-function-map "\eOv" [kp-6])
+(define-key xterm-function-map "\eOw" [kp-7])
+(define-key xterm-function-map "\eOx" [kp-8])
+(define-key xterm-function-map "\eOy" [kp-9])
+
;; These keys are available in xterm starting from version 216
;; if the modifyOtherKeys resource is set to 1.
@@ -177,7 +193,7 @@
(define-key xterm-function-map "\e[27;5;49~" [?\C-1])
;; Not all C-DIGIT keys have a distinct binding.
(define-key xterm-function-map "\e[27;5;57~" [?\C-9])
-(define-key xterm-function-map "\e[27;5;59~" [(C-\;)])
+(define-key xterm-function-map "\e[27;5;59~" [?\C-\;])
(define-key xterm-function-map "\e[27;5;61~" [?\C-=])
(define-key xterm-function-map "\e[27;5;92~" [?\C-\\])
@@ -186,7 +202,7 @@
(define-key xterm-function-map "\e[27;6;35~" [?\C-#])
(define-key xterm-function-map "\e[27;6;36~" [?\C-$])
(define-key xterm-function-map "\e[27;6;37~" [?\C-%])
-(define-key xterm-function-map "\e[27;6;38~" [(C-&)])
+(define-key xterm-function-map "\e[27;6;38~" [?\C-&])
(define-key xterm-function-map "\e[27;6;40~" [?\C-(])
(define-key xterm-function-map "\e[27;6;41~" [?\C-)])
(define-key xterm-function-map "\e[27;6;42~" [?\C-*])
@@ -194,13 +210,13 @@
(define-key xterm-function-map "\e[27;6;58~" [?\C-:])
(define-key xterm-function-map "\e[27;6;60~" [?\C-<])
(define-key xterm-function-map "\e[27;6;62~" [?\C->])
-(define-key xterm-function-map "\e[27;6;63~" [(C-\?)])
+(define-key xterm-function-map "\e[27;6;63~" [(control ??)])
;; These are the strings emitted for various C-M- combinations
;; for keyboards that the Meta and Alt modifiers are on the same
;; key (usually labeled "Alt").
-(define-key xterm-function-map "\e[27;13;9~" [(C-M-tab)])
-(define-key xterm-function-map "\e[27;13;13~" [(C-M-return)])
+(define-key xterm-function-map "\e[27;13;9~" [C-M-tab])
+(define-key xterm-function-map "\e[27;13;13~" [C-M-return])
(define-key xterm-function-map "\e[27;13;39~" [?\C-\M-\'])
(define-key xterm-function-map "\e[27;13;44~" [?\C-\M-,])
@@ -226,7 +242,7 @@
(define-key xterm-function-map "\e[27;14;35~" [?\C-\M-#])
(define-key xterm-function-map "\e[27;14;36~" [?\C-\M-$])
(define-key xterm-function-map "\e[27;14;37~" [?\C-\M-%])
-(define-key xterm-function-map "\e[27;14;38~" [(C-M-&)])
+(define-key xterm-function-map "\e[27;14;38~" [?\C-\M-&])
(define-key xterm-function-map "\e[27;14;40~" [?\C-\M-(])
(define-key xterm-function-map "\e[27;14;41~" [?\C-\M-)])
(define-key xterm-function-map "\e[27;14;42~" [?\C-\M-*])
@@ -234,11 +250,12 @@
(define-key xterm-function-map "\e[27;14;58~" [?\C-\M-:])
(define-key xterm-function-map "\e[27;14;60~" [?\C-\M-<])
(define-key xterm-function-map "\e[27;14;62~" [?\C-\M->])
-(define-key xterm-function-map "\e[27;14;63~" [(C-M-\?)])
+(define-key xterm-function-map "\e[27;14;63~" [(control meta ??)])
-(define-key xterm-function-map "\e[27;7;9~" [(C-M-tab)])
-(define-key xterm-function-map "\e[27;7;13~" [(C-M-return)])
+(define-key xterm-function-map "\e[27;7;9~" [C-M-tab])
+(define-key xterm-function-map "\e[27;7;13~" [C-M-return])
+(define-key xterm-function-map "\e[27;7;32~" [?\C-\M-\s])
(define-key xterm-function-map "\e[27;7;39~" [?\C-\M-\'])
(define-key xterm-function-map "\e[27;7;44~" [?\C-\M-,])
(define-key xterm-function-map "\e[27;7;45~" [?\C-\M--])
@@ -263,7 +280,7 @@
(define-key xterm-function-map "\e[27;8;35~" [?\C-\M-#])
(define-key xterm-function-map "\e[27;8;36~" [?\C-\M-$])
(define-key xterm-function-map "\e[27;8;37~" [?\C-\M-%])
-(define-key xterm-function-map "\e[27;8;38~" [(C-M-&)])
+(define-key xterm-function-map "\e[27;8;38~" [?\C-\M-&])
(define-key xterm-function-map "\e[27;8;40~" [?\C-\M-(])
(define-key xterm-function-map "\e[27;8;41~" [?\C-\M-)])
(define-key xterm-function-map "\e[27;8;42~" [?\C-\M-*])
@@ -271,13 +288,13 @@
(define-key xterm-function-map "\e[27;8;58~" [?\C-\M-:])
(define-key xterm-function-map "\e[27;8;60~" [?\C-\M-<])
(define-key xterm-function-map "\e[27;8;62~" [?\C-\M->])
-(define-key xterm-function-map "\e[27;8;63~" [(C-M-\?)])
+(define-key xterm-function-map "\e[27;8;63~" [(control meta ??)])
(define-key xterm-function-map "\e[27;2;9~" [S-tab])
(define-key xterm-function-map "\e[27;2;13~" [S-return])
-(define-key xterm-function-map "\e[27;6;9~" [(C-S-tab)])
-(define-key xterm-function-map "\e[27;6;13~" [(C-S-return)])
+(define-key xterm-function-map "\e[27;6;9~" [C-S-tab])
+(define-key xterm-function-map "\e[27;6;13~" [C-S-return])
;; Other versions of xterm might emit these.
(define-key xterm-function-map "\e[A" [up])
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el
index 06fa3a01186..0545ca85812 100644
--- a/lisp/textmodes/bibtex.el
+++ b/lisp/textmodes/bibtex.el
@@ -224,7 +224,7 @@ If parsing fails, try to set this variable to nil."
:group 'bibtex
:type 'boolean)
-(defvar bibtex-entry-field-alist
+(defcustom bibtex-entry-field-alist
'(("Article"
((("author" "Author1 [and Author2 ...] [and others]")
("title" "Title of the article (BibTeX converts it to lowercase)")
@@ -452,7 +452,47 @@ appears in the echo area, INIT is either the initial content of the
field or a function, which is called to determine the initial content
of the field, and ALTERNATIVE-FLAG (either nil or t) marks if the
field is an alternative. ALTERNATIVE-FLAG may be t only in the
-REQUIRED or CROSSREF-REQUIRED lists.")
+REQUIRED or CROSSREF-REQUIRED lists."
+ :group 'bibtex
+ :type '(repeat (list (string :tag "Entry name")
+ (list (repeat :tag "required"
+ (group (string :tag "Field")
+ (string :tag "Comment")
+ (option (choice :tag "Init" :value nil
+ (const nil)
+ (string :tag "string")
+ (function :tag "function")))
+ (option (choice (const nil)
+ (const :tag "Alternative" t)))))
+ (repeat :tag "optional"
+ (group (string :tag "Field")
+ (string :tag "Comment")
+ (option (choice :tag "Init" :value nil
+ (const nil)
+ (string :tag "string")
+ (function :tag "function")))
+ (option (choice (const nil)
+ (const :tag "Alternative" t))))))
+ (option
+ (list :tag "Crossref"
+ (repeat :tag "required"
+ (group (string :tag "Field")
+ (string :tag "Comment")
+ (option (choice :tag "Init" :value nil
+ (const nil)
+ (string :tag "string")
+ (function :tag "function")))
+ (option (choice (const nil)
+ (const :tag "Alternative" t)))))
+ (repeat :tag "optional"
+ (group (string :tag "Field")
+ (string :tag "Comment")
+ (option (choice :tag "Init" :value nil
+ (const nil)
+ (string :tag "string")
+ (function :tag "function")))
+ (option (choice (const nil)
+ (const :tag "Alternative" t))))))))))
(put 'bibtex-entry-field-alist 'risky-local-variable t)
(defcustom bibtex-comment-start "@Comment"
@@ -1785,7 +1825,7 @@ Optional arg COMMA is as in `bibtex-enclosing-field'."
(set-mark (point))
(message "Mark set")
(bibtex-make-field (funcall fun 'bibtex-field-kill-ring-yank-pointer
- bibtex-field-kill-ring) t))
+ bibtex-field-kill-ring) t nil t))
;; insert past the current entry
(bibtex-skip-to-valid-entry)
(set-mark (point))
@@ -2831,7 +2871,7 @@ and `bibtex-user-optional-fields'."
(push (list "key"
"Used for reference key creation if author and editor fields are missing"
(if (or (stringp bibtex-include-OPTkey)
- (fboundp bibtex-include-OPTkey))
+ (functionp bibtex-include-OPTkey))
bibtex-include-OPTkey))
optional))
(if (member-ignore-case entry-type bibtex-include-OPTcrossref)
@@ -3020,7 +3060,7 @@ interactive calls."
(if comment (message "%s" (nth 1 comment))
(message "No comment available")))))
-(defun bibtex-make-field (field &optional move interactive)
+(defun bibtex-make-field (field &optional move interactive nodelim)
"Make a field named FIELD in current BibTeX entry.
FIELD is either a string or a list of the form
\(FIELD-NAME COMMENT-STRING INIT ALTERNATIVE-FLAG) as in
@@ -3028,7 +3068,8 @@ FIELD is either a string or a list of the form
If MOVE is non-nil, move point past the present field before making
the new field. If INTERACTIVE is non-nil, move point to the end of
the new field. Otherwise move point past the new field.
-MOVE and INTERACTIVE are t when called interactively."
+MOVE and INTERACTIVE are t when called interactively.
+INIT is surrounded by field delimiters, unless NODELIM is non-nil."
(interactive
(list (let ((completion-ignore-case t)
(field-list (bibtex-field-list
@@ -3058,10 +3099,13 @@ MOVE and INTERACTIVE are t when called interactively."
(indent-to-column (+ bibtex-entry-offset
bibtex-text-indentation)))
(let ((init (nth 2 field)))
- (insert (cond ((stringp init) init)
- ((fboundp init) (funcall init))
- (t (concat (bibtex-field-left-delimiter)
- (bibtex-field-right-delimiter))))))
+ (if (not init) (setq init "")
+ (if (functionp init) (setq init (funcall init)))
+ (unless (stringp init) (error "`%s' is not a string" init)))
+ ;; NODELIM is required by `bibtex-insert-kill'
+ (if nodelim (insert init)
+ (insert (bibtex-field-left-delimiter) init
+ (bibtex-field-right-delimiter))))
(when interactive
;; (bibtex-find-text nil nil bibtex-help-message)
(if (memq (preceding-char) '(?} ?\")) (forward-char -1))
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index a6bd082af38..339160db9bd 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -431,7 +431,7 @@ property of the major mode name.")
(defface flyspell-incorrect
'((((class color)) (:foreground "OrangeRed" :bold t :underline t))
(t (:bold t)))
- "Face used to display a misspelled word in Flyspell."
+ "Face used for marking a misspelled word in Flyspell."
:group 'flyspell)
;; backward-compatibility alias
(put 'flyspell-incorrect-face 'face-alias 'flyspell-incorrect)
@@ -439,7 +439,7 @@ property of the major mode name.")
(defface flyspell-duplicate
'((((class color)) (:foreground "Gold3" :bold t :underline t))
(t (:bold t)))
- "Face used to display subsequent occurrences of a misspelled word.
+ "Face used for marking a misspelled word that appears twice in the buffer.
See also `flyspell-duplicate-distance'."
:group 'flyspell)
;; backward-compatibility alias
@@ -1509,7 +1509,7 @@ The buffer to mark them in is `flyspell-large-region-buffer'."
(if flyspell-issue-message-flag (message "Checking region..."))
(set-buffer curbuf)
(ispell-check-version)
- (let ((c (apply 'call-process-region beg
+ (let ((c (apply 'ispell-call-process-region beg
end
ispell-program-name
nil
diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el
index a727fa2df5a..8ee12638dee 100644
--- a/lisp/textmodes/org.el
+++ b/lisp/textmodes/org.el
@@ -5,7 +5,7 @@
;; Author: Carsten Dominik <dominik at science dot uva dot nl>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/
-;; Version: 4.67c
+;; Version: 4.67d
;;
;; This file is part of GNU Emacs.
;;
@@ -7952,7 +7952,10 @@ Parameters get priority."
entry s)
(switch-to-buffer-other-window "*Edit Formulas*")
(erase-buffer)
- (fundamental-mode)
+ ;; Keep global-font-lock-mode from turning on font-lock-mode
+ (let ((font-lock-global-modes '(not fundamental-mode)))
+ (fundamental-mode))
+ (org-set-local 'font-lock-global-modes (list 'not major-mode))
(org-set-local 'org-pos pos)
(org-set-local 'org-window-configuration wc)
(use-local-map org-edit-formulas-map)
@@ -12945,6 +12948,8 @@ The following commands are available:
(setq org-agenda-undo-list nil
org-agenda-pending-undo-list nil)
(setq major-mode 'org-agenda-mode)
+ ;; Keep global-font-lock-mode from turning on font-lock-mode
+ (org-set-local 'font-lock-global-modes (list 'not major-mode))
(setq mode-name "Org-Agenda")
(use-local-map org-agenda-mode-map)
(easy-menu-add org-agenda-menu)
diff --git a/lisp/textmodes/reftex-auc.el b/lisp/textmodes/reftex-auc.el
index 7930574f0e7..02840a692e7 100644
--- a/lisp/textmodes/reftex-auc.el
+++ b/lisp/textmodes/reftex-auc.el
@@ -4,6 +4,7 @@
;; 2006, 2007 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
+;; Maintainer: auctex-devel@gnu.org
;; Version: 4.31
;; This file is part of GNU Emacs.
diff --git a/lisp/textmodes/reftex-cite.el b/lisp/textmodes/reftex-cite.el
index ded1caa12bd..3dcd785dd4d 100644
--- a/lisp/textmodes/reftex-cite.el
+++ b/lisp/textmodes/reftex-cite.el
@@ -4,6 +4,7 @@
;; 2006, 2007 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
+;; Maintainer: auctex-devel@gnu.org
;; Version: 4.31
;; This file is part of GNU Emacs.
diff --git a/lisp/textmodes/reftex-dcr.el b/lisp/textmodes/reftex-dcr.el
index bd0d75760b6..60ed932c534 100644
--- a/lisp/textmodes/reftex-dcr.el
+++ b/lisp/textmodes/reftex-dcr.el
@@ -4,8 +4,8 @@
;; 2006, 2007 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
+;; Maintainer: auctex-devel@gnu.org
;; Version: 4.31
-;;
;; This file is part of GNU Emacs.
diff --git a/lisp/textmodes/reftex-global.el b/lisp/textmodes/reftex-global.el
index 403e4e84ea8..9ddfb5a4aca 100644
--- a/lisp/textmodes/reftex-global.el
+++ b/lisp/textmodes/reftex-global.el
@@ -4,6 +4,7 @@
;; 2006, 2007 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
+;; Maintainer: auctex-devel@gnu.org
;; Version: 4.31
;; This file is part of GNU Emacs.
diff --git a/lisp/textmodes/reftex-index.el b/lisp/textmodes/reftex-index.el
index 25525fef6dd..ee2c2aefcf5 100644
--- a/lisp/textmodes/reftex-index.el
+++ b/lisp/textmodes/reftex-index.el
@@ -4,6 +4,7 @@
;; 2006, 2007 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
+;; Maintainer: auctex-devel@gnu.org
;; Version: 4.31
;; This file is part of GNU Emacs.
diff --git a/lisp/textmodes/reftex-parse.el b/lisp/textmodes/reftex-parse.el
index 8ee552b3226..d18b3e85651 100644
--- a/lisp/textmodes/reftex-parse.el
+++ b/lisp/textmodes/reftex-parse.el
@@ -4,8 +4,8 @@
;; 2006, 2007 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
+;; Maintainer: auctex-devel@gnu.org
;; Version: 4.31
-;;
;; This file is part of GNU Emacs.
diff --git a/lisp/textmodes/reftex-ref.el b/lisp/textmodes/reftex-ref.el
index a0471f18b82..e95dc16f133 100644
--- a/lisp/textmodes/reftex-ref.el
+++ b/lisp/textmodes/reftex-ref.el
@@ -4,6 +4,7 @@
;; 2006, 2007 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
+;; Maintainer: auctex-devel@gnu.org
;; Version: 4.31
;; This file is part of GNU Emacs.
diff --git a/lisp/textmodes/reftex-sel.el b/lisp/textmodes/reftex-sel.el
index 9b9d60d1f62..8f1bb3d13a8 100644
--- a/lisp/textmodes/reftex-sel.el
+++ b/lisp/textmodes/reftex-sel.el
@@ -4,6 +4,7 @@
;; 2006, 2007 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
+;; Maintainer: auctex-devel@gnu.org
;; Version: 4.31
;; This file is part of GNU Emacs.
diff --git a/lisp/textmodes/reftex-toc.el b/lisp/textmodes/reftex-toc.el
index 84269dfc091..8d2287b51cb 100644
--- a/lisp/textmodes/reftex-toc.el
+++ b/lisp/textmodes/reftex-toc.el
@@ -3,6 +3,7 @@
;; 2006, 2007 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
+;; Maintainer: auctex-devel@gnu.org
;; Version: 4.31
;; This file is part of GNU Emacs.
diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el
index 40e73b49f3d..bfc5581ccac 100644
--- a/lisp/textmodes/reftex-vars.el
+++ b/lisp/textmodes/reftex-vars.el
@@ -4,6 +4,7 @@
;; 2006, 2007 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
+;; Maintainer: auctex-devel@gnu.org
;; Version: 4.31
;; This file is part of GNU Emacs.
diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el
index 39141541d82..343a7c5a947 100644
--- a/lisp/textmodes/reftex.el
+++ b/lisp/textmodes/reftex.el
@@ -3,6 +3,7 @@
;; 2006, 2007 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
+;; Maintainer: auctex-devel@gnu.org
;; Version: 4.31
;; Keywords: tex
diff --git a/lisp/tmm.el b/lisp/tmm.el
index f9583e76cee..db2cc0c4c0a 100644
--- a/lisp/tmm.el
+++ b/lisp/tmm.el
@@ -41,7 +41,7 @@
(defvar tmm-short-cuts)
(defvar tmm-old-mb-map nil)
(defvar tmm-old-comp-map)
-(defvar tmm-c-prompt)
+(defvar tmm-c-prompt nil)
(defvar tmm-km-list)
(defvar tmm-next-shortcut-digit)
(defvar tmm-table-undef)
@@ -70,17 +70,22 @@ we make that menu bar item (the one at that position) the default choice."
(list this-one)))))
(setq list (cdr list))))
(if x-position
- (let ((tail menu-bar)
- this-one
- (column 0))
- (while (and tail (< column x-position))
+ (let ((tail menu-bar) (column 0)
+ this-one name visible)
+ (while (and tail (<= column x-position))
(setq this-one (car tail))
- (if (and (consp (car tail))
- (consp (cdr (car tail)))
- (stringp (nth 1 (car tail))))
- (setq column (+ column
- (length (nth 1 (car tail)))
- 1)))
+ (if (and (consp this-one)
+ (consp (cdr this-one))
+ (setq name ;simple menu
+ (cond ((stringp (nth 1 this-one))
+ (nth 1 this-one))
+ ;extended menu
+ ((stringp (nth 2 this-one))
+ (setq visible (plist-get
+ (nthcdr 4 this-one) :visible))
+ (unless (and visible (not (eval visible)))
+ (nth 2 this-one))))))
+ (setq column (+ column (length name) 1)))
(setq tail (cdr tail)))
(setq menu-bar-item (car this-one))))
(tmm-prompt menu-bar nil menu-bar-item)))
@@ -187,14 +192,20 @@ Its value should be an event that has a binding in MENU."
;; We use this to decide the initial minibuffer contents
;; and initial history position.
(if default-item
- (let ((tail menu))
+ (let ((tail menu) visible)
(while (and tail
(not (eq (car-safe (car tail)) default-item)))
;; Be careful to count only the elements of MENU
;; that actually constitute menu bar items.
(if (and (consp (car tail))
(or (stringp (car-safe (cdr (car tail))))
- (eq (car-safe (cdr (car tail))) 'menu-item)))
+ (and
+ (eq (car-safe (cdr (car tail))) 'menu-item)
+ (progn
+ (setq visible
+ (plist-get
+ (nthcdr 4 (car tail)) :visible))
+ (or (not visible) (eval visible))))))
(setq index-of-default (1+ index-of-default)))
(setq tail (cdr tail)))))
(let ((prompt (concat "^." (regexp-quote tmm-mid-prompt))))
@@ -209,21 +220,24 @@ Its value should be an event that has a binding in MENU."
(setq history (append history history history history))
(setq tmm-c-prompt (nth (- history-len 1 index-of-default) history))
(add-hook 'minibuffer-setup-hook 'tmm-add-prompt)
- (save-excursion
- (unwind-protect
- (setq out
- (completing-read
- (concat gl-str " (up/down to change, PgUp to menu): ")
- tmm-km-list nil t nil
- (cons 'history (- (* 2 history-len) index-of-default))))
- (save-excursion
- (remove-hook 'minibuffer-setup-hook 'tmm-add-prompt)
- (if (get-buffer "*Completions*")
- (progn
- (set-buffer "*Completions*")
- (use-local-map tmm-old-comp-map)
- (bury-buffer (current-buffer)))))
- ))))
+ (if default-item
+ (setq out (car (nth index-of-default tmm-km-list)))
+ (save-excursion
+ (unwind-protect
+ (setq out
+ (completing-read
+ (concat gl-str
+ " (up/down to change, PgUp to menu): ")
+ tmm-km-list nil t nil
+ (cons 'history
+ (- (* 2 history-len) index-of-default))))
+ (save-excursion
+ (remove-hook 'minibuffer-setup-hook 'tmm-add-prompt)
+ (if (get-buffer "*Completions*")
+ (progn
+ (set-buffer "*Completions*")
+ (use-local-map tmm-old-comp-map)
+ (bury-buffer (current-buffer))))))))))
(setq choice (cdr (assoc out tmm-km-list)))
(and (null choice)
(> (length out) (length tmm-c-prompt))
@@ -513,7 +527,7 @@ If KEYSEQ is a prefix key that has local and global bindings,
we merge them into a single keymap which shows the proper order of the menu.
However, for the menu bar itself, the value does not take account
of `menu-bar-final-items'."
- (let (allbind bind)
+ (let (allbind bind minorbind localbind globalbind)
(setq bind (key-binding keyseq))
;; If KEYSEQ is a prefix key, then BIND is either nil
;; or a symbol defined as a keymap (which satisfies keymapp).
@@ -524,9 +538,21 @@ of `menu-bar-final-items'."
(progn
;; Otherwise, it is a prefix, so make a list of the subcommands.
;; Make a list of all the bindings in all the keymaps.
- (setq allbind (mapcar 'cdr (minor-mode-key-binding keyseq)))
- (setq allbind (cons (local-key-binding keyseq) allbind))
- (setq allbind (cons (global-key-binding keyseq) allbind))
+ (setq minorbind (mapcar 'cdr (minor-mode-key-binding keyseq)))
+ (setq localbind (local-key-binding keyseq))
+ (setq globalbind (copy-sequence (cdr (global-key-binding keyseq))))
+
+ ;; If items have been redefined/undefined locally, remove them from
+ ;; the global list.
+ (dolist (minor minorbind)
+ (dolist (item (cdr minor))
+ (setq globalbind (assq-delete-all (car-safe item) globalbind))))
+ (dolist (item (cdr localbind))
+ (setq globalbind (assq-delete-all (car-safe item) globalbind)))
+
+ (setq globalbind (cons 'keymap globalbind))
+ (setq allbind (cons globalbind (cons localbind minorbind)))
+
;; Merge all the elements of ALLBIND into one keymap.
(mapc (lambda (in)
(if (and (symbolp in) (keymapp in))
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index eb058534f63..8c53d49fdd1 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,28 @@
+2007-04-15 Chong Yidong <cyd@stupidchicken.com>
+
+ * url-parse.el (url-generic-parse-url): Revert 2006-10-09 changes.
+
+2007-04-13 Chong Yidong <cyd@stupidchicken.com>
+
+ * url-http.el (url-http-parse-headers): Stop after a set number of
+ redirections. Suggested by Diane Murray.
+
+ * url-vars.el (url-max-redirections): New var.
+
+2007-04-01 Diane Murray <disumu@x3y2z1.net> (tiny change)
+
+ * url-http.el (url-http-handle-cookies): Reverse list returned by
+ `mail-fetch-field', so that cookies are set in the correct order.
+
+ * url-cookie.el (url-cookie-retrieve, url-cookie-host-can-set-p):
+ Deal with wildcard dots in domain values.
+
+2007-03-31 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de>
+
+ * url-http.el (url-http-mark-connection-as-busy)
+ (url-http-mark-connection-as-free): Clear query-on-exit flag on
+ idle connections.
+
2007-02-04 Chong Yidong <cyd@stupidchicken.com>
* url-http.el (url-http-connection-opened): New variable.
@@ -51,7 +76,7 @@
(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>
+2006-11-23 Diane Murray <disumu@x3y2z1.net> (tiny change)
* url-http.el (url-http-content-length-after-change-function): Use
`url-lazy-message'.
@@ -160,7 +185,7 @@
getenv returns an empty string for http_proxy. This prevents an
error when calling `format' later on.
-2006-08-31 Diane Murray <disumu@x3y2z1.net>
+2006-08-31 Diane Murray <disumu@x3y2z1.net> (tiny change)
* url-parse.el (url-recreate-url-attributes): New function, code
simply moved from `url-recreate-url'.
@@ -170,7 +195,7 @@
* url-http.el (url-http-create-request):
Use `url-recreate-url-attributes' when setting real-fname.
-2006-08-29 Diane Murray <disumu@x3y2z1.net>
+2006-08-29 Diane Murray <disumu@x3y2z1.net> (tiny change)
* url-cookie.el (url-cookie-write-file): Really don't use versioned
backups.
diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el
index cfe4f8ecf71..8d729c92369 100644
--- a/lisp/url/url-cookie.el
+++ b/lisp/url/url-cookie.el
@@ -272,7 +272,15 @@ telling Microsoft that."
storage (cdr storage)
cookies (cdr cur))
(if (and (car cur)
- (string-match (concat "^.*" (regexp-quote (car cur)) "$") host))
+ (string-match
+ (concat "^.*"
+ (regexp-quote
+ ;; Remove the dot from wildcard domains
+ ;; before matching.
+ (if (eq ?. (aref (car cur) 0))
+ (substring (car cur) 1)
+ (car cur)))
+ "$") host))
;; The domains match - a possible hit!
(while cookies
(setq cur (car cookies)
@@ -344,7 +352,13 @@ telling Microsoft that."
((>= numdots mindots) ; We have enough dots in domain name
;; Need to check and make sure the host is actually _in_ the
;; domain it wants to set a cookie for though.
- (string-match (concat (regexp-quote domain) "$") host))
+ (string-match (concat (regexp-quote
+ ;; Remove the dot from wildcard domains
+ ;; before matching.
+ (if (eq ?. (aref domain 0))
+ (substring domain 1)
+ domain))
+ "$") host))
(t
nil))))
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index 1d4d64f0e4d..d9ac81838d4 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -87,6 +87,7 @@ request.")
(defun url-http-mark-connection-as-busy (host port proc)
(url-http-debug "Marking connection as busy: %s:%d %S" host port proc)
+ (set-process-query-on-exit-flag proc t)
(puthash (cons host port)
(delq proc (gethash (cons host port) url-http-open-connections))
url-http-open-connections)
@@ -97,6 +98,7 @@ request.")
(when (memq (process-status proc) '(open run connect))
(set-process-buffer proc nil)
(set-process-sentinel proc 'url-http-idle-sentinel)
+ (set-process-query-on-exit-flag proc nil)
(puthash (cons host port)
(cons proc (gethash (cons host port) url-http-open-connections))
url-http-open-connections))
@@ -379,8 +381,8 @@ This allows us to use `mail-fetch-field', etc."
"Handle all set-cookie / set-cookie2 headers in an HTTP response.
The buffer must already be narrowed to the headers, so `mail-fetch-field' will
work correctly."
- (let ((cookies (mail-fetch-field "Set-Cookie" nil nil t))
- (cookies2 (mail-fetch-field "Set-Cookie2" nil nil t)))
+ (let ((cookies (nreverse (mail-fetch-field "Set-Cookie" nil nil t)))
+ (cookies2 (nreverse (mail-fetch-field "Set-Cookie2" nil nil t))))
(and cookies (url-http-debug "Found %d Set-Cookie headers" (length cookies)))
(and cookies2 (url-http-debug "Found %d Set-Cookie2 headers" (length cookies2)))
(while cookies
@@ -554,21 +556,43 @@ should be shown to the user."
(let ((url-request-method url-http-method)
(url-request-data url-http-data)
(url-request-extra-headers url-http-extra-headers))
- ;; Remember that the request was redirected.
- (setf (car url-callback-arguments)
- (nconc (list :redirect redirect-uri)
- (car url-callback-arguments)))
- ;; Put in the current buffer a forwarding pointer to the new
- ;; destination buffer.
- ;; FIXME: This is a hack to fix url-retrieve-synchronously
- ;; without changing the API. Instead url-retrieve should
- ;; either simply not return the "destination" buffer, or it
- ;; should take an optional `dest-buf' argument.
- (set (make-local-variable 'url-redirect-buffer)
- (url-retrieve-internal
- redirect-uri url-callback-function
- url-callback-arguments))
- (url-mark-buffer-as-dead (current-buffer))))))
+ ;; Check existing number of redirects
+ (if (or (< url-max-redirections 0)
+ (and (> url-max-redirections 0)
+ (let ((events (car url-callback-arguments))
+ (old-redirects 0))
+ (while events
+ (if (eq (car events) :redirect)
+ (setq old-redirects (1+ old-redirects)))
+ (and (setq events (cdr events))
+ (setq events (cdr events))))
+ (< old-redirects url-max-redirections))))
+ ;; url-max-redirections hasn't been reached, so go
+ ;; ahead and redirect.
+ (progn
+ ;; Remember that the request was redirected.
+ (setf (car url-callback-arguments)
+ (nconc (list :redirect redirect-uri)
+ (car url-callback-arguments)))
+ ;; Put in the current buffer a forwarding pointer to the new
+ ;; destination buffer.
+ ;; FIXME: This is a hack to fix url-retrieve-synchronously
+ ;; without changing the API. Instead url-retrieve should
+ ;; either simply not return the "destination" buffer, or it
+ ;; should take an optional `dest-buf' argument.
+ (set (make-local-variable 'url-redirect-buffer)
+ (url-retrieve-internal
+ redirect-uri url-callback-function
+ url-callback-arguments))
+ (url-mark-buffer-as-dead (current-buffer)))
+ ;; We hit url-max-redirections, so issue an error and
+ ;; stop redirecting.
+ (url-http-debug "Maximum redirections reached")
+ (setf (car url-callback-arguments)
+ (nconc (list :error (list 'error 'http-redirect-limit
+ redirect-uri))
+ (car url-callback-arguments)))
+ (setq success t))))))
(4 ; Client error
;; 400 Bad Request
;; 401 Unauthorized
diff --git a/lisp/url/url-parse.el b/lisp/url/url-parse.el
index 2b69c54133f..a9a0fb151e9 100644
--- a/lisp/url/url-parse.el
+++ b/lisp/url/url-parse.el
@@ -108,7 +108,7 @@
(defun url-recreate-url-attributes (urlobj)
"Recreate the attributes of an URL string from the parsed URLOBJ."
(when (url-attributes urlobj)
- (concat "?"
+ (concat ";"
(mapconcat (lambda (x)
(if (cdr x)
(concat (car x) "=" (cdr x))
@@ -168,7 +168,7 @@ Format is:
(setq full t)
(forward-char 2)
(setq save-pos (point))
- (skip-chars-forward "^/\\?#")
+ (skip-chars-forward "^/")
(setq host (buffer-substring save-pos (point)))
(if (string-match "^\\([^@]+\\)@" host)
(setq user (match-string 1 host)
@@ -189,25 +189,29 @@ Format is:
(setq port (url-scheme-get-property prot 'default-port)))
;; 3.3. Path
+ ;; Gross hack to preserve ';' in data URLs
(setq save-pos (point))
- (skip-chars-forward "^#?")
- (setq file (buffer-substring save-pos (point)))
;; 3.4. Query
- (when (looking-at "\\?")
- (forward-char 1)
- (setq save-pos (point))
+ (if (string= "data" prot)
+ (goto-char (point-max))
+ ;; Now check for references
(skip-chars-forward "^#")
- ;; RFC 3986 specifies no general way of parsing the query
- ;; string, but `url-parse-args' seems universal enough.
- (setq attr (url-parse-args (buffer-substring save-pos (point)) t)
- attr (nreverse attr)))
-
- ;; 3.5. Fragment
- (when (looking-at "#")
- (forward-char 1)
- (setq refs (buffer-substring (point) (point-max))))
+ (if (eobp)
+ nil
+ (delete-region
+ (point)
+ (progn
+ (skip-chars-forward "#")
+ (setq refs (buffer-substring (point) (point-max)))
+ (point-max))))
+ (goto-char save-pos)
+ (skip-chars-forward "^;")
+ (if (not (eobp))
+ (setq attr (url-parse-args (buffer-substring (point) (point-max)) t)
+ attr (nreverse attr))))
+ (setq file (buffer-substring save-pos (point)))
(if (and host (string-match "%[0-9][0-9]" host))
(setq host (url-unhex-string host)))
(vector prot user pass host port file refs attr full))))))
diff --git a/lisp/url/url-vars.el b/lisp/url/url-vars.el
index 705eb947001..d0bd9a84c05 100644
--- a/lisp/url/url-vars.el
+++ b/lisp/url/url-vars.el
@@ -320,6 +320,12 @@ undefined."
"\\`\\([-a-zA-Z0-9+.]+:\\)"
"A regular expression that will match an absolute URL.")
+(defcustom url-max-redirections 30
+ "*The maximum number of redirection requests to honor in a HTTP connection.
+A negative number means to honor an unlimited number of redirection requests."
+ :type 'integer
+ :group 'url)
+
(defcustom url-confirmation-func 'y-or-n-p
"*What function to use for asking yes or no functions.
Possible values are `yes-or-no-p' or `y-or-n-p', or any function that
diff --git a/lisp/vc-arch.el b/lisp/vc-arch.el
index 0f02db0ba96..488f9108d36 100644
--- a/lisp/vc-arch.el
+++ b/lisp/vc-arch.el
@@ -109,6 +109,19 @@
(defconst vc-arch-tagline-re "^\\W*arch-tag:[ \t]*\\(.*[^ \t\n]\\)")
+(defmacro vc-with-current-file-buffer (file &rest body)
+ (declare (indent 2) (debug t))
+ `(let ((-kill-buf- nil)
+ (-file- ,file))
+ (with-current-buffer (or (find-buffer-visiting -file-)
+ (setq -kill-buf- (generate-new-buffer " temp")))
+ ;; Avoid find-file-literally since it can do many undesirable extra
+ ;; things (among which, call us back into an infinite loop).
+ (if -kill-buf- (insert-file-contents -file-))
+ (unwind-protect
+ (progn ,@body)
+ (if (buffer-live-p -kill-buf-) (kill-buffer -kill-buf-))))))
+
(defun vc-arch-file-source-p (file)
"Can return nil, `maybe' or a non-nil value.
Only the value `maybe' can be trusted :-(."
@@ -122,7 +135,7 @@ Only the value `maybe' can be trusted :-(."
(concat ".arch-ids/" (file-name-nondirectory file) ".id")
(file-name-directory file)))
;; Check the presence of a tagline.
- (with-current-buffer (find-file-noselect file)
+ (vc-with-current-file-buffer file
(save-excursion
(goto-char (point-max))
(or (re-search-backward vc-arch-tagline-re (- (point) 1000) t)
diff --git a/lisp/vc-rcs.el b/lisp/vc-rcs.el
index ae4758169f4..a4b3b11301e 100644
--- a/lisp/vc-rcs.el
+++ b/lisp/vc-rcs.el
@@ -666,6 +666,7 @@ Optional arg REVISION is a revision to annotate from."
" "
(aref rda 0)
ls)
+ :vc-annotate-prefix t
:vc-rcs-r/d/a rda)))
(maphash
(if all-me
@@ -688,9 +689,9 @@ encoded as fractional days."
"Return the time of the next annotation (as fraction of days)
systime, or nil if there is none. Also, reposition point."
(unless (eobp)
- (search-forward ": ")
- (vc-annotate-convert-time
- (aref (get-text-property (point) :vc-rcs-r/d/a) 1))))
+ (prog1 (vc-annotate-convert-time
+ (aref (get-text-property (point) :vc-rcs-r/d/a) 1))
+ (goto-char (next-single-property-change (point) :vc-annotate-prefix)))))
(defun vc-rcs-annotate-extract-revision-at-line ()
(aref (get-text-property (point) :vc-rcs-r/d/a) 0))
@@ -907,7 +908,7 @@ Returns: nil if no headers were found
(vc-file-setprop file 'vc-state
(cond
((eq locking-user 'none) 'up-to-date)
- ((string= locking-user (vc-user-login-name file))
+ ((string= locking-user (vc-user-login-name file))
'edited)
(t locking-user)))
;; If the file has headers, we don't want to query the
diff --git a/lisp/view.el b/lisp/view.el
index f914624d6f6..8dd9e032868 100644
--- a/lisp/view.el
+++ b/lisp/view.el
@@ -438,7 +438,7 @@ p searches backward for last regular expression.
\\[View-leave] quit View mode and maybe switch buffers, but don't kill this buffer.
\\[View-kill-and-leave] quit View mode, kill current buffer and go back to other buffer.
-The effect of \\[View-leave] , \\[View-quit] and \\[View-kill-and-leave] depends on how view-mode was entered. If it was
+The effect of \\[View-leave], \\[View-quit] and \\[View-kill-and-leave] depends on how view-mode was entered. If it was
entered by view-file, view-file-other-window, view-file-other-frame, or
\\[dired-view-file] \(\\[view-file], \\[view-file-other-window],
\\[view-file-other-frame], or the Dired mode v command),
@@ -446,7 +446,7 @@ then \\[View-quit] will try to kill the current buffer.
If view-mode was entered from another buffer, by \\[view-buffer],
\\[view-buffer-other-window], \\[view-buffer-other frame], \\[view-file],
\\[view-file-other-window], or \\[view-file-other-frame],
-then \\[View-leave] , \\[View-quit] and \\[View-kill-and-leave] will return to that buffer.
+then \\[View-leave], \\[View-quit] and \\[View-kill-and-leave] will return to that buffer.
Entry to view-mode runs the normal hook `view-mode-hook'."
(interactive "P")
diff --git a/lisp/whitespace.el b/lisp/whitespace.el
index dc7f691e721..1c670d77458 100644
--- a/lisp/whitespace.el
+++ b/lisp/whitespace.el
@@ -102,42 +102,34 @@ visited by the buffers.")
(defvar whitespace-mode nil
"Non-nil when Whitespace mode (a minor mode) is enabled.")
(make-variable-buffer-local 'whitespace-mode)
-(put 'whitespace-mode 'permanent-local nil)
(defvar whitespace-mode-line nil
"String to display in the mode line for Whitespace mode.")
(make-variable-buffer-local 'whitespace-mode-line)
-(put 'whitespace-mode-line 'permanent-local nil)
(defvar whitespace-check-buffer-leading nil
"Test leading whitespace for file in current buffer if t.")
(make-variable-buffer-local 'whitespace-check-buffer-leading)
-(put 'whitespace-check-buffer-leading 'permanent-local nil)
(defvar whitespace-check-buffer-trailing nil
"Test trailing whitespace for file in current buffer if t.")
(make-variable-buffer-local 'whitespace-check-buffer-trailing)
-(put 'whitespace-check-buffer-trailing 'permanent-local nil)
(defvar whitespace-check-buffer-indent nil
"Test indentation whitespace for file in current buffer if t.")
(make-variable-buffer-local 'whitespace-check-buffer-indent)
-(put 'whitespace-check-buffer-indent 'permanent-local nil)
(defvar whitespace-check-buffer-spacetab nil
"Test Space-followed-by-TABS whitespace for file in current buffer if t.")
(make-variable-buffer-local 'whitespace-check-buffer-spacetab)
-(put 'whitespace-check-buffer-spacetab 'permanent-local nil)
(defvar whitespace-check-buffer-ateol nil
"Test end-of-line whitespace for file in current buffer if t.")
(make-variable-buffer-local 'whitespace-check-buffer-ateol)
-(put 'whitespace-check-buffer-ateol 'permanent-local nil)
(defvar whitespace-highlighted-space nil
"The variable to store the extent to highlight.")
(make-variable-buffer-local 'whitespace-highlighted-space)
-(put 'whitespace-highlighted-space 'permanent-local nil)
;; For flavors of Emacs which don't define `defgroup' and `defcustom'.
(eval-when-compile
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index 035f54b8980..4c560918594 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -84,7 +84,7 @@
:group 'hypermedia)
(defgroup widget-documentation nil
- "Options controling the display of documentation strings."
+ "Options controlling the display of documentation strings."
:group 'widgets)
(defgroup widget-faces nil
diff --git a/lisp/woman.el b/lisp/woman.el
index ffa0ea692ad..43ebd8df013 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -486,24 +486,28 @@ As a special case, if PATHS is nil then replace it by calling
(defun woman-Cyg-to-Win (file)
"Convert an absolute filename FILE from Cygwin to Windows form."
- ;; Code taken from w32-symlinks.el
- (if (eq (aref file 0) ?/)
- ;; Try to use Cygwin mount table via `cygpath.exe'.
- (condition-case nil
- (with-temp-buffer
- ;; cygpath -m file
- (call-process "cygpath" nil t nil "-m" file)
- (buffer-substring 1 (buffer-size)))
- (error
- ;; Assume no `cygpath' program available.
- ;; Hack /cygdrive/x/ or /x/ or (obsolete) //x/ to x:/
- (when (string-match "\\`\\(/cygdrive\\|/\\)?/./" file)
- (if (match-string 1) ; /cygdrive/x/ or //x/ -> /x/
- (setq file (substring file (match-end 1))))
- (aset file 0 (aref file 1)) ; /x/ -> xx/
- (aset file 1 ?:)) ; xx/ -> x:/
- file))
- file))
+ ;; MANPATH_MAP conses are not converted since they presumably map
+ ;; Cygwin to Cygwin form.
+ (if (consp file)
+ file
+ ;; Code taken from w32-symlinks.el
+ (if (eq (aref file 0) ?/)
+ ;; Try to use Cygwin mount table via `cygpath.exe'.
+ (condition-case nil
+ (with-temp-buffer
+ ;; cygpath -m file
+ (call-process "cygpath" nil t nil "-m" file)
+ (buffer-substring 1 (buffer-size)))
+ (error
+ ;; Assume no `cygpath' program available.
+ ;; Hack /cygdrive/x/ or /x/ or (obsolete) //x/ to x:/
+ (when (string-match "\\`\\(/cygdrive\\|/\\)?/./" file)
+ (if (match-string 1) ; /cygdrive/x/ or //x/ -> /x/
+ (setq file (substring file (match-end 1))))
+ (aset file 0 (aref file 1)) ; /x/ -> xx/
+ (aset file 1 ?:)) ; xx/ -> x:/
+ file))
+ file)))
;;; User options:
@@ -547,11 +551,12 @@ Change only via `Customization' or the function `add-hook'."
(mapcar 'woman-Cyg-to-Win path)
path))
"*List of dirs to search and/or files to try for man config file.
-A trailing separator (`/' for UNIX etc.) on directories is optional,
-and the filename is used if a directory specified is the first to
-contain the strings \"man\" and \".conf\" (in that order).
-If MANPATH is not set but a config file is found then it is parsed
-instead to provide a default value for `woman-manpath'."
+A trailing separator (`/' for UNIX etc.) on directories is
+optional, and the filename is used if a directory specified is
+the first to start with \"man\" and has an extension starting
+with \".conf\". If MANPATH is not set but a config file is found
+then it is parsed instead to provide a default value for
+`woman-manpath'."
:type '(repeat string)
:group 'woman-interface)
@@ -564,7 +569,9 @@ Concatenate data from all lines in the config file of the form
or
MANDATORY_MANPATH /usr/man
or
- OPTIONAL_MANPATH /usr/man"
+ OPTIONAL_MANPATH /usr/man
+or
+ MANPATH_MAP /opt/bin /opt/man"
;; Functionality suggested by Charles Curley.
(let ((path woman-man.conf-path)
file manpath)
@@ -576,7 +583,7 @@ or
(or (not (file-directory-p file))
(and
(setq file
- (directory-files file t "man.*\\.conf" t))
+ (directory-files file t "\\`man.*\\.conf[a-z]*\\'" t))
(file-readable-p (setq file (car file)))))
;; Parse the file -- if no MANPATH data ignore it:
(with-temp-buffer
@@ -584,8 +591,13 @@ or
(while (re-search-forward
;; `\(?: ... \)' is a "shy group"
"\
-^[ \t]*\\(?:MANDATORY_\\|OPTIONAL_\\)?MANPATH[ \t]+\\(\\S-+\\)" nil t)
- (setq manpath (cons (match-string 1) manpath)))
+^[ \t]*\\(?:\\(?:MANDATORY_\\|OPTIONAL_\\)?MANPATH[ \t]+\\(\\S-+\\)\\|\
+MANPATH_MAP[ \t]+\\(\\S-+\\)[ \t]+\\(\\S-+\\)\\)" nil t)
+ (add-to-list 'manpath
+ (if (match-beginning 1)
+ (match-string 1)
+ (cons (match-string 2)
+ (match-string 3)))))
manpath))
))
(setq path (cdr path)))
@@ -600,6 +612,11 @@ subdirectories of the form `man?', or more precisely subdirectories
selected by the value of `woman-manpath-man-regexp'. Non-directory
and unreadable files are ignored.
+Elements can also be a cons cell indicating a mapping from PATH
+to manual trees: if such an element's car is equal to a path
+element of the environment variable PATH, the cdr of the cons
+cell is included in the directory tree search.
+
If not set then the environment variable MANPATH is used. If no such
environment variable is found, the default list is determined by
consulting the man configuration file if found, which is determined by
@@ -618,7 +635,7 @@ I recommend including drive letters explicitly, e.g.
The MANPATH environment variable may be set using DOS semi-colon-
separated or UN*X/Cygwin colon-separated syntax (but not mixed)."
- :type '(repeat string)
+ :type '(repeat (choice string (cons string string)))
:group 'woman-interface)
(defcustom woman-manpath-man-regexp "[Mm][Aa][Nn]"
@@ -1159,7 +1176,14 @@ Set from the cache by `woman-read-directory-cache'.")
Called both to generate and to check the cache!"
;; Must use substituted paths because values of env vars may change!
(list woman-cache-level
- (mapcar 'substitute-in-file-name woman-manpath)
+ (let (lst path)
+ (dolist (dir woman-manpath (nreverse lst))
+ (when (consp dir)
+ (unless path
+ (setq path
+ (split-string (getenv "PATH") path-separator t)))
+ (setq dir (and (member (car dir) path) (cdr dir))))
+ (when dir (add-to-list 'lst (substitute-in-file-name dir)))))
(mapcar 'substitute-in-file-name woman-path)))
(defun woman-read-directory-cache ()
@@ -1320,10 +1344,15 @@ Ignore any paths that are unreadable or not directories."
;; Allow each path to be a single string or a list of strings:
(if (not (listp woman-manpath)) (setq woman-manpath (list woman-manpath)))
(if (not (listp woman-path)) (setq woman-path (list woman-path)))
- (let (dir head dirs)
+ (let (dir head dirs path)
(while woman-manpath
(setq dir (car woman-manpath)
woman-manpath (cdr woman-manpath))
+ (when (consp dir)
+ (unless path
+ (setq path (split-string (getenv "PATH") path-separator t)))
+ (setq dir (and (member (car dir) path)
+ (cdr dir))))
(if (and dir (woman-file-readable-p dir))
;; NB: `parse-colon-path' creates null elements for
;; redundant (semi-)colons and trailing `/'s!
@@ -2102,18 +2131,6 @@ No external programs are used."
(interactive) ; mainly for testing
(WoMan-log-begin)
(run-hooks 'woman-pre-format-hook)
-
- ;; look for macro sets that woman cannot handle:
- (goto-char (point-min))
- (let ((case-fold-search nil))
- (unless (and (re-search-forward "^\\.SH[ \n]" (point-max) t)
- (progn (goto-char (point-min))
- (re-search-forward "^\\.TH[ \n]" (point-max) t))
- (progn (goto-char (point-min))
- (not (re-search-forward "^\\.\\([pnil]p\\|sh\\)[ \n]"
- (point-max) t))))
- (error "WoMan can only format man pages written with the usual `-man' macros")))
-
(and (boundp 'font-lock-mode) font-lock-mode (font-lock-mode -1))
;; (fundamental-mode)
(let ((start-time (current-time)) ; (HIGH LOW MICROSEC)
@@ -2269,6 +2286,18 @@ Currently set only from '\" t in the first line of the source file.")
;; conditionals and switch source requests:
(woman0-roff-buffer from)
+ ;; Check for macro sets that woman cannot handle. We can only
+ ;; because do this after processing source-switch directives.
+ (goto-char (point-min))
+ (let ((case-fold-search nil))
+ (unless (and (re-search-forward "^\\.SH[ \n]" (point-max) t)
+ (progn (goto-char (point-min))
+ (re-search-forward "^\\.TH[ \n]" (point-max) t))
+ (progn (goto-char (point-min))
+ (not (re-search-forward "^\\.\\([pnil]p\\|sh\\)[ \n]"
+ (point-max) t))))
+ (error "WoMan can only format man pages written with the usual `-man' macros")))
+
;; Process \k escapes BEFORE changing tab width (?):
(goto-char from)
(woman-mark-horizonal-position)
diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el
index 899049cef03..ede5f1359f7 100644
--- a/lisp/xt-mouse.el
+++ b/lisp/xt-mouse.el
@@ -50,7 +50,8 @@
;; Mouse events symbols must have an 'event-kind property with
;; the value 'mouse-click.
-(dolist (event-type '(mouse-1 mouse-2 mouse-3))
+(dolist (event-type '(mouse-1 mouse-2 mouse-3
+ M-down-mouse-1 M-down-mouse-2 M-down-mouse-3))
(put event-type 'event-kind 'mouse-click))
(defun xterm-mouse-translate (event)
@@ -108,6 +109,8 @@
;;(defvar xterm-mouse-y 0
;; "Position of last xterm mouse event relative to the frame.")
+(defvar xt-mouse-epoch nil)
+
;; Indicator for the xterm-mouse mode.
(defun xterm-mouse-position-function (pos)
@@ -129,6 +132,13 @@
(let* ((type (- (xterm-mouse-event-read) #o40))
(x (- (xterm-mouse-event-read) #o40 1))
(y (- (xterm-mouse-event-read) #o40 1))
+ ;; Emulate timestamp information. This is accurate enough
+ ;; for default value of mouse-1-click-follows-link (450msec).
+ (timestamp (truncate
+ (* 1000
+ (- (float-time)
+ (or xt-mouse-epoch
+ (setq xt-mouse-epoch (float-time)))))))
(mouse (intern
;; For buttons > 3, the release-event looks
;; differently (see xc/programs/xterm/button.c,
@@ -136,6 +146,11 @@
;; a release-event only, no down-event.
(cond ((>= type 64)
(format "mouse-%d" (- type 60)))
+ ((memq type '(8 9 10))
+ (setq xterm-mouse-last type)
+ (format "M-down-mouse-%d" (- type 7)))
+ ((= type 11)
+ (format "mouse-%d" (- xterm-mouse-last 7)))
((= type 3)
(format "mouse-%d" (+ 1 xterm-mouse-last)))
(t
@@ -150,10 +165,13 @@
(set-terminal-parameter nil 'xterm-mouse-y y)
(setq
last-input-event
- (if w
- (list mouse (posn-at-x-y (- x left) (- y top) w t))
- (list mouse
- (append (list nil 'menu-bar) (nthcdr 2 (posn-at-x-y x y w t))))))))
+ (list mouse
+ (let ((event (if w
+ (posn-at-x-y (- x left) (- y top) w t)
+ (append (list nil 'menu-bar)
+ (nthcdr 2 (posn-at-x-y x y))))))
+ (setcar (nthcdr 3 event) timestamp)
+ event)))))
;;;###autoload
(define-minor-mode xterm-mouse-mode