aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMiles Bader2005-05-20 04:22:05 +0000
committerMiles Bader2005-05-20 04:22:05 +0000
commit64e9342958694825be1664890dcd22fffcd50d3a (patch)
treea43e1796f5a49ae7eeec671447d10ac3731a1834 /lisp
parent5447510256e5a1b371407b751ddcc461044da5df (diff)
parenta18ff9886771c41186eebf8d7984fee2120dbe36 (diff)
downloademacs-64e9342958694825be1664890dcd22fffcd50d3a.tar.gz
emacs-64e9342958694825be1664890dcd22fffcd50d3a.zip
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-53
Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 302-319) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 69) - Update from CVS
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog779
-rw-r--r--lisp/add-log.el11
-rw-r--r--lisp/align.el4
-rw-r--r--lisp/ansi-color.el2
-rw-r--r--lisp/array.el14
-rw-r--r--lisp/buff-menu.el3
-rw-r--r--lisp/calc/calc-comb.el2
-rw-r--r--lisp/calc/calc-cplx.el2
-rw-r--r--lisp/calc/calc-ext.el6
-rw-r--r--lisp/calc/calc-fin.el2
-rw-r--r--lisp/calc/calc-forms.el2
-rw-r--r--lisp/calc/calc-funcs.el2
-rw-r--r--lisp/calc/calc-graph.el1
-rw-r--r--lisp/calc/calc-help.el4
-rw-r--r--lisp/calc/calc-incom.el2
-rw-r--r--lisp/calc/calc-keypd.el2
-rw-r--r--lisp/calc/calc-macs.el2
-rw-r--r--lisp/calc/calc-map.el2
-rw-r--r--lisp/calc/calc-misc.el2
-rw-r--r--lisp/calc/calc-mode.el2
-rw-r--r--lisp/calc/calc-mtx.el2
-rw-r--r--lisp/calc/calc-poly.el15
-rw-r--r--lisp/calc/calc-prog.el1
-rw-r--r--lisp/calc/calc-rewr.el2
-rw-r--r--lisp/calc/calc-rules.el2
-rw-r--r--lisp/calc/calc-stat.el2
-rw-r--r--lisp/calc/calc-store.el143
-rw-r--r--lisp/calc/calc-stuff.el2
-rw-r--r--lisp/calc/calc-trail.el2
-rw-r--r--lisp/calc/calc-undo.el2
-rw-r--r--lisp/calc/calc-vec.el2
-rw-r--r--lisp/calc/calc.el2
-rw-r--r--lisp/calc/calcalg3.el2
-rw-r--r--lisp/calc/calcsel2.el2
-rw-r--r--lisp/calculator.el19
-rw-r--r--lisp/calendar/appt.el4
-rw-r--r--lisp/calendar/cal-bahai.el8
-rw-r--r--lisp/calendar/cal-hebrew.el8
-rw-r--r--lisp/calendar/cal-islam.el8
-rw-r--r--lisp/calendar/calendar.el4
-rw-r--r--lisp/calendar/diary-lib.el20
-rw-r--r--lisp/calendar/solar.el86
-rw-r--r--lisp/dabbrev.el3
-rw-r--r--lisp/diff-mode.el15
-rw-r--r--lisp/dired-aux.el47
-rw-r--r--lisp/dired-x.el16
-rw-r--r--lisp/dired.el47
-rw-r--r--lisp/dnd.el1
-rw-r--r--lisp/ediff-diff.el20
-rw-r--r--lisp/edmacro.el4
-rw-r--r--lisp/emacs-lisp/authors.el5
-rw-r--r--lisp/emacs-lisp/byte-run.el5
-rw-r--r--lisp/emacs-lisp/bytecomp.el28
-rw-r--r--lisp/emacs-lisp/cl-extra.el2
-rw-r--r--lisp/emacs-lisp/cl-macs.el4
-rw-r--r--lisp/emacs-lisp/cl-seq.el4
-rw-r--r--lisp/emacs-lisp/cl.el14
-rw-r--r--lisp/emacs-lisp/copyright.el42
-rw-r--r--lisp/emacs-lisp/derived.el4
-rw-r--r--lisp/emacs-lisp/easy-mmode.el23
-rw-r--r--lisp/emacs-lisp/easymenu.el6
-rw-r--r--lisp/emacs-lisp/eldoc.el7
-rw-r--r--lisp/emacs-lisp/generic.el74
-rw-r--r--lisp/emacs-lisp/lisp-mnt.el2
-rw-r--r--lisp/emacs-lisp/lisp-mode.el3
-rw-r--r--lisp/emacs-lisp/lisp.el9
-rw-r--r--lisp/emacs-lisp/re-builder.el2
-rw-r--r--lisp/emacs-lisp/testcover.el3
-rw-r--r--lisp/emerge.el20
-rw-r--r--lisp/emulation/crisp.el8
-rw-r--r--lisp/emulation/cua-base.el20
-rw-r--r--lisp/emulation/cua-rect.el6
-rw-r--r--lisp/emulation/edt.el8
-rw-r--r--lisp/emulation/pc-select.el2
-rw-r--r--lisp/emulation/tpu-edt.el2
-rw-r--r--lisp/emulation/tpu-extras.el8
-rw-r--r--lisp/emulation/vip.el6
-rw-r--r--lisp/emulation/viper-cmd.el2
-rw-r--r--lisp/emulation/viper-ex.el10
-rw-r--r--lisp/emulation/viper-keym.el2
-rw-r--r--lisp/emulation/viper-macs.el2
-rw-r--r--lisp/emulation/viper-util.el2
-rw-r--r--lisp/emulation/viper.el2
-rw-r--r--lisp/eshell/esh-mode.el5
-rw-r--r--lisp/faces.el24
-rw-r--r--lisp/files.el56
-rw-r--r--lisp/finder.el2
-rw-r--r--lisp/follow.el4
-rw-r--r--lisp/font-lock.el247
-rw-r--r--lisp/forms.el4
-rw-r--r--lisp/frame.el2
-rw-r--r--lisp/generic-x.el112
-rw-r--r--lisp/gnus/ChangeLog17
-rw-r--r--lisp/gnus/gnus-art.el3
-rw-r--r--lisp/gnus/gnus.el6
-rw-r--r--lisp/gnus/nndb.el15
-rw-r--r--lisp/gnus/nntp.el10
-rw-r--r--lisp/gnus/spam-report.el2
-rw-r--r--lisp/help-fns.el7
-rw-r--r--lisp/help-mode.el12
-rw-r--r--lisp/hexl.el2
-rw-r--r--lisp/ibuf-ext.el4
-rw-r--r--lisp/ibuffer.el4
-rw-r--r--lisp/ido.el87
-rw-r--r--lisp/imenu.el3
-rw-r--r--lisp/international/ccl.el7
-rw-r--r--lisp/international/characters.el8
-rw-r--r--lisp/international/codepage.el5
-rw-r--r--lisp/international/encoded-kb.el7
-rw-r--r--lisp/international/fontset.el7
-rw-r--r--lisp/international/isearch-x.el7
-rw-r--r--lisp/international/iso-ascii.el2
-rw-r--r--lisp/international/iso-cvt.el4
-rw-r--r--lisp/international/iso-transl.el3
-rw-r--r--lisp/international/ja-dic-cnv.el5
-rw-r--r--lisp/international/ja-dic-utl.el5
-rw-r--r--lisp/international/kinsoku.el6
-rw-r--r--lisp/international/kkc.el6
-rw-r--r--lisp/international/latexenc.el1
-rw-r--r--lisp/international/latin1-disp.el2
-rw-r--r--lisp/international/mule-cmds.el8
-rw-r--r--lisp/international/mule-conf.el8
-rw-r--r--lisp/international/mule-diag.el8
-rw-r--r--lisp/international/mule-util.el8
-rw-r--r--lisp/international/mule.el8
-rw-r--r--lisp/international/ogonek.el6
-rw-r--r--lisp/international/quail.el6
-rw-r--r--lisp/international/swedish.el2
-rw-r--r--lisp/international/titdic-cnv.el6
-rw-r--r--lisp/jit-lock.el5
-rw-r--r--lisp/language/china-util.el8
-rw-r--r--lisp/language/chinese.el6
-rw-r--r--lisp/language/cyril-util.el2
-rw-r--r--lisp/language/cyrillic.el7
-rw-r--r--lisp/language/devan-util.el6
-rw-r--r--lisp/language/devanagari.el2
-rw-r--r--lisp/language/english.el6
-rw-r--r--lisp/language/ethio-util.el7
-rw-r--r--lisp/language/ethiopic.el6
-rw-r--r--lisp/language/european.el8
-rw-r--r--lisp/language/greek.el5
-rw-r--r--lisp/language/hebrew.el7
-rw-r--r--lisp/language/indian.el5
-rw-r--r--lisp/language/japan-util.el7
-rw-r--r--lisp/language/japanese.el6
-rw-r--r--lisp/language/korea-util.el5
-rw-r--r--lisp/language/korean.el6
-rw-r--r--lisp/language/lao-util.el7
-rw-r--r--lisp/language/lao.el7
-rw-r--r--lisp/language/misc-lang.el5
-rw-r--r--lisp/language/tibet-util.el6
-rw-r--r--lisp/language/tibetan.el6
-rw-r--r--lisp/language/viet-util.el6
-rw-r--r--lisp/language/vietnamese.el7
-rw-r--r--lisp/mail/feedmail.el2
-rw-r--r--lisp/mail/mailalias.el2
-rw-r--r--lisp/mail/rmail.el2
-rw-r--r--lisp/mail/rmailsum.el24
-rw-r--r--lisp/mail/smtpmail.el2
-rw-r--r--lisp/mail/supercite.el8
-rw-r--r--lisp/mh-e/mh-acros.el2
-rw-r--r--lisp/mh-e/mh-alias.el3
-rw-r--r--lisp/mh-e/mh-comp.el3
-rw-r--r--lisp/mh-e/mh-customize.el2
-rw-r--r--lisp/mh-e/mh-e.el2
-rw-r--r--lisp/mh-e/mh-funcs.el2
-rw-r--r--lisp/mh-e/mh-gnus.el2
-rw-r--r--lisp/mh-e/mh-identity.el2
-rw-r--r--lisp/mh-e/mh-inc.el2
-rw-r--r--lisp/mh-e/mh-index.el2
-rw-r--r--lisp/mh-e/mh-init.el2
-rw-r--r--lisp/mh-e/mh-junk.el2
-rw-r--r--lisp/mh-e/mh-loaddefs.el2
-rw-r--r--lisp/mh-e/mh-mime.el3
-rw-r--r--lisp/mh-e/mh-pick.el2
-rw-r--r--lisp/mh-e/mh-print.el2
-rw-r--r--lisp/mh-e/mh-seq.el2
-rw-r--r--lisp/mh-e/mh-speed.el2
-rw-r--r--lisp/mh-e/mh-utils.el3
-rw-r--r--lisp/net/ange-ftp.el32
-rw-r--r--lisp/net/browse-url.el2
-rw-r--r--lisp/net/eudc.el2
-rw-r--r--lisp/net/ldap.el2
-rw-r--r--lisp/net/net-utils.el5
-rw-r--r--lisp/net/quickurl.el2
-rw-r--r--lisp/net/rlogin.el2
-rw-r--r--lisp/net/snmp-mode.el2
-rw-r--r--lisp/net/telnet.el26
-rw-r--r--lisp/net/tls.el2
-rw-r--r--lisp/net/tramp-ftp.el2
-rw-r--r--lisp/net/tramp-smb.el4
-rw-r--r--lisp/net/tramp-util.el2
-rw-r--r--lisp/net/tramp-uu.el2
-rw-r--r--lisp/net/tramp-vc.el2
-rw-r--r--lisp/net/tramp.el120
-rw-r--r--lisp/net/trampver.el4
-rw-r--r--lisp/net/webjump.el2
-rw-r--r--lisp/net/zone-mode.el2
-rw-r--r--lisp/newcomment.el21
-rw-r--r--lisp/obsolete/rsz-mini.el3
-rw-r--r--lisp/play/gametree.el6
-rw-r--r--lisp/progmodes/ada-xref.el6
-rw-r--r--lisp/progmodes/antlr-mode.el1
-rw-r--r--lisp/progmodes/cc-engine.el3
-rw-r--r--lisp/progmodes/cc-fonts.el2
-rw-r--r--lisp/progmodes/compile.el31
-rw-r--r--lisp/progmodes/cperl-mode.el2
-rw-r--r--lisp/progmodes/delphi.el2
-rw-r--r--lisp/progmodes/ebrowse.el12
-rw-r--r--lisp/progmodes/etags.el16
-rw-r--r--lisp/progmodes/flymake.el2
-rw-r--r--lisp/progmodes/gud.el8
-rw-r--r--lisp/progmodes/idlw-shell.el612
-rw-r--r--lisp/progmodes/inf-lisp.el12
-rw-r--r--lisp/progmodes/make-mode.el557
-rw-r--r--lisp/progmodes/perl-mode.el30
-rw-r--r--lisp/progmodes/prolog.el14
-rw-r--r--lisp/progmodes/ps-mode.el2
-rw-r--r--lisp/progmodes/sh-script.el60
-rw-r--r--lisp/progmodes/tcl.el33
-rw-r--r--lisp/progmodes/vhdl-mode.el8
-rw-r--r--lisp/replace.el20
-rw-r--r--lisp/reveal.el3
-rw-r--r--lisp/server.el6
-rw-r--r--lisp/shadowfile.el4
-rw-r--r--lisp/shell.el2
-rw-r--r--lisp/startup.el6
-rw-r--r--lisp/subr.el100
-rw-r--r--lisp/term.el2
-rw-r--r--lisp/term/mac-win.el9
-rw-r--r--lisp/term/sun-mouse.el2
-rw-r--r--lisp/term/w32-win.el2
-rw-r--r--lisp/term/x-win.el2
-rw-r--r--lisp/terminal.el2
-rw-r--r--lisp/textmodes/fill.el3
-rw-r--r--lisp/textmodes/ispell.el4
-rw-r--r--lisp/textmodes/nroff-mode.el2
-rw-r--r--lisp/textmodes/reftex-auc.el5
-rw-r--r--lisp/textmodes/reftex-cite.el14
-rw-r--r--lisp/textmodes/reftex-dcr.el5
-rw-r--r--lisp/textmodes/reftex-global.el9
-rw-r--r--lisp/textmodes/reftex-index.el2
-rw-r--r--lisp/textmodes/reftex-parse.el6
-rw-r--r--lisp/textmodes/reftex-ref.el7
-rw-r--r--lisp/textmodes/reftex-sel.el42
-rw-r--r--lisp/textmodes/reftex-toc.el5
-rw-r--r--lisp/textmodes/reftex-vars.el25
-rw-r--r--lisp/textmodes/reftex.el49
-rw-r--r--lisp/textmodes/spell.el6
-rw-r--r--lisp/textmodes/table.el3
-rw-r--r--lisp/textmodes/texinfmt.el2
-rw-r--r--lisp/time-stamp.el10
-rw-r--r--lisp/time.el2
-rw-r--r--lisp/timezone.el16
-rw-r--r--lisp/tmm.el5
-rw-r--r--lisp/toolbar/tool-bar.el2
-rw-r--r--lisp/uniquify.el24
-rw-r--r--lisp/url/ChangeLog18
-rw-r--r--lisp/url/url-auth.el2
-rw-r--r--lisp/url/url-cookie.el28
-rw-r--r--lisp/url/url-dav.el22
-rw-r--r--lisp/url/url-http.el10
-rw-r--r--lisp/url/url-ns.el6
-rw-r--r--lisp/url/url-parse.el2
-rw-r--r--lisp/url/url-util.el2
-rw-r--r--lisp/vms-patch.el2
-rw-r--r--lisp/w32-vars.el3
267 files changed, 3037 insertions, 1793 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 766432edf98..aaaf1be4fa8 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,632 @@
12005-05-20 Juanma Barranquero <lekktu@gmail.com>
2
3 * subr.el (send-string, send-region):
4 Remove obsolescence declaration.
5 (window-dot, set-window-dot, read-input, show-buffer)
6 (eval-current-buffer, string-to-int):
7 Add release number to obsolescence declarations.
8
92005-05-19 Kim F. Storm <storm@cua.dk>
10
11 * ido.el (ido-magic-forward-char): Enter ido-find-file at end of input.
12 (ido-magic-backward-char): Enter ido-switch-buffer at start of input.
13
142005-05-20 Matt Hodges <MPHodges@member.fsf.org>
15
16 * faces.el (list-faces-display): Make back button respect optional
17 regexp arg.
18
192005-05-19 Juanma Barranquero <lekktu@gmail.com>
20
21 * calculator.el (calculator-radix-grouping-mode)
22 (calculator-radix-grouping-digits, calculator-displayer)
23 (calculator-radix-grouping-separator, calculator-copy-displayer):
24 * dabbrev.el (dabbrev-search-these-buffers-only):
25 * diff-mode.el (diff-jump-to-old-file, diff-update-on-the-fly)
26 (diff-advance-after-apply-hunk, diff-mode-hook)
27 (diff-minor-mode-prefix):
28 * imenu.el (imenu-use-popup-menu):
29 * jit-lock.el (jit-lock-context-time):
30 * newcomment.el (comment-fill-column, comment-column)
31 (comment-style, comment-padding, comment-multi-line)
32 (comment-empty-lines, comment-auto-fill-only-comments):
33 * reveal.el (reveal-around-mark):
34 * uniquify.el (uniquify-buffer-name-style)
35 (uniquify-after-kill-buffer-p)
36 (uniquify-ask-about-buffer-names-p, uniquify-ignore-buffers-re)
37 (uniquify-min-dir-content, uniquify-separator)
38 (uniquify-trailing-separator-p, uniquify-strip-common-suffix):
39 * w32-vars.el (w32-fixed-font-alist):
40 * emacs-lisp/testcover.el (testcover-potentially-1value-functions):
41 * obsolete/rsz-mini.el (resize-minibuffer-frame-max-height):
42 * progmodes/antlr-mode.el (antlr-font-lock-maximum-decoration):
43 * progmodes/perl-mode.el (perl-indent-level)
44 (perl-continued-statement-offset, perl-continued-brace-offset)
45 (perl-brace-offset, perl-brace-imaginary-offset)
46 (perl-label-offset, perl-indent-continued-arguments)
47 (perl-tab-always-indent, perl-tab-to-comment, perl-nochange):
48 * progmodes/tcl.el (tcl-indent-level)
49 (tcl-continued-indent-level, tcl-auto-newline)
50 (tcl-tab-always-indent, tcl-electric-hash-style)
51 (tcl-help-directory-list, tcl-use-smart-word-finder)
52 (tcl-application, tcl-command-switches, tcl-prompt-regexp)
53 (inferior-tcl-source-command):
54 * textmodes/fill.el (enable-kinsoku):
55 * textmodes/reftex-vars.el (reftex-index-phrases-wrap-long-lines):
56 * textmodes/table.el (table-yank-handler):
57 Specify missing group (and type, if simple) in defcustom.
58
592005-05-19 Luc Teirlinck <teirllm@auburn.edu>
60
61 * progmodes/compile.el (compilation-finish-function): Fix defvar.
62
632005-05-19 Richard M. Stallman <rms@gnu.org>
64
65 * progmodes/make-mode.el (makefile-mode): Use run-mode-hooks.
66
67 * subr.el (event-basic-type): Don't get an error.
68 (left-fringe-p): Function deleted.
69
70 * buff-menu.el (Buffer-menu-buffer-face): In group Buffer-menu.
71
72 * dired-aux.el (dired-copy-file-recursive): Handle symlinks
73 in recursive copy.
74
75 * frame.el (show-trailing-whitespace): In group `whitespace-faces'.
76
77 * emacs-lisp/byte-run.el (eval-when-compile): Doc fix.
78
79 * emacs-lisp/bytecomp.el (byte-compile-file-form-custom-declare-variable):
80 Call byte-compile-nogroup-warn if appropriate.
81
82 * progmodes/compile.el (compilation-finish-function): Mark obsolete.
83 (compilation-set-window): Don't call left-fringe-p; do it directly.
84
852005-05-19 Jay Belanger <belanger@truman.edu>
86
87 * calc/calc-graph.el (calc-graph-format-data): Make sure
88 var-PlotRejects is bound before trying to check its value.
89
902005-05-19 Carsten Dominik <dominik@science.uva.nl>
91
92 * textmodes/reftex.el (reftex-isearch-minor-mode): Moved the
93 definition of this variable from reftex-global.el to reftex.el,
94 because it is needed in the menu.
95
962005-05-19 Lute Kamstra <lute@gnu.org>
97
98 * emacs-lisp/copyright.el (copyright-fix-years): Make sure all
99 years are fixed. Don't insert a space after a dash.
100
1012005-05-19 Kim F. Storm <storm@cua.dk>
102
103 * emulation/crisp.el (crisp-home, crisp-end): Put CUA property.
104
1052005-05-19 Daniel Pfeiffer <occitan@esperanto.org>
106
107 * font-lock.el (lisp-font-lock-keywords-2): Do \\) only in
108 strings, because (eq ... ?\\) is fairly frequent.
109
110 * progmodes/make-mode.el (makefile-add-this-line-targets):
111 Simplify and integrate into `makefile-pickup-targets'.
112 (makefile-add-this-line-macro): Simplify and integrate into
113 `makefile-pickup-macros.
114 (makefile-pickup-filenames-as-targets): Simplify.
115 (makefile-previous-dependency, makefile-match-dependency): Don't
116 stumble over `::'.
117
1182005-05-19 Nick Roberts <nickrob@snap.net.nz>
119
120 * subr.el (post-command-idle-hook, post-command-idle-delay):
121 Remove obsoletion of post-command-idle-hook and
122 post-command-idle-delay.
123
124 * faces.el (list-faces-display): Provide button when describe-face
125 is called to take user back to the list of faces.
126
127 * help-fns.el (describe-variable): Remove hyperlinks in a
128 variable's value as these are quite frequently inappropriate.
129
130 * follow.el (follow-submit-feedback, follow-mode): Remove
131 references to post-command-idle-hook.
132
1332005-05-18 Daniel Pfeiffer <occitan@esperanto.org>
134
135 * progmodes/make-mode.el (makefile-previous-dependency)
136 (makefile-match-dependency): Check for := (and in bsd mode also
137 !=) to give a better result, even when font-lock is not on.
138
1392005-05-18 Jay Belanger <belanger@truman.edu>
140
141 * calc/calc-help.el (calc-s-prefix-help): Add
142 `calc-copy-special-constant' to help string.
143
1442005-05-18 Luc Teirlinck <teirllm@auburn.edu>
145
146 * emacs-lisp/eldoc.el (eldoc-mode): Doc fix.
147
1482005-05-18 Jay Belanger <belanger@truman.edu>
149
150 * calc/calc-poly.el (math-factor-poly-coefs): Make sure the terms
151 in linear factors are in proper order.
152
1532005-05-18 Carsten Dominik <dominik@science.uva.nl>
154
155 * textmodes/reftex-vars.el (reftex-cite-format-builtin): Support
156 for jurabib.
157
158 * textmodes/reftex.el (featurep): Define aliases for overlay
159 commands, for XEmacs compatibility, and use these aliases in
160 overlay initializations.
161 (reftex-highlight): Use `reftex-move-overlay'.
162 (reftex-unhighlight): Use `reftex-delete-overlay'.
163 (reftex-uniq): Funktion removed. Use `reftex-uniquify' instead.
164 (reftex-access-search-path): Use `reftex-uniquify' instead of
165 `reftex-uniq'
166
167 * textmodes/reftex-sel.el (reftex-select-unmark): Overlay
168 `before-string' property modification enables for Emacs as well.
169 (reftex-select-item): Use `reftex-delete-overlay'.
170 (reftex-select-mark): Use `reftex-make-overlay' and
171 `reftex-overlay-put'.
172 (reftex-select-unmark): Use `reftex-delete-overlay' and
173 `reftex-overlay-put'.
174
1752005-05-18 Lute Kamstra <lute@gnu.org>
176
177 * emacs-lisp/lisp.el (check-parens): Fix docstring.
178
1792005-05-18 Juanma Barranquero <lekktu@gmail.com>
180
181 * add-log.el (add-change-log-entry):
182 * array.el (array-make-template, array-reconfigure-rows)
183 (array-init-max-row, array-init-max-column)
184 (array-init-columns-per-line, array-init-field-width):
185 * replace.el (replace-match-maybe-edit, perform-replace):
186 * textmodes/spell.el (spell-region):
187 Replace `read-input' by `read-string'.
188
189 * forms.el (forms-mode):
190 * finder.el (finder-compile-keywords):
191 * shadowfile.el (shadow-read-files):
192 Replace `eval-current-buffer' by `eval-buffer'.
193
194 * terminal.el (te-pass-through):
195 * net/ange-ftp.el (ange-ftp-process-filter, ange-ftp-gwp-filter)
196 (ange-ftp-raw-send-cmd):
197 * net/telnet.el (telnet-interrupt-subjob, telnet-c-z)
198 (send-process-next-char, telnet-initial-filter, telnet):
199 Replace `send-string' by `process-send-string'.
200
201 * progmodes/prolog.el (inferior-prolog-mode): Doc fix.
202 (prolog-consult-region): Replace `send-string' by
203 `process-send-string'; replace `send-region' by
204 `process-send-region'.
205
206 * progmodes/delphi.el (delphi-log-msg):
207 Replace `set-window-dot' by `set-window-point'.
208
209 * subr.el (window-dot, set-window-dot, read-input, send-string)
210 (send-region, show-buffer, eval-current-buffer):
211 Make really obsolete, as the comment says.
212
2132005-05-17 Kim F. Storm <storm@cua.dk>
214
215 * emulation/cua-base.el (cua-use-hyper-key): Doc fix.
216 (cua--init-keymaps): Bind C-return instead of S-return to set
217 rectangle mark.
218
219 * emulation/cua-rect.el (cua--init-rectangles): Bind C-return
220 instead of S-return to toggle/clear rectangle mark.
221
2222005-05-17 Daniel Pfeiffer <occitan@esperanto.org>
223
224 * progmodes/make-mode.el (makefile-dependency-skip): New variable.
225 (makefile-macroassign-regex, makefile-make-font-lock-keywords):
226 Also fontify plain strings assigned to variables, mostly so that a
227 colon has a face and is thus not taken as a dependency separator.
228 (makefile-previous-dependency): Inline the new matcher, because it
229 is too complex to work in both directions.
230 (makefile-match-dependency): Eliminate `backward' arg (see above).
231 Completely reimplemented so as to not sometimes go into an endless
232 loop. It should also be more efficient, because first it only
233 searches for `:', instead of applying the very complex regexp.
234 (makefile-mode): Cancel `font-lock-support-mode', because blocks
235 to be fontified in one piece can be too long for JIT. Makefiles
236 are never *that* big.
237
2382005-05-17 Reiner Steib <Reiner.Steib@gmx.de>
239
240 * dired.el (dired-mode): Simplify.
241
2422005-05-17 Lute Kamstra <lute@gnu.org>
243
244 * emacs-lisp/easy-mmode.el (define-minor-mode): Don't generate a
245 defcustom for the mode hook variable.
246
247 * emacs-lisp/authors.el (authors): Do parse the ChangeLogs of the
248 Emacs Lisp Reference Manual.
249
2502005-05-17 Juanma Barranquero <lekktu@gmail.com>
251
252 * emacs-lisp/cl.el (eql, floatp-safe, plusp, minusp, oddp)
253 (evenp, list*):
254 * emacs-lisp/cl-macs.el (macrolet, symbol-macrolet):
255 * emacs-lisp/cl-seq.el (subsetp, tree-equal): Doc fixes.
256
257 * net/tramp-smb.el (tramp-smb-open-connection):
258 Pass `tramp-chunksize' as fifth (required) argument.
259
2602005-05-16 Daniel Pfeiffer <occitan@esperanto.org>
261
262 * font-lock.el (lisp-font-lock-keywords-1): Set
263 `font-lock-negation-char-face' for [^...] char group.
264 (lisp-font-lock-keywords-2): Highlight regexp's \\( \\| \\).
265
266 * progmodes/make-mode.el (makefile-dependency-regex): Turn it into
267 a var, and refine it to mask one more level of nested vars.
268 (makefile-rule-action-regex): Turn it into a var, and refine it so
269 it recognizes backslashed continuation lines as belonging to the
270 same command.
271 (makefile-macroassign-regex): Refine it so it recognizes
272 backslashed continuation lines as belonging to the same command.
273 (makefile-var-use-regex): Don't look at the next char, because it
274 might be the same one to be skipped by the initial [^$], leading
275 to an overlooked variable use.
276 (makefile-make-font-lock-keywords): Remove two parameters, which
277 are now variables that some of the modes set locally. Handle
278 dependency and rule action matching through functions, because
279 regexps alone match too often. Dependency matching now comes
280 last, so it can check, whether a colon already matched something
281 else.
282 (makefile-mode): Inform that font-lock improves makefile parsing
283 capabilities.
284 (makefile-match-dependency, makefile-match-action): New functions.
285
2862005-05-16 Juanma Barranquero <lekktu@gmail.com>
287
288 * emacs-lisp/cl-extra.el (equalp): Doc fix.
289
290 * align.el (align-regexp):
291 * ansi-color.el (ansi-color-get-face):
292 * array.el (array-reconfigure-rows, array-init-max-row)
293 (array-init-max-column, array-init-columns-per-line)
294 (array-init-field-width):
295 * dired-aux.el (dired-trample-file-versions):
296 * dired-x.el (dired-mark-sexp):
297 * ediff-diff.el (ediff-extract-diffs, ediff-get-diff3-group):
298 * edmacro.el (edmacro-finish-edit, edmacro-parse-keys):
299 * emerge.el (emerge-extract-diffs, emerge-get-diff3-group):
300 * faces.el (face-read-integer):
301 * files.el (backup-extract-version, insert-directory):
302 * hexl.el (hexl-insert-decimal-char):
303 * server.el (server-process-filter):
304 * shell.el (shell-extract-num):
305 * startup.el (command-line-1):
306 * term.el (term-command-hook):
307 * time-stamp.el (time-stamp, time-stamp-string-preprocess)
308 (time-stamp-do-number):
309 * time.el (display-time-update):
310 * timezone.el (timezone-parse-date, timezone-zone-to-minute)
311 (timezone-fix-time):
312 * vms-patch.el (vms-suspend-resume-hook):
313 * calendar/appt.el (appt-convert-time):
314 * calendar/cal-bahai.el (mark-bahai-diary-entries):
315 * calendar/cal-hebrew.el (mark-hebrew-diary-entries):
316 * calendar/cal-islam.el (mark-islamic-diary-entries):
317 * calendar/calendar.el (calendar-cursor-to-date)
318 (calendar-star-date):
319 * calendar/diary-lib.el (diary-attrtype-convert)
320 (mark-diary-entries, diary-entry-time):
321 * calendar/solar.el (solar-get-number):
322 * emacs-lisp/lisp-mnt.el (lm-last-modified-date):
323 * emacs-lisp/re-builder.el (reb-display-subexp):
324 * emulation/edt.el (edt-set-scroll-margins):
325 * emulation/tpu-extras.el (tpu-set-scroll-margins):
326 * emulation/vip.el (vip-get-ex-token, vip-get-ex-buffer)
327 (vip-get-ex-count):
328 * emulation/viper-ex.el (viper-get-ex-token)
329 (viper-get-ex-buffer, viper-get-ex-count, ex-next):
330 * international/fontset.el (fontset-plain-name):
331 * mail/feedmail.el (feedmail-look-at-queue-directory):
332 * mail/mailalias.el (mail-get-names):
333 * mail/rmail.el (rmail-convert-to-babyl-format):
334 * mail/rmailsum.el (rmail-make-basic-summary-line)
335 (rmail-summary-next-same-subject, rmail-summary-rmail-update)
336 (rmail-summary-goto-msg):
337 * mail/smtpmail.el (smtpmail-read-response):
338 * net/ange-ftp.el (ange-ftp-guess-hash-mark-size)
339 (ange-ftp-vms-add-file-entry):
340 * play/gametree.el (gametree-looking-at-ply)
341 (gametree-current-branch-score):
342 * progmodes/ada-xref.el (ada-prj-find-prj-file)
343 (ada-xref-find-in-modified-ali, ada-find-in-src-path):
344 * progmodes/cperl-mode.el (condition-case):
345 * progmodes/ebrowse.el (ebrowse-set-tree-indentation)
346 (ebrowse-set-member-buffer-column-width)
347 (ebrowse-select-1st-to-9nth):
348 * progmodes/etags.el (etags-snarf-tag):
349 * progmodes/flymake.el (flymake-parse-line):
350 * progmodes/idlw-shell.el (idlwave-shell-parse-line)
351 (idlwave-shell-filter-bp, idlwave-shell-goto-next-error)
352 (idlwave-shell-menu-def):
353 * progmodes/ps-mode.el (ps-run-goto-error):
354 * progmodes/vhdl-mode.el (vhdl-read-offset, vhdl-load-cache)
355 (vhdl-speedbar-contract-level):
356 * term/mac-win.el (x-handle-numeric-switch):
357 * term/sun-mouse.el (sun-get-frame-data):
358 * term/w32-win.el (x-handle-numeric-switch):
359 * term/x-win.el (x-handle-numeric-switch):
360 * textmodes/ispell.el (ispell-parse-output):
361 * textmodes/nroff-mode.el (nroff-outline-level):
362 * textmodes/reftex-cite.el (reftex-bib-sort-year)
363 (reftex-bib-sort-year-reverse, reftex-format-citation):
364 * textmodes/reftex-parse.el (reftex-init-section-numbers)
365 (reftex-section-number):
366 * textmodes/texinfmt.el (texinfo-paragraphindent): Replace
367 `string-to-int' by `string-to-number'.
368
369 * international/latexenc.el: Add page marker to force the "Local
370 Variables:" string out of the last page.
371
3722005-05-16 Nick Roberts <nickrob@snap.net.nz>
373
374 * progmodes/gud.el (gud-tooltip-mode): Add gud prefix to
375 tooltip-change-major-mode.
376 (gud-tooltip-print-command): Remove case where gud-minor-mode
377 is gdb ("--fullname").
378 (gud-tooltip-tips): Turn GUD tooltips off for this case and
379 explain to user.
380
3812005-05-16 Jay Belanger <belanger@truman.edu>
382
383 * calc/calc-store.el (calc-copy-special-constant): New function.
384
385 * calc/calc-ext.el (calc-init-extensions): Add binding for
386 `calc-copy-special-constant'.
387
388 * calc/calc-prog.el (calc-edit-format-macro-buffer): Add a case
389 for the `calc-copy-special-constant' command.
390
3912005-05-16 Nick Roberts <nickrob@snap.net.nz>
392
393 * subr.el (left-fringe-p): New function.
394
395 * progmodes/compile.el (compilation-setup): Set local value of
396 overlay-arrow-string to "" always.
397 (compilation-set-window): Left fringe then don't scroll. No left
398 fringe then no arrow and scroll message to top.
399 (compilation-context-lines): Adjust doc string accordingly.
400
4012005-05-16 Kim F. Storm <storm@cua.dk>
402
403 * ido.el (ido-magic-forward-char, ido-magic-backward-char)
404 (ido-magic-delete-char): New commands for C-f, C-b, C-d.
405 (ido-wide-find-dir-or-delete-dir): New command for M-d.
406 (ido-define-mode-map): Bind them. Add C-x prefix to fallback commands.
407 (ido-read-file-name): Handle commands with ido property value
408 equal to find-file as reading a file name, to allow C-d to enter dired.
409 (ibuffer-find-file): Add ido property with value find-file.
410
4112005-05-15 Kim F. Storm <storm@cua.dk>
412
413 * subr.el (open-network-stream-nowait): Remove.
414 (open-network-stream-server): Remove.
415
4162005-05-15 Richard M. Stallman <rms@gnu.org>
417
418 * faces.el (describe-face): Output a definition link button.
419
420 * help-mode.el (help-face-def): New button type.
421
422 * emacs-lisp/copyright.el (copyright-fix-years):
423 Match properly if the first year is 2-digit.
424 Don't mess up the whitespace after the years by filling.
425
426 * dired-aux.el (dired-mark-confirm):
427 Pass t to dired-get-marked-files for DISTINGUISH-ONE-MARKED.
428
429 * dired.el (dired-map-over-marks): New arg DISTINGUISH-ONE-MARKED.
430 (dired-get-marked-files): New arg DISTINGUISH-ONE-MARKED.
431 (dired-mark-pop-up): Handle FILES = (t FILE) specially.
432
433 * emacs-lisp/lisp-mode.el (lisp-mode-variables):
434 Set font-lock-comment-start-skip.
435
436 * font-lock.el (font-lock-comment-start-skip): New variable.
437 (font-lock-comment-end-skip): New variable.
438 (font-lock-fontify-syntactically-region): Use them if non-nil.
439
4402005-05-15 Jay Belanger <belanger@truman.edu>
441
442 * calc/calc-store.el (calc-store-value): Return a string rather
443 than display it as a message.
444 Use calc-var-name for variable name.
445 (calc-store-into): Add the result of calc-store-value to message.
446 (calc-copy-variable): Add a message.
447 (calc-store-exchange): Improve error messages.
448 (calc-store-binary, calc-store-map): Don't reset the values of
449 special constants.
450
4512005-05-14 Luc Teirlinck <teirllm@auburn.edu>
452
453 * emacs-lisp/derived.el (define-derived-mode): Add link to Elisp
454 manual to docstring.
455
456 * files.el (hack-local-variables-confirm): Add STRING argument.
457 Make the function handle non file visiting buffers correctly.
458 (hack-local-variables-prop-line, hack-local-variables)
459 (hack-one-local-variable): Use STRING arg of
460 `hack-local-variables-confirm'.
461
4622005-05-14 Michael Albinus <michael.albinus@gmx.de>
463
464 Sync with Tramp 2.0.49.
465
466 * tramp.el (tramp-handle-dired-call-process)
467 (tramp-handle-insert-directory):`insert-buffer' cannot be used
468 because the contents of the Tramp buffer is changed before
469 insertion (`expand-file' and alike).
470 (tramp-handle-insert-directory): If `localname' has an empty
471 nondirectory name, it must not be quoted.
472 (tramp-pre-connection): Add parameter CHUNKSIZE. Make local
473 variable `tramp-chunksize'. Change callees.
474 (tramp-open-connection-setup-interactive-shell): Check remote host
475 for buggy `send-process-string' implementation. Set
476 `tramp-chunksize' if found. Reported by Michael Kifer
477 <kifer@cs.sunysb.edu> (and a lot of other people all the years).
478 (tramp-handle-shell-command): `insert-buffer' cannot be used
479 because the contents of the Tramp buffer is changed before
480 insertion (`expand-file' and alike). Reported by Fr,Ai(Bd,Ai(Bric Bothamy
481 <frederic.bothamy@free.fr>.
482 (tramp-set-auto-save): Actions should be done for Tramp file name
483 handler only. Ange-FTP has its own auto-save mechanism. Reported
484 by Richard G. Bielawski <Richard.G.Bielawski@wellsfargo.com>.
485 (tramp-set-auto-save-file-modes): Set file modes of
486 `buffer-auto-save-file-name' to ?\600 as fallback solution.
487 Reported by Ferenc Wagner <wferi@tba.elte.hu>.
488 (tramp-bug): Remove obsolete variable.
489 (tramp-append-tramp-buffers): Rewrite partly. More suitable check
490 for presence of `mml-mode'. Make it running for older Emacsen as
491 well.
492
4932005-05-14 John Paul Wallington <jpw@pobox.com>
494
495 * ibuf-ext.el (define-ibuffer-filter filename):
496 If `dired-directory' is a list, use its car.
497
4982005-05-14 Daniel Brockman <daniel@brockman.se> (tiny change)
499
500 * ibuffer.el (define-ibuffer-column filename):
501 If `dired-directory' is a list, use its car.
502
5032005-05-14 Richard M. Stallman <rms@gnu.org>
504
505 * subr.el (symbol-file): Doc fix.
506
507 * emacs-lisp/bytecomp.el (byte-compile-nogroup-warn): New function.
508 (byte-compile-form): Call byte-compile-nogroup-warn.
509 (byte-compile-warning-types): Doc fix.
510
511 * eshell/esh-mode.el (eshell-find-tag): Use with-no-warnings.
512
513 * progmodes/cc-engine.el (c-literal-faces):
514 Add font-lock-comment-delimiter-face.
515
516 * net/net-utils.el (dig): Use with-no-warnings.
517
518 * mail/supercite.el (sc-cite-frame-alist, sc-uncite-frame-alist)
519 (sc-recite-frame-alist, sc-default-cite-frame)
520 (sc-default-uncite-frame, sc-default-recite-frame)
521 (sc-attrib-selection-list, sc-rewrite-header-list):
522 Mark as risky-local-variable.
523
524 * international/ogonek.el (ogonek-jak, ogonek-how):
525 Don't use beginning-of-buffer.
526
527 * emacs-lisp/eldoc.el (eldoc-documentation-function): Add autoload.
528
529 * calendar/solar.el (solar-data-list): Move definition up.
530
531 * dnd.el (dnd-protocol-alist): Add autoload.
532
533 * progmodes/sh-script.el: Many doc usage fixes.
534 (sh-indent-after-do): Change default to match common styles.
535
5362005-05-13 Luc Teirlinck <teirllm@auburn.edu>
537
538 * files.el (interpreter-mode-alist)
539 (auto-mode-interpreter-regexp): Doc fixes.
540
5412005-05-13 Matt Hodges <MPHodges@member.fsf.org>
542
543 * tmm.el (tmm-get-keymap): Include only active menus and menu
544 items.
545
546 * emacs-lisp/easymenu.el (easy-menu-define): Doc fixes.
547
5482005-05-13 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
549
550 * dired.el (dired-mode): make-variable-buffer-local =>
551 make-local-variable
552
5532005-05-13 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
554
555 * term/mac-win.el (mac-select-convert-to-string): Try coding
556 systems in mac-script-code-coding-systems if specified one cannot
557 encode string for `com.apple.traditional-mac-plain-text'.
558
5592005-05-13 Daniel Pfeiffer <occitan@esperanto.org>
560
561 * progmodes/make-mode.el (makefile-targets-face)
562 (makefile-shell-face, makefile-makepp-perl-face): New faces.
563 (makefile-dependency-regex): Fix it to not make the colon in
564 $(var:a=b) special.
565 (makefile-rule-action-regex): New regexp for highlighting embedded
566 Shell strings.
567 (makefile-macroassign-regex): Handle != for highlighting as
568 embedded Shell strings.
569 (makefile-var-use-regex): New const.
570 (makefile-statements, makefile-automake-statements)
571 (makefile-gmake-statements, makefile-makepp-statements)
572 (makefile-bsdmake-statements): New consts.
573 (makefile-make-font-lock-keywords): New function.
574 (makefile-automake-font-lock-keywords)
575 (makefile-gmake-font-lock-keywords)
576 (makefile-makepp-font-lock-keywords)
577 (makefile-bsdmake-font-lock-keywords): New consts.
578 (makefile-mode-map): Add switchers between the various submodes.
579 (makefile-mode): Document the availability of the variants.
580 (makefile-automake-mode, makefile-gmake-mode)
581 (makefile-makepp-mode, makefile-bsdmake-mode): New derived modes.
582
583 * files.el (auto-mode-alist, interpreter-mode-alist): Set up the
584 new variants of makefile-mode.
585
5862005-05-12 Stefan Monnier <monnier@iro.umontreal.ca>
587
588 * font-lock.el (font-lock-comment-delimiter-face): Fix up
589 the inheritance.
590
5912005-05-12 Luc Teirlinck <teirllm@auburn.edu>
592
593 * progmodes/inf-lisp.el (inferior-lisp-mode-hook)
594 (inferior-lisp-load-hook): Convert defcustoms back to defvars.
595
596 * files.el (normal-mode): Extend the scope of the
597 `enable-local-variables' binding to include the `set-auto-mode' call.
598 (magic-mode-alist): Doc fix.
599
6002005-05-12 Stefan Monnier <monnier@iro.umontreal.ca>
601
602 * font-lock.el (font-lock-comment-delimiter-face): Inherit from
603 font-lock-comment-face rather than copying its setting.
604
6052005-05-12 Andreas Schwab <schwab@suse.de>
606
607 * eshell/esh-mode.el (eshell-send-input): Doc fix.
608
6092005-05-12 Lute Kamstra <lute@gnu.org>
610
611 * emacs-lisp/generic.el (define-generic-mode): Don't generate a
612 defcustom for the mode hook variable. Delete the last argument.
613 * generic-x.el: Fix callers of define-generic-mode.
614 (generic-x-modes): Delete group.
615 (show-tabs-tab-face, show-tabs-space-face): Put them in the
616 generic-x customization group.
617
6182005-05-12 Kim F. Storm <storm@cua.dk>
619
620 * font-lock.el (font-lock-negation-char-face): Default to "off".
621
622 * progmodes/cc-fonts.el (c-basic-matchers-before): Don't apply
623 font-lock-negation-char-face to ! in !=.
624
6252005-05-12 Masatake YAMATO <jet@gyve.org>
626
627 * add-log.el (find-change-log): Fix typos in the docstring
628 of function.
629
12005-05-11 Arne J,Ax(Brgensen <arne@arnested.dk> 6302005-05-11 Arne J,Ax(Brgensen <arne@arnested.dk>
2 631
3 * international/latexenc.el (latexenc-find-file-coding-system): 632 * international/latexenc.el (latexenc-find-file-coding-system):
@@ -21,6 +650,12 @@
21 650
222005-05-11 Stefan Monnier <monnier@iro.umontreal.ca> 6512005-05-11 Stefan Monnier <monnier@iro.umontreal.ca>
23 652
653 * font-lock.el (font-lock-fontify-syntactically-region): Don't use
654 comment-end if comment-start-skip is not set.
655 Obey the font-lock-comment-delimiter-face variables.
656
6572005-05-11 Stefan Monnier <monnier@iro.umontreal.ca>
658
24 * files.el (executable-find): Move from executable.el. Use locate-file. 659 * files.el (executable-find): Move from executable.el. Use locate-file.
25 * progmodes/executable.el (executable-find): Move to files.el. 660 * progmodes/executable.el (executable-find): Move to files.el.
26 661
@@ -33,6 +668,11 @@
33 (mouse-select, mouse-select-internal, mouse-extend-internal): 668 (mouse-select, mouse-select-internal, mouse-extend-internal):
34 Use it to implement mouse-1-click-follows-link functionality. 669 Use it to implement mouse-1-click-follows-link functionality.
35 670
6712005-05-11 Richard M. Stallman <rms@gnu.org>
672
673 * font-lock.el (font-lock-fontify-syntactically-region):
674 Use font-lock-comment-delimiter-face for comment delimiters.
675
362005-05-10 Jay Belanger <belanger@truman.edu> 6762005-05-10 Jay Belanger <belanger@truman.edu>
37 677
38 * calc/calc-help.el (calc-m-prefix-help): Add mention of 678 * calc/calc-help.el (calc-m-prefix-help): Add mention of
@@ -53,6 +693,9 @@
53 * cus-edit.el (custom-file): Call file-chase-links. 693 * cus-edit.el (custom-file): Call file-chase-links.
54 694
55 * files.el (read-directory-name): Fix previous change. 695 * files.el (read-directory-name): Fix previous change.
696 (hack-local-variables-confirm): New function.
697 (hack-local-variables-prop-line, hack-local-variables)
698 (hack-one-local-variable): Use it.
56 699
572005-05-10 Lute Kamstra <lute@gnu.org> 7002005-05-10 Lute Kamstra <lute@gnu.org>
58 701
@@ -1123,7 +1766,7 @@
1123 1766
11242005-04-15 Carsten Dominik <dominik@science.uva.nl> 17672005-04-15 Carsten Dominik <dominik@science.uva.nl>
1125 1768
1126 * textmodes/org.el: (org-agenda-date-prompt): Rename from 1769 * textmodes/org.el (org-agenda-date-prompt): Rename from
1127 `org-agenda-date-today'. 1770 `org-agenda-date-today'.
1128 (org-evaluate-time-range): Insert at point instead of directly 1771 (org-evaluate-time-range): Insert at point instead of directly
1129 after time range. 1772 after time range.
@@ -1327,7 +1970,7 @@
1327 to dnd-insert-text. 1970 to dnd-insert-text.
1328 (x-dnd-protocol-alist, x-dnd-open-file-other-window) 1971 (x-dnd-protocol-alist, x-dnd-open-file-other-window)
1329 (x-dnd-handle-one-url, x-dnd-get-local-file-uri) 1972 (x-dnd-handle-one-url, x-dnd-get-local-file-uri)
1330 (x-dnd-get-local-file-name, x-dnd-open-local-file) 1973 (x-dnd-get-local-file-name, x-dnd-open-local-file)
1331 (x-dnd-open-file, x-dnd-insert-text): Move to dnd.el (without x-). 1974 (x-dnd-open-file, x-dnd-insert-text): Move to dnd.el (without x-).
1332 1975
1333 * dnd.el (dnd-protocol-alist): New file with generic DND functions. 1976 * dnd.el (dnd-protocol-alist): New file with generic DND functions.
@@ -2374,7 +3017,7 @@
2374 3017
23752005-03-24 Jay Belanger <belanger@truman.edu> 30182005-03-24 Jay Belanger <belanger@truman.edu>
2376 3019
2377 * calc/calc-embed.el (calc-embedded-mode-change): Save all 3020 * calc/calc-embed.el (calc-embedded-mode-change): Save all
2378 relevant mode settings in calc-embedded-original-modes when modes 3021 relevant mode settings in calc-embedded-original-modes when modes
2379 are permanently changed. 3022 are permanently changed.
2380 3023
@@ -4074,7 +4717,7 @@
4074 (calc-set-language): Set math-expr-special-function-mapping. 4717 (calc-set-language): Set math-expr-special-function-mapping.
4075 4718
4076 * calc/calc-prog.el (calc-edit-user-syntax, calc-fix-token-name) 4719 * calc/calc-prog.el (calc-edit-user-syntax, calc-fix-token-name)
4077 (calc-write-parse-table-part): Add LaTeX support. 4720 (calc-write-parse-table-part): Add LaTeX support.
4078 4721
4079 * calc/calc.el (calc-language): Adjust docstring. 4722 * calc/calc.el (calc-language): Adjust docstring.
4080 (calc-set-mode-line): Add LaTeX support. 4723 (calc-set-mode-line): Add LaTeX support.
@@ -5049,7 +5692,7 @@
5049 5692
50502004-12-31 Jay Belanger <belanger@truman.edu> 56932004-12-31 Jay Belanger <belanger@truman.edu>
5051 5694
5052 * calc/calc-store.el (calcVar-digit, calcVar-oper): Remove the need 5695 * calc/calc-store.el (calcVar-digit, calcVar-oper): Remove the need
5053 for "var-" at the beginning of the minibuffer. 5696 for "var-" at the beginning of the minibuffer.
5054 5697
50552004-12-31 Richard M. Stallman <rms@gnu.org> 56982004-12-31 Richard M. Stallman <rms@gnu.org>
@@ -5899,7 +6542,7 @@
5899 * calendar/holidays.el (holiday-easter-etc): Make arguments 6542 * calendar/holidays.el (holiday-easter-etc): Make arguments
5900 optional for backwards compatibility. Doc fix. 6543 optional for backwards compatibility. Doc fix.
5901 Remove un-necessary local vars mandatory, output-list. 6544 Remove un-necessary local vars mandatory, output-list.
5902 (holiday-advent): Make arguments optional for backwards 6545 (holiday-advent): Make arguments optional for backwards
5903 compatibility. Doc fix. 6546 compatibility. Doc fix.
5904 6547
59052004-12-06 Stefan Monnier <monnier@iro.umontreal.ca> 65482004-12-06 Stefan Monnier <monnier@iro.umontreal.ca>
@@ -7008,7 +7651,7 @@
7008 disp-trail by declared variable. 7651 disp-trail by declared variable.
7009 7652
7010 * calc/calc-sel.el (calc-edit-disp-trail): Declare it. 7653 * calc/calc-sel.el (calc-edit-disp-trail): Declare it.
7011 (calc-finish-selection-edit): Replace variable disp-trail by 7654 (calc-finish-selection-edit): Replace variable disp-trail by
7012 declared variable. 7655 declared variable.
7013 (calc-selection-cache-entry): Move declaration to earlier in the file. 7656 (calc-selection-cache-entry): Move declaration to earlier in the file.
7014 (calc-selection-cache-num, calc-selection-cache-comp) 7657 (calc-selection-cache-num, calc-selection-cache-comp)
@@ -7024,14 +7667,14 @@
7024 (calc-sel-reselect): New variable. 7667 (calc-sel-reselect): New variable.
7025 (calc-auto-selection, calc-enter-selection, calc-edit-selection) 7668 (calc-auto-selection, calc-enter-selection, calc-edit-selection)
7026 (calc-sel-evaluate, calc-sel-expand-formula, calc-sel-expand-formula) 7669 (calc-sel-evaluate, calc-sel-expand-formula, calc-sel-expand-formula)
7027 (calc-sel-mult-both-sides, calc-sel-add-both-sides): Replace variable 7670 (calc-sel-mult-both-sides, calc-sel-add-both-sides): Replace variable
7028 reselect with declared variable. 7671 reselect with declared variable.
7029 7672
7030 * calc/calc-rewr.el (math-regs, math-num-regs, math-prog-last) 7673 * calc/calc-rewr.el (math-regs, math-num-regs, math-prog-last)
7031 (math-bound-vars, math-conds, math-copy-neg, math-rhs) 7674 (math-bound-vars, math-conds, math-copy-neg, math-rhs)
7032 (math-pattern, math-remembering, math-aliased-vars, math-mt-many) 7675 (math-pattern, math-remembering, math-aliased-vars, math-mt-many)
7033 (math-import-list, math-rewrite-phase): Declare them. 7676 (math-import-list, math-rewrite-phase): Declare them.
7034 (math-rewrite): Use let* to declare variables. 7677 (math-rewrite): Use let* to declare variables.
7035 (calc-rewrite-selection): Make rules a local variable. 7678 (calc-rewrite-selection): Make rules a local variable.
7036 (calc-rewr-sel): New variable. 7679 (calc-rewr-sel): New variable.
7037 (calc-rewrite-selection, calc-locate-selection-marker) 7680 (calc-rewrite-selection, calc-locate-selection-marker)
@@ -7264,15 +7907,15 @@
7264 7907
72652004-11-15 Jay Belanger <belanger@truman.edu> 79082004-11-15 Jay Belanger <belanger@truman.edu>
7266 7909
7267 * calc/calcalg2.el (math-integrate-by-parts): Remove unused 7910 * calc/calcalg2.el (math-integrate-by-parts): Remove unused
7268 variable var-thing. 7911 variable var-thing.
7269 (math-integ-depth, math-integ-level, math-integral-limit) 7912 (math-integ-depth, math-integ-level, math-integral-limit)
7270 (math-enable-subst, math-any-substs, math-integ-msg) 7913 (math-enable-subst, math-any-substs, math-integ-msg)
7271 (math-prev-parts-v, math-good-parts, math-max-integral-limit) 7914 (math-prev-parts-v, math-good-parts, math-max-integral-limit)
7272 (math-int-threshold, math-int-factors, math-double-roots) 7915 (math-int-threshold, math-int-factors, math-double-roots)
7273 (math-solve-simplifying, var-IntegLimit, math-solve-sign) 7916 (math-solve-simplifying, var-IntegLimit, math-solve-sign)
7274 (var-GenCount): Declare these variables. 7917 (var-GenCount): Declare these variables.
7275 (calcFunc-integ): Don't check if var-IntegLimit is bound. 7918 (calcFunc-integ): Don't check if var-IntegLimit is bound.
7276 (math-integral-cache, math-integral-cache-state): 7919 (math-integral-cache, math-integral-cache-state):
7277 Move declarations to earlier in the file. 7920 Move declarations to earlier in the file.
7278 (math-deriv-var, math-deriv-total, math-deriv-symb) 7921 (math-deriv-var, math-deriv-total, math-deriv-symb)
@@ -7280,7 +7923,7 @@
7280 (math-so-far, math-integ-expr, math-expr-parts, calc-low) 7923 (math-so-far, math-integ-expr, math-expr-parts, calc-low)
7281 (calc-high, math-solve-var, math-solve-full, math-solve-vars) 7924 (calc-high, math-solve-var, math-solve-full, math-solve-vars)
7282 (math-try-solve-sign, math-solve-b, math-solve-system-vv) 7925 (math-try-solve-sign, math-solve-b, math-solve-system-vv)
7283 (math-solve-res): New variables 7926 (math-solve-res): New variables
7284 (math-derivative, calcFunc-deriv, calcFunc-tderiv) 7927 (math-derivative, calcFunc-deriv, calcFunc-tderiv)
7285 (math-integral, math-replace-integral-parts) 7928 (math-integral, math-replace-integral-parts)
7286 (math-integrate-by-parts, calc-dump-integral-cache) 7929 (math-integrate-by-parts, calc-dump-integral-cache)
@@ -7384,18 +8027,18 @@
7384 8027
73852004-11-12 Jay Belanger <belanger@truman.edu> 80282004-11-12 Jay Belanger <belanger@truman.edu>
7386 8029
7387 * calc/calc-graph.el (calc-dumb-map): Declare it. 8030 * calc/calc-graph.el (calc-dumb-map): Declare it.
7388 (calc-graph-show-dumb): Check if calc-dumb-map is non-nil rather 8031 (calc-graph-show-dumb): Check if calc-dumb-map is non-nil rather
7389 than unbound. 8032 than unbound.
7390 (calc-graph-name): Made `end' a local variable. 8033 (calc-graph-name): Made `end' a local variable.
7391 (calc-graph-lookup): Made `varname' a local variable. 8034 (calc-graph-lookup): Made `varname' a local variable.
7392 (var-DUMMY, var-DUMMY2, var-PlotRejects, calc-gnuplot-trail-mark): 8035 (var-DUMMY, var-DUMMY2, var-PlotRejects, calc-gnuplot-trail-mark):
7393 Declare them. 8036 Declare them.
7394 (calc-graph-format-data): Don't check if var-PlotRejects is bound. 8037 (calc-graph-format-data): Don't check if var-PlotRejects is bound.
7395 (calc-graph-plot, calc-graph-compute-3d): Remove references to 8038 (calc-graph-plot, calc-graph-compute-3d): Remove references to
7396 the unused variable y3vec. 8039 the unused variable y3vec.
7397 (calc-graph-show-dumb): Remove reference to unused variable found-pt. 8040 (calc-graph-show-dumb): Remove reference to unused variable found-pt.
7398 (calc-graph-kill-hook, calc-graph-plot): Remove reference to 8041 (calc-graph-kill-hook, calc-graph-plot): Remove reference to
7399 calc-graph-prev-kill-hook. 8042 calc-graph-prev-kill-hook.
7400 (calc-graph-yvalue, calc-graph-yvec, calc-graph-numsteps) 8043 (calc-graph-yvalue, calc-graph-yvec, calc-graph-numsteps)
7401 (calc-graph-numsteps3, calc-graph-xvalue, calc-graph-xvec) 8044 (calc-graph-numsteps3, calc-graph-xvalue, calc-graph-xvec)
@@ -7408,7 +8051,7 @@
7408 (calc-graph-y3step, calc-graph-y3step, calc-graph-zval) 8051 (calc-graph-y3step, calc-graph-y3step, calc-graph-zval)
7409 (calc-graph-stepcount, calc-graph-is-splot) 8052 (calc-graph-stepcount, calc-graph-is-splot)
7410 (calc-graph-surprise-splot, calc-graph-blank) 8053 (calc-graph-surprise-splot, calc-graph-blank)
7411 (calc-graph-non-blank, calc-graph-curve-num): New variables. 8054 (calc-graph-non-blank, calc-graph-curve-num): New variables.
7412 (calc-graph-plot, calc-graph-compute-2d, calc-graph-refine-2d) 8055 (calc-graph-plot, calc-graph-compute-2d, calc-graph-refine-2d)
7413 (calc-graph-recompute-2d, calc-graph-compute-3d) 8056 (calc-graph-recompute-2d, calc-graph-compute-3d)
7414 (calc-graph-format-data): Replace undeclared variables with the 8057 (calc-graph-format-data): Replace undeclared variables with the
@@ -7482,28 +8125,28 @@
7482 8125
74832004-11-11 Jay Belanger <belanger@truman.edu> 81262004-11-11 Jay Belanger <belanger@truman.edu>
7484 8127
7485 * calc/calc-comb.el (math-prime-factors-finished): Declare it as 8128 * calc/calc-comb.el (math-prime-factors-finished): Declare it as
7486 a variable. 8129 a variable.
7487 (calcFunc-dfac): Replace unbound max by n. 8130 (calcFunc-dfac): Replace unbound max by n.
7488 (math-stirling-local-cache): New variable. 8131 (math-stirling-local-cache): New variable.
7489 (math-stirling-number, math-stirling-1, math-stirling-2): 8132 (math-stirling-number, math-stirling-1, math-stirling-2):
7490 Replace the variable `cache' by the declared variable 8133 Replace the variable `cache' by the declared variable
7491 math-stirling-local-cache. 8134 math-stirling-local-cache.
7492 (var-RandSeed): Declare it as a variable. 8135 (var-RandSeed): Declare it as a variable.
7493 (math-init-random-base, math-random-digit): Don't check to see if 8136 (math-init-random-base, math-random-digit): Don't check to see if
7494 var-RandSeed is bound. 8137 var-RandSeed is bound.
7495 (math-random-cache, math-gaussian-cache, calc-verbose-nextprime): 8138 (math-random-cache, math-gaussian-cache, calc-verbose-nextprime):
7496 Declare them instead of just setting them. 8139 Declare them instead of just setting them.
7497 (math-init-random-base): Made i a local variable. 8140 (math-init-random-base): Made i a local variable.
7498 (math-random-digit): Made math-random-last a local variable. 8141 (math-random-digit): Made math-random-last a local variable.
7499 (math-prime-test-cache): Move declaration to before it is used. 8142 (math-prime-test-cache): Move declaration to before it is used.
7500 (math-prime-test-cache-k, math-prime-test-cache-q) 8143 (math-prime-test-cache-k, math-prime-test-cache-q)
7501 (math-prime-test-cache-nm1, math-prime-factors-finished): 8144 (math-prime-test-cache-nm1, math-prime-factors-finished):
7502 Declare them as variables. 8145 Declare them as variables.
7503 8146
75042004-11-11 Jay Belanger <belanger@truman.edu> 81472004-11-11 Jay Belanger <belanger@truman.edu>
7505 8148
7506 * calc/calc-ext.el (math-defcache): Use defvar for the new 8149 * calc/calc-ext.el (math-defcache): Use defvar for the new
7507 variables it creates. 8150 variables it creates.
7508 8151
75092004-11-11 Lars Hansen <larsh@math.ku.dk> 81522004-11-11 Lars Hansen <larsh@math.ku.dk>
@@ -7519,45 +8162,45 @@
7519 8162
75202004-11-10 Jay Belanger <belanger@truman.edu> 81632004-11-10 Jay Belanger <belanger@truman.edu>
7521 8164
7522 * calc/calc-aent.el (calc-do-quick-calc): Use kill-new to append 8165 * calc/calc-aent.el (calc-do-quick-calc): Use kill-new to append
7523 string to kill-ring. 8166 string to kill-ring.
7524 8167
7525 * calc/calc-aent.el (calc-alg-exp, math-toks) 8168 * calc/calc-aent.el (calc-alg-exp, math-toks)
7526 (math-exp-pos,math-exp-old-pos, math-exp-token) 8169 (math-exp-pos,math-exp-old-pos, math-exp-token)
7527 (math-exp-keep-spaces, math-exp-str): New variables. 8170 (math-exp-keep-spaces, math-exp-str): New variables.
7528 (calc-do-alg-entry, calcAlg-equals, calcAlg-edit) 8171 (calc-do-alg-entry, calcAlg-equals, calcAlg-edit)
7529 (calcAlg-enter): Use declared variable calc-alg-exp. 8172 (calcAlg-enter): Use declared variable calc-alg-exp.
7530 (math-build-parse-table, math-find-user-token): Use declared 8173 (math-build-parse-table, math-find-user-token): Use declared
7531 variable math-toks. 8174 variable math-toks.
7532 (math-read-exprs, math-read-token, calc-check-user-syntax) 8175 (math-read-exprs, math-read-token, calc-check-user-syntax)
7533 (calc-match-user-syntax, match-factor-after, math-read-factor): 8176 (calc-match-user-syntax, match-factor-after, math-read-factor):
7534 Use declared variables math-exp-pos math-exp-old-pos. 8177 Use declared variables math-exp-pos math-exp-old-pos.
7535 (math-read-exprs, math-read-token, math-read-expr-level) 8178 (math-read-exprs, math-read-token, math-read-expr-level)
7536 (calc-check-user-syntax, calc-match-user-syntax) 8179 (calc-check-user-syntax, calc-match-user-syntax)
7537 (match-factor-after, math-read-factor): Use declared variable 8180 (match-factor-after, math-read-factor): Use declared variable
7538 math-exp-token. 8181 math-exp-token.
7539 (math-read-exprs, math-read-expr-list, math-read-token) 8182 (math-read-exprs, math-read-expr-list, math-read-token)
7540 (math-read-factor): Use declared variable math-exp-keep-spaces. 8183 (math-read-factor): Use declared variable math-exp-keep-spaces.
7541 (math-read-exprs, math-read-token): Use declared variable 8184 (math-read-exprs, math-read-token): Use declared variable
7542 math-exp-str. 8185 math-exp-str.
7543 (calc-match-user-syntax): Make m a local variable. 8186 (calc-match-user-syntax): Make m a local variable.
7544 8187
7545 * calc/calc-ext.el (math-read-expr): Use declared variables 8188 * calc/calc-ext.el (math-read-expr): Use declared variables
7546 math-exp-pos, math-exp-old-pos, math-exp-str, math-exp-token, 8189 math-exp-pos, math-exp-old-pos, math-exp-str, math-exp-token,
7547 math-exp-keep-spaces. 8190 math-exp-keep-spaces.
7548 8191
7549 * calc/calc-forms.el (math-read-angle-bracket): Use declared 8192 * calc/calc-forms.el (math-read-angle-bracket): Use declared
7550 variables math-exp-pos, math-exp-str. 8193 variables math-exp-pos, math-exp-str.
7551 8194
7552 * calc/calc-lang.el (math-parse-tex-sum): Use declared variable 8195 * calc/calc-lang.el (math-parse-tex-sum): Use declared variable
7553 math-exp-old-pos. 8196 math-exp-old-pos.
7554 (math-parse-fortran-vector, math-parse-fortran-vector-end) 8197 (math-parse-fortran-vector, math-parse-fortran-vector-end)
7555 (math-parse-eqn-prime): Use declared variable math-exp-token. 8198 (math-parse-eqn-prime): Use declared variable math-exp-token.
7556 8199
7557 * calc/calc-vec.el (math-read-brackets, math-check-for-commas): 8200 * calc/calc-vec.el (math-read-brackets, math-check-for-commas):
7558 Use declared variable math-exp-pos. 8201 Use declared variable math-exp-pos.
7559 (math-check-for-commas): Use declared variable math-exp-str. 8202 (math-check-for-commas): Use declared variable math-exp-str.
7560 (math-read-brackets): Use declared variables math-exp-old-pos, 8203 (math-read-brackets): Use declared variables math-exp-old-pos,
7561 math-exp-keep-spaces. 8204 math-exp-keep-spaces.
7562 (math-read-brackets, math-read-vector, math-read-matrix): 8205 (math-read-brackets, math-read-vector, math-read-matrix):
7563 Use declared variable math-exp-token. 8206 Use declared variable math-exp-token.
@@ -7595,42 +8238,42 @@
7595 8238
75962004-11-09 Jay Belanger <belanger@truman.edu> 82392004-11-09 Jay Belanger <belanger@truman.edu>
7597 8240
7598 * calc/calc-ext.el (calc-init-extensions): Remove old code. 8241 * calc/calc-ext.el (calc-init-extensions): Remove old code.
7599 8242
7600 * calc/calc-ext.el (math-expr-data, math-mt-many, math-mt-func) 8243 * calc/calc-ext.el (math-expr-data, math-mt-many, math-mt-func)
7601 (calc-z-prefix-buf, calc-z-prefix-msgs): New variables. 8244 (calc-z-prefix-buf, calc-z-prefix-msgs): New variables.
7602 (calc-z-prefix-help, calc-user-function-list): Use declared 8245 (calc-z-prefix-help, calc-user-function-list): Use declared
7603 variables calc-z-prefix-buf, calc-z-prefix-msgs. 8246 variables calc-z-prefix-buf, calc-z-prefix-msgs.
7604 (math-map-tree, math-map-tree-rec): Use declared variables 8247 (math-map-tree, math-map-tree-rec): Use declared variables
7605 math-mt-many, math-mt-func. 8248 math-mt-many, math-mt-func.
7606 (math-read-expression, math-read-string): Use declared variable 8249 (math-read-expression, math-read-string): Use declared variable
7607 math-expr-data. 8250 math-expr-data.
7608 8251
7609 * calc/calc-ext.el (math-normalize-nonstandard): Use declared 8252 * calc/calc-ext.el (math-normalize-nonstandard): Use declared
7610 variable math-normalize-a. 8253 variable math-normalize-a.
7611 8254
7612 * calc/calc.el (math-normalize-a): New variable. 8255 * calc/calc.el (math-normalize-a): New variable.
7613 (math-normalize): Use declared variable math-normalize-a. 8256 (math-normalize): Use declared variable math-normalize-a.
7614 8257
7615 * calc/calc-poly.el (math-expand-form): Use declared variable 8258 * calc/calc-poly.el (math-expand-form): Use declared variable
7616 math-mt-many. 8259 math-mt-many.
7617 8260
7618 * calc/calc-rewr.el (math-rewrite, math-rewrite-phase): 8261 * calc/calc-rewr.el (math-rewrite, math-rewrite-phase):
7619 Use declared variable math-mt-many. 8262 Use declared variable math-mt-many.
7620 (math-rewrite): Use declared variable math-mt-func. 8263 (math-rewrite): Use declared variable math-mt-func.
7621 8264
7622 * calc/calc-vec.el (math-read-brackets, math-read-vector) 8265 * calc/calc-vec.el (math-read-brackets, math-read-vector)
7623 (math-read-matrix): Use declared variable math-expr-data. 8266 (math-read-matrix): Use declared variable math-expr-data.
7624 8267
7625 * calc/calc-lang.el (math-parse-fortran-vector) 8268 * calc/calc-lang.el (math-parse-fortran-vector)
7626 (math-parse-fortran-vector-end, math-parse-tex-sum) 8269 (math-parse-fortran-vector-end, math-parse-tex-sum)
7627 (math-parse-eqn-matrix, math-parse-eqn-prime) 8270 (math-parse-eqn-matrix, math-parse-eqn-prime)
7628 (math-read-math-subscr): Use declared variable math-expr-data. 8271 (math-read-math-subscr): Use declared variable math-expr-data.
7629 8272
7630 * calc/calc-aent.el (math-read-exprs, math-read-expr-list) 8273 * calc/calc-aent.el (math-read-exprs, math-read-expr-list)
7631 (math-read-expr-level, math-read-token, calc-check-user-syntax) 8274 (math-read-expr-level, math-read-token, calc-check-user-syntax)
7632 (calc-match-user-syntax, math-read-if, math-factor-after) 8275 (calc-match-user-syntax, math-read-if, math-factor-after)
7633 (math-read-factor): Use declared variable math-expr-data. 8276 (math-read-factor): Use declared variable math-expr-data.
7634 8277
76352004-11-09 Glenn Morris <gmorris@ast.cam.ac.uk> 82782004-11-09 Glenn Morris <gmorris@ast.cam.ac.uk>
7636 8279
@@ -7663,14 +8306,14 @@
76632004-11-09 Jay Belanger <belanger@truman.edu> 83062004-11-09 Jay Belanger <belanger@truman.edu>
7664 8307
7665 * calc/calc.el (calc-mode-hook, calc-trail-mode-hook) 8308 * calc/calc.el (calc-mode-hook, calc-trail-mode-hook)
7666 (calc-start-hook, calc-end-hook, calc-load-hook): New variables. 8309 (calc-start-hook, calc-end-hook, calc-load-hook): New variables.
7667 8310
7668 * calc/calc.el (calc, calc-trail-display, calc-mode): 8311 * calc/calc.el (calc, calc-trail-display, calc-mode):
7669 Remove obsolete sections. 8312 Remove obsolete sections.
7670 8313
7671 * calc/calc.el (calc-x-paste-text): Remove. 8314 * calc/calc.el (calc-x-paste-text): Remove.
7672 8315
7673 * calc/calc-ext.el (calc-init-extensions): Bind calc-yank to 8316 * calc/calc-ext.el (calc-init-extensions): Bind calc-yank to
7674 mouse-2. 8317 mouse-2.
7675 8318
76762004-11-09 Nick Roberts <nickrob@snap.net.nz> 83192004-11-09 Nick Roberts <nickrob@snap.net.nz>
@@ -7716,14 +8359,14 @@
7716 8359
77172004-11-08 Jay Belanger <belanger@truman.edu> 83602004-11-08 Jay Belanger <belanger@truman.edu>
7718 8361
7719 * calc/calcalg2.el (math-do-integral-methods): Try linear then 8362 * calc/calcalg2.el (math-do-integral-methods): Try linear then
7720 non-linear substitutions. 8363 non-linear substitutions.
7721 8364
77222004-11-08 Jay Belanger <belanger@truman.edu> 83652004-11-08 Jay Belanger <belanger@truman.edu>
7723 8366
7724 * calc/calcalg2.el (math-linear-subst-tried): New variable. 8367 * calc/calcalg2.el (math-linear-subst-tried): New variable.
7725 (math-do-integral): Set `math-linear-subst-tried' to nil. 8368 (math-do-integral): Set `math-linear-subst-tried' to nil.
7726 (math-do-integral-methods): Use `math-linear-subst-tried' to 8369 (math-do-integral-methods): Use `math-linear-subst-tried' to
7727 determine what type of substitution to try. 8370 determine what type of substitution to try.
7728 (math-integ-try-linear-substituion): 8371 (math-integ-try-linear-substituion):
7729 Set `math-linear-subst-tried' to t. 8372 Set `math-linear-subst-tried' to t.
@@ -8327,7 +8970,7 @@
83272004-10-26 Jay Belanger <belanger@truman.edu> 89702004-10-26 Jay Belanger <belanger@truman.edu>
8328 8971
8329 * calc/calc.el (calc,full-calc, calc-quit, calc-keypad) 8972 * calc/calc.el (calc,full-calc, calc-quit, calc-keypad)
8330 (full-calc-keypad, calc-trail-display): Use an extra argument 8973 (full-calc-keypad, calc-trail-display): Use an extra argument
8331 instead of `interactive-p'. 8974 instead of `interactive-p'.
8332 8975
8333 * calc/calc-misc.el (calc-other-window): Use an extra argument 8976 * calc/calc-misc.el (calc-other-window): Use an extra argument
@@ -8372,7 +9015,7 @@
8372 9015
83732004-10-25 Jay Belanger <belanger@truman.edu> 90162004-10-25 Jay Belanger <belanger@truman.edu>
8374 9017
8375 * calc/calc-incom.el (calc-digit-dots): Inhibit read-only before 9018 * calc/calc-incom.el (calc-digit-dots): Inhibit read-only before
8376 erasing minibuffer. 9019 erasing minibuffer.
8377 9020
83782004-10-25 Simon Josefsson <jas@extundo.com> 90212004-10-25 Simon Josefsson <jas@extundo.com>
@@ -9358,7 +10001,7 @@
9358 (calc-invocation-macro, calc-show-banner): Give these values as 10001 (calc-invocation-macro, calc-show-banner): Give these values as
9359 part of `calc-mode-var-list's initialization after the variables 10002 part of `calc-mode-var-list's initialization after the variables
9360 are declared with defvar. 10003 are declared with defvar.
9361 (calc-bug-address): Change email address to send bug reports to. 10004 (calc-bug-address): Change email address to send bug reports to.
9362 Change the maintainer address at the top. 10005 Change the maintainer address at the top.
9363 (calc-mode): Compare `calc-settings-file' to `user-init-file' rather 10006 (calc-mode): Compare `calc-settings-file' to `user-init-file' rather
9364 than "\\.emacs" to determine if it is the user-init-file. 10007 than "\\.emacs" to determine if it is the user-init-file.
@@ -15654,7 +16297,7 @@
15654 16297
156552004-02-10 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 162982004-02-10 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
15656 16299
15657 * x-dnd.el (x-dnd-types-alist): Add COMPOUND_TEXT, FILE_NAME 16300 * x-dnd.el (x-dnd-types-alist): Add COMPOUND_TEXT, FILE_NAME
15658 handled by x-dnd-handle-file-name. 16301 handled by x-dnd-handle-file-name.
15659 (x-dnd-known-types): Add COMPOUND_TEXT. 16302 (x-dnd-known-types): Add COMPOUND_TEXT.
15660 (x-dnd-init-frame): Call x-dnd-init-motif-for-frame. 16303 (x-dnd-init-frame): Call x-dnd-init-motif-for-frame.
diff --git a/lisp/add-log.el b/lisp/add-log.el
index 2714df554b8..6dcbfca0c26 100644
--- a/lisp/add-log.el
+++ b/lisp/add-log.el
@@ -250,6 +250,9 @@ Note: The search is conducted only within 10%, at the beginning of the file."
250 ;; Acknowledgements. 250 ;; Acknowledgements.
251 ;; Don't include plain "From" because that is vague; 251 ;; Don't include plain "From" because that is vague;
252 ;; we want to encourage people to say something more specific. 252 ;; we want to encourage people to say something more specific.
253 ;; Note that the FSF does not use "Patches by"; our convention
254 ;; is to put the name of the author of the changes at the top
255 ;; of the change log entry.
253 ("\\(^\\( +\\|\t\\)\\| \\)\\(Patch\\(es\\)? by\\|Report\\(ed by\\| from\\)\\|Suggest\\(ed by\\|ion from\\)\\)" 256 ("\\(^\\( +\\|\t\\)\\| \\)\\(Patch\\(es\\)? by\\|Report\\(ed by\\| from\\)\\|Suggest\\(ed by\\|ion from\\)\\)"
254 3 'change-log-acknowledgement-face)) 257 3 'change-log-acknowledgement-face))
255 "Additional expressions to highlight in Change Log mode.") 258 "Additional expressions to highlight in Change Log mode.")
@@ -375,10 +378,10 @@ nil, by matching `change-log-version-number-regexp-list'."
375 378
376Optional arg FILE-NAME specifies the file to use. 379Optional arg FILE-NAME specifies the file to use.
377If FILE-NAME is nil, use the value of `change-log-default-name'. 380If FILE-NAME is nil, use the value of `change-log-default-name'.
378If 'change-log-default-name' is nil, behave as though it were 'ChangeLog' 381If `change-log-default-name' is nil, behave as though it were 'ChangeLog'
379\(or whatever we use on this operating system). 382\(or whatever we use on this operating system).
380 383
381If 'change-log-default-name' contains a leading directory component, then 384If `change-log-default-name' contains a leading directory component, then
382simply find it in the current directory. Otherwise, search in the current 385simply find it in the current directory. Otherwise, search in the current
383directory and its successive parents for a file so named. 386directory and its successive parents for a file so named.
384 387
@@ -489,13 +492,13 @@ non-nil, otherwise in local time."
489 492
490 (if whoami 493 (if whoami
491 (progn 494 (progn
492 (setq full-name (read-input "Full name: " full-name)) 495 (setq full-name (read-string "Full name: " full-name))
493 ;; Note that some sites have room and phone number fields in 496 ;; Note that some sites have room and phone number fields in
494 ;; full name which look silly when inserted. Rather than do 497 ;; full name which look silly when inserted. Rather than do
495 ;; anything about that here, let user give prefix argument so that 498 ;; anything about that here, let user give prefix argument so that
496 ;; s/he can edit the full name field in prompter if s/he wants. 499 ;; s/he can edit the full name field in prompter if s/he wants.
497 (setq mailing-address 500 (setq mailing-address
498 (read-input "Mailing address: " mailing-address)))) 501 (read-string "Mailing address: " mailing-address))))
499 502
500 (unless (equal file-name buffer-file-name) 503 (unless (equal file-name buffer-file-name)
501 (if (or other-window (window-dedicated-p (selected-window))) 504 (if (or other-window (window-dedicated-p (selected-window)))
diff --git a/lisp/align.el b/lisp/align.el
index 5238a75807d..563e839f5fe 100644
--- a/lisp/align.el
+++ b/lisp/align.el
@@ -938,10 +938,10 @@ region, call `align-regexp' and type in that regular expression."
938 (if current-prefix-arg 938 (if current-prefix-arg
939 (list (read-string "Complex align using regexp: " 939 (list (read-string "Complex align using regexp: "
940 "\\(\\s-*\\)") 940 "\\(\\s-*\\)")
941 (string-to-int 941 (string-to-number
942 (read-string 942 (read-string
943 "Parenthesis group to modify (justify if negative): " "1")) 943 "Parenthesis group to modify (justify if negative): " "1"))
944 (string-to-int 944 (string-to-number
945 (read-string "Amount of spacing (or column if negative): " 945 (read-string "Amount of spacing (or column if negative): "
946 (number-to-string align-default-spacing))) 946 (number-to-string align-default-spacing)))
947 (y-or-n-p "Repeat throughout line? ")) 947 (y-or-n-p "Repeat throughout line? "))
diff --git a/lisp/ansi-color.el b/lisp/ansi-color.el
index e505f91e901..9b36a403b5d 100644
--- a/lisp/ansi-color.el
+++ b/lisp/ansi-color.el
@@ -619,7 +619,7 @@ ESCAPE-SEQ is a SGR control sequences such as \\033[34m. The parameter
619 (while (string-match ansi-color-r escape-seq i) 619 (while (string-match ansi-color-r escape-seq i)
620 (setq i (match-end 0) 620 (setq i (match-end 0)
621 val (ansi-color-get-face-1 621 val (ansi-color-get-face-1
622 (string-to-int (match-string 0 escape-seq) 10))) 622 (string-to-number (match-string 0 escape-seq) 10)))
623 (cond ((not val)) 623 (cond ((not val))
624 ((eq val 'default) 624 ((eq val 'default)
625 (setq f (list val))) 625 (setq f (list val)))
diff --git a/lisp/array.el b/lisp/array.el
index 3aa5d4bd319..f65f14ac550 100644
--- a/lisp/array.el
+++ b/lisp/array.el
@@ -607,7 +607,7 @@ If optional ARG is given, copy through ARG rows up."
607 (let ((check t) 607 (let ((check t)
608 (len)) 608 (len))
609 (while check 609 (while check
610 (setq array-init-field (read-input "Initial field value: ")) 610 (setq array-init-field (read-string "Initial field value: "))
611 (setq len (length array-init-field)) 611 (setq len (length array-init-field))
612 (if (/= len array-field-width) 612 (if (/= len array-field-width)
613 (if (y-or-n-p (format "Change field width to %d? " len)) 613 (if (y-or-n-p (format "Change field width to %d? " len))
@@ -647,8 +647,8 @@ of array-rows-numbered."
647 (<= new-columns-per-line array-max-column)) 647 (<= new-columns-per-line array-max-column))
648 (setq check nil) 648 (setq check nil)
649 (setq new-columns-per-line 649 (setq new-columns-per-line
650 (string-to-int 650 (string-to-number
651 (read-input 651 (read-string
652 (format "Columns per line (1 - %d): " array-max-column))))))) 652 (format "Columns per line (1 - %d): " array-max-column)))))))
653 ;; Check on new-rows-numbered. It has to be done this way 653 ;; Check on new-rows-numbered. It has to be done this way
654 ;; because interactive does not have y-or-n-p. 654 ;; because interactive does not have y-or-n-p.
@@ -927,22 +927,22 @@ Entering array mode calls the function `array-mode-hook'."
927(defun array-init-max-row (&optional arg) 927(defun array-init-max-row (&optional arg)
928 "Initialize the value of `array-max-row'." 928 "Initialize the value of `array-max-row'."
929 (setq array-max-row 929 (setq array-max-row
930 (or arg (string-to-int (read-input "Number of array rows: "))))) 930 (or arg (string-to-number (read-string "Number of array rows: ")))))
931 931
932(defun array-init-max-column (&optional arg) 932(defun array-init-max-column (&optional arg)
933 "Initialize the value of `array-max-column'." 933 "Initialize the value of `array-max-column'."
934 (setq array-max-column 934 (setq array-max-column
935 (or arg (string-to-int (read-input "Number of array columns: "))))) 935 (or arg (string-to-number (read-string "Number of array columns: ")))))
936 936
937(defun array-init-columns-per-line (&optional arg) 937(defun array-init-columns-per-line (&optional arg)
938 "Initialize the value of `array-columns-per-line'." 938 "Initialize the value of `array-columns-per-line'."
939 (setq array-columns-per-line 939 (setq array-columns-per-line
940 (or arg (string-to-int (read-input "Array columns per line: "))))) 940 (or arg (string-to-number (read-string "Array columns per line: ")))))
941 941
942(defun array-init-field-width (&optional arg) 942(defun array-init-field-width (&optional arg)
943 "Initialize the value of `array-field-width'." 943 "Initialize the value of `array-field-width'."
944 (setq array-field-width 944 (setq array-field-width
945 (or arg (string-to-int (read-input "Field width: "))))) 945 (or arg (string-to-number (read-string "Field width: ")))))
946 946
947(defun array-init-rows-numbered (&optional arg) 947(defun array-init-rows-numbered (&optional arg)
948 "Initialize the value of `array-rows-numbered'." 948 "Initialize the value of `array-rows-numbered'."
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el
index 7d0ac885c2f..a968d14a0a9 100644
--- a/lisp/buff-menu.el
+++ b/lisp/buff-menu.el
@@ -77,6 +77,7 @@
77(defface Buffer-menu-buffer-face 77(defface Buffer-menu-buffer-face
78 '((t (:weight bold))) 78 '((t (:weight bold)))
79 "Face used to highlight buffer name." 79 "Face used to highlight buffer name."
80 :group 'Buffer-menu
80 :group 'font-lock-highlighting-faces) 81 :group 'font-lock-highlighting-faces)
81 82
82(defcustom Buffer-menu-buffer+size-width 26 83(defcustom Buffer-menu-buffer+size-width 26
@@ -754,7 +755,7 @@ For more information, see the function `buffer-menu'."
754 (int-to-string (nth 3 buffer)) 755 (int-to-string (nth 3 buffer))
755 `(buffer-name ,(nth 2 buffer) 756 `(buffer-name ,(nth 2 buffer)
756 buffer ,(car buffer) 757 buffer ,(car buffer)
757 face Buffer-menu-buffer-face 758 font-lock-face Buffer-menu-buffer-face
758 mouse-face highlight 759 mouse-face highlight
759 help-echo "mouse-2: select this buffer")) 760 help-echo "mouse-2: select this buffer"))
760 " " 761 " "
diff --git a/lisp/calc/calc-comb.el b/lisp/calc/calc-comb.el
index c7bf225fe7c..b4b397c43f6 100644
--- a/lisp/calc/calc-comb.el
+++ b/lisp/calc/calc-comb.el
@@ -1,6 +1,6 @@
1;;; calc-comb.el --- combinatoric functions for Calc 1;;; calc-comb.el --- combinatoric functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-cplx.el b/lisp/calc/calc-cplx.el
index 90d90e666bb..32d8a07ffc0 100644
--- a/lisp/calc/calc-cplx.el
+++ b/lisp/calc/calc-cplx.el
@@ -1,6 +1,6 @@
1;;; calc-cplx.el --- Complex number functions for Calc 1;;; calc-cplx.el --- Complex number functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el
index 5b23dabbbf5..adbdf7a96e2 100644
--- a/lisp/calc/calc-ext.el
+++ b/lisp/calc/calc-ext.el
@@ -1,6 +1,6 @@
1;;; calc-ext.el --- various extension functions for Calc 1;;; calc-ext.el --- various extension functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2004, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
@@ -416,6 +416,7 @@
416 (define-key calc-mode-map "sd" 'calc-declare-variable) 416 (define-key calc-mode-map "sd" 'calc-declare-variable)
417 (define-key calc-mode-map "se" 'calc-edit-variable) 417 (define-key calc-mode-map "se" 'calc-edit-variable)
418 (define-key calc-mode-map "si" 'calc-insert-variables) 418 (define-key calc-mode-map "si" 'calc-insert-variables)
419 (define-key calc-mode-map "sk" 'calc-copy-special-constant)
419 (define-key calc-mode-map "sl" 'calc-let) 420 (define-key calc-mode-map "sl" 'calc-let)
420 (define-key calc-mode-map "sm" 'calc-store-map) 421 (define-key calc-mode-map "sm" 'calc-store-map)
421 (define-key calc-mode-map "sn" 'calc-store-neg) 422 (define-key calc-mode-map "sn" 'calc-store-neg)
@@ -1075,7 +1076,8 @@ calc-vector-pop-covariance calc-vector-pop-sdev
1075calc-vector-pop-variance calc-vector-product calc-vector-sdev 1076calc-vector-pop-variance calc-vector-product calc-vector-sdev
1076calc-vector-sum calc-vector-variance) 1077calc-vector-sum calc-vector-variance)
1077 1078
1078 ("calc-store" calc-assign calc-copy-variable calc-declare-variable 1079 ("calc-store" calc-assign calc-copy-special-constant
1080calc-copy-variable calc-declare-variable
1079calc-edit-AlgSimpRules calc-edit-Decls calc-edit-EvalRules 1081calc-edit-AlgSimpRules calc-edit-Decls calc-edit-EvalRules
1080calc-edit-ExtSimpRules calc-edit-FitRules calc-edit-GenCount 1082calc-edit-ExtSimpRules calc-edit-FitRules calc-edit-GenCount
1081calc-edit-Holidays calc-edit-IntegLimit calc-edit-LineStyles 1083calc-edit-Holidays calc-edit-IntegLimit calc-edit-LineStyles
diff --git a/lisp/calc/calc-fin.el b/lisp/calc/calc-fin.el
index 88af22746a0..c65e8341394 100644
--- a/lisp/calc/calc-fin.el
+++ b/lisp/calc/calc-fin.el
@@ -1,6 +1,6 @@
1;;; calc-fin.el --- financial functions for Calc 1;;; calc-fin.el --- financial functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-forms.el b/lisp/calc/calc-forms.el
index 10e4793c7a5..ad2ef9dbbff 100644
--- a/lisp/calc/calc-forms.el
+++ b/lisp/calc/calc-forms.el
@@ -1,6 +1,6 @@
1;;; calc-forms.el --- data format conversion functions for Calc 1;;; calc-forms.el --- data format conversion functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2004, 2005 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-funcs.el b/lisp/calc/calc-funcs.el
index 9a0802f0a2b..7ae9f524c90 100644
--- a/lisp/calc/calc-funcs.el
+++ b/lisp/calc/calc-funcs.el
@@ -1,6 +1,6 @@
1;;; calc-funcs.el --- well-known functions for Calc 1;;; calc-funcs.el --- well-known functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-graph.el b/lisp/calc/calc-graph.el
index 09bea69cf73..113cdcd33bc 100644
--- a/lisp/calc/calc-graph.el
+++ b/lisp/calc/calc-graph.el
@@ -864,6 +864,7 @@
864 "e" (int-to-string (nth 2 calc-graph-zval)))))) 864 "e" (int-to-string (nth 2 calc-graph-zval))))))
865 (insert "\n")) 865 (insert "\n"))
866 (and (not (equal calc-graph-zval '(skip))) 866 (and (not (equal calc-graph-zval '(skip)))
867 (boundp 'var-PlotRejects)
867 (eq (car-safe var-PlotRejects) 'vec) 868 (eq (car-safe var-PlotRejects) 'vec)
868 (nconc var-PlotRejects 869 (nconc var-PlotRejects
869 (list (list 'vec 870 (list (list 'vec
diff --git a/lisp/calc/calc-help.el b/lisp/calc/calc-help.el
index da2b8434c17..84176b36eea 100644
--- a/lisp/calc/calc-help.el
+++ b/lisp/calc/calc-help.el
@@ -1,6 +1,6 @@
1;;; calc-help.el --- help display functions for Calc, 1;;; calc-help.el --- help display functions for Calc,
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2004, 2005 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
@@ -526,7 +526,7 @@ C-w Describe how there is no warranty for Calc."
526 (interactive) 526 (interactive)
527 (calc-do-prefix-help 527 (calc-do-prefix-help
528 '("Store, inTo, Xchg, Unstore; Recall, 0-9; : (:=); = (=>)" 528 '("Store, inTo, Xchg, Unstore; Recall, 0-9; : (:=); = (=>)"
529 "Let; Copy; Declare; Insert, Perm; Edit" 529 "Let; Copy, K=copy constant; Declare; Insert, Perm; Edit"
530 "Negate, +, -, *, /, ^, &, |, [, ]; Map" 530 "Negate, +, -, *, /, ^, &, |, [, ]; Map"
531 "SHIFT + Decls, GenCount, TimeZone, Holidays; IntegLimit" 531 "SHIFT + Decls, GenCount, TimeZone, Holidays; IntegLimit"
532 "SHIFT + LineStyles, PointStyles, plotRejects; Units" 532 "SHIFT + LineStyles, PointStyles, plotRejects; Units"
diff --git a/lisp/calc/calc-incom.el b/lisp/calc/calc-incom.el
index 691380e18fe..3fdec5a4b06 100644
--- a/lisp/calc/calc-incom.el
+++ b/lisp/calc/calc-incom.el
@@ -1,6 +1,6 @@
1;;; calc-incom.el --- complex data type input functions for Calc 1;;; calc-incom.el --- complex data type input functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-keypd.el b/lisp/calc/calc-keypd.el
index 2c2a0f0f4aa..ad1e4664661 100644
--- a/lisp/calc/calc-keypd.el
+++ b/lisp/calc/calc-keypd.el
@@ -1,6 +1,6 @@
1;;; calc-keypd.el --- mouse-capable keypad input for Calc 1;;; calc-keypd.el --- mouse-capable keypad input for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-macs.el b/lisp/calc/calc-macs.el
index 8b532a49e98..1004a8f1f56 100644
--- a/lisp/calc/calc-macs.el
+++ b/lisp/calc/calc-macs.el
@@ -1,6 +1,6 @@
1;;; calc-macs.el --- important macros for Calc 1;;; calc-macs.el --- important macros for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-map.el b/lisp/calc/calc-map.el
index 726a500c10a..e636dd565fa 100644
--- a/lisp/calc/calc-map.el
+++ b/lisp/calc/calc-map.el
@@ -1,6 +1,6 @@
1;;; calc-map.el --- higher-order functions for Calc 1;;; calc-map.el --- higher-order functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-misc.el b/lisp/calc/calc-misc.el
index 3b2f95d9be8..e8bdfe2fa5a 100644
--- a/lisp/calc/calc-misc.el
+++ b/lisp/calc/calc-misc.el
@@ -1,6 +1,6 @@
1;;; calc-misc.el --- miscellaenous functions for Calc 1;;; calc-misc.el --- miscellaenous functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-mode.el b/lisp/calc/calc-mode.el
index 1c5bd29e804..e0e2ccbd717 100644
--- a/lisp/calc/calc-mode.el
+++ b/lisp/calc/calc-mode.el
@@ -1,6 +1,6 @@
1;;; calc-mode.el --- calculator modes for Calc 1;;; calc-mode.el --- calculator modes for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-mtx.el b/lisp/calc/calc-mtx.el
index 6cac30a3bb7..ea79c98252e 100644
--- a/lisp/calc/calc-mtx.el
+++ b/lisp/calc/calc-mtx.el
@@ -1,6 +1,6 @@
1;;; calc-mtx.el --- matrix functions for Calc 1;;; calc-mtx.el --- matrix functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-poly.el b/lisp/calc/calc-poly.el
index e887e77030e..89d8273d6d6 100644
--- a/lisp/calc/calc-poly.el
+++ b/lisp/calc/calc-poly.el
@@ -1,6 +1,6 @@
1;;; calc-poly.el --- polynomial functions for Calc 1;;; calc-poly.el --- polynomial functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
@@ -692,12 +692,13 @@
692 692
693 ;; Check if linear in math-fet-x. 693 ;; Check if linear in math-fet-x.
694 ((not (cdr (cdr p))) 694 ((not (cdr (cdr p)))
695 (math-add (math-factor-protect 695 (math-sort-terms
696 (math-sort-terms 696 (math-add (math-factor-protect
697 (math-factor-expr (car p)))) 697 (math-sort-terms
698 (math-mul math-fet-x (math-factor-protect 698 (math-factor-expr (car p))))
699 (math-sort-terms 699 (math-mul math-fet-x (math-factor-protect
700 (math-factor-expr (nth 1 p))))))) 700 (math-sort-terms
701 (math-factor-expr (nth 1 p))))))))
701 702
702 ;; If symbolic coefficients, use FactorRules. 703 ;; If symbolic coefficients, use FactorRules.
703 ((let ((pp p)) 704 ((let ((pp p))
diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el
index 01ca770ba27..230b0f6a6c5 100644
--- a/lisp/calc/calc-prog.el
+++ b/lisp/calc/calc-prog.el
@@ -902,6 +902,7 @@
902 (calc-edit-macro-combine-var-name)) 902 (calc-edit-macro-combine-var-name))
903 ((or 903 ((or
904 (string-equal type "calc-copy-variable") 904 (string-equal type "calc-copy-variable")
905 (string-equal type "calc-copy-special-constant")
905 (string-equal type "calc-declare-variable")) 906 (string-equal type "calc-declare-variable"))
906 (forward-line 1) 907 (forward-line 1)
907 (calc-edit-macro-combine-var-name) 908 (calc-edit-macro-combine-var-name)
diff --git a/lisp/calc/calc-rewr.el b/lisp/calc/calc-rewr.el
index c520c4d390c..2afb16b7535 100644
--- a/lisp/calc/calc-rewr.el
+++ b/lisp/calc/calc-rewr.el
@@ -1,6 +1,6 @@
1;;; calc-rewr.el --- rewriting functions for Calc 1;;; calc-rewr.el --- rewriting functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-rules.el b/lisp/calc/calc-rules.el
index 7a11cfa5012..14fb59ce376 100644
--- a/lisp/calc/calc-rules.el
+++ b/lisp/calc/calc-rules.el
@@ -1,6 +1,6 @@
1;;; calc-rules.el --- rules for simplifying algebraic expressions in Calc 1;;; calc-rules.el --- rules for simplifying algebraic expressions in Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-stat.el b/lisp/calc/calc-stat.el
index 9fdd634027e..c1b8ebc307c 100644
--- a/lisp/calc/calc-stat.el
+++ b/lisp/calc/calc-stat.el
@@ -1,6 +1,6 @@
1;;; calc-stat.el --- statistical functions for Calc 1;;; calc-stat.el --- statistical functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-store.el b/lisp/calc/calc-store.el
index f59cad99802..35db6d71019 100644
--- a/lisp/calc/calc-store.el
+++ b/lisp/calc/calc-store.el
@@ -1,6 +1,6 @@
1;;; calc-store.el --- value storage functions for Calc 1;;; calc-store.el --- value storage functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
@@ -57,15 +57,20 @@
57 ( | . calc-store-concat ) )))) 57 ( | . calc-store-concat ) ))))
58 (if found 58 (if found
59 (funcall (cdr found)) 59 (funcall (cdr found))
60 (calc-store-value var (or calc-given-value (calc-top 1)) 60 (let ((msg
61 "" calc-given-value-flag) 61 (calc-store-value var (or calc-given-value (calc-top 1))
62 (message "Stored to variable \"%s\"" (calc-var-name var)))) 62 "" calc-given-value-flag)))
63 (message (concat "Stored to variable \"%s\"" msg)
64 (calc-var-name var)))))
63 (setq var (calc-is-assignments (calc-top 1))) 65 (setq var (calc-is-assignments (calc-top 1)))
64 (if var 66 (if var
65 (while var 67 (while var
66 (calc-store-value (car (car var)) (cdr (car var)) 68 (let ((msg
67 (if (not (cdr var)) "") 69 (calc-store-value (car (car var)) (cdr (car var))
68 (if (not (cdr var)) 1)) 70 (if (not (cdr var)) "")
71 (if (not (cdr var)) 1))))
72 (message (concat "Stored to variable \"%s\"" msg)
73 (calc-var-name var)))
69 (setq var (cdr var)))))))) 74 (setq var (cdr var))))))))
70 75
71(defun calc-store-plus (&optional var) 76(defun calc-store-plus (&optional var)
@@ -109,22 +114,26 @@
109 (calc-store-binary var "n" '- n)) 114 (calc-store-binary var "n" '- n))
110 115
111(defun calc-store-value (var value tag &optional pop) 116(defun calc-store-value (var value tag &optional pop)
112 (if var 117 (let ((msg ""))
113 (let ((old (calc-var-value var))) 118 (if var
114 (set var value) 119 (let ((old (calc-var-value var)))
115 (if pop (or calc-store-keep (calc-pop-stack pop))) 120 (set var value)
116 (calc-record-undo (list 'store (symbol-name var) old)) 121 (if pop (or calc-store-keep (calc-pop-stack pop)))
117 (if tag 122 (calc-record-undo (list 'store (symbol-name var) old))
118 (let ((calc-full-trail-vectors nil)) 123 (if tag
119 (calc-record value (format ">%s%s" tag (calc-var-name var))))) 124 (let ((calc-full-trail-vectors nil))
120 (and (memq var '(var-e var-i var-pi var-phi var-gamma)) 125 (calc-record value (format ">%s%s" tag (calc-var-name var)))))
121 (eq (car-safe old) 'special-const) 126 (cond
122 (message "(Note: Built-in definition of %s has been lost)" var)) 127 ((and (memq var '(var-e var-i var-pi var-phi var-gamma))
123 (and (memq var '(var-inf var-uinf var-nan)) 128 (eq (car-safe old) 'special-const))
124 (null old) 129 (setq msg (format " (Note: Built-in definition of %s has been lost)"
125 (message "(Note: %s has built-in meanings which may interfere)" 130 (calc-var-name var))))
126 var)) 131 ((and (memq var '(var-inf var-uinf var-nan))
127 (calc-refresh-evaltos var)))) 132 (null old))
133 (setq msg (format " (Note: %s has built-in meanings which may interfere)"
134 (calc-var-name var)))))
135 (calc-refresh-evaltos var)))
136 msg))
128 137
129(defun calc-var-name (var) 138(defun calc-var-name (var)
130 (if (symbolp var) (setq var (symbol-name var))) 139 (if (symbolp var) (setq var (symbol-name var)))
@@ -140,8 +149,12 @@
140 (or var (setq var (calc-read-var-name (format "Store %s: " tag)))) 149 (or var (setq var (calc-read-var-name (format "Store %s: " tag))))
141 (if var 150 (if var
142 (let ((old (calc-var-value var))) 151 (let ((old (calc-var-value var)))
143 (or old 152 (if (eq (car-safe old) 'special-const)
144 (error "No such variable: \"%s\"" (calc-var-name var))) 153 (error "\"%s\" is a special constant" (calc-var-name var)))
154 (if (not old)
155 (if (memq var '(var-inf var-uinf var-nan))
156 (error "\"%s\" is a special variable" (calc-var-name var))
157 (error "No such variable: \"%s\"" (calc-var-name var))))
145 (if (stringp old) 158 (if (stringp old)
146 (setq old (math-read-expr old))) 159 (setq old (math-read-expr old)))
147 (if (eq (car-safe old) 'error) 160 (if (eq (car-safe old) 'error)
@@ -151,7 +164,7 @@
151 (list func value old) 164 (list func value old)
152 (list func old value))) 165 (list func old value)))
153 tag (and (not val) 1)) 166 tag (and (not val) 1))
154 (message "Stored to variable \"%s\"" (calc-var-name var))))))) 167 (message "Variable \"%s\" changed" (calc-var-name var)))))))
155 168
156(defvar calc-var-name-map nil "Keymap for reading Calc variable names.") 169(defvar calc-var-name-map nil "Keymap for reading Calc variable names.")
157(if calc-var-name-map 170(if calc-var-name-map
@@ -228,26 +241,32 @@
228 (or var (setq var (calc-read-var-name (format "Store Mapping %s: " 241 (or var (setq var (calc-read-var-name (format "Store Mapping %s: "
229 (nth 2 oper))))) 242 (nth 2 oper)))))
230 (if var 243 (if var
231 (let ((old (or (calc-var-value var) 244 (let ((old (calc-var-value var)))
232 (error "No such variable: \"%s\"" 245 (if (eq (car-safe old) 'special-const)
233 (calc-var-name var)))) 246 (error "\"%s\" is a special constant" (calc-var-name var)))
234 (calc-simplify-mode (if (eq calc-simplify-mode 'none) 247 (if (not old)
235 'num calc-simplify-mode)) 248 (if (memq var '(var-inf var-uinf var-nan))
236 (values (and (> nargs 1) 249 (error "\"%s\" is a special variable" (calc-var-name var))
237 (calc-top-list (1- nargs) (1+ calc-dollar-used))))) 250 (error "No such variable: \"%s\"" (calc-var-name var))))
238 (message "Working...") 251 (let ((calc-simplify-mode (if (eq calc-simplify-mode 'none)
239 (calc-set-command-flag 'clear-message) 252 'num calc-simplify-mode))
240 (if (stringp old) 253 (values (and (> nargs 1)
241 (setq old (math-read-expr old))) 254 (calc-top-list (1- nargs) (1+ calc-dollar-used)))))
242 (if (eq (car-safe old) 'error) 255 (message "Working...")
243 (error "Bad format in variable contents: %s" (nth 2 old))) 256 (calc-set-command-flag 'clear-message)
244 (setq values (if (calc-is-inverse) 257 (if (stringp old)
245 (append values (list old)) 258 (setq old (math-read-expr old)))
246 (append (list old) values))) 259 (if (eq (car-safe old) 'error)
247 (calc-store-value var 260 (error "Bad format in variable contents: %s" (nth 2 old)))
248 (calc-normalize (cons (nth 1 oper) values)) 261 (setq values (if (calc-is-inverse)
249 (nth 2 oper) 262 (append values (list old))
250 (+ calc-dollar-used (1- nargs)))))))) 263 (append (list old) values)))
264 (calc-store-value var
265 (calc-normalize (cons (nth 1 oper) values))
266 (nth 2 oper)
267 (+ calc-dollar-used (1- nargs)))
268 (message "Variable \"%s\" changed" (calc-var-name var))))))))
269
251 270
252(defun calc-store-exchange (&optional var) 271(defun calc-store-exchange (&optional var)
253 (interactive) 272 (interactive)
@@ -258,10 +277,12 @@
258 (or var (setq var (calc-read-var-name "Exchange with: "))) 277 (or var (setq var (calc-read-var-name "Exchange with: ")))
259 (if var 278 (if var
260 (let ((value (calc-var-value var))) 279 (let ((value (calc-var-value var)))
261 (or value
262 (error "No such variable: \"%s\"" (calc-var-name var)))
263 (if (eq (car-safe value) 'special-const) 280 (if (eq (car-safe value) 'special-const)
264 (error "%s is a special constant" var)) 281 (error "\"%s\" is a special constant" (calc-var-name var)))
282 (if (not value)
283 (if (memq var '(var-inf var-uinf var-nan))
284 (error "\"%s\" is a special variable" (calc-var-name var))
285 (error "No such variable: \"%s\"" (calc-var-name var))))
265 (setq top (or calc-given-value (calc-top 1))) 286 (setq top (or calc-given-value (calc-top 1)))
266 (calc-store-value var top nil) 287 (calc-store-value var top nil)
267 (calc-pop-push-record calc-given-value-flag 288 (calc-pop-push-record calc-given-value-flag
@@ -366,6 +387,26 @@
366 (interactive) 387 (interactive)
367 (calc-recall (intern (format "var-q%c" last-command-char)))) 388 (calc-recall (intern (format "var-q%c" last-command-char))))
368 389
390(defun calc-copy-special-constant (&optional sconst var)
391 (interactive)
392 (let ((sc '(("")
393 ("e" . (special-const (math-e)))
394 ("pi" . (special-const (math-pi)))
395 ("i" . (special-const (math-imaginary 1)))
396 ("phi" . (special-const (math-phi)))
397 ("gamma" . (special-const (math-gamma-const))))))
398 (calc-wrapper
399 (or sconst (setq sconst (completing-read "Special constant: " sc nil t)))
400 (unless (string= sconst "")
401 (let ((value (cdr (assoc sconst sc))))
402 (or var (setq var (calc-read-var-name
403 (format "Copy special constant %s, to: "
404 sconst))))
405 (if var
406 (let ((msg (calc-store-value var value "")))
407 (message (concat "Special constant \"%s\" copied to \"%s\"" msg)
408 sconst (calc-var-name var)))))))))
409
369(defun calc-copy-variable (&optional var1 var2) 410(defun calc-copy-variable (&optional var1 var2)
370 (interactive) 411 (interactive)
371 (calc-wrapper 412 (calc-wrapper
@@ -378,7 +419,9 @@
378 (format "Copy variable: %s, to: " 419 (format "Copy variable: %s, to: "
379 (calc-var-name var1))))) 420 (calc-var-name var1)))))
380 (if var2 421 (if var2
381 (calc-store-value var2 value "")))))) 422 (let ((msg (calc-store-value var2 value "")))
423 (message (concat "Variable \"%s\" copied to \"%s\"" msg)
424 (calc-var-name var1) (calc-var-name var2))))))))
382 425
383(defvar calc-last-edited-variable nil) 426(defvar calc-last-edited-variable nil)
384(defun calc-edit-variable (&optional var) 427(defun calc-edit-variable (&optional var)
diff --git a/lisp/calc/calc-stuff.el b/lisp/calc/calc-stuff.el
index 288ec70b00e..c6e8d8bbf27 100644
--- a/lisp/calc/calc-stuff.el
+++ b/lisp/calc/calc-stuff.el
@@ -1,6 +1,6 @@
1;;; calc-stuff.el --- miscellaneous functions for Calc 1;;; calc-stuff.el --- miscellaneous functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-trail.el b/lisp/calc/calc-trail.el
index 4ecc9a06651..e86117585ff 100644
--- a/lisp/calc/calc-trail.el
+++ b/lisp/calc/calc-trail.el
@@ -1,6 +1,6 @@
1;;; calc-trail.el --- functions for manipulating the Calc "trail" 1;;; calc-trail.el --- functions for manipulating the Calc "trail"
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-undo.el b/lisp/calc/calc-undo.el
index d946a1390d3..1837fe071f6 100644
--- a/lisp/calc/calc-undo.el
+++ b/lisp/calc/calc-undo.el
@@ -1,6 +1,6 @@
1;;; calc-undo.el --- undo functions for Calc 1;;; calc-undo.el --- undo functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-vec.el b/lisp/calc/calc-vec.el
index efe2e30ce71..1153eabed57 100644
--- a/lisp/calc/calc-vec.el
+++ b/lisp/calc/calc-vec.el
@@ -1,6 +1,6 @@
1;;; calc-vec.el --- vector functions for Calc 1;;; calc-vec.el --- vector functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index 617fc1ddc89..173785dc912 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -1,6 +1,6 @@
1;;; calc.el --- the GNU Emacs calculator 1;;; calc.el --- the GNU Emacs calculator
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, 2005 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Author: David Gillespie <daveg@synaptics.com> 6;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calcalg3.el b/lisp/calc/calcalg3.el
index bbba841c220..3fff729a012 100644
--- a/lisp/calc/calcalg3.el
+++ b/lisp/calc/calcalg3.el
@@ -1,6 +1,6 @@
1;;; calcalg3.el --- more algebraic functions for Calc 1;;; calcalg3.el --- more algebraic functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calcsel2.el b/lisp/calc/calcsel2.el
index 20020f57468..2a322b8b74b 100644
--- a/lisp/calc/calcsel2.el
+++ b/lisp/calc/calcsel2.el
@@ -1,6 +1,6 @@
1;;; calcsel2.el --- selection functions for Calc 1;;; calcsel2.el --- selection functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calculator.el b/lisp/calculator.el
index 76ff4053c7f..f11be4747b1 100644
--- a/lisp/calculator.el
+++ b/lisp/calculator.el
@@ -105,15 +105,21 @@ at runtime."
105 "*Use digit grouping in radix output mode. 105 "*Use digit grouping in radix output mode.
106If this is set, chunks of `calculator-radix-grouping-digits' characters 106If this is set, chunks of `calculator-radix-grouping-digits' characters
107will be separated by `calculator-radix-grouping-separator' when in radix 107will be separated by `calculator-radix-grouping-separator' when in radix
108output mode is active (determined by `calculator-output-radix').") 108output mode is active (determined by `calculator-output-radix')."
109 :type 'boolean
110 :group 'calculator)
109 111
110(defcustom calculator-radix-grouping-digits 4 112(defcustom calculator-radix-grouping-digits 4
111 "*The number of digits used for grouping display in radix modes. 113 "*The number of digits used for grouping display in radix modes.
112See `calculator-radix-grouping-mode'.") 114See `calculator-radix-grouping-mode'."
115 :type 'integer
116 :group 'calculator)
113 117
114(defcustom calculator-radix-grouping-separator "'" 118(defcustom calculator-radix-grouping-separator "'"
115 "*The separator used in radix grouping display. 119 "*The separator used in radix grouping display.
116See `calculator-radix-grouping-mode'.") 120See `calculator-radix-grouping-mode'."
121 :type 'string
122 :group 'calculator)
117 123
118(defcustom calculator-remove-zeros t 124(defcustom calculator-remove-zeros t
119 "*Non-nil value means delete all redundant zero decimal digits. 125 "*Non-nil value means delete all redundant zero decimal digits.
@@ -140,7 +146,8 @@ of digits displayed).
140 146
141An exception to the above is the case of the list (std C) where C is a 147An exception to the above is the case of the list (std C) where C is a
142character, in this case the `calculator-standard-displayer' function 148character, in this case the `calculator-standard-displayer' function
143will be used with this character for a format string.") 149will be used with this character for a format string."
150 :group 'calculator)
144 151
145(defcustom calculator-displayers 152(defcustom calculator-displayers
146 '(((std ?n) "Standard display, decimal point or scientific") 153 '(((std ?n) "Standard display, decimal point or scientific")
@@ -169,7 +176,9 @@ floats, otherwise the Emacs reader will fail on them."
169 "*If non-nil, this is any value that can be used for 176 "*If non-nil, this is any value that can be used for
170`calculator-displayer', to format a string before copying it with 177`calculator-displayer', to format a string before copying it with
171`calculator-copy'. If nil, then `calculator-displayer's normal value is 178`calculator-copy'. If nil, then `calculator-displayer's normal value is
172used.") 179used."
180 :type 'boolean
181 :group 'calculator)
173 182
174(defcustom calculator-2s-complement nil 183(defcustom calculator-2s-complement nil
175 "*If non-nil, show negative numbers in 2s complement in radix modes. 184 "*If non-nil, show negative numbers in 2s complement in radix modes.
diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el
index d007e5b4546..c3f29e3d371 100644
--- a/lisp/calendar/appt.el
+++ b/lisp/calendar/appt.el
@@ -633,11 +633,11 @@ hour and minute parts."
633 (min 0)) 633 (min 0))
634 634
635 (string-match "[:.]\\([0-9][0-9]\\)" time2conv) 635 (string-match "[:.]\\([0-9][0-9]\\)" time2conv)
636 (setq min (string-to-int 636 (setq min (string-to-number
637 (match-string 1 time2conv))) 637 (match-string 1 time2conv)))
638 638
639 (string-match "[0-9]?[0-9][:.]" time2conv) 639 (string-match "[0-9]?[0-9][:.]" time2conv)
640 (setq hr (string-to-int 640 (setq hr (string-to-number
641 (match-string 0 time2conv))) 641 (match-string 0 time2conv)))
642 642
643 ;; convert the time appointment time into 24 hour time 643 ;; convert the time appointment time into 24 hour time
diff --git a/lisp/calendar/cal-bahai.el b/lisp/calendar/cal-bahai.el
index 2bcfaf648ec..7e6149d8e94 100644
--- a/lisp/calendar/cal-bahai.el
+++ b/lisp/calendar/cal-bahai.el
@@ -340,13 +340,13 @@ nongregorian-diary-marking-hook."
340 (buffer-substring 340 (buffer-substring
341 (match-beginning m-name-pos) 341 (match-beginning m-name-pos)
342 (match-end m-name-pos)))) 342 (match-end m-name-pos))))
343 (mm (string-to-int 343 (mm (string-to-number
344 (if m-pos 344 (if m-pos
345 (buffer-substring 345 (buffer-substring
346 (match-beginning m-pos) 346 (match-beginning m-pos)
347 (match-end m-pos)) 347 (match-end m-pos))
348 ""))) 348 "")))
349 (dd (string-to-int 349 (dd (string-to-number
350 (if d-pos 350 (if d-pos
351 (buffer-substring 351 (buffer-substring
352 (match-beginning d-pos) 352 (match-beginning d-pos)
@@ -365,14 +365,14 @@ nongregorian-diary-marking-hook."
365 (calendar-bahai-from-absolute 365 (calendar-bahai-from-absolute
366 (calendar-absolute-from-gregorian 366 (calendar-absolute-from-gregorian
367 (calendar-current-date))))) 367 (calendar-current-date)))))
368 (y (+ (string-to-int y-str) 368 (y (+ (string-to-number y-str)
369 (* 100 (/ current-y 100))))) 369 (* 100 (/ current-y 100)))))
370 (if (> (- y current-y) 50) 370 (if (> (- y current-y) 50)
371 (- y 100) 371 (- y 100)
372 (if (> (- current-y y) 50) 372 (if (> (- current-y y) 50)
373 (+ y 100) 373 (+ y 100)
374 y))) 374 y)))
375 (string-to-int y-str))))) 375 (string-to-number y-str)))))
376 (if dd-name 376 (if dd-name
377 (mark-calendar-days-named 377 (mark-calendar-days-named
378 (cdr (assoc-string (substring dd-name 0 3) 378 (cdr (assoc-string (substring dd-name 0 3)
diff --git a/lisp/calendar/cal-hebrew.el b/lisp/calendar/cal-hebrew.el
index f66b4966e57..8f9f7723d5d 100644
--- a/lisp/calendar/cal-hebrew.el
+++ b/lisp/calendar/cal-hebrew.el
@@ -718,13 +718,13 @@ is provided for use as part of the nongregorian-diary-marking-hook."
718 (buffer-substring 718 (buffer-substring
719 (match-beginning m-name-pos) 719 (match-beginning m-name-pos)
720 (match-end m-name-pos)))) 720 (match-end m-name-pos))))
721 (mm (string-to-int 721 (mm (string-to-number
722 (if m-pos 722 (if m-pos
723 (buffer-substring 723 (buffer-substring
724 (match-beginning m-pos) 724 (match-beginning m-pos)
725 (match-end m-pos)) 725 (match-end m-pos))
726 ""))) 726 "")))
727 (dd (string-to-int 727 (dd (string-to-number
728 (if d-pos 728 (if d-pos
729 (buffer-substring 729 (buffer-substring
730 (match-beginning d-pos) 730 (match-beginning d-pos)
@@ -743,14 +743,14 @@ is provided for use as part of the nongregorian-diary-marking-hook."
743 (calendar-hebrew-from-absolute 743 (calendar-hebrew-from-absolute
744 (calendar-absolute-from-gregorian 744 (calendar-absolute-from-gregorian
745 (calendar-current-date))))) 745 (calendar-current-date)))))
746 (y (+ (string-to-int y-str) 746 (y (+ (string-to-number y-str)
747 (* 100 (/ current-y 100))))) 747 (* 100 (/ current-y 100)))))
748 (if (> (- y current-y) 50) 748 (if (> (- y current-y) 50)
749 (- y 100) 749 (- y 100)
750 (if (> (- current-y y) 50) 750 (if (> (- current-y y) 50)
751 (+ y 100) 751 (+ y 100)
752 y))) 752 y)))
753 (string-to-int y-str))))) 753 (string-to-number y-str)))))
754 (if dd-name 754 (if dd-name
755 (mark-calendar-days-named 755 (mark-calendar-days-named
756 (cdr (assoc-string dd-name 756 (cdr (assoc-string dd-name
diff --git a/lisp/calendar/cal-islam.el b/lisp/calendar/cal-islam.el
index 1ac6f0677b1..786c71f24ce 100644
--- a/lisp/calendar/cal-islam.el
+++ b/lisp/calendar/cal-islam.el
@@ -337,13 +337,13 @@ provided for use as part of the nongregorian-diary-marking-hook."
337 (buffer-substring 337 (buffer-substring
338 (match-beginning m-name-pos) 338 (match-beginning m-name-pos)
339 (match-end m-name-pos)))) 339 (match-end m-name-pos))))
340 (mm (string-to-int 340 (mm (string-to-number
341 (if m-pos 341 (if m-pos
342 (buffer-substring 342 (buffer-substring
343 (match-beginning m-pos) 343 (match-beginning m-pos)
344 (match-end m-pos)) 344 (match-end m-pos))
345 ""))) 345 "")))
346 (dd (string-to-int 346 (dd (string-to-number
347 (if d-pos 347 (if d-pos
348 (buffer-substring 348 (buffer-substring
349 (match-beginning d-pos) 349 (match-beginning d-pos)
@@ -362,14 +362,14 @@ provided for use as part of the nongregorian-diary-marking-hook."
362 (calendar-islamic-from-absolute 362 (calendar-islamic-from-absolute
363 (calendar-absolute-from-gregorian 363 (calendar-absolute-from-gregorian
364 (calendar-current-date))))) 364 (calendar-current-date)))))
365 (y (+ (string-to-int y-str) 365 (y (+ (string-to-number y-str)
366 (* 100 (/ current-y 100))))) 366 (* 100 (/ current-y 100)))))
367 (if (> (- y current-y) 50) 367 (if (> (- y current-y) 50)
368 (- y 100) 368 (- y 100)
369 (if (> (- current-y y) 50) 369 (if (> (- current-y y) 50)
370 (+ y 100) 370 (+ y 100)
371 y))) 371 y)))
372 (string-to-int y-str))))) 372 (string-to-number y-str)))))
373 (if dd-name 373 (if dd-name
374 (mark-calendar-days-named 374 (mark-calendar-days-named
375 (cdr (assoc-string dd-name 375 (cdr (assoc-string dd-name
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index 305ecc1e9bc..45754110319 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -2574,7 +2574,7 @@ ERROR is t, otherwise just returns nil."
2574 (if (not (looking-at " ")) 2574 (if (not (looking-at " "))
2575 (re-search-backward "[^0-9]")) 2575 (re-search-backward "[^0-9]"))
2576 (list month 2576 (list month
2577 (string-to-int (buffer-substring (1+ (point)) (+ 4 (point)))) 2577 (string-to-number (buffer-substring (1+ (point)) (+ 4 (point))))
2578 year)) 2578 year))
2579 (if (looking-at "\\*") 2579 (if (looking-at "\\*")
2580 (save-excursion 2580 (save-excursion
@@ -2964,7 +2964,7 @@ calendar window has been prepared."
2964 (make-local-variable 'calendar-starred-day) 2964 (make-local-variable 'calendar-starred-day)
2965 (forward-char 1) 2965 (forward-char 1)
2966 (setq calendar-starred-day 2966 (setq calendar-starred-day
2967 (string-to-int 2967 (string-to-number
2968 (buffer-substring (point) (- (point) 2)))) 2968 (buffer-substring (point) (- (point) 2))))
2969 (delete-char -2) 2969 (delete-char -2)
2970 (insert "**") 2970 (insert "**")
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el
index 1832e0cd0fb..312b8841cf9 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -205,7 +205,7 @@ Valid TYPEs are: string, symbol, int, stringtnil, tnil."
205 (let (ret) 205 (let (ret)
206 (setq ret (cond ((eq type 'string) attrvalue) 206 (setq ret (cond ((eq type 'string) attrvalue)
207 ((eq type 'symbol) (read attrvalue)) 207 ((eq type 'symbol) (read attrvalue))
208 ((eq type 'int) (string-to-int attrvalue)) 208 ((eq type 'int) (string-to-number attrvalue))
209 ((eq type 'stringtnil) 209 ((eq type 'stringtnil)
210 (cond ((string= "t" attrvalue) t) 210 (cond ((string= "t" attrvalue) t)
211 ((string= "nil" attrvalue) nil) 211 ((string= "nil" attrvalue) nil)
@@ -908,13 +908,13 @@ diary entries."
908 (buffer-substring-no-properties 908 (buffer-substring-no-properties
909 (match-beginning m-name-pos) 909 (match-beginning m-name-pos)
910 (match-end m-name-pos)))) 910 (match-end m-name-pos))))
911 (mm (string-to-int 911 (mm (string-to-number
912 (if m-pos 912 (if m-pos
913 (buffer-substring-no-properties 913 (buffer-substring-no-properties
914 (match-beginning m-pos) 914 (match-beginning m-pos)
915 (match-end m-pos)) 915 (match-end m-pos))
916 ""))) 916 "")))
917 (dd (string-to-int 917 (dd (string-to-number
918 (if d-pos 918 (if d-pos
919 (buffer-substring-no-properties 919 (buffer-substring-no-properties
920 (match-beginning d-pos) 920 (match-beginning d-pos)
@@ -931,7 +931,7 @@ diary entries."
931 (let* ((current-y 931 (let* ((current-y
932 (extract-calendar-year 932 (extract-calendar-year
933 (calendar-current-date))) 933 (calendar-current-date)))
934 (y (+ (string-to-int y-str) 934 (y (+ (string-to-number y-str)
935 (* 100 935 (* 100
936 (/ current-y 100))))) 936 (/ current-y 100)))))
937 (if (> (- y current-y) 50) 937 (if (> (- y current-y) 50)
@@ -939,7 +939,7 @@ diary entries."
939 (if (> (- current-y y) 50) 939 (if (> (- current-y y) 50)
940 (+ y 100) 940 (+ y 100)
941 y))) 941 y)))
942 (string-to-int y-str)))) 942 (string-to-number y-str))))
943 (save-excursion 943 (save-excursion
944 (setq entry (buffer-substring-no-properties 944 (setq entry (buffer-substring-no-properties
945 (point) (line-end-position)) 945 (point) (line-end-position))
@@ -1149,22 +1149,22 @@ be used instead of a colon (:) to separate the hour and minute parts."
1149 (cond ((string-match ; Military time 1149 (cond ((string-match ; Military time
1150 "\\`[ \t\n\\^M]*\\([0-9]?[0-9]\\)[:.]?\\([0-9][0-9]\\)\\(\\>\\|[^ap]\\)" 1150 "\\`[ \t\n\\^M]*\\([0-9]?[0-9]\\)[:.]?\\([0-9][0-9]\\)\\(\\>\\|[^ap]\\)"
1151 s) 1151 s)
1152 (+ (* 100 (string-to-int 1152 (+ (* 100 (string-to-number
1153 (substring s (match-beginning 1) (match-end 1)))) 1153 (substring s (match-beginning 1) (match-end 1))))
1154 (string-to-int (substring s (match-beginning 2) (match-end 2))))) 1154 (string-to-number (substring s (match-beginning 2) (match-end 2)))))
1155 ((string-match ; Hour only XXam or XXpm 1155 ((string-match ; Hour only XXam or XXpm
1156 "\\`[ \t\n\\^M]*\\([0-9]?[0-9]\\)\\([ap]\\)m\\>" s) 1156 "\\`[ \t\n\\^M]*\\([0-9]?[0-9]\\)\\([ap]\\)m\\>" s)
1157 (+ (* 100 (% (string-to-int 1157 (+ (* 100 (% (string-to-number
1158 (substring s (match-beginning 1) (match-end 1))) 1158 (substring s (match-beginning 1) (match-end 1)))
1159 12)) 1159 12))
1160 (if (equal ?a (downcase (aref s (match-beginning 2)))) 1160 (if (equal ?a (downcase (aref s (match-beginning 2))))
1161 0 1200))) 1161 0 1200)))
1162 ((string-match ; Hour and minute XX:XXam or XX:XXpm 1162 ((string-match ; Hour and minute XX:XXam or XX:XXpm
1163 "\\`[ \t\n\\^M]*\\([0-9]?[0-9]\\)[:.]\\([0-9][0-9]\\)\\([ap]\\)m\\>" s) 1163 "\\`[ \t\n\\^M]*\\([0-9]?[0-9]\\)[:.]\\([0-9][0-9]\\)\\([ap]\\)m\\>" s)
1164 (+ (* 100 (% (string-to-int 1164 (+ (* 100 (% (string-to-number
1165 (substring s (match-beginning 1) (match-end 1))) 1165 (substring s (match-beginning 1) (match-end 1)))
1166 12)) 1166 12))
1167 (string-to-int (substring s (match-beginning 2) (match-end 2))) 1167 (string-to-number (substring s (match-beginning 2) (match-end 2)))
1168 (if (equal ?a (downcase (aref s (match-beginning 3)))) 1168 (if (equal ?a (downcase (aref s (match-beginning 3))))
1169 0 1200))) 1169 0 1200)))
1170 (t diary-unknown-time)))) ; Unrecognizable 1170 (t diary-unknown-time)))) ; Unrecognizable
diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el
index 5eca356af59..8401aeb9bfd 100644
--- a/lisp/calendar/solar.el
+++ b/lisp/calendar/solar.el
@@ -227,7 +227,7 @@ Needed for polar areas, in order to know whether the day lasts 0 or 24 hours.")
227Returns nil if nothing was entered." 227Returns nil if nothing was entered."
228 (let ((x (read-string prompt ""))) 228 (let ((x (read-string prompt "")))
229 (if (not (string-equal x "")) 229 (if (not (string-equal x ""))
230 (string-to-int x)))) 230 (string-to-number x))))
231 231
232;; The condition-case stuff is needed to catch bogus arithmetic 232;; The condition-case stuff is needed to catch bogus arithmetic
233;; exceptions that occur on some machines (like Sparcs) 233;; exceptions that occur on some machines (like Sparcs)
@@ -643,48 +643,6 @@ since January 1st, 2000, at 12 ET."
643 ; equation of time, in hours 643 ; equation of time, in hours
644 (list app i time-eq nut))) 644 (list app i time-eq nut)))
645 645
646(defun solar-longitude (d)
647 "Longitude of sun on astronomical (Julian) day number D.
648Accurary is about 0.0006 degree (about 365.25*24*60*0.0006/360 = 1 minutes).
649
650The values of calendar-daylight-savings-starts,
651calendar-daylight-savings-starts-time, calendar-daylight-savings-ends,
652calendar-daylight-savings-ends-time, calendar-daylight-time-offset, and
653calendar-time-zone are used to interpret local time."
654 (let* ((a-d (calendar-absolute-from-astro d))
655 ;; get Universal Time
656 (date (calendar-astro-from-absolute
657 (- a-d
658 (if (dst-in-effect a-d)
659 (/ calendar-daylight-time-offset 24.0 60.0) 0)
660 (/ calendar-time-zone 60.0 24.0))))
661 ;; get Ephemeris Time
662 (date (+ date (solar-ephemeris-correction
663 (extract-calendar-year
664 (calendar-gregorian-from-absolute
665 (floor
666 (calendar-absolute-from-astro
667 date)))))))
668 (U (/ (- date 2451545) 3652500))
669 (longitude
670 (+ 4.9353929
671 (* 62833.1961680 U)
672 (* 0.0000001
673 (apply '+
674 (mapcar '(lambda (x)
675 (* (car x)
676 (sin (mod
677 (+ (car (cdr x))
678 (* (car (cdr (cdr x))) U))
679 (* 2 pi)))))
680 solar-data-list)))))
681 (aberration
682 (* 0.0000001 (- (* 17 (cos (+ 3.10 (* 62830.14 U)))) 973)))
683 (A1 (mod (+ 2.18 (* U (+ -3375.70 (* 0.36 U)))) (* 2 pi)))
684 (A2 (mod (+ 3.51 (* U (+ 125666.39 (* 0.10 U)))) (* 2 pi)))
685 (nutation (* -0.0000001 (+ (* 834 (sin A1)) (* 64 (sin A2))))))
686 (mod (radians-to-degrees (+ longitude aberration nutation)) 360.0)))
687
688(defconst solar-data-list 646(defconst solar-data-list
689 '((403406 4.721964 1.621043) 647 '((403406 4.721964 1.621043)
690 (195207 5.937458 62830.348067) 648 (195207 5.937458 62830.348067)
@@ -737,6 +695,48 @@ calendar-time-zone are used to interpret local time."
737 (10 1.50 21463.25) 695 (10 1.50 21463.25)
738 (10 2.55 157208.40))) 696 (10 2.55 157208.40)))
739 697
698(defun solar-longitude (d)
699 "Longitude of sun on astronomical (Julian) day number D.
700Accurary is about 0.0006 degree (about 365.25*24*60*0.0006/360 = 1 minutes).
701
702The values of calendar-daylight-savings-starts,
703calendar-daylight-savings-starts-time, calendar-daylight-savings-ends,
704calendar-daylight-savings-ends-time, calendar-daylight-time-offset, and
705calendar-time-zone are used to interpret local time."
706 (let* ((a-d (calendar-absolute-from-astro d))
707 ;; get Universal Time
708 (date (calendar-astro-from-absolute
709 (- a-d
710 (if (dst-in-effect a-d)
711 (/ calendar-daylight-time-offset 24.0 60.0) 0)
712 (/ calendar-time-zone 60.0 24.0))))
713 ;; get Ephemeris Time
714 (date (+ date (solar-ephemeris-correction
715 (extract-calendar-year
716 (calendar-gregorian-from-absolute
717 (floor
718 (calendar-absolute-from-astro
719 date)))))))
720 (U (/ (- date 2451545) 3652500))
721 (longitude
722 (+ 4.9353929
723 (* 62833.1961680 U)
724 (* 0.0000001
725 (apply '+
726 (mapcar '(lambda (x)
727 (* (car x)
728 (sin (mod
729 (+ (car (cdr x))
730 (* (car (cdr (cdr x))) U))
731 (* 2 pi)))))
732 solar-data-list)))))
733 (aberration
734 (* 0.0000001 (- (* 17 (cos (+ 3.10 (* 62830.14 U)))) 973)))
735 (A1 (mod (+ 2.18 (* U (+ -3375.70 (* 0.36 U)))) (* 2 pi)))
736 (A2 (mod (+ 3.51 (* U (+ 125666.39 (* 0.10 U)))) (* 2 pi)))
737 (nutation (* -0.0000001 (+ (* 834 (sin A1)) (* 64 (sin A2))))))
738 (mod (radians-to-degrees (+ longitude aberration nutation)) 360.0)))
739
740(defun solar-ephemeris-correction (year) 740(defun solar-ephemeris-correction (year)
741 "Ephemeris time minus Universal Time during Gregorian year. 741 "Ephemeris time minus Universal Time during Gregorian year.
742Result is in days. 742Result is in days.
diff --git a/lisp/dabbrev.el b/lisp/dabbrev.el
index 22e81db9210..5dea9892115 100644
--- a/lisp/dabbrev.el
+++ b/lisp/dabbrev.el
@@ -282,7 +282,8 @@ A mode setting this variable should make it buffer local."
282 "If non-nil, a list of buffers which dabbrev should search. 282 "If non-nil, a list of buffers which dabbrev should search.
283If this variable is non-nil, dabbrev will only look in these buffers. 283If this variable is non-nil, dabbrev will only look in these buffers.
284It will not even look in the current buffer if it is not a member of 284It will not even look in the current buffer if it is not a member of
285this list.") 285this list."
286 :group 'dabbrev)
286 287
287;;---------------------------------------------------------------- 288;;----------------------------------------------------------------
288;; Internal variables 289;; Internal variables
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el
index d69685ac86f..c16738f6570 100644
--- a/lisp/diff-mode.el
+++ b/lisp/diff-mode.el
@@ -70,7 +70,8 @@
70(defcustom diff-jump-to-old-file nil 70(defcustom diff-jump-to-old-file nil
71 "*Non-nil means `diff-goto-source' jumps to the old file. 71 "*Non-nil means `diff-goto-source' jumps to the old file.
72Else, it jumps to the new file." 72Else, it jumps to the new file."
73 :type '(boolean)) 73 :type 'boolean
74 :group 'diff-mode)
74 75
75(defcustom diff-update-on-the-fly t 76(defcustom diff-update-on-the-fly t
76 "*Non-nil means hunk headers are kept up-to-date on-the-fly. 77 "*Non-nil means hunk headers are kept up-to-date on-the-fly.
@@ -79,17 +80,20 @@ need to be kept consistent with the actual diff. This can
79either be done on the fly (but this sometimes interacts poorly with the 80either be done on the fly (but this sometimes interacts poorly with the
80undo mechanism) or whenever the file is written (can be slow 81undo mechanism) or whenever the file is written (can be slow
81when editing big diffs)." 82when editing big diffs)."
82 :type '(boolean)) 83 :type 'boolean
84 :group 'diff-mode)
83 85
84(defcustom diff-advance-after-apply-hunk t 86(defcustom diff-advance-after-apply-hunk t
85 "*Non-nil means `diff-apply-hunk' will move to the next hunk after applying." 87 "*Non-nil means `diff-apply-hunk' will move to the next hunk after applying."
86 :type 'boolean) 88 :type 'boolean
89 :group 'diff-mode)
87 90
88 91
89(defcustom diff-mode-hook nil 92(defcustom diff-mode-hook nil
90 "Run after setting up the `diff-mode' major mode." 93 "Run after setting up the `diff-mode' major mode."
91 :type 'hook 94 :type 'hook
92 :options '(diff-delete-empty-files diff-make-unified)) 95 :options '(diff-delete-empty-files diff-make-unified)
96 :group 'diff-mode)
93 97
94(defvar diff-outline-regexp 98(defvar diff-outline-regexp
95 "\\([*+][*+][*+] [^0-9]\\|@@ ...\\|\\*\\*\\* [0-9].\\|--- [0-9]..\\)") 99 "\\([*+][*+][*+] [^0-9]\\|@@ ...\\|\\*\\*\\* [0-9].\\|--- [0-9]..\\)")
@@ -159,7 +163,8 @@ when editing big diffs)."
159 163
160(defcustom diff-minor-mode-prefix "\C-c=" 164(defcustom diff-minor-mode-prefix "\C-c="
161 "Prefix key for `diff-minor-mode' commands." 165 "Prefix key for `diff-minor-mode' commands."
162 :type '(choice (string "\e") (string "C-c=") string)) 166 :type '(choice (string "\e") (string "C-c=") string)
167 :group 'diff-mode)
163 168
164(easy-mmode-defmap diff-minor-mode-map 169(easy-mmode-defmap diff-minor-mode-map
165 `((,diff-minor-mode-prefix . ,diff-mode-shared-map)) 170 `((,diff-minor-mode-prefix . ,diff-mode-shared-map))
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 9a1449823ca..eec3045b53a 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -428,7 +428,7 @@ with a prefix argument."
428 (setq base-version-list ; there was a base version to which 428 (setq base-version-list ; there was a base version to which
429 (assoc (substring fn 0 start-vn) ; this looks like a 429 (assoc (substring fn 0 start-vn) ; this looks like a
430 dired-file-version-alist)) ; subversion 430 dired-file-version-alist)) ; subversion
431 (not (memq (string-to-int (substring fn (+ 2 start-vn))) 431 (not (memq (string-to-number (substring fn (+ 2 start-vn)))
432 base-version-list)) ; this one doesn't make the cut 432 base-version-list)) ; this one doesn't make the cut
433 (progn (beginning-of-line) 433 (progn (beginning-of-line)
434 (delete-char 1) 434 (delete-char 1)
@@ -760,7 +760,10 @@ Otherwise, the rule is a compression rule, and compression is done with gzip.")
760 ;; The files used are determined by ARG (as in dired-get-marked-files). 760 ;; The files used are determined by ARG (as in dired-get-marked-files).
761 (or (eq dired-no-confirm t) 761 (or (eq dired-no-confirm t)
762 (memq op-symbol dired-no-confirm) 762 (memq op-symbol dired-no-confirm)
763 (let ((files (dired-get-marked-files t arg)) 763 ;; Pass t for DISTINGUISH-ONE-MARKED so that a single file which
764 ;; is marked pops up a window. That will help the user see
765 ;; it isn't the current line file.
766 (let ((files (dired-get-marked-files t arg nil t))
764 (string (if (eq op-symbol 'compress) "Compress or uncompress" 767 (string (if (eq op-symbol 'compress) "Compress or uncompress"
765 (capitalize (symbol-name op-symbol))))) 768 (capitalize (symbol-name op-symbol)))))
766 (dired-mark-pop-up nil op-symbol files (function y-or-n-p) 769 (dired-mark-pop-up nil op-symbol files (function y-or-n-p)
@@ -1132,23 +1135,29 @@ Special value `always' suppresses confirmation."
1132 1135
1133(defun dired-copy-file-recursive (from to ok-flag &optional 1136(defun dired-copy-file-recursive (from to ok-flag &optional
1134 preserve-time top recursive) 1137 preserve-time top recursive)
1135 (if (and recursive 1138 (let ((attrs (file-attributes from)))
1136 (eq t (car (file-attributes from))) ; A directory, no symbolic link. 1139 (if (and recursive
1137 (or (eq recursive 'always) 1140 (eq t (car attrs))
1138 (yes-or-no-p (format "Recursive copies of %s " from)))) 1141 (or (eq recursive 'always)
1139 (let ((files (directory-files from nil dired-re-no-dot))) 1142 (yes-or-no-p (format "Recursive copies of %s " from))))
1140 (if (eq recursive 'top) (setq recursive 'always)) ; Don't ask any more. 1143 ;; This is a directory.
1141 (if (file-exists-p to) 1144 (let ((files (directory-files from nil dired-re-no-dot)))
1142 (or top (dired-handle-overwrite to)) 1145 (if (eq recursive 'top) (setq recursive 'always)) ; Don't ask any more.
1143 (make-directory to)) 1146 (if (file-exists-p to)
1144 (while files 1147 (or top (dired-handle-overwrite to))
1145 (dired-copy-file-recursive 1148 (make-directory to))
1146 (expand-file-name (car files) from) 1149 (while files
1147 (expand-file-name (car files) to) 1150 (dired-copy-file-recursive
1148 ok-flag preserve-time nil recursive) 1151 (expand-file-name (car files) from)
1149 (setq files (cdr files)))) 1152 (expand-file-name (car files) to)
1150 (or top (dired-handle-overwrite to)) ; Just a file. 1153 ok-flag preserve-time nil recursive)
1151 (copy-file from to ok-flag dired-copy-preserve-time))) 1154 (setq files (cdr files))))
1155 ;; Not a directory.
1156 (or top (dired-handle-overwrite to))
1157 (if (stringp (car attrs))
1158 ;; It is a symlink
1159 (make-symbolic-link (car attrs) to ok-flag)
1160 (copy-file from to ok-flag dired-copy-preserve-time)))))
1152 1161
1153;;;###autoload 1162;;;###autoload
1154(defun dired-rename-file (file newname ok-if-already-exists) 1163(defun dired-rename-file (file newname ok-if-already-exists)
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index 6b44b73b170..86c955650e8 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -1501,10 +1501,10 @@ to mark all zero length files."
1501 (if (looking-at dired-re-inode-size) 1501 (if (looking-at dired-re-inode-size)
1502 (progn 1502 (progn
1503 (goto-char (match-end 0)) 1503 (goto-char (match-end 0))
1504 (setq inode (string-to-int (buffer-substring (match-beginning 1) 1504 (setq inode (string-to-number (buffer-substring (match-beginning 1)
1505 (match-end 1))) 1505 (match-end 1)))
1506 s (string-to-int (buffer-substring (match-beginning 2) 1506 s (string-to-number (buffer-substring (match-beginning 2)
1507 (match-end 2))))) 1507 (match-end 2)))))
1508 (setq inode nil 1508 (setq inode nil
1509 s nil)) 1509 s nil))
1510 (setq mode (buffer-substring (point) (+ mode-len (point)))) 1510 (setq mode (buffer-substring (point) (+ mode-len (point))))
@@ -1516,10 +1516,10 @@ to mark all zero length files."
1516 (re-search-forward dired-move-to-filename-regexp) 1516 (re-search-forward dired-move-to-filename-regexp)
1517 (goto-char (match-beginning 1)) 1517 (goto-char (match-beginning 1))
1518 (forward-char -1) 1518 (forward-char -1)
1519 (setq size (string-to-int (buffer-substring (save-excursion 1519 (setq size (string-to-number (buffer-substring (save-excursion
1520 (backward-word 1) 1520 (backward-word 1)
1521 (setq pos (point))) 1521 (setq pos (point)))
1522 (point)))) 1522 (point))))
1523 (goto-char pos) 1523 (goto-char pos)
1524 (backward-word 1) 1524 (backward-word 1)
1525 ;; if no gid is displayed, gid will be set to uid 1525 ;; if no gid is displayed, gid will be set to uid
diff --git a/lisp/dired.el b/lisp/dired.el
index afea6b173a6..43f05dcf881 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -450,7 +450,8 @@ Return value is the number of files marked, or nil if none were marked."
450 "flagged" "marked")))) 450 "flagged" "marked"))))
451 (and (> count 0) count))) 451 (and (> count 0) count)))
452 452
453(defmacro dired-map-over-marks (body arg &optional show-progress) 453(defmacro dired-map-over-marks (body arg &optional show-progress
454 distinguish-one-marked)
454 "Eval BODY with point on each marked line. Return a list of BODY's results. 455 "Eval BODY with point on each marked line. Return a list of BODY's results.
455If no marked file could be found, execute BODY on the current line. 456If no marked file could be found, execute BODY on the current line.
456 If ARG is an integer, use the next ARG (or previous -ARG, if ARG<0) 457 If ARG is an integer, use the next ARG (or previous -ARG, if ARG<0)
@@ -465,7 +466,10 @@ No guarantee is made about the position on the marked line.
465Search starts at the beginning of the buffer, thus the car of the list 466Search starts at the beginning of the buffer, thus the car of the list
466 corresponds to the line nearest to the buffer's bottom. This 467 corresponds to the line nearest to the buffer's bottom. This
467 is also true for (positive and negative) integer values of ARG. 468 is also true for (positive and negative) integer values of ARG.
468BODY should not be too long as it is expanded four times." 469BODY should not be too long as it is expanded four times.
470
471If DISTINGUISH-ONE-MARKED is non-nil, then if we find just one marked file,
472return (t FILENAME) instead of (FILENAME)."
469 ;; 473 ;;
470 ;;Warning: BODY must not add new lines before point - this may cause an 474 ;;Warning: BODY must not add new lines before point - this may cause an
471 ;;endless loop. 475 ;;endless loop.
@@ -505,13 +509,15 @@ BODY should not be too long as it is expanded four times."
505 (set-marker next-position nil) 509 (set-marker next-position nil)
506 (setq next-position (and (re-search-forward regexp nil t) 510 (setq next-position (and (re-search-forward regexp nil t)
507 (point-marker))))) 511 (point-marker)))))
512 (if (and ,distinguish-one-marked (= (length results) 1))
513 (setq results (cons t results)))
508 (if found 514 (if found
509 results 515 results
510 (list ,body))))) 516 (list ,body)))))
511 ;; save-excursion loses, again 517 ;; save-excursion loses, again
512 (dired-move-to-filename))) 518 (dired-move-to-filename)))
513 519
514(defun dired-get-marked-files (&optional localp arg filter) 520(defun dired-get-marked-files (&optional localp arg filter distinguish-one-marked)
515 "Return the marked files' names as list of strings. 521 "Return the marked files' names as list of strings.
516The list is in the same order as the buffer, that is, the car is the 522The list is in the same order as the buffer, that is, the car is the
517 first marked file. 523 first marked file.
@@ -522,13 +528,21 @@ Optional second argument ARG specifies files near point
522 If ARG is otherwise non-nil, use file. Usually ARG comes from 528 If ARG is otherwise non-nil, use file. Usually ARG comes from
523 the command's prefix arg. 529 the command's prefix arg.
524Optional third argument FILTER, if non-nil, is a function to select 530Optional third argument FILTER, if non-nil, is a function to select
525 some of the files--those for which (funcall FILTER FILENAME) is non-nil." 531 some of the files--those for which (funcall FILTER FILENAME) is non-nil.
526 (let ((all-of-them 532
527 (save-excursion 533If DISTINGUISH-ONE-MARKED is non-nil, then if we find just one marked file,
528 (dired-map-over-marks (dired-get-filename localp) arg))) 534return (t FILENAME) instead of (FILENAME).
529 result) 535Don't use that together with FILTER."
536 (let* ((all-of-them
537 (save-excursion
538 (dired-map-over-marks
539 (dired-get-filename localp)
540 arg nil distinguish-one-marked)))
541 result)
530 (if (not filter) 542 (if (not filter)
531 (nreverse all-of-them) 543 (if (and distinguish-one-marked (eq (car all-of-them) t))
544 all-of-them
545 (nreverse all-of-them))
532 (dolist (file all-of-them) 546 (dolist (file all-of-them)
533 (if (funcall filter file) 547 (if (funcall filter file)
534 (push file result))) 548 (push file result)))
@@ -1535,9 +1549,8 @@ Keybindings:
1535 (setq dired-switches-alist nil) 1549 (setq dired-switches-alist nil)
1536 (dired-sort-other dired-actual-switches t) 1550 (dired-sort-other dired-actual-switches t)
1537 (when (featurep 'dnd) 1551 (when (featurep 'dnd)
1538 (make-variable-buffer-local 'dnd-protocol-alist) 1552 (set (make-local-variable 'dnd-protocol-alist)
1539 (setq dnd-protocol-alist 1553 (append dired-dnd-protocol-alist dnd-protocol-alist)))
1540 (append dired-dnd-protocol-alist dnd-protocol-alist)))
1541 (run-mode-hooks 'dired-mode-hook)) 1554 (run-mode-hooks 'dired-mode-hook))
1542 1555
1543;; Idiosyncratic dired commands that don't deal with marks. 1556;; Idiosyncratic dired commands that don't deal with marks.
@@ -2537,15 +2550,21 @@ FUNCTION should not manipulate files, just read input
2537 (an argument or confirmation). 2550 (an argument or confirmation).
2538The window is not shown if there is just one file or 2551The window is not shown if there is just one file or
2539 OP-SYMBOL is a member of the list in `dired-no-confirm'. 2552 OP-SYMBOL is a member of the list in `dired-no-confirm'.
2540FILES is the list of marked files." 2553FILES is the list of marked files. It can also be (t FILENAME)
2554in the case of one marked file, to distinguish that from using
2555just the current file."
2541 (or bufname (setq bufname " *Marked Files*")) 2556 (or bufname (setq bufname " *Marked Files*"))
2542 (if (or (eq dired-no-confirm t) 2557 (if (or (eq dired-no-confirm t)
2543 (memq op-symbol dired-no-confirm) 2558 (memq op-symbol dired-no-confirm)
2559 ;; If FILES defaulted to the current line's file.
2544 (= (length files) 1)) 2560 (= (length files) 1))
2545 (apply function args) 2561 (apply function args)
2546 (with-current-buffer (get-buffer-create bufname) 2562 (with-current-buffer (get-buffer-create bufname)
2547 (erase-buffer) 2563 (erase-buffer)
2548 (dired-format-columns-of-files files) 2564 ;; Handle (t FILE) just like (FILE), here.
2565 ;; That value is used (only in some cases), to mean
2566 ;; just one file that was marked, rather than the current line file.
2567 (dired-format-columns-of-files (if (eq (car files) t) (cdr files) files))
2549 (remove-text-properties (point-min) (point-max) 2568 (remove-text-properties (point-min) (point-max)
2550 '(mouse-face nil help-echo nil))) 2569 '(mouse-face nil help-echo nil)))
2551 (save-window-excursion 2570 (save-window-excursion
diff --git a/lisp/dnd.el b/lisp/dnd.el
index 927f2e3bdb6..96c9e18a3f1 100644
--- a/lisp/dnd.el
+++ b/lisp/dnd.el
@@ -36,6 +36,7 @@
36;;; Customizable variables 36;;; Customizable variables
37 37
38 38
39;;;###autoload
39(defcustom dnd-protocol-alist 40(defcustom dnd-protocol-alist
40 '( 41 '(
41 ("^file:///" . dnd-open-local-file) ; XDND format. 42 ("^file:///" . dnd-open-local-file) ; XDND format.
diff --git a/lisp/ediff-diff.el b/lisp/ediff-diff.el
index c41d733aaca..4c13e6fc0e1 100644
--- a/lisp/ediff-diff.el
+++ b/lisp/ediff-diff.el
@@ -393,20 +393,20 @@ one optional arguments, diff-number to refine.")
393 (ediff-with-current-buffer diff-buffer 393 (ediff-with-current-buffer diff-buffer
394 (goto-char (point-min)) 394 (goto-char (point-min))
395 (while (re-search-forward ediff-match-diff-line nil t) 395 (while (re-search-forward ediff-match-diff-line nil t)
396 (let* ((a-begin (string-to-int (buffer-substring (match-beginning 1) 396 (let* ((a-begin (string-to-number (buffer-substring (match-beginning 1)
397 (match-end 1)))) 397 (match-end 1))))
398 (a-end (let ((b (match-beginning 3)) 398 (a-end (let ((b (match-beginning 3))
399 (e (match-end 3))) 399 (e (match-end 3)))
400 (if b 400 (if b
401 (string-to-int (buffer-substring b e)) 401 (string-to-number (buffer-substring b e))
402 a-begin))) 402 a-begin)))
403 (diff-type (buffer-substring (match-beginning 4) (match-end 4))) 403 (diff-type (buffer-substring (match-beginning 4) (match-end 4)))
404 (b-begin (string-to-int (buffer-substring (match-beginning 5) 404 (b-begin (string-to-number (buffer-substring (match-beginning 5)
405 (match-end 5)))) 405 (match-end 5))))
406 (b-end (let ((b (match-beginning 7)) 406 (b-end (let ((b (match-beginning 7))
407 (e (match-end 7))) 407 (e (match-end 7)))
408 (if b 408 (if b
409 (string-to-int (buffer-substring b e)) 409 (string-to-number (buffer-substring b e))
410 b-begin))) 410 b-begin)))
411 a-begin-pt a-end-pt b-begin-pt b-end-pt 411 a-begin-pt a-end-pt b-begin-pt b-end-pt
412 c-begin c-end c-begin-pt c-end-pt) 412 c-begin c-end c-begin-pt c-end-pt)
@@ -934,16 +934,16 @@ delimiter regions"))
934 ;; it is a "c" group 934 ;; it is a "c" group
935 (if (match-beginning 2) 935 (if (match-beginning 2)
936 ;; it has two numbers 936 ;; it has two numbers
937 (list (string-to-int 937 (list (string-to-number
938 (buffer-substring (match-beginning 1) (match-end 1))) 938 (buffer-substring (match-beginning 1) (match-end 1)))
939 (1+ (string-to-int 939 (1+ (string-to-number
940 (buffer-substring (match-beginning 3) (match-end 3))))) 940 (buffer-substring (match-beginning 3) (match-end 3)))))
941 ;; it has one number 941 ;; it has one number
942 (let ((x (string-to-int 942 (let ((x (string-to-number
943 (buffer-substring (match-beginning 1) (match-end 1))))) 943 (buffer-substring (match-beginning 1) (match-end 1)))))
944 (list x (1+ x)))) 944 (list x (1+ x))))
945 ;; it is an "a" group 945 ;; it is an "a" group
946 (let ((x (1+ (string-to-int 946 (let ((x (1+ (string-to-number
947 (buffer-substring (match-beginning 1) (match-end 1)))))) 947 (buffer-substring (match-beginning 1) (match-end 1))))))
948 (list x x))))) 948 (list x x)))))
949 949
diff --git a/lisp/edmacro.el b/lisp/edmacro.el
index 09872f3ef2c..a8382a7f081 100644
--- a/lisp/edmacro.el
+++ b/lisp/edmacro.el
@@ -280,7 +280,7 @@ or nil, use a compact 80-column format."
280 (let ((str (buffer-substring (match-beginning 1) 280 (let ((str (buffer-substring (match-beginning 1)
281 (match-end 1)))) 281 (match-end 1))))
282 (unless (equal str "") 282 (unless (equal str "")
283 (setq mac-counter (string-to-int str)))) 283 (setq mac-counter (string-to-number str))))
284 t) 284 t)
285 ((looking-at "Format:[ \t]*\"\\([^\n]*\\)\"[ \t]*$") 285 ((looking-at "Format:[ \t]*\"\\([^\n]*\\)\"[ \t]*$")
286 (when edmacro-store-hook 286 (when edmacro-store-hook
@@ -698,7 +698,7 @@ This function assumes that the events can be stored in a string."
698 (times 1)) 698 (times 1))
699 (setq pos (match-end 0)) 699 (setq pos (match-end 0))
700 (when (string-match "\\([0-9]+\\)\\*." word) 700 (when (string-match "\\([0-9]+\\)\\*." word)
701 (setq times (string-to-int (substring word 0 (match-end 1)))) 701 (setq times (string-to-number (substring word 0 (match-end 1))))
702 (setq word (substring word (1+ (match-end 1))))) 702 (setq word (substring word (1+ (match-end 1)))))
703 (cond ((string-match "^<<.+>>$" word) 703 (cond ((string-match "^<<.+>>$" word)
704 (setq key (vconcat (if (eq (key-binding [?\M-x]) 704 (setq key (vconcat (if (eq (key-binding [?\M-x])
diff --git a/lisp/emacs-lisp/authors.el b/lisp/emacs-lisp/authors.el
index 8eb177dd9ca..6280af2fb72 100644
--- a/lisp/emacs-lisp/authors.el
+++ b/lisp/emacs-lisp/authors.el
@@ -1,6 +1,6 @@
1;;; authors.el --- utility for maintaining Emacs' AUTHORS file -*-coding: iso-2022-7bit;-*- 1;;; authors.el --- utility for maintaining Emacs' AUTHORS file -*-coding: iso-2022-7bit;-*-
2 2
3;; Copyright (C) 2000, 2003 Free Software Foundation, Inc. 3;; Copyright (C) 2000, 2003, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Gerd Moellmann <gerd@gnu.org> 5;; Author: Gerd Moellmann <gerd@gnu.org>
6;; Maintainer: Kim F. Storm <storm@cua.dk> 6;; Maintainer: Kim F. Storm <storm@cua.dk>
@@ -597,8 +597,7 @@ buffer *Authors Errors* containing references to unknown files."
597 (unless (file-exists-p (expand-file-name "src/emacs.c" root)) 597 (unless (file-exists-p (expand-file-name "src/emacs.c" root))
598 (error "Not the root directory of Emacs: %s" root)) 598 (error "Not the root directory of Emacs: %s" root))
599 (dolist (log logs) 599 (dolist (log logs)
600 (when (and (string-match "ChangeLog\\(.[0-9]+\\)?$" log) 600 (when (string-match "ChangeLog\\(.[0-9]+\\)?$" log)
601 (not (string-match "/lispref/" log)))
602 (message "Scanning %s..." log) 601 (message "Scanning %s..." log)
603 (authors-scan-change-log log table))) 602 (authors-scan-change-log log table)))
604 (let ((els (authors-process-lines "find" root "-name" "*.el"))) 603 (let ((els (authors-process-lines "find" root "-name" "*.el")))
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index 1472d576e49..7fc01901cfe 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -175,8 +175,9 @@ If you think you need this, you're probably making a mistake somewhere."
175;;; byte-compile-macro-environment. 175;;; byte-compile-macro-environment.
176 176
177(defmacro eval-when-compile (&rest body) 177(defmacro eval-when-compile (&rest body)
178 "Like `progn', but evaluates the body at compile time. 178 "Like `progn', but evaluates the body at compile time if you're compiling.
179The result of the body appears to the compiler as a quoted constant." 179Thus, the result of the body appears to the compiler as a quoted constant.
180In interpreted code, this is entirely equivalent to `progn'."
180 (declare (debug t) (indent 0)) 181 (declare (debug t) (indent 0))
181 ;; Not necessary because we have it in b-c-initial-macro-environment 182 ;; Not necessary because we have it in b-c-initial-macro-environment
182 ;; (list 'quote (eval (cons 'progn body))) 183 ;; (list 'quote (eval (cons 'progn body)))
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index a752f9f9b61..f1798d941bf 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -338,8 +338,8 @@ Elements of the list may be be:
338 338
339 free-vars references to variables not in the current lexical scope. 339 free-vars references to variables not in the current lexical scope.
340 unresolved calls to unknown functions. 340 unresolved calls to unknown functions.
341 callargs lambda calls with args that don't match the definition. 341 callargs function calls with args that don't match the definition.
342 redefine function cell redefined from a macro to a lambda or vice 342 redefine function name redefined from a macro to ordinary function or vice
343 versa, or redefined to take a different number of arguments. 343 versa, or redefined to take a different number of arguments.
344 obsolete obsolete variables and functions. 344 obsolete obsolete variables and functions.
345 noruntime functions that may not be defined at runtime (typically 345 noruntime functions that may not be defined at runtime (typically
@@ -1244,6 +1244,20 @@ extra args."
1244(dolist (elt '(format message error)) 1244(dolist (elt '(format message error))
1245 (put elt 'byte-compile-format-like t)) 1245 (put elt 'byte-compile-format-like t))
1246 1246
1247;; Warn if a custom definition fails to specify :group.
1248(defun byte-compile-nogroup-warn (form)
1249 (let ((keyword-args (cdr (cdr (cdr (cdr form)))))
1250 (name (cadr form)))
1251 (unless (plist-get keyword-args :group)
1252 (byte-compile-warn
1253 "%s for `%s' fails to specify containing group"
1254 (cdr (assq (car form)
1255 '((custom-declare-group . defgroup)
1256 (custom-declare-face . defface)
1257 (custom-declare-variable . defcustom))))
1258 (if (and (consp name) (eq (car name) 'quote))
1259 (cadr name) name)))))
1260
1247;; Warn if the function or macro is being redefined with a different 1261;; Warn if the function or macro is being redefined with a different
1248;; number of arguments. 1262;; number of arguments.
1249(defun byte-compile-arglist-warn (form macrop) 1263(defun byte-compile-arglist-warn (form macrop)
@@ -2156,6 +2170,8 @@ list that represents a doc string reference.
2156(put 'custom-declare-variable 'byte-hunk-handler 2170(put 'custom-declare-variable 'byte-hunk-handler
2157 'byte-compile-file-form-custom-declare-variable) 2171 'byte-compile-file-form-custom-declare-variable)
2158(defun byte-compile-file-form-custom-declare-variable (form) 2172(defun byte-compile-file-form-custom-declare-variable (form)
2173 (when (memq 'callargs byte-compile-warnings)
2174 (byte-compile-nogroup-warn form))
2159 (when (memq 'free-vars byte-compile-warnings) 2175 (when (memq 'free-vars byte-compile-warnings)
2160 (push (nth 1 (nth 1 form)) byte-compile-bound-variables)) 2176 (push (nth 1 (nth 1 form)) byte-compile-bound-variables))
2161 (let ((tail (nthcdr 4 form))) 2177 (let ((tail (nthcdr 4 form)))
@@ -2729,7 +2745,7 @@ If FORM is a lambda or a macro, byte-compile it as a function."
2729 (when (byte-compile-const-symbol-p fn) 2745 (when (byte-compile-const-symbol-p fn)
2730 (byte-compile-warn "`%s' called as a function" fn)) 2746 (byte-compile-warn "`%s' called as a function" fn))
2731 (and (memq 'interactive-only byte-compile-warnings) 2747 (and (memq 'interactive-only byte-compile-warnings)
2732 (memq (car form) byte-compile-interactive-only-functions) 2748 (memq fn byte-compile-interactive-only-functions)
2733 (byte-compile-warn "`%s' used from Lisp code\n\ 2749 (byte-compile-warn "`%s' used from Lisp code\n\
2734That command is designed for interactive use only" fn)) 2750That command is designed for interactive use only" fn))
2735 (if (and handler 2751 (if (and handler
@@ -2739,8 +2755,10 @@ That command is designed for interactive use only" fn))
2739 (progn 2755 (progn
2740 (byte-compile-set-symbol-position fn) 2756 (byte-compile-set-symbol-position fn)
2741 (funcall handler form)) 2757 (funcall handler form))
2742 (if (memq 'callargs byte-compile-warnings) 2758 (when (memq 'callargs byte-compile-warnings)
2743 (byte-compile-callargs-warn form)) 2759 (if (memq fn '(custom-declare-group custom-declare-variable custom-declare-face))
2760 (byte-compile-nogroup-warn form))
2761 (byte-compile-callargs-warn form))
2744 (byte-compile-normal-call form)) 2762 (byte-compile-normal-call form))
2745 (if (memq 'cl-functions byte-compile-warnings) 2763 (if (memq 'cl-functions byte-compile-warnings)
2746 (byte-compile-cl-warn form)))) 2764 (byte-compile-cl-warn form))))
diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el
index bfd21e27d05..727e45b1289 100644
--- a/lisp/emacs-lisp/cl-extra.el
+++ b/lisp/emacs-lisp/cl-extra.el
@@ -61,7 +61,7 @@ TYPE is a Common Lisp type specifier."
61;;; Predicates. 61;;; Predicates.
62 62
63(defun equalp (x y) 63(defun equalp (x y)
64 "T if two Lisp objects have similar structures and contents. 64 "Return t if two Lisp objects have similar structures and contents.
65This is like `equal', except that it accepts numerically equal 65This is like `equal', except that it accepts numerically equal
66numbers of different types (float vs. integer), and also compares 66numbers of different types (float vs. integer), and also compares
67strings case-insensitively." 67strings case-insensitively."
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 137366c1c13..8bc195bdae8 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -1335,7 +1335,7 @@ Unlike `flet', this macro is fully compliant with the Common Lisp standard.
1335;; The following ought to have a better definition for use with newer 1335;; The following ought to have a better definition for use with newer
1336;; byte compilers. 1336;; byte compilers.
1337(defmacro macrolet (bindings &rest body) 1337(defmacro macrolet (bindings &rest body)
1338 "Make temporary macro defns. 1338 "Make temporary macro definitions.
1339This is like `flet', but for macros instead of functions. 1339This is like `flet', but for macros instead of functions.
1340 1340
1341\(fn ((NAME ARGLIST BODY...) ...) FORM...)" 1341\(fn ((NAME ARGLIST BODY...) ...) FORM...)"
@@ -1351,7 +1351,7 @@ This is like `flet', but for macros instead of functions.
1351 cl-macro-environment)))))) 1351 cl-macro-environment))))))
1352 1352
1353(defmacro symbol-macrolet (bindings &rest body) 1353(defmacro symbol-macrolet (bindings &rest body)
1354 "Make symbol macro defns. 1354 "Make symbol macro definitions.
1355Within the body FORMs, references to the variable NAME will be replaced 1355Within the body FORMs, references to the variable NAME will be replaced
1356by EXPANSION, and (setq NAME ...) will act like (setf EXPANSION ...). 1356by EXPANSION, and (setq NAME ...) will act like (setf EXPANSION ...).
1357 1357
diff --git a/lisp/emacs-lisp/cl-seq.el b/lisp/emacs-lisp/cl-seq.el
index 93237f0206f..cb202700a00 100644
--- a/lisp/emacs-lisp/cl-seq.el
+++ b/lisp/emacs-lisp/cl-seq.el
@@ -800,7 +800,7 @@ Keywords supported: :test :test-not :key"
800 (apply 'nset-difference cl-list2 cl-list1 cl-keys))))) 800 (apply 'nset-difference cl-list2 cl-list1 cl-keys)))))
801 801
802(defun subsetp (cl-list1 cl-list2 &rest cl-keys) 802(defun subsetp (cl-list1 cl-list2 &rest cl-keys)
803 "True if LIST1 is a subset of LIST2. 803 "Return true if LIST1 is a subset of LIST2.
804I.e., if every element of LIST1 also appears in LIST2. 804I.e., if every element of LIST1 also appears in LIST2.
805Keywords supported: :test :test-not :key" 805Keywords supported: :test :test-not :key"
806 (cond ((null cl-list1) t) ((null cl-list2) nil) 806 (cond ((null cl-list1) t) ((null cl-list2) nil)
@@ -888,7 +888,7 @@ Keywords supported: :test :test-not :key"
888 (setq cl-tree (cdr cl-tree)))))) 888 (setq cl-tree (cdr cl-tree))))))
889 889
890(defun tree-equal (cl-x cl-y &rest cl-keys) 890(defun tree-equal (cl-x cl-y &rest cl-keys)
891 "T if trees X and Y have `eql' leaves. 891 "Return t if trees X and Y have `eql' leaves.
892Atoms are compared by `eql'; cons cells are compared recursively. 892Atoms are compared by `eql'; cons cells are compared recursively.
893Keywords supported: :test :test-not :key" 893Keywords supported: :test :test-not :key"
894 (cl-parsing-keywords (:test :test-not :key) () 894 (cl-parsing-keywords (:test :test-not :key) ()
diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el
index 2f6c799f528..11835629bd7 100644
--- a/lisp/emacs-lisp/cl.el
+++ b/lisp/emacs-lisp/cl.el
@@ -115,7 +115,7 @@ a future Emacs interpreter will be able to use it.")
115;;; Predicates. 115;;; Predicates.
116 116
117(defun eql (a b) ; See compiler macro in cl-macs.el 117(defun eql (a b) ; See compiler macro in cl-macs.el
118 "T if the two args are the same Lisp object. 118 "Return t if the two args are the same Lisp object.
119Floating-point numbers of equal value are `eql', but they may not be `eq'." 119Floating-point numbers of equal value are `eql', but they may not be `eq'."
120 (if (numberp a) 120 (if (numberp a)
121 (equal a b) 121 (equal a b)
@@ -301,25 +301,25 @@ definitions to shadow the loaded ones for use in file byte-compilation."
301;;; Numbers. 301;;; Numbers.
302 302
303(defun floatp-safe (x) 303(defun floatp-safe (x)
304 "T if OBJECT is a floating point number. 304 "Return t if OBJECT is a floating point number.
305On Emacs versions that lack floating-point support, this function 305On Emacs versions that lack floating-point support, this function
306always returns nil." 306always returns nil."
307 (and (numberp x) (not (integerp x)))) 307 (and (numberp x) (not (integerp x))))
308 308
309(defun plusp (x) 309(defun plusp (x)
310 "T if NUMBER is positive." 310 "Return t if NUMBER is positive."
311 (> x 0)) 311 (> x 0))
312 312
313(defun minusp (x) 313(defun minusp (x)
314 "T if NUMBER is negative." 314 "Return t if NUMBER is negative."
315 (< x 0)) 315 (< x 0))
316 316
317(defun oddp (x) 317(defun oddp (x)
318 "T if INTEGER is odd." 318 "Return t if INTEGER is odd."
319 (eq (logand x 1) 1)) 319 (eq (logand x 1) 1))
320 320
321(defun evenp (x) 321(defun evenp (x)
322 "T if INTEGER is even." 322 "Return t if INTEGER is even."
323 (eq (logand x 1) 0)) 323 (eq (logand x 1) 0))
324 324
325(defvar *random-state* (vector 'cl-random-state-tag -1 30 (cl-random-time))) 325(defvar *random-state* (vector 'cl-random-state-tag -1 30 (cl-random-time)))
@@ -503,7 +503,7 @@ SEQ, this is like `mapcar'. With several, it is like the Common Lisp
503;; x)) 503;; x))
504 504
505(defun list* (arg &rest rest) ; See compiler macro in cl-macs.el 505(defun list* (arg &rest rest) ; See compiler macro in cl-macs.el
506 "Return a new list with specified args as elements, cons'd to last arg. 506 "Return a new list with specified args as elements, consed to last arg.
507Thus, `(list* A B C D)' is equivalent to `(nconc (list A B C) D)', or to 507Thus, `(list* A B C D)' is equivalent to `(nconc (list A B C) D)', or to
508`(cons A (cons B (cons C D)))'." 508`(cons A (cons B (cons C D)))'."
509 (cond ((not rest) arg) 509 (cond ((not rest) arg)
diff --git a/lisp/emacs-lisp/copyright.el b/lisp/emacs-lisp/copyright.el
index d0ceaa96716..0b46912c8fd 100644
--- a/lisp/emacs-lisp/copyright.el
+++ b/lisp/emacs-lisp/copyright.el
@@ -183,32 +183,36 @@ Uses heuristic: year >= 50 means 19xx, < 50 means 20xx."
183 (widen) 183 (widen)
184 (goto-char (point-min)) 184 (goto-char (point-min))
185 (if (re-search-forward copyright-regexp (+ (point) copyright-limit) t) 185 (if (re-search-forward copyright-regexp (+ (point) copyright-limit) t)
186 (let ((s (match-beginning 2)) (e (make-marker)) 186 (let ((s (match-beginning 2))
187 (e (copy-marker (1+ (match-end 2))))
188 (p (make-marker))
187 last) 189 last)
188 (set-marker e (1+ (match-end 2)))
189 (goto-char s) 190 (goto-char s)
190 (while (and (< (point) (marker-position e)) 191 (while (re-search-forward "[0-9]+" e t)
191 (re-search-forward "\\([^0-9]\\)\\([0-9]+\\)[^0-9]" 192 (set-marker p (point))
192 (marker-position e) t)) 193 (goto-char (match-beginning 0))
193 (let ((p (point)) 194 (let ((sep (char-before))
194 (sep (match-string 1)) 195 (year (string-to-number (match-string 0))))
195 (year (string-to-number (match-string 2)))) 196 (when (and sep
196 (goto-char (1+ (match-beginning 0))) 197 (/= (char-syntax sep) ?\s)
197 (unless (= (char-syntax (string-to-char sep)) ?\s) 198 (/= sep ?-))
198 (insert " ")) 199 (insert " "))
199 (if (< year 100) 200 (when (< year 100)
200 (insert (if (>= year 50) "19" "20"))) 201 (insert (if (>= year 50) "19" "20"))))
201 (goto-char p) 202 (goto-char p)
202 (setq last p))) 203 (setq last p))
203 (when last 204 (when last
204 (goto-char last) 205 (goto-char last)
205 (let ((fill-prefix " ")) 206 ;; Don't mess up whitespace after the years.
206 (fill-region s last)) 207 (skip-chars-backward " \t")
207 ) 208 (save-restriction
209 (narrow-to-region (point-min) (point))
210 (let ((fill-prefix " "))
211 (fill-region s last))))
208 (set-marker e nil) 212 (set-marker e nil)
213 (set-marker p nil)
209 (copyright-update nil t)) 214 (copyright-update nil t))
210 (message "No copyright message") 215 (message "No copyright message")))
211 (goto-char (point-min))))
212 216
213;;;###autoload 217;;;###autoload
214(define-skeleton copyright 218(define-skeleton copyright
diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el
index a10b8546d03..c00028ad218 100644
--- a/lisp/emacs-lisp/derived.el
+++ b/lisp/emacs-lisp/derived.el
@@ -158,7 +158,9 @@ Note that if the documentation string had been left out, it would have
158been generated automatically, with a reference to the keymap. 158been generated automatically, with a reference to the keymap.
159 159
160The new mode runs the hook constructed by the function 160The new mode runs the hook constructed by the function
161`derived-mode-hook-name'." 161`derived-mode-hook-name'.
162
163See Info node `(elisp)Derived Modes' for more details."
162 (declare (debug (&define name symbolp sexp [&optional stringp] 164 (declare (debug (&define name symbolp sexp [&optional stringp]
163 [&rest keywordp sexp] def-body))) 165 [&rest keywordp sexp] def-body)))
164 166
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index a02f7be7d13..0892af1bb35 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -36,7 +36,6 @@
36;; For each mode, easy-mmode defines the following: 36;; For each mode, easy-mmode defines the following:
37;; <mode> : The minor mode predicate. A buffer-local variable. 37;; <mode> : The minor mode predicate. A buffer-local variable.
38;; <mode>-map : The keymap possibly associated to <mode>. 38;; <mode>-map : The keymap possibly associated to <mode>.
39;; <mode>-hook : The hook run at the end of the toggle function.
40;; see `define-minor-mode' documentation 39;; see `define-minor-mode' documentation
41;; 40;;
42;; eval 41;; eval
@@ -90,7 +89,7 @@ replacing its case-insensitive matches with the literal string in LIGHTER."
90(defmacro define-minor-mode (mode doc &optional init-value lighter keymap &rest body) 89(defmacro define-minor-mode (mode doc &optional init-value lighter keymap &rest body)
91 "Define a new minor mode MODE. 90 "Define a new minor mode MODE.
92This function defines the associated control variable MODE, keymap MODE-map, 91This function defines the associated control variable MODE, keymap MODE-map,
93toggle command MODE, and hook MODE-hook. 92and toggle command MODE.
94 93
95DOC is the documentation for the mode toggle command. 94DOC is the documentation for the mode toggle command.
96Optional INIT-VALUE is the initial value of the mode's variable. 95Optional INIT-VALUE is the initial value of the mode's variable.
@@ -103,11 +102,11 @@ The above three arguments can be skipped if keyword arguments are
103used (see below). 102used (see below).
104 103
105BODY contains code that will be executed each time the mode is (dis)activated. 104BODY contains code that will be executed each time the mode is (dis)activated.
106 It will be executed after any toggling but before running the hooks. 105 It will be executed after any toggling but before running the hook variable
107 Before the actual body code, you can write 106 `mode-HOOK'.
108 keyword arguments (alternating keywords and values). 107 Before the actual body code, you can write keyword arguments (alternating
109 These following keyword arguments are supported (other keywords 108 keywords and values). These following keyword arguments are supported (other
110 will be passed to `defcustom' if the minor mode is global): 109 keywords will be passed to `defcustom' if the minor mode is global):
111:group GROUP Custom group name to use in all generated `defcustom' forms. 110:group GROUP Custom group name to use in all generated `defcustom' forms.
112 Defaults to MODE without the possible trailing \"-mode\". 111 Defaults to MODE without the possible trailing \"-mode\".
113 Don't use this default group name unless you have written a 112 Don't use this default group name unless you have written a
@@ -241,12 +240,6 @@ With zero or negative ARG turn mode off.
241 ;; up-to-here. 240 ;; up-to-here.
242 :autoload-end 241 :autoload-end
243 242
244 ;; The toggle's hook.
245 (defcustom ,hook nil
246 ,(format "Hook run at the end of function `%s'." mode-name)
247 ,@group
248 :type 'hook)
249
250 ;; Define the minor-mode keymap. 243 ;; Define the minor-mode keymap.
251 ,(unless (symbolp keymap) ;nil is also a symbol. 244 ,(unless (symbolp keymap) ;nil is also a symbol.
252 `(defvar ,keymap-sym 245 `(defvar ,keymap-sym
@@ -323,8 +316,8 @@ in which `%s' turns it on."
323 (with-current-buffer buf 316 (with-current-buffer buf
324 (if ,global-mode (,turn-on) (when ,mode (,mode -1)))))) 317 (if ,global-mode (,turn-on) (when ,mode (,mode -1))))))
325 318
326 ;; Autoloading easy-mmode-define-global-mode 319 ;; Autoloading define-global-minor-mode autoloads everything
327 ;; autoloads everything up-to-here. 320 ;; up-to-here.
328 :autoload-end 321 :autoload-end
329 322
330 ;; List of buffers left to process. 323 ;; List of buffers left to process.
diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el
index 78ba1fe27bf..c9f1769ae14 100644
--- a/lisp/emacs-lisp/easymenu.el
+++ b/lisp/emacs-lisp/easymenu.el
@@ -65,7 +65,7 @@ It returns the remaining items of the displayed menu.
65 :visible INCLUDE 65 :visible INCLUDE
66 66
67INCLUDE is an expression; this menu is only visible if this 67INCLUDE is an expression; this menu is only visible if this
68expression has a non-nil value. `:include' is an alias for `:visible'. 68expression has a non-nil value. `:included' is an alias for `:visible'.
69 69
70 :active ENABLE 70 :active ENABLE
71 71
@@ -110,10 +110,10 @@ keyboard equivalent.
110ENABLE is an expression; the item is enabled for selection 110ENABLE is an expression; the item is enabled for selection
111whenever this expression's value is non-nil. 111whenever this expression's value is non-nil.
112 112
113 :included INCLUDE 113 :visible INCLUDE
114 114
115INCLUDE is an expression; this item is only visible if this 115INCLUDE is an expression; this item is only visible if this
116expression has a non-nil value. 116expression has a non-nil value. `:included' is an alias for `:visible'.
117 117
118 :suffix FORM 118 :suffix FORM
119 119
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index b23217151e3..bf6b601ef7a 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -141,9 +141,9 @@ truncated to make more of the arglist or documentation string visible."
141 "Toggle ElDoc mode on or off. 141 "Toggle ElDoc mode on or off.
142In ElDoc mode, the echo area displays information about a 142In ElDoc mode, the echo area displays information about a
143function or variable in the text where point is. If point is 143function or variable in the text where point is. If point is
144on a documented variable, it displays that variable's doc string. 144on a documented variable, it displays the first line of that
145Otherwise it displays the argument list of the function called 145variable's doc string. Otherwise it displays the argument list
146in the expression point is on. 146of the function called in the expression point is on.
147 147
148With prefix ARG, turn ElDoc mode on if and only if ARG is positive." 148With prefix ARG, turn ElDoc mode on if and only if ARG is positive."
149 :group 'eldoc :lighter eldoc-minor-mode-string 149 :group 'eldoc :lighter eldoc-minor-mode-string
@@ -229,6 +229,7 @@ With prefix ARG, turn ElDoc mode on if and only if ARG is positive."
229 (not (eq (selected-window) (minibuffer-window))))) 229 (not (eq (selected-window) (minibuffer-window)))))
230 230
231 231
232;;;###autoload
232(defvar eldoc-documentation-function nil 233(defvar eldoc-documentation-function nil
233 "If non-nil, function to call to return doc string. 234 "If non-nil, function to call to return doc string.
234The function of no args should return a one-line string for displaying 235The function of no args should return a one-line string for displaying
diff --git a/lisp/emacs-lisp/generic.el b/lisp/emacs-lisp/generic.el
index 410b1d8eaa5..e41de879846 100644
--- a/lisp/emacs-lisp/generic.el
+++ b/lisp/emacs-lisp/generic.el
@@ -117,46 +117,37 @@ instead (which see).")
117;;;###autoload 117;;;###autoload
118(defmacro define-generic-mode (mode comment-list keyword-list 118(defmacro define-generic-mode (mode comment-list keyword-list
119 font-lock-list auto-mode-list 119 font-lock-list auto-mode-list
120 function-list &optional docstring 120 function-list &optional docstring)
121 &rest custom-keyword-args)
122 "Create a new generic mode MODE. 121 "Create a new generic mode MODE.
123 122
124MODE is the name of the command for the generic mode; don't quote 123MODE is the name of the command for the generic mode; don't quote it.
125it. The optional DOCSTRING is the documentation for the mode 124The optional DOCSTRING is the documentation for the mode command. If
126command. If you do not supply it, `define-generic-mode' uses a 125you do not supply it, `define-generic-mode' uses a default
127default documentation string instead. 126documentation string instead.
128 127
129COMMENT-LIST is a list in which each element is either a 128COMMENT-LIST is a list in which each element is either a character, a
130character, a string of one or two characters, or a cons cell. A 129string of one or two characters, or a cons cell. A character or a
131character or a string is set up in the mode's syntax table as a 130string is set up in the mode's syntax table as a \"comment starter\".
132\"comment starter\". If the entry is a cons cell, the `car' is 131If the entry is a cons cell, the `car' is set up as a \"comment
133set up as a \"comment starter\" and the `cdr' as a \"comment 132starter\" and the `cdr' as a \"comment ender\". (Use nil for the
134ender\". (Use nil for the latter if you want comments to end at 133latter if you want comments to end at the end of the line.) Note that
135the end of the line.) Note that the syntax table has limitations 134the syntax table has limitations about what comment starters and
136about what comment starters and enders are actually possible. 135enders are actually possible.
137 136
138KEYWORD-LIST is a list of keywords to highlight with 137KEYWORD-LIST is a list of keywords to highlight with
139`font-lock-keyword-face'. Each keyword should be a string. 138`font-lock-keyword-face'. Each keyword should be a string.
140 139
141FONT-LOCK-LIST is a list of additional expressions to highlight. 140FONT-LOCK-LIST is a list of additional expressions to highlight. Each
142Each element of this list should have the same form as an element 141element of this list should have the same form as an element of
143of `font-lock-keywords'. 142`font-lock-keywords'.
144 143
145AUTO-MODE-LIST is a list of regular expressions to add to 144AUTO-MODE-LIST is a list of regular expressions to add to
146`auto-mode-alist'. These regular expressions are added when 145`auto-mode-alist'. These regular expressions are added when Emacs
147Emacs runs the macro expansion. 146runs the macro expansion.
148 147
149FUNCTION-LIST is a list of functions to call to do some 148FUNCTION-LIST is a list of functions to call to do some additional
150additional setup. The mode command calls these functions just 149setup. The mode command calls these functions just before it runs the
151before it runs the mode hook. 150mode hook `MODE-hook'.
152
153The optional CUSTOM-KEYWORD-ARGS are pairs of keywords and values
154to include in the generated `defcustom' form for the mode hook
155variable `MODE-hook'. The default value for the `:group' keyword
156is MODE with the final \"-mode\" (if any) removed. (Don't use
157this default group name unless you have written a `defgroup' to
158define that group properly.) You can specify keyword arguments
159without specifying a docstring.
160 151
161See the file generic-x.el for some examples of `define-generic-mode'." 152See the file generic-x.el for some examples of `define-generic-mode'."
162 (declare (debug (sexp def-form def-form def-form form def-form 153 (declare (debug (sexp def-form def-form def-form form def-form
@@ -167,22 +158,9 @@ See the file generic-x.el for some examples of `define-generic-mode'."
167 (when (eq (car-safe mode) 'quote) 158 (when (eq (car-safe mode) 'quote)
168 (setq mode (eval mode))) 159 (setq mode (eval mode)))
169 160
170 (when (and docstring (not (stringp docstring)))
171 ;; DOCSTRING is not a string so we assume that it's actually the
172 ;; first keyword of CUSTOM-KEYWORD-ARGS.
173 (push docstring custom-keyword-args)
174 (setq docstring nil))
175
176 (let* ((name (symbol-name mode)) 161 (let* ((name (symbol-name mode))
177 (pretty-name (capitalize (replace-regexp-in-string 162 (pretty-name (capitalize (replace-regexp-in-string
178 "-mode\\'" "" name))) 163 "-mode\\'" "" name))))
179 (mode-hook (intern (concat name "-hook"))))
180
181 (unless (plist-get custom-keyword-args :group)
182 (setq custom-keyword-args
183 (plist-put custom-keyword-args
184 :group `',(intern (replace-regexp-in-string
185 "-mode\\'" "" name)))))
186 164
187 `(progn 165 `(progn
188 ;; Add a new entry. 166 ;; Add a new entry.
@@ -192,15 +170,11 @@ See the file generic-x.el for some examples of `define-generic-mode'."
192 (dolist (re ,auto-mode-list) 170 (dolist (re ,auto-mode-list)
193 (add-to-list 'auto-mode-alist (cons re ',mode))) 171 (add-to-list 'auto-mode-alist (cons re ',mode)))
194 172
195 (defcustom ,mode-hook nil
196 ,(concat "Hook run when entering " pretty-name " mode.")
197 :type 'hook
198 ,@custom-keyword-args)
199
200 (defun ,mode () 173 (defun ,mode ()
201 ,(or docstring 174 ,(or docstring
202 (concat pretty-name " mode.\n" 175 (concat pretty-name " mode.\n"
203 "This a generic mode defined with `define-generic-mode'.")) 176 "This a generic mode defined with `define-generic-mode'.\n"
177 "It runs `" name "-hook' as the last thing it does."))
204 (interactive) 178 (interactive)
205 (generic-mode-internal ',mode ,comment-list ,keyword-list 179 (generic-mode-internal ',mode ,comment-list ,keyword-list
206 ,font-lock-list ,function-list))))) 180 ,font-lock-list ,function-list)))))
diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el
index 701da1c4dec..a385a32935e 100644
--- a/lisp/emacs-lisp/lisp-mnt.el
+++ b/lisp/emacs-lisp/lisp-mnt.el
@@ -418,7 +418,7 @@ ISO-DATE non-nil means return the date in ISO 8601 format."
418 (format "%s-%s-%s" yyyy mm dd) 418 (format "%s-%s-%s" yyyy mm dd)
419 (format "%s %s %s" 419 (format "%s %s %s"
420 dd 420 dd
421 (nth (string-to-int mm) 421 (nth (string-to-number mm)
422 '("" "Jan" "Feb" "Mar" "Apr" "May" "Jun" 422 '("" "Jan" "Feb" "Mar" "Apr" "May" "Jun"
423 "Jul" "Aug" "Sep" "Oct" "Nov" "Dec")) 423 "Jul" "Aug" "Sep" "Oct" "Nov" "Dec"))
424 yyyy)))))) 424 yyyy))))))
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 8f4245cb9a1..bb815481bf0 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -192,6 +192,9 @@
192 ;; Look within the line for a ; following an even number of backslashes 192 ;; Look within the line for a ; following an even number of backslashes
193 ;; after either a non-backslash or the line beginning. 193 ;; after either a non-backslash or the line beginning.
194 (setq comment-start-skip "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *") 194 (setq comment-start-skip "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *")
195 (make-local-variable 'font-lock-comment-start-skip)
196 ;; Font lock mode uses this only when it KNOWS a comment is starting.
197 (setq font-lock-comment-start-skip ";+ *")
195 (make-local-variable 'comment-add) 198 (make-local-variable 'comment-add)
196 (setq comment-add 1) ;default to `;;' in comment-region 199 (setq comment-add 1) ;default to `;;' in comment-region
197 (make-local-variable 'comment-column) 200 (make-local-variable 'comment-column)
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el
index f9442bc0084..955bc4499bc 100644
--- a/lisp/emacs-lisp/lisp.el
+++ b/lisp/emacs-lisp/lisp.el
@@ -1,6 +1,7 @@
1;;; lisp.el --- Lisp editing commands for Emacs 1;;; lisp.el --- Lisp editing commands for Emacs
2 2
3;; Copyright (C) 1985, 86, 1994, 2000, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 1985, 1986, 1994, 2000, 2004, 2005
4;; Free Software Foundation, Inc.
4 5
5;; Maintainer: FSF 6;; Maintainer: FSF
6;; Keywords: lisp, languages 7;; Keywords: lisp, languages
@@ -487,9 +488,9 @@ If region is active, insert enclosing characters at region boundaries."
487More accurately, check the narrowed part of the buffer for unbalanced 488More accurately, check the narrowed part of the buffer for unbalanced
488expressions (\"sexps\") in general. This is done according to the 489expressions (\"sexps\") in general. This is done according to the
489current syntax table and will find unbalanced brackets or quotes as 490current syntax table and will find unbalanced brackets or quotes as
490appropriate. (See Info node `(emacs)Lists and Sexps'.) If imbalance 491appropriate. (See Info node `(emacs)Parentheses'.) If imbalance is
491is found, an error is signalled and point is left at the first 492found, an error is signalled and point is left at the first unbalanced
492unbalanced character." 493character."
493 (interactive) 494 (interactive)
494 (condition-case data 495 (condition-case data
495 ;; Buffer can't have more than (point-max) sexps. 496 ;; Buffer can't have more than (point-max) sexps.
diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el
index 1c8d12fef0e..a2aed39d00a 100644
--- a/lisp/emacs-lisp/re-builder.el
+++ b/lisp/emacs-lisp/re-builder.el
@@ -557,7 +557,7 @@ optional fourth argument FORCE is non-nil."
557 (interactive) 557 (interactive)
558 558
559 (setq reb-subexp-displayed 559 (setq reb-subexp-displayed
560 (or subexp (string-to-int (format "%c" last-command-char)))) 560 (or subexp (string-to-number (format "%c" last-command-char))))
561 (reb-update-modestring) 561 (reb-update-modestring)
562 (reb-do-update reb-subexp-displayed)) 562 (reb-do-update reb-subexp-displayed))
563 563
diff --git a/lisp/emacs-lisp/testcover.el b/lisp/emacs-lisp/testcover.el
index 23e9a54b1bb..f77b1a00e2c 100644
--- a/lisp/emacs-lisp/testcover.el
+++ b/lisp/emacs-lisp/testcover.el
@@ -147,7 +147,8 @@ call to one of the `testcover-1value-functions'."
147(defcustom testcover-potentially-1value-functions 147(defcustom testcover-potentially-1value-functions
148 '(add-hook and beep or remove-hook unless when) 148 '(add-hook and beep or remove-hook unless when)
149 "Functions that are potentially 1-valued. No brown splotch if actually 149 "Functions that are potentially 1-valued. No brown splotch if actually
1501-valued, no error if actually multi-valued.") 1501-valued, no error if actually multi-valued."
151 :group 'testcover)
151 152
152(defface testcover-nohits-face 153(defface testcover-nohits-face
153 '((t (:background "DeepPink2"))) 154 '((t (:background "DeepPink2")))
diff --git a/lisp/emerge.el b/lisp/emerge.el
index f9821111e71..1f105163f46 100644
--- a/lisp/emerge.el
+++ b/lisp/emerge.el
@@ -657,20 +657,20 @@ This is *not* a user option, since Emerge uses it for its own processing.")
657 diff-buffer 657 diff-buffer
658 (goto-char (point-min)) 658 (goto-char (point-min))
659 (while (re-search-forward emerge-match-diff-line nil t) 659 (while (re-search-forward emerge-match-diff-line nil t)
660 (let* ((a-begin (string-to-int (buffer-substring (match-beginning 1) 660 (let* ((a-begin (string-to-number (buffer-substring (match-beginning 1)
661 (match-end 1)))) 661 (match-end 1))))
662 (a-end (let ((b (match-beginning 3)) 662 (a-end (let ((b (match-beginning 3))
663 (e (match-end 3))) 663 (e (match-end 3)))
664 (if b 664 (if b
665 (string-to-int (buffer-substring b e)) 665 (string-to-number (buffer-substring b e))
666 a-begin))) 666 a-begin)))
667 (diff-type (buffer-substring (match-beginning 4) (match-end 4))) 667 (diff-type (buffer-substring (match-beginning 4) (match-end 4)))
668 (b-begin (string-to-int (buffer-substring (match-beginning 5) 668 (b-begin (string-to-number (buffer-substring (match-beginning 5)
669 (match-end 5)))) 669 (match-end 5))))
670 (b-end (let ((b (match-beginning 7)) 670 (b-end (let ((b (match-beginning 7))
671 (e (match-end 7))) 671 (e (match-end 7)))
672 (if b 672 (if b
673 (string-to-int (buffer-substring b e)) 673 (string-to-number (buffer-substring b e))
674 b-begin)))) 674 b-begin))))
675 ;; fix the beginning and end numbers, because diff is somewhat 675 ;; fix the beginning and end numbers, because diff is somewhat
676 ;; strange about how it numbers lines 676 ;; strange about how it numbers lines
@@ -862,16 +862,16 @@ This is *not* a user option, since Emerge uses it for its own processing.")
862 ;; it is a "c" group 862 ;; it is a "c" group
863 (if (match-beginning 2) 863 (if (match-beginning 2)
864 ;; it has two numbers 864 ;; it has two numbers
865 (list (string-to-int 865 (list (string-to-number
866 (buffer-substring (match-beginning 1) (match-end 1))) 866 (buffer-substring (match-beginning 1) (match-end 1)))
867 (1+ (string-to-int 867 (1+ (string-to-number
868 (buffer-substring (match-beginning 3) (match-end 3))))) 868 (buffer-substring (match-beginning 3) (match-end 3)))))
869 ;; it has one number 869 ;; it has one number
870 (let ((x (string-to-int 870 (let ((x (string-to-number
871 (buffer-substring (match-beginning 1) (match-end 1))))) 871 (buffer-substring (match-beginning 1) (match-end 1)))))
872 (list x (1+ x)))) 872 (list x (1+ x))))
873 ;; it is an "a" group 873 ;; it is an "a" group
874 (let ((x (1+ (string-to-int 874 (let ((x (1+ (string-to-number
875 (buffer-substring (match-beginning 1) (match-end 1)))))) 875 (buffer-substring (match-beginning 1) (match-end 1))))))
876 (list x x))))) 876 (list x x)))))
877 877
diff --git a/lisp/emulation/crisp.el b/lisp/emulation/crisp.el
index 2ca819c0424..97706fdfab0 100644
--- a/lisp/emulation/crisp.el
+++ b/lisp/emulation/crisp.el
@@ -1,6 +1,6 @@
1;;; crisp.el --- CRiSP/Brief Emacs emulator 1;;; crisp.el --- CRiSP/Brief Emacs emulator
2 2
3;; Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc. 3;; Copyright (C) 1997, 1998, 1999, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Gary D. Foster <Gary.Foster@Corp.Sun.COM> 5;; Author: Gary D. Foster <Gary.Foster@Corp.Sun.COM>
6;; Keywords: emulations brief crisp 6;; Keywords: emulations brief crisp
@@ -386,10 +386,8 @@ With ARG, turn CRiSP mode on if ARG is positive, off otherwise."
386 minor-mode-map-alist)))) 386 minor-mode-map-alist))))
387 387
388;; Interaction with other packages. 388;; Interaction with other packages.
389(eval-after-load 'cua 389(put 'crisp-home 'CUA 'move)
390 '(progn 390(put 'crisp-end 'CUA 'move)
391 (add-to-list 'cua--standard-movement-commands 'crisp-home)
392 (add-to-list 'cua--standard-movement-commands 'crisp-end)))
393 391
394(run-hooks 'crisp-load-hook) 392(run-hooks 'crisp-load-hook)
395(provide 'crisp) 393(provide 'crisp)
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el
index e9679c66dd3..6ea6bfb7f3d 100644
--- a/lisp/emulation/cua-base.el
+++ b/lisp/emulation/cua-base.el
@@ -1,6 +1,6 @@
1;;; cua-base.el --- emulate CUA key bindings 1;;; cua-base.el --- emulate CUA key bindings
2 2
3;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 3;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2005
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Author: Kim F. Storm <storm@cua.dk> 6;; Author: Kim F. Storm <storm@cua.dk>
@@ -159,13 +159,13 @@
159;; left edge of a rectangle start in the middle of a TAB character. 159;; left edge of a rectangle start in the middle of a TAB character.
160;; Sounds strange? Try it! 160;; Sounds strange? Try it!
161;; 161;;
162;; To start a rectangle, use [S-return] and extend it using the normal 162;; To start a rectangle, use [C-return] and extend it using the normal
163;; movement keys (up, down, left, right, home, end, C-home, 163;; movement keys (up, down, left, right, home, end, C-home,
164;; C-end). Once the rectangle has the desired size, you can cut or 164;; C-end). Once the rectangle has the desired size, you can cut or
165;; copy it using C-x and C-c (or C-w and M-w), and you can 165;; copy it using C-x and C-c (or C-w and M-w), and you can
166;; subsequently insert it - as a rectangle - using C-v (or C-y). So 166;; subsequently insert it - as a rectangle - using C-v (or C-y). So
167;; the only new command you need to know to work with cua-mode 167;; the only new command you need to know to work with cua-mode
168;; rectangles is S-return! 168;; rectangles is C-return!
169;; 169;;
170;; Normally, when you paste a rectangle using C-v (C-y), each line of 170;; Normally, when you paste a rectangle using C-v (C-y), each line of
171;; the rectangle is inserted into the existing lines in the buffer. 171;; the rectangle is inserted into the existing lines in the buffer.
@@ -183,7 +183,7 @@
183;; entire rectangle overlay (but not the contents) in the given 183;; entire rectangle overlay (but not the contents) in the given
184;; direction. 184;; direction.
185;; 185;;
186;; [S-return] cancels the rectangle 186;; [C-return] cancels the rectangle
187;; [C-space] activates the region bounded by the rectangle 187;; [C-space] activates the region bounded by the rectangle
188 188
189;; If you type a normal (self-inserting) character when the rectangle is 189;; If you type a normal (self-inserting) character when the rectangle is
@@ -194,7 +194,7 @@
194;; bottom of the rectangle. So, for example, to comment out an entire 194;; bottom of the rectangle. So, for example, to comment out an entire
195;; paragraph like this one, just place the cursor on the first character 195;; paragraph like this one, just place the cursor on the first character
196;; of the first line, and enter the following: 196;; of the first line, and enter the following:
197;; S-return M-} ; ; <space> S-return 197;; C-return M-} ; ; <space> C-return
198 198
199;; cua-mode's rectangle support also includes all the normal rectangle 199;; cua-mode's rectangle support also includes all the normal rectangle
200;; functions with easy access: 200;; functions with easy access:
@@ -330,12 +330,12 @@ interpreted as a register number."
330 :group 'cua) 330 :group 'cua)
331 331
332(defcustom cua-use-hyper-key nil 332(defcustom cua-use-hyper-key nil
333 "*If non-nil, bind rectangle commands to H-? instead of M-?. 333 "*If non-nil, bind rectangle commands to H-... instead of M-....
334If set to 'also, toggle region command is also on S-return. 334If set to 'also, toggle region command is also on C-return.
335Must be set prior to enabling CUA." 335Must be set prior to enabling CUA."
336 :type '(choice (const :tag "Meta key and S-return" nil) 336 :type '(choice (const :tag "Meta key and C-return" nil)
337 (const :tag "Hyper key only" only) 337 (const :tag "Hyper key only" only)
338 (const :tag "Hyper key and S-return" also)) 338 (const :tag "Hyper key and C-return" also))
339 :group 'cua) 339 :group 'cua)
340 340
341(defcustom cua-enable-region-auto-help nil 341(defcustom cua-enable-region-auto-help nil
@@ -1235,7 +1235,7 @@ If ARG is the atom `-', scroll upward by nearly full screen."
1235 1235
1236(defun cua--init-keymaps () 1236(defun cua--init-keymaps ()
1237 (unless (eq cua-use-hyper-key 'only) 1237 (unless (eq cua-use-hyper-key 'only)
1238 (define-key cua-global-keymap [(shift return)] 'cua-set-rectangle-mark)) 1238 (define-key cua-global-keymap [(control return)] 'cua-set-rectangle-mark))
1239 (when cua-use-hyper-key 1239 (when cua-use-hyper-key
1240 (cua--M/H-key cua-global-keymap 'space 'cua-set-rectangle-mark) 1240 (cua--M/H-key cua-global-keymap 'space 'cua-set-rectangle-mark)
1241 (define-key cua-global-keymap [(hyper mouse-1)] 'cua-mouse-set-rectangle-mark)) 1241 (define-key cua-global-keymap [(hyper mouse-1)] 'cua-mouse-set-rectangle-mark))
diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el
index 5c24c2dc36f..932448079dd 100644
--- a/lisp/emulation/cua-rect.el
+++ b/lisp/emulation/cua-rect.el
@@ -1,6 +1,6 @@
1;;; cua-rect.el --- CUA unified rectangle support 1;;; cua-rect.el --- CUA unified rectangle support
2 2
3;; Copyright (C) 1997-2002, 2004, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1997-2002, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Kim F. Storm <storm@cua.dk> 5;; Author: Kim F. Storm <storm@cua.dk>
6;; Keywords: keyboard emulations convenience CUA 6;; Keywords: keyboard emulations convenience CUA
@@ -1403,8 +1403,8 @@ With prefix arg, indent to that column."
1403 1403
1404(defun cua--init-rectangles () 1404(defun cua--init-rectangles ()
1405 (unless (eq cua-use-hyper-key 'only) 1405 (unless (eq cua-use-hyper-key 'only)
1406 (define-key cua--rectangle-keymap [(shift return)] 'cua-clear-rectangle-mark) 1406 (define-key cua--rectangle-keymap [(control return)] 'cua-clear-rectangle-mark)
1407 (define-key cua--region-keymap [(shift return)] 'cua-toggle-rectangle-mark)) 1407 (define-key cua--region-keymap [(control return)] 'cua-toggle-rectangle-mark))
1408 (when cua-use-hyper-key 1408 (when cua-use-hyper-key
1409 (cua--rect-M/H-key 'space 'cua-clear-rectangle-mark) 1409 (cua--rect-M/H-key 'space 'cua-clear-rectangle-mark)
1410 (cua--M/H-key cua--region-keymap 'space 'cua-toggle-rectangle-mark)) 1410 (cua--M/H-key cua--region-keymap 'space 'cua-toggle-rectangle-mark))
diff --git a/lisp/emulation/edt.el b/lisp/emulation/edt.el
index ff0298e9a17..01f0af6f307 100644
--- a/lisp/emulation/edt.el
+++ b/lisp/emulation/edt.el
@@ -1256,16 +1256,16 @@ Argument BOTTOM is the bottom margin in number of lines or percent of window."
1256 ;; set top scroll margin 1256 ;; set top scroll margin
1257 (or (string= top "") 1257 (or (string= top "")
1258 (if (string= "%" (substring top -1)) 1258 (if (string= "%" (substring top -1))
1259 (setq edt-top-scroll-margin (string-to-int top)) 1259 (setq edt-top-scroll-margin (string-to-number top))
1260 (setq edt-top-scroll-margin 1260 (setq edt-top-scroll-margin
1261 (/ (1- (+ (* (string-to-int top) 100) (window-height))) 1261 (/ (1- (+ (* (string-to-number top) 100) (window-height)))
1262 (window-height))))) 1262 (window-height)))))
1263 ;; set bottom scroll margin 1263 ;; set bottom scroll margin
1264 (or (string= bottom "") 1264 (or (string= bottom "")
1265 (if (string= "%" (substring bottom -1)) 1265 (if (string= "%" (substring bottom -1))
1266 (setq edt-bottom-scroll-margin (string-to-int bottom)) 1266 (setq edt-bottom-scroll-margin (string-to-number bottom))
1267 (setq edt-bottom-scroll-margin 1267 (setq edt-bottom-scroll-margin
1268 (/ (1- (+ (* (string-to-int bottom) 100) (window-height))) 1268 (/ (1- (+ (* (string-to-number bottom) 100) (window-height)))
1269 (window-height))))) 1269 (window-height)))))
1270 ;; report scroll margin settings if running interactively 1270 ;; report scroll margin settings if running interactively
1271 (and (interactive-p) 1271 (and (interactive-p)
diff --git a/lisp/emulation/pc-select.el b/lisp/emulation/pc-select.el
index 188e335687c..1221fca5199 100644
--- a/lisp/emulation/pc-select.el
+++ b/lisp/emulation/pc-select.el
@@ -2,7 +2,7 @@
2;;; (or MAC GUI or MS-windoze (bah)) look-and-feel 2;;; (or MAC GUI or MS-windoze (bah)) look-and-feel
3;;; including key bindings. 3;;; including key bindings.
4 4
5;; Copyright (C) 1995, 1996, 1997, 2000, 2001 Free Software Foundation, Inc. 5;; Copyright (C) 1995, 1996, 1997, 2000, 2001, 2005 Free Software Foundation, Inc.
6 6
7;; Author: Michael Staats <michael@thp.Uni-Duisburg.DE> 7;; Author: Michael Staats <michael@thp.Uni-Duisburg.DE>
8;; Keywords: convenience emulation 8;; Keywords: convenience emulation
diff --git a/lisp/emulation/tpu-edt.el b/lisp/emulation/tpu-edt.el
index f8f608b01d0..ec0eef05321 100644
--- a/lisp/emulation/tpu-edt.el
+++ b/lisp/emulation/tpu-edt.el
@@ -1,6 +1,6 @@
1;;; tpu-edt.el --- Emacs emulating TPU emulating EDT 1;;; tpu-edt.el --- Emacs emulating TPU emulating EDT
2 2
3;; Copyright (C) 1993, 1994, 1995, 2000 Free Software Foundation, Inc. 3;; Copyright (C) 1993, 1994, 1995, 2000, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Rob Riepel <riepel@networking.stanford.edu> 5;; Author: Rob Riepel <riepel@networking.stanford.edu>
6;; Maintainer: Rob Riepel <riepel@networking.stanford.edu> 6;; Maintainer: Rob Riepel <riepel@networking.stanford.edu>
diff --git a/lisp/emulation/tpu-extras.el b/lisp/emulation/tpu-extras.el
index ced88ff3fdf..9c417dd3a40 100644
--- a/lisp/emulation/tpu-extras.el
+++ b/lisp/emulation/tpu-extras.el
@@ -440,16 +440,16 @@ version that respects the bottom scroll margin."
440 ;; set top scroll margin 440 ;; set top scroll margin
441 (or (string= top "") 441 (or (string= top "")
442 (if (string= "%" (substring top -1)) 442 (if (string= "%" (substring top -1))
443 (setq tpu-top-scroll-margin (string-to-int top)) 443 (setq tpu-top-scroll-margin (string-to-number top))
444 (setq tpu-top-scroll-margin 444 (setq tpu-top-scroll-margin
445 (/ (1- (+ (* (string-to-int top) 100) (window-height))) 445 (/ (1- (+ (* (string-to-number top) 100) (window-height)))
446 (window-height))))) 446 (window-height)))))
447 ;; set bottom scroll margin 447 ;; set bottom scroll margin
448 (or (string= bottom "") 448 (or (string= bottom "")
449 (if (string= "%" (substring bottom -1)) 449 (if (string= "%" (substring bottom -1))
450 (setq tpu-bottom-scroll-margin (string-to-int bottom)) 450 (setq tpu-bottom-scroll-margin (string-to-number bottom))
451 (setq tpu-bottom-scroll-margin 451 (setq tpu-bottom-scroll-margin
452 (/ (1- (+ (* (string-to-int bottom) 100) (window-height))) 452 (/ (1- (+ (* (string-to-number bottom) 100) (window-height)))
453 (window-height))))) 453 (window-height)))))
454 ;; report scroll margin settings if running interactively 454 ;; report scroll margin settings if running interactively
455 (and (interactive-p) 455 (and (interactive-p)
diff --git a/lisp/emulation/vip.el b/lisp/emulation/vip.el
index af878085ba8..19f08d54989 100644
--- a/lisp/emulation/vip.el
+++ b/lisp/emulation/vip.el
@@ -2177,7 +2177,7 @@ a token has type \(command, address, end-mark\) and value."
2177 (cond ((string= ex-token-type "plus") "add-number") 2177 (cond ((string= ex-token-type "plus") "add-number")
2178 ((string= ex-token-type "minus") "sub-number") 2178 ((string= ex-token-type "minus") "sub-number")
2179 (t "abs-number"))) 2179 (t "abs-number")))
2180 (setq ex-token (string-to-int (buffer-substring (point) (mark))))) 2180 (setq ex-token (string-to-number (buffer-substring (point) (mark)))))
2181 ((looking-at "\\$") 2181 ((looking-at "\\$")
2182 (forward-char 1) 2182 (forward-char 1)
2183 (setq ex-token-type "end")) 2183 (setq ex-token-type "end"))
@@ -2471,7 +2471,7 @@ a token has type \(command, address, end-mark\) and value."
2471 (progn 2471 (progn
2472 (set-mark (point)) 2472 (set-mark (point))
2473 (re-search-forward "[0-9][0-9]*") 2473 (re-search-forward "[0-9][0-9]*")
2474 (setq ex-count (string-to-int (buffer-substring (point) (mark)))) 2474 (setq ex-count (string-to-number (buffer-substring (point) (mark))))
2475 (skip-chars-forward " \t"))) 2475 (skip-chars-forward " \t")))
2476 (if (looking-at "[pl#]") 2476 (if (looking-at "[pl#]")
2477 (progn 2477 (progn
@@ -2496,7 +2496,7 @@ a token has type \(command, address, end-mark\) and value."
2496 (progn 2496 (progn
2497 (set-mark (point)) 2497 (set-mark (point))
2498 (re-search-forward "[0-9][0-9]*") 2498 (re-search-forward "[0-9][0-9]*")
2499 (setq ex-count (string-to-int (buffer-substring (point) (mark)))) 2499 (setq ex-count (string-to-number (buffer-substring (point) (mark))))
2500 (skip-chars-forward " \t"))) 2500 (skip-chars-forward " \t")))
2501 (if (looking-at "[pl#]") 2501 (if (looking-at "[pl#]")
2502 (progn 2502 (progn
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index 8023336b18b..4593d84c6fc 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -1,6 +1,6 @@
1;;; viper-cmd.el --- Vi command support for Viper 1;;; viper-cmd.el --- Vi command support for Viper
2 2
3;; Copyright (C) 1997, 98, 99, 2000, 01, 02 Free Software Foundation, Inc. 3;; Copyright (C) 1997, 98, 99, 2000, 01, 02, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Michael Kifer <kifer@cs.stonybrook.edu> 5;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
6 6
diff --git a/lisp/emulation/viper-ex.el b/lisp/emulation/viper-ex.el
index 90b006ffb65..7e8a5cbeb99 100644
--- a/lisp/emulation/viper-ex.el
+++ b/lisp/emulation/viper-ex.el
@@ -1,6 +1,6 @@
1;;; viper-ex.el --- functions implementing the Ex commands for Viper 1;;; viper-ex.el --- functions implementing the Ex commands for Viper
2 2
3;; Copyright (C) 1994, 95, 96, 97, 98, 2000, 01, 02, 04, 05 Free Software Foundation, Inc. 3;; Copyright (C) 1994, 95, 96, 97, 98, 2000, 01, 02, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Michael Kifer <kifer@cs.stonybrook.edu> 5;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
6 6
@@ -434,7 +434,7 @@ reversed."
434 ((eq ex-token-type 'minus) 'sub-number) 434 ((eq ex-token-type 'minus) 'sub-number)
435 (t 'abs-number))) 435 (t 'abs-number)))
436 (setq ex-token 436 (setq ex-token
437 (string-to-int (buffer-substring (point) (mark t))))) 437 (string-to-number (buffer-substring (point) (mark t)))))
438 ((looking-at "\\$") 438 ((looking-at "\\$")
439 (forward-char 1) 439 (forward-char 1)
440 (setq ex-token-type 'end)) 440 (setq ex-token-type 'end))
@@ -912,7 +912,7 @@ reversed."
912 (progn 912 (progn
913 (set-mark (point)) 913 (set-mark (point))
914 (re-search-forward "[0-9][0-9]*") 914 (re-search-forward "[0-9][0-9]*")
915 (setq ex-count (string-to-int (buffer-substring (point) (mark t)))) 915 (setq ex-count (string-to-number (buffer-substring (point) (mark t))))
916 (skip-chars-forward " \t"))) 916 (skip-chars-forward " \t")))
917 (if (looking-at "[pl#]") 917 (if (looking-at "[pl#]")
918 (progn 918 (progn
@@ -938,7 +938,7 @@ reversed."
938 (progn 938 (progn
939 (set-mark (point)) 939 (set-mark (point))
940 (re-search-forward "[0-9][0-9]*") 940 (re-search-forward "[0-9][0-9]*")
941 (setq ex-count (string-to-int (buffer-substring (point) (mark t)))) 941 (setq ex-count (string-to-number (buffer-substring (point) (mark t))))
942 (skip-chars-forward " \t"))) 942 (skip-chars-forward " \t")))
943 (if (looking-at "[pl#]") 943 (if (looking-at "[pl#]")
944 (progn 944 (progn
@@ -1490,7 +1490,7 @@ reversed."
1490 (progn 1490 (progn
1491 (ex-edit t) 1491 (ex-edit t)
1492 (throw 'ex-edit nil)) 1492 (throw 'ex-edit nil))
1493 (setq count (string-to-int ex-file)) 1493 (setq count (string-to-number ex-file))
1494 (if (= count 0) (setq count 1)) 1494 (if (= count 0) (setq count 1))
1495 (if (< count 0) (error "Usage: `next <count>' (count >= 0)")))) 1495 (if (< count 0) (error "Usage: `next <count>' (count >= 0)"))))
1496 (setq count 1)) 1496 (setq count 1))
diff --git a/lisp/emulation/viper-keym.el b/lisp/emulation/viper-keym.el
index e5074b95838..a74ca05b3df 100644
--- a/lisp/emulation/viper-keym.el
+++ b/lisp/emulation/viper-keym.el
@@ -1,6 +1,6 @@
1;;; viper-keym.el --- Viper keymaps 1;;; viper-keym.el --- Viper keymaps
2 2
3;; Copyright (C) 1994, 95, 96, 97, 2000, 01, 02 Free Software Foundation, Inc. 3;; Copyright (C) 1994, 95, 96, 97, 2000, 01, 02, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Michael Kifer <kifer@cs.stonybrook.edu> 5;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
6 6
diff --git a/lisp/emulation/viper-macs.el b/lisp/emulation/viper-macs.el
index df0e37e7c25..9fd73efb9b9 100644
--- a/lisp/emulation/viper-macs.el
+++ b/lisp/emulation/viper-macs.el
@@ -1,6 +1,6 @@
1;;; viper-macs.el --- functions implementing keyboard macros for Viper 1;;; viper-macs.el --- functions implementing keyboard macros for Viper
2 2
3;; Copyright (C) 1994, 95, 96, 97, 2000, 01, 02 Free Software Foundation, Inc. 3;; Copyright (C) 1994, 95, 96, 97, 2000, 01, 02, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Michael Kifer <kifer@cs.stonybrook.edu> 5;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
6 6
diff --git a/lisp/emulation/viper-util.el b/lisp/emulation/viper-util.el
index 527a04084e2..497e4a1e559 100644
--- a/lisp/emulation/viper-util.el
+++ b/lisp/emulation/viper-util.el
@@ -1,6 +1,6 @@
1;;; viper-util.el --- Utilities used by viper.el 1;;; viper-util.el --- Utilities used by viper.el
2 2
3;; Copyright (C) 1994, 95, 96, 97, 99, 2000, 01, 02 Free Software Foundation, Inc. 3;; Copyright (C) 1994, 95, 96, 97, 99, 2000, 01, 02, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Michael Kifer <kifer@cs.stonybrook.edu> 5;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
6 6
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el
index be5a8e3467a..e3582f2165a 100644
--- a/lisp/emulation/viper.el
+++ b/lisp/emulation/viper.el
@@ -3,7 +3,7 @@
3;; and a venomous VI PERil. 3;; and a venomous VI PERil.
4;; Viper Is also a Package for Emacs Rebels. 4;; Viper Is also a Package for Emacs Rebels.
5 5
6;; Copyright (C) 1994, 95, 96, 97, 98, 99, 2000, 01, 02, 05 Free Software Foundation, Inc. 6;; Copyright (C) 1994, 95, 96, 97, 98, 99, 2000, 01, 02, 2005 Free Software Foundation, Inc.
7 7
8;; Author: Michael Kifer <kifer@cs.stonybrook.edu> 8;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
9;; Keywords: emulations 9;; Keywords: emulations
diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el
index cbee9fd626e..050c82cc310 100644
--- a/lisp/eshell/esh-mode.el
+++ b/lisp/eshell/esh-mode.el
@@ -520,7 +520,8 @@ This is used by `eshell-watch-for-password-prompt'."
520 (let ((inhibit-read-only t) 520 (let ((inhibit-read-only t)
521 (no-default (eobp)) 521 (no-default (eobp))
522 (find-tag-default-function 'ignore)) 522 (find-tag-default-function 'ignore))
523 (setq tagname (car (find-tag-interactive "Find tag: "))) 523 (with-no-warnings
524 (setq tagname (car (find-tag-interactive "Find tag: "))))
524 (find-tag tagname next-p regexp-p))) 525 (find-tag tagname next-p regexp-p)))
525 526
526(defun eshell-move-argument (limit func property arg) 527(defun eshell-move-argument (limit func property arg)
@@ -666,7 +667,7 @@ waiting for input."
666 (eshell-match-result "alpha\n")) 667 (eshell-match-result "alpha\n"))
667 668
668(defun eshell-send-input (&optional use-region queue-p no-newline) 669(defun eshell-send-input (&optional use-region queue-p no-newline)
669 "Send the input received to Eshell for parsing and processing.. 670 "Send the input received to Eshell for parsing and processing.
670After `eshell-last-output-end', sends all text from that marker to 671After `eshell-last-output-end', sends all text from that marker to
671point as input. Before that marker, calls `eshell-get-old-input' to 672point as input. Before that marker, calls `eshell-get-old-input' to
672retrieve old input, copies it to the end of the buffer, and sends it. 673retrieve old input, copies it to the end of the buffer, and sends it.
diff --git a/lisp/faces.el b/lisp/faces.el
index 3b620927d10..f4522c8a155 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -1014,7 +1014,7 @@ name of the attribute for prompting. Value is the new attribute value."
1014 ((member new-value '("unspecified-fg" "unspecified-bg")) 1014 ((member new-value '("unspecified-fg" "unspecified-bg"))
1015 new-value) 1015 new-value)
1016 (t 1016 (t
1017 (string-to-int new-value))))) 1017 (string-to-number new-value)))))
1018 1018
1019 1019
1020(defun read-face-attribute (face attribute &optional frame) 1020(defun read-face-attribute (face attribute &optional frame)
@@ -1184,6 +1184,7 @@ arg, prompt for a regular expression."
1184 (save-excursion 1184 (save-excursion
1185 (save-match-data 1185 (save-match-data
1186 (search-backward face-name) 1186 (search-backward face-name)
1187 (setq help-xref-stack-item `(list-faces-display ,regexp))
1187 (help-xref-button 0 'help-customize-face face))) 1188 (help-xref-button 0 'help-customize-face face)))
1188 (let ((beg (point)) 1189 (let ((beg (point))
1189 (line-beg (line-beginning-position))) 1190 (line-beg (line-beginning-position)))
@@ -1258,17 +1259,32 @@ If FRAME is omitted or nil, use the selected frame."
1258 (insert "Face: " (symbol-name f)) 1259 (insert "Face: " (symbol-name f))
1259 (if (not (facep f)) 1260 (if (not (facep f))
1260 (insert " undefined face.\n") 1261 (insert " undefined face.\n")
1261 (let ((customize-label "customize this face")) 1262 (let ((customize-label "customize this face")
1263 file-name)
1262 (princ (concat " (" customize-label ")\n")) 1264 (princ (concat " (" customize-label ")\n"))
1263 (insert "Documentation: " 1265 (insert "Documentation: "
1264 (or (face-documentation f) 1266 (or (face-documentation f)
1265 "Not documented as a face.") 1267 "Not documented as a face.")
1266 "\n\n") 1268 "\n")
1267 (with-current-buffer standard-output 1269 (with-current-buffer standard-output
1268 (save-excursion 1270 (save-excursion
1269 (re-search-backward 1271 (re-search-backward
1270 (concat "\\(" customize-label "\\)") nil t) 1272 (concat "\\(" customize-label "\\)") nil t)
1271 (help-xref-button 1 'help-customize-face f))) 1273 (help-xref-button 1 'help-customize-face f)))
1274 ;; The next 4 sexps are copied from describe-function-1
1275 ;; and simplified.
1276 (setq file-name (symbol-file f 'defface))
1277 (when file-name
1278 (princ "Defined in `")
1279 (princ file-name)
1280 (princ "'")
1281 ;; Make a hyperlink to the library.
1282 (save-excursion
1283 (re-search-backward "`\\([^`']+\\)'" nil t)
1284 (help-xref-button 1 'help-face-def f file-name))
1285 (princ ".")
1286 (terpri)
1287 (terpri))
1272 (dolist (a attrs) 1288 (dolist (a attrs)
1273 (let ((attr (face-attribute f (car a) frame))) 1289 (let ((attr (face-attribute f (car a) frame)))
1274 (insert (make-string (- max-width (length (cdr a))) ?\ ) 1290 (insert (make-string (- max-width (length (cdr a))) ?\ )
@@ -2048,7 +2064,7 @@ Note: Other faces cannot inherit from the cursor face."
2048 (t :inverse-video t)) 2064 (t :inverse-video t))
2049 "Basic face for highlighting trailing whitespace." 2065 "Basic face for highlighting trailing whitespace."
2050 :version "21.1" 2066 :version "21.1"
2051 :group 'font-lock ; like `show-trailing-whitespace' 2067 :group 'whitespace ; like `show-trailing-whitespace'
2052 :group 'basic-faces) 2068 :group 'basic-faces)
2053 2069
2054(defface escape-glyph '((((background dark)) :foreground "cyan") 2070(defface escape-glyph '((((background dark)) :foreground "cyan")
diff --git a/lisp/files.el b/lisp/files.el
index 99847b2f3fc..d519f041152 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -541,7 +541,7 @@ DIR should be an absolute directory name. It defaults to
541the value of `default-directory'." 541the value of `default-directory'."
542 (unless dir 542 (unless dir
543 (setq dir default-directory)) 543 (setq dir default-directory))
544 (read-file-name prompt dir (or default-dirname 544 (read-file-name prompt dir (or default-dirname
545 (if initial (expand-file-name initial dir) 545 (if initial (expand-file-name initial dir)
546 dir)) 546 dir))
547 mustmatch initial 547 mustmatch initial
@@ -1728,10 +1728,10 @@ or from Lisp without specifying the optional argument FIND-FILE;
1728in that case, this function acts as if `enable-local-variables' were t." 1728in that case, this function acts as if `enable-local-variables' were t."
1729 (interactive) 1729 (interactive)
1730 (or find-file (funcall (or default-major-mode 'fundamental-mode))) 1730 (or find-file (funcall (or default-major-mode 'fundamental-mode)))
1731 (report-errors "File mode specification error: %s" 1731 (let ((enable-local-variables (or (not find-file) enable-local-variables)))
1732 (set-auto-mode)) 1732 (report-errors "File mode specification error: %s"
1733 (report-errors "File local-variables error: %s" 1733 (set-auto-mode))
1734 (let ((enable-local-variables (or (not find-file) enable-local-variables))) 1734 (report-errors "File local-variables error: %s"
1735 (hack-local-variables))) 1735 (hack-local-variables)))
1736 (if (fboundp 'ucs-set-table-for-input) ; don't lose when building 1736 (if (fboundp 'ucs-set-table-for-input) ; don't lose when building
1737 (ucs-set-table-for-input))) 1737 (ucs-set-table-for-input)))
@@ -1762,9 +1762,11 @@ in that case, this function acts as if `enable-local-variables' were t."
1762 ("\\.ad[abs]\\'" . ada-mode) 1762 ("\\.ad[abs]\\'" . ada-mode)
1763 ("\\.ad[bs].dg\\'" . ada-mode) 1763 ("\\.ad[bs].dg\\'" . ada-mode)
1764 ("\\.\\([pP]\\([Llm]\\|erl\\|od\\)\\|al\\)\\'" . perl-mode) 1764 ("\\.\\([pP]\\([Llm]\\|erl\\|od\\)\\|al\\)\\'" . perl-mode)
1765 ("\\.mk\\'" . makefile-mode) 1765 ("\\.mk\\'" . makefile-gmake-mode) ; Might be any make, give Gnu the host advantage
1766 ("\\([Mm]\\|GNUm\\)akep*file\\'" . makefile-mode) 1766 ("[Mm]akefile\\'" . makefile-mode)
1767 ("\\.am\\'" . makefile-mode) ;For Automake. 1767 ("GNUmakefile\\'" . makefile-gmake-mode)
1768 ("Makeppfile\\'" . makefile-makepp-mode)
1769 ("\\.am\\'" . makefile-automake-mode)
1768 ;; Less common extensions come here 1770 ;; Less common extensions come here
1769 ;; so more common ones above are found faster. 1771 ;; so more common ones above are found faster.
1770 ("\\.texinfo\\'" . texinfo-mode) 1772 ("\\.texinfo\\'" . texinfo-mode)
@@ -1936,13 +1938,13 @@ and `magic-mode-alist', which determines modes based on file contents.")
1936 ("more" . text-mode) 1938 ("more" . text-mode)
1937 ("less" . text-mode) 1939 ("less" . text-mode)
1938 ("pg" . text-mode) 1940 ("pg" . text-mode)
1939 ("make" . makefile-mode) ; Debian uses this 1941 ("make" . makefile-gmake-mode) ; Debian uses this
1940 ("guile" . scheme-mode) 1942 ("guile" . scheme-mode)
1941 ("clisp" . lisp-mode))) 1943 ("clisp" . lisp-mode)))
1942 "Alist mapping interpreter names to major modes. 1944 "Alist mapping interpreter names to major modes.
1943This is used for files whose first lines match `auto-mode-interpreter-regexp'. 1945This is used for files whose first lines match `auto-mode-interpreter-regexp'.
1944Each element looks like (INTERPRETER . MODE). 1946Each element looks like (INTERPRETER . MODE).
1945The car of each element is compared with 1947The car of each element, a regular expression, is compared with
1946the name of the interpreter specified in the first line. 1948the name of the interpreter specified in the first line.
1947If it matches, mode MODE is selected. 1949If it matches, mode MODE is selected.
1948 1950
@@ -1959,13 +1961,12 @@ from the end of the file name anything that matches one of these regexps.")
1959(defvar auto-mode-interpreter-regexp 1961(defvar auto-mode-interpreter-regexp
1960 "#![ \t]?\\([^ \t\n]*\ 1962 "#![ \t]?\\([^ \t\n]*\
1961/bin/env[ \t]\\)?\\([^ \t\n]+\\)" 1963/bin/env[ \t]\\)?\\([^ \t\n]+\\)"
1962 "Regular expression matching interpreters, for file mode determination. 1964 "Regexp matching interpreters, for file mode determination.
1963This regular expression is matched against the first line of a file 1965This regular expression is matched against the first line of a file
1964to determine the file's mode in `set-auto-mode' when Emacs can't deduce 1966to determine the file's mode in `set-auto-mode'. If it matches, the file
1965a mode from the file's name. If it matches, the file is assumed to 1967is assumed to be interpreted by the interpreter matched by the second group
1966be interpreted by the interpreter matched by the second group of the 1968of the regular expression. The mode is then determined as the mode
1967regular expression. The mode is then determined as the mode associated 1969associated with that interpreter in `interpreter-mode-alist'.")
1968with that interpreter in `interpreter-mode-alist'.")
1969 1970
1970(defvar magic-mode-alist 1971(defvar magic-mode-alist
1971 `(;; The < comes before the groups (but the first) to reduce backtracking. 1972 `(;; The < comes before the groups (but the first) to reduce backtracking.
@@ -1992,7 +1993,7 @@ if REGEXP matches the text at the beginning of the buffer,
1992to decide the buffer's major mode. 1993to decide the buffer's major mode.
1993 1994
1994If FUNCTION is nil, then it is not called. (That is a way of saying 1995If FUNCTION is nil, then it is not called. (That is a way of saying
1995\"allow `auto-mode-alist' to decide for these files.") 1996\"allow `auto-mode-alist' to decide for these files.)")
1996 1997
1997(defun set-auto-mode (&optional keep-mode-if-same) 1998(defun set-auto-mode (&optional keep-mode-if-same)
1998 "Select major mode appropriate for current buffer. 1999 "Select major mode appropriate for current buffer.
@@ -2151,7 +2152,7 @@ Otherwise, return nil; point may be changed."
2151 (goto-char beg) 2152 (goto-char beg)
2152 end)))) 2153 end))))
2153 2154
2154(defun hack-local-variables-confirm () 2155(defun hack-local-variables-confirm (string)
2155 (or (eq enable-local-variables t) 2156 (or (eq enable-local-variables t)
2156 (and enable-local-variables 2157 (and enable-local-variables
2157 (save-window-excursion 2158 (save-window-excursion
@@ -2168,8 +2169,10 @@ Otherwise, return nil; point may be changed."
2168 (save-excursion 2169 (save-excursion
2169 (beginning-of-line) 2170 (beginning-of-line)
2170 (set-window-start (selected-window) (point))) 2171 (set-window-start (selected-window) (point)))
2171 (y-or-n-p (format "Set local variables as specified in -*- line of %s? " 2172 (y-or-n-p (format string
2172 (file-name-nondirectory buffer-file-name))))))) 2173 (if buffer-file-name
2174 (file-name-nondirectory buffer-file-name)
2175 (concat "buffer " (buffer-name)))))))))
2173 2176
2174(defun hack-local-variables-prop-line (&optional mode-only) 2177(defun hack-local-variables-prop-line (&optional mode-only)
2175 "Set local variables specified in the -*- line. 2178 "Set local variables specified in the -*- line.
@@ -2225,7 +2228,8 @@ is specified, returning t if it is specified."
2225 (if mode-only mode-specified 2228 (if mode-only mode-specified
2226 (if (and result 2229 (if (and result
2227 (or mode-only 2230 (or mode-only
2228 (hack-local-variables-confirm))) 2231 (hack-local-variables-confirm
2232 "Set local variables as specified in -*- line of %s? ")))
2229 (let ((enable-local-eval enable-local-eval)) 2233 (let ((enable-local-eval enable-local-eval))
2230 (while result 2234 (while result
2231 (hack-one-local-variable (car (car result)) (cdr (car result))) 2235 (hack-one-local-variable (car (car result)) (cdr (car result)))
@@ -2255,7 +2259,8 @@ is specified, returning t if it is specified."
2255 (when (let ((case-fold-search t)) 2259 (when (let ((case-fold-search t))
2256 (and (search-forward "Local Variables:" nil t) 2260 (and (search-forward "Local Variables:" nil t)
2257 (or mode-only 2261 (or mode-only
2258 (hack-local-variables-confirm)))) 2262 (hack-local-variables-confirm
2263 "Set local variables as specified at end of %s? "))))
2259 (skip-chars-forward " \t") 2264 (skip-chars-forward " \t")
2260 (let ((enable-local-eval enable-local-eval) 2265 (let ((enable-local-eval enable-local-eval)
2261 ;; suffix is what comes after "local variables:" in its line. 2266 ;; suffix is what comes after "local variables:" in its line.
@@ -2476,7 +2481,8 @@ is considered risky."
2476 (hack-one-local-variable-eval-safep val)) 2481 (hack-one-local-variable-eval-safep val))
2477 ;; Permit eval if not root and user says ok. 2482 ;; Permit eval if not root and user says ok.
2478 (and (not (zerop (user-uid))) 2483 (and (not (zerop (user-uid)))
2479 (hack-local-variables-confirm))) 2484 (hack-local-variables-confirm
2485 "Process `eval' or hook local variables in %s? ")))
2480 (if (eq var 'eval) 2486 (if (eq var 'eval)
2481 (save-excursion (eval val)) 2487 (save-excursion (eval val))
2482 (make-local-variable var) 2488 (make-local-variable var)
@@ -2982,7 +2988,7 @@ Uses the free variable `backup-extract-version-start', whose value should be
2982the index in the name where the version number begins." 2988the index in the name where the version number begins."
2983 (if (and (string-match "[0-9]+~$" fn backup-extract-version-start) 2989 (if (and (string-match "[0-9]+~$" fn backup-extract-version-start)
2984 (= (match-beginning 0) backup-extract-version-start)) 2990 (= (match-beginning 0) backup-extract-version-start))
2985 (string-to-int (substring fn backup-extract-version-start -1)) 2991 (string-to-number (substring fn backup-extract-version-start -1))
2986 0)) 2992 0))
2987 2993
2988;; I believe there is no need to alter this behavior for VMS; 2994;; I believe there is no need to alter this behavior for VMS;
@@ -4546,7 +4552,7 @@ normally equivalent short `-D' option is just passed on to
4546 (if (string-match "ls (.*utils) \\([0-9.]*\\)$" version-out) 4552 (if (string-match "ls (.*utils) \\([0-9.]*\\)$" version-out)
4547 (let* ((version (match-string 1 version-out)) 4553 (let* ((version (match-string 1 version-out))
4548 (split (split-string version "[.]")) 4554 (split (split-string version "[.]"))
4549 (numbers (mapcar 'string-to-int split)) 4555 (numbers (mapcar 'string-to-number split))
4550 (min '(5 2 1)) 4556 (min '(5 2 1))
4551 comparison) 4557 comparison)
4552 (while (and (not comparison) (or numbers min)) 4558 (while (and (not comparison) (or numbers min))
diff --git a/lisp/finder.el b/lisp/finder.el
index 7a886e5480f..fb327524793 100644
--- a/lisp/finder.el
+++ b/lisp/finder.el
@@ -182,7 +182,7 @@ no arguments compiles from `load-path'."
182;;; End: 182;;; End:
183;;; " (file-name-nondirectory generated-finder-keywords-file) " ends here\n") 183;;; " (file-name-nondirectory generated-finder-keywords-file) " ends here\n")
184 (kill-buffer "*finder-scratch*") 184 (kill-buffer "*finder-scratch*")
185 (eval-current-buffer) ;; So we get the new keyword list immediately 185 (eval-buffer) ;; So we get the new keyword list immediately
186 (basic-save-buffer)))) 186 (basic-save-buffer))))
187 187
188(defun finder-compile-keywords-make-dist () 188(defun finder-compile-keywords-make-dist ()
diff --git a/lisp/follow.el b/lisp/follow.el
index 61517a68ff1..74dc12f8881 100644
--- a/lisp/follow.el
+++ b/lisp/follow.el
@@ -394,7 +394,6 @@ Used by `follow-window-size-change'.")
394 "Anders Lindgren <andersl@andersl.com>" 394 "Anders Lindgren <andersl@andersl.com>"
395 "follow.el" 395 "follow.el"
396 '(post-command-hook 396 '(post-command-hook
397 post-command-idle-hook
398 pre-command-hook 397 pre-command-hook
399 window-size-change-functions 398 window-size-change-functions
400 window-scroll-functions 399 window-scroll-functions
@@ -683,9 +682,6 @@ Keys specific to Follow mode:
683 (set 'scroll-on-clipped-lines nil)) 682 (set 'scroll-on-clipped-lines nil))
684 (force-mode-line-update) 683 (force-mode-line-update)
685 (add-hook 'post-command-hook 'follow-post-command-hook t) 684 (add-hook 'post-command-hook 'follow-post-command-hook t)
686 (if (boundp 'post-command-idle-hook)
687 (add-hook 'post-command-idle-hook
688 'follow-avoid-tail-recenter t))
689 (run-hooks 'follow-mode-hook)) 685 (run-hooks 'follow-mode-hook))
690 686
691 ((and (not follow-mode) follow-mode-orig) ; Off 687 ((and (not follow-mode) follow-mode-orig) ; Off
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index aae73bd1e03..5065553121d 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -1311,12 +1311,19 @@ START should be at the beginning of a line."
1311 1311
1312;;; Syntactic fontification functions. 1312;;; Syntactic fontification functions.
1313 1313
1314(defvar font-lock-comment-start-skip nil
1315 "If non-nil, Font Lock mode uses this instead of `comment-start-skip'.")
1316
1317(defvar font-lock-comment-end-skip nil
1318 "If non-nil, Font Lock mode uses this instead of `comment-end'.")
1319
1314(defun font-lock-fontify-syntactically-region (start end &optional loudly ppss) 1320(defun font-lock-fontify-syntactically-region (start end &optional loudly ppss)
1315 "Put proper face on each string and comment between START and END. 1321 "Put proper face on each string and comment between START and END.
1316START should be at the beginning of a line." 1322START should be at the beginning of a line."
1317 (let ((comment-end-regexp 1323 (let ((comment-end-regexp
1318 (regexp-quote 1324 (or font-lock-comment-end-skip
1319 (replace-regexp-in-string "^ *" "" comment-end))) 1325 (regexp-quote
1326 (replace-regexp-in-string "^ *" "" comment-end))))
1320 state face beg) 1327 state face beg)
1321 (if loudly (message "Fontifying %s... (syntactically...)" (buffer-name))) 1328 (if loudly (message "Fontifying %s... (syntactically...)" (buffer-name)))
1322 (goto-char start) 1329 (goto-char start)
@@ -1334,12 +1341,14 @@ START should be at the beginning of a line."
1334 'syntax-table)) 1341 'syntax-table))
1335 (when face (put-text-property beg (point) 'face face)) 1342 (when face (put-text-property beg (point) 'face face))
1336 (when (and (eq face 'font-lock-comment-face) 1343 (when (and (eq face 'font-lock-comment-face)
1337 comment-start-skip) 1344 (or font-lock-comment-start-skip
1345 comment-start-skip))
1338 ;; Find the comment delimiters 1346 ;; Find the comment delimiters
1339 ;; and use font-lock-comment-delimiter-face for them. 1347 ;; and use font-lock-comment-delimiter-face for them.
1340 (save-excursion 1348 (save-excursion
1341 (goto-char beg) 1349 (goto-char beg)
1342 (if (looking-at comment-start-skip) 1350 (if (looking-at (or font-lock-comment-start-skip
1351 comment-start-skip))
1343 (put-text-property beg (match-end 0) 'face 1352 (put-text-property beg (match-end 0) 'face
1344 font-lock-comment-delimiter-face))) 1353 font-lock-comment-delimiter-face)))
1345 (if (looking-back comment-end-regexp (point-at-bol)) 1354 (if (looking-back comment-end-regexp (point-at-bol))
@@ -1655,27 +1664,6 @@ Sets various variables using `font-lock-defaults' (or, if nil, using
1655 1664
1656;; But now we do it the custom way. Note that `defface' will not overwrite any 1665;; But now we do it the custom way. Note that `defface' will not overwrite any
1657;; faces declared above via `custom-declare-face'. 1666;; faces declared above via `custom-declare-face'.
1658(defface font-lock-comment-delimiter-face
1659 '((((class grayscale) (background light))
1660 (:foreground "DimGray" :weight bold :slant italic))
1661 (((class grayscale) (background dark))
1662 (:foreground "LightGray" :weight bold :slant italic))
1663 (((class color) (min-colors 88) (background light))
1664 (:foreground "Firebrick"))
1665 (((class color) (min-colors 88) (background dark))
1666 (:foreground "chocolate1"))
1667 (((class color) (min-colors 16) (background light))
1668 (:foreground "red"))
1669 (((class color) (min-colors 16) (background dark))
1670 (:foreground "red1"))
1671 (((class color) (min-colors 8) (background light))
1672 (:foreground "red"))
1673 (((class color) (min-colors 8) (background dark))
1674 (:foreground "red1"))
1675 (t (:weight bold :slant italic)))
1676 "Font Lock mode face used to highlight comment delimiters."
1677 :group 'font-lock-highlighting-faces)
1678
1679(defface font-lock-comment-face 1667(defface font-lock-comment-face
1680 '((((class grayscale) (background light)) 1668 '((((class grayscale) (background light))
1681 (:foreground "DimGray" :weight bold :slant italic)) 1669 (:foreground "DimGray" :weight bold :slant italic))
@@ -1697,6 +1685,17 @@ Sets various variables using `font-lock-defaults' (or, if nil, using
1697 "Font Lock mode face used to highlight comments." 1685 "Font Lock mode face used to highlight comments."
1698 :group 'font-lock-highlighting-faces) 1686 :group 'font-lock-highlighting-faces)
1699 1687
1688(defface font-lock-comment-delimiter-face
1689 '((default :inherit font-lock-comment-face)
1690 (((class grayscale)))
1691 (((class color) (min-colors 16)))
1692 (((class color) (min-colors 8) (background light))
1693 :foreground "red")
1694 (((class color) (min-colors 8) (background dark))
1695 :foreground "red1"))
1696 "Font Lock mode face used to highlight comment delimiters."
1697 :group 'font-lock-highlighting-faces)
1698
1700(defface font-lock-string-face 1699(defface font-lock-string-face
1701 '((((class grayscale) (background light)) (:foreground "DimGray" :slant italic)) 1700 '((((class grayscale) (background light)) (:foreground "DimGray" :slant italic))
1702 (((class grayscale) (background dark)) (:foreground "LightGray" :slant italic)) 1701 (((class grayscale) (background dark)) (:foreground "LightGray" :slant italic))
@@ -1798,13 +1797,8 @@ Sets various variables using `font-lock-defaults' (or, if nil, using
1798 "Font Lock mode face used to highlight warnings." 1797 "Font Lock mode face used to highlight warnings."
1799 :group 'font-lock-highlighting-faces) 1798 :group 'font-lock-highlighting-faces)
1800 1799
1801;; Matches font-lock-builtin-face, because that is used for #ifndef and
1802;; font-lock-keyword-face, which alas make-mode uses for ifndef
1803(defface font-lock-negation-char-face 1800(defface font-lock-negation-char-face
1804 '((((class color) (min-colors 88) (background light)) (:foreground "VioletRed" :weight bold)) 1801 '((t nil))
1805 (((class color) (min-colors 88) (background dark)) (:foreground "MediumOrchid1" :weight bold))
1806 (((class color) (min-colors 8)) (:foreground "red" :weight bold))
1807 (t (:inverse-video t :weight bold)))
1808 "Font Lock mode face used to highlight easy to overlook negation." 1802 "Font Lock mode face used to highlight easy to overlook negation."
1809 :group 'font-lock-highlighting-faces) 1803 :group 'font-lock-highlighting-faces)
1810 1804
@@ -1974,109 +1968,112 @@ This function could be MATCHER in a MATCH-ANCHORED `font-lock-keywords' item."
1974 1968
1975(defconst lisp-font-lock-keywords-1 1969(defconst lisp-font-lock-keywords-1
1976 (eval-when-compile 1970 (eval-when-compile
1977 (list 1971 `(;; Definitions.
1978 ;; 1972 (,(concat "(\\(def\\("
1979 ;; Definitions. 1973 ;; Function declarations.
1980 (list (concat "(\\(def\\(" 1974 "\\(advice\\|varalias\\|alias\\|generic\\|macro\\*?\\|method\\|"
1981 ;; Function declarations. 1975 "setf\\|subst\\*?\\|un\\*?\\|"
1982 "\\(advice\\|varalias\\|alias\\|generic\\|macro\\*?\\|method\\|" 1976 "ine-\\(condition\\|\\(?:derived\\|minor\\|generic\\)-mode\\|"
1983 "setf\\|subst\\*?\\|un\\*?\\|" 1977 "method-combination\\|setf-expander\\|skeleton\\|widget\\|"
1984 "ine-\\(condition\\|\\(?:derived\\|minor\\|generic\\)-mode\\|" 1978 "function\\|\\(compiler\\|modify\\|symbol\\)-macro\\)\\)\\|"
1985 "method-combination\\|setf-expander\\|skeleton\\|widget\\|" 1979 ;; Variable declarations.
1986 "function\\|\\(compiler\\|modify\\|symbol\\)-macro\\)\\)\\|" 1980 "\\(const\\(ant\\)?\\|custom\\|face\\|parameter\\|var\\)\\|"
1987 ;; Variable declarations. 1981 ;; Structure declarations.
1988 "\\(const\\(ant\\)?\\|custom\\|face\\|parameter\\|var\\)\\|" 1982 "\\(class\\|group\\|theme\\|package\\|struct\\|type\\)"
1989 ;; Structure declarations. 1983 "\\)\\)\\>"
1990 "\\(class\\|group\\|theme\\|package\\|struct\\|type\\)" 1984 ;; Any whitespace and defined object.
1991 "\\)\\)\\>" 1985 "[ \t'\(]*"
1992 ;; Any whitespace and defined object. 1986 "\\(setf[ \t]+\\sw+)\\|\\sw+\\)?")
1993 "[ \t'\(]*" 1987 (1 font-lock-keyword-face)
1994 "\\(setf[ \t]+\\sw+)\\|\\sw+\\)?") 1988 (9 (cond ((match-beginning 3) font-lock-function-name-face)
1995 '(1 font-lock-keyword-face) 1989 ((match-beginning 6) font-lock-variable-name-face)
1996 '(9 (cond ((match-beginning 3) font-lock-function-name-face) 1990 (t font-lock-type-face))
1997 ((match-beginning 6) font-lock-variable-name-face) 1991 nil t))
1998 (t font-lock-type-face)) 1992 ;; Emacs Lisp autoload cookies.
1999 nil t)) 1993 ("^;;;###\\(autoload\\)" 1 font-lock-warning-face prepend)
2000 ;; 1994 ;; Regexp negated char group.
2001 ;; Emacs Lisp autoload cookies. 1995 ("\\[\\(\\^\\)" 1 font-lock-negation-char-face prepend)))
2002 '("^;;;###\\(autoload\\)" 1 font-lock-warning-face prepend)
2003 ))
2004 "Subdued level highlighting for Lisp modes.") 1996 "Subdued level highlighting for Lisp modes.")
2005 1997
2006(defconst lisp-font-lock-keywords-2 1998(defconst lisp-font-lock-keywords-2
2007 (append lisp-font-lock-keywords-1 1999 (append lisp-font-lock-keywords-1
2008 (eval-when-compile 2000 (eval-when-compile
2009 (list 2001 `(;; Control structures. Emacs Lisp forms.
2010 ;; 2002 (,(concat
2011 ;; Control structures. Emacs Lisp forms. 2003 "(" (regexp-opt
2012 (cons (concat 2004 '("cond" "if" "while" "let" "let*"
2013 "(" (regexp-opt 2005 "prog" "progn" "progv" "prog1" "prog2" "prog*"
2014 '("cond" "if" "while" "let" "let*" 2006 "inline" "lambda" "save-restriction" "save-excursion"
2015 "prog" "progn" "progv" "prog1" "prog2" "prog*" 2007 "save-window-excursion" "save-selected-window"
2016 "inline" "lambda" "save-restriction" "save-excursion" 2008 "save-match-data" "save-current-buffer" "unwind-protect"
2017 "save-window-excursion" "save-selected-window" 2009 "condition-case" "track-mouse"
2018 "save-match-data" "save-current-buffer" "unwind-protect" 2010 "eval-after-load" "eval-and-compile" "eval-when-compile"
2019 "condition-case" "track-mouse" 2011 "eval-when"
2020 "eval-after-load" "eval-and-compile" "eval-when-compile" 2012 "with-category-table"
2021 "eval-when" 2013 "with-current-buffer" "with-electric-help"
2022 "with-category-table" 2014 "with-local-quit" "with-no-warnings"
2023 "with-current-buffer" "with-electric-help" 2015 "with-output-to-string" "with-output-to-temp-buffer"
2024 "with-local-quit" "with-no-warnings" 2016 "with-selected-window" "with-syntax-table"
2025 "with-output-to-string" "with-output-to-temp-buffer" 2017 "with-temp-buffer" "with-temp-file" "with-temp-message"
2026 "with-selected-window" "with-syntax-table" 2018 "with-timeout" "with-timeout-handler") t)
2027 "with-temp-buffer" "with-temp-file" "with-temp-message" 2019 "\\>")
2028 "with-timeout" "with-timeout-handler") t) 2020 . 1)
2029 "\\>") 2021 ;; Control structures. Common Lisp forms.
2030 1) 2022 (,(concat
2031 ;; 2023 "(" (regexp-opt
2032 ;; Control structures. Common Lisp forms. 2024 '("when" "unless" "case" "ecase" "typecase" "etypecase"
2033 (cons (concat 2025 "ccase" "ctypecase" "handler-case" "handler-bind"
2034 "(" (regexp-opt 2026 "restart-bind" "restart-case" "in-package"
2035 '("when" "unless" "case" "ecase" "typecase" "etypecase" 2027 "break" "ignore-errors"
2036 "ccase" "ctypecase" "handler-case" "handler-bind" 2028 "loop" "do" "do*" "dotimes" "dolist" "the" "locally"
2037 "restart-bind" "restart-case" "in-package" 2029 "proclaim" "declaim" "declare" "symbol-macrolet"
2038 "break" "ignore-errors" 2030 "lexical-let" "lexical-let*" "flet" "labels" "compiler-let"
2039 "loop" "do" "do*" "dotimes" "dolist" "the" "locally" 2031 "destructuring-bind" "macrolet" "tagbody" "block" "go"
2040 "proclaim" "declaim" "declare" "symbol-macrolet" 2032 "multiple-value-bind" "multiple-value-prog1"
2041 "lexical-let" "lexical-let*" "flet" "labels" "compiler-let" 2033 "return" "return-from"
2042 "destructuring-bind" "macrolet" "tagbody" "block" "go" 2034 "with-accessors" "with-compilation-unit"
2043 "multiple-value-bind" "multiple-value-prog1" 2035 "with-condition-restarts" "with-hash-table-iterator"
2044 "return" "return-from" 2036 "with-input-from-string" "with-open-file"
2045 "with-accessors" "with-compilation-unit" 2037 "with-open-stream" "with-output-to-string"
2046 "with-condition-restarts" "with-hash-table-iterator" 2038 "with-package-iterator" "with-simple-restart"
2047 "with-input-from-string" "with-open-file" 2039 "with-slots" "with-standard-io-syntax") t)
2048 "with-open-stream" "with-output-to-string" 2040 "\\>")
2049 "with-package-iterator" "with-simple-restart" 2041 . 1)
2050 "with-slots" "with-standard-io-syntax") t) 2042 ;; Exit/Feature symbols as constants.
2051 "\\>") 2043 (,(concat "(\\(catch\\|throw\\|featurep\\|provide\\|require\\)\\>"
2052 1) 2044 "[ \t']*\\(\\sw+\\)?")
2053 ;; 2045 (1 font-lock-keyword-face)
2054 ;; Exit/Feature symbols as constants. 2046 (2 font-lock-constant-face nil t))
2055 (list (concat "(\\(catch\\|throw\\|featurep\\|provide\\|require\\)\\>" 2047 ;; Erroneous structures.
2056 "[ \t']*\\(\\sw+\\)?") 2048 ("(\\(abort\\|assert\\|warn\\|check-type\\|cerror\\|error\\|signal\\)\\>" 1 font-lock-warning-face)
2057 '(1 font-lock-keyword-face) 2049 ;; Words inside \\[] tend to be for `substitute-command-keys'.
2058 '(2 font-lock-constant-face nil t)) 2050 ("\\\\\\\\\\[\\(\\sw+\\)]" 1 font-lock-constant-face prepend)
2059 ;; 2051 ;; Words inside `' tend to be symbol names.
2060 ;; Erroneous structures. 2052 ("`\\(\\sw\\sw+\\)'" 1 font-lock-constant-face prepend)
2061 '("(\\(abort\\|assert\\|warn\\|check-type\\|cerror\\|error\\|signal\\)\\>" 1 font-lock-warning-face) 2053 ;; Constant values.
2062 ;; 2054 ("\\<:\\sw+\\>" 0 font-lock-builtin-face)
2063 ;; Words inside \\[] tend to be for `substitute-command-keys'. 2055 ;; ELisp and CLisp `&' keywords as types.
2064 '("\\\\\\\\\\[\\(\\sw+\\)]" 1 font-lock-constant-face prepend) 2056 ("\\&\\sw+\\>" . font-lock-type-face)
2065 ;; 2057 ;; Make regexp grouping constructs bold, so they stand out, but only in strings.
2066 ;; Words inside `' tend to be symbol names. 2058 ((lambda (bound)
2067 '("`\\(\\sw\\sw+\\)'" 1 font-lock-constant-face prepend) 2059 (if (re-search-forward "\\([\\][\\]\\)\\([(|)]\\)\\(\\?:\\)?" bound)
2068 ;; 2060 (let ((face (get-text-property (1- (point)) 'face)))
2069 ;; Constant values. 2061 (if (listp face)
2070 '("\\<:\\sw+\\>" 0 font-lock-builtin-face) 2062 (memq 'font-lock-string-face face)
2071 ;; 2063 (eq 'font-lock-string-face face)))))
2072 ;; ELisp and CLisp `&' keywords as types. 2064 (1 font-lock-comment-face prepend) ; Should we introduce a lowlight face for this?
2073 '("\\&\\sw+\\>" . font-lock-type-face) 2065 ; Ideally that would retain the color, dimmed 50%.
2074 ;; 2066 (2 'bold prepend)
2067 (3 font-lock-type-face prepend t))
2068 ;; Underline innermost grouping, so that you can more easily see what belongs together.
2069 ;; 2005-05-12: Font-lock can go into an unbreakable endless loop on this -- something's broken.
2070 ;;("[\\][\\][(]\\(?:\\?:\\)?\\(\\(?:[^\\\"]+\\|[\\]\\(?:[^\\]\\|[\\][^(]\\)\\)+?\\)[\\][\\][)]"
2071 ;;1 'underline prepend)
2075;;; This is too general -- rms. 2072;;; This is too general -- rms.
2076;;; A user complained that he has functions whose names start with `do' 2073;;; A user complained that he has functions whose names start with `do'
2077;;; and that they get the wrong color. 2074;;; and that they get the wrong color.
2078;;; ;; CL `with-' and `do-' constructs 2075;;; ;; CL `with-' and `do-' constructs
2079;;; '("(\\(\\(do-\\|with-\\)\\(\\s_\\|\\w\\)*\\)" 1 font-lock-keyword-face) 2076;;; ("(\\(\\(do-\\|with-\\)\\(\\s_\\|\\w\\)*\\)" 1 font-lock-keyword-face)
2080 ))) 2077 )))
2081 "Gaudy level highlighting for Lisp modes.") 2078 "Gaudy level highlighting for Lisp modes.")
2082 2079
diff --git a/lisp/forms.el b/lisp/forms.el
index aa0582c918a..61d2441a9ea 100644
--- a/lisp/forms.el
+++ b/lisp/forms.el
@@ -63,7 +63,7 @@
63;; Automatic mode switching is supported if you specify 63;; Automatic mode switching is supported if you specify
64;; "-*- forms -*-" in the first line of the control file. 64;; "-*- forms -*-" in the first line of the control file.
65;; 65;;
66;; The control file is visited, evaluated using `eval-current-buffer', 66;; The control file is visited, evaluated using `eval-buffer',
67;; and should set at least the following variables: 67;; and should set at least the following variables:
68;; 68;;
69;; forms-file [string] 69;; forms-file [string]
@@ -519,7 +519,7 @@ Commands: Equivalent keys in read-only mode:
519 (yes-or-no-p 519 (yes-or-no-p
520 (concat "Evaluate lisp code in buffer " 520 (concat "Evaluate lisp code in buffer "
521 (buffer-name) " to display forms "))) 521 (buffer-name) " to display forms ")))
522 (eval-current-buffer) 522 (eval-buffer)
523 (error "`enable-local-eval' inhibits buffer evaluation")) 523 (error "`enable-local-eval' inhibits buffer evaluation"))
524 524
525 ;; Check if the mandatory variables make sense. 525 ;; Check if the mandatory variables make sense.
diff --git a/lisp/frame.el b/lisp/frame.el
index e7cf62ef708..3693295e819 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -1207,7 +1207,7 @@ left untouched. FRAME nil or omitted means use the selected frame."
1207This is done in the face `trailing-whitespace'." 1207This is done in the face `trailing-whitespace'."
1208 :tag "Highlight trailing whitespace." 1208 :tag "Highlight trailing whitespace."
1209 :type 'boolean 1209 :type 'boolean
1210 :group 'font-lock) 1210 :group 'whitespace-faces)
1211 1211
1212 1212
1213 1213
diff --git a/lisp/generic-x.el b/lisp/generic-x.el
index 31aa9299fbb..9ba06d42397 100644
--- a/lisp/generic-x.el
+++ b/lisp/generic-x.el
@@ -116,11 +116,6 @@
116 :group 'data 116 :group 'data
117 :version "20.3") 117 :version "20.3")
118 118
119(defgroup generic-x-modes nil
120 "Individual modes in the collection of generic modes."
121 :group 'generic-x
122 :version "22.1")
123
124;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 119;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
125;; Default-Generic mode 120;; Default-Generic mode
126;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 121;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -158,7 +153,7 @@ the regexp in `generic-find-file-regexp'. If the value is nil,
158 :type '(choice (const :tag "Don't check file names" nil) regexp)) 153 :type '(choice (const :tag "Don't check file names" nil) regexp))
159 154
160;; This generic mode is always defined 155;; This generic mode is always defined
161(define-generic-mode default-generic-mode (list ?#) nil nil nil nil :group 'generic-x-modes) 156(define-generic-mode default-generic-mode (list ?#) nil nil nil nil)
162 157
163;; A more general solution would allow us to enter generic-mode for 158;; A more general solution would allow us to enter generic-mode for
164;; *any* comment character, but would require us to synthesize a new 159;; *any* comment character, but would require us to synthesize a new
@@ -308,8 +303,7 @@ your changes into effect."
308 '((nil "^\\([-A-Za-z0-9_]+\\)" 1) 303 '((nil "^\\([-A-Za-z0-9_]+\\)" 1)
309 ("*Directories*" "^\\s-*<Directory\\s-*\\([^>]+\\)>" 1) 304 ("*Directories*" "^\\s-*<Directory\\s-*\\([^>]+\\)>" 1)
310 ("*Locations*" "^\\s-*<Location\\s-*\\([^>]+\\)>" 1)))))) 305 ("*Locations*" "^\\s-*<Location\\s-*\\([^>]+\\)>" 1))))))
311 "Generic mode for Apache or HTTPD configuration files." 306 "Generic mode for Apache or HTTPD configuration files."))
312 :group 'generic-x-modes))
313 307
314(when (memq 'apache-log-generic-mode generic-extras-enable-list) 308(when (memq 'apache-log-generic-mode generic-extras-enable-list)
315 309
@@ -322,8 +316,7 @@ your changes into effect."
322 (2 font-lock-variable-name-face))) 316 (2 font-lock-variable-name-face)))
323 '("access_log\\'") 317 '("access_log\\'")
324 nil 318 nil
325 "Mode for Apache log files" 319 "Mode for Apache log files"))
326 :group 'generic-x-modes))
327 320
328;;; Samba 321;;; Samba
329(when (memq 'samba-generic-mode generic-extras-enable-list) 322(when (memq 'samba-generic-mode generic-extras-enable-list)
@@ -337,8 +330,7 @@ your changes into effect."
337 (2 font-lock-type-face))) 330 (2 font-lock-type-face)))
338 '("smb\\.conf\\'") 331 '("smb\\.conf\\'")
339 '(generic-bracket-support) 332 '(generic-bracket-support)
340 "Generic mode for Samba configuration files." 333 "Generic mode for Samba configuration files."))
341 :group 'generic-x-modes))
342 334
343;;; Fvwm 335;;; Fvwm
344;; This is pretty basic. Also, modes for other window managers could 336;; This is pretty basic. Also, modes for other window managers could
@@ -363,8 +355,7 @@ your changes into effect."
363 nil 355 nil
364 '("\\.fvwmrc\\'" "\\.fvwm2rc\\'") 356 '("\\.fvwmrc\\'" "\\.fvwm2rc\\'")
365 nil 357 nil
366 "Generic mode for FVWM configuration files." 358 "Generic mode for FVWM configuration files."))
367 :group 'generic-x-modes))
368 359
369;;; X Resource 360;;; X Resource
370;; I'm pretty sure I've seen an actual mode to do this, but I don't 361;; I'm pretty sure I've seen an actual mode to do this, but I don't
@@ -377,8 +368,7 @@ your changes into effect."
377 '(("^\\([^:\n]+:\\)" 1 font-lock-variable-name-face)) 368 '(("^\\([^:\n]+:\\)" 1 font-lock-variable-name-face))
378 '("\\.Xdefaults\\'" "\\.Xresources\\'" "\\.Xenvironment\\'" "\\.ad\\'") 369 '("\\.Xdefaults\\'" "\\.Xresources\\'" "\\.Xenvironment\\'" "\\.ad\\'")
379 nil 370 nil
380 "Generic mode for X Resource configuration files." 371 "Generic mode for X Resource configuration files."))
381 :group 'generic-x-modes))
382 372
383;;; Hosts 373;;; Hosts
384(when (memq 'hosts-generic-mode generic-extras-enable-list) 374(when (memq 'hosts-generic-mode generic-extras-enable-list)
@@ -389,8 +379,7 @@ your changes into effect."
389 '(("\\([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\\)" 1 font-lock-constant-face)) 379 '(("\\([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\\)" 1 font-lock-constant-face))
390 '("[hH][oO][sS][tT][sS]\\'") 380 '("[hH][oO][sS][tT][sS]\\'")
391 nil 381 nil
392 "Generic mode for HOSTS files." 382 "Generic mode for HOSTS files."))
393 :group 'generic-x-modes))
394 383
395;;; Windows INF files 384;;; Windows INF files
396(when (memq 'inf-generic-mode generic-extras-enable-list) 385(when (memq 'inf-generic-mode generic-extras-enable-list)
@@ -401,8 +390,7 @@ your changes into effect."
401 '(("^\\(\\[.*\\]\\)" 1 font-lock-constant-face)) 390 '(("^\\(\\[.*\\]\\)" 1 font-lock-constant-face))
402 '("\\.[iI][nN][fF]\\'") 391 '("\\.[iI][nN][fF]\\'")
403 '(generic-bracket-support) 392 '(generic-bracket-support)
404 "Generic mode for MS-Windows INF files." 393 "Generic mode for MS-Windows INF files."))
405 :group 'generic-x-modes))
406 394
407;;; Windows INI files 395;;; Windows INI files
408;; Should define escape character as well! 396;; Should define escape character as well!
@@ -424,8 +412,7 @@ your changes into effect."
424 ("*Variables*" "^\\s-*\\([^=]+\\)\\s-*=" 1)))))) 412 ("*Variables*" "^\\s-*\\([^=]+\\)\\s-*=" 1))))))
425 "Generic mode for MS-Windows INI files. 413 "Generic mode for MS-Windows INI files.
426You can use `ini-generic-mode-find-file-hook' to enter this mode 414You can use `ini-generic-mode-find-file-hook' to enter this mode
427automatically for INI files whose names do not end in \".ini\"." 415automatically for INI files whose names do not end in \".ini\".")
428 :group 'generic-x-modes)
429 416
430(defun ini-generic-mode-find-file-hook () 417(defun ini-generic-mode-find-file-hook ()
431 "Hook function to enter Ini-Generic mode automatically for INI files. 418 "Hook function to enter Ini-Generic mode automatically for INI files.
@@ -453,8 +440,7 @@ like an INI file. You can add this hook to `find-file-hook'."
453 (lambda () 440 (lambda ()
454 (setq imenu-generic-expression 441 (setq imenu-generic-expression
455 '((nil "^\\s-*\\(.*\\)\\s-*=" 1)))))) 442 '((nil "^\\s-*\\(.*\\)\\s-*=" 1))))))
456 "Generic mode for MS-Windows Registry files." 443 "Generic mode for MS-Windows Registry files."))
457 :group 'generic-x-modes))
458 444
459;;; DOS/Windows BAT files 445;;; DOS/Windows BAT files
460(when (memq 'bat-generic-mode generic-extras-enable-list) 446(when (memq 'bat-generic-mode generic-extras-enable-list)
@@ -506,7 +492,7 @@ like an INI file. You can add this hook to `find-file-hook'."
506 "MD" "md" "Md" 492 "MD" "md" "Md"
507 "PATH" "path" "Path" 493 "PATH" "path" "Path"
508 "PAUSE" "pause" "Pause" 494 "PAUSE" "pause" "Pause"
509 "PROMPT" "prompt" "Prompt" 495 "PROMPT" "prompt" "Prompt"
510 "RD" "rd" "Rd" 496 "RD" "rd" "Rd"
511 "REN" "ren" "Ren" 497 "REN" "ren" "Ren"
512 "SET" "set" "Set" 498 "SET" "set" "Set"
@@ -528,8 +514,7 @@ like an INI file. You can add this hook to `find-file-hook'."
528 "\\`[cC][oO][nN][fF][iI][gG]\\." 514 "\\`[cC][oO][nN][fF][iI][gG]\\."
529 "\\`[aA][uU][tT][oO][eE][xX][eE][cC]\\.") 515 "\\`[aA][uU][tT][oO][eE][xX][eE][cC]\\.")
530 '(generic-bat-mode-setup-function) 516 '(generic-bat-mode-setup-function)
531 "Generic mode for MS-Windows BAT files." 517 "Generic mode for MS-Windows BAT files.")
532 :group 'generic-x-modes)
533 518
534(defvar bat-generic-mode-syntax-table nil 519(defvar bat-generic-mode-syntax-table nil
535 "Syntax table in use in `bat-generic-mode' buffers.") 520 "Syntax table in use in `bat-generic-mode' buffers.")
@@ -608,8 +593,7 @@ like an INI file. You can add this hook to `find-file-hook'."
608 (lambda () 593 (lambda ()
609 (setq imenu-generic-expression 594 (setq imenu-generic-expression
610 '((nil "\\s-/\\([^/]+\\)/[i, \t\n]" 1)))))) 595 '((nil "\\s-/\\([^/]+\\)/[i, \t\n]" 1))))))
611 "Mode for Mailagent rules files." 596 "Mode for Mailagent rules files."))
612 :group 'generic-x-modes))
613 597
614;; Solaris/Sys V prototype files 598;; Solaris/Sys V prototype files
615(when (memq 'prototype-generic-mode generic-extras-enable-list) 599(when (memq 'prototype-generic-mode generic-extras-enable-list)
@@ -632,8 +616,7 @@ like an INI file. You can add this hook to `find-file-hook'."
632 (2 font-lock-variable-name-face))) 616 (2 font-lock-variable-name-face)))
633 '("prototype\\'") 617 '("prototype\\'")
634 nil 618 nil
635 "Mode for Sys V prototype files." 619 "Mode for Sys V prototype files."))
636 :group 'generic-x-modes))
637 620
638;; Solaris/Sys V pkginfo files 621;; Solaris/Sys V pkginfo files
639(when (memq 'pkginfo-generic-mode generic-extras-enable-list) 622(when (memq 'pkginfo-generic-mode generic-extras-enable-list)
@@ -646,8 +629,7 @@ like an INI file. You can add this hook to `find-file-hook'."
646 (2 font-lock-variable-name-face))) 629 (2 font-lock-variable-name-face)))
647 '("pkginfo\\'") 630 '("pkginfo\\'")
648 nil 631 nil
649 "Mode for Sys V pkginfo files." 632 "Mode for Sys V pkginfo files."))
650 :group 'generic-x-modes))
651 633
652;; Javascript mode 634;; Javascript mode
653;; Includes extra keywords from Armando Singer [asinger@MAIL.COLGATE.EDU] 635;; Includes extra keywords from Armando Singer [asinger@MAIL.COLGATE.EDU]
@@ -726,8 +708,7 @@ like an INI file. You can add this hook to `find-file-hook'."
726 (setq imenu-generic-expression 708 (setq imenu-generic-expression
727 '((nil "^function\\s-+\\([A-Za-z0-9_]+\\)" 1) 709 '((nil "^function\\s-+\\([A-Za-z0-9_]+\\)" 1)
728 ("*Variables*" "^var\\s-+\\([A-Za-z0-9_]+\\)" 1)))))) 710 ("*Variables*" "^var\\s-+\\([A-Za-z0-9_]+\\)" 1))))))
729 "Mode for JavaScript files." 711 "Mode for JavaScript files."))
730 :group 'generic-x-modes))
731 712
732;; VRML files 713;; VRML files
733(when (memq 'vrml-generic-mode generic-extras-enable-list) 714(when (memq 'vrml-generic-mode generic-extras-enable-list)
@@ -780,8 +761,7 @@ like an INI file. You can add this hook to `find-file-hook'."
780 ("*Definitions*" 761 ("*Definitions*"
781 "DEF\\s-+\\([-A-Za-z0-9_]+\\)\\s-+\\([A-Za-z0-9]+\\)\\s-*{" 762 "DEF\\s-+\\([-A-Za-z0-9_]+\\)\\s-+\\([A-Za-z0-9]+\\)\\s-*{"
782 1)))))) 763 1))))))
783 "Generic Mode for VRML files." 764 "Generic Mode for VRML files."))
784 :group 'generic-x-modes))
785 765
786;; Java Manifests 766;; Java Manifests
787(when (memq 'java-manifest-generic-mode generic-extras-enable-list) 767(when (memq 'java-manifest-generic-mode generic-extras-enable-list)
@@ -802,8 +782,7 @@ like an INI file. You can add this hook to `find-file-hook'."
802 (2 font-lock-constant-face))) 782 (2 font-lock-constant-face)))
803 '("[mM][aA][nN][iI][fF][eE][sS][tT]\\.[mM][fF]\\'") 783 '("[mM][aA][nN][iI][fF][eE][sS][tT]\\.[mM][fF]\\'")
804 nil 784 nil
805 "Mode for Java Manifest files" 785 "Mode for Java Manifest files"))
806 :group 'generic-x-modes))
807 786
808;; Java properties files 787;; Java properties files
809(when (memq 'java-properties-generic-mode generic-extras-enable-list) 788(when (memq 'java-properties-generic-mode generic-extras-enable-list)
@@ -835,8 +814,7 @@ like an INI file. You can add this hook to `find-file-hook'."
835 (lambda () 814 (lambda ()
836 (setq imenu-generic-expression 815 (setq imenu-generic-expression
837 '((nil "^\\([^#! \t\n\r=:]+\\)" 1)))))) 816 '((nil "^\\([^#! \t\n\r=:]+\\)" 1))))))
838 "Mode for Java properties files." 817 "Mode for Java properties files."))
839 :group 'generic-x-modes))
840 818
841;; C shell alias definitions 819;; C shell alias definitions
842(when (memq 'alias-generic-mode generic-extras-enable-list) 820(when (memq 'alias-generic-mode generic-extras-enable-list)
@@ -854,8 +832,7 @@ like an INI file. You can add this hook to `find-file-hook'."
854 (lambda () 832 (lambda ()
855 (setq imenu-generic-expression 833 (setq imenu-generic-expression
856 '((nil "^\\(alias\\|unalias\\)\\s-+\\([-a-zA-Z0-9_]+\\)" 2)))))) 834 '((nil "^\\(alias\\|unalias\\)\\s-+\\([-a-zA-Z0-9_]+\\)" 2))))))
857 "Mode for C Shell alias files." 835 "Mode for C Shell alias files."))
858 :group 'generic-x-modes))
859 836
860;;; Windows RC files 837;;; Windows RC files
861;; Contributed by ACorreir@pervasive-sw.com (Alfred Correira) 838;; Contributed by ACorreir@pervasive-sw.com (Alfred Correira)
@@ -947,8 +924,7 @@ like an INI file. You can add this hook to `find-file-hook'."
947 (2 font-lock-variable-name-face nil t)))) 924 (2 font-lock-variable-name-face nil t))))
948 '("\\.[rR][cC]\\'") 925 '("\\.[rR][cC]\\'")
949 nil 926 nil
950 "Generic mode for MS-Windows Resource files." 927 "Generic mode for MS-Windows Resource files."))
951 :group 'generic-x-modes))
952 928
953;; InstallShield RUL files 929;; InstallShield RUL files
954;; Contributed by Alfred.Correira@Pervasive.Com 930;; Contributed by Alfred.Correira@Pervasive.Com
@@ -1568,8 +1544,7 @@ like an INI file. You can add this hook to `find-file-hook'."
1568 font-lock-variable-name-face "[^_]" "[^_]"))) ; is this face the best choice? 1544 font-lock-variable-name-face "[^_]" "[^_]"))) ; is this face the best choice?
1569 '("\\.[rR][uU][lL]\\'") 1545 '("\\.[rR][uU][lL]\\'")
1570 '(generic-rul-mode-setup-function) 1546 '(generic-rul-mode-setup-function)
1571 "Generic mode for InstallShield RUL files." 1547 "Generic mode for InstallShield RUL files.")
1572 :group 'generic-x-modes)
1573 1548
1574(define-skeleton rul-if 1549(define-skeleton rul-if
1575 "Insert an if statement." 1550 "Insert an if statement."
@@ -1619,8 +1594,7 @@ like an INI file. You can add this hook to `find-file-hook'."
1619 (2 font-lock-variable-name-face))) 1594 (2 font-lock-variable-name-face)))
1620 '("\\.mailrc\\'") 1595 '("\\.mailrc\\'")
1621 nil 1596 nil
1622 "Mode for mailrc files." 1597 "Mode for mailrc files."))
1623 :group 'generic-x-modes))
1624 1598
1625;; Inetd.conf 1599;; Inetd.conf
1626(when (memq 'inetd-conf-generic-mode generic-extras-enable-list) 1600(when (memq 'inetd-conf-generic-mode generic-extras-enable-list)
@@ -1640,8 +1614,7 @@ like an INI file. You can add this hook to `find-file-hook'."
1640 (function 1614 (function
1641 (lambda () 1615 (lambda ()
1642 (setq imenu-generic-expression 1616 (setq imenu-generic-expression
1643 '((nil "^\\([-A-Za-z0-9_]+\\)" 1)))))) 1617 '((nil "^\\([-A-Za-z0-9_]+\\)" 1))))))))
1644 :group 'generic-x-modes))
1645 1618
1646;; Services 1619;; Services
1647(when (memq 'etc-services-generic-mode generic-extras-enable-list) 1620(when (memq 'etc-services-generic-mode generic-extras-enable-list)
@@ -1659,8 +1632,7 @@ like an INI file. You can add this hook to `find-file-hook'."
1659 (function 1632 (function
1660 (lambda () 1633 (lambda ()
1661 (setq imenu-generic-expression 1634 (setq imenu-generic-expression
1662 '((nil "^\\([-A-Za-z0-9_]+\\)" 1)))))) 1635 '((nil "^\\([-A-Za-z0-9_]+\\)" 1))))))))
1663 :group 'generic-x-modes))
1664 1636
1665;; Password and Group files 1637;; Password and Group files
1666(when (memq 'etc-passwd-generic-mode generic-extras-enable-list) 1638(when (memq 'etc-passwd-generic-mode generic-extras-enable-list)
@@ -1702,8 +1674,7 @@ like an INI file. You can add this hook to `find-file-hook'."
1702 (function 1674 (function
1703 (lambda () 1675 (lambda ()
1704 (setq imenu-generic-expression 1676 (setq imenu-generic-expression
1705 '((nil "^\\([-A-Za-z0-9_]+\\):" 1)))))) 1677 '((nil "^\\([-A-Za-z0-9_]+\\):" 1))))))))
1706 :group 'generic-x-modes))
1707 1678
1708;; Fstab 1679;; Fstab
1709(when (memq 'etc-fstab-generic-mode generic-extras-enable-list) 1680(when (memq 'etc-fstab-generic-mode generic-extras-enable-list)
@@ -1753,8 +1724,7 @@ like an INI file. You can add this hook to `find-file-hook'."
1753 (function 1724 (function
1754 (lambda () 1725 (lambda ()
1755 (setq imenu-generic-expression 1726 (setq imenu-generic-expression
1756 '((nil "^\\([/-A-Za-z0-9_]+\\)\\s-+" 1)))))) 1727 '((nil "^\\([/-A-Za-z0-9_]+\\)\\s-+" 1))))))))
1757 :group 'generic-x-modes))
1758 1728
1759;; From Jacques Duthen <jacques.duthen@sncf.fr> 1729;; From Jacques Duthen <jacques.duthen@sncf.fr>
1760(when (memq 'show-tabs-generic-mode generic-extras-enable-list) 1730(when (memq 'show-tabs-generic-mode generic-extras-enable-list)
@@ -1780,7 +1750,7 @@ like an INI file. You can add this hook to `find-file-hook'."
1780 (((class color)) (:background "red")) 1750 (((class color)) (:background "red"))
1781 (t (:weight bold))) 1751 (t (:weight bold)))
1782 "Font Lock mode face used to highlight TABs." 1752 "Font Lock mode face used to highlight TABs."
1783 :group 'generic-x-modes) 1753 :group 'generic-x)
1784 1754
1785(defface show-tabs-space-face 1755(defface show-tabs-space-face
1786 '((((class grayscale) (background light)) (:background "DimGray" :weight bold)) 1756 '((((class grayscale) (background light)) (:background "DimGray" :weight bold))
@@ -1789,7 +1759,7 @@ like an INI file. You can add this hook to `find-file-hook'."
1789 (((class color)) (:background "yellow")) 1759 (((class color)) (:background "yellow"))
1790 (t (:weight bold))) 1760 (t (:weight bold)))
1791 "Font Lock mode face used to highlight spaces." 1761 "Font Lock mode face used to highlight spaces."
1792 :group 'generic-x-modes) 1762 :group 'generic-x)
1793 1763
1794(define-generic-mode show-tabs-generic-mode 1764(define-generic-mode show-tabs-generic-mode
1795 nil ;; no comment char 1765 nil ;; no comment char
@@ -1798,8 +1768,7 @@ like an INI file. You can add this hook to `find-file-hook'."
1798 nil ;; no auto-mode-alist 1768 nil ;; no auto-mode-alist
1799 ;; '(show-tabs-generic-mode-hook-fun) 1769 ;; '(show-tabs-generic-mode-hook-fun)
1800 nil 1770 nil
1801 "Generic mode to show tabs and trailing spaces" 1771 "Generic mode to show tabs and trailing spaces"))
1802 :group 'generic-x-modes))
1803 1772
1804;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1773;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1805;; DNS modes 1774;; DNS modes
@@ -1822,8 +1791,7 @@ like an INI file. You can add this hook to `find-file-hook'."
1822 ;; List of additional automode-alist expressions 1791 ;; List of additional automode-alist expressions
1823 '("/etc/named.boot\\'") 1792 '("/etc/named.boot\\'")
1824 ;; List of set up functions to call 1793 ;; List of set up functions to call
1825 nil 1794 nil))
1826 :group 'generic-x-modes))
1827 1795
1828(when (memq 'named-database-generic-mode generic-extras-enable-list) 1796(when (memq 'named-database-generic-mode generic-extras-enable-list)
1829 1797
@@ -1838,8 +1806,7 @@ like an INI file. You can add this hook to `find-file-hook'."
1838 ;; List of additional auto-mode-alist expressions 1806 ;; List of additional auto-mode-alist expressions
1839 nil 1807 nil
1840 ;; List of set up functions to call 1808 ;; List of set up functions to call
1841 nil 1809 nil)
1842 :group 'generic-x-modes)
1843 1810
1844(defvar named-database-time-string "%Y%m%d%H" 1811(defvar named-database-time-string "%Y%m%d%H"
1845 "Timestring for named serial numbers.") 1812 "Timestring for named serial numbers.")
@@ -1861,8 +1828,7 @@ like an INI file. You can add this hook to `find-file-hook'."
1861 ;; List of additional auto-mode-alist expressions 1828 ;; List of additional auto-mode-alist expressions
1862 '("/etc/resolv[e]?.conf\\'") 1829 '("/etc/resolv[e]?.conf\\'")
1863 ;; List of set up functions to call 1830 ;; List of set up functions to call
1864 nil 1831 nil))
1865 :group 'generic-x-modes))
1866 1832
1867;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1833;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1868;; Modes for spice and common electrical engineering circuit netlist formats 1834;; Modes for spice and common electrical engineering circuit netlist formats
@@ -1906,8 +1872,7 @@ like an INI file. You can add this hook to `find-file-hook'."
1906 (function 1872 (function
1907 (lambda() 1873 (lambda()
1908 (setq font-lock-defaults '(generic-font-lock-keywords nil t))))) 1874 (setq font-lock-defaults '(generic-font-lock-keywords nil t)))))
1909 "Generic mode for SPICE circuit netlist files." 1875 "Generic mode for SPICE circuit netlist files."))
1910 :group 'generic-x-modes))
1911 1876
1912(when (memq 'ibis-generic-mode generic-extras-enable-list) 1877(when (memq 'ibis-generic-mode generic-extras-enable-list)
1913 1878
@@ -1918,8 +1883,7 @@ like an INI file. You can add this hook to `find-file-hook'."
1918 ("\\(\\(_\\|\\w\\)+\\)\\s-*=" 1 font-lock-variable-name-face)) 1883 ("\\(\\(_\\|\\w\\)+\\)\\s-*=" 1 font-lock-variable-name-face))
1919 '("\\.[iI][bB][sS]\\'") 1884 '("\\.[iI][bB][sS]\\'")
1920 '(generic-bracket-support) 1885 '(generic-bracket-support)
1921 "Generic mode for IBIS circuit netlist files." 1886 "Generic mode for IBIS circuit netlist files."))
1922 :group 'generic-x-modes))
1923 1887
1924(when (memq 'astap-generic-mode generic-extras-enable-list) 1888(when (memq 'astap-generic-mode generic-extras-enable-list)
1925 1889
@@ -1956,8 +1920,7 @@ like an INI file. You can add this hook to `find-file-hook'."
1956 (function 1920 (function
1957 (lambda() 1921 (lambda()
1958 (setq font-lock-defaults '(generic-font-lock-keywords nil t))))) 1922 (setq font-lock-defaults '(generic-font-lock-keywords nil t)))))
1959 "Generic mode for ASTAP circuit netlist files." 1923 "Generic mode for ASTAP circuit netlist files."))
1960 :group 'generic-x-modes))
1961 1924
1962(when (memq 'etc-modules-conf-generic-mode generic-extras-enable-list) 1925(when (memq 'etc-modules-conf-generic-mode generic-extras-enable-list)
1963 1926
@@ -2001,8 +1964,7 @@ like an INI file. You can add this hook to `find-file-hook'."
2001 ;; List of additional automode-alist expressions 1964 ;; List of additional automode-alist expressions
2002 '("/etc/modules.conf" "/etc/conf.modules") 1965 '("/etc/modules.conf" "/etc/conf.modules")
2003 ;; List of set up functions to call 1966 ;; List of set up functions to call
2004 nil 1967 nil))
2005 :group 'generic-x-modes))
2006 1968
2007(provide 'generic-x) 1969(provide 'generic-x)
2008 1970
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 9f3a114adbe..14450ee3a14 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,17 @@
12005-05-16 Katsumi Yamaoka <yamaoka@jpl.org>
2
3 * gnus-art.el: Don't autoload mail-extract-address-components.
4
5 * gnus.el: Use eval-and-compile to autoload message-y-or-n-p.
6
7 * nndb.el: Don't declare the nndb back end two or more times; don't
8 autoload news-reply-mode, news-setup, cancel-timer and telnet.
9
10 * nntp.el: Autoload format-spec instead of format; use
11 eval-and-compile to evaluate autoload forms.
12
13 * spam-report.el (spam-report-process-queue): Use gnus-point-at-eol.
14
12005-04-28 Katsumi Yamaoka <yamaoka@jpl.org> 152005-04-28 Katsumi Yamaoka <yamaoka@jpl.org>
2 16
3 * gnus-art.el (article-date-ut): Support converting date in 17 * gnus-art.el (article-date-ut): Support converting date in
@@ -345,9 +359,6 @@
345 359
346 * gnus-async.el: Ditto. 360 * gnus-async.el: Ditto.
347 361
348 * dgnushack.el: No need to ignore `run-with-idle-timer', XEmacs
349 has this function now.
350
3512005-03-16 Lute Kamstra <lute@gnu.org> 3622005-03-16 Lute Kamstra <lute@gnu.org>
352 363
353 * message.el (message-make-date): Require parse-time. 364 * message.el (message-make-date): Require parse-time.
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 55aaed15d90..b1a51d65edd 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -481,9 +481,6 @@ be fed to `format-time-string'."
481 :link '(custom-manual "(gnus)Article Date") 481 :link '(custom-manual "(gnus)Article Date")
482 :group 'gnus-article-washing) 482 :group 'gnus-article-washing)
483 483
484(eval-and-compile
485 (autoload 'mail-extract-address-components "mail-extr"))
486
487(defcustom gnus-save-all-headers t 484(defcustom gnus-save-all-headers t
488 "*If non-nil, don't remove any headers before saving." 485 "*If non-nil, don't remove any headers before saving."
489 :group 'gnus-article-saving 486 :group 'gnus-article-saving
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 3112a07cb2e..98c41de45e5 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -1,7 +1,7 @@
1;;; gnus.el --- a newsreader for GNU Emacs 1;;; gnus.el --- a newsreader for GNU Emacs
2 2
3;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, 1995, 1996, 1997, 3;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, 1995, 1996, 1997,
4;; 1998, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. 4;; 1998, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
5 5
6;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet> 6;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
7;; Lars Magne Ingebrigtsen <larsi@gnus.org> 7;; Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -34,7 +34,6 @@
34(require 'wid-edit) 34(require 'wid-edit)
35(require 'mm-util) 35(require 'mm-util)
36(require 'nnheader) 36(require 'nnheader)
37(autoload 'message-y-or-n-p "message" nil nil 'macro)
38 37
39(defgroup gnus nil 38(defgroup gnus nil
40 "The coffee-brewing, all singing, all dancing, kitchen sink newsreader." 39 "The coffee-brewing, all singing, all dancing, kitchen sink newsreader."
@@ -3925,6 +3924,9 @@ If NEWSGROUP is nil, return the global kill file name instead."
3925 (setq valids (cdr valids))) 3924 (setq valids (cdr valids)))
3926 outs)) 3925 outs))
3927 3926
3927(eval-and-compile
3928 (autoload 'message-y-or-n-p "message" nil nil 'macro))
3929
3928(defun gnus-read-group (prompt &optional default) 3930(defun gnus-read-group (prompt &optional default)
3929 "Prompt the user for a group name. 3931 "Prompt the user for a group name.
3930Disallow invalid group names." 3932Disallow invalid group names."
diff --git a/lisp/gnus/nndb.el b/lisp/gnus/nndb.el
index bd8523f11b2..6aaf57c81e1 100644
--- a/lisp/gnus/nndb.el
+++ b/lisp/gnus/nndb.el
@@ -1,6 +1,7 @@
1;;; nndb.el --- nndb access for Gnus 1;;; nndb.el --- nndb access for Gnus
2 2
3;; Copyright (C) 1997, 1998, 2000, 2003, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 1997, 1998, 2000, 2003, 2004, 2005
4;; Free Software Foundation, Inc.
4 5
5;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet> 6;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
6;; Kai Grossjohann <grossjohann@ls6.informatik.uni-dortmund.de> 7;; Kai Grossjohann <grossjohann@ls6.informatik.uni-dortmund.de>
@@ -50,7 +51,9 @@
50;;- 51;;-
51;; Register nndb with known select methods. 52;; Register nndb with known select methods.
52 53
53(gnus-declare-backend "nndb" 'mail 'respool 'address 'prompt-address) 54(require 'gnus-start)
55(unless (assoc "nndb" gnus-valid-select-methods)
56 (gnus-declare-backend "nndb" 'mail 'respool 'address 'prompt-address))
54 57
55;;; Code: 58;;; Code:
56 59
@@ -59,14 +62,6 @@
59(require 'nntp) 62(require 'nntp)
60(eval-when-compile (require 'cl)) 63(eval-when-compile (require 'cl))
61 64
62(eval-and-compile
63 (autoload 'news-setup "rnewspost")
64 (autoload 'news-reply-mode "rnewspost")
65 (autoload 'cancel-timer "timer")
66 (autoload 'telnet "telnet" nil t)
67 (autoload 'telnet-send-input "telnet" nil t)
68 (autoload 'gnus-declare-backend "gnus-start"))
69
70;; Declare nndb as derived from nntp 65;; Declare nndb as derived from nntp
71 66
72(nnoo-declare nndb nntp) 67(nnoo-declare nndb nntp)
diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el
index 8a10600fcb8..ab85ad25931 100644
--- a/lisp/gnus/nntp.el
+++ b/lisp/gnus/nntp.el
@@ -1,7 +1,8 @@
1;;; nntp.el --- nntp access for Gnus 1;;; nntp.el --- nntp access for Gnus
2 2
3;; Copyright (C) 1987, 1988, 1989, 1990, 1992, 1993, 1994, 1995, 1996, 3;; Copyright (C) 1987, 1988, 1989, 1990, 1992, 1993, 1994, 1995, 1996,
4;; 1997, 1998, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. 4;; 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005
5;; Free Software Foundation, Inc.
5 6
6;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> 7;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
7;; Keywords: news 8;; Keywords: news
@@ -1147,9 +1148,10 @@ password contained in '~/.nntp-authinfo'."
1147(defun nntp-open-network-stream (buffer) 1148(defun nntp-open-network-stream (buffer)
1148 (open-network-stream "nntpd" buffer nntp-address nntp-port-number)) 1149 (open-network-stream "nntpd" buffer nntp-address nntp-port-number))
1149 1150
1150(autoload 'format-spec "format") 1151(eval-and-compile
1151(autoload 'format-spec-make "format") 1152 (autoload 'format-spec "format-spec")
1152(autoload 'open-tls-stream "tls") 1153 (autoload 'format-spec-make "format-spec")
1154 (autoload 'open-tls-stream "tls"))
1153 1155
1154(defun nntp-open-ssl-stream (buffer) 1156(defun nntp-open-ssl-stream (buffer)
1155 (let* ((process-connection-type nil) 1157 (let* ((process-connection-type nil)
diff --git a/lisp/gnus/spam-report.el b/lisp/gnus/spam-report.el
index b8283ffaaa8..59119dc5438 100644
--- a/lisp/gnus/spam-report.el
+++ b/lisp/gnus/spam-report.el
@@ -159,7 +159,7 @@ symbol `ask', query before flushing the queue file."
159 (goto-char (point-min)) 159 (goto-char (point-min))
160 (while (and (not (eobp)) 160 (while (and (not (eobp))
161 (re-search-forward 161 (re-search-forward
162 "http://\\([^/]+\\)\\(/.*\\) *$" (point-at-eol) t)) 162 "http://\\([^/]+\\)\\(/.*\\) *$" (gnus-point-at-eol) t))
163 (funcall spam-report-url-ping-function (match-string 1) (match-string 2)) 163 (funcall spam-report-url-ping-function (match-string 1) (match-string 2))
164 (forward-line 1)) 164 (forward-line 1))
165 (if (or (eq keep nil) 165 (if (or (eq keep nil)
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 4bf0a4775a0..c11aaf6da76 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -535,7 +535,9 @@ it is displayed along with the global value."
535 (terpri) 535 (terpri)
536 (let ((from (point))) 536 (let ((from (point)))
537 (pp val) 537 (pp val)
538 (help-xref-on-pp from (point)) 538 ;; Hyperlinks in variable's value are quite frequently
539 ;; inappropriate e.g C-h v <RET> features <RET>
540 ;; (help-xref-on-pp from (point))
539 (if (< (point) (+ from 20)) 541 (if (< (point) (+ from 20))
540 (delete-region (1- from) from))))) 542 (delete-region (1- from) from)))))
541 (terpri) 543 (terpri)
@@ -556,7 +558,8 @@ it is displayed along with the global value."
556 ;; sensible size before prettyprinting. -- fx 558 ;; sensible size before prettyprinting. -- fx
557 (let ((from (point))) 559 (let ((from (point)))
558 (pp val) 560 (pp val)
559 (help-xref-on-pp from (point)) 561 ;; See previous comment for this function.
562 ;; (help-xref-on-pp from (point))
560 (if (< (point) (+ from 20)) 563 (if (< (point) (+ from 20))
561 (delete-region (1- from) from)))))) 564 (delete-region (1- from) from))))))
562 (terpri)) 565 (terpri))
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index 8b0284089fc..d94f03200dc 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -169,6 +169,18 @@ The format is (FUNCTION ARGS...).")
169 (goto-char (cdr location)))) 169 (goto-char (cdr location))))
170 'help-echo (purecopy"mouse-2, RET: find variable's definition")) 170 'help-echo (purecopy"mouse-2, RET: find variable's definition"))
171 171
172(define-button-type 'help-face-def
173 :supertype 'help-xref
174 'help-function (lambda (fun file)
175 (require 'find-func)
176 ;; Don't use find-function-noselect because it follows
177 ;; aliases (which fails for built-in functions).
178 (let ((location
179 (find-function-search-for-symbol fun 'defface file)))
180 (pop-to-buffer (car location))
181 (goto-char (cdr location))))
182 'help-echo (purecopy "mouse-2, RET: find face's definition"))
183
172 184
173;;;###autoload 185;;;###autoload
174(defun help-mode () 186(defun help-mode ()
diff --git a/lisp/hexl.el b/lisp/hexl.el
index 99bbda91c6c..35674e1d10a 100644
--- a/lisp/hexl.el
+++ b/lisp/hexl.el
@@ -874,7 +874,7 @@ Embedded whitespace, dashes, and periods in the string are ignored."
874(defun hexl-insert-decimal-char (arg) 874(defun hexl-insert-decimal-char (arg)
875 "Insert a character given by its decimal code ARG times at point." 875 "Insert a character given by its decimal code ARG times at point."
876 (interactive "p") 876 (interactive "p")
877 (let ((num (string-to-int (read-string "Decimal Number: ")))) 877 (let ((num (string-to-number (read-string "Decimal Number: "))))
878 (if (< num 0) 878 (if (< num 0)
879 (error "Decimal number out of range") 879 (error "Decimal number out of range")
880 (hexl-insert-multibyte-char num arg)))) 880 (hexl-insert-multibyte-char num arg))))
diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el
index e2e5d251371..87d9eb707eb 100644
--- a/lisp/ibuf-ext.el
+++ b/lisp/ibuf-ext.el
@@ -1024,7 +1024,9 @@ currently used by buffers."
1024 (ibuffer-awhen (with-current-buffer buf 1024 (ibuffer-awhen (with-current-buffer buf
1025 (or buffer-file-name 1025 (or buffer-file-name
1026 (and (boundp 'dired-directory) 1026 (and (boundp 'dired-directory)
1027 dired-directory 1027 (if (stringp dired-directory)
1028 dired-directory
1029 (car dired-directory))
1028 (expand-file-name dired-directory)))) 1030 (expand-file-name dired-directory))))
1029 (string-match qualifier it))) 1031 (string-match qualifier it)))
1030 1032
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index f2ebb5db324..213160b6f37 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -1688,7 +1688,9 @@ If point is on a group name, this function operates on that group."
1688 (abbreviate-file-name 1688 (abbreviate-file-name
1689 (or buffer-file-name 1689 (or buffer-file-name
1690 (and (boundp 'dired-directory) 1690 (and (boundp 'dired-directory)
1691 dired-directory) 1691 (if (stringp dired-directory)
1692 dired-directory
1693 (car dired-directory)))
1692 "")))) 1694 ""))))
1693 1695
1694(define-ibuffer-column filename-and-process 1696(define-ibuffer-column filename-and-process
diff --git a/lisp/ido.el b/lisp/ido.el
index 519d57cbb88..24b8ba34b75 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -1392,10 +1392,15 @@ This function also adds a hook to the minibuffer."
1392 (define-key map [left] 'ido-prev-match) 1392 (define-key map [left] 'ido-prev-match)
1393 (define-key map "?" 'ido-completion-help) 1393 (define-key map "?" 'ido-completion-help)
1394 1394
1395 ;; Magic commands.
1396 (define-key map "\C-b" 'ido-magic-backward-char)
1397 (define-key map "\C-f" 'ido-magic-forward-char)
1398 (define-key map "\C-d" 'ido-magic-delete-char)
1399
1395 (when (memq ido-cur-item '(file dir)) 1400 (when (memq ido-cur-item '(file dir))
1396 (define-key map "\C-b" (or ido-context-switch-command 'ido-enter-switch-buffer)) 1401 (define-key map "\C-x\C-b" (or ido-context-switch-command 'ido-enter-switch-buffer))
1397 (define-key map "\C-d" (or (and ido-context-switch-command 'ignore) 'ido-enter-dired)) 1402 (define-key map "\C-x\C-f" 'ido-fallback-command)
1398 (define-key map "\C-f" 'ido-fallback-command) 1403 (define-key map "\C-x\C-d" (or (and ido-context-switch-command 'ignore) 'ido-enter-dired))
1399 (define-key map [down] 'ido-next-match-dir) 1404 (define-key map [down] 'ido-next-match-dir)
1400 (define-key map [up] 'ido-prev-match-dir) 1405 (define-key map [up] 'ido-prev-match-dir)
1401 (define-key map [(meta up)] 'ido-prev-work-directory) 1406 (define-key map [(meta up)] 'ido-prev-work-directory)
@@ -1405,7 +1410,7 @@ This function also adds a hook to the minibuffer."
1405 (define-key map [(meta backspace)] 'ido-delete-backward-word-updir) 1410 (define-key map [(meta backspace)] 'ido-delete-backward-word-updir)
1406 (define-key map [(control backspace)] 'ido-up-directory) 1411 (define-key map [(control backspace)] 'ido-up-directory)
1407 (define-key map "\C-l" 'ido-reread-directory) 1412 (define-key map "\C-l" 'ido-reread-directory)
1408 (define-key map [(meta ?d)] 'ido-wide-find-dir) 1413 (define-key map [(meta ?d)] 'ido-wide-find-dir-or-delete-dir)
1409 (define-key map [(meta ?b)] 'ido-push-dir) 1414 (define-key map [(meta ?b)] 'ido-push-dir)
1410 (define-key map [(meta ?f)] 'ido-wide-find-file-or-pop-dir) 1415 (define-key map [(meta ?f)] 'ido-wide-find-file-or-pop-dir)
1411 (define-key map [(meta ?k)] 'ido-forget-work-directory) 1416 (define-key map [(meta ?k)] 'ido-forget-work-directory)
@@ -1426,8 +1431,8 @@ This function also adds a hook to the minibuffer."
1426 ) 1431 )
1427 1432
1428 (when (eq ido-cur-item 'buffer) 1433 (when (eq ido-cur-item 'buffer)
1429 (define-key map "\C-f" (or ido-context-switch-command 'ido-enter-find-file)) 1434 (define-key map "\C-x\C-f" (or ido-context-switch-command 'ido-enter-find-file))
1430 (define-key map "\C-b" 'ido-fallback-command) 1435 (define-key map "\C-x\C-b" 'ido-fallback-command)
1431 (define-key map "\C-k" 'ido-kill-buffer-at-head) 1436 (define-key map "\C-k" 'ido-kill-buffer-at-head)
1432 ) 1437 )
1433 1438
@@ -2258,6 +2263,62 @@ If no merge has yet taken place, toggle automatic merging option."
2258 ((not ido-use-merged-list) 2263 ((not ido-use-merged-list)
2259 (ido-merge-work-directories)))) 2264 (ido-merge-work-directories))))
2260 2265
2266;;; Magic C-f
2267
2268(defun ido-magic-forward-char ()
2269 "Move forward in user input or perform magic action.
2270If no user input is present or at end of input, perform magic actions:
2271C-x C-b ... C-f switch to ido-find-file.
2272C-x C-f ... C-f fallback to non-ido find-file.
2273C-x C-d ... C-f fallback to non-ido brief dired.
2274C-x d ... C-f fallback to non-ido dired."
2275 (interactive)
2276 (cond
2277 ((not (eobp))
2278 (forward-char 1))
2279 ((memq ido-cur-item '(file dir))
2280 (ido-fallback-command))
2281 (ido-context-switch-command
2282 (call-interactively ido-context-switch-command))
2283 ((eq ido-cur-item 'buffer)
2284 (ido-enter-find-file))))
2285
2286;;; Magic C-b
2287
2288(defun ido-magic-backward-char ()
2289 "Move backward in user input or perform magic action.
2290If no user input is present, or at start of input, perform magic actions:
2291C-x C-f C-b switch to ido-switch-buffer.
2292C-x C-d C-b switch to ido-switch-buffer.
2293C-x d C-b switch to ido-switch-buffer.
2294C-x C-b C-b fallback to non-ido switch-to-buffer."
2295 (interactive)
2296 (cond
2297 ((> (point) (minibuffer-prompt-end))
2298 (forward-char -1))
2299 ((eq ido-cur-item 'buffer)
2300 (ido-fallback-command))
2301 (ido-context-switch-command
2302 (call-interactively ido-context-switch-command))
2303 (t
2304 (ido-enter-switch-buffer))))
2305
2306;;; Magic C-d
2307
2308(defun ido-magic-delete-char ()
2309 "Delete following char in user input or perform magic action.
2310If at end of user input, perform magic actions:
2311C-x C-f ... C-d enter dired on current directory."
2312 (interactive)
2313 (cond
2314 ((not (eobp))
2315 (delete-char 1))
2316 (ido-context-switch-command
2317 nil)
2318 ((memq ido-cur-item '(file dir))
2319 (ido-enter-dired))))
2320
2321
2261;;; TOGGLE FUNCTIONS 2322;;; TOGGLE FUNCTIONS
2262 2323
2263(defun ido-toggle-case () 2324(defun ido-toggle-case ()
@@ -2505,6 +2566,14 @@ If no buffer or file exactly matching the prompt exists, maybe create a new one.
2505 (setq ido-rotate-temp t) 2566 (setq ido-rotate-temp t)
2506 (exit-minibuffer))) 2567 (exit-minibuffer)))
2507 2568
2569(defun ido-wide-find-dir-or-delete-dir (&optional dir)
2570 "Prompt for DIR to search for using find, starting from current directory.
2571If input stack is non-empty, delete current directory component."
2572 (interactive)
2573 (if ido-input-stack
2574 (ido-delete-backward-word-updir 1)
2575 (ido-wide-find-dir)))
2576
2508(defun ido-push-dir () 2577(defun ido-push-dir ()
2509 "Move to previous directory in file name, push current input on stack." 2578 "Move to previous directory in file name, push current input on stack."
2510 (interactive) 2579 (interactive)
@@ -4077,6 +4146,7 @@ For details of keybindings, do `\\[describe-function] ido-find-file'."
4077;;; Helper functions for other programs 4146;;; Helper functions for other programs
4078 4147
4079(put 'dired-do-rename 'ido 'ignore) 4148(put 'dired-do-rename 'ido 'ignore)
4149(put 'ibuffer-find-file 'ido 'find-file)
4080 4150
4081;;;###autoload 4151;;;###autoload
4082(defun ido-read-buffer (prompt &optional default require-match) 4152(defun ido-read-buffer (prompt &optional default require-match)
@@ -4111,7 +4181,8 @@ See `read-file-name' for additional parameters."
4111 (not (memq this-command ido-read-file-name-non-ido)) 4181 (not (memq this-command ido-read-file-name-non-ido))
4112 (or (null predicate) (eq predicate 'file-exists-p))) 4182 (or (null predicate) (eq predicate 'file-exists-p)))
4113 (let* (ido-saved-vc-hb 4183 (let* (ido-saved-vc-hb
4114 (ido-context-switch-command 'ignore) 4184 (ido-context-switch-command
4185 (if (eq (get this-command 'ido) 'find-file) nil 'ignore))
4115 (vc-handled-backends (and (boundp 'vc-handled-backends) vc-handled-backends)) 4186 (vc-handled-backends (and (boundp 'vc-handled-backends) vc-handled-backends))
4116 (ido-current-directory (ido-expand-directory dir)) 4187 (ido-current-directory (ido-expand-directory dir))
4117 (ido-directory-nonreadable (not (file-readable-p ido-current-directory))) 4188 (ido-directory-nonreadable (not (file-readable-p ido-current-directory)))
@@ -4126,6 +4197,8 @@ See `read-file-name' for additional parameters."
4126 (cond 4197 (cond
4127 ((eq ido-exit 'fallback) 4198 ((eq ido-exit 'fallback)
4128 (setq filename 'fallback)) 4199 (setq filename 'fallback))
4200 ((eq ido-exit 'dired)
4201 (setq filename ido-current-directory))
4129 (filename 4202 (filename
4130 (setq filename 4203 (setq filename
4131 (concat ido-current-directory filename)))))) 4204 (concat ido-current-directory filename))))))
diff --git a/lisp/imenu.el b/lisp/imenu.el
index 831550bd7a3..92e00282ea0 100644
--- a/lisp/imenu.el
+++ b/lisp/imenu.el
@@ -119,7 +119,8 @@ If t, always use a popup menu,
119If `on-mouse' use a popup menu when `imenu' was invoked with the mouse." 119If `on-mouse' use a popup menu when `imenu' was invoked with the mouse."
120 :type '(choice (const :tag "On Mouse" on-mouse) 120 :type '(choice (const :tag "On Mouse" on-mouse)
121 (const :tag "Never" nil) 121 (const :tag "Never" nil)
122 (other :tag "Always" t))) 122 (other :tag "Always" t))
123 :group 'imenu)
123 124
124(defcustom imenu-eager-completion-buffer 125(defcustom imenu-eager-completion-buffer
125 (not (eq imenu-always-use-completion-buffer-p 'never)) 126 (not (eq imenu-always-use-completion-buffer-p 'never))
diff --git a/lisp/international/ccl.el b/lisp/international/ccl.el
index bb717ec32ae..c445d7d40e1 100644
--- a/lisp/international/ccl.el
+++ b/lisp/international/ccl.el
@@ -1,8 +1,9 @@
1;;; ccl.el --- CCL (Code Conversion Language) compiler 1;;; ccl.el --- CCL (Code Conversion Language) compiler
2 2
3;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1997, 1998, 2001, 2002 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1995, 1998, 1999, 2000
5;; Copyright (C) 2002 Free Software Foundation, Inc. 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
6 7
7;; Keywords: CCL, mule, multilingual, character set, coding-system 8;; Keywords: CCL, mule, multilingual, character set, coding-system
8 9
diff --git a/lisp/international/characters.el b/lisp/international/characters.el
index a8eeb2e4859..1bab1bcff33 100644
--- a/lisp/international/characters.el
+++ b/lisp/international/characters.el
@@ -1,8 +1,10 @@
1;;; characters.el --- set syntax and category for multibyte characters 1;;; characters.el --- set syntax and category for multibyte characters
2 2
3;; Copyright (C) 1995, 1997 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1997, 2000, 2001, 2002, 2003, 2004
4;; Licensed to the Free Software Foundation. 4;; Free Software Foundation, Inc.
5;; Copyright (C) 2001, 2002 Free Software Foundation, Inc. 5;; Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
6;; National Institute of Advanced Industrial Science and Technology (AIST)
7;; Registration Number H14PRO021
6;; Copyright (C) 2003 8;; Copyright (C) 2003
7;; National Institute of Advanced Industrial Science and Technology (AIST) 9;; National Institute of Advanced Industrial Science and Technology (AIST)
8;; Registration Number H13PRO009 10;; Registration Number H13PRO009
diff --git a/lisp/international/codepage.el b/lisp/international/codepage.el
index b9c819b7524..7571ccf986f 100644
--- a/lisp/international/codepage.el
+++ b/lisp/international/codepage.el
@@ -1,6 +1,9 @@
1;;; codepage.el --- MS-DOS/MS-Windows specific coding systems 1;;; codepage.el --- MS-DOS/MS-Windows specific coding systems
2 2
3;; Copyright (C) 1998, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1998, 1999, 2000, 2002, 2005 Free Software Foundation, Inc.
4;; Copyright (C) 2000
5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
4 7
5;; Author: Eli Zaretskii 8;; Author: Eli Zaretskii
6;; Maintainer: FSF 9;; Maintainer: FSF
diff --git a/lisp/international/encoded-kb.el b/lisp/international/encoded-kb.el
index f016f1b9038..2354e658282 100644
--- a/lisp/international/encoded-kb.el
+++ b/lisp/international/encoded-kb.el
@@ -1,8 +1,9 @@
1;;; encoded-kb.el --- handler to input multibyte characters encoded somehow 1;;; encoded-kb.el --- handler to input multibyte characters encoded somehow
2 2
3;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1997 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2004, 2005
5;; Copyright (C) 2002 Free Software Foundation, Inc. 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
6;; Copyright (C) 2003 7;; Copyright (C) 2003
7;; National Institute of Advanced Industrial Science and Technology (AIST) 8;; National Institute of Advanced Industrial Science and Technology (AIST)
8;; Registration Number H13PRO009 9;; Registration Number H13PRO009
diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el
index 2831db2b026..ee8e08c3956 100644
--- a/lisp/international/fontset.el
+++ b/lisp/international/fontset.el
@@ -1,8 +1,9 @@
1;;; fontset.el --- commands for handling fontset 1;;; fontset.el --- commands for handling fontset
2 2
3;; Copyright (C) 1995, 1997 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003
5;; Copyright (C) 2001 Free Software Foundation, Inc. 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
6;; Copyright (C) 2003 7;; Copyright (C) 2003
7;; National Institute of Advanced Industrial Science and Technology (AIST) 8;; National Institute of Advanced Industrial Science and Technology (AIST)
8;; Registration Number H13PRO009 9;; Registration Number H13PRO009
diff --git a/lisp/international/isearch-x.el b/lisp/international/isearch-x.el
index aad6b6e745e..31691268c9c 100644
--- a/lisp/international/isearch-x.el
+++ b/lisp/international/isearch-x.el
@@ -1,8 +1,9 @@
1;;; isearch-x.el --- extended isearch handling commands 1;;; isearch-x.el --- extended isearch handling commands
2 2
3;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1997, 2001, 2004 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1995, 1997, 1998, 2000
5;; Copyright (C) 2001 Free Software Foundation, Inc. 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
6 7
7;; Keywords: multilingual, isearch 8;; Keywords: multilingual, isearch
8 9
diff --git a/lisp/international/iso-ascii.el b/lisp/international/iso-ascii.el
index 3bffb1795f0..0dbb4e4093a 100644
--- a/lisp/international/iso-ascii.el
+++ b/lisp/international/iso-ascii.el
@@ -1,6 +1,6 @@
1;;; iso-ascii.el --- set up char tables for ISO 8859/1 on ASCII terminals 1;;; iso-ascii.el --- set up char tables for ISO 8859/1 on ASCII terminals
2 2
3;; Copyright (C) 1987, 1995 Free Software Foundation, Inc. 3;; Copyright (C) 1987, 1995, 1998, 2003 Free Software Foundation, Inc.
4 4
5;; Author: Howard Gayle 5;; Author: Howard Gayle
6;; Maintainer: FSF 6;; Maintainer: FSF
diff --git a/lisp/international/iso-cvt.el b/lisp/international/iso-cvt.el
index 232fe5037ee..f7e325b0ca3 100644
--- a/lisp/international/iso-cvt.el
+++ b/lisp/international/iso-cvt.el
@@ -1,8 +1,8 @@
1;;; iso-cvt.el --- translate ISO 8859-1 from/to various encodings -*- coding: iso-latin-1 -*- 1;;; iso-cvt.el --- translate ISO 8859-1 from/to various encodings -*- coding: iso-latin-1 -*-
2;; This file was formerly called gm-lingo.el. 2;; This file was formerly called gm-lingo.el.
3 3
4;; Copyright (C) 1993, 1994, 1995, 1996, 1998, 2000, 2003, 2004 4;; Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2003, 2004
5;; Free Software Foundation, Inc. 5;; Free Software Foundation, Inc.
6 6
7;; Author: Michael Gschwind <mike@vlsivie.tuwien.ac.at> 7;; Author: Michael Gschwind <mike@vlsivie.tuwien.ac.at>
8;; Keywords: tex, iso, latin, i18n 8;; Keywords: tex, iso, latin, i18n
diff --git a/lisp/international/iso-transl.el b/lisp/international/iso-transl.el
index a071b14b3d2..e0aa17b4916 100644
--- a/lisp/international/iso-transl.el
+++ b/lisp/international/iso-transl.el
@@ -1,6 +1,7 @@
1;;; iso-transl.el --- keyboard input definitions for ISO 8859-1 -*- coding: iso-8859-1 -*- 1;;; iso-transl.el --- keyboard input definitions for ISO 8859-1 -*- coding: iso-8859-1 -*-
2 2
3;; Copyright (C) 1987, 1993, 1994, 1995, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001
4;; Free Software Foundation, Inc.
4 5
5;; Author: Howard Gayle 6;; Author: Howard Gayle
6;; Maintainer: FSF 7;; Maintainer: FSF
diff --git a/lisp/international/ja-dic-cnv.el b/lisp/international/ja-dic-cnv.el
index 682a2a8f2b5..f145c602ffe 100644
--- a/lisp/international/ja-dic-cnv.el
+++ b/lisp/international/ja-dic-cnv.el
@@ -1,7 +1,8 @@
1;;; ja-dic-cnv.el --- convert a Japanese dictionary (SKK-JISYO.L) to Emacs Lisp 1;;; ja-dic-cnv.el --- convert a Japanese dictionary (SKK-JISYO.L) to Emacs Lisp
2 2
3;; Copyright (C) 1995, 2000 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1995, 2000
4;; Licensed to the Free Software Foundation. 4;; National Institute of Advanced Industrial Science and Technology (AIST)
5;; Registration Number H14PRO021
5 6
6;; Keywords: mule, multilingual, Japanese 7;; Keywords: mule, multilingual, Japanese
7 8
diff --git a/lisp/international/ja-dic-utl.el b/lisp/international/ja-dic-utl.el
index 07d9e1ff760..ba00977832a 100644
--- a/lisp/international/ja-dic-utl.el
+++ b/lisp/international/ja-dic-utl.el
@@ -1,7 +1,8 @@
1;;; ja-dic-utl.el --- utilities for handling Japanese dictionary (SKK-JISYO.L) 1;;; ja-dic-utl.el --- utilities for handling Japanese dictionary (SKK-JISYO.L)
2 2
3;; Copyright (C) 1995, 2000 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1995, 2000
4;; Licensed to the Free Software Foundation. 4;; National Institute of Advanced Industrial Science and Technology (AIST)
5;; Registration Number H14PRO021
5 6
6;; Keywords: mule, multilingual, Japanese 7;; Keywords: mule, multilingual, Japanese
7 8
diff --git a/lisp/international/kinsoku.el b/lisp/international/kinsoku.el
index 28d6409d46b..76ec5ded397 100644
--- a/lisp/international/kinsoku.el
+++ b/lisp/international/kinsoku.el
@@ -1,7 +1,9 @@
1;;; kinsoku.el --- `Kinsoku' processing funcs -*- coding: iso-2022-7bit; -*- 1;;; kinsoku.el --- `Kinsoku' processing funcs -*- coding: iso-2022-7bit; -*-
2 2
3;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1997, 2003 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1995, 1997, 1998
5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
5 7
6;; Keywords: mule, kinsoku 8;; Keywords: mule, kinsoku
7 9
diff --git a/lisp/international/kkc.el b/lisp/international/kkc.el
index 972bbbfdddf..be8d242c63e 100644
--- a/lisp/international/kkc.el
+++ b/lisp/international/kkc.el
@@ -1,7 +1,9 @@
1;;; kkc.el --- Kana Kanji converter -*- coding: iso-2022-7bit; -*- 1;;; kkc.el --- Kana Kanji converter -*- coding: iso-2022-7bit; -*-
2 2
3;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1997, 1998 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1995, 1997, 1998, 2000, 2001, 2003
5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
5 7
6;; Keywords: mule, multilingual, Japanese 8;; Keywords: mule, multilingual, Japanese
7 9
diff --git a/lisp/international/latexenc.el b/lisp/international/latexenc.el
index 39acbb33dfd..88da8ffed79 100644
--- a/lisp/international/latexenc.el
+++ b/lisp/international/latexenc.el
@@ -173,6 +173,7 @@ coding system names is determined from `latex-inputenc-coding-alist'."
173 'undecided)))) 173 'undecided))))
174 'undecided)) 174 'undecided))
175 175
176
176(provide 'latexenc) 177(provide 'latexenc)
177 178
178;; arch-tag: f971bc3e-1fec-4609-8f2f-73dd41ab22e1 179;; arch-tag: f971bc3e-1fec-4609-8f2f-73dd41ab22e1
diff --git a/lisp/international/latin1-disp.el b/lisp/international/latin1-disp.el
index 86f5bf7a726..12b0c22b7ab 100644
--- a/lisp/international/latin1-disp.el
+++ b/lisp/international/latin1-disp.el
@@ -1,6 +1,6 @@
1;;; latin1-disp.el --- display tables for other ISO 8859 on Latin-1 terminals -*-coding: iso-2022-7bit;-*- 1;;; latin1-disp.el --- display tables for other ISO 8859 on Latin-1 terminals -*-coding: iso-2022-7bit;-*-
2 2
3;; Copyright (C) 2000, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
4 4
5;; Author: Dave Love <fx@gnu.org> 5;; Author: Dave Love <fx@gnu.org>
6;; Keywords: i18n 6;; Keywords: i18n
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 8a2c8da2665..daab87259a3 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -1,8 +1,10 @@
1;;; mule-cmds.el --- commands for mulitilingual environment -*-coding: iso-2022-7bit -*- 1;;; mule-cmds.el --- commands for mulitilingual environment -*-coding: iso-2022-7bit -*-
2 2
3;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
4;; Copyright (C) 1995, 2003 Electrotechnical Laboratory, JAPAN. 4;; Free Software Foundation, Inc.
5;; Licensed to the Free Software Foundation. 5;; Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
6;; National Institute of Advanced Industrial Science and Technology (AIST)
7;; Registration Number H14PRO021
6;; Copyright (C) 2003 8;; Copyright (C) 2003
7;; National Institute of Advanced Industrial Science and Technology (AIST) 9;; National Institute of Advanced Industrial Science and Technology (AIST)
8;; Registration Number H13PRO009 10;; Registration Number H13PRO009
diff --git a/lisp/international/mule-conf.el b/lisp/international/mule-conf.el
index 79bf4f3432a..0fb5d93af65 100644
--- a/lisp/international/mule-conf.el
+++ b/lisp/international/mule-conf.el
@@ -1,8 +1,10 @@
1;;; mule-conf.el --- configure multilingual environment 1;;; mule-conf.el --- configure multilingual environment
2 2
3;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2005
4;; Licensed to the Free Software Foundation. 4;; Free Software Foundation, Inc.
5;; Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. 5;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003
6;; National Institute of Advanced Industrial Science and Technology (AIST)
7;; Registration Number H14PRO021
6;; Copyright (C) 2003 8;; Copyright (C) 2003
7;; National Institute of Advanced Industrial Science and Technology (AIST) 9;; National Institute of Advanced Industrial Science and Technology (AIST)
8;; Registration Number H13PRO009 10;; Registration Number H13PRO009
diff --git a/lisp/international/mule-diag.el b/lisp/international/mule-diag.el
index a4423a67181..c79eb158695 100644
--- a/lisp/international/mule-diag.el
+++ b/lisp/international/mule-diag.el
@@ -1,8 +1,10 @@
1;;; mule-diag.el --- show diagnosis of multilingual environment (Mule) 1;;; mule-diag.el --- show diagnosis of multilingual environment (Mule)
2 2
3;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003
4;; Licensed to the Free Software Foundation. 4;; Free Software Foundation, Inc.
5;; Copyright (C) 2001, 2002 Free Software Foundation, Inc. 5;; Copyright (C) 1995, 1997, 1999, 2000, 2001, 2002, 2003
6;; National Institute of Advanced Industrial Science and Technology (AIST)
7;; Registration Number H14PRO021
6;; Copyright (C) 2003 8;; Copyright (C) 2003
7;; National Institute of Advanced Industrial Science and Technology (AIST) 9;; National Institute of Advanced Industrial Science and Technology (AIST)
8;; Registration Number H13PRO009 10;; Registration Number H13PRO009
diff --git a/lisp/international/mule-util.el b/lisp/international/mule-util.el
index b85d98a1787..236a34b84ab 100644
--- a/lisp/international/mule-util.el
+++ b/lisp/international/mule-util.el
@@ -1,8 +1,10 @@
1;;; mule-util.el --- utility functions for mulitilingual environment (mule) 1;;; mule-util.el --- utility functions for mulitilingual environment (mule)
2 2
3;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004
4;; Licensed to the Free Software Foundation. 4;; Free Software Foundation, Inc.
5;; Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc. 5;; Copyright (C) 1995, 1997, 1998, 1999, 2004
6;; National Institute of Advanced Industrial Science and Technology (AIST)
7;; Registration Number H14PRO021
6;; Copyright (C) 2003 8;; Copyright (C) 2003
7;; National Institute of Advanced Industrial Science and Technology (AIST) 9;; National Institute of Advanced Industrial Science and Technology (AIST)
8;; Registration Number H13PRO009 10;; Registration Number H13PRO009
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index cc7f41706d9..a583498e8b2 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -1,8 +1,10 @@
1;;; mule.el --- basic commands for multilingual environment 1;;; mule.el --- basic commands for multilingual environment
2 2
3;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
4;; Licensed to the Free Software Foundation. 4;; Free Software Foundation, Inc.
5;; Copyright (C) 2001, 2002 Free Software Foundation, Inc. 5;; Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
6;; National Institute of Advanced Industrial Science and Technology (AIST)
7;; Registration Number H14PRO021
6;; Copyright (C) 2003 8;; Copyright (C) 2003
7;; National Institute of Advanced Industrial Science and Technology (AIST) 9;; National Institute of Advanced Industrial Science and Technology (AIST)
8;; Registration Number H13PRO009 10;; Registration Number H13PRO009
diff --git a/lisp/international/ogonek.el b/lisp/international/ogonek.el
index ebe2eaec900..112bc22cfc6 100644
--- a/lisp/international/ogonek.el
+++ b/lisp/international/ogonek.el
@@ -1,6 +1,6 @@
1;;; ogonek.el --- change the encoding of Polish diacritics 1;;; ogonek.el --- change the encoding of Polish diacritics
2 2
3;; Copyright (C) 1997 Free Software Foundation, Inc. 3;; Copyright (C) 1997, 1998, 2001 Free Software Foundation, Inc.
4 4
5;; Author: W{\l}odek Bzyl, Ryszard Kubiak 5;; Author: W{\l}odek Bzyl, Ryszard Kubiak
6;; Maintainer: rysiek@ipipan.gda.pl (Ryszard Kubiak) 6;; Maintainer: rysiek@ipipan.gda.pl (Ryszard Kubiak)
@@ -166,7 +166,7 @@ znak/ow diakrytycznych. Funkcje te mo/zna pogrupowa/c nast/epuj/aco.
166 (set-buffer (get-buffer-create " *ogonek-jak*")) 166 (set-buffer (get-buffer-create " *ogonek-jak*"))
167 (insert ogonek-informacja) 167 (insert ogonek-informacja)
168 (switch-to-buffer " *ogonek-jak*") 168 (switch-to-buffer " *ogonek-jak*")
169 (beginning-of-buffer)) 169 (goto-char (point-min)))
170 170
171;; ------ A Little Info in English -------- 171;; ------ A Little Info in English --------
172 172
@@ -264,7 +264,7 @@ The functions come in the following groups.
264 (set-buffer (get-buffer-create " *ogonek-how*")) 264 (set-buffer (get-buffer-create " *ogonek-how*"))
265 (insert ogonek-information) 265 (insert ogonek-information)
266 (switch-to-buffer " *ogonek-how*") 266 (switch-to-buffer " *ogonek-how*")
267 (beginning-of-buffer)) 267 (goto-char (point-min)))
268 268
269;; ---- Variables keeping the suggested answers to dialogue questions ----- 269;; ---- Variables keeping the suggested answers to dialogue questions -----
270(defvar ogonek-encoding-choices 270(defvar ogonek-encoding-choices
diff --git a/lisp/international/quail.el b/lisp/international/quail.el
index 7594923a7e9..01ec42109de 100644
--- a/lisp/international/quail.el
+++ b/lisp/international/quail.el
@@ -1,9 +1,7 @@
1;;; quail.el --- provides simple input method for multilingual text 1;;; quail.el --- provides simple input method for multilingual text
2 2
3;; Copyright (C) 1995, 2000 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2003, 2004
5;; Copyright (C) 2001, 2002 Free Software Foundation, Inc.
6;; Copyright (C) 2005
7;; National Institute of Advanced Industrial Science and Technology (AIST) 5;; National Institute of Advanced Industrial Science and Technology (AIST)
8;; Registration Number H14PRO021 6;; Registration Number H14PRO021
9 7
diff --git a/lisp/international/swedish.el b/lisp/international/swedish.el
index b13a5e685b9..bf9fce5de65 100644
--- a/lisp/international/swedish.el
+++ b/lisp/international/swedish.el
@@ -1,6 +1,6 @@
1;;; swedish.el --- miscellaneous functions for dealing with Swedish 1;;; swedish.el --- miscellaneous functions for dealing with Swedish
2 2
3;; Copyright (C) 1988 Free Software Foundation, Inc. 3;; Copyright (C) 1988, 2001 Free Software Foundation, Inc.
4 4
5;; Author: Howard Gayle 5;; Author: Howard Gayle
6;; Maintainer: FSF 6;; Maintainer: FSF
diff --git a/lisp/international/titdic-cnv.el b/lisp/international/titdic-cnv.el
index e5772fdec00..46262938c68 100644
--- a/lisp/international/titdic-cnv.el
+++ b/lisp/international/titdic-cnv.el
@@ -1,7 +1,9 @@
1;;; titdic-cnv.el --- convert cxterm dictionary (TIT format) to Quail package -*- coding:iso-2022-7bit; -*- 1;;; titdic-cnv.el --- convert cxterm dictionary (TIT format) to Quail package -*- coding:iso-2022-7bit; -*-
2 2
3;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1995, 1997, 1998, 2000, 2001, 2002
5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
5;; Copyright (C) 2003 7;; Copyright (C) 2003
6;; National Institute of Advanced Industrial Science and Technology (AIST) 8;; National Institute of Advanced Industrial Science and Technology (AIST)
7;; Registration Number H13PRO009 9;; Registration Number H13PRO009
diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el
index 100eb6076db..b34e26f74d4 100644
--- a/lisp/jit-lock.el
+++ b/lisp/jit-lock.el
@@ -137,8 +137,9 @@ The value of this variable is used when JIT Lock mode is turned on."
137 137
138(defcustom jit-lock-context-time 0.5 138(defcustom jit-lock-context-time 0.5
139 "Idle time after which text is contextually refontified, if applicable." 139 "Idle time after which text is contextually refontified, if applicable."
140 :type '(number :tag "seconds")) 140 :type '(number :tag "seconds")
141 141 :group 'jit-lock)
142
142(defcustom jit-lock-defer-time nil ;; 0.25 143(defcustom jit-lock-defer-time nil ;; 0.25
143 "Idle time after which deferred fontification should take place. 144 "Idle time after which deferred fontification should take place.
144If nil, fontification is not deferred." 145If nil, fontification is not deferred."
diff --git a/lisp/language/china-util.el b/lisp/language/china-util.el
index d97ec4108bf..84f46c4bf2c 100644
--- a/lisp/language/china-util.el
+++ b/lisp/language/china-util.el
@@ -1,8 +1,10 @@
1;;; china-util.el --- utilities for Chinese -*- coding: iso-2022-7bit -*- 1;;; china-util.el --- utilities for Chinese -*- coding: iso-2022-7bit -*-
2 2
3;; Copyright (C) 1995, 2003 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1995, 2001, 2003
4;; Licensed to the Free Software Foundation. 4;; Free Software Foundation, Inc.
5;; Copyright (C) 1995, 2001 Free Software Foundation, Inc. 5;; Copyright (C) 1995, 1997, 2003
6;; National Institute of Advanced Industrial Science and Technology (AIST)
7;; Registration Number H14PRO021
6;; Copyright (C) 2003 8;; Copyright (C) 2003
7;; National Institute of Advanced Industrial Science and Technology (AIST) 9;; National Institute of Advanced Industrial Science and Technology (AIST)
8;; Registration Number H13PRO009 10;; Registration Number H13PRO009
diff --git a/lisp/language/chinese.el b/lisp/language/chinese.el
index 93721b59afa..05b2405dc42 100644
--- a/lisp/language/chinese.el
+++ b/lisp/language/chinese.el
@@ -1,7 +1,9 @@
1;;; chinese.el --- support for Chinese -*- coding: iso-2022-7bit; -*- 1;;; chinese.el --- support for Chinese -*- coding: iso-2022-7bit; -*-
2 2
3;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 2001, 2003 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1995, 1997, 1998
5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
5;; Copyright (C) 2003 7;; Copyright (C) 2003
6;; National Institute of Advanced Industrial Science and Technology (AIST) 8;; National Institute of Advanced Industrial Science and Technology (AIST)
7;; Registration Number H13PRO009 9;; Registration Number H13PRO009
diff --git a/lisp/language/cyril-util.el b/lisp/language/cyril-util.el
index 1a5c435328d..eb19ca1aaa2 100644
--- a/lisp/language/cyril-util.el
+++ b/lisp/language/cyril-util.el
@@ -1,6 +1,6 @@
1;;; cyril-util.el --- utilities for Cyrillic scripts 1;;; cyril-util.el --- utilities for Cyrillic scripts
2 2
3;; Copyright (C) 1997, 2001, 2002 Free Software Foundation, Inc. 3;; Copyright (C) 1997, 1998, 2001, 2002 Free Software Foundation, Inc.
4 4
5;; Keywords: mule, multilingual, Cyrillic 5;; Keywords: mule, multilingual, Cyrillic
6 6
diff --git a/lisp/language/cyrillic.el b/lisp/language/cyrillic.el
index b158f626d51..c3a0bceb688 100644
--- a/lisp/language/cyrillic.el
+++ b/lisp/language/cyrillic.el
@@ -1,8 +1,9 @@
1;;; cyrillic.el --- support for Cyrillic -*- coding: iso-2022-7bit; -*- 1;;; cyrillic.el --- support for Cyrillic -*- coding: iso-2022-7bit; -*-
2 2
3;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1997, 1998, 2001, 2002, 2003 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1995, 1997, 1998, 1999, 2000, 2002, 2003, 2004
5;; Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
6;; Copyright (C) 2003 7;; Copyright (C) 2003
7;; National Institute of Advanced Industrial Science and Technology (AIST) 8;; National Institute of Advanced Industrial Science and Technology (AIST)
8;; Registration Number H13PRO009 9;; Registration Number H13PRO009
diff --git a/lisp/language/devan-util.el b/lisp/language/devan-util.el
index 64dbf576af3..ba40b32db8f 100644
--- a/lisp/language/devan-util.el
+++ b/lisp/language/devan-util.el
@@ -1,6 +1,10 @@
1;;; devan-util.el --- Support for composing Devanagari characters -*-coding: iso-2022-7bit;-*- 1;;; devan-util.el --- Support for composing Devanagari characters -*-coding: iso-2022-7bit;-*-
2 2
3;; Copyright (C) 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1997, 1998, 2001, 2002, 2003
4;; Free Software Foundation, Inc.
5;; Copyright (C) 1997, 1998, 1999, 2000
6;; National Institute of Advanced Industrial Science and Technology (AIST)
7;; Registration Number H14PRO021
4 8
5;; Maintainer: KAWABATA, Taichi <kawabata@m17n.org> 9;; Maintainer: KAWABATA, Taichi <kawabata@m17n.org>
6;; Keywords: multilingual, Devanagari 10;; Keywords: multilingual, Devanagari
diff --git a/lisp/language/devanagari.el b/lisp/language/devanagari.el
index 6b1ff46a0af..086368c15a0 100644
--- a/lisp/language/devanagari.el
+++ b/lisp/language/devanagari.el
@@ -1,6 +1,6 @@
1;;; devanagari.el --- Support for Devanagari -*- coding: iso-2022-7bit; no-byte-compile: t -*- 1;;; devanagari.el --- Support for Devanagari -*- coding: iso-2022-7bit; no-byte-compile: t -*-
2 2
3;; Copyright (C) 1996, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc.
4 4
5;; Maintainer: KAWABATA, Taichi <kawabata@m17n.org> 5;; Maintainer: KAWABATA, Taichi <kawabata@m17n.org>
6;; Keywords: multilingual, Indian, Devanagari 6;; Keywords: multilingual, Indian, Devanagari
diff --git a/lisp/language/english.el b/lisp/language/english.el
index 6d135197460..db496ad7600 100644
--- a/lisp/language/english.el
+++ b/lisp/language/english.el
@@ -1,7 +1,9 @@
1;;; english.el --- support for English -*- no-byte-compile: t -*- 1;;; english.el --- support for English -*- no-byte-compile: t -*-
2 2
3;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1997 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1997
5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
5;; Copyright (C) 2003 7;; Copyright (C) 2003
6;; National Institute of Advanced Industrial Science and Technology (AIST) 8;; National Institute of Advanced Industrial Science and Technology (AIST)
7;; Registration Number H13PRO009 9;; Registration Number H13PRO009
diff --git a/lisp/language/ethio-util.el b/lisp/language/ethio-util.el
index fb920e8f4e8..31248f1bcf3 100644
--- a/lisp/language/ethio-util.el
+++ b/lisp/language/ethio-util.el
@@ -1,7 +1,10 @@
1;;; ethio-util.el --- utilities for Ethiopic -*- coding: utf-8-emacs; -*- 1;;; ethio-util.el --- utilities for Ethiopic -*- coding: utf-8-emacs; -*-
2 2
3;; Copyright (C) 1997, 2001 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1997, 1998, 2002
4;; Licensed to the Free Software Foundation. 4;; Free Software Foundation, Inc.
5;; Copyright (C) 1997, 1998, 1999, 2001, 2004, 2005
6;; National Institute of Advanced Industrial Science and Technology (AIST)
7;; Registration Number H14PRO021
5;; Copyright (C) 2005 8;; Copyright (C) 2005
6;; National Institute of Advanced Industrial Science and Technology (AIST) 9;; National Institute of Advanced Industrial Science and Technology (AIST)
7;; Registration Number: H15PRO 110 10;; Registration Number: H15PRO 110
diff --git a/lisp/language/ethiopic.el b/lisp/language/ethiopic.el
index 609a87191b6..e526f02291d 100644
--- a/lisp/language/ethiopic.el
+++ b/lisp/language/ethiopic.el
@@ -1,7 +1,9 @@
1;;; ethiopic.el --- support for Ethiopic -*- coding: utf-8-emacs; -*- 1;;; ethiopic.el --- support for Ethiopic -*- coding: utf-8-emacs; -*-
2 2
3;; Copyright (C) 1995, 2001 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1997 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1995, 2001
5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
5;; Copyright (C) 2005 7;; Copyright (C) 2005
6;; National Institute of Advanced Industrial Science and Technology (AIST) 8;; National Institute of Advanced Industrial Science and Technology (AIST)
7;; Registration Number: H15PRO 110 9;; Registration Number: H15PRO 110
diff --git a/lisp/language/european.el b/lisp/language/european.el
index 164d51c9aad..b497abfd599 100644
--- a/lisp/language/european.el
+++ b/lisp/language/european.el
@@ -1,8 +1,10 @@
1;;; european.el --- support for European languages -*- coding: iso-2022-7bit; -*- 1;;; european.el --- support for European languages -*- coding: iso-2022-7bit; -*-
2 2
3;; Copyright (C) 1995, 1997, 2001 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004
4;; Licensed to the Free Software Foundation. 4;; Free Software Foundation, Inc.
5;; Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. 5;; Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003
6;; National Institute of Advanced Industrial Science and Technology (AIST)
7;; Registration Number H14PRO021
6;; Copyright (C) 2003 8;; Copyright (C) 2003
7;; National Institute of Advanced Industrial Science and Technology (AIST) 9;; National Institute of Advanced Industrial Science and Technology (AIST)
8;; Registration Number H13PRO009 10;; Registration Number H13PRO009
diff --git a/lisp/language/greek.el b/lisp/language/greek.el
index e3625b4c7c2..27dc26f2cfc 100644
--- a/lisp/language/greek.el
+++ b/lisp/language/greek.el
@@ -1,8 +1,9 @@
1;;; greek.el --- support for Greek -*- no-byte-compile: t -*- 1;;; greek.el --- support for Greek -*- no-byte-compile: t -*-
2 2
3;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
4;; Licensed to the Free Software Foundation.
5;; Copyright (C) 2002 Free Software Foundation, Inc. 3;; Copyright (C) 2002 Free Software Foundation, Inc.
4;; Copyright (C) 1995
5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
6;; Copyright (C) 2003 7;; Copyright (C) 2003
7;; National Institute of Advanced Industrial Science and Technology (AIST) 8;; National Institute of Advanced Industrial Science and Technology (AIST)
8;; Registration Number H13PRO009 9;; Registration Number H13PRO009
diff --git a/lisp/language/hebrew.el b/lisp/language/hebrew.el
index bc59d23b3ee..fcd9f56153d 100644
--- a/lisp/language/hebrew.el
+++ b/lisp/language/hebrew.el
@@ -1,8 +1,9 @@
1;;; hebrew.el --- support for Hebrew -*- coding: iso-2022-7bit; no-byte-compile: t -*- 1;;; hebrew.el --- support for Hebrew -*- coding: iso-2022-7bit; no-byte-compile: t -*-
2 2
3;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 2001, 2002 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1995
5;; Copyright (C) 2001, 2002 Free Software Foundation, Inc. 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
6;; Copyright (C) 2003 7;; Copyright (C) 2003
7;; National Institute of Advanced Industrial Science and Technology (AIST) 8;; National Institute of Advanced Industrial Science and Technology (AIST)
8;; Registration Number H13PRO009 9;; Registration Number H13PRO009
diff --git a/lisp/language/indian.el b/lisp/language/indian.el
index e868718bfda..1307243e074 100644
--- a/lisp/language/indian.el
+++ b/lisp/language/indian.el
@@ -1,6 +1,9 @@
1;;; indian.el --- Indian languages support -*- coding: iso-2022-7bit; -*- 1;;; indian.el --- Indian languages support -*- coding: iso-2022-7bit; -*-
2 2
3;; Copyright (C) 1999, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1997, 1999, 2001 Free Software Foundation, Inc.
4;; Copyright (C) 2002, 2003
5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
4 7
5;; Maintainer: KAWABATA, Taichi <kawabata@m17n.org> 8;; Maintainer: KAWABATA, Taichi <kawabata@m17n.org>
6;; Keywords: multilingual, i18n, Indian 9;; Keywords: multilingual, i18n, Indian
diff --git a/lisp/language/japan-util.el b/lisp/language/japan-util.el
index e9a80fc99a7..81a40a9c450 100644
--- a/lisp/language/japan-util.el
+++ b/lisp/language/japan-util.el
@@ -1,8 +1,9 @@
1;;; japan-util.el --- utilities for Japanese -*- coding: iso-2022-7bit; -*- 1;;; japan-util.el --- utilities for Japanese -*- coding: iso-2022-7bit; -*-
2 2
3;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 2001 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1995, 1998, 2000, 2003
5;; Copyright (C) 2001 Free SOftware Foundation, Inc. 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
6 7
7;; Keywords: mule, multilingual, Japanese 8;; Keywords: mule, multilingual, Japanese
8 9
diff --git a/lisp/language/japanese.el b/lisp/language/japanese.el
index 1c48228d2db..b882cd5e62b 100644
--- a/lisp/language/japanese.el
+++ b/lisp/language/japanese.el
@@ -1,7 +1,9 @@
1;;; japanese.el --- support for Japanese -*- coding: iso-2022-7bit; no-byte-compile: t -*- 1;;; japanese.el --- support for Japanese -*- coding: iso-2022-7bit; no-byte-compile: t -*-
2 2
3;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1997 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1995, 1997, 1998
5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
5;; Copyright (C) 2003 7;; Copyright (C) 2003
6;; National Institute of Advanced Industrial Science and Technology (AIST) 8;; National Institute of Advanced Industrial Science and Technology (AIST)
7;; Registration Number H13PRO009 9;; Registration Number H13PRO009
diff --git a/lisp/language/korea-util.el b/lisp/language/korea-util.el
index 222832022ac..de940f5317f 100644
--- a/lisp/language/korea-util.el
+++ b/lisp/language/korea-util.el
@@ -1,6 +1,9 @@
1;;; korea-util.el --- utilities for Korean 1;;; korea-util.el --- utilities for Korean
2 2
3;; Copyright (C) 1997 Free Software Foundation, Inc. 3;; Copyright (C) 1997, 1999 Free Software Foundation, Inc.
4;; Copyright (C) 1997, 1998, 1999
5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
4 7
5;; Keywords: mule, multilingual, Korean 8;; Keywords: mule, multilingual, Korean
6 9
diff --git a/lisp/language/korean.el b/lisp/language/korean.el
index 8624264185d..1657de90f4c 100644
--- a/lisp/language/korean.el
+++ b/lisp/language/korean.el
@@ -1,7 +1,9 @@
1;;; korean.el --- support for Korean -*- coding: iso-2022-7bit; no-byte-compile: t -*- 1;;; korean.el --- support for Korean -*- coding: iso-2022-7bit; no-byte-compile: t -*-
2 2
3;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1998 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1995, 1998
5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
5;; Copyright (C) 2003 7;; Copyright (C) 2003
6;; National Institute of Advanced Industrial Science and Technology (AIST) 8;; National Institute of Advanced Industrial Science and Technology (AIST)
7;; Registration Number H13PRO009 9;; Registration Number H13PRO009
diff --git a/lisp/language/lao-util.el b/lisp/language/lao-util.el
index ad0253648ea..9141c34f3df 100644
--- a/lisp/language/lao-util.el
+++ b/lisp/language/lao-util.el
@@ -1,8 +1,9 @@
1;;; lao-util.el --- utilities for Lao -*- coding: iso-2022-7bit; -*- 1;;; lao-util.el --- utilities for Lao -*- coding: iso-2022-7bit; -*-
2 2
3;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 2001 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1997, 1998, 1999, 2000
5;; Copyright (C) 2001 Free Software Foundation, Inc. 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
6;; Copyright (C) 2003 7;; Copyright (C) 2003
7;; National Institute of Advanced Industrial Science and Technology (AIST) 8;; National Institute of Advanced Industrial Science and Technology (AIST)
8;; Registration Number H13PRO009 9;; Registration Number H13PRO009
diff --git a/lisp/language/lao.el b/lisp/language/lao.el
index ec5c07342e4..f400bb50931 100644
--- a/lisp/language/lao.el
+++ b/lisp/language/lao.el
@@ -1,8 +1,9 @@
1;;; lao.el --- support for Lao -*- coding: iso-2022-7bit; no-byte-compile: t -*- 1;;; lao.el --- support for Lao -*- coding: iso-2022-7bit; no-byte-compile: t -*-
2 2
3;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 2001 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1997, 1998, 1999, 2002
5;; Copyright (C) 2001 Free Software Foundation, Inc. 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
6;; Copyright (C) 2003 7;; Copyright (C) 2003
7;; National Institute of Advanced Industrial Science and Technology (AIST) 8;; National Institute of Advanced Industrial Science and Technology (AIST)
8;; Registration Number H13PRO009 9;; Registration Number H13PRO009
diff --git a/lisp/language/misc-lang.el b/lisp/language/misc-lang.el
index 537267ce9ba..47993e16ea5 100644
--- a/lisp/language/misc-lang.el
+++ b/lisp/language/misc-lang.el
@@ -1,7 +1,8 @@
1;;; misc-lang.el --- support for miscellaneous languages (characters) -*- no-byte-compile: t -*- 1;;; misc-lang.el --- support for miscellaneous languages (characters) -*- no-byte-compile: t -*-
2 2
3;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1995, 1997
4;; Licensed to the Free Software Foundation. 4;; National Institute of Advanced Industrial Science and Technology (AIST)
5;; Registration Number H14PRO021
5 6
6;; Keywords: multilingual, character set, coding system 7;; Keywords: multilingual, character set, coding system
7 8
diff --git a/lisp/language/tibet-util.el b/lisp/language/tibet-util.el
index ec53d121f02..ce83add4b6f 100644
--- a/lisp/language/tibet-util.el
+++ b/lisp/language/tibet-util.el
@@ -1,7 +1,9 @@
1;;; tibet-util.el --- utilities for Tibetan -*- coding: iso-2022-7bit; -*- 1;;; tibet-util.el --- utilities for Tibetan -*- coding: iso-2022-7bit; -*-
2 2
3;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1997, 2002 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1995, 1997, 1998, 2000
5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
5 7
6;; Keywords: multilingual, Tibetan 8;; Keywords: multilingual, Tibetan
7 9
diff --git a/lisp/language/tibetan.el b/lisp/language/tibetan.el
index 4b580f4a81c..9ed777585db 100644
--- a/lisp/language/tibetan.el
+++ b/lisp/language/tibetan.el
@@ -1,7 +1,9 @@
1;;; tibetan.el --- support for Tibetan language -*- coding: iso-2022-7bit; -*- 1;;; tibetan.el --- support for Tibetan language -*- coding: iso-2022-7bit; -*-
2 2
3;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1997, 2002 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1997, 1999, 2000
5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
5;; Copyright (C) 2003 7;; Copyright (C) 2003
6;; National Institute of Advanced Industrial Science and Technology (AIST) 8;; National Institute of Advanced Industrial Science and Technology (AIST)
7;; Registration Number H13PRO009 9;; Registration Number H13PRO009
diff --git a/lisp/language/viet-util.el b/lisp/language/viet-util.el
index c2f1218a536..c854238b6a4 100644
--- a/lisp/language/viet-util.el
+++ b/lisp/language/viet-util.el
@@ -1,7 +1,9 @@
1;;; viet-util.el --- utilities for Vietnamese -*- coding: iso-2022-7bit; -*- 1;;; viet-util.el --- utilities for Vietnamese -*- coding: iso-2022-7bit; -*-
2 2
3;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1998 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1995, 1997
5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
5;; Copyright (C) 2003 7;; Copyright (C) 2003
6;; National Institute of Advanced Industrial Science and Technology (AIST) 8;; National Institute of Advanced Industrial Science and Technology (AIST)
7;; Registration Number H13PRO009 9;; Registration Number H13PRO009
diff --git a/lisp/language/vietnamese.el b/lisp/language/vietnamese.el
index a5360d781f5..9f7196c5adb 100644
--- a/lisp/language/vietnamese.el
+++ b/lisp/language/vietnamese.el
@@ -1,8 +1,9 @@
1;;; vietnamese.el --- support for Vietnamese -*- coding: iso-2022-7bit; -*- 1;;; vietnamese.el --- support for Vietnamese -*- coding: iso-2022-7bit; -*-
2 2
3;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1998, 2002 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1995, 1997, 1998, 2000
5;; Copyright (C) 2002 Free Software Foundation, Inc. 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
6;; Copyright (C) 2003 7;; Copyright (C) 2003
7;; National Institute of Advanced Industrial Science and Technology (AIST) 8;; National Institute of Advanced Industrial Science and Technology (AIST)
8;; Registration Number H13PRO009 9;; Registration Number H13PRO009
diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el
index 3d1b1951421..7c7265ac8c9 100644
--- a/lisp/mail/feedmail.el
+++ b/lisp/mail/feedmail.el
@@ -1835,7 +1835,7 @@ the counts."
1835 (setq blobbet (file-name-nondirectory blobby)) 1835 (setq blobbet (file-name-nondirectory blobby))
1836 (if (string-match "^[0-9][0-9][0-9]-" blobbet) 1836 (if (string-match "^[0-9][0-9][0-9]-" blobbet)
1837 (let ((water-mark)) 1837 (let ((water-mark))
1838 (setq water-mark (string-to-int (substring blobbet 0 3))) 1838 (setq water-mark (string-to-number (substring blobbet 0 3)))
1839 (if (> water-mark high-water) (setq high-water water-mark)))) 1839 (if (> water-mark high-water) (setq high-water water-mark))))
1840 (setq q-cnt (1+ q-cnt))) 1840 (setq q-cnt (1+ q-cnt)))
1841 (t (setq q-oth (1+ q-oth))) 1841 (t (setq q-oth (1+ q-oth)))
diff --git a/lisp/mail/mailalias.el b/lisp/mail/mailalias.el
index b520841db3d..88f166707c3 100644
--- a/lisp/mail/mailalias.el
+++ b/lisp/mail/mailalias.el
@@ -449,7 +449,7 @@ PATTERN is the string we want to complete."
449 (add-to-list 'mail-local-names 449 (add-to-list 'mail-local-names
450 (cons (match-string 1) 450 (cons (match-string 1)
451 (user-full-name 451 (user-full-name
452 (string-to-int (match-string 2)))))) 452 (string-to-number (match-string 2))))))
453 (beginning-of-line 2)) 453 (beginning-of-line 2))
454 (kill-buffer (current-buffer)))) 454 (kill-buffer (current-buffer))))
455 (if (or (eq mail-names t) 455 (if (or (eq mail-names t)
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 1feaf94317f..858eeff40bf 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -1990,7 +1990,7 @@ is non-nil if the user has supplied the password interactively.
1990 header-end t) 1990 header-end t)
1991 (let ((beg (point)) 1991 (let ((beg (point))
1992 (eol (progn (end-of-line) (point)))) 1992 (eol (progn (end-of-line) (point))))
1993 (string-to-int (buffer-substring beg eol))))))) 1993 (string-to-number (buffer-substring beg eol)))))))
1994 (and size 1994 (and size
1995 (if (and (natnump size) 1995 (if (and (natnump size)
1996 (<= (+ header-end size) (point-max)) 1996 (<= (+ header-end size) (point-max))
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index a49b47453d8..f551239907d 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -375,17 +375,17 @@ Setting this variable has an effect only before reading a mail."
375 (cond ((re-search-forward "\\([^0-9:]\\)\\([0-3]?[0-9]\\)\\([- \t_]+\\)\\([adfjmnos][aceopu][bcglnprtvy]\\)" 375 (cond ((re-search-forward "\\([^0-9:]\\)\\([0-3]?[0-9]\\)\\([- \t_]+\\)\\([adfjmnos][aceopu][bcglnprtvy]\\)"
376 (save-excursion (end-of-line) (point)) t) 376 (save-excursion (end-of-line) (point)) t)
377 (format "%2d-%3s" 377 (format "%2d-%3s"
378 (string-to-int (buffer-substring 378 (string-to-number (buffer-substring
379 (match-beginning 2) 379 (match-beginning 2)
380 (match-end 2))) 380 (match-end 2)))
381 (buffer-substring 381 (buffer-substring
382 (match-beginning 4) (match-end 4)))) 382 (match-beginning 4) (match-end 4))))
383 ((re-search-forward "\\([^a-z]\\)\\([adfjmnos][acepou][bcglnprtvy]\\)\\([-a-z \t_]*\\)\\([0-9][0-9]?\\)" 383 ((re-search-forward "\\([^a-z]\\)\\([adfjmnos][acepou][bcglnprtvy]\\)\\([-a-z \t_]*\\)\\([0-9][0-9]?\\)"
384 (save-excursion (end-of-line) (point)) t) 384 (save-excursion (end-of-line) (point)) t)
385 (format "%2d-%3s" 385 (format "%2d-%3s"
386 (string-to-int (buffer-substring 386 (string-to-number (buffer-substring
387 (match-beginning 4) 387 (match-beginning 4)
388 (match-end 4))) 388 (match-end 4)))
389 (buffer-substring 389 (buffer-substring
390 (match-beginning 2) (match-end 2)))) 390 (match-beginning 2) (match-end 2))))
391 ((re-search-forward "\\(19\\|20\\)\\([0-9][0-9]\\)-\\([01][0-9]\\)-\\([0-3][0-9]\\)" 391 ((re-search-forward "\\(19\\|20\\)\\([0-9][0-9]\\)-\\([01][0-9]\\)-\\([0-3][0-9]\\)"
@@ -580,7 +580,7 @@ If N is negative, go backwards."
580 ;; Advance thru summary. 580 ;; Advance thru summary.
581 (forward-line (if forward 1 -1)) 581 (forward-line (if forward 1 -1))
582 ;; Get msg number of this line. 582 ;; Get msg number of this line.
583 (setq i (string-to-int 583 (setq i (string-to-number
584 (buffer-substring (point) 584 (buffer-substring (point)
585 (min (point-max) (+ 6 (point)))))) 585 (min (point-max) (+ 6 (point))))))
586 ;; See if that msg has desired subject. 586 ;; See if that msg has desired subject.
@@ -791,10 +791,10 @@ Search, the `unseen' attribute is restored.")
791 (forward-line -1)) 791 (forward-line -1))
792 (beginning-of-line) 792 (beginning-of-line)
793 (skip-chars-forward " ") 793 (skip-chars-forward " ")
794 (let ((msg-num (string-to-int (buffer-substring 794 (let ((msg-num (string-to-number (buffer-substring
795 (point) 795 (point)
796 (progn (skip-chars-forward "0-9") 796 (progn (skip-chars-forward "0-9")
797 (point)))))) 797 (point))))))
798 ;; Always leave `unseen' removed 798 ;; Always leave `unseen' removed
799 ;; if we get out of isearch mode. 799 ;; if we get out of isearch mode.
800 ;; Don't let a subsequent isearch restore that `unseen'. 800 ;; Don't let a subsequent isearch restore that `unseen'.
@@ -1061,7 +1061,7 @@ If SKIP-RMAIL, don't do anything to the Rmail buffer."
1061 (buf rmail-buffer) 1061 (buf rmail-buffer)
1062 (cur (point)) 1062 (cur (point))
1063 message-not-found 1063 message-not-found
1064 (curmsg (string-to-int 1064 (curmsg (string-to-number
1065 (buffer-substring (point) 1065 (buffer-substring (point)
1066 (min (point-max) (+ 6 (point)))))) 1066 (min (point-max) (+ 6 (point))))))
1067 (total (save-excursion (set-buffer buf) rmail-total-messages))) 1067 (total (save-excursion (set-buffer buf) rmail-total-messages)))
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index 605af6cdbe7..3cf17f8968d 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -822,7 +822,7 @@ This is relative to `smtpmail-queue-dir'.")
822 nil 822 nil
823 (setq response-continue nil) 823 (setq response-continue nil)
824 (setq return-value 824 (setq return-value
825 (cons (string-to-int 825 (cons (string-to-number
826 (buffer-substring begin end)) 826 (buffer-substring begin end))
827 (nreverse response-strings))))) 827 (nreverse response-strings)))))
828 828
diff --git a/lisp/mail/supercite.el b/lisp/mail/supercite.el
index 6b769f53801..d9a9d78d0b9 100644
--- a/lisp/mail/supercite.el
+++ b/lisp/mail/supercite.el
@@ -153,6 +153,7 @@ a variable whose value is a citation frame."
153 (choice (repeat (repeat sexp)) 153 (choice (repeat (repeat sexp))
154 symbol))))) 154 symbol)))))
155 :group 'supercite-frames) 155 :group 'supercite-frames)
156(put 'sc-cite-frame-alist 'risky-local-variable t)
156 157
157(defcustom sc-uncite-frame-alist '() 158(defcustom sc-uncite-frame-alist '()
158 "*Alist for frame selection during unciting. 159 "*Alist for frame selection during unciting.
@@ -161,6 +162,7 @@ See the variable `sc-cite-frame-alist' for details."
161 (choice (repeat (repeat sexp)) 162 (choice (repeat (repeat sexp))
162 symbol))))) 163 symbol)))))
163 :group 'supercite-frames) 164 :group 'supercite-frames)
165(put 'sc-uncite-frame-alist 'risky-local-variable t)
164 166
165(defcustom sc-recite-frame-alist '() 167(defcustom sc-recite-frame-alist '()
166 "*Alist for frame selection during reciting. 168 "*Alist for frame selection during reciting.
@@ -169,6 +171,7 @@ See the variable `sc-cite-frame-alist' for details."
169 (choice (repeat (repeat sexp)) 171 (choice (repeat (repeat sexp))
170 symbol))))) 172 symbol)))))
171 :group 'supercite-frames) 173 :group 'supercite-frames)
174(put 'sc-recite-frame-alist 'risky-local-variable t)
172 175
173(defcustom sc-default-cite-frame 176(defcustom sc-default-cite-frame
174 '(;; initialize fill state and temporary variables when entering 177 '(;; initialize fill state and temporary variables when entering
@@ -214,6 +217,7 @@ See the variable `sc-cite-frame-alist' for details."
214 "*Default REGI frame for citing a region." 217 "*Default REGI frame for citing a region."
215 :type '(repeat (repeat sexp)) 218 :type '(repeat (repeat sexp))
216 :group 'supercite-frames) 219 :group 'supercite-frames)
220(put 'sc-default-cite-frame 'risky-local-variable t)
217 221
218(defcustom sc-default-uncite-frame 222(defcustom sc-default-uncite-frame
219 '(;; do nothing on a blank line 223 '(;; do nothing on a blank line
@@ -224,6 +228,7 @@ See the variable `sc-cite-frame-alist' for details."
224 "*Default REGI frame for unciting a region." 228 "*Default REGI frame for unciting a region."
225 :type '(repeat (repeat sexp)) 229 :type '(repeat (repeat sexp))
226 :group 'supercite-frames) 230 :group 'supercite-frames)
231(put 'sc-default-uncite-frame 'risky-local-variable t)
227 232
228(defcustom sc-default-recite-frame 233(defcustom sc-default-recite-frame
229 '(;; initialize fill state when entering frame 234 '(;; initialize fill state when entering frame
@@ -240,6 +245,7 @@ See the variable `sc-cite-frame-alist' for details."
240 "*Default REGI frame for reciting a region." 245 "*Default REGI frame for reciting a region."
241 :type '(repeat (repeat sexp)) 246 :type '(repeat (repeat sexp))
242 :group 'supercite-frames) 247 :group 'supercite-frames)
248(put 'sc-default-recite-frame 'risky-local-variable t)
243 249
244(defcustom sc-cite-region-limit t 250(defcustom sc-cite-region-limit t
245 "*This variable controls automatic citation of yanked text. 251 "*This variable controls automatic citation of yanked text.
@@ -427,6 +433,7 @@ to be consulted during attribution selection."
427 (choice (sexp :tag "List to eval") 433 (choice (sexp :tag "List to eval")
428 string))))) 434 string)))))
429 :group 'supercite-attr) 435 :group 'supercite-attr)
436(put 'sc-attrib-selection-list 'risky-local-variable t)
430 437
431(defcustom sc-attribs-preselect-hook nil 438(defcustom sc-attribs-preselect-hook nil
432 "*Hook to run before selecting an attribution." 439 "*Hook to run before selecting an attribution."
@@ -482,6 +489,7 @@ this list is chosen for automatic reference header insertions.
482Electric reference mode will cycle through this list of functions." 489Electric reference mode will cycle through this list of functions."
483 :type '(repeat sexp) 490 :type '(repeat sexp)
484 :group 'supercite) 491 :group 'supercite)
492(put 'sc-rewrite-header-list 'risky-local-variable t)
485 493
486(defcustom sc-titlecue-regexp "\\s +-+\\s +" 494(defcustom sc-titlecue-regexp "\\s +-+\\s +"
487 "*Regular expression describing the separator between names and titles. 495 "*Regular expression describing the separator between names and titles.
diff --git a/lisp/mh-e/mh-acros.el b/lisp/mh-e/mh-acros.el
index 16383304503..e4921b047df 100644
--- a/lisp/mh-e/mh-acros.el
+++ b/lisp/mh-e/mh-acros.el
@@ -1,6 +1,6 @@
1;;; mh-acros.el --- Macros used in MH-E 1;;; mh-acros.el --- Macros used in MH-E
2 2
3;; Copyright (C) 2004 Free Software Foundation, Inc. 3;; Copyright (C) 2005 Free Software Foundation, Inc.
4 4
5;; Author: Satyaki Das <satyaki@theforce.stanford.edu> 5;; Author: Satyaki Das <satyaki@theforce.stanford.edu>
6;; Maintainer: Bill Wohler <wohler@newt.com> 6;; Maintainer: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-alias.el b/lisp/mh-e/mh-alias.el
index 1356e2c8b95..7f2cd2f5266 100644
--- a/lisp/mh-e/mh-alias.el
+++ b/lisp/mh-e/mh-alias.el
@@ -1,7 +1,6 @@
1;;; mh-alias.el --- MH-E mail alias completion and expansion 1;;; mh-alias.el --- MH-E mail alias completion and expansion
2;; 2;;
3;; Copyright (C) 1994, 95, 96, 1997, 3;; Copyright (C) 2005 Free Software Foundation, Inc.
4;; 2001, 02, 03, 2004 Free Software Foundation, Inc.
5 4
6;; Author: Peter S. Galbraith <psg@debian.org> 5;; Author: Peter S. Galbraith <psg@debian.org>
7;; Maintainer: Bill Wohler <wohler@newt.com> 6;; Maintainer: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el
index cde52c65043..4f7e413d464 100644
--- a/lisp/mh-e/mh-comp.el
+++ b/lisp/mh-e/mh-comp.el
@@ -1,7 +1,6 @@
1;;; mh-comp.el --- MH-E functions for composing messages 1;;; mh-comp.el --- MH-E functions for composing messages
2 2
3;; Copyright (C) 1993, 95, 1997, 3;; Copyright (C) 1993, 95, 1997, 2000, 2005 Free Software Foundation, Inc.
4;; 2000, 01, 02, 03, 2004 Free Software Foundation, Inc.
5 4
6;; Author: Bill Wohler <wohler@newt.com> 5;; Author: Bill Wohler <wohler@newt.com>
7;; Maintainer: Bill Wohler <wohler@newt.com> 6;; Maintainer: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-customize.el b/lisp/mh-e/mh-customize.el
index c9a4b11702d..c5689afc13e 100644
--- a/lisp/mh-e/mh-customize.el
+++ b/lisp/mh-e/mh-customize.el
@@ -1,6 +1,6 @@
1;;; mh-customize.el --- MH-E customization 1;;; mh-customize.el --- MH-E customization
2 2
3;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 2005 Free Software Foundation, Inc.
4 4
5;; Author: Bill Wohler <wohler@newt.com> 5;; Author: Bill Wohler <wohler@newt.com>
6;; Maintainer: Bill Wohler <wohler@newt.com> 6;; Maintainer: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el
index c2322624507..b5eea79ae1e 100644
--- a/lisp/mh-e/mh-e.el
+++ b/lisp/mh-e/mh-e.el
@@ -1,7 +1,7 @@
1;;; mh-e.el --- GNU Emacs interface to the MH mail system 1;;; mh-e.el --- GNU Emacs interface to the MH mail system
2 2
3;; Copyright (C) 1985, 86, 87, 88, 90, 92, 93, 94, 95, 97, 1999, 3;; Copyright (C) 1985, 86, 87, 88, 90, 92, 93, 94, 95, 97, 1999,
4;; 2000, 01, 02, 03, 2004, 2005 Free Software Foundation, Inc. 4;; 2000, 2005 Free Software Foundation, Inc.
5 5
6;; Author: Bill Wohler <wohler@newt.com> 6;; Author: Bill Wohler <wohler@newt.com>
7;; Maintainer: Bill Wohler <wohler@newt.com> 7;; Maintainer: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-funcs.el b/lisp/mh-e/mh-funcs.el
index ef745f4c06f..a632efc7856 100644
--- a/lisp/mh-e/mh-funcs.el
+++ b/lisp/mh-e/mh-funcs.el
@@ -1,6 +1,6 @@
1;;; mh-funcs.el --- MH-E functions not everyone will use right away 1;;; mh-funcs.el --- MH-E functions not everyone will use right away
2 2
3;; Copyright (C) 1993, 1995, 2001, 02, 03, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 1993, 1995, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Bill Wohler <wohler@newt.com> 5;; Author: Bill Wohler <wohler@newt.com>
6;; Maintainer: Bill Wohler <wohler@newt.com> 6;; Maintainer: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-gnus.el b/lisp/mh-e/mh-gnus.el
index b850c8fdc43..e4b4a5b0d54 100644
--- a/lisp/mh-e/mh-gnus.el
+++ b/lisp/mh-e/mh-gnus.el
@@ -1,6 +1,6 @@
1;;; mh-gnus.el --- Make MH-E compatible with installed version of Gnus. 1;;; mh-gnus.el --- Make MH-E compatible with installed version of Gnus.
2 2
3;; Copyright (C) 2003, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 2005 Free Software Foundation, Inc.
4 4
5;; Author: Satyaki Das <satyaki@theforce.stanford.edu> 5;; Author: Satyaki Das <satyaki@theforce.stanford.edu>
6;; Maintainer: Bill Wohler <wohler@newt.com> 6;; Maintainer: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-identity.el b/lisp/mh-e/mh-identity.el
index 4bb5f90cf18..7b44dae1d06 100644
--- a/lisp/mh-e/mh-identity.el
+++ b/lisp/mh-e/mh-identity.el
@@ -1,6 +1,6 @@
1;;; mh-identity.el --- Multiple identify support for MH-E. 1;;; mh-identity.el --- Multiple identify support for MH-E.
2 2
3;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 2005 Free Software Foundation, Inc.
4 4
5;; Author: Peter S. Galbraith <psg@debian.org> 5;; Author: Peter S. Galbraith <psg@debian.org>
6;; Maintainer: Bill Wohler <wohler@newt.com> 6;; Maintainer: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-inc.el b/lisp/mh-e/mh-inc.el
index 682b8aa7c53..95341fa75f7 100644
--- a/lisp/mh-e/mh-inc.el
+++ b/lisp/mh-e/mh-inc.el
@@ -1,6 +1,6 @@
1;;; mh-inc.el --- MH-E `inc' and separate mail spool handling 1;;; mh-inc.el --- MH-E `inc' and separate mail spool handling
2;; 2;;
3;; Copyright (C) 2003, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 2005 Free Software Foundation, Inc.
4 4
5;; Author: Peter S. Galbraith <psg@debian.org> 5;; Author: Peter S. Galbraith <psg@debian.org>
6;; Maintainer: Bill Wohler <wohler@newt.com> 6;; Maintainer: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-index.el b/lisp/mh-e/mh-index.el
index 91eed420e2e..cde630236b0 100644
--- a/lisp/mh-e/mh-index.el
+++ b/lisp/mh-e/mh-index.el
@@ -1,6 +1,6 @@
1;;; mh-index -- MH-E interface to indexing programs 1;;; mh-index -- MH-E interface to indexing programs
2 2
3;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 2005 Free Software Foundation, Inc.
4 4
5;; Author: Satyaki Das <satyaki@theforce.stanford.edu> 5;; Author: Satyaki Das <satyaki@theforce.stanford.edu>
6;; Maintainer: Bill Wohler <wohler@newt.com> 6;; Maintainer: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-init.el b/lisp/mh-e/mh-init.el
index a975b882128..b97e9fcde65 100644
--- a/lisp/mh-e/mh-init.el
+++ b/lisp/mh-e/mh-init.el
@@ -1,6 +1,6 @@
1;;; mh-init.el --- MH-E initialization. 1;;; mh-init.el --- MH-E initialization.
2 2
3;; Copyright (C) 2003, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 2005 Free Software Foundation, Inc.
4 4
5;; Author: Peter S. Galbraith <psg@debian.org> 5;; Author: Peter S. Galbraith <psg@debian.org>
6;; Maintainer: Bill Wohler <wohler@newt.com> 6;; Maintainer: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-junk.el b/lisp/mh-e/mh-junk.el
index 095a8c3c3fd..29005d47aa6 100644
--- a/lisp/mh-e/mh-junk.el
+++ b/lisp/mh-e/mh-junk.el
@@ -1,6 +1,6 @@
1;;; mh-junk.el --- Interface to anti-spam measures 1;;; mh-junk.el --- Interface to anti-spam measures
2 2
3;; Copyright (C) 2003, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 2005 Free Software Foundation, Inc.
4 4
5;; Author: Satyaki Das <satyaki@theforce.stanford.edu>, 5;; Author: Satyaki Das <satyaki@theforce.stanford.edu>,
6;; Bill Wohler <wohler@newt.com> 6;; Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-loaddefs.el b/lisp/mh-e/mh-loaddefs.el
index fd989ffa3b9..4abe3b208ef 100644
--- a/lisp/mh-e/mh-loaddefs.el
+++ b/lisp/mh-e/mh-loaddefs.el
@@ -1,6 +1,6 @@
1;;; mh-loaddefs.el --- automatically extracted autoloads 1;;; mh-loaddefs.el --- automatically extracted autoloads
2;; 2;;
3;;; Copyright (C) 2003, 2004 Free Software Foundation, Inc. 3;;; Copyright (C) 2005 Free Software Foundation, Inc.
4;;; Author: Bill Wohler <wohler@newt.com> 4;;; Author: Bill Wohler <wohler@newt.com>
5;;; Keywords: mail 5;;; Keywords: mail
6;;; Commentary: 6;;; Commentary:
diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el
index bc870134779..d286069ba4b 100644
--- a/lisp/mh-e/mh-mime.el
+++ b/lisp/mh-e/mh-mime.el
@@ -1,7 +1,6 @@
1;;; mh-mime.el --- MH-E support for composing MIME messages 1;;; mh-mime.el --- MH-E support for composing MIME messages
2 2
3;; Copyright (C) 1993, 1995, 2001, 02, 03, 2004, 2005 3;; Copyright (C) 1993, 1995, 2005 Free Software Foundation, Inc.
4;; Free Software Foundation, Inc.
5 4
6;; Author: Bill Wohler <wohler@newt.com> 5;; Author: Bill Wohler <wohler@newt.com>
7;; Maintainer: Bill Wohler <wohler@newt.com> 6;; Maintainer: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-pick.el b/lisp/mh-e/mh-pick.el
index b92a98f26cc..7b0ae4bafdf 100644
--- a/lisp/mh-e/mh-pick.el
+++ b/lisp/mh-e/mh-pick.el
@@ -1,6 +1,6 @@
1;;; mh-pick.el --- make a search pattern and search for a message in MH-E 1;;; mh-pick.el --- make a search pattern and search for a message in MH-E
2 2
3;; Copyright (C) 1993, 1995, 2001, 2003, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 1993, 1995, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Bill Wohler <wohler@newt.com> 5;; Author: Bill Wohler <wohler@newt.com>
6;; Maintainer: Bill Wohler <wohler@newt.com> 6;; Maintainer: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-print.el b/lisp/mh-e/mh-print.el
index 7539e455919..9a7df0b8fd4 100644
--- a/lisp/mh-e/mh-print.el
+++ b/lisp/mh-e/mh-print.el
@@ -1,6 +1,6 @@
1;;; mh-print.el --- MH-E printing support 1;;; mh-print.el --- MH-E printing support
2 2
3;; Copyright (C) 2003, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 2005 Free Software Foundation, Inc.
4 4
5;; Author: Jeffrey C Honig <jch@honig.net> 5;; Author: Jeffrey C Honig <jch@honig.net>
6;; Maintainer: Bill Wohler <wohler@newt.com> 6;; Maintainer: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-seq.el b/lisp/mh-e/mh-seq.el
index 8d2369ed19a..d09e9805682 100644
--- a/lisp/mh-e/mh-seq.el
+++ b/lisp/mh-e/mh-seq.el
@@ -1,6 +1,6 @@
1;;; mh-seq.el --- MH-E sequences support 1;;; mh-seq.el --- MH-E sequences support
2 2
3;; Copyright (C) 1993, 1995, 2001, 02, 03, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 1993, 1995, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Bill Wohler <wohler@newt.com> 5;; Author: Bill Wohler <wohler@newt.com>
6;; Maintainer: Bill Wohler <wohler@newt.com> 6;; Maintainer: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-speed.el b/lisp/mh-e/mh-speed.el
index 2617a941de1..a20e6e0a410 100644
--- a/lisp/mh-e/mh-speed.el
+++ b/lisp/mh-e/mh-speed.el
@@ -1,6 +1,6 @@
1;;; mh-speed.el --- Speedbar interface for MH-E. 1;;; mh-speed.el --- Speedbar interface for MH-E.
2 2
3;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 2005 Free Software Foundation, Inc.
4 4
5;; Author: Satyaki Das <satyaki@theforce.stanford.edu> 5;; Author: Satyaki Das <satyaki@theforce.stanford.edu>
6;; Maintainer: Bill Wohler <wohler@newt.com> 6;; Maintainer: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el
index a57567a7bd3..a7ba9311403 100644
--- a/lisp/mh-e/mh-utils.el
+++ b/lisp/mh-e/mh-utils.el
@@ -1,7 +1,6 @@
1;;; mh-utils.el --- MH-E code needed for both sending and reading 1;;; mh-utils.el --- MH-E code needed for both sending and reading
2 2
3;; Copyright (C) 1993, 95, 1997, 3;; Copyright (C) 1993, 95, 1997, 2000, 01, 2005 Free Software Foundation, Inc.
4;; 2000, 01, 02, 03, 2004 Free Software Foundation, Inc.
5 4
6;; Author: Bill Wohler <wohler@newt.com> 5;; Author: Bill Wohler <wohler@newt.com>
7;; Maintainer: Bill Wohler <wohler@newt.com> 6;; Maintainer: Bill Wohler <wohler@newt.com>
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index 8b4ed89e7b0..7fd07ebccfb 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -1,6 +1,6 @@
1;;; ange-ftp.el --- transparent FTP support for GNU Emacs 1;;; ange-ftp.el --- transparent FTP support for GNU Emacs
2 2
3;; Copyright (C) 1989,90,91,92,93,94,95,96,98, 2000, 2001 3;; Copyright (C) 1989,90,91,92,93,94,95,96,98, 2000, 2001, 2005
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Author: Andy Norman (ange@hplb.hpl.hp.com) 6;; Author: Andy Norman (ange@hplb.hpl.hp.com)
@@ -1646,7 +1646,7 @@ good, skip, fatal, or unknown."
1646 ;; if we gave an empty password to the USER command earlier 1646 ;; if we gave an empty password to the USER command earlier
1647 ;; then we should send a null password now. 1647 ;; then we should send a null password now.
1648 (if (string-match "Password: *$" ange-ftp-process-string) 1648 (if (string-match "Password: *$" ange-ftp-process-string)
1649 (send-string proc "\n")))) 1649 (process-send-string proc "\n"))))
1650 (while (and ange-ftp-process-busy 1650 (while (and ange-ftp-process-busy
1651 (string-match "\n" ange-ftp-process-string)) 1651 (string-match "\n" ange-ftp-process-string))
1652 (let ((line (substring ange-ftp-process-string 1652 (let ((line (substring ange-ftp-process-string
@@ -1741,18 +1741,18 @@ good, skip, fatal, or unknown."
1741 ;; Replace STR by the result of the comint processing. 1741 ;; Replace STR by the result of the comint processing.
1742 (setq str (buffer-substring comint-last-output-start (process-mark proc)))) 1742 (setq str (buffer-substring comint-last-output-start (process-mark proc))))
1743 (cond ((string-match "login: *$" str) 1743 (cond ((string-match "login: *$" str)
1744 (send-string proc 1744 (process-send-string proc
1745 (concat 1745 (concat
1746 (let ((ange-ftp-default-user t)) 1746 (let ((ange-ftp-default-user t))
1747 (ange-ftp-get-user ange-ftp-gateway-host)) 1747 (ange-ftp-get-user ange-ftp-gateway-host))
1748 "\n"))) 1748 "\n")))
1749 ((string-match "Password: *$" str) 1749 ((string-match "Password: *$" str)
1750 (send-string proc 1750 (process-send-string proc
1751 (concat 1751 (concat
1752 (ange-ftp-get-passwd ange-ftp-gateway-host 1752 (ange-ftp-get-passwd ange-ftp-gateway-host
1753 (ange-ftp-get-user 1753 (ange-ftp-get-user
1754 ange-ftp-gateway-host)) 1754 ange-ftp-gateway-host))
1755 "\n"))) 1755 "\n")))
1756 ((string-match ange-ftp-gateway-fatal-msgs str) 1756 ((string-match ange-ftp-gateway-fatal-msgs str)
1757 (delete-process proc) 1757 (delete-process proc)
1758 (setq ange-ftp-gwp-running nil)) 1758 (setq ange-ftp-gwp-running nil))
@@ -1835,7 +1835,7 @@ been queued with no result. CONT will still be called, however."
1835 (insert (substring cmd 0 (match-end 0)) " Turtle Power!\n") 1835 (insert (substring cmd 0 (match-end 0)) " Turtle Power!\n")
1836 (insert cmd))) 1836 (insert cmd)))
1837 (move-marker comint-last-input-end (point)) 1837 (move-marker comint-last-input-end (point))
1838 (send-string proc cmd) 1838 (process-send-string proc cmd)
1839 (set-marker (process-mark proc) (point)) 1839 (set-marker (process-mark proc) (point))
1840 (if nowait 1840 (if nowait
1841 nil 1841 nil
@@ -2109,7 +2109,7 @@ suffix of the form #PORT to specify a non-default port"
2109 (line (cdr status))) 2109 (line (cdr status)))
2110 (save-match-data 2110 (save-match-data
2111 (if (string-match ange-ftp-hash-mark-msgs line) 2111 (if (string-match ange-ftp-hash-mark-msgs line)
2112 (let ((size (string-to-int (match-string 1 line)))) 2112 (let ((size (string-to-number (match-string 1 line))))
2113 (setq ange-ftp-ascii-hash-mark-size size 2113 (setq ange-ftp-ascii-hash-mark-size size
2114 ange-ftp-hash-mark-unit (ash size -4)) 2114 ange-ftp-hash-mark-unit (ash size -4))
2115 2115
@@ -5082,7 +5082,7 @@ Other orders of $ and _ seem to all work just fine.")
5082 (and (string-match regexp name) 5082 (and (string-match regexp name)
5083 (setq version 5083 (setq version
5084 (max version 5084 (max version
5085 (string-to-int (match-string 1 name)))))) 5085 (string-to-number (match-string 1 name))))))
5086 files) 5086 files)
5087 (setq version (1+ version)) 5087 (setq version (1+ version))
5088 (puthash 5088 (puthash
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 9b5708d6503..5cd8701d1a5 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -1,6 +1,6 @@
1;;; browse-url.el --- pass a URL to a WWW browser 1;;; browse-url.el --- pass a URL to a WWW browser
2 2
3;; Copyright (C) 1995, 96, 97, 98, 99, 2000, 2001, 2004, 2005 3;; Copyright (C) 1995, 96, 97, 98, 99, 2000, 2001, 2005
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Author: Denis Howe <dbh@doc.ic.ac.uk> 6;; Author: Denis Howe <dbh@doc.ic.ac.uk>
diff --git a/lisp/net/eudc.el b/lisp/net/eudc.el
index 2e6b1625146..b279715329f 100644
--- a/lisp/net/eudc.el
+++ b/lisp/net/eudc.el
@@ -1,6 +1,6 @@
1;;; eudc.el --- Emacs Unified Directory Client 1;;; eudc.el --- Emacs Unified Directory Client
2 2
3;; Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. 3;; Copyright (C) 1998, 1999, 2000, 2002, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Oscar Figueiredo <oscar@cpe.fr> 5;; Author: Oscar Figueiredo <oscar@cpe.fr>
6;; Maintainer: Pavel Janík <Pavel@Janik.cz> 6;; Maintainer: Pavel Janík <Pavel@Janik.cz>
diff --git a/lisp/net/ldap.el b/lisp/net/ldap.el
index b0409df2b7c..2917fab0a7b 100644
--- a/lisp/net/ldap.el
+++ b/lisp/net/ldap.el
@@ -1,6 +1,6 @@
1;;; ldap.el --- client interface to LDAP for Emacs 1;;; ldap.el --- client interface to LDAP for Emacs
2 2
3;; Copyright (C) 1998, 1999, 2000, 2002, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 1998, 1999, 2000, 2002, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Oscar Figueiredo <oscar@cpe.fr> 5;; Author: Oscar Figueiredo <oscar@cpe.fr>
6;; Maintainer: FSF 6;; Maintainer: FSF
diff --git a/lisp/net/net-utils.el b/lisp/net/net-utils.el
index 4a54702643a..c1c88dfc323 100644
--- a/lisp/net/net-utils.el
+++ b/lisp/net/net-utils.el
@@ -1,6 +1,6 @@
1;;; net-utils.el --- network functions 1;;; net-utils.el --- network functions
2 2
3;; Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1998, 1999, 2000, 2001, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Peter Breton <pbreton@cs.umb.edu> 5;; Author: Peter Breton <pbreton@cs.umb.edu>
6;; Created: Sun Mar 16 1997 6;; Created: Sun Mar 16 1997
@@ -468,7 +468,8 @@ If your system's ping continues until interrupted, you can try setting
468 (require 'ffap) 468 (require 'ffap)
469 (read-from-minibuffer 469 (read-from-minibuffer
470 "Lookup host: " 470 "Lookup host: "
471 (or (ffap-string-at-point 'machine) ""))))) 471 (with-no-warnings
472 (or (ffap-string-at-point 'machine) ""))))))
472 (net-utils-run-program 473 (net-utils-run-program
473 "Dig" 474 "Dig"
474 (concat "** " 475 (concat "** "
diff --git a/lisp/net/quickurl.el b/lisp/net/quickurl.el
index 40a1e4bfad3..ebf4dcd3618 100644
--- a/lisp/net/quickurl.el
+++ b/lisp/net/quickurl.el
@@ -1,6 +1,6 @@
1;;; quickurl.el --- insert an URL based on text at point in buffer 1;;; quickurl.el --- insert an URL based on text at point in buffer
2 2
3;; Copyright (C) 1999,2000,2001 Free Software Foundation, Inc. 3;; Copyright (C) 1999,2000,2001,2005 Free Software Foundation, Inc.
4 4
5;; Author: Dave Pearson <davep@davep.org> 5;; Author: Dave Pearson <davep@davep.org>
6;; Maintainer: Dave Pearson <davep@davep.org> 6;; Maintainer: Dave Pearson <davep@davep.org>
diff --git a/lisp/net/rlogin.el b/lisp/net/rlogin.el
index 67521ca2e73..3ad66166ece 100644
--- a/lisp/net/rlogin.el
+++ b/lisp/net/rlogin.el
@@ -1,6 +1,6 @@
1;;; rlogin.el --- remote login interface 1;;; rlogin.el --- remote login interface
2 2
3;; Copyright (C) 1992, 93, 94, 95, 97, 1998, 2002 Free Software Foundation, Inc. 3;; Copyright (C) 1992, 93, 94, 95, 97, 1998, 2002, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Noah Friedman 5;; Author: Noah Friedman
6;; Maintainer: Noah Friedman <friedman@splode.com> 6;; Maintainer: Noah Friedman <friedman@splode.com>
diff --git a/lisp/net/snmp-mode.el b/lisp/net/snmp-mode.el
index 9cbeee545b5..73fef1452a0 100644
--- a/lisp/net/snmp-mode.el
+++ b/lisp/net/snmp-mode.el
@@ -1,6 +1,6 @@
1;;; snmp-mode.el --- SNMP & SNMPv2 MIB major mode 1;;; snmp-mode.el --- SNMP & SNMPv2 MIB major mode
2 2
3;; Copyright (C) 1995, 1998, 2002 Free Software Foundation, Inc. 3;; Copyright (C) 1995, 1998, 2002, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Paul D. Smith <psmith@BayNetworks.com> 5;; Author: Paul D. Smith <psmith@BayNetworks.com>
6;; Keywords: data 6;; Keywords: data
diff --git a/lisp/net/telnet.el b/lisp/net/telnet.el
index 40a28494774..94a7b325d0e 100644
--- a/lisp/net/telnet.el
+++ b/lisp/net/telnet.el
@@ -1,6 +1,6 @@
1;;; telnet.el --- run a telnet session from within an Emacs buffer 1;;; telnet.el --- run a telnet session from within an Emacs buffer
2 2
3;; Copyright (C) 1985, 88, 1992, 94, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 1985, 88, 1992, 94, 2005 Free Software Foundation, Inc.
4 4
5;; Author: William F. Schelter 5;; Author: William F. Schelter
6;; Maintainer: FSF 6;; Maintainer: FSF
@@ -91,19 +91,19 @@ rejecting one login and prompting again for a username and password.")
91(defun telnet-interrupt-subjob () 91(defun telnet-interrupt-subjob ()
92 "Interrupt the program running through telnet on the remote host." 92 "Interrupt the program running through telnet on the remote host."
93 (interactive) 93 (interactive)
94 (send-string nil telnet-interrupt-string)) 94 (process-send-string nil telnet-interrupt-string))
95 95
96(defun telnet-c-z () 96(defun telnet-c-z ()
97 (interactive) 97 (interactive)
98 (send-string nil "\C-z")) 98 (process-send-string nil "\C-z"))
99 99
100(defun send-process-next-char () 100(defun send-process-next-char ()
101 (interactive) 101 (interactive)
102 (send-string nil 102 (process-send-string nil
103 (char-to-string 103 (char-to-string
104 (let ((inhibit-quit t)) 104 (let ((inhibit-quit t))
105 (prog1 (read-char) 105 (prog1 (read-char)
106 (setq quit-flag nil)))))) 106 (setq quit-flag nil))))))
107 107
108; initialization on first load. 108; initialization on first load.
109(if telnet-mode-map 109(if telnet-mode-map
@@ -141,8 +141,8 @@ rejecting one login and prompting again for a username and password.")
141 ((string-match "passw" string) 141 ((string-match "passw" string)
142 (telnet-filter proc string) 142 (telnet-filter proc string)
143 (setq telnet-count 0) 143 (setq telnet-count 0)
144 (send-string proc (concat (comint-read-noecho "Password: " t) 144 (process-send-string proc (concat (comint-read-noecho "Password: " t)
145 telnet-new-line)) 145 telnet-new-line))
146 (clear-this-command-keys)) 146 (clear-this-command-keys))
147 (t (telnet-check-software-type-initialize string) 147 (t (telnet-check-software-type-initialize string)
148 (telnet-filter proc string) 148 (telnet-filter proc string)
@@ -231,9 +231,9 @@ Normally input is edited in Emacs and sent a line at a time."
231 ;; Don't send the `open' cmd till telnet is ready for it. 231 ;; Don't send the `open' cmd till telnet is ready for it.
232 (accept-process-output process) 232 (accept-process-output process)
233 (erase-buffer) 233 (erase-buffer)
234 (send-string process (concat "open " host 234 (process-send-string process (concat "open " host
235 (if port " " "") (or port "") 235 (if port " " "") (or port "")
236 "\n")) 236 "\n"))
237 (telnet-mode) 237 (telnet-mode)
238 (setq comint-input-sender 'telnet-simple-send) 238 (setq comint-input-sender 'telnet-simple-send)
239 (setq telnet-count telnet-initial-count)))) 239 (setq telnet-count telnet-initial-count))))
diff --git a/lisp/net/tls.el b/lisp/net/tls.el
index fd747387100..2de9362ca07 100644
--- a/lisp/net/tls.el
+++ b/lisp/net/tls.el
@@ -1,6 +1,6 @@
1;;; tls.el --- TLS/SSL support via wrapper around GnuTLS 1;;; tls.el --- TLS/SSL support via wrapper around GnuTLS
2 2
3;; Copyright (C) 1996-1999, 2003, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 1996-1999, 2003, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Simon Josefsson <simon@josefsson.org> 5;; Author: Simon Josefsson <simon@josefsson.org>
6;; Keywords: comm, tls, gnutls, ssl 6;; Keywords: comm, tls, gnutls, ssl
diff --git a/lisp/net/tramp-ftp.el b/lisp/net/tramp-ftp.el
index 3be891a49f8..496ee926d51 100644
--- a/lisp/net/tramp-ftp.el
+++ b/lisp/net/tramp-ftp.el
@@ -1,6 +1,6 @@
1;;; tramp-ftp.el --- Tramp convenience functions for Ange-FTP and EFS -*- coding: iso-8859-1; -*- 1;;; tramp-ftp.el --- Tramp convenience functions for Ange-FTP and EFS -*- coding: iso-8859-1; -*-
2 2
3;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 2002, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Michael Albinus <Michael.Albinus@alcatel.de> 5;; Author: Michael Albinus <Michael.Albinus@alcatel.de>
6;; Keywords: comm, processes 6;; Keywords: comm, processes
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index ebdbc354ec4..c93bdfb8e61 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -1,6 +1,6 @@
1;;; tramp-smb.el --- Tramp access functions for SMB servers -*- coding: iso-8859-1; -*- 1;;; tramp-smb.el --- Tramp access functions for SMB servers -*- coding: iso-8859-1; -*-
2 2
3;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 2002, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Michael Albinus <michael.albinus@gmx.de> 5;; Author: Michael Albinus <michael.albinus@gmx.de>
6;; Keywords: comm, processes 6;; Keywords: comm, processes
@@ -954,7 +954,7 @@ Domain names in USER and port numbers in HOST are acknowledged."
954 (when port (setq args (append args (list "-p" port)))) 954 (when port (setq args (append args (list "-p" port))))
955 955
956 ; OK, let's go 956 ; OK, let's go
957 (tramp-pre-connection nil tramp-smb-method user host) 957 (tramp-pre-connection nil tramp-smb-method user host tramp-chunksize)
958 (tramp-message 7 "Opening connection for //%s@%s/%s..." 958 (tramp-message 7 "Opening connection for //%s@%s/%s..."
959 user host (or share "")) 959 user host (or share ""))
960 960
diff --git a/lisp/net/tramp-util.el b/lisp/net/tramp-util.el
index 1621c2c818e..eff8130b996 100644
--- a/lisp/net/tramp-util.el
+++ b/lisp/net/tramp-util.el
@@ -1,7 +1,7 @@
1;;; -*- coding: iso-2022-7bit; -*- 1;;; -*- coding: iso-2022-7bit; -*-
2;;; tramp-util.el --- Misc utility functions to use with Tramp 2;;; tramp-util.el --- Misc utility functions to use with Tramp
3 3
4;; Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. 4;; Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
5 5
6;; Author: kai.grossjohann@gmx.net 6;; Author: kai.grossjohann@gmx.net
7;; Keywords: comm, extensions, processes 7;; Keywords: comm, extensions, processes
diff --git a/lisp/net/tramp-uu.el b/lisp/net/tramp-uu.el
index d18af101c48..09dfa7d04a5 100644
--- a/lisp/net/tramp-uu.el
+++ b/lisp/net/tramp-uu.el
@@ -1,7 +1,7 @@
1;;; -*- coding: iso-2022-7bit; -*- 1;;; -*- coding: iso-2022-7bit; -*-
2;;; tramp-uu.el --- uuencode in Lisp 2;;; tramp-uu.el --- uuencode in Lisp
3 3
4;; Copyright (C) 2002, 2004 Free Software Foundation, Inc. 4;; Copyright (C) 2002, 2005 Free Software Foundation, Inc.
5 5
6;; Author: Kai Gro,A_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> 6;; Author: Kai Gro,A_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
7;; Keywords: comm, terminals 7;; Keywords: comm, terminals
diff --git a/lisp/net/tramp-vc.el b/lisp/net/tramp-vc.el
index c58d83504c2..9a281d9d40d 100644
--- a/lisp/net/tramp-vc.el
+++ b/lisp/net/tramp-vc.el
@@ -1,6 +1,6 @@
1;;; tramp-vc.el --- Version control integration for TRAMP.el 1;;; tramp-vc.el --- Version control integration for TRAMP.el
2 2
3;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 by Free Software Foundation, Inc. 3;; Copyright (C) 2000, 2001, 2002, 2005 by Free Software Foundation, Inc.
4 4
5;; Author: Daniel Pittman <daniel@danann.net> 5;; Author: Daniel Pittman <daniel@danann.net>
6;; Keywords: comm, processes 6;; Keywords: comm, processes
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index bfdf7ed067a..a5ee3c9bc04 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1,7 +1,7 @@
1;;; -*- mode: Emacs-Lisp; coding: iso-2022-7bit; -*- 1;;; -*- mode: Emacs-Lisp; coding: iso-2022-7bit; -*-
2;;; tramp.el --- Transparent Remote Access, Multiple Protocol 2;;; tramp.el --- Transparent Remote Access, Multiple Protocol
3 3
4;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. 4;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005 Free Software Foundation, Inc.
5 5
6;; Author: kai.grossjohann@gmx.net 6;; Author: kai.grossjohann@gmx.net
7;; Keywords: comm, processes 7;; Keywords: comm, processes
@@ -1352,7 +1352,9 @@ autocorrect\" to the remote host."
1352 1352
1353;; Chunked sending kluge. We set this to 500 for black-listed constellations 1353;; Chunked sending kluge. We set this to 500 for black-listed constellations
1354;; known to have a bug in `process-send-string'; some ssh connections appear 1354;; known to have a bug in `process-send-string'; some ssh connections appear
1355;; to drop bytes when data is sent too quickly. 1355;; to drop bytes when data is sent too quickly. There is also a connection
1356;; buffer local variable, which is computed depending on remote host properties
1357;; when `tramp-chunksize' is zero or nil.
1356(defcustom tramp-chunksize 1358(defcustom tramp-chunksize
1357 (when (and (not (featurep 'xemacs)) 1359 (when (and (not (featurep 'xemacs))
1358 (memq system-type '(hpux))) 1360 (memq system-type '(hpux)))
@@ -3231,7 +3233,13 @@ This is like `dired-recursive-delete-directory' for tramp files."
3231 (mapconcat #'tramp-shell-quote-argument (cons program arguments) " ")) 3233 (mapconcat #'tramp-shell-quote-argument (cons program arguments) " "))
3232 (tramp-wait-for-output)) 3234 (tramp-wait-for-output))
3233 (unless discard 3235 (unless discard
3234 (insert-buffer (tramp-get-buffer multi-method method user host))) 3236 ;; We cannot use `insert-buffer' because the tramp buffer
3237 ;; changes its contents before insertion due to calling
3238 ;; `expand-file' and alike.
3239 (insert
3240 (with-current-buffer
3241 (tramp-get-buffer multi-method method user host)
3242 (buffer-string))))
3235 (save-excursion 3243 (save-excursion
3236 (prog1 3244 (prog1
3237 (tramp-send-command-and-check multi-method method user host nil) 3245 (tramp-send-command-and-check multi-method method user host nil)
@@ -3360,8 +3368,10 @@ This is like `dired-recursive-delete-directory' for tramp files."
3360 switches 3368 switches
3361 (if wildcard 3369 (if wildcard
3362 localname 3370 localname
3363 (tramp-shell-quote-argument 3371 (if (zerop (length (file-name-nondirectory localname)))
3364 (file-name-nondirectory localname)))))) 3372 ""
3373 (tramp-shell-quote-argument
3374 (file-name-nondirectory localname)))))))
3365 (sit-for 1) ;needed for rsh but not ssh? 3375 (sit-for 1) ;needed for rsh but not ssh?
3366 (tramp-wait-for-output)) 3376 (tramp-wait-for-output))
3367 ;; The following let-binding is used by code that's commented 3377 ;; The following let-binding is used by code that's commented
@@ -3369,8 +3379,13 @@ This is like `dired-recursive-delete-directory' for tramp files."
3369 ;; that the commented-out code is really not needed. Commenting-out 3379 ;; that the commented-out code is really not needed. Commenting-out
3370 ;; happened on 2003-03-13. 3380 ;; happened on 2003-03-13.
3371 (let ((old-pos (point))) 3381 (let ((old-pos (point)))
3372 (insert-buffer-substring 3382 ;; We cannot use `insert-buffer' because the tramp buffer
3373 (tramp-get-buffer multi-method method user host)) 3383 ;; changes its contents before insertion due to calling
3384 ;; `expand-file' and alike.
3385 (insert
3386 (with-current-buffer
3387 (tramp-get-buffer multi-method method user host)
3388 (buffer-string)))
3374 ;; On XEmacs, we want to call (exchange-point-and-mark t), but 3389 ;; On XEmacs, we want to call (exchange-point-and-mark t), but
3375 ;; that doesn't exist on Emacs, so we use this workaround instead. 3390 ;; that doesn't exist on Emacs, so we use this workaround instead.
3376 ;; Since zmacs-region-stays doesn't exist in Emacs, this ought to 3391 ;; Since zmacs-region-stays doesn't exist in Emacs, this ought to
@@ -3561,7 +3576,13 @@ This will break if COMMAND prints a newline, followed by the value of
3561 (unless asynchronous 3576 (unless asynchronous
3562 (tramp-wait-for-output))) 3577 (tramp-wait-for-output)))
3563 (unless asynchronous 3578 (unless asynchronous
3564 (insert-buffer (tramp-get-buffer multi-method method user host))) 3579 ;; We cannot use `insert-buffer' because the tramp buffer
3580 ;; changes its contents before insertion due to calling
3581 ;; `expand-file' and alike.
3582 (insert
3583 (with-current-buffer
3584 (tramp-get-buffer multi-method method user host)
3585 (buffer-string))))
3565 (when error-buffer 3586 (when error-buffer
3566 (save-excursion 3587 (save-excursion
3567 (unless (bufferp error-buffer) 3588 (unless (bufferp error-buffer)
@@ -3571,7 +3592,11 @@ This will break if COMMAND prints a newline, followed by the value of
3571 "cat /tmp/tramp.$$.err") 3592 "cat /tmp/tramp.$$.err")
3572 (tramp-wait-for-output) 3593 (tramp-wait-for-output)
3573 (set-buffer error-buffer) 3594 (set-buffer error-buffer)
3574 (insert-buffer (tramp-get-buffer multi-method method user host)) 3595 ;; Same comment as above
3596 (insert
3597 (with-current-buffer
3598 (tramp-get-buffer multi-method method user host)
3599 (buffer-string)))
3575 (tramp-send-command-and-check 3600 (tramp-send-command-and-check
3576 multi-method method user host "rm -f /tmp/tramp.$$.err"))) 3601 multi-method method user host "rm -f /tmp/tramp.$$.err")))
3577 (save-excursion 3602 (save-excursion
@@ -4834,6 +4859,9 @@ Function may have 0-3 parameters."
4834(defun tramp-set-auto-save () 4859(defun tramp-set-auto-save ()
4835 (when (and (buffer-file-name) 4860 (when (and (buffer-file-name)
4836 (tramp-tramp-file-p (buffer-file-name)) 4861 (tramp-tramp-file-p (buffer-file-name))
4862 ;; ange-ftp has its own auto-save mechanism
4863 (eq (tramp-find-foreign-file-name-handler (buffer-file-name))
4864 'tramp-sh-file-name-handler)
4837 auto-save-default) 4865 auto-save-default)
4838 (auto-save-mode 1))) 4866 (auto-save-mode 1)))
4839(add-hook 'find-file-hooks 'tramp-set-auto-save t) 4867(add-hook 'find-file-hooks 'tramp-set-auto-save t)
@@ -5417,7 +5445,7 @@ Maybe the different regular expressions need to be tuned.
5417 method)) 5445 method))
5418 (when multi-method 5446 (when multi-method
5419 (error "Cannot multi-connect using telnet connection method")) 5447 (error "Cannot multi-connect using telnet connection method"))
5420 (tramp-pre-connection multi-method method user host) 5448 (tramp-pre-connection multi-method method user host tramp-chunksize)
5421 (tramp-message 7 "Opening connection for %s@%s using %s..." 5449 (tramp-message 7 "Opening connection for %s@%s using %s..."
5422 (or user (user-login-name)) host method) 5450 (or user (user-login-name)) host method)
5423 (let ((process-environment (copy-sequence process-environment))) 5451 (let ((process-environment (copy-sequence process-environment)))
@@ -5475,7 +5503,7 @@ arguments, and xx will be used as the host name to connect to.
5475 (save-match-data 5503 (save-match-data
5476 (when multi-method 5504 (when multi-method
5477 (error "Cannot multi-connect using rsh connection method")) 5505 (error "Cannot multi-connect using rsh connection method"))
5478 (tramp-pre-connection multi-method method user host) 5506 (tramp-pre-connection multi-method method user host tramp-chunksize)
5479 (if (and user (not (string= user ""))) 5507 (if (and user (not (string= user "")))
5480 (tramp-message 7 "Opening connection for %s@%s using %s..." 5508 (tramp-message 7 "Opening connection for %s@%s using %s..."
5481 user host method) 5509 user host method)
@@ -5544,7 +5572,7 @@ prompt than you do, so it is not at all unlikely that the variable
5544 (error 5572 (error
5545 "Cannot connect to different host `%s' with `su' connection method" 5573 "Cannot connect to different host `%s' with `su' connection method"
5546 host)) 5574 host))
5547 (tramp-pre-connection multi-method method user host) 5575 (tramp-pre-connection multi-method method user host tramp-chunksize)
5548 (tramp-message 7 "Opening connection for `%s' using `%s'..." 5576 (tramp-message 7 "Opening connection for `%s' using `%s'..."
5549 (or user "<root>") method) 5577 (or user "<root>") method)
5550 (let ((process-environment (copy-sequence process-environment))) 5578 (let ((process-environment (copy-sequence process-environment)))
@@ -5609,7 +5637,7 @@ log in as u2 to h2."
5609 (unless (and (= (length method) (length user)) 5637 (unless (and (= (length method) (length user))
5610 (= (length method) (length host))) 5638 (= (length method) (length host)))
5611 (error "Arrays METHOD, USER, HOST must have equal length")) 5639 (error "Arrays METHOD, USER, HOST must have equal length"))
5612 (tramp-pre-connection multi-method method user host) 5640 (tramp-pre-connection multi-method method user host tramp-chunksize)
5613 (tramp-message 7 "Opening `%s' connection..." multi-method) 5641 (tramp-message 7 "Opening `%s' connection..." multi-method)
5614 (let ((process-environment (copy-sequence process-environment))) 5642 (let ((process-environment (copy-sequence process-environment)))
5615 (setenv "TERM" tramp-terminal-type) 5643 (setenv "TERM" tramp-terminal-type)
@@ -5810,7 +5838,7 @@ Uses PROMPT as a prompt and sends the password to process P."
5810;; HHH: Not Changed. This might handle the case where USER is not 5838;; HHH: Not Changed. This might handle the case where USER is not
5811;; given in the "File name" very poorly. Then, the local 5839;; given in the "File name" very poorly. Then, the local
5812;; variable tramp-current-user will be set to nil. 5840;; variable tramp-current-user will be set to nil.
5813(defun tramp-pre-connection (multi-method method user host) 5841(defun tramp-pre-connection (multi-method method user host chunksize)
5814 "Do some setup before actually logging in. 5842 "Do some setup before actually logging in.
5815METHOD, USER and HOST specify the connection." 5843METHOD, USER and HOST specify the connection."
5816 (set-buffer (tramp-get-buffer multi-method method user host)) 5844 (set-buffer (tramp-get-buffer multi-method method user host))
@@ -5818,6 +5846,7 @@ METHOD, USER and HOST specify the connection."
5818 (set (make-local-variable 'tramp-current-method) method) 5846 (set (make-local-variable 'tramp-current-method) method)
5819 (set (make-local-variable 'tramp-current-user) user) 5847 (set (make-local-variable 'tramp-current-user) user)
5820 (set (make-local-variable 'tramp-current-host) host) 5848 (set (make-local-variable 'tramp-current-host) host)
5849 (set (make-local-variable 'tramp-chunksize) chunksize)
5821 (set (make-local-variable 'inhibit-eol-conversion) nil) 5850 (set (make-local-variable 'inhibit-eol-conversion) nil)
5822 (erase-buffer)) 5851 (erase-buffer))
5823 5852
@@ -5869,6 +5898,20 @@ to set up. METHOD, USER and HOST specify the connection."
5869 (erase-buffer) 5898 (erase-buffer)
5870 (tramp-send-command-internal multi-method method user host 5899 (tramp-send-command-internal multi-method method user host
5871 "TERM=dumb; export TERM") 5900 "TERM=dumb; export TERM")
5901 (erase-buffer)
5902 ;; Check whether the remote host suffers from buggy `send-process-string'.
5903 ;; This is known for FreeBSD (see comment in `send_process', file process.c).
5904 ;; I've tested sending 624 bytes successfully, sending 625 bytes failed.
5905 ;; Emacs makes a hack when this host type is detected locally. It cannot
5906 ;; handle remote hosts, though.
5907 (when (or (not tramp-chunksize) (zerop tramp-chunksize))
5908 (tramp-message 9 "Checking remote host type for `send-process-string' bug")
5909 (tramp-send-command-internal multi-method method user host
5910 "(uname -sr) 2>/dev/null")
5911 (goto-char (point-min))
5912 (when (looking-at "FreeBSD")
5913 (setq tramp-chunksize 500)))
5914
5872 ;; Try to set up the coding system correctly. 5915 ;; Try to set up the coding system correctly.
5873 ;; CCC this can't be the right way to do it. Hm. 5916 ;; CCC this can't be the right way to do it. Hm.
5874 (save-excursion 5917 (save-excursion
@@ -6948,7 +6991,8 @@ as default."
6948 ;; Permissions should be set always, because there might be an old 6991 ;; Permissions should be set always, because there might be an old
6949 ;; auto-saved file belonging to another original file. This could 6992 ;; auto-saved file belonging to another original file. This could
6950 ;; be a security threat. 6993 ;; be a security threat.
6951 (set-file-modes buffer-auto-save-file-name (file-modes bfn))))) 6994 (set-file-modes buffer-auto-save-file-name
6995 (or (file-modes bfn) ?\600)))))
6952 6996
6953(unless (or (> emacs-major-version 21) 6997(unless (or (> emacs-major-version 21)
6954 (and (featurep 'xemacs) 6998 (and (featurep 'xemacs)
@@ -7226,7 +7270,6 @@ Only works for Bourne-like shells."
7226 tramp-yesno-prompt-regexp 7270 tramp-yesno-prompt-regexp
7227 tramp-yn-prompt-regexp 7271 tramp-yn-prompt-regexp
7228 tramp-terminal-prompt-regexp 7272 tramp-terminal-prompt-regexp
7229 tramp-out-of-band-prompt-regexp
7230 tramp-temp-name-prefix 7273 tramp-temp-name-prefix
7231 tramp-file-name-structure 7274 tramp-file-name-structure
7232 tramp-file-name-regexp 7275 tramp-file-name-regexp
@@ -7286,31 +7329,44 @@ report.
7286(defun tramp-append-tramp-buffers () 7329(defun tramp-append-tramp-buffers ()
7287 "Append Tramp buffers into the bug report." 7330 "Append Tramp buffers into the bug report."
7288 7331
7289 ;; We load mml.el from Gnus. 7332 ;; We load message.el and mml.el from Gnus.
7290 (if (featurep 'xemacs) 7333 (if (featurep 'xemacs)
7291 (load "mml" 'noerror) 7334 (progn
7335 (load "message" 'noerror)
7336 (load "mml" 'noerror))
7337 (require 'message nil 'noerror)
7292 (require 'mml nil 'noerror)) 7338 (require 'mml nil 'noerror))
7339 (when (functionp 'message-mode)
7340 (funcall 'message-mode))
7341 (when (functionp 'mml-mode)
7342 (funcall 'mml-mode t))
7293 7343
7294 (when (and 7344 (when (and
7295 ;; We don't want to add another dependency. 7345 (eq major-mode 'message-mode)
7296 (functionp 'mml-insert-empty-tag) 7346 (boundp 'mml-mode)
7297 ;; 2nd parameter since Emacs 22. 7347 (symbol-value 'mml-mode))
7298 (condition-case nil 7348
7299 (list-buffers-noselect nil nil) 7349 (let* ((tramp-buf-regexp "\\*\\(debug \\)?tramp/")
7300 (t nil))) 7350 (buffer-list
7301 (let ((buffer-list 7351 (delq nil
7302 (delq nil 7352 (mapcar '(lambda (b)
7303 (mapcar '(lambda (b) 7353 (when (string-match tramp-buf-regexp (buffer-name b)) b))
7304 (when (string-match "^\\*\\(debug \\)?tramp/" (buffer-name b)) b)) 7354 (buffer-list))))
7305 (buffer-list)))) 7355 (curbuf (current-buffer)))
7306 (curbuf (current-buffer)))
7307 7356
7308 ;; There is at least one Tramp buffer. 7357 ;; There is at least one Tramp buffer.
7309 (when buffer-list 7358 (when buffer-list
7310 (switch-to-buffer (list-buffers-noselect nil buffer-list)) 7359 (switch-to-buffer (list-buffers-noselect nil))
7311 (delete-other-windows) 7360 (delete-other-windows)
7312 (setq buffer-read-only nil) 7361 (setq buffer-read-only nil)
7313 (goto-char (point-max)) 7362 (goto-char (point-min))
7363 (while (not (eobp))
7364 (if (re-search-forward tramp-buf-regexp (tramp-point-at-eol) t)
7365 (forward-line 1)
7366 (forward-line 0)
7367 (let ((start (point)))
7368 (forward-line 1)
7369 (kill-region start (point)))))
7314 (insert " 7370 (insert "
7315The buffer(s) above will be appended to this message. If you don't want 7371The buffer(s) above will be appended to this message. If you don't want
7316to append a buffer because it contains sensible data, or because the buffer 7372to append a buffer because it contains sensible data, or because the buffer
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el
index 12e56600f00..c8ef71eb9f3 100644
--- a/lisp/net/trampver.el
+++ b/lisp/net/trampver.el
@@ -2,7 +2,7 @@
2;;; trampver.el --- Transparent Remote Access, Multiple Protocol 2;;; trampver.el --- Transparent Remote Access, Multiple Protocol
3;;; lisp/trampver.el. Generated from trampver.el.in by configure. 3;;; lisp/trampver.el. Generated from trampver.el.in by configure.
4 4
5;; Copyright (C) 2003 Free Software Foundation, Inc. 5;; Copyright (C) 2003, 2005 Free Software Foundation, Inc.
6 6
7;; Author: Kai.Grossjohann@CS.Uni-Dortmund.DE 7;; Author: Kai.Grossjohann@CS.Uni-Dortmund.DE
8;; Keywords: comm, processes 8;; Keywords: comm, processes
@@ -30,7 +30,7 @@
30;; are auto-frobbed from configure.ac, so you should edit that file and run 30;; are auto-frobbed from configure.ac, so you should edit that file and run
31;; "autoconf && ./configure" to change them. 31;; "autoconf && ./configure" to change them.
32 32
33(defconst tramp-version "2.0.48" 33(defconst tramp-version "2.0.49"
34 "This version of Tramp.") 34 "This version of Tramp.")
35 35
36(defconst tramp-bug-report-address "tramp-devel@gnu.org" 36(defconst tramp-bug-report-address "tramp-devel@gnu.org"
diff --git a/lisp/net/webjump.el b/lisp/net/webjump.el
index 0fc47fafa85..23c54d5a09f 100644
--- a/lisp/net/webjump.el
+++ b/lisp/net/webjump.el
@@ -1,6 +1,6 @@
1;;; webjump.el --- programmable Web hotlist 1;;; webjump.el --- programmable Web hotlist
2 2
3;; Copyright (C) 1996, 1997, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 1996, 1997, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Neil W. Van Dyke <nwv@acm.org> 5;; Author: Neil W. Van Dyke <nwv@acm.org>
6;; Created: 09-Aug-1996 6;; Created: 09-Aug-1996
diff --git a/lisp/net/zone-mode.el b/lisp/net/zone-mode.el
index 6b4d22f9b13..c7999616375 100644
--- a/lisp/net/zone-mode.el
+++ b/lisp/net/zone-mode.el
@@ -1,6 +1,6 @@
1;;; zone-mode.el --- major mode for editing DNS zone files 1;;; zone-mode.el --- major mode for editing DNS zone files
2 2
3;; Copyright (C) 1998 Free Software Foundation, Inc. 3;; Copyright (C) 1998, 2005 Free Software Foundation, Inc.
4 4
5;; Author: John Heidemann <johnh@isi.edu> 5;; Author: John Heidemann <johnh@isi.edu>
6;; Keywords: DNS, languages 6;; Keywords: DNS, languages
diff --git a/lisp/newcomment.el b/lisp/newcomment.el
index 5a7b7666e89..59044da6ef9 100644
--- a/lisp/newcomment.el
+++ b/lisp/newcomment.el
@@ -90,7 +90,8 @@ Major modes should set this variable.")
90 90
91(defcustom comment-fill-column nil 91(defcustom comment-fill-column nil
92 "Column to use for `comment-indent'. If nil, use `fill-column' instead." 92 "Column to use for `comment-indent'. If nil, use `fill-column' instead."
93 :type '(choice (const nil) integer)) 93 :type '(choice (const nil) integer)
94 :group 'comment)
94 95
95;;;###autoload 96;;;###autoload
96(defcustom comment-column 32 97(defcustom comment-column 32
@@ -99,7 +100,8 @@ Each mode establishes a different default value for this variable; you
99can set the value for a particular mode using that mode's hook. 100can set the value for a particular mode using that mode's hook.
100Comments might be indented to a value smaller than this in order 101Comments might be indented to a value smaller than this in order
101not to go beyond `comment-fill-column'." 102not to go beyond `comment-fill-column'."
102 :type 'integer) 103 :type 'integer
104 :group 'comment)
103(make-variable-buffer-local 'comment-column) 105(make-variable-buffer-local 'comment-column)
104 106
105;;;###autoload 107;;;###autoload
@@ -201,7 +203,8 @@ INDENT specifies that the `comment-start' markers should not be put at the
201See `comment-styles' for a list of available styles." 203See `comment-styles' for a list of available styles."
202 :type (if (boundp 'comment-styles) 204 :type (if (boundp 'comment-styles)
203 `(choice ,@(mapcar (lambda (s) `(const ,(car s))) comment-styles)) 205 `(choice ,@(mapcar (lambda (s) `(const ,(car s))) comment-styles))
204 'symbol)) 206 'symbol)
207 :group 'comment)
205 208
206;;;###autoload 209;;;###autoload
207(defcustom comment-padding " " 210(defcustom comment-padding " "
@@ -211,7 +214,8 @@ of the corresponding number of spaces.
211 214
212Extra spacing between the comment characters and the comment text 215Extra spacing between the comment characters and the comment text
213makes the comment easier to read. Default is 1. nil means 0." 216makes the comment easier to read. Default is 1. nil means 0."
214 :type '(choice string integer (const nil))) 217 :type '(choice string integer (const nil))
218 :group 'comment)
215 219
216;;;###autoload 220;;;###autoload
217(defcustom comment-multi-line nil 221(defcustom comment-multi-line nil
@@ -222,7 +226,8 @@ customize this variable.
222 226
223It also affects \\[indent-new-comment-line]. However, if you want this 227It also affects \\[indent-new-comment-line]. However, if you want this
224behavior for explicit filling, you might as well use \\[newline-and-indent]." 228behavior for explicit filling, you might as well use \\[newline-and-indent]."
225 :type 'boolean) 229 :type 'boolean
230 :group 'comment)
226 231
227(defcustom comment-empty-lines nil 232(defcustom comment-empty-lines nil
228 "If nil, `comment-region' does not comment out empty lines. 233 "If nil, `comment-region' does not comment out empty lines.
@@ -231,7 +236,8 @@ if `eol' it only comments out empty lines if comments are
231terminated by the end of line (i.e. `comment-end' is empty)." 236terminated by the end of line (i.e. `comment-end' is empty)."
232 :type '(choice (const :tag "Never" nil) 237 :type '(choice (const :tag "Never" nil)
233 (const :tag "Always" t) 238 (const :tag "Always" t)
234 (const :tag "EOl-terminated" 'eol))) 239 (const :tag "EOl-terminated" 'eol))
240 :group 'comment)
235 241
236;;;; 242;;;;
237;;;; Helpers 243;;;; Helpers
@@ -1091,7 +1097,8 @@ Else, call `comment-indent'."
1091(defcustom comment-auto-fill-only-comments nil 1097(defcustom comment-auto-fill-only-comments nil
1092 "Non-nil means to only auto-fill inside comments. 1098 "Non-nil means to only auto-fill inside comments.
1093This has no effect in modes that do not define a comment syntax." 1099This has no effect in modes that do not define a comment syntax."
1094 :type 'boolean) 1100 :type 'boolean
1101 :group 'comment)
1095 1102
1096(defun comment-valid-prefix-p (prefix compos) 1103(defun comment-valid-prefix-p (prefix compos)
1097 (or 1104 (or
diff --git a/lisp/obsolete/rsz-mini.el b/lisp/obsolete/rsz-mini.el
index d44a88df801..a90cb625dc5 100644
--- a/lisp/obsolete/rsz-mini.el
+++ b/lisp/obsolete/rsz-mini.el
@@ -63,7 +63,8 @@
63 63
64;;;###autoload 64;;;###autoload
65(defcustom resize-minibuffer-frame-max-height nil 65(defcustom resize-minibuffer-frame-max-height nil
66 "*This variable is obsolete.") 66 "*This variable is obsolete."
67 :group 'resize-minibuffer)
67 68
68;;;###autoload 69;;;###autoload
69(defcustom resize-minibuffer-frame-exactly t 70(defcustom resize-minibuffer-frame-exactly t
diff --git a/lisp/play/gametree.el b/lisp/play/gametree.el
index f79ded4955e..abab58d6018 100644
--- a/lisp/play/gametree.el
+++ b/lisp/play/gametree.el
@@ -204,12 +204,12 @@ should be no leading white space."
204 gametree-half-ply-regexp "\\)")) 204 gametree-half-ply-regexp "\\)"))
205 (limit (save-excursion (beginning-of-line 1) (point)))) 205 (limit (save-excursion (beginning-of-line 1) (point))))
206 (if (looking-at boundary) 206 (if (looking-at boundary)
207 (+ (* 2 (string-to-int (match-string 1))) 207 (+ (* 2 (string-to-number (match-string 1)))
208 (if (string-match gametree-half-ply-regexp (match-string 2)) 1 0)) 208 (if (string-match gametree-half-ply-regexp (match-string 2)) 1 0))
209 (save-excursion 209 (save-excursion
210 (re-search-backward boundary limit) 210 (re-search-backward boundary limit)
211 (skip-chars-backward "0123456789") 211 (skip-chars-backward "0123456789")
212 (1+ (* 2 (string-to-int 212 (1+ (* 2 (string-to-number
213 (buffer-substring (point) (match-end 1)))))))))) 213 (buffer-substring (point) (match-end 1))))))))))
214 214
215(defun gametree-current-branch-ply () 215(defun gametree-current-branch-ply ()
@@ -345,7 +345,7 @@ This value is simply the outline heading level of the current line."
345 "Return score of current variation according to its score tag. 345 "Return score of current variation according to its score tag.
346When no score tag is present, use the value of `gametree-default-score'." 346When no score tag is present, use the value of `gametree-default-score'."
347 (if (looking-at gametree-score-regexp) 347 (if (looking-at gametree-score-regexp)
348 (string-to-int (match-string 3)) 348 (string-to-number (match-string 3))
349 gametree-default-score)) 349 gametree-default-score))
350 350
351(defun gametree-compute-reduced-score () 351(defun gametree-compute-reduced-score ()
diff --git a/lisp/progmodes/ada-xref.el b/lisp/progmodes/ada-xref.el
index e7eb0657eac..8dba21afe9b 100644
--- a/lisp/progmodes/ada-xref.el
+++ b/lisp/progmodes/ada-xref.el
@@ -672,7 +672,7 @@ file. If none is set, return nil."
672 (not (integerp choice)) 672 (not (integerp choice))
673 (< choice 1) 673 (< choice 1)
674 (> choice (length prj-files))) 674 (> choice (length prj-files)))
675 (setq choice (string-to-int 675 (setq choice (string-to-number
676 (read-from-minibuffer "Enter No. of your choice: ")))) 676 (read-from-minibuffer "Enter No. of your choice: "))))
677 (set 'selected (nth (1- choice) prj-files)))) 677 (set 'selected (nth (1- choice) prj-files))))
678 678
@@ -1800,7 +1800,7 @@ This function is disabled for operators, and only works for identifiers."
1800 (< choice 1) 1800 (< choice 1)
1801 (> choice len)) 1801 (> choice len))
1802 (setq choice 1802 (setq choice
1803 (string-to-int 1803 (string-to-number
1804 (read-from-minibuffer "Enter No. of your choice: ")))) 1804 (read-from-minibuffer "Enter No. of your choice: "))))
1805 ) 1805 )
1806 (set-buffer ali-buffer) 1806 (set-buffer ali-buffer)
@@ -1988,7 +1988,7 @@ is using."
1988 (< choice 1) 1988 (< choice 1)
1989 (> choice (length list))) 1989 (> choice (length list)))
1990 (setq choice 1990 (setq choice
1991 (string-to-int 1991 (string-to-number
1992 (read-from-minibuffer "Enter No. of your choice: ")))) 1992 (read-from-minibuffer "Enter No. of your choice: "))))
1993 ) 1993 )
1994 (set 'choice (1- choice)) 1994 (set 'choice (1- choice))
diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el
index 1a35fe41860..03587577f59 100644
--- a/lisp/progmodes/antlr-mode.el
+++ b/lisp/progmodes/antlr-mode.el
@@ -785,6 +785,7 @@ bound to `antlr-language'. For example, with value
785 \((java-mode \. 2) (c++-mode \. 0)) 785 \((java-mode \. 2) (c++-mode \. 0))
786Java actions are fontified with level 2 and C++ actions are not 786Java actions are fontified with level 2 and C++ actions are not
787fontified at all." 787fontified at all."
788 :group 'antlr
788 :type '(choice (const :tag "None" none) 789 :type '(choice (const :tag "None" none)
789 (const :tag "Inherit" inherit) 790 (const :tag "Inherit" inherit)
790 (const :tag "Default" nil) 791 (const :tag "Default" nil)
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index ea36064412f..0a4cb6c8cd6 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -335,7 +335,8 @@ This function does not do any hidden buffer changes."
335;; locking is in use. This variable is extended with the face in 335;; locking is in use. This variable is extended with the face in
336;; `c-doc-face-name' when fontification is activated in cc-fonts.el. 336;; `c-doc-face-name' when fontification is activated in cc-fonts.el.
337(defvar c-literal-faces 337(defvar c-literal-faces
338 '(font-lock-comment-face font-lock-string-face)) 338 '(font-lock-comment-face font-lock-string-face
339 font-lock-comment-delimiter-face))
339 340
340(defun c-shift-line-indentation (shift-amt) 341(defun c-shift-line-indentation (shift-amt)
341 ;; This function does not do any hidden buffer changes. 342 ;; This function does not do any hidden buffer changes.
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index 74efef4133f..26c0bdaf60f 100644
--- a/lisp/progmodes/cc-fonts.el
+++ b/lisp/progmodes/cc-fonts.el
@@ -673,7 +673,7 @@ casts and declarations are fontified. Used on level 2 and higher."
673 (c-font-lock-objc-iip-decl))) 673 (c-font-lock-objc-iip-decl)))
674 nil)))))) 674 nil))))))
675 675
676 ("!" . font-lock-negation-char-face) 676 ("\\(!\\)[^=]" 1 font-lock-negation-char-face)
677 )) 677 ))
678 678
679(defun c-font-lock-complex-decl-prepare (limit) 679(defun c-font-lock-complex-decl-prepare (limit)
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index f5180b1fb48..ad43228a100 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -119,6 +119,10 @@ nil means compute the name with `(concat \"*\" (downcase major-mode) \"*\")'.")
119It is called with two arguments: the compilation buffer, and a string 119It is called with two arguments: the compilation buffer, and a string
120describing how the process finished.") 120describing how the process finished.")
121 121
122(make-obsolete-variable 'compilation-finish-function
123 "Use `compilation-finish-functions', but it works a little differently."
124 "22.1")
125
122;;;###autoload 126;;;###autoload
123(defvar compilation-finish-functions nil 127(defvar compilation-finish-functions nil
124 "Functions to call when a compilation process finishes. 128 "Functions to call when a compilation process finishes.
@@ -1247,8 +1251,7 @@ Optional argument MINOR indicates this is called from
1247 (make-local-variable 'compilation-messages-start) 1251 (make-local-variable 'compilation-messages-start)
1248 (make-local-variable 'compilation-error-screen-columns) 1252 (make-local-variable 'compilation-error-screen-columns)
1249 (make-local-variable 'overlay-arrow-position) 1253 (make-local-variable 'overlay-arrow-position)
1250 (set (make-local-variable 'overlay-arrow-string) 1254 (set (make-local-variable 'overlay-arrow-string) "")
1251 (if (display-graphic-p) "=>" ""))
1252 (setq next-error-overlay-arrow-position nil) 1255 (setq next-error-overlay-arrow-position nil)
1253 (add-hook 'kill-buffer-hook 1256 (add-hook 'kill-buffer-hook
1254 (lambda () (setq next-error-overlay-arrow-position nil)) nil t) 1257 (lambda () (setq next-error-overlay-arrow-position nil)) nil t)
@@ -1575,9 +1578,12 @@ region and the first line of the next region."
1575 (setcdr loc (list line file marker))) 1578 (setcdr loc (list line file marker)))
1576 loc)) 1579 loc))
1577 1580
1578(defcustom compilation-context-lines 0 1581(defcustom compilation-context-lines nil
1579 "*Display this many lines of leading context before message. 1582 "Display this many lines of leading context before the current message.
1580If nil, don't scroll the compilation output window." 1583If nil and the left fringe is displayed, don't scroll the
1584compilation output window; an arrow in the left fringe points to
1585the current message. If nil and there is no left fringe, the message
1586displays at the top of the window; there is no arrow."
1581 :type '(choice integer (const :tag "No window scrolling" nil)) 1587 :type '(choice integer (const :tag "No window scrolling" nil))
1582 :group 'compilation 1588 :group 'compilation
1583 :version "22.1") 1589 :version "22.1")
@@ -1586,10 +1592,17 @@ If nil, don't scroll the compilation output window."
1586 "Align the compilation output window W with marker MK near top." 1592 "Align the compilation output window W with marker MK near top."
1587 (if (integerp compilation-context-lines) 1593 (if (integerp compilation-context-lines)
1588 (set-window-start w (save-excursion 1594 (set-window-start w (save-excursion
1589 (goto-char mk) 1595 (goto-char mk)
1590 (beginning-of-line (- 1 compilation-context-lines)) 1596 (beginning-of-line
1591 (point)))) 1597 (- 1 compilation-context-lines))
1592 (set-window-point w mk)) 1598 (point)))
1599 ;; If there is no left fringe.
1600 (if (equal (car (window-fringes)) 0)
1601 (set-window-start w (save-excursion
1602 (goto-char mk)
1603 (beginning-of-line 1)
1604 (point)))))
1605 (set-window-point w mk))
1593 1606
1594(defvar next-error-highlight-timer) 1607(defvar next-error-highlight-timer)
1595 1608
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index e32a43ede9e..436bc04d044 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -120,7 +120,7 @@
120 ;; Probably will not work due to some save-excursion??? 120 ;; Probably will not work due to some save-excursion???
121 ;; Or save-file-position? 121 ;; Or save-file-position?
122 ;; (message "Did I get to line %s?" (elt (, elt) 1)) 122 ;; (message "Did I get to line %s?" (elt (, elt) 1))
123 `(goto-line (string-to-int (elt ,elt 1)))) 123 `(goto-line (string-to-number (elt ,elt 1))))
124 ;;) 124 ;;)
125 (defmacro cperl-etags-goto-tag-location (elt) 125 (defmacro cperl-etags-goto-tag-location (elt)
126 `(etags-goto-tag-location ,elt)))) 126 `(etags-goto-tag-location ,elt))))
diff --git a/lisp/progmodes/delphi.el b/lisp/progmodes/delphi.el
index 4ebbc549697..8d3ee554026 100644
--- a/lisp/progmodes/delphi.el
+++ b/lisp/progmodes/delphi.el
@@ -1530,7 +1530,7 @@ before the indent, the point is moved to the indent."
1530 (save-selected-window 1530 (save-selected-window
1531 (switch-to-buffer-other-window to-buffer) 1531 (switch-to-buffer-other-window to-buffer)
1532 (goto-char (point-max)) 1532 (goto-char (point-max))
1533 (set-window-dot (get-buffer-window to-buffer) (point)) 1533 (set-window-point (get-buffer-window to-buffer) (point))
1534 (insert the-msg)))) 1534 (insert the-msg))))
1535 1535
1536;; Debugging helpers: 1536;; Debugging helpers:
diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el
index 457c00d9008..6dd15897e7b 100644
--- a/lisp/progmodes/ebrowse.el
+++ b/lisp/progmodes/ebrowse.el
@@ -1448,10 +1448,10 @@ Pop to member buffer if no prefix ARG, to tree buffer otherwise."
1448(defun ebrowse-set-tree-indentation () 1448(defun ebrowse-set-tree-indentation ()
1449 "Set the indentation width of the tree display." 1449 "Set the indentation width of the tree display."
1450 (interactive) 1450 (interactive)
1451 (let ((width (string-to-int (read-from-minibuffer 1451 (let ((width (string-to-number (read-from-minibuffer
1452 (concat "Indentation (" 1452 (concat "Indentation ("
1453 (int-to-string ebrowse--indentation) 1453 (int-to-string ebrowse--indentation)
1454 "): "))))) 1454 "): ")))))
1455 (when (plusp width) 1455 (when (plusp width)
1456 (setf ebrowse--indentation width) 1456 (setf ebrowse--indentation width)
1457 (ebrowse-redraw-tree)))) 1457 (ebrowse-redraw-tree))))
@@ -2329,7 +2329,7 @@ With prefix ARG, switch to the tree buffer else pop to it."
2329 "Set the column width of the member display. 2329 "Set the column width of the member display.
2330The new width is read from the minibuffer." 2330The new width is read from the minibuffer."
2331 (interactive) 2331 (interactive)
2332 (let ((width (string-to-int 2332 (let ((width (string-to-number
2333 (read-from-minibuffer 2333 (read-from-minibuffer
2334 (concat "Column width (" 2334 (concat "Column width ("
2335 (int-to-string (if ebrowse--long-display-flag 2335 (int-to-string (if ebrowse--long-display-flag
@@ -4313,7 +4313,7 @@ NUMBER-OF-STATIC-VARIABLES:"
4313 "Select the nth entry in the list by the keys 1..9." 4313 "Select the nth entry in the list by the keys 1..9."
4314 (interactive) 4314 (interactive)
4315 (let* ((maxlin (count-lines (point-min) (point-max))) 4315 (let* ((maxlin (count-lines (point-min) (point-max)))
4316 (n (min maxlin (+ 2 (string-to-int (this-command-keys)))))) 4316 (n (min maxlin (+ 2 (string-to-number (this-command-keys))))))
4317 (goto-line n) 4317 (goto-line n)
4318 (throw 'electric-buffer-menu-select (point)))) 4318 (throw 'electric-buffer-menu-select (point))))
4319 4319
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index 0569d26db61..32ede0e1474 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -1283,16 +1283,16 @@ where they were found."
1283 1283
1284 1284
1285 (if (looking-at "[0-9]") 1285 (if (looking-at "[0-9]")
1286 (setq line (string-to-int (buffer-substring 1286 (setq line (string-to-number (buffer-substring
1287 (point) 1287 (point)
1288 (progn (skip-chars-forward "0-9") 1288 (progn (skip-chars-forward "0-9")
1289 (point)))))) 1289 (point))))))
1290 (search-forward ",") 1290 (search-forward ",")
1291 (if (looking-at "[0-9]") 1291 (if (looking-at "[0-9]")
1292 (setq startpos (string-to-int (buffer-substring 1292 (setq startpos (string-to-number (buffer-substring
1293 (point) 1293 (point)
1294 (progn (skip-chars-forward "0-9") 1294 (progn (skip-chars-forward "0-9")
1295 (point))))))) 1295 (point)))))))
1296 ;; Leave point on the next line of the tags file. 1296 ;; Leave point on the next line of the tags file.
1297 (forward-line 1) 1297 (forward-line 1)
1298 (cons tag-text (cons line startpos)))) 1298 (cons tag-text (cons line startpos))))
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index a2fa660bff0..5463ee3ffa9 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -1004,7 +1004,7 @@ Return its components if so, nil if no."
1004 (line-idx (nth 2 (car patterns)))) 1004 (line-idx (nth 2 (car patterns))))
1005 1005
1006 (setq raw-file-name (if file-idx (match-string file-idx line) nil)) 1006 (setq raw-file-name (if file-idx (match-string file-idx line) nil))
1007 (setq line-no (if line-idx (string-to-int (match-string line-idx line)) 0)) 1007 (setq line-no (if line-idx (string-to-number (match-string line-idx line)) 0))
1008 (setq err-text (if (> (length (car patterns)) 4) 1008 (setq err-text (if (> (length (car patterns)) 4)
1009 (match-string (nth 4 (car patterns)) line) 1009 (match-string (nth 4 (car patterns)) line)
1010 (flymake-patch-err-text (substring line (match-end 0))))) 1010 (flymake-patch-err-text (substring line (match-end 0)))))
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 5c81ba7f6f9..4c95fc65d58 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -3215,7 +3215,7 @@ This event can be examined by forms in GUD-TOOLTIP-DISPLAY.")
3215 (add-hook 'tooltip-hook 'gud-tooltip-tips) 3215 (add-hook 'tooltip-hook 'gud-tooltip-tips)
3216 (define-key global-map [mouse-movement] 'gud-tooltip-mouse-motion)) 3216 (define-key global-map [mouse-movement] 'gud-tooltip-mouse-motion))
3217 (unless tooltip-mode (remove-hook 'pre-command-hook 'tooltip-hide) 3217 (unless tooltip-mode (remove-hook 'pre-command-hook 'tooltip-hide)
3218 (remove-hook 'change-major-mode-hook 'tooltip-change-major-mode) 3218 (remove-hook 'change-major-mode-hook 'gud-tooltip-change-major-mode)
3219 (remove-hook 'tooltip-hook 'gud-tooltip-tips) 3219 (remove-hook 'tooltip-hook 'gud-tooltip-tips)
3220 (define-key global-map [mouse-movement] 'ignore))) 3220 (define-key global-map [mouse-movement] 'ignore)))
3221 (gud-tooltip-activate-mouse-motions-if-enabled) 3221 (gud-tooltip-activate-mouse-motions-if-enabled)
@@ -3253,7 +3253,7 @@ If GUD-TOOLTIP-DEREFERENCE is t, also prepend a `*' to EXPR."
3253 (when gud-tooltip-dereference 3253 (when gud-tooltip-dereference
3254 (setq expr (concat "*" expr))) 3254 (setq expr (concat "*" expr)))
3255 (case gud-minor-mode 3255 (case gud-minor-mode
3256 ((gdb gdba) (concat "server print " expr)) 3256 (gdba (concat "server print " expr))
3257 ((dbx gdbmi) (concat "print " expr)) 3257 ((dbx gdbmi) (concat "print " expr))
3258 (xdb (concat "p " expr)) 3258 (xdb (concat "p " expr))
3259 (sdb (concat expr "/")) 3259 (sdb (concat expr "/"))
@@ -3293,6 +3293,10 @@ This function must return nil if it doesn't handle EVENT."
3293 (tooltip-show (cdr define-elt)) 3293 (tooltip-show (cdr define-elt))
3294 expr)))) 3294 expr))))
3295 (let ((cmd (gud-tooltip-print-command expr))) 3295 (let ((cmd (gud-tooltip-print-command expr)))
3296 (when (and gud-tooltip-mode (eq gud-minor-mode 'gdb))
3297 (gud-tooltip-mode -1)
3298 (message-box "Using GUD tooltips in this mode is unsafe\n\
3299so they have been disabled."))
3296 (unless (null cmd) ; CMD can be nil if unknown debugger 3300 (unless (null cmd) ; CMD can be nil if unknown debugger
3297 (if (memq gud-minor-mode '(gdba gdbmi)) 3301 (if (memq gud-minor-mode '(gdba gdbmi))
3298 (if gdb-macro-info 3302 (if gdb-macro-info
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el
index 221a6f4aebb..77244819f1b 100644
--- a/lisp/progmodes/idlw-shell.el
+++ b/lisp/progmodes/idlw-shell.el
@@ -45,7 +45,7 @@
45;; 45;;
46;; INSTALLATION: 46;; INSTALLATION:
47;; ============= 47;; =============
48;; 48;;
49;; Follow the instructions in the INSTALL file of the distribution. 49;; Follow the instructions in the INSTALL file of the distribution.
50;; In short, put this file on your load path and add the following 50;; In short, put this file on your load path and add the following
51;; lines to your .emacs file: 51;; lines to your .emacs file:
@@ -58,9 +58,9 @@
58;; 58;;
59;; The newest version of this file can be found on the maintainers 59;; The newest version of this file can be found on the maintainers
60;; web site. 60;; web site.
61;; 61;;
62;; http://idlwave.org 62;; http://idlwave.org
63;; 63;;
64;; DOCUMENTATION 64;; DOCUMENTATION
65;; ============= 65;; =============
66;; 66;;
@@ -77,7 +77,7 @@
77;; it is a bug in XEmacs. 77;; it is a bug in XEmacs.
78;; The Debug menu in source buffers *does* display the bindings correctly. 78;; The Debug menu in source buffers *does* display the bindings correctly.
79;; 79;;
80;; 80;;
81;; CUSTOMIZATION VARIABLES 81;; CUSTOMIZATION VARIABLES
82;; ======================= 82;; =======================
83;; 83;;
@@ -101,12 +101,12 @@
101 (condition-case () (require 'custom) (error nil)) 101 (condition-case () (require 'custom) (error nil))
102 (if (and (featurep 'custom) 102 (if (and (featurep 'custom)
103 (fboundp 'custom-declare-variable) 103 (fboundp 'custom-declare-variable)
104 (fboundp 'defface)) 104 (fboundp 'defface))
105 ;; We've got what we needed 105 ;; We've got what we needed
106 (setq idlwave-shell-have-new-custom t) 106 (setq idlwave-shell-have-new-custom t)
107 ;; We have the old or no custom-library, hack around it! 107 ;; We have the old or no custom-library, hack around it!
108 (defmacro defgroup (&rest args) nil) 108 (defmacro defgroup (&rest args) nil)
109 (defmacro defcustom (var value doc &rest args) 109 (defmacro defcustom (var value doc &rest args)
110 `(defvar ,var ,value ,doc)))) 110 `(defvar ,var ,value ,doc))))
111 111
112;;; Customizations: idlwave-shell group 112;;; Customizations: idlwave-shell group
@@ -118,10 +118,10 @@
118 :group 'idlwave) 118 :group 'idlwave)
119 119
120(defcustom idlwave-shell-prompt-pattern "^ ?IDL> " 120(defcustom idlwave-shell-prompt-pattern "^ ?IDL> "
121 "*Regexp to match IDL prompt at beginning of a line. 121 "*Regexp to match IDL prompt at beginning of a line.
122For example, \"^IDL> \" or \"^WAVE> \". 122For example, \"^IDL> \" or \"^WAVE> \".
123The \"^\" means beginning of line, and is required. 123The \"^\" means beginning of line, and is required.
124This variable is used to initialize `comint-prompt-regexp' in the 124This variable is used to initialize `comint-prompt-regexp' in the
125process buffer. 125process buffer.
126 126
127This is a fine thing to set in your `.emacs' file." 127This is a fine thing to set in your `.emacs' file."
@@ -210,7 +210,7 @@ So by default setting a breakpoint will be on C-c C-d C-b."
210 :type 'boolean) 210 :type 'boolean)
211 211
212(defcustom idlwave-shell-automatic-electric-debug 'breakpoint 212(defcustom idlwave-shell-automatic-electric-debug 'breakpoint
213 "Enter the electric-debug minor mode automatically. 213 "Enter the electric-debug minor mode automatically.
214This occurs at a breakpoint or any other halt. The mode is exited 214This occurs at a breakpoint or any other halt. The mode is exited
215upon return to the main level. Can be set to 'breakpoint to enter 215upon return to the main level. Can be set to 'breakpoint to enter
216electric debug mode only when breakpoints are tripped." 216electric debug mode only when breakpoints are tripped."
@@ -295,7 +295,7 @@ The history is only saved if the variable `idlwave-shell-save-command-history'
295is non-nil." 295is non-nil."
296 :group 'idlwave-shell-command-setup 296 :group 'idlwave-shell-command-setup
297 :type 'file) 297 :type 'file)
298 298
299(defcustom idlwave-shell-show-commands 299(defcustom idlwave-shell-show-commands
300 '(run misc breakpoint) 300 '(run misc breakpoint)
301 "*A list of command types to show output from in the shell. 301 "*A list of command types to show output from in the shell.
@@ -306,12 +306,12 @@ the copious shell traffic to be displayed."
306 :type '(choice 306 :type '(choice
307 (const everything) 307 (const everything)
308 (set :tag "Checklist" :greedy t 308 (set :tag "Checklist" :greedy t
309 (const :tag "All .run and .compile commands" run) 309 (const :tag "All .run and .compile commands" run)
310 (const :tag "All breakpoint commands" breakpoint) 310 (const :tag "All breakpoint commands" breakpoint)
311 (const :tag "All debug and stepping commands" debug) 311 (const :tag "All debug and stepping commands" debug)
312 (const :tag "Close, window, retall, etc. commands" misc)))) 312 (const :tag "Close, window, retall, etc. commands" misc))))
313 313
314(defcustom idlwave-shell-examine-alist 314(defcustom idlwave-shell-examine-alist
315 '(("Print" . "print,___") 315 '(("Print" . "print,___")
316 ("Help" . "help,___") 316 ("Help" . "help,___")
317 ("Structure Help" . "help,___,/STRUCTURE") 317 ("Structure Help" . "help,___,/STRUCTURE")
@@ -322,14 +322,14 @@ the copious shell traffic to be displayed."
322 ("Ptr Valid" . "print,ptr_valid(___)") 322 ("Ptr Valid" . "print,ptr_valid(___)")
323 ("Widget Valid" . "print,widget_info(___,/VALID)") 323 ("Widget Valid" . "print,widget_info(___,/VALID)")
324 ("Widget Geometry" . "help,widget_info(___,/GEOMETRY)")) 324 ("Widget Geometry" . "help,widget_info(___,/GEOMETRY)"))
325 "Alist of special examine commands for popup selection. 325 "Alist of special examine commands for popup selection.
326The keys are used in the selection popup created by 326The keys are used in the selection popup created by
327`idlwave-shell-examine-select', and the corresponding value is sent as 327`idlwave-shell-examine-select', and the corresponding value is sent as
328a command to the shell, with special sequence `___' replaced by the 328a command to the shell, with special sequence `___' replaced by the
329expression being examined." 329expression being examined."
330 :group 'idlwave-shell-command-setup 330 :group 'idlwave-shell-command-setup
331 :type '(repeat 331 :type '(repeat
332 (cons 332 (cons
333 (string :tag "Label ") 333 (string :tag "Label ")
334 (string :tag "Command")))) 334 (string :tag "Command"))))
335 335
@@ -340,7 +340,7 @@ expression being examined."
340 "*Non-nil mean, put output of examine commands in their own buffer." 340 "*Non-nil mean, put output of examine commands in their own buffer."
341 :group 'idlwave-shell-command-setup 341 :group 'idlwave-shell-command-setup
342 :type 'boolean) 342 :type 'boolean)
343 343
344(defcustom idlwave-shell-comint-settings 344(defcustom idlwave-shell-comint-settings
345 '((comint-scroll-to-bottom-on-input . t) 345 '((comint-scroll-to-bottom-on-input . t)
346 (comint-scroll-to-bottom-on-output . t) 346 (comint-scroll-to-bottom-on-output . t)
@@ -403,7 +403,7 @@ strings. Here is some example code which makes use of the default spells.
403 answer = GET_KBRD(1) 403 answer = GET_KBRD(1)
404 404
405Since the IDLWAVE shell defines the system variable `!IDLWAVE_VERSION', 405Since the IDLWAVE shell defines the system variable `!IDLWAVE_VERSION',
406you could actually check if you are running under Emacs before printing 406you could actually check if you are running under Emacs before printing
407the magic strings. Here is a procedure which uses this. 407the magic strings. Here is a procedure which uses this.
408 408
409Usage: 409Usage:
@@ -420,7 +420,7 @@ pro idlwave_char_input,on=on,off=off
420 if keyword_set(on) then print,'<chars>' $ 420 if keyword_set(on) then print,'<chars>' $
421 else if keyword_set(off) then print,'</chars>' $ 421 else if keyword_set(off) then print,'</chars>' $
422 else print,'<onechar>' 422 else print,'<onechar>'
423 endif 423 endif
424end" 424end"
425 :group 'idlwave-shell-command-setup 425 :group 'idlwave-shell-command-setup
426 :type '(list 426 :type '(list
@@ -478,10 +478,10 @@ line where IDL is stopped. See also `idlwave-shell-mark-stop-line'."
478 :group 'idlwave-shell-highlighting-and-faces 478 :group 'idlwave-shell-highlighting-and-faces
479 :type 'string) 479 :type 'string)
480 480
481(defcustom idlwave-shell-electric-stop-line-face 481(defcustom idlwave-shell-electric-stop-line-face
482 (prog1 482 (prog1
483 (copy-face 'modeline 'idlwave-shell-electric-stop-line-face) 483 (copy-face 'modeline 'idlwave-shell-electric-stop-line-face)
484 (set-face-background 'idlwave-shell-electric-stop-line-face 484 (set-face-background 'idlwave-shell-electric-stop-line-face
485 idlwave-shell-electric-stop-color) 485 idlwave-shell-electric-stop-color)
486 (condition-case nil 486 (condition-case nil
487 (set-face-foreground 'idlwave-shell-electric-stop-line-face nil) 487 (set-face-foreground 'idlwave-shell-electric-stop-line-face nil)
@@ -527,7 +527,7 @@ lines which have a breakpoint. See also `idlwave-shell-mark-breakpoints'."
527 ;; Just copy the underline face to be on the safe side. 527 ;; Just copy the underline face to be on the safe side.
528 (copy-face 'underline 'idlwave-shell-bp-face)) 528 (copy-face 'underline 'idlwave-shell-bp-face))
529 529
530(defcustom idlwave-shell-disabled-breakpoint-face 530(defcustom idlwave-shell-disabled-breakpoint-face
531 'idlwave-shell-disabled-bp-face 531 'idlwave-shell-disabled-bp-face
532 "*The face for disabled breakpoint lines in the source code. 532 "*The face for disabled breakpoint lines in the source code.
533Allows you to choose the font, color and other properties for 533Allows you to choose the font, color and other properties for
@@ -580,18 +580,18 @@ before use by the shell.")
580 580
581TYPE is either 'pro' or 'rinfo', and `idlwave-shell-temp-pro-file' or 581TYPE is either 'pro' or 'rinfo', and `idlwave-shell-temp-pro-file' or
582`idlwave-shell-temp-rinfo-save-file' is set (respectively)." 582`idlwave-shell-temp-rinfo-save-file' is set (respectively)."
583 (cond 583 (cond
584 ((eq type 'rinfo) 584 ((eq type 'rinfo)
585 (or idlwave-shell-temp-rinfo-save-file 585 (or idlwave-shell-temp-rinfo-save-file
586 (setq idlwave-shell-temp-rinfo-save-file 586 (setq idlwave-shell-temp-rinfo-save-file
587 (idlwave-shell-make-temp-file idlwave-shell-temp-pro-prefix)))) 587 (idlwave-shell-make-temp-file idlwave-shell-temp-pro-prefix))))
588 ((eq type 'pro) 588 ((eq type 'pro)
589 (or idlwave-shell-temp-pro-file 589 (or idlwave-shell-temp-pro-file
590 (setq idlwave-shell-temp-pro-file 590 (setq idlwave-shell-temp-pro-file
591 (idlwave-shell-make-temp-file idlwave-shell-temp-pro-prefix)))) 591 (idlwave-shell-make-temp-file idlwave-shell-temp-pro-prefix))))
592 (t (error "Wrong argument (idlwave-shell-temp-file): %s" 592 (t (error "Wrong argument (idlwave-shell-temp-file): %s"
593 (symbol-name type))))) 593 (symbol-name type)))))
594 594
595 595
596(defun idlwave-shell-make-temp-file (prefix) 596(defun idlwave-shell-make-temp-file (prefix)
597 "Create a temporary file." 597 "Create a temporary file."
@@ -619,7 +619,7 @@ TYPE is either 'pro' or 'rinfo', and `idlwave-shell-temp-pro-file' or
619 619
620 620
621(defvar idlwave-shell-dirstack-query "cd,current=___cur & print,___cur" 621(defvar idlwave-shell-dirstack-query "cd,current=___cur & print,___cur"
622 "Command used by `idlwave-shell-resync-dirs' to query IDL for 622 "Command used by `idlwave-shell-resync-dirs' to query IDL for
623the directory stack.") 623the directory stack.")
624 624
625(defvar idlwave-shell-path-query "print,'PATH:<'+transpose(expand_path(!PATH,/ARRAY))+'>' & print,'SYSDIR:<'+!dir+'>'" 625(defvar idlwave-shell-path-query "print,'PATH:<'+transpose(expand_path(!PATH,/ARRAY))+'>' & print,'SYSDIR:<'+!dir+'>'"
@@ -627,7 +627,7 @@ the directory stack.")
627 "The command which gets !PATH and !DIR info from the shell.") 627 "The command which gets !PATH and !DIR info from the shell.")
628 628
629(defvar idlwave-shell-mode-line-info nil 629(defvar idlwave-shell-mode-line-info nil
630 "Additional info displayed in the mode line") 630 "Additional info displayed in the mode line")
631 631
632(defvar idlwave-shell-default-directory nil 632(defvar idlwave-shell-default-directory nil
633 "The default directory in the idlwave-shell buffer, of outside use.") 633 "The default directory in the idlwave-shell buffer, of outside use.")
@@ -678,7 +678,7 @@ the directory stack.")
678 window-system) ; Window systems always 678 window-system) ; Window systems always
679 (progn 679 (progn
680 (setq idlwave-shell-stop-line-overlay (make-overlay 1 1)) 680 (setq idlwave-shell-stop-line-overlay (make-overlay 1 1))
681 (overlay-put idlwave-shell-stop-line-overlay 681 (overlay-put idlwave-shell-stop-line-overlay
682 'face idlwave-shell-stop-line-face)))) 682 'face idlwave-shell-stop-line-face))))
683 683
684 (t 684 (t
@@ -686,7 +686,7 @@ the directory stack.")
686 (if window-system 686 (if window-system
687 (progn 687 (progn
688 (setq idlwave-shell-stop-line-overlay (make-overlay 1 1)) 688 (setq idlwave-shell-stop-line-overlay (make-overlay 1 1))
689 (overlay-put idlwave-shell-stop-line-overlay 689 (overlay-put idlwave-shell-stop-line-overlay
690 'face idlwave-shell-stop-line-face))))) 690 'face idlwave-shell-stop-line-face)))))
691 691
692;; Now the expression and output overlays 692;; Now the expression and output overlays
@@ -747,7 +747,7 @@ with `*'s."
747 747
748;;; The following are the types of messages we attempt to catch to 748;;; The following are the types of messages we attempt to catch to
749;;; resync our idea of where IDL execution currently is. 749;;; resync our idea of where IDL execution currently is.
750;;; 750;;;
751 751
752(defvar idlwave-shell-halt-frame nil 752(defvar idlwave-shell-halt-frame nil
753 "The frame associated with halt/breakpoint messages.") 753 "The frame associated with halt/breakpoint messages.")
@@ -791,7 +791,7 @@ IDL has currently stepped.")
791 791
792(defconst idlwave-shell-electric-debug-help 792(defconst idlwave-shell-electric-debug-help
793 " ==> IDLWAVE Electric Debug Mode Help <== 793 " ==> IDLWAVE Electric Debug Mode Help <==
794 794
795 Break Point Setting and Clearing: 795 Break Point Setting and Clearing:
796 b Set breakpoint ([C-u b] for conditional, [C-n b] nth hit, etc.). 796 b Set breakpoint ([C-u b] for conditional, [C-n b] nth hit, etc.).
797 d Clear nearby breakpoint. 797 d Clear nearby breakpoint.
@@ -817,7 +817,7 @@ IDL has currently stepped.")
817 Examining Expressions (with prefix for examining the region): 817 Examining Expressions (with prefix for examining the region):
818 p Print expression near point or in region ([C-u p]). 818 p Print expression near point or in region ([C-u p]).
819 ? Help on expression near point or in region ([C-u ?]). 819 ? Help on expression near point or in region ([C-u ?]).
820 x Examine expression near point or in region ([C-u x]) with 820 x Examine expression near point or in region ([C-u x]) with
821 letter completion of the examine type. 821 letter completion of the examine type.
822 822
823 Miscellaneous: 823 Miscellaneous:
@@ -871,18 +871,18 @@ IDL has currently stepped.")
871 `\\[idlwave-routine-info]' displays information about an IDL routine near point, 871 `\\[idlwave-routine-info]' displays information about an IDL routine near point,
872 just like in `idlwave-mode'. The module used is the one at point or 872 just like in `idlwave-mode'. The module used is the one at point or
873 the one whose argument list is being edited. 873 the one whose argument list is being edited.
874 To update IDLWAVE's knowledge about compiled or edited modules, use 874 To update IDLWAVE's knowledge about compiled or edited modules, use
875 \\[idlwave-update-routine-info]. 875 \\[idlwave-update-routine-info].
876 \\[idlwave-find-module] find the source of a module. 876 \\[idlwave-find-module] find the source of a module.
877 \\[idlwave-resolve] tells IDL to compile an unresolved module. 877 \\[idlwave-resolve] tells IDL to compile an unresolved module.
878 \\[idlwave-context-help] shows the online help on the item at 878 \\[idlwave-context-help] shows the online help on the item at
879 point, if online help has been installed. 879 point, if online help has been installed.
880 880
881 881
8824. Debugging 8824. Debugging
883 --------- 883 ---------
884 A complete set of commands for compiling and debugging IDL programs 884 A complete set of commands for compiling and debugging IDL programs
885 is available from the menu. Also keybindings starting with a 885 is available from the menu. Also keybindings starting with a
886 `C-c C-d' prefix are available for most commands in the *idl* buffer 886 `C-c C-d' prefix are available for most commands in the *idl* buffer
887 and also in source buffers. The best place to learn about the 887 and also in source buffers. The best place to learn about the
888 keybindings is again the menu. 888 keybindings is again the menu.
@@ -974,8 +974,8 @@ IDL has currently stepped.")
974 (idlwave-shell-display-line nil) 974 (idlwave-shell-display-line nil)
975 (setq idlwave-shell-calling-stack-index 0) 975 (setq idlwave-shell-calling-stack-index 0)
976 (setq idlwave-shell-only-prompt-pattern 976 (setq idlwave-shell-only-prompt-pattern
977 (concat "\\`[ \t\n]*" 977 (concat "\\`[ \t\n]*"
978 (substring idlwave-shell-prompt-pattern 1) 978 (substring idlwave-shell-prompt-pattern 1)
979 "[ \t\n]*\\'")) 979 "[ \t\n]*\\'"))
980 980
981 (when idlwave-shell-query-for-class 981 (when idlwave-shell-query-for-class
@@ -1010,14 +1010,14 @@ IDL has currently stepped.")
1010 (while (setq entry (pop list)) 1010 (while (setq entry (pop list))
1011 (set (make-local-variable (car entry)) (cdr entry))))) 1011 (set (make-local-variable (car entry)) (cdr entry)))))
1012 1012
1013 1013
1014 (unless (memq 'comint-carriage-motion 1014 (unless (memq 'comint-carriage-motion
1015 (default-value 'comint-output-filter-functions)) 1015 (default-value 'comint-output-filter-functions))
1016 ;; Strip those pesky ctrl-m's. 1016 ;; Strip those pesky ctrl-m's.
1017 (add-hook 'comint-output-filter-functions 1017 (add-hook 'comint-output-filter-functions
1018 (lambda (string) 1018 (lambda (string)
1019 (when (string-match "\r" string) 1019 (when (string-match "\r" string)
1020 (let ((pmark (process-mark (get-buffer-process 1020 (let ((pmark (process-mark (get-buffer-process
1021 (current-buffer))))) 1021 (current-buffer)))))
1022 (save-excursion 1022 (save-excursion
1023 ;; bare CR -> delete preceding line 1023 ;; bare CR -> delete preceding line
@@ -1059,8 +1059,8 @@ IDL has currently stepped.")
1059 (idlwave-shell-send-command idlwave-shell-initial-commands nil 'hide) 1059 (idlwave-shell-send-command idlwave-shell-initial-commands nil 'hide)
1060 ;; Turn off IDL's ^d interpreting, and define a system 1060 ;; Turn off IDL's ^d interpreting, and define a system
1061 ;; variable which knows the version of IDLWAVE 1061 ;; variable which knows the version of IDLWAVE
1062 (idlwave-shell-send-command 1062 (idlwave-shell-send-command
1063 (format "defsysv,'!idlwave_version','%s',1" 1063 (format "defsysv,'!idlwave_version','%s',1"
1064 idlwave-mode-version) 1064 idlwave-mode-version)
1065 nil 'hide) 1065 nil 'hide)
1066 ;; Get the paths if they weren't read in from file 1066 ;; Get the paths if they weren't read in from file
@@ -1081,7 +1081,7 @@ IDL has currently stepped.")
1081 (setq idlwave-system-directory sysdir) 1081 (setq idlwave-system-directory sysdir)
1082 (put 'idlwave-system-directory 'from-shell t)) 1082 (put 'idlwave-system-directory 'from-shell t))
1083 ;; Preserve any existing flags 1083 ;; Preserve any existing flags
1084 (setq idlwave-path-alist 1084 (setq idlwave-path-alist
1085 (mapcar (lambda (x) 1085 (mapcar (lambda (x)
1086 (let ((old-entry (assoc x old-path-alist))) 1086 (let ((old-entry (assoc x old-path-alist)))
1087 (if old-entry 1087 (if old-entry
@@ -1089,7 +1089,7 @@ IDL has currently stepped.")
1089 (list x)))) 1089 (list x))))
1090 dirs)) 1090 dirs))
1091 (put 'idlwave-path-alist 'from-shell t) 1091 (put 'idlwave-path-alist 'from-shell t)
1092 (if idlwave-path-alist 1092 (if idlwave-path-alist
1093 (if (and idlwave-auto-write-paths 1093 (if (and idlwave-auto-write-paths
1094 (not idlwave-library-path) 1094 (not idlwave-library-path)
1095 (not no-write) ) 1095 (not no-write) )
@@ -1125,8 +1125,8 @@ IDL has currently stepped.")
1125 (frame (selected-frame))) 1125 (frame (selected-frame)))
1126 (catch 'exit 1126 (catch 'exit
1127 (while flist 1127 (while flist
1128 (if (not (eq (car flist) 1128 (if (not (eq (car flist)
1129 idlwave-shell-idl-wframe)) 1129 idlwave-shell-idl-wframe))
1130 (throw 'exit (car flist)) 1130 (throw 'exit (car flist))
1131 (setq flist (cdr flist)))))) 1131 (setq flist (cdr flist))))))
1132 (make-frame)) 1132 (make-frame))
@@ -1144,9 +1144,9 @@ IDL has currently stepped.")
1144 ;; We do not have a source frame, so we use this one. 1144 ;; We do not have a source frame, so we use this one.
1145 (setq idlwave-shell-display-wframe (selected-frame))) 1145 (setq idlwave-shell-display-wframe (selected-frame)))
1146 ;; Return a new frame 1146 ;; Return a new frame
1147 (setq idlwave-shell-idl-wframe 1147 (setq idlwave-shell-idl-wframe
1148 (make-frame idlwave-shell-frame-parameters))))) 1148 (make-frame idlwave-shell-frame-parameters)))))
1149 1149
1150;;;###autoload 1150;;;###autoload
1151(defun idlwave-shell (&optional arg quick) 1151(defun idlwave-shell (&optional arg quick)
1152 "Run an inferior IDL, with I/O through buffer `(idlwave-shell-buffer)'. 1152 "Run an inferior IDL, with I/O through buffer `(idlwave-shell-buffer)'.
@@ -1173,14 +1173,14 @@ See also the variable `idlwave-shell-prompt-pattern'.
1173 (delete-other-windows)) 1173 (delete-other-windows))
1174 (and idlwave-shell-use-dedicated-frame 1174 (and idlwave-shell-use-dedicated-frame
1175 (setq idlwave-shell-idl-wframe (selected-frame))) 1175 (setq idlwave-shell-idl-wframe (selected-frame)))
1176 (add-hook 'idlwave-shell-sentinel-hook 1176 (add-hook 'idlwave-shell-sentinel-hook
1177 'save-buffers-kill-emacs t)) 1177 'save-buffers-kill-emacs t))
1178 1178
1179 ;; A non-nil arg means, we want a dedicated frame. This will last 1179 ;; A non-nil arg means, we want a dedicated frame. This will last
1180 ;; for the current editing session. 1180 ;; for the current editing session.
1181 (if arg (setq idlwave-shell-use-dedicated-frame t)) 1181 (if arg (setq idlwave-shell-use-dedicated-frame t))
1182 (if (equal arg '(16)) (setq idlwave-shell-use-dedicated-frame nil)) 1182 (if (equal arg '(16)) (setq idlwave-shell-use-dedicated-frame nil))
1183 1183
1184 ;; Check if the process still exists. If not, create it. 1184 ;; Check if the process still exists. If not, create it.
1185 (unless (comint-check-proc (idlwave-shell-buffer)) 1185 (unless (comint-check-proc (idlwave-shell-buffer))
1186 (let* ((prg (or idlwave-shell-explicit-file-name "idl")) 1186 (let* ((prg (or idlwave-shell-explicit-file-name "idl"))
@@ -1207,9 +1207,9 @@ See also the variable `idlwave-shell-prompt-pattern'.
1207 (if (eq (selected-frame) (window-frame window)) 1207 (if (eq (selected-frame) (window-frame window))
1208 (select-window window)))) 1208 (select-window window))))
1209 ;; Save the paths at the end 1209 ;; Save the paths at the end
1210 (add-hook 'idlwave-shell-sentinel-hook 1210 (add-hook 'idlwave-shell-sentinel-hook
1211 (lambda () 1211 (lambda ()
1212 (if (and 1212 (if (and
1213 idlwave-auto-write-paths 1213 idlwave-auto-write-paths
1214 idlwave-path-alist 1214 idlwave-path-alist
1215 (not idlwave-library-path) 1215 (not idlwave-library-path)
@@ -1240,7 +1240,7 @@ Return either nil or 'hide."
1240 (setq idlwave-shell-show-commands (list type)))) 1240 (setq idlwave-shell-show-commands (list type))))
1241 1241
1242 1242
1243(defun idlwave-shell-send-command (&optional cmd pcmd hide preempt 1243(defun idlwave-shell-send-command (&optional cmd pcmd hide preempt
1244 show-if-error) 1244 show-if-error)
1245 "Send a command to IDL process. 1245 "Send a command to IDL process.
1246 1246
@@ -1261,18 +1261,18 @@ If optional fourth argument PREEMPT is non-nil CMD is put at front of
1261`idlwave-shell-pending-commands'. If PREEMPT is 'wait, wait for all 1261`idlwave-shell-pending-commands'. If PREEMPT is 'wait, wait for all
1262output to complete and the next prompt to arrive before returning 1262output to complete and the next prompt to arrive before returning
1263\(useful if you need an answer now\). IDL is considered ready if the 1263\(useful if you need an answer now\). IDL is considered ready if the
1264prompt is present and if `idlwave-shell-ready' is non-nil. 1264prompt is present and if `idlwave-shell-ready' is non-nil.
1265 1265
1266If SHOW-IF-ERROR is non-nil, show the output it it contains an error 1266If SHOW-IF-ERROR is non-nil, show the output it it contains an error
1267message, independent of what HIDE is set to." 1267message, independent of what HIDE is set to."
1268 1268
1269; (setq hide nil) ; FIXME: turn this on for debugging only 1269; (setq hide nil) ; FIXME: turn this on for debugging only
1270; (if (null cmd) 1270; (if (null cmd)
1271; (progn 1271; (progn
1272; (message "SENDING Pending commands: %s" 1272; (message "SENDING Pending commands: %s"
1273; (prin1-to-string idlwave-shell-pending-commands))) 1273; (prin1-to-string idlwave-shell-pending-commands)))
1274; (message "SENDING %s|||%s" cmd pcmd)) 1274; (message "SENDING %s|||%s" cmd pcmd))
1275 (if (and (symbolp idlwave-shell-show-commands) 1275 (if (and (symbolp idlwave-shell-show-commands)
1276 (eq idlwave-shell-show-commands 'everything)) 1276 (eq idlwave-shell-show-commands 'everything))
1277 (setq hide nil)) 1277 (setq hide nil))
1278 (let ((save-buffer (current-buffer)) 1278 (let ((save-buffer (current-buffer))
@@ -1300,7 +1300,7 @@ message, independent of what HIDE is set to."
1300 (append (list (list cmd pcmd hide show-if-error)) 1300 (append (list (list cmd pcmd hide show-if-error))
1301 idlwave-shell-pending-commands) 1301 idlwave-shell-pending-commands)
1302 ;; Put at end. 1302 ;; Put at end.
1303 (append idlwave-shell-pending-commands 1303 (append idlwave-shell-pending-commands
1304 (list (list cmd pcmd hide show-if-error)))))) 1304 (list (list cmd pcmd hide show-if-error))))))
1305 ;; Check if IDL ready 1305 ;; Check if IDL ready
1306 (let ((save-point (point-marker))) 1306 (let ((save-point (point-marker)))
@@ -1349,7 +1349,7 @@ message, independent of what HIDE is set to."
1349 (if (or (not (setq buf (get-buffer (idlwave-shell-buffer)))) 1349 (if (or (not (setq buf (get-buffer (idlwave-shell-buffer))))
1350 (not (setq proc (get-buffer-process buf)))) 1350 (not (setq proc (get-buffer-process buf))))
1351 (funcall errf "Shell is not running")) 1351 (funcall errf "Shell is not running"))
1352 (if (equal c ?\C-g) 1352 (if (equal c ?\C-g)
1353 (funcall errf "Abort") 1353 (funcall errf "Abort")
1354 (comint-send-string proc (char-to-string c))))) 1354 (comint-send-string proc (char-to-string c)))))
1355 1355
@@ -1390,7 +1390,7 @@ when the IDL prompt gets displayed again after the current IDL command."
1390 (if idlwave-shell-ready 1390 (if idlwave-shell-ready
1391 (funcall errf "No IDL program seems to be waiting for input")) 1391 (funcall errf "No IDL program seems to be waiting for input"))
1392 1392
1393 ;; OK, start the loop 1393 ;; OK, start the loop
1394 (message "Character mode on: Sending single chars (`C-g' to exit)") 1394 (message "Character mode on: Sending single chars (`C-g' to exit)")
1395 (message 1395 (message
1396 (catch 'exit 1396 (catch 'exit
@@ -1470,14 +1470,14 @@ error messages, etc."
1470 (setq output (substring output (string-match "\n" output))) 1470 (setq output (substring output (string-match "\n" output)))
1471 (while (string-match "\\(\n\\|\\`\\)%.*\\(\n .*\\)*" output) 1471 (while (string-match "\\(\n\\|\\`\\)%.*\\(\n .*\\)*" output)
1472 (setq output (replace-match "" nil t output))) 1472 (setq output (replace-match "" nil t output)))
1473 (unless 1473 (unless
1474 (string-match idlwave-shell-only-prompt-pattern output) 1474 (string-match idlwave-shell-only-prompt-pattern output)
1475 output)) 1475 output))
1476 1476
1477(defvar idlwave-shell-hidden-output-buffer " *idlwave-shell-hidden-output*" 1477(defvar idlwave-shell-hidden-output-buffer " *idlwave-shell-hidden-output*"
1478 "Buffer containing hidden output from IDL commands.") 1478 "Buffer containing hidden output from IDL commands.")
1479(defvar idlwave-shell-current-state nil) 1479(defvar idlwave-shell-current-state nil)
1480 1480
1481(defun idlwave-shell-filter (proc string) 1481(defun idlwave-shell-filter (proc string)
1482 "Watch for IDL prompt and filter incoming text. 1482 "Watch for IDL prompt and filter incoming text.
1483When the IDL prompt is received executes `idlwave-shell-post-command-hook' 1483When the IDL prompt is received executes `idlwave-shell-post-command-hook'
@@ -1509,20 +1509,20 @@ and then calls `idlwave-shell-send-command' for any pending commands."
1509 (idlwave-shell-input-mode-magic 1509 (idlwave-shell-input-mode-magic
1510 (concat idlwave-shell-accumulation string))) 1510 (concat idlwave-shell-accumulation string)))
1511 (setq idlwave-shell-accumulation 1511 (setq idlwave-shell-accumulation
1512 (substring string 1512 (substring string
1513 (progn (string-match "\\(.*[\n\r]+\\)*" 1513 (progn (string-match "\\(.*[\n\r]+\\)*"
1514 string) 1514 string)
1515 (match-end 0))))) 1515 (match-end 0)))))
1516 (setq idlwave-shell-accumulation 1516 (setq idlwave-shell-accumulation
1517 (concat idlwave-shell-accumulation string))) 1517 (concat idlwave-shell-accumulation string)))
1518 1518
1519 1519
1520;;; Test/Debug code 1520;;; Test/Debug code
1521; (save-excursion (set-buffer 1521; (save-excursion (set-buffer
1522; (get-buffer-create "*idlwave-shell-output*")) 1522; (get-buffer-create "*idlwave-shell-output*"))
1523; (goto-char (point-max)) 1523; (goto-char (point-max))
1524; (insert "\nSTRING===>\n" string "\n<====\n")) 1524; (insert "\nSTRING===>\n" string "\n<====\n"))
1525 1525
1526 ;; Check for prompt in current accumulating output 1526 ;; Check for prompt in current accumulating output
1527 (if (setq idlwave-shell-ready 1527 (if (setq idlwave-shell-ready
1528 (string-match idlwave-shell-prompt-pattern 1528 (string-match idlwave-shell-prompt-pattern
@@ -1558,16 +1558,16 @@ and then calls `idlwave-shell-send-command' for any pending commands."
1558 (if (and idlwave-shell-show-if-error 1558 (if (and idlwave-shell-show-if-error
1559 (eq idlwave-shell-current-state 'error)) 1559 (eq idlwave-shell-current-state 'error))
1560 (idlwave-shell-comint-filter proc full-output) 1560 (idlwave-shell-comint-filter proc full-output)
1561 ;; If it's only *mostly* hidden, filter % lines, 1561 ;; If it's only *mostly* hidden, filter % lines,
1562 ;; and show anything that remains 1562 ;; and show anything that remains
1563 (if (eq idlwave-shell-hide-output 'mostly) 1563 (if (eq idlwave-shell-hide-output 'mostly)
1564 (let ((filtered 1564 (let ((filtered
1565 (idlwave-shell-filter-hidden-output 1565 (idlwave-shell-filter-hidden-output
1566 full-output))) 1566 full-output)))
1567 (if filtered 1567 (if filtered
1568 (idlwave-shell-comint-filter 1568 (idlwave-shell-comint-filter
1569 proc filtered)))))) 1569 proc filtered))))))
1570 1570
1571 ;; Call the post-command hook 1571 ;; Call the post-command hook
1572 (if (listp idlwave-shell-post-command-hook) 1572 (if (listp idlwave-shell-post-command-hook)
1573 (progn 1573 (progn
@@ -1612,7 +1612,7 @@ and then calls `idlwave-shell-send-command' for any pending commands."
1612 (condition-case nil 1612 (condition-case nil
1613 (comint-write-input-ring) 1613 (comint-write-input-ring)
1614 (error nil))))) 1614 (error nil)))))
1615 1615
1616 (when (and (> (length (frame-list)) 1) 1616 (when (and (> (length (frame-list)) 1)
1617 (frame-live-p idlwave-shell-idl-wframe)) 1617 (frame-live-p idlwave-shell-idl-wframe))
1618 (delete-frame idlwave-shell-idl-wframe) 1618 (delete-frame idlwave-shell-idl-wframe)
@@ -1636,8 +1636,8 @@ and then calls `idlwave-shell-send-command' for any pending commands."
1636;; in module and file names. I am not sure if it will be necessary to 1636;; in module and file names. I am not sure if it will be necessary to
1637;; change this. Currently it seems to work the way it is. 1637;; change this. Currently it seems to work the way it is.
1638(defvar idlwave-shell-syntax-error 1638(defvar idlwave-shell-syntax-error
1639 "^% Syntax error.\\s-*\n\\s-*At:\\s-*\\(.*\\),\\s-*Line\\s-*\\(.*\\)" 1639 "^% Syntax error.\\s-*\n\\s-*At:\\s-*\\(.*\\),\\s-*Line\\s-*\\(.*\\)"
1640 "A regular expression to match an IDL syntax error. 1640 "A regular expression to match an IDL syntax error.
1641The 1st pair matches the file name, the second pair matches the line 1641The 1st pair matches the file name, the second pair matches the line
1642number.") 1642number.")
1643 1643
@@ -1645,16 +1645,16 @@ number.")
1645 "^% .*\n\\s-*At:\\s-*\\(.*\\),\\s-*Line\\s-*\\(.*\\)" 1645 "^% .*\n\\s-*At:\\s-*\\(.*\\),\\s-*Line\\s-*\\(.*\\)"
1646 "A regular expression to match any IDL error.") 1646 "A regular expression to match any IDL error.")
1647 1647
1648(defvar idlwave-shell-halting-error 1648(defvar idlwave-shell-halting-error
1649 "^% .*\n\\([^%].*\n\\)*% Execution halted at:\\(\\s-*\\S-+\\s-*[0-9]+\\s-*.*\\)\n" 1649 "^% .*\n\\([^%].*\n\\)*% Execution halted at:\\(\\s-*\\S-+\\s-*[0-9]+\\s-*.*\\)\n"
1650 "A regular expression to match errors which halt execution.") 1650 "A regular expression to match errors which halt execution.")
1651 1651
1652(defvar idlwave-shell-cant-continue-error 1652(defvar idlwave-shell-cant-continue-error
1653 "^% Can't continue from this point.\n" 1653 "^% Can't continue from this point.\n"
1654 "A regular expression to match errors stepping errors.") 1654 "A regular expression to match errors stepping errors.")
1655 1655
1656(defvar idlwave-shell-file-line-message 1656(defvar idlwave-shell-file-line-message
1657 (concat 1657 (concat
1658 "\\(" ; program name group (1) 1658 "\\(" ; program name group (1)
1659 "\\$MAIN\\$\\|" ; main level routine 1659 "\\$MAIN\\$\\|" ; main level routine
1660 "\\<[a-zA-Z][a-zA-Z0-9_$:]*" ; start with a letter followed by [..] 1660 "\\<[a-zA-Z][a-zA-Z0-9_$:]*" ; start with a letter followed by [..]
@@ -1672,7 +1672,7 @@ number.")
1672 "\\)" ; end line number group (5) 1672 "\\)" ; end line number group (5)
1673 ) 1673 )
1674 "*A regular expression to parse out the file name and line number. 1674 "*A regular expression to parse out the file name and line number.
1675The 1st group should match the subroutine name. 1675The 1st group should match the subroutine name.
1676The 3rd group is the line number. 1676The 3rd group is the line number.
1677The 5th group is the file name. 1677The 5th group is the file name.
1678All parts may contain linebreaks surrounded by spaces. This is important 1678All parts may contain linebreaks surrounded by spaces. This is important
@@ -1691,9 +1691,9 @@ the above."
1691 (cond 1691 (cond
1692 ;; Make sure we have output 1692 ;; Make sure we have output
1693 ((not idlwave-shell-command-output)) 1693 ((not idlwave-shell-command-output))
1694 1694
1695 ;; First Priority: Syntax and other errors 1695 ;; First Priority: Syntax and other errors
1696 ((or 1696 ((or
1697 (string-match idlwave-shell-syntax-error 1697 (string-match idlwave-shell-syntax-error
1698 idlwave-shell-command-output) 1698 idlwave-shell-command-output)
1699 (string-match idlwave-shell-other-error 1699 (string-match idlwave-shell-other-error
@@ -1707,19 +1707,19 @@ the above."
1707 (setq idlwave-shell-error-last (point))) 1707 (setq idlwave-shell-error-last (point)))
1708 (setq idlwave-shell-current-state 'error) 1708 (setq idlwave-shell-current-state 'error)
1709 (idlwave-shell-goto-next-error)) 1709 (idlwave-shell-goto-next-error))
1710 1710
1711 ;; Second Priority: Halting errors 1711 ;; Second Priority: Halting errors
1712 ((string-match idlwave-shell-halting-error 1712 ((string-match idlwave-shell-halting-error
1713 idlwave-shell-command-output) 1713 idlwave-shell-command-output)
1714 ;; Grab the file and line state info. 1714 ;; Grab the file and line state info.
1715 (setq idlwave-shell-calling-stack-index 0) 1715 (setq idlwave-shell-calling-stack-index 0)
1716 (setq idlwave-shell-halt-frame 1716 (setq idlwave-shell-halt-frame
1717 (idlwave-shell-parse-line 1717 (idlwave-shell-parse-line
1718 (substring idlwave-shell-command-output 1718 (substring idlwave-shell-command-output
1719 (match-beginning 2))) 1719 (match-beginning 2)))
1720 idlwave-shell-current-state 'error) 1720 idlwave-shell-current-state 'error)
1721 (idlwave-shell-display-line (idlwave-shell-pc-frame))) 1721 (idlwave-shell-display-line (idlwave-shell-pc-frame)))
1722 1722
1723 ;; Third Priority: Various types of innocuous HALT and 1723 ;; Third Priority: Various types of innocuous HALT and
1724 ;; TRACEBACK messages. 1724 ;; TRACEBACK messages.
1725 ((or (setq trace (string-match idlwave-shell-trace-message-re 1725 ((or (setq trace (string-match idlwave-shell-trace-message-re
@@ -1729,25 +1729,25 @@ the above."
1729 ;; Grab the file and line state info. 1729 ;; Grab the file and line state info.
1730 (setq idlwave-shell-calling-stack-index 0) 1730 (setq idlwave-shell-calling-stack-index 0)
1731 (setq idlwave-shell-halt-frame 1731 (setq idlwave-shell-halt-frame
1732 (idlwave-shell-parse-line 1732 (idlwave-shell-parse-line
1733 (substring idlwave-shell-command-output (match-end 0)))) 1733 (substring idlwave-shell-command-output (match-end 0))))
1734 (setq idlwave-shell-current-state 'halt) 1734 (setq idlwave-shell-current-state 'halt)
1735 ;; Don't debug trace messages 1735 ;; Don't debug trace messages
1736 (idlwave-shell-display-line (idlwave-shell-pc-frame) nil 1736 (idlwave-shell-display-line (idlwave-shell-pc-frame) nil
1737 (if trace 'no-debug))) 1737 (if trace 'no-debug)))
1738 1738
1739 ;; Fourth Priority: Breakpoints 1739 ;; Fourth Priority: Breakpoints
1740 ((string-match idlwave-shell-break-message 1740 ((string-match idlwave-shell-break-message
1741 idlwave-shell-command-output) 1741 idlwave-shell-command-output)
1742 (setq idlwave-shell-calling-stack-index 0) 1742 (setq idlwave-shell-calling-stack-index 0)
1743 (setq idlwave-shell-halt-frame 1743 (setq idlwave-shell-halt-frame
1744 (idlwave-shell-parse-line 1744 (idlwave-shell-parse-line
1745 (substring idlwave-shell-command-output (match-end 0)))) 1745 (substring idlwave-shell-command-output (match-end 0))))
1746 ;; We used to count hits on breakpoints 1746 ;; We used to count hits on breakpoints
1747 ;; this is no longer supported since IDL breakpoints 1747 ;; this is no longer supported since IDL breakpoints
1748 ;; have learned counting. 1748 ;; have learned counting.
1749 ;; Do breakpoint command processing 1749 ;; Do breakpoint command processing
1750 (let ((bp (assoc 1750 (let ((bp (assoc
1751 (list 1751 (list
1752 (nth 0 idlwave-shell-halt-frame) 1752 (nth 0 idlwave-shell-halt-frame)
1753 (nth 1 idlwave-shell-halt-frame)) 1753 (nth 1 idlwave-shell-halt-frame))
@@ -1760,9 +1760,9 @@ the above."
1760 ;; A breakpoint that we did not know about - perhaps it was 1760 ;; A breakpoint that we did not know about - perhaps it was
1761 ;; set by the user... Let's update our list. 1761 ;; set by the user... Let's update our list.
1762 (idlwave-shell-bp-query))) 1762 (idlwave-shell-bp-query)))
1763 (setq idlwave-shell-current-state 'breakpoint) 1763 (setq idlwave-shell-current-state 'breakpoint)
1764 (idlwave-shell-display-line (idlwave-shell-pc-frame))) 1764 (idlwave-shell-display-line (idlwave-shell-pc-frame)))
1765 1765
1766 ;; Last Priority: Can't Step errors 1766 ;; Last Priority: Can't Step errors
1767 ((string-match idlwave-shell-cant-continue-error 1767 ((string-match idlwave-shell-cant-continue-error
1768 idlwave-shell-command-output) 1768 idlwave-shell-command-output)
@@ -1777,7 +1777,7 @@ We need to work hard here to remove the stupid line breaks inserted by
1777IDL5. These line breaks can be right in the middle of procedure 1777IDL5. These line breaks can be right in the middle of procedure
1778or file names. 1778or file names.
1779It is very difficult to come up with a robust solution. This one seems 1779It is very difficult to come up with a robust solution. This one seems
1780to be pretty good though. 1780to be pretty good though.
1781 1781
1782Here is in what ways it improves over the previous solution: 1782Here is in what ways it improves over the previous solution:
1783 1783
@@ -1802,7 +1802,7 @@ statements."
1802 (setq procedure (match-string 1 string) 1802 (setq procedure (match-string 1 string)
1803 number (match-string 3 string) 1803 number (match-string 3 string)
1804 file (match-string 5 string)) 1804 file (match-string 5 string))
1805 1805
1806 ;; Repair the strings 1806 ;; Repair the strings
1807 (setq procedure (idlwave-shell-repair-string procedure)) 1807 (setq procedure (idlwave-shell-repair-string procedure))
1808 (setq number (idlwave-shell-repair-string number)) 1808 (setq number (idlwave-shell-repair-string number))
@@ -1811,7 +1811,7 @@ statements."
1811 ;; If we have a file, return the frame list 1811 ;; If we have a file, return the frame list
1812 (if file 1812 (if file
1813 (list (idlwave-shell-file-name file) 1813 (list (idlwave-shell-file-name file)
1814 (string-to-int number) 1814 (string-to-number number)
1815 procedure) 1815 procedure)
1816 ;; No success finding a file 1816 ;; No success finding a file
1817 nil)))) 1817 nil))))
@@ -1828,7 +1828,7 @@ The last line of STRING may be garbage - we check which one makes a valid
1828file name." 1828file name."
1829 (let ((file1 "") (file2 "") (start 0)) 1829 (let ((file1 "") (file2 "") (start 0))
1830 ;; We scan no further than to the next "^%" line 1830 ;; We scan no further than to the next "^%" line
1831 (if (string-match "^%" file) 1831 (if (string-match "^%" file)
1832 (setq file (substring file 0 (match-beginning 0)))) 1832 (setq file (substring file 0 (match-beginning 0))))
1833 ;; Take out the line breaks 1833 ;; Take out the line breaks
1834 (while (string-match "[ \t]*\n[ \t]*" file start) 1834 (while (string-match "[ \t]*\n[ \t]*" file start)
@@ -1883,7 +1883,7 @@ file name."
1883The size is given by `idlwave-shell-graphics-window-size'." 1883The size is given by `idlwave-shell-graphics-window-size'."
1884 (interactive "P") 1884 (interactive "P")
1885 (let ((n (if n (prefix-numeric-value n) 0))) 1885 (let ((n (if n (prefix-numeric-value n) 0)))
1886 (idlwave-shell-send-command 1886 (idlwave-shell-send-command
1887 (apply 'format "window,%d,xs=%d,ys=%d" 1887 (apply 'format "window,%d,xs=%d,ys=%d"
1888 n idlwave-shell-graphics-window-size) 1888 n idlwave-shell-graphics-window-size)
1889 nil (idlwave-shell-hide-p 'misc) nil t))) 1889 nil (idlwave-shell-hide-p 'misc) nil t)))
@@ -1903,16 +1903,16 @@ directory."
1903Also get rid of widget events in the queue." 1903Also get rid of widget events in the queue."
1904 (interactive "P") 1904 (interactive "P")
1905 (save-selected-window 1905 (save-selected-window
1906 ;;if (widget_info(/MANAGED))[0] gt 0 then for i=0,n_elements(widget_info(/MANAGED))-1 do widget_control,(widget_info(/MANAGED))[i],/clear_events & 1906 ;;if (widget_info(/MANAGED))[0] gt 0 then for i=0,n_elements(widget_info(/MANAGED))-1 do widget_control,(widget_info(/MANAGED))[i],/clear_events &
1907 (idlwave-shell-send-command "retall" nil 1907 (idlwave-shell-send-command "retall" nil
1908 (if (idlwave-shell-hide-p 'misc) 'mostly) 1908 (if (idlwave-shell-hide-p 'misc) 'mostly)
1909 nil t) 1909 nil t)
1910 (idlwave-shell-display-line nil))) 1910 (idlwave-shell-display-line nil)))
1911 1911
1912(defun idlwave-shell-closeall (&optional arg) 1912(defun idlwave-shell-closeall (&optional arg)
1913 "Close all open files." 1913 "Close all open files."
1914 (interactive "P") 1914 (interactive "P")
1915 (idlwave-shell-send-command "close,/all" nil 1915 (idlwave-shell-send-command "close,/all" nil
1916 (idlwave-shell-hide-p 'misc) nil t)) 1916 (idlwave-shell-hide-p 'misc) nil t))
1917 1917
1918(defun idlwave-shell-quit (&optional arg) 1918(defun idlwave-shell-quit (&optional arg)
@@ -1928,7 +1928,7 @@ With prefix ARG, exit without confirmation."
1928 1928
1929(defun idlwave-shell-reset (&optional hidden) 1929(defun idlwave-shell-reset (&optional hidden)
1930 "Reset IDL. Return to main level and destroy the leftover variables. 1930 "Reset IDL. Return to main level and destroy the leftover variables.
1931This issues the following commands: 1931This issues the following commands:
1932RETALL 1932RETALL
1933WIDGET_CONTROL,/RESET 1933WIDGET_CONTROL,/RESET
1934CLOSE, /ALL 1934CLOSE, /ALL
@@ -1978,14 +1978,14 @@ HEAP_GC, /VERBOSE"
1978 ;; Set dummy values and kill the text 1978 ;; Set dummy values and kill the text
1979 (setq sep "@" sep-re "@ *" text "") 1979 (setq sep "@" sep-re "@ *" text "")
1980 (if idlwave-idlwave_routine_info-compiled 1980 (if idlwave-idlwave_routine_info-compiled
1981 (message 1981 (message
1982 "Routine Info warning: No match for BEGIN line in \n>>>\n%s\n<<<\n" 1982 "Routine Info warning: No match for BEGIN line in \n>>>\n%s\n<<<\n"
1983 idlwave-shell-command-output))) 1983 idlwave-shell-command-output)))
1984 (if (string-match "^>>>END OF IDLWAVE ROUTINE INFO.*" text) 1984 (if (string-match "^>>>END OF IDLWAVE ROUTINE INFO.*" text)
1985 (setq text (substring text 0 (match-beginning 0))) 1985 (setq text (substring text 0 (match-beginning 0)))
1986 (if idlwave-idlwave_routine_info-compiled 1986 (if idlwave-idlwave_routine_info-compiled
1987 (message 1987 (message
1988 "Routine Info warning: No match for END line in \n>>>\n%s\n<<<\n" 1988 "Routine Info warning: No match for END line in \n>>>\n%s\n<<<\n"
1989 idlwave-shell-command-output))) 1989 idlwave-shell-command-output)))
1990 (if (string-match "\\S-" text) 1990 (if (string-match "\\S-" text)
1991 ;; Obviously, the pro worked. Make a note that we have it now. 1991 ;; Obviously, the pro worked. Make a note that we have it now.
@@ -2003,59 +2003,59 @@ HEAP_GC, /VERBOSE"
2003 key (nth 4 specs) 2003 key (nth 4 specs)
2004 keys (if (and (stringp key) 2004 keys (if (and (stringp key)
2005 (not (string-match "\\` *\\'" key))) 2005 (not (string-match "\\` *\\'" key)))
2006 (mapcar 'list 2006 (mapcar 'list
2007 (delete "" (idlwave-split-string key " +"))))) 2007 (delete "" (idlwave-split-string key " +")))))
2008 (setq name (idlwave-sintern-routine-or-method name class t) 2008 (setq name (idlwave-sintern-routine-or-method name class t)
2009 class (idlwave-sintern-class class t) 2009 class (idlwave-sintern-class class t)
2010 file (if (equal file "") nil file) 2010 file (if (equal file "") nil file)
2011 keys (mapcar (lambda (x) 2011 keys (mapcar (lambda (x)
2012 (list (idlwave-sintern-keyword (car x) t))) keys)) 2012 (list (idlwave-sintern-keyword (car x) t))) keys))
2013 2013
2014 ;; In the following ignore routines already defined in buffers, 2014 ;; In the following ignore routines already defined in buffers,
2015 ;; assuming that if the buffer stuff differs, it is a "new" 2015 ;; assuming that if the buffer stuff differs, it is a "new"
2016 ;; version, not yet compiled, and should take precedence. 2016 ;; version, not yet compiled, and should take precedence.
2017 ;; We could do the same for the library to avoid duplicates - 2017 ;; We could do the same for the library to avoid duplicates -
2018 ;; but I think frequently a user might have several versions of 2018 ;; but I think frequently a user might have several versions of
2019 ;; the same function in different programs, and in this case the 2019 ;; the same function in different programs, and in this case the
2020 ;; compiled one will be the best guess of all versions. 2020 ;; compiled one will be the best guess of all versions.
2021 ;; Therefore, we leave duplicates of library routines in. 2021 ;; Therefore, we leave duplicates of library routines in.
2022 (cond ((string= name "$MAIN$")) ; ignore this one 2022 (cond ((string= name "$MAIN$")) ; ignore this one
2023 ((and (string= type "PRO") 2023 ((and (string= type "PRO")
2024 ;; FIXME: is it OK to make the buffer routines dominate? 2024 ;; FIXME: is it OK to make the buffer routines dominate?
2025 (or t (null file) 2025 (or t (null file)
2026 (not (idlwave-rinfo-assq name 'pro class 2026 (not (idlwave-rinfo-assq name 'pro class
2027 idlwave-buffer-routines))) 2027 idlwave-buffer-routines)))
2028 ;; FIXME: is it OK to make the library routines dominate? 2028 ;; FIXME: is it OK to make the library routines dominate?
2029 ;;(not (idlwave-rinfo-assq name 'pro class 2029 ;;(not (idlwave-rinfo-assq name 'pro class
2030 ;; idlwave-library-routines)) 2030 ;; idlwave-library-routines))
2031 ) 2031 )
2032 (setq entry (list name 'pro class 2032 (setq entry (list name 'pro class
2033 (cons 'compiled 2033 (cons 'compiled
2034 (if file 2034 (if file
2035 (list 2035 (list
2036 (file-name-nondirectory file) 2036 (file-name-nondirectory file)
2037 (idlwave-sintern-dir 2037 (idlwave-sintern-dir
2038 (file-name-directory file))))) 2038 (file-name-directory file)))))
2039 cs (cons nil keys))) 2039 cs (cons nil keys)))
2040 (if file 2040 (if file
2041 (push entry idlwave-compiled-routines) 2041 (push entry idlwave-compiled-routines)
2042 (push entry idlwave-unresolved-routines))) 2042 (push entry idlwave-unresolved-routines)))
2043 2043
2044 ((and (string= type "FUN") 2044 ((and (string= type "FUN")
2045 ;; FIXME: is it OK to make the buffer routines dominate? 2045 ;; FIXME: is it OK to make the buffer routines dominate?
2046 (or t (not file) 2046 (or t (not file)
2047 (not (idlwave-rinfo-assq name 'fun class 2047 (not (idlwave-rinfo-assq name 'fun class
2048 idlwave-buffer-routines))) 2048 idlwave-buffer-routines)))
2049 ;; FIXME: is it OK to make the library routines dominate? 2049 ;; FIXME: is it OK to make the library routines dominate?
2050 ;; (not (idlwave-rinfo-assq name 'fun class 2050 ;; (not (idlwave-rinfo-assq name 'fun class
2051 ;; idlwave-library-routines)) 2051 ;; idlwave-library-routines))
2052 ) 2052 )
2053 (setq entry (list name 'fun class 2053 (setq entry (list name 'fun class
2054 (cons 'compiled 2054 (cons 'compiled
2055 (if file 2055 (if file
2056 (list 2056 (list
2057 (file-name-nondirectory file) 2057 (file-name-nondirectory file)
2058 (idlwave-sintern-dir 2058 (idlwave-sintern-dir
2059 (file-name-directory file))))) 2059 (file-name-directory file)))))
2060 cs (cons nil keys))) 2060 cs (cons nil keys)))
2061 (if file 2061 (if file
@@ -2072,7 +2072,7 @@ Change the default directory for the process buffer to concur."
2072 (set-buffer (idlwave-shell-buffer)) 2072 (set-buffer (idlwave-shell-buffer))
2073 (if (string-match ",___cur[\n\r]\\(\\S-*\\) *[\n\r]" 2073 (if (string-match ",___cur[\n\r]\\(\\S-*\\) *[\n\r]"
2074 idlwave-shell-command-output) 2074 idlwave-shell-command-output)
2075 (let ((dir (substring idlwave-shell-command-output 2075 (let ((dir (substring idlwave-shell-command-output
2076 (match-beginning 1) (match-end 1)))) 2076 (match-beginning 1) (match-end 1))))
2077; (message "Setting Emacs working dir to %s" dir) 2077; (message "Setting Emacs working dir to %s" dir)
2078 (setq idlwave-shell-default-directory dir) 2078 (setq idlwave-shell-default-directory dir)
@@ -2086,10 +2086,10 @@ Change the default directory for the process buffer to concur."
2086 expression) 2086 expression)
2087 (save-excursion 2087 (save-excursion
2088 (goto-char apos) 2088 (goto-char apos)
2089 (setq expression (buffer-substring 2089 (setq expression (buffer-substring
2090 (catch 'exit 2090 (catch 'exit
2091 (while t 2091 (while t
2092 (if (not (re-search-backward 2092 (if (not (re-search-backward
2093 "[^][.A-Za-z0-9_() ]" bos t)) 2093 "[^][.A-Za-z0-9_() ]" bos t))
2094 (throw 'exit bos)) ;ran into bos 2094 (throw 'exit bos)) ;ran into bos
2095 (if (not (idlwave-is-pointer-dereference bol)) 2095 (if (not (idlwave-is-pointer-dereference bol))
@@ -2117,7 +2117,7 @@ Change the default directory for the process buffer to concur."
2117 idlwave-shell-command-output)) 2117 idlwave-shell-command-output))
2118 (string-match (concat match "\\([A-Za-z_0-9]+\\)") 2118 (string-match (concat match "\\([A-Za-z_0-9]+\\)")
2119 idlwave-shell-command-output)) 2119 idlwave-shell-command-output))
2120 (setq idlwave-shell-get-object-class 2120 (setq idlwave-shell-get-object-class
2121 (match-string 1 idlwave-shell-command-output))))) 2121 (match-string 1 idlwave-shell-command-output)))))
2122 2122
2123(defvar idlwave-sint-sysvars nil) 2123(defvar idlwave-sint-sysvars nil)
@@ -2131,7 +2131,7 @@ keywords."
2131 (interactive "P") 2131 (interactive "P")
2132 (let (exec-cmd) 2132 (let (exec-cmd)
2133 (cond 2133 (cond
2134 ((and 2134 ((and
2135 (setq exec-cmd (idlwave-shell-executive-command)) 2135 (setq exec-cmd (idlwave-shell-executive-command))
2136 (cdr exec-cmd) 2136 (cdr exec-cmd)
2137 (member (upcase (cdr exec-cmd)) 2137 (member (upcase (cdr exec-cmd))
@@ -2141,7 +2141,7 @@ keywords."
2141 (idlwave-shell-complete-filename)) 2141 (idlwave-shell-complete-filename))
2142 2142
2143 ((car-safe exec-cmd) 2143 ((car-safe exec-cmd)
2144 (setq idlwave-completion-help-info 2144 (setq idlwave-completion-help-info
2145 '(idlwave-shell-complete-execcomm-help)) 2145 '(idlwave-shell-complete-execcomm-help))
2146 (idlwave-complete-in-buffer 'execcomm 'execcomm 2146 (idlwave-complete-in-buffer 'execcomm 'execcomm
2147 idlwave-executive-commands-alist nil 2147 idlwave-executive-commands-alist nil
@@ -2160,7 +2160,7 @@ keywords."
2160 (let ((case-fold-search t)) 2160 (let ((case-fold-search t))
2161 (not (looking-at ".*obj_new"))))) 2161 (not (looking-at ".*obj_new")))))
2162 (idlwave-shell-complete-filename)) 2162 (idlwave-shell-complete-filename))
2163 2163
2164 (t 2164 (t
2165 ;; Default completion of modules and keywords 2165 ;; Default completion of modules and keywords
2166 (idlwave-complete arg))))) 2166 (idlwave-complete arg)))))
@@ -2182,7 +2182,7 @@ keywords."
2182We assume that we are after a file name when completing one of the 2182We assume that we are after a file name when completing one of the
2183args of an executive .run, .rnew or .compile." 2183args of an executive .run, .rnew or .compile."
2184 ;; CWD might have changed, resync, to set default directory 2184 ;; CWD might have changed, resync, to set default directory
2185 (idlwave-shell-resync-dirs) 2185 (idlwave-shell-resync-dirs)
2186 (let ((comint-file-name-chars idlwave-shell-file-name-chars)) 2186 (let ((comint-file-name-chars idlwave-shell-file-name-chars))
2187 (comint-dynamic-complete-as-filename))) 2187 (comint-dynamic-complete-as-filename)))
2188 2188
@@ -2223,7 +2223,7 @@ args of an executive .run, .rnew or .compile."
2223 2223
2224(defun idlwave-shell-redisplay (&optional hide) 2224(defun idlwave-shell-redisplay (&optional hide)
2225 "Tries to resync the display with where execution has stopped. 2225 "Tries to resync the display with where execution has stopped.
2226Issues a \"help,/trace\" command followed by a call to 2226Issues a \"help,/trace\" command followed by a call to
2227`idlwave-shell-display-line'. Also updates the breakpoint 2227`idlwave-shell-display-line'. Also updates the breakpoint
2228overlays." 2228overlays."
2229 (interactive) 2229 (interactive)
@@ -2236,7 +2236,7 @@ overlays."
2236 (idlwave-shell-bp-query)) 2236 (idlwave-shell-bp-query))
2237 2237
2238(defun idlwave-shell-display-level-in-calling-stack (&optional hide) 2238(defun idlwave-shell-display-level-in-calling-stack (&optional hide)
2239 (idlwave-shell-send-command 2239 (idlwave-shell-send-command
2240 "help,/trace" 2240 "help,/trace"
2241 `(progn 2241 `(progn
2242 ;; scanning for the state will reset the stack level - restore it 2242 ;; scanning for the state will reset the stack level - restore it
@@ -2267,14 +2267,14 @@ overlays."
2267 (setq idlwave-shell-calling-stack-index nmin 2267 (setq idlwave-shell-calling-stack-index nmin
2268 message (format "%d is the current calling stack level - can't go further down" 2268 message (format "%d is the current calling stack level - can't go further down"
2269 (- nmin))))) 2269 (- nmin)))))
2270 (setq idlwave-shell-calling-stack-routine 2270 (setq idlwave-shell-calling-stack-routine
2271 (nth 2 (nth idlwave-shell-calling-stack-index stack))) 2271 (nth 2 (nth idlwave-shell-calling-stack-index stack)))
2272 2272
2273 ;; only edebug if in that mode already 2273 ;; only edebug if in that mode already
2274 (idlwave-shell-display-line 2274 (idlwave-shell-display-line
2275 (nth idlwave-shell-calling-stack-index stack) nil 2275 (nth idlwave-shell-calling-stack-index stack) nil
2276 (unless idlwave-shell-electric-debug-mode 'no-debug)) 2276 (unless idlwave-shell-electric-debug-mode 'no-debug))
2277 (message (or message 2277 (message (or message
2278 (format "In routine %s (stack level %d)" 2278 (format "In routine %s (stack level %d)"
2279 idlwave-shell-calling-stack-routine 2279 idlwave-shell-calling-stack-routine
2280 (- idlwave-shell-calling-stack-index)))))) 2280 (- idlwave-shell-calling-stack-index))))))
@@ -2305,7 +2305,7 @@ used. Does nothing if the resulting frame is nil."
2305(defun idlwave-shell-pc-frame () 2305(defun idlwave-shell-pc-frame ()
2306 "Returns the frame for IDL execution." 2306 "Returns the frame for IDL execution."
2307 (and idlwave-shell-halt-frame 2307 (and idlwave-shell-halt-frame
2308 (list (nth 0 idlwave-shell-halt-frame) 2308 (list (nth 0 idlwave-shell-halt-frame)
2309 (nth 1 idlwave-shell-halt-frame) 2309 (nth 1 idlwave-shell-halt-frame)
2310 (nth 2 idlwave-shell-halt-frame)))) 2310 (nth 2 idlwave-shell-halt-frame))))
2311 2311
@@ -2323,7 +2323,7 @@ column in the line. If NO-DEBUG is non-nil, do *not* toggle the electric
2323debug mode." 2323debug mode."
2324 (if (not frame) 2324 (if (not frame)
2325 ;; Remove stop-line overlay from old position 2325 ;; Remove stop-line overlay from old position
2326 (progn 2326 (progn
2327 (setq overlay-arrow-string nil) 2327 (setq overlay-arrow-string nil)
2328 (setq idlwave-shell-mode-line-info nil) 2328 (setq idlwave-shell-mode-line-info nil)
2329 (setq idlwave-shell-is-stopped nil) 2329 (setq idlwave-shell-is-stopped nil)
@@ -2340,10 +2340,10 @@ debug mode."
2340;;; 2340;;;
2341;;; buffer : the buffer to display a line in. 2341;;; buffer : the buffer to display a line in.
2342;;; select-shell: current buffer is the shell. 2342;;; select-shell: current buffer is the shell.
2343;;; 2343;;;
2344 (setq idlwave-shell-mode-line-info 2344 (setq idlwave-shell-mode-line-info
2345 (if (nth 2 frame) 2345 (if (nth 2 frame)
2346 (format "[%d:%s]" 2346 (format "[%d:%s]"
2347 (- idlwave-shell-calling-stack-index) 2347 (- idlwave-shell-calling-stack-index)
2348 (nth 2 frame)))) 2348 (nth 2 frame))))
2349 (let* ((buffer (idlwave-find-file-noselect (car frame) 'shell)) 2349 (let* ((buffer (idlwave-find-file-noselect (car frame) 'shell))
@@ -2367,7 +2367,7 @@ debug mode."
2367 (forward-line 0) 2367 (forward-line 0)
2368 (setq pos (point)) 2368 (setq pos (point))
2369 (setq idlwave-shell-is-stopped t) 2369 (setq idlwave-shell-is-stopped t)
2370 2370
2371 (if idlwave-shell-stop-line-overlay 2371 (if idlwave-shell-stop-line-overlay
2372 ;; Move overlay 2372 ;; Move overlay
2373 (move-overlay idlwave-shell-stop-line-overlay 2373 (move-overlay idlwave-shell-stop-line-overlay
@@ -2389,12 +2389,12 @@ debug mode."
2389 ;; If we have the column of the error, move the cursor there. 2389 ;; If we have the column of the error, move the cursor there.
2390 (if col (move-to-column col)) 2390 (if col (move-to-column col))
2391 (setq pos (point)) 2391 (setq pos (point))
2392 2392
2393 ;; Enter electric debug mode, if not prohibited and not in 2393 ;; Enter electric debug mode, if not prohibited and not in
2394 ;; it already 2394 ;; it already
2395 (when (and (or 2395 (when (and (or
2396 (eq idlwave-shell-automatic-electric-debug t) 2396 (eq idlwave-shell-automatic-electric-debug t)
2397 (and 2397 (and
2398 (eq idlwave-shell-automatic-electric-debug 'breakpoint) 2398 (eq idlwave-shell-automatic-electric-debug 'breakpoint)
2399 (not (eq idlwave-shell-current-state 'error)))) 2399 (not (eq idlwave-shell-current-state 'error))))
2400 (not no-debug) 2400 (not no-debug)
@@ -2402,14 +2402,14 @@ debug mode."
2402 (not idlwave-shell-electric-debug-mode)) 2402 (not idlwave-shell-electric-debug-mode))
2403 (idlwave-shell-electric-debug-mode) 2403 (idlwave-shell-electric-debug-mode)
2404 (setq electric t))) 2404 (setq electric t)))
2405 2405
2406 ;; Make sure pos is really displayed in the window. 2406 ;; Make sure pos is really displayed in the window.
2407 (set-window-point window pos) 2407 (set-window-point window pos)
2408 2408
2409 ;; If we came from the shell, go back there. Otherwise select 2409 ;; If we came from the shell, go back there. Otherwise select
2410 ;; the window where the error is displayed. 2410 ;; the window where the error is displayed.
2411 (if (or (and idlwave-shell-electric-zap-to-file electric) 2411 (if (or (and idlwave-shell-electric-zap-to-file electric)
2412 (and (equal (buffer-name) (idlwave-shell-buffer)) 2412 (and (equal (buffer-name) (idlwave-shell-buffer))
2413 (not select-shell))) 2413 (not select-shell)))
2414 (select-window window)))))) 2414 (select-window window))))))
2415 2415
@@ -2419,35 +2419,35 @@ debug mode."
2419 (interactive "p") 2419 (interactive "p")
2420 (or (not arg) (< arg 1) 2420 (or (not arg) (< arg 1)
2421 (setq arg 1)) 2421 (setq arg 1))
2422 (idlwave-shell-send-command 2422 (idlwave-shell-send-command
2423 (concat ".s " (if (integerp arg) (int-to-string arg) arg)) 2423 (concat ".s " (if (integerp arg) (int-to-string arg) arg))
2424 nil (if (idlwave-shell-hide-p 'debug) 'mostly) nil t)) 2424 nil (if (idlwave-shell-hide-p 'debug) 'mostly) nil t))
2425 2425
2426(defun idlwave-shell-stepover (arg) 2426(defun idlwave-shell-stepover (arg)
2427 "Stepover one source line. 2427 "Stepover one source line.
2428If given prefix argument ARG, step ARG source lines. 2428If given prefix argument ARG, step ARG source lines.
2429Uses IDL's stepover executive command which does not enter called functions." 2429Uses IDL's stepover executive command which does not enter called functions."
2430 (interactive "p") 2430 (interactive "p")
2431 (or (not arg) (< arg 1) 2431 (or (not arg) (< arg 1)
2432 (setq arg 1)) 2432 (setq arg 1))
2433 (idlwave-shell-send-command 2433 (idlwave-shell-send-command
2434 (concat ".so " (if (integerp arg) (int-to-string arg) arg)) 2434 (concat ".so " (if (integerp arg) (int-to-string arg) arg))
2435 nil (if (idlwave-shell-hide-p 'debug) 'mostly) nil t)) 2435 nil (if (idlwave-shell-hide-p 'debug) 'mostly) nil t))
2436 2436
2437(defun idlwave-shell-break-here (&optional count cmd condition no-show) 2437(defun idlwave-shell-break-here (&optional count cmd condition no-show)
2438 "Set breakpoint at current line. 2438 "Set breakpoint at current line.
2439 2439
2440If Count is nil then an ordinary breakpoint is set. We treat a count 2440If Count is nil then an ordinary breakpoint is set. We treat a count
2441of 1 as a temporary breakpoint using the ONCE keyword. Counts greater 2441of 1 as a temporary breakpoint using the ONCE keyword. Counts greater
2442than 1 use the IDL AFTER=count keyword to break only after reaching 2442than 1 use the IDL AFTER=count keyword to break only after reaching
2443the statement count times. 2443the statement count times.
2444 2444
2445Optional argument CMD is a list or function to evaluate upon reaching 2445Optional argument CMD is a list or function to evaluate upon reaching
2446the breakpoint." 2446the breakpoint."
2447 2447
2448 (interactive "P") 2448 (interactive "P")
2449 (when (listp count) 2449 (when (listp count)
2450 (if (equal (car count) 4) 2450 (if (equal (car count) 4)
2451 (setq condition (read-string "Break Condition: "))) 2451 (setq condition (read-string "Break Condition: ")))
2452 (setq count nil)) 2452 (setq count nil))
2453 (idlwave-shell-set-bp 2453 (idlwave-shell-set-bp
@@ -2470,7 +2470,7 @@ the problem with not being able to set the breakpoint."
2470 (progn 2470 (progn
2471 (if (progn 2471 (if (progn
2472 (beep) 2472 (beep)
2473 (y-or-n-p 2473 (y-or-n-p
2474 (concat "Okay to recompile file " 2474 (concat "Okay to recompile file "
2475 (idlwave-shell-bp-get bp 'file) " "))) 2475 (idlwave-shell-bp-get bp 'file) " ")))
2476 ;; Recompile 2476 ;; Recompile
@@ -2478,7 +2478,7 @@ the problem with not being able to set the breakpoint."
2478 ;; Clean up before retrying 2478 ;; Clean up before retrying
2479 (idlwave-shell-command-failure) 2479 (idlwave-shell-command-failure)
2480 (idlwave-shell-send-command 2480 (idlwave-shell-send-command
2481 (concat ".run " (idlwave-shell-bp-get bp 'file)) nil 2481 (concat ".run " (idlwave-shell-bp-get bp 'file)) nil
2482 (if (idlwave-shell-hide-p 'run) 'mostly) nil t) 2482 (if (idlwave-shell-hide-p 'run) 'mostly) nil t)
2483 ;; Try setting breakpoint again 2483 ;; Try setting breakpoint again
2484 (idlwave-shell-set-bp bp)) 2484 (idlwave-shell-set-bp bp))
@@ -2502,9 +2502,9 @@ breakpoint can not be set."
2502(defun idlwave-shell-cont (&optional no-show) 2502(defun idlwave-shell-cont (&optional no-show)
2503 "Continue executing." 2503 "Continue executing."
2504 (interactive) 2504 (interactive)
2505 (idlwave-shell-send-command ".c" (unless no-show 2505 (idlwave-shell-send-command ".c" (unless no-show
2506 '(idlwave-shell-redisplay 'hide)) 2506 '(idlwave-shell-redisplay 'hide))
2507 (if (idlwave-shell-hide-p 'debug) 'mostly) 2507 (if (idlwave-shell-hide-p 'debug) 'mostly)
2508 nil t)) 2508 nil t))
2509 2509
2510(defun idlwave-shell-go () 2510(defun idlwave-shell-go ()
@@ -2585,7 +2585,7 @@ at a breakpoint."
2585 ((eq force 'enable) (setq disabled t))) 2585 ((eq force 'enable) (setq disabled t)))
2586 (when bp 2586 (when bp
2587 (setf (nth 3 (cdr (cdr bp))) (not disabled)) 2587 (setf (nth 3 (cdr (cdr bp))) (not disabled))
2588 (idlwave-shell-send-command 2588 (idlwave-shell-send-command
2589 (concat "breakpoint," 2589 (concat "breakpoint,"
2590 (if disabled "/enable," "/disable,") 2590 (if disabled "/enable," "/disable,")
2591 (int-to-string (idlwave-shell-bp-get bp))) 2591 (int-to-string (idlwave-shell-bp-get bp)))
@@ -2599,13 +2599,13 @@ If ENABLE is non-nil, enable them instead."
2599 (while bpl 2599 (while bpl
2600 (setq disabled (idlwave-shell-bp-get (car bpl) 'disabled)) 2600 (setq disabled (idlwave-shell-bp-get (car bpl) 'disabled))
2601 (when (idlwave-xor (not disabled) (eq enable 'enable)) 2601 (when (idlwave-xor (not disabled) (eq enable 'enable))
2602 (idlwave-shell-toggle-enable-current-bp 2602 (idlwave-shell-toggle-enable-current-bp
2603 (car bpl) (if (eq enable 'enable) 'enable 'disable) no-update) 2603 (car bpl) (if (eq enable 'enable) 'enable 'disable) no-update)
2604 (push (car bpl) modified)) 2604 (push (car bpl) modified))
2605 (setq bpl (cdr bpl))) 2605 (setq bpl (cdr bpl)))
2606 (unless no-update (idlwave-shell-bp-query)) 2606 (unless no-update (idlwave-shell-bp-query))
2607 modified)) 2607 modified))
2608 2608
2609(defun idlwave-shell-to-here () 2609(defun idlwave-shell-to-here ()
2610 "Set a breakpoint with count 1 then continue." 2610 "Set a breakpoint with count 1 then continue."
2611 (interactive) 2611 (interactive)
@@ -2643,7 +2643,7 @@ in the current routine."
2643(defun idlwave-shell-set-bp-in-module (module) 2643(defun idlwave-shell-set-bp-in-module (module)
2644 "Set breakpoint in module. Assumes that `idlwave-shell-sources-alist' 2644 "Set breakpoint in module. Assumes that `idlwave-shell-sources-alist'
2645contains an entry for that module." 2645contains an entry for that module."
2646 (let ((source-file (car-safe 2646 (let ((source-file (car-safe
2647 (cdr-safe 2647 (cdr-safe
2648 (assoc (upcase module) 2648 (assoc (upcase module)
2649 idlwave-shell-sources-alist)))) 2649 idlwave-shell-sources-alist))))
@@ -2662,7 +2662,7 @@ contains an entry for that module."
2662 (save-excursion 2662 (save-excursion
2663 (goto-char (point-min)) 2663 (goto-char (point-min))
2664 (let ((case-fold-search t)) 2664 (let ((case-fold-search t))
2665 (if (re-search-forward 2665 (if (re-search-forward
2666 (concat "^[ \t]*\\(pro\\|function\\)[ \t]+" 2666 (concat "^[ \t]*\\(pro\\|function\\)[ \t]+"
2667 (downcase module) 2667 (downcase module)
2668 "[ \t\n,]") nil t) 2668 "[ \t\n,]") nil t)
@@ -2704,7 +2704,7 @@ Sets a breakpoint with count 1 at end of block, then continues."
2704 "Attempt to run until this procedure exits. 2704 "Attempt to run until this procedure exits.
2705Runs to the last statement and then steps 1 statement. Use the .out command." 2705Runs to the last statement and then steps 1 statement. Use the .out command."
2706 (interactive) 2706 (interactive)
2707 (idlwave-shell-send-command ".o" nil 2707 (idlwave-shell-send-command ".o" nil
2708 (if (idlwave-shell-hide-p 'debug) 'mostly) 2708 (if (idlwave-shell-hide-p 'debug) 'mostly)
2709 nil t)) 2709 nil t))
2710 2710
@@ -2751,7 +2751,7 @@ Runs to the last statement and then steps 1 statement. Use the .out command."
2751 (interactive "e") 2751 (interactive "e")
2752 (let ((transient-mark-mode t) 2752 (let ((transient-mark-mode t)
2753 (zmacs-regions t) 2753 (zmacs-regions t)
2754 (tracker (if (featurep 'xemacs) 2754 (tracker (if (featurep 'xemacs)
2755 (if (fboundp 'default-mouse-track-event-is-with-button) 2755 (if (fboundp 'default-mouse-track-event-is-with-button)
2756 'idlwave-xemacs-hack-mouse-track 2756 'idlwave-xemacs-hack-mouse-track
2757 'mouse-track) 2757 'mouse-track)
@@ -2769,7 +2769,7 @@ Runs to the last statement and then steps 1 statement. Use the .out command."
2769 (let ((oldfunc (symbol-function 'default-mouse-track-event-is-with-button))) 2769 (let ((oldfunc (symbol-function 'default-mouse-track-event-is-with-button)))
2770 (unwind-protect 2770 (unwind-protect
2771 (progn 2771 (progn
2772 (fset 'default-mouse-track-event-is-with-button 2772 (fset 'default-mouse-track-event-is-with-button
2773 'idlwave-default-mouse-track-event-is-with-button) 2773 'idlwave-default-mouse-track-event-is-with-button)
2774 (mouse-track event)) 2774 (mouse-track event))
2775 (fset 'default-mouse-track-event-is-with-button oldfunc)))) 2775 (fset 'default-mouse-track-event-is-with-button oldfunc))))
@@ -2801,7 +2801,7 @@ Runs to the last statement and then steps 1 statement. Use the .out command."
2801(defvar idlwave-shell-examine-completion-list nil) 2801(defvar idlwave-shell-examine-completion-list nil)
2802 2802
2803(defun idlwave-shell-print (arg &optional help ev complete-help-type) 2803(defun idlwave-shell-print (arg &optional help ev complete-help-type)
2804 "Print current expression. 2804 "Print current expression.
2805 2805
2806With HELP non-nil, show help on expression. If HELP is a string, 2806With HELP non-nil, show help on expression. If HELP is a string,
2807the expression will be put in place of ___, e.g.: 2807the expression will be put in place of ___, e.g.:
@@ -2834,11 +2834,11 @@ idlw-shell-examine-alist via mini-buffer shortcut key."
2834 (save-excursion 2834 (save-excursion
2835 (let* ((process (get-buffer-process (current-buffer))) 2835 (let* ((process (get-buffer-process (current-buffer)))
2836 (process-mark (if process (process-mark process))) 2836 (process-mark (if process (process-mark process)))
2837 (stack-label 2837 (stack-label
2838 (if (and (integerp idlwave-shell-calling-stack-index) 2838 (if (and (integerp idlwave-shell-calling-stack-index)
2839 (> idlwave-shell-calling-stack-index 0)) 2839 (> idlwave-shell-calling-stack-index 0))
2840 (format " [-%d:%s]" 2840 (format " [-%d:%s]"
2841 idlwave-shell-calling-stack-index 2841 idlwave-shell-calling-stack-index
2842 idlwave-shell-calling-stack-routine))) 2842 idlwave-shell-calling-stack-routine)))
2843 expr beg end cmd examine-hook) 2843 expr beg end cmd examine-hook)
2844 (cond 2844 (cond
@@ -2868,7 +2868,7 @@ idlw-shell-examine-alist via mini-buffer shortcut key."
2868 ;; an array 2868 ;; an array
2869 (forward-sexp)) 2869 (forward-sexp))
2870 (setq end (point))))) 2870 (setq end (point)))))
2871 2871
2872 ;; Get expression, but first move the begin mark if a 2872 ;; Get expression, but first move the begin mark if a
2873 ;; process-mark is inside the region, to keep the overlay from 2873 ;; process-mark is inside the region, to keep the overlay from
2874 ;; wandering in the Shell. 2874 ;; wandering in the Shell.
@@ -2879,17 +2879,17 @@ idlw-shell-examine-alist via mini-buffer shortcut key."
2879 2879
2880 ;; Show the overlay(s) and attach any necessary hooks and filters 2880 ;; Show the overlay(s) and attach any necessary hooks and filters
2881 (when (and beg end idlwave-shell-expression-overlay) 2881 (when (and beg end idlwave-shell-expression-overlay)
2882 (move-overlay idlwave-shell-expression-overlay beg end 2882 (move-overlay idlwave-shell-expression-overlay beg end
2883 (current-buffer)) 2883 (current-buffer))
2884 (add-hook 'pre-command-hook 2884 (add-hook 'pre-command-hook
2885 'idlwave-shell-delete-expression-overlay)) 2885 'idlwave-shell-delete-expression-overlay))
2886 (setq examine-hook 2886 (setq examine-hook
2887 (if idlwave-shell-separate-examine-output 2887 (if idlwave-shell-separate-examine-output
2888 'idlwave-shell-examine-display 2888 'idlwave-shell-examine-display
2889 'idlwave-shell-examine-highlight)) 2889 'idlwave-shell-examine-highlight))
2890 (add-hook 'pre-command-hook 2890 (add-hook 'pre-command-hook
2891 'idlwave-shell-delete-output-overlay) 2891 'idlwave-shell-delete-output-overlay)
2892 2892
2893 ;; Remove empty or comment-only lines 2893 ;; Remove empty or comment-only lines
2894 (while (string-match "\n[ \t]*\\(;.*\\)?\r*\n" expr) 2894 (while (string-match "\n[ \t]*\\(;.*\\)?\r*\n" expr)
2895 (setq expr (replace-match "\n" t t expr))) 2895 (setq expr (replace-match "\n" t t expr)))
@@ -2899,41 +2899,41 @@ idlw-shell-examine-alist via mini-buffer shortcut key."
2899 ;; Remove final newline 2899 ;; Remove final newline
2900 (if (string-match "\n[ \t\r]*\\'" expr) 2900 (if (string-match "\n[ \t\r]*\\'" expr)
2901 (setq expr (replace-match "" t t expr))) 2901 (setq expr (replace-match "" t t expr)))
2902 2902
2903 (catch 'exit 2903 (catch 'exit
2904 ;; Pop-up or complete on the examine selection list, if appropriate 2904 ;; Pop-up or complete on the examine selection list, if appropriate
2905 (if (or 2905 (if (or
2906 complete-help-type 2906 complete-help-type
2907 (and ev idlwave-shell-examine-alist) 2907 (and ev idlwave-shell-examine-alist)
2908 (consp help)) 2908 (consp help))
2909 (let ((help-cons 2909 (let ((help-cons
2910 (if (consp help) help 2910 (if (consp help) help
2911 (assoc 2911 (assoc
2912 ;; A cons from either a pop-up or mini-buffer completion 2912 ;; A cons from either a pop-up or mini-buffer completion
2913 (if complete-help-type 2913 (if complete-help-type
2914 (idlwave-one-key-select 'idlwave-shell-examine-alist 2914 (idlwave-one-key-select 'idlwave-shell-examine-alist
2915 "Examine with: " 1.5) 2915 "Examine with: " 1.5)
2916;; (idlwave-completing-read 2916;; (idlwave-completing-read
2917;; "Examine with: " 2917;; "Examine with: "
2918;; idlwave-shell-examine-alist nil nil nil 2918;; idlwave-shell-examine-alist nil nil nil
2919;; 'idlwave-shell-examine-completion-list 2919;; 'idlwave-shell-examine-completion-list
2920;; "Print") 2920;; "Print")
2921 (idlwave-popup-select 2921 (idlwave-popup-select
2922 ev 2922 ev
2923 (mapcar 'car idlwave-shell-examine-alist) 2923 (mapcar 'car idlwave-shell-examine-alist)
2924 "Examine with")) 2924 "Examine with"))
2925 idlwave-shell-examine-alist)))) 2925 idlwave-shell-examine-alist))))
2926 (setq help (cdr help-cons)) 2926 (setq help (cdr help-cons))
2927 (if (null help) (throw 'exit nil)) 2927 (if (null help) (throw 'exit nil))
2928 (if idlwave-shell-separate-examine-output 2928 (if idlwave-shell-separate-examine-output
2929 (setq idlwave-shell-examine-label 2929 (setq idlwave-shell-examine-label
2930 (concat 2930 (concat
2931 (format "==>%s<==\n%s:" expr (car help-cons)) 2931 (format "==>%s<==\n%s:" expr (car help-cons))
2932 stack-label "\n")))) 2932 stack-label "\n"))))
2933 ;; The regular help label (no popups, cons cells, etc.) 2933 ;; The regular help label (no popups, cons cells, etc.)
2934 (setq idlwave-shell-examine-label 2934 (setq idlwave-shell-examine-label
2935 (concat 2935 (concat
2936 (format "==>%s<==\n%s:" expr 2936 (format "==>%s<==\n%s:" expr
2937 (cond ((null help) "print") 2937 (cond ((null help) "print")
2938 ((stringp help) help) 2938 ((stringp help) help)
2939 (t (symbol-name help)))) 2939 (t (symbol-name help))))
@@ -2946,9 +2946,9 @@ idlw-shell-examine-alist via mini-buffer shortcut key."
2946 idlwave-shell-calling-stack-index))) 2946 idlwave-shell-calling-stack-index)))
2947 (setq cmd (idlwave-shell-help-statement help expr)) 2947 (setq cmd (idlwave-shell-help-statement help expr))
2948 ;;(idlwave-shell-recenter-shell-window) 2948 ;;(idlwave-shell-recenter-shell-window)
2949 (idlwave-shell-send-command 2949 (idlwave-shell-send-command
2950 cmd 2950 cmd
2951 examine-hook 2951 examine-hook
2952 (if idlwave-shell-separate-examine-output 'hide)))))) 2952 (if idlwave-shell-separate-examine-output 'hide))))))
2953 2953
2954(defvar idlwave-shell-examine-window-alist nil 2954(defvar idlwave-shell-examine-window-alist nil
@@ -2975,9 +2975,9 @@ idlw-shell-examine-alist via mini-buffer shortcut key."
2975 (let* ((end (or 2975 (let* ((end (or
2976 (re-search-backward idlwave-shell-prompt-pattern nil t) 2976 (re-search-backward idlwave-shell-prompt-pattern nil t)
2977 (point-max))) 2977 (point-max)))
2978 (beg (progn 2978 (beg (progn
2979 (goto-char 2979 (goto-char
2980 (or (progn (if (re-search-backward 2980 (or (progn (if (re-search-backward
2981 idlwave-shell-prompt-pattern nil t) 2981 idlwave-shell-prompt-pattern nil t)
2982 (match-end 0))) 2982 (match-end 0)))
2983 (point-min))) 2983 (point-min)))
@@ -2994,21 +2994,21 @@ idlw-shell-examine-alist via mini-buffer shortcut key."
2994 (setq buffer-read-only t) 2994 (setq buffer-read-only t)
2995 (move-overlay idlwave-shell-output-overlay cur-beg cur-end 2995 (move-overlay idlwave-shell-output-overlay cur-beg cur-end
2996 (current-buffer)) 2996 (current-buffer))
2997 2997
2998 ;; Look for the examine buffer in all windows. If one is 2998 ;; Look for the examine buffer in all windows. If one is
2999 ;; found in a frame all by itself, use that, otherwise, switch 2999 ;; found in a frame all by itself, use that, otherwise, switch
3000 ;; to or create an examine window in this frame, and resize if 3000 ;; to or create an examine window in this frame, and resize if
3001 ;; it's a newly created window 3001 ;; it's a newly created window
3002 (let* ((winlist (get-buffer-window-list "*Examine*" nil 'visible))) 3002 (let* ((winlist (get-buffer-window-list "*Examine*" nil 'visible)))
3003 (setq win (idlwave-display-buffer 3003 (setq win (idlwave-display-buffer
3004 "*Examine*" 3004 "*Examine*"
3005 nil 3005 nil
3006 (let ((list winlist) thiswin) 3006 (let ((list winlist) thiswin)
3007 (catch 'exit 3007 (catch 'exit
3008 (save-selected-window 3008 (save-selected-window
3009 (while (setq thiswin (pop list)) 3009 (while (setq thiswin (pop list))
3010 (select-window thiswin) 3010 (select-window thiswin)
3011 (if (one-window-p) 3011 (if (one-window-p)
3012 (throw 'exit (window-frame thiswin))))))))) 3012 (throw 'exit (window-frame thiswin)))))))))
3013 (set-window-start win (point-min)) ; Ensure the point is visible. 3013 (set-window-start win (point-min)) ; Ensure the point is visible.
3014 (save-selected-window 3014 (save-selected-window
@@ -3029,7 +3029,7 @@ idlw-shell-examine-alist via mini-buffer shortcut key."
3029 ;; And add the new value. 3029 ;; And add the new value.
3030 (if (setq elt (assoc win idlwave-shell-examine-window-alist)) 3030 (if (setq elt (assoc win idlwave-shell-examine-window-alist))
3031 (setcdr elt (window-height)) 3031 (setcdr elt (window-height))
3032 (add-to-list 'idlwave-shell-examine-window-alist 3032 (add-to-list 'idlwave-shell-examine-window-alist
3033 (cons win (window-height))))))))) 3033 (cons win (window-height)))))))))
3034 ;; Recenter for maximum output, after widened 3034 ;; Recenter for maximum output, after widened
3035 (save-selected-window 3035 (save-selected-window
@@ -3047,7 +3047,7 @@ idlw-shell-examine-alist via mini-buffer shortcut key."
3047 3047
3048(defun idlwave-shell-examine-display-clear () 3048(defun idlwave-shell-examine-display-clear ()
3049 (interactive) 3049 (interactive)
3050 (save-excursion 3050 (save-excursion
3051 (let ((buf (get-buffer "*Examine*"))) 3051 (let ((buf (get-buffer "*Examine*")))
3052 (when (bufferp buf) 3052 (when (bufferp buf)
3053 (set-buffer buf) 3053 (set-buffer buf)
@@ -3075,7 +3075,7 @@ versions of IDL."
3075 ;; break. We will look for identifiers and exclude cases where we 3075 ;; break. We will look for identifiers and exclude cases where we
3076 ;; know it is not a variable. To distinguish array references from 3076 ;; know it is not a variable. To distinguish array references from
3077 ;; function calls, we require that arrays use [] instead of () 3077 ;; function calls, we require that arrays use [] instead of ()
3078 3078
3079 (while (string-match 3079 (while (string-match
3080 "\\(\\`\\|[^a-zA-Z0-9$_][ \t]*\\)\\([a-zA-Z][a-zA-Z0-9$_]*\\)\\([ \t]*[^a-zA-Z0-9$_]\\|\\'\\)" expr start) 3080 "\\(\\`\\|[^a-zA-Z0-9$_][ \t]*\\)\\([a-zA-Z][a-zA-Z0-9$_]*\\)\\([ \t]*[^a-zA-Z0-9$_]\\|\\'\\)" expr start)
3081 (setq var (match-string 2 expr) 3081 (setq var (match-string 2 expr)
@@ -3091,7 +3091,7 @@ versions of IDL."
3091 ((string-match "->[ \t]*\\'" pre)) ;; a method 3091 ((string-match "->[ \t]*\\'" pre)) ;; a method
3092 ((string-match "\\.\\'" pre)) ;; structure member 3092 ((string-match "\\.\\'" pre)) ;; structure member
3093 ((and (string-match "\\([\"\']\\)[^\1]*$" pre) 3093 ((and (string-match "\\([\"\']\\)[^\1]*$" pre)
3094 (string-match (concat "^[^" (match-string 1 pre) "]*" 3094 (string-match (concat "^[^" (match-string 1 pre) "]*"
3095 (match-string 1 pre)) post))) 3095 (match-string 1 pre)) post)))
3096 (t ;; seems to be a variable - replace its name in the 3096 (t ;; seems to be a variable - replace its name in the
3097 ;; expression with the fetch. 3097 ;; expression with the fetch.
@@ -3109,13 +3109,13 @@ to insert expression in place of the marker ___, e.g.: print,
3109size(___,/DIMENSIONS)" 3109size(___,/DIMENSIONS)"
3110 (cond 3110 (cond
3111 ((null help) (concat "print, " expr)) 3111 ((null help) (concat "print, " expr))
3112 ((stringp help) 3112 ((stringp help)
3113 (if (string-match "\\(^\\|[^_]\\)\\(___\\)\\([^_]\\|$\\)" help) 3113 (if (string-match "\\(^\\|[^_]\\)\\(___\\)\\([^_]\\|$\\)" help)
3114 (concat (substring help 0 (match-beginning 2)) 3114 (concat (substring help 0 (match-beginning 2))
3115 expr 3115 expr
3116 (substring help (match-end 2))))) 3116 (substring help (match-end 2)))))
3117 (t (concat "help, " expr)))) 3117 (t (concat "help, " expr))))
3118 3118
3119 3119
3120(defun idlwave-shell-examine-highlight () 3120(defun idlwave-shell-examine-highlight ()
3121 "Highlight the most recent IDL output." 3121 "Highlight the most recent IDL output."
@@ -3123,7 +3123,7 @@ size(___,/DIMENSIONS)"
3123 (process (get-buffer-process buffer)) 3123 (process (get-buffer-process buffer))
3124 (process-mark (if process (process-mark process))) 3124 (process-mark (if process (process-mark process)))
3125 output-begin output-end) 3125 output-begin output-end)
3126 (save-excursion 3126 (save-excursion
3127 (set-buffer buffer) 3127 (set-buffer buffer)
3128 (goto-char process-mark) 3128 (goto-char process-mark)
3129 (beginning-of-line) 3129 (beginning-of-line)
@@ -3131,12 +3131,12 @@ size(___,/DIMENSIONS)"
3131 (re-search-backward idlwave-shell-prompt-pattern nil t) 3131 (re-search-backward idlwave-shell-prompt-pattern nil t)
3132 (beginning-of-line 2) 3132 (beginning-of-line 2)
3133 (setq output-begin (point))) 3133 (setq output-begin (point)))
3134 3134
3135 ;; First make sure the shell window is visible 3135 ;; First make sure the shell window is visible
3136 (idlwave-display-buffer (idlwave-shell-buffer) 3136 (idlwave-display-buffer (idlwave-shell-buffer)
3137 nil (idlwave-shell-shell-frame)) 3137 nil (idlwave-shell-shell-frame))
3138 (if (and idlwave-shell-output-overlay process-mark) 3138 (if (and idlwave-shell-output-overlay process-mark)
3139 (move-overlay idlwave-shell-output-overlay 3139 (move-overlay idlwave-shell-output-overlay
3140 output-begin output-end buffer)))) 3140 output-begin output-end buffer))))
3141 3141
3142(defun idlwave-shell-delete-output-overlay () 3142(defun idlwave-shell-delete-output-overlay ()
@@ -3147,7 +3147,7 @@ size(___,/DIMENSIONS)"
3147 (delete-overlay idlwave-shell-output-overlay)) 3147 (delete-overlay idlwave-shell-output-overlay))
3148 (error nil)) 3148 (error nil))
3149 (remove-hook 'pre-command-hook 'idlwave-shell-delete-output-overlay))) 3149 (remove-hook 'pre-command-hook 'idlwave-shell-delete-output-overlay)))
3150 3150
3151(defun idlwave-shell-delete-expression-overlay () 3151(defun idlwave-shell-delete-expression-overlay ()
3152 (unless (or (eq this-command 'idlwave-shell-mouse-nop) 3152 (unless (or (eq this-command 'idlwave-shell-mouse-nop)
3153 (eq this-command 'handle-switch-frame)) 3153 (eq this-command 'handle-switch-frame))
@@ -3176,7 +3176,7 @@ contains four items:
3176count - number of times to execute breakpoint. When count reaches 0 3176count - number of times to execute breakpoint. When count reaches 0
3177 the breakpoint is cleared and removed from the alist. 3177 the breakpoint is cleared and removed from the alist.
3178 3178
3179command - command to execute when breakpoint is reached, either a 3179command - command to execute when breakpoint is reached, either a
3180 lisp function to be called with `funcall' with no arguments or a 3180 lisp function to be called with `funcall' with no arguments or a
3181 list to be evaluated with `eval'. 3181 list to be evaluated with `eval'.
3182 3182
@@ -3209,11 +3209,11 @@ If there is a prefix argument, display IDL process."
3209 (insert "\nend\n")) 3209 (insert "\nend\n"))
3210 (save-buffer 0))) 3210 (save-buffer 0)))
3211 (idlwave-shell-send-command (concat ".run " idlwave-shell-temp-pro-file) 3211 (idlwave-shell-send-command (concat ".run " idlwave-shell-temp-pro-file)
3212 nil 3212 nil
3213 (if (idlwave-shell-hide-p 'run) 'mostly) 3213 (if (idlwave-shell-hide-p 'run) 'mostly)
3214 nil t) 3214 nil t)
3215 (if n 3215 (if n
3216 (idlwave-display-buffer (idlwave-shell-buffer) 3216 (idlwave-display-buffer (idlwave-shell-buffer)
3217 nil (idlwave-shell-shell-frame)))) 3217 nil (idlwave-shell-shell-frame))))
3218 3218
3219(defun idlwave-shell-evaluate-region (beg end &optional n) 3219(defun idlwave-shell-evaluate-region (beg end &optional n)
@@ -3224,7 +3224,7 @@ Does not work for a region with multiline blocks - use
3224 (interactive "r\nP") 3224 (interactive "r\nP")
3225 (idlwave-shell-send-command (buffer-substring beg end)) 3225 (idlwave-shell-send-command (buffer-substring beg end))
3226 (if n 3226 (if n
3227 (idlwave-display-buffer (idlwave-shell-buffer) 3227 (idlwave-display-buffer (idlwave-shell-buffer)
3228 nil (idlwave-shell-shell-frame)))) 3228 nil (idlwave-shell-shell-frame))))
3229 3229
3230(defun idlwave-shell-delete-temp-files () 3230(defun idlwave-shell-delete-temp-files ()
@@ -3279,7 +3279,7 @@ Queries IDL using the string in `idlwave-shell-bp-query'."
3279 'hide)) 3279 'hide))
3280 3280
3281(defun idlwave-shell-bp-get (bp &optional item) 3281(defun idlwave-shell-bp-get (bp &optional item)
3282 "Get a value for a breakpoint. 3282 "Get a value for a breakpoint.
3283BP has the form of elements in idlwave-shell-bp-alist. Optional 3283BP has the form of elements in idlwave-shell-bp-alist. Optional
3284second arg ITEM is the particular value to retrieve. ITEM can be 3284second arg ITEM is the particular value to retrieve. ITEM can be
3285'file, 'line, 'index, 'module, 'count, 'cmd, 'condition, 'disabled or 3285'file, 'line, 'index, 'module, 'count, 'cmd, 'condition, 'disabled or
@@ -3314,8 +3314,8 @@ breakpoint overlays."
3314 ;; Searching the breakpoints 3314 ;; Searching the breakpoints
3315 ;; In IDL 5.5, the breakpoint reporting format changed. 3315 ;; In IDL 5.5, the breakpoint reporting format changed.
3316 (bp-re54 "^[ \t]*\\([0-9]+\\)[ \t]+\\(\\S-+\\)?[ \t]+\\([0-9]+\\)[ \t]+\\(\\S-+\\)") 3316 (bp-re54 "^[ \t]*\\([0-9]+\\)[ \t]+\\(\\S-+\\)?[ \t]+\\([0-9]+\\)[ \t]+\\(\\S-+\\)")
3317 (bp-re55 3317 (bp-re55
3318 (concat 3318 (concat
3319 "^\\s-*\\([0-9]+\\)" ; 1 index 3319 "^\\s-*\\([0-9]+\\)" ; 1 index
3320 "\\s-+\\([0-9]+\\)" ; 2 line number 3320 "\\s-+\\([0-9]+\\)" ; 2 line number
3321 "\\s-+\\(Uncompiled\\|" ; 3-6 either uncompiled or routine name 3321 "\\s-+\\(Uncompiled\\|" ; 3-6 either uncompiled or routine name
@@ -3330,27 +3330,27 @@ breakpoint overlays."
3330 bp-re indmap) 3330 bp-re indmap)
3331 (setq idlwave-shell-bp-alist (list nil)) 3331 (setq idlwave-shell-bp-alist (list nil))
3332 ;; Search for either header type, and set the correct regexp 3332 ;; Search for either header type, and set the correct regexp
3333 (when (or 3333 (when (or
3334 (if (re-search-forward "^\\s-*Index.*\n\\s-*-" nil t) 3334 (if (re-search-forward "^\\s-*Index.*\n\\s-*-" nil t)
3335 (setq bp-re bp-re54 ; versions <= 5.4 3335 (setq bp-re bp-re54 ; versions <= 5.4
3336 indmap '(1 2 3 4))) ;index module line file 3336 indmap '(1 2 3 4))) ;index module line file
3337 (if (re-search-forward 3337 (if (re-search-forward
3338 "^\\s-*Index\\s-*Line\\s-*Attributes\\s-*File" nil t) 3338 "^\\s-*Index\\s-*Line\\s-*Attributes\\s-*File" nil t)
3339 (setq bp-re bp-re55 ; versions >= 5.5 3339 (setq bp-re bp-re55 ; versions >= 5.5
3340 indmap '(1 6 2 16)))) ; index module line file 3340 indmap '(1 6 2 16)))) ; index module line file
3341 ;; There seems to be a breakpoint listing here, parse breakpoint lines. 3341 ;; There seems to be a breakpoint listing here, parse breakpoint lines.
3342 (while (re-search-forward bp-re nil t) 3342 (while (re-search-forward bp-re nil t)
3343 (setq index (string-to-int (match-string (nth 0 indmap))) 3343 (setq index (string-to-number (match-string (nth 0 indmap)))
3344 module (match-string (nth 1 indmap)) 3344 module (match-string (nth 1 indmap))
3345 line (string-to-int (match-string (nth 2 indmap))) 3345 line (string-to-number (match-string (nth 2 indmap)))
3346 file (idlwave-shell-file-name (match-string (nth 3 indmap)))) 3346 file (idlwave-shell-file-name (match-string (nth 3 indmap))))
3347 (if (eq bp-re bp-re55) 3347 (if (eq bp-re bp-re55)
3348 (setq count (if (match-string 10) 1 3348 (setq count (if (match-string 10) 1
3349 (if (match-string 8) 3349 (if (match-string 8)
3350 (string-to-int (match-string 8)))) 3350 (string-to-number (match-string 8))))
3351 condition (match-string 13) 3351 condition (match-string 13)
3352 disabled (not (null (match-string 15))))) 3352 disabled (not (null (match-string 15)))))
3353 3353
3354 ;; Add the breakpoint info to the list 3354 ;; Add the breakpoint info to the list
3355 (nconc idlwave-shell-bp-alist 3355 (nconc idlwave-shell-bp-alist
3356 (list (cons (list file line) 3356 (list (cons (list file line)
@@ -3360,7 +3360,7 @@ breakpoint overlays."
3360 count nil condition disabled)))))) 3360 count nil condition disabled))))))
3361 (setq idlwave-shell-bp-alist (cdr idlwave-shell-bp-alist)) 3361 (setq idlwave-shell-bp-alist (cdr idlwave-shell-bp-alist))
3362 ;; Update breakpoint data 3362 ;; Update breakpoint data
3363 (if (eq bp-re bp-re54) 3363 (if (eq bp-re bp-re54)
3364 (mapcar 'idlwave-shell-update-bp old-bp-alist) 3364 (mapcar 'idlwave-shell-update-bp old-bp-alist)
3365 (mapcar 'idlwave-shell-update-bp-command-only old-bp-alist)))) 3365 (mapcar 'idlwave-shell-update-bp-command-only old-bp-alist))))
3366 ;; Update the breakpoint overlays 3366 ;; Update the breakpoint overlays
@@ -3375,8 +3375,8 @@ breakpoint overlays."
3375 "Update BP data in breakpoint list. 3375 "Update BP data in breakpoint list.
3376If BP frame is in `idlwave-shell-bp-alist' updates the breakpoint data." 3376If BP frame is in `idlwave-shell-bp-alist' updates the breakpoint data."
3377 (let ((match (assoc (car bp) idlwave-shell-bp-alist))) 3377 (let ((match (assoc (car bp) idlwave-shell-bp-alist)))
3378 (if match 3378 (if match
3379 (if command-only 3379 (if command-only
3380 (setf (nth 1 (cdr (cdr match))) (nth 1 (cdr (cdr match)))) 3380 (setf (nth 1 (cdr (cdr match))) (nth 1 (cdr (cdr match))))
3381 (setcdr (cdr match) (cdr (cdr bp))))))) 3381 (setcdr (cdr match) (cdr (cdr bp)))))))
3382 3382
@@ -3401,7 +3401,7 @@ Otherwise return the filename in bp."
3401 (let* 3401 (let*
3402 ((bp-file (idlwave-shell-bp-get bp 'file)) 3402 ((bp-file (idlwave-shell-bp-get bp 'file))
3403 (bp-module (idlwave-shell-bp-get bp 'module)) 3403 (bp-module (idlwave-shell-bp-get bp 'module))
3404 (internal-file-list 3404 (internal-file-list
3405 (cdr (assoc bp-module idlwave-shell-sources-alist)))) 3405 (cdr (assoc bp-module idlwave-shell-sources-alist))))
3406 (if (and internal-file-list 3406 (if (and internal-file-list
3407 (equal bp-file (nth 0 internal-file-list))) 3407 (equal bp-file (nth 0 internal-file-list)))
@@ -3409,14 +3409,14 @@ Otherwise return the filename in bp."
3409 bp-file))) 3409 bp-file)))
3410 3410
3411(defun idlwave-shell-set-bp (bp &optional no-show) 3411(defun idlwave-shell-set-bp (bp &optional no-show)
3412 "Try to set a breakpoint BP. 3412 "Try to set a breakpoint BP.
3413The breakpoint will be placed at the beginning of the statement on the 3413The breakpoint will be placed at the beginning of the statement on the
3414line specified by BP or at the next IDL statement if that line is not 3414line specified by BP or at the next IDL statement if that line is not
3415a statement. Determines IDL's internal representation for the 3415a statement. Determines IDL's internal representation for the
3416breakpoint, which may have occurred at a different line than 3416breakpoint, which may have occurred at a different line than
3417specified. If NO-SHOW is non-nil, don't do any updating." 3417specified. If NO-SHOW is non-nil, don't do any updating."
3418 ;; Get and save the old breakpoints 3418 ;; Get and save the old breakpoints
3419 (idlwave-shell-send-command 3419 (idlwave-shell-send-command
3420 idlwave-shell-bp-query 3420 idlwave-shell-bp-query
3421 `(progn 3421 `(progn
3422 (idlwave-shell-filter-bp (quote ,no-show)) 3422 (idlwave-shell-filter-bp (quote ,no-show))
@@ -3434,7 +3434,7 @@ specified. If NO-SHOW is non-nil, don't do any updating."
3434(defun idlwave-shell-set-bp2 (bp &optional no-show) 3434(defun idlwave-shell-set-bp2 (bp &optional no-show)
3435 "Use results of breakpoint and sources query to set bp. 3435 "Use results of breakpoint and sources query to set bp.
3436Use the count argument with IDLs breakpoint command. 3436Use the count argument with IDLs breakpoint command.
3437We treat a count of 1 as a temporary breakpoint. 3437We treat a count of 1 as a temporary breakpoint.
3438Counts greater than 1 use the IDL AFTER=count keyword to break 3438Counts greater than 1 use the IDL AFTER=count keyword to break
3439only after reaching the statement count times." 3439only after reaching the statement count times."
3440 (let* 3440 (let*
@@ -3446,11 +3446,11 @@ only after reaching the statement count times."
3446 ((> arg 1) 3446 ((> arg 1)
3447 (format ",after=%d" arg)))) 3447 (format ",after=%d" arg))))
3448 (condition (idlwave-shell-bp-get bp 'condition)) 3448 (condition (idlwave-shell-bp-get bp 'condition))
3449 (key (concat key 3449 (key (concat key
3450 (if condition (concat ",CONDITION=\"" condition "\"")))) 3450 (if condition (concat ",CONDITION=\"" condition "\""))))
3451 (line (idlwave-shell-bp-get bp 'line))) 3451 (line (idlwave-shell-bp-get bp 'line)))
3452 (idlwave-shell-send-command 3452 (idlwave-shell-send-command
3453 (concat "breakpoint,'" 3453 (concat "breakpoint,'"
3454 (idlwave-shell-sources-bp bp) "'," 3454 (idlwave-shell-sources-bp bp) "',"
3455 (if (integerp line) (setq line (int-to-string line))) 3455 (if (integerp line) (setq line (int-to-string line)))
3456 key) 3456 key)
@@ -3534,14 +3534,14 @@ Existing overlays are recycled, in order to minimize consumption."
3534 ov ov-list bp buf old-buffers win) 3534 ov ov-list bp buf old-buffers win)
3535 3535
3536 ;; Delete the old overlays from their buffers 3536 ;; Delete the old overlays from their buffers
3537 (if ov-alist 3537 (if ov-alist
3538 (while (setq ov-list (pop ov-alist)) 3538 (while (setq ov-list (pop ov-alist))
3539 (while (setq ov (pop (cdr ov-list))) 3539 (while (setq ov (pop (cdr ov-list)))
3540 (add-to-list 'old-buffers (overlay-buffer ov)) 3540 (add-to-list 'old-buffers (overlay-buffer ov))
3541 (delete-overlay ov)))) 3541 (delete-overlay ov))))
3542 3542
3543 (setq ov-alist idlwave-shell-bp-overlays 3543 (setq ov-alist idlwave-shell-bp-overlays
3544 idlwave-shell-bp-overlays 3544 idlwave-shell-bp-overlays
3545 (if idlwave-shell-bp-glyph 3545 (if idlwave-shell-bp-glyph
3546 (mapcar 'list (mapcar 'car idlwave-shell-bp-glyph)) 3546 (mapcar 'list (mapcar 'car idlwave-shell-bp-glyph))
3547 (list (list 'bp)))) 3547 (list (list 'bp))))
@@ -3565,7 +3565,7 @@ Existing overlays are recycled, in order to minimize consumption."
3565 (t 'bp-n))) 3565 (t 'bp-n)))
3566 (t 'bp)) 3566 (t 'bp))
3567 'bp)) 3567 'bp))
3568 (help-list 3568 (help-list
3569 (delq nil 3569 (delq nil
3570 (list 3570 (list
3571 (if count 3571 (if count
@@ -3573,7 +3573,7 @@ Existing overlays are recycled, in order to minimize consumption."
3573 (if condition 3573 (if condition
3574 (concat "condition: " condition)) 3574 (concat "condition: " condition))
3575 (if disabled "disabled")))) 3575 (if disabled "disabled"))))
3576 (help-text (if help-list 3576 (help-text (if help-list
3577 (mapconcat 'identity help-list ","))) 3577 (mapconcat 'identity help-list ",")))
3578 (full-type (if disabled 3578 (full-type (if disabled
3579 (intern (concat (symbol-name type) 3579 (intern (concat (symbol-name type)
@@ -3582,7 +3582,7 @@ Existing overlays are recycled, in order to minimize consumption."
3582 (ov-existing (assq full-type ov-alist)) 3582 (ov-existing (assq full-type ov-alist))
3583 (ov (or (and (cdr ov-existing) 3583 (ov (or (and (cdr ov-existing)
3584 (pop (cdr ov-existing))) 3584 (pop (cdr ov-existing)))
3585 (idlwave-shell-make-new-bp-overlay 3585 (idlwave-shell-make-new-bp-overlay
3586 type disabled help-text))) 3586 type disabled help-text)))
3587 match) 3587 match)
3588 (move-overlay ov beg end) 3588 (move-overlay ov beg end)
@@ -3592,7 +3592,7 @@ Existing overlays are recycled, in order to minimize consumption."
3592 (list (list full-type ov))))) 3592 (list (list full-type ov)))))
3593 ;; Take care of margins if using a glyph 3593 ;; Take care of margins if using a glyph
3594 (when use-glyph 3594 (when use-glyph
3595 (if old-buffers 3595 (if old-buffers
3596 (setq old-buffers (delq (current-buffer) old-buffers))) 3596 (setq old-buffers (delq (current-buffer) old-buffers)))
3597 (if (fboundp 'set-specifier) ;; XEmacs 3597 (if (fboundp 'set-specifier) ;; XEmacs
3598 (set-specifier left-margin-width (cons (current-buffer) 2)) 3598 (set-specifier left-margin-width (cons (current-buffer) 2))
@@ -3610,7 +3610,7 @@ Existing overlays are recycled, in order to minimize consumption."
3610 3610
3611 3611
3612(defun idlwave-shell-make-new-bp-overlay (&optional type disabled help) 3612(defun idlwave-shell-make-new-bp-overlay (&optional type disabled help)
3613 "Make a new overlay for highlighting breakpoints. 3613 "Make a new overlay for highlighting breakpoints.
3614 3614
3615This stuff is strongly dependant upon the version of Emacs. If TYPE 3615This stuff is strongly dependant upon the version of Emacs. If TYPE
3616is passed, make an overlay of that type ('bp or 'bp-cond, currently 3616is passed, make an overlay of that type ('bp or 'bp-cond, currently
@@ -3620,17 +3620,17 @@ text popup."
3620 (use-glyph (and (memq idlwave-shell-mark-breakpoints '(t glyph)) 3620 (use-glyph (and (memq idlwave-shell-mark-breakpoints '(t glyph))
3621 idlwave-shell-bp-glyph)) 3621 idlwave-shell-bp-glyph))
3622 (type (or type 'bp)) 3622 (type (or type 'bp))
3623 (face (if disabled 3623 (face (if disabled
3624 idlwave-shell-disabled-breakpoint-face 3624 idlwave-shell-disabled-breakpoint-face
3625 idlwave-shell-breakpoint-face))) 3625 idlwave-shell-breakpoint-face)))
3626 (if (featurep 'xemacs) 3626 (if (featurep 'xemacs)
3627 ;; This is XEmacs 3627 ;; This is XEmacs
3628 (progn 3628 (progn
3629 (cond 3629 (cond
3630 ;; tty's cannot display glyphs 3630 ;; tty's cannot display glyphs
3631 ((eq (console-type) 'tty) 3631 ((eq (console-type) 'tty)
3632 (set-extent-property ov 'face face)) 3632 (set-extent-property ov 'face face))
3633 3633
3634 ;; use the glyph 3634 ;; use the glyph
3635 (use-glyph 3635 (use-glyph
3636 (let ((glyph (cdr (assq type idlwave-shell-bp-glyph)))) 3636 (let ((glyph (cdr (assq type idlwave-shell-bp-glyph))))
@@ -3651,13 +3651,13 @@ text popup."
3651 (if use-glyph 3651 (if use-glyph
3652 (let ((image-props (cdr (assq type idlwave-shell-bp-glyph))) 3652 (let ((image-props (cdr (assq type idlwave-shell-bp-glyph)))
3653 string) 3653 string)
3654 3654
3655 (if disabled (setq image-props 3655 (if disabled (setq image-props
3656 (append image-props 3656 (append image-props
3657 (list :conversion 'disabled)))) 3657 (list :conversion 'disabled))))
3658 (setq string 3658 (setq string
3659 (propertize "@" 3659 (propertize "@"
3660 'display 3660 'display
3661 (list (list 'margin 'left-margin) 3661 (list (list 'margin 'left-margin)
3662 image-props) 3662 image-props)
3663 'mouse-face 'highlight 3663 'mouse-face 'highlight
@@ -3685,14 +3685,14 @@ text popup."
3685Also with prefix arg, ask for the command. You can also use the command 3685Also with prefix arg, ask for the command. You can also use the command
3686`idlwave-shell-edit-default-command-line' to edit the line." 3686`idlwave-shell-edit-default-command-line' to edit the line."
3687 (interactive "P") 3687 (interactive "P")
3688 (cond 3688 (cond
3689 ((equal arg '(16)) 3689 ((equal arg '(16))
3690 (setq idlwave-shell-command-line-to-execute nil)) 3690 (setq idlwave-shell-command-line-to-execute nil))
3691 ((equal arg '(4)) 3691 ((equal arg '(4))
3692 (setq idlwave-shell-command-line-to-execute 3692 (setq idlwave-shell-command-line-to-execute
3693 (read-string "IDL> " idlwave-shell-command-line-to-execute)))) 3693 (read-string "IDL> " idlwave-shell-command-line-to-execute))))
3694 (idlwave-shell-reset 'hidden) 3694 (idlwave-shell-reset 'hidden)
3695 (idlwave-shell-send-command 3695 (idlwave-shell-send-command
3696 (or idlwave-shell-command-line-to-execute 3696 (or idlwave-shell-command-line-to-execute
3697 (with-current-buffer (idlwave-shell-buffer) 3697 (with-current-buffer (idlwave-shell-buffer)
3698 (ring-ref comint-input-ring 0))) 3698 (ring-ref comint-input-ring 0)))
@@ -3702,7 +3702,7 @@ Also with prefix arg, ask for the command. You can also use the command
3702 "Save file and run it in IDL. 3702 "Save file and run it in IDL.
3703Runs `save-buffer' and sends a '.RUN' command for the associated file to IDL. 3703Runs `save-buffer' and sends a '.RUN' command for the associated file to IDL.
3704When called from the shell buffer, re-run the file which was last handled by 3704When called from the shell buffer, re-run the file which was last handled by
3705one of the save-and-.. commands." 3705one of the save-and-.. commands."
3706 (interactive) 3706 (interactive)
3707 (idlwave-shell-save-and-action 'run)) 3707 (idlwave-shell-save-and-action 'run))
3708 3708
@@ -3718,7 +3718,7 @@ one of the save-and-.. commands."
3718 "Save file and batch it in IDL. 3718 "Save file and batch it in IDL.
3719Runs `save-buffer' and sends a '@file' command for the associated file to IDL. 3719Runs `save-buffer' and sends a '@file' command for the associated file to IDL.
3720When called from the shell buffer, re-batch the file which was last handled by 3720When called from the shell buffer, re-batch the file which was last handled by
3721one of the save-and-.. commands." 3721one of the save-and-.. commands."
3722 (interactive) 3722 (interactive)
3723 (idlwave-shell-save-and-action 'batch)) 3723 (idlwave-shell-save-and-action 'batch))
3724 3724
@@ -3758,7 +3758,7 @@ handled by this command."
3758 'idlwave-shell-maybe-update-routine-info 3758 'idlwave-shell-maybe-update-routine-info
3759 (if (idlwave-shell-hide-p 'run) 'mostly) nil t) 3759 (if (idlwave-shell-hide-p 'run) 'mostly) nil t)
3760 (idlwave-shell-bp-query)) 3760 (idlwave-shell-bp-query))
3761 (let ((msg (format "No such file %s" 3761 (let ((msg (format "No such file %s"
3762 idlwave-shell-last-save-and-action-file))) 3762 idlwave-shell-last-save-and-action-file)))
3763 (setq idlwave-shell-last-save-and-action-file nil) 3763 (setq idlwave-shell-last-save-and-action-file nil)
3764 (error msg)))) 3764 (error msg))))
@@ -3791,7 +3791,7 @@ Queries IDL using the string in `idlwave-shell-sources-query'."
3791 3791
3792(defun idlwave-shell-sources-filter () 3792(defun idlwave-shell-sources-filter ()
3793 "Get source files from `idlwave-shell-sources-query' output. 3793 "Get source files from `idlwave-shell-sources-query' output.
3794Create `idlwave-shell-sources-alist' consisting of 3794Create `idlwave-shell-sources-alist' consisting of
3795list elements of the form: 3795list elements of the form:
3796 (module name . (source-file-truename idlwave-internal-filename))." 3796 (module name . (source-file-truename idlwave-internal-filename))."
3797 (save-excursion 3797 (save-excursion
@@ -3876,9 +3876,9 @@ list elements of the form:
3876 (list 3876 (list
3877 (save-match-data 3877 (save-match-data
3878 (idlwave-shell-file-name 3878 (idlwave-shell-file-name
3879 (buffer-substring (match-beginning 1 ) 3879 (buffer-substring (match-beginning 1 )
3880 (match-end 1)))) 3880 (match-end 1))))
3881 (string-to-int 3881 (string-to-number
3882 (buffer-substring (match-beginning 2) 3882 (buffer-substring (match-beginning 2)
3883 (match-end 2))))) 3883 (match-end 2)))))
3884 ;; Try to find the column of the error 3884 ;; Try to find the column of the error
@@ -3943,13 +3943,13 @@ Otherwise, just expand the file name."
3943 3943
3944;; The mouse bindings for PRINT and HELP 3944;; The mouse bindings for PRINT and HELP
3945(idlwave-shell-define-key-both 3945(idlwave-shell-define-key-both
3946 (if (featurep 'xemacs) 3946 (if (featurep 'xemacs)
3947 [(shift button2)] 3947 [(shift button2)]
3948 [(shift down-mouse-2)]) 3948 [(shift down-mouse-2)])
3949 'idlwave-shell-mouse-print) 3949 'idlwave-shell-mouse-print)
3950(idlwave-shell-define-key-both 3950(idlwave-shell-define-key-both
3951 (if (featurep 'xemacs) 3951 (if (featurep 'xemacs)
3952 [(control meta button2)] 3952 [(control meta button2)]
3953 [(control meta down-mouse-2)]) 3953 [(control meta down-mouse-2)])
3954 'idlwave-shell-mouse-help) 3954 'idlwave-shell-mouse-help)
3955(idlwave-shell-define-key-both 3955(idlwave-shell-define-key-both
@@ -3958,14 +3958,14 @@ Otherwise, just expand the file name."
3958 [(control shift down-mouse-2)]) 3958 [(control shift down-mouse-2)])
3959 'idlwave-shell-examine-select) 3959 'idlwave-shell-examine-select)
3960;; Add this one from the idlwave-mode-map 3960;; Add this one from the idlwave-mode-map
3961(define-key idlwave-shell-mode-map 3961(define-key idlwave-shell-mode-map
3962 (if (featurep 'xemacs) 3962 (if (featurep 'xemacs)
3963 [(shift button3)] 3963 [(shift button3)]
3964 [(shift mouse-3)]) 3964 [(shift mouse-3)])
3965 'idlwave-mouse-context-help) 3965 'idlwave-mouse-context-help)
3966 3966
3967;; For Emacs, we need to turn off the button release events. 3967;; For Emacs, we need to turn off the button release events.
3968(defun idlwave-shell-mouse-nop (event) 3968(defun idlwave-shell-mouse-nop (event)
3969 (interactive "e")) 3969 (interactive "e"))
3970(unless (featurep 'xemacs) 3970(unless (featurep 'xemacs)
3971 (idlwave-shell-define-key-both 3971 (idlwave-shell-define-key-both
@@ -3975,7 +3975,7 @@ Otherwise, just expand the file name."
3975 (idlwave-shell-define-key-both 3975 (idlwave-shell-define-key-both
3976 [(control meta mouse-2)] 'idlwave-shell-mouse-nop)) 3976 [(control meta mouse-2)] 'idlwave-shell-mouse-nop))
3977 3977
3978 3978
3979;; The following set of bindings is used to bind the debugging keys. 3979;; The following set of bindings is used to bind the debugging keys.
3980;; If `idlwave-shell-activate-prefix-keybindings' is non-nil, the 3980;; If `idlwave-shell-activate-prefix-keybindings' is non-nil, the
3981;; first key in the list gets bound the C-c C-d prefix map. If 3981;; first key in the list gets bound the C-c C-d prefix map. If
@@ -3984,10 +3984,10 @@ Otherwise, just expand the file name."
3984;; `idlwave-mode-map' and `idlwave-shell-mode-map'. The next list 3984;; `idlwave-mode-map' and `idlwave-shell-mode-map'. The next list
3985;; item, if non-nil, means to bind this as a single key in the 3985;; item, if non-nil, means to bind this as a single key in the
3986;; electric-debug-mode-map. 3986;; electric-debug-mode-map.
3987;; 3987;;
3988;; [C-c C-d]-binding debug-modifier-key command bind-electric-debug buf-only 3988;; [C-c C-d]-binding debug-modifier-key command bind-electric-debug buf-only
3989;; Used keys: abcdef hijklmnopqrstuvwxyz 3989;; Used keys: abcdef hijklmnopqrstuvwxyz
3990;; Unused keys: g 3990;; Unused keys: g
3991(let* ((specs 3991(let* ((specs
3992 '(([(control ?b)] ?b idlwave-shell-break-here t t) 3992 '(([(control ?b)] ?b idlwave-shell-break-here t t)
3993 ([(control ?i)] ?i idlwave-shell-break-in t t) 3993 ([(control ?i)] ?i idlwave-shell-break-in t t)
@@ -4037,10 +4037,10 @@ Otherwise, just expand the file name."
4037 electric (nth 3 s) 4037 electric (nth 3 s)
4038 only-buffer (nth 4 s) 4038 only-buffer (nth 4 s)
4039 cannotshift (and shift (char-valid-p c2) (eq c2 (upcase c2)))) 4039 cannotshift (and shift (char-valid-p c2) (eq c2 (upcase c2))))
4040 4040
4041 ;; The regular prefix keymap. 4041 ;; The regular prefix keymap.
4042 (when (and idlwave-shell-activate-prefix-keybindings k1) 4042 (when (and idlwave-shell-activate-prefix-keybindings k1)
4043 (unless only-buffer 4043 (unless only-buffer
4044 (define-key idlwave-shell-mode-prefix-map k1 cmd)) 4044 (define-key idlwave-shell-mode-prefix-map k1 cmd))
4045 (define-key idlwave-mode-prefix-map k1 cmd)) 4045 (define-key idlwave-mode-prefix-map k1 cmd))
4046 ;; The debug modifier map 4046 ;; The debug modifier map
@@ -4054,24 +4054,24 @@ Otherwise, just expand the file name."
4054 (unless only-buffer (define-key idlwave-shell-mode-map k2 cmd)))) 4054 (unless only-buffer (define-key idlwave-shell-mode-map k2 cmd))))
4055 ;; The electric debug single-keystroke map 4055 ;; The electric debug single-keystroke map
4056 (if (and electric (char-or-string-p c2)) 4056 (if (and electric (char-or-string-p c2))
4057 (define-key idlwave-shell-electric-debug-mode-map (char-to-string c2) 4057 (define-key idlwave-shell-electric-debug-mode-map (char-to-string c2)
4058 cmd)))) 4058 cmd))))
4059 4059
4060;; A few extras in the electric debug map 4060;; A few extras in the electric debug map
4061(define-key idlwave-shell-electric-debug-mode-map " " 'idlwave-shell-step) 4061(define-key idlwave-shell-electric-debug-mode-map " " 'idlwave-shell-step)
4062(define-key idlwave-shell-electric-debug-mode-map "+" 'idlwave-shell-stack-up) 4062(define-key idlwave-shell-electric-debug-mode-map "+" 'idlwave-shell-stack-up)
4063(define-key idlwave-shell-electric-debug-mode-map "=" 'idlwave-shell-stack-up) 4063(define-key idlwave-shell-electric-debug-mode-map "=" 'idlwave-shell-stack-up)
4064(define-key idlwave-shell-electric-debug-mode-map "-" 4064(define-key idlwave-shell-electric-debug-mode-map "-"
4065 'idlwave-shell-stack-down) 4065 'idlwave-shell-stack-down)
4066(define-key idlwave-shell-electric-debug-mode-map "_" 4066(define-key idlwave-shell-electric-debug-mode-map "_"
4067 'idlwave-shell-stack-down) 4067 'idlwave-shell-stack-down)
4068(define-key idlwave-shell-electric-debug-mode-map "q" 'idlwave-shell-retall) 4068(define-key idlwave-shell-electric-debug-mode-map "q" 'idlwave-shell-retall)
4069(define-key idlwave-shell-electric-debug-mode-map "t" 4069(define-key idlwave-shell-electric-debug-mode-map "t"
4070 '(lambda () (interactive) (idlwave-shell-send-command "help,/TRACE"))) 4070 '(lambda () (interactive) (idlwave-shell-send-command "help,/TRACE")))
4071(define-key idlwave-shell-electric-debug-mode-map [(control ??)] 4071(define-key idlwave-shell-electric-debug-mode-map [(control ??)]
4072 'idlwave-shell-electric-debug-help) 4072 'idlwave-shell-electric-debug-help)
4073(define-key idlwave-shell-electric-debug-mode-map "x" 4073(define-key idlwave-shell-electric-debug-mode-map "x"
4074 '(lambda (arg) (interactive "P") 4074 '(lambda (arg) (interactive "P")
4075 (idlwave-shell-print arg nil nil t))) 4075 (idlwave-shell-print arg nil nil t)))
4076 4076
4077 4077
@@ -4092,12 +4092,12 @@ Otherwise, just expand the file name."
4092 (setq idlwave-shell-suppress-electric-debug nil)) 4092 (setq idlwave-shell-suppress-electric-debug nil))
4093 (idlwave-shell-electric-debug-mode)) 4093 (idlwave-shell-electric-debug-mode))
4094 4094
4095(defvar idlwave-shell-electric-debug-read-only) 4095(defvar idlwave-shell-electric-debug-read-only)
4096(defvar idlwave-shell-electric-debug-buffers nil) 4096(defvar idlwave-shell-electric-debug-buffers nil)
4097 4097
4098(easy-mmode-define-minor-mode idlwave-shell-electric-debug-mode 4098(easy-mmode-define-minor-mode idlwave-shell-electric-debug-mode
4099 "Toggle Electric Debug mode. 4099 "Toggle Electric Debug mode.
4100With no argument, this command toggles the mode. 4100With no argument, this command toggles the mode.
4101Non-null prefix argument turns on the mode. 4101Non-null prefix argument turns on the mode.
4102Null prefix argument turns off the mode. 4102Null prefix argument turns off the mode.
4103 4103
@@ -4107,7 +4107,7 @@ nil
4107" *Debugging*" 4107" *Debugging*"
4108idlwave-shell-electric-debug-mode-map) 4108idlwave-shell-electric-debug-mode-map)
4109 4109
4110(add-hook 4110(add-hook
4111 'idlwave-shell-electric-debug-mode-on-hook 4111 'idlwave-shell-electric-debug-mode-on-hook
4112 (lambda () 4112 (lambda ()
4113 (set (make-local-variable 'idlwave-shell-electric-debug-read-only) 4113 (set (make-local-variable 'idlwave-shell-electric-debug-read-only)
@@ -4115,13 +4115,13 @@ idlwave-shell-electric-debug-mode-map)
4115 (setq buffer-read-only t) 4115 (setq buffer-read-only t)
4116 (add-to-list 'idlwave-shell-electric-debug-buffers (current-buffer)) 4116 (add-to-list 'idlwave-shell-electric-debug-buffers (current-buffer))
4117 (if idlwave-shell-stop-line-overlay 4117 (if idlwave-shell-stop-line-overlay
4118 (overlay-put idlwave-shell-stop-line-overlay 'face 4118 (overlay-put idlwave-shell-stop-line-overlay 'face
4119 idlwave-shell-electric-stop-line-face)) 4119 idlwave-shell-electric-stop-line-face))
4120 (if (facep 'fringe) 4120 (if (facep 'fringe)
4121 (set-face-foreground 'fringe idlwave-shell-electric-stop-color 4121 (set-face-foreground 'fringe idlwave-shell-electric-stop-color
4122 (selected-frame))))) 4122 (selected-frame)))))
4123 4123
4124(add-hook 4124(add-hook
4125 'idlwave-shell-electric-debug-mode-off-hook 4125 'idlwave-shell-electric-debug-mode-off-hook
4126 (lambda () 4126 (lambda ()
4127 ;; Return to previous read-only state 4127 ;; Return to previous read-only state
@@ -4130,7 +4130,7 @@ idlwave-shell-electric-debug-mode-map)
4130 (setq idlwave-shell-electric-debug-buffers 4130 (setq idlwave-shell-electric-debug-buffers
4131 (delq (current-buffer) idlwave-shell-electric-debug-buffers)) 4131 (delq (current-buffer) idlwave-shell-electric-debug-buffers))
4132 (if idlwave-shell-stop-line-overlay 4132 (if idlwave-shell-stop-line-overlay
4133 (overlay-put idlwave-shell-stop-line-overlay 'face 4133 (overlay-put idlwave-shell-stop-line-overlay 'face
4134 idlwave-shell-stop-line-face) 4134 idlwave-shell-stop-line-face)
4135 (if (facep 'fringe) 4135 (if (facep 'fringe)
4136 (set-face-foreground 'fringe (face-foreground 'default)))))) 4136 (set-face-foreground 'fringe (face-foreground 'default))))))
@@ -4161,7 +4161,7 @@ idlwave-shell-electric-debug-mode-map)
4161;; Show the help text 4161;; Show the help text
4162(defun idlwave-shell-electric-debug-help () 4162(defun idlwave-shell-electric-debug-help ()
4163 (interactive) 4163 (interactive)
4164 (with-output-to-temp-buffer "*IDLWAVE Electric Debug Help*" 4164 (with-output-to-temp-buffer "*IDLWAVE Electric Debug Help*"
4165 (princ idlwave-shell-electric-debug-help)) 4165 (princ idlwave-shell-electric-debug-help))
4166 (let* ((current-window (selected-window)) 4166 (let* ((current-window (selected-window))
4167 (window (get-buffer-window "*IDLWAVE Electric Debug Help*")) 4167 (window (get-buffer-window "*IDLWAVE Electric Debug Help*"))
@@ -4176,7 +4176,7 @@ idlwave-shell-electric-debug-mode-map)
4176 `("Debug" 4176 `("Debug"
4177 ["Electric Debug Mode" 4177 ["Electric Debug Mode"
4178 idlwave-shell-electric-debug-mode 4178 idlwave-shell-electric-debug-mode
4179 :style toggle :selected idlwave-shell-electric-debug-mode 4179 :style toggle :selected idlwave-shell-electric-debug-mode
4180 :included (eq major-mode 'idlwave-mode) :keys "C-c C-d C-v"] 4180 :included (eq major-mode 'idlwave-mode) :keys "C-c C-d C-v"]
4181 "--" 4181 "--"
4182 ("Compile & Run" 4182 ("Compile & Run"
@@ -4192,35 +4192,35 @@ idlwave-shell-electric-debug-mode-map)
4192 "--" 4192 "--"
4193 ["Goto Next Error" idlwave-shell-goto-next-error t] 4193 ["Goto Next Error" idlwave-shell-goto-next-error t]
4194 "--" 4194 "--"
4195 ["Compile and Run Region" idlwave-shell-run-region 4195 ["Compile and Run Region" idlwave-shell-run-region
4196 (eq major-mode 'idlwave-mode)] 4196 (eq major-mode 'idlwave-mode)]
4197 ["Evaluate Region" idlwave-shell-evaluate-region 4197 ["Evaluate Region" idlwave-shell-evaluate-region
4198 (eq major-mode 'idlwave-mode)] 4198 (eq major-mode 'idlwave-mode)]
4199 "--" 4199 "--"
4200 ["Execute Default Cmd" idlwave-shell-execute-default-command-line t] 4200 ["Execute Default Cmd" idlwave-shell-execute-default-command-line t]
4201 ["Edit Default Cmd" idlwave-shell-edit-default-command-line t]) 4201 ["Edit Default Cmd" idlwave-shell-edit-default-command-line t])
4202 ("Breakpoints" 4202 ("Breakpoints"
4203 ["Set Breakpoint" idlwave-shell-break-here 4203 ["Set Breakpoint" idlwave-shell-break-here
4204 :keys "C-c C-d C-c" :active (eq major-mode 'idlwave-mode)] 4204 :keys "C-c C-d C-c" :active (eq major-mode 'idlwave-mode)]
4205 ("Set Special Breakpoint" 4205 ("Set Special Breakpoint"
4206 ["Set After Count Breakpoint" 4206 ["Set After Count Breakpoint"
4207 (progn 4207 (progn
4208 (let ((count (string-to-int (read-string "Break after count: ")))) 4208 (let ((count (string-to-number (read-string "Break after count: "))))
4209 (if (integerp count) (idlwave-shell-break-here count)))) 4209 (if (integerp count) (idlwave-shell-break-here count))))
4210 :active (eq major-mode 'idlwave-mode)] 4210 :active (eq major-mode 'idlwave-mode)]
4211 ["Set Condition Breakpoint" 4211 ["Set Condition Breakpoint"
4212 (idlwave-shell-break-here '(4)) 4212 (idlwave-shell-break-here '(4))
4213 :active (eq major-mode 'idlwave-mode)]) 4213 :active (eq major-mode 'idlwave-mode)])
4214 ["Break in Module" idlwave-shell-break-in 4214 ["Break in Module" idlwave-shell-break-in
4215 :keys "C-c C-d C-i" :active (eq major-mode 'idlwave-mode)] 4215 :keys "C-c C-d C-i" :active (eq major-mode 'idlwave-mode)]
4216 ["Break in this Module" idlwave-shell-break-this-module 4216 ["Break in this Module" idlwave-shell-break-this-module
4217 :keys "C-c C-d C-j" :active (eq major-mode 'idlwave-mode)] 4217 :keys "C-c C-d C-j" :active (eq major-mode 'idlwave-mode)]
4218 ["Clear Breakpoint" idlwave-shell-clear-current-bp t] 4218 ["Clear Breakpoint" idlwave-shell-clear-current-bp t]
4219 ["Clear All Breakpoints" idlwave-shell-clear-all-bp t] 4219 ["Clear All Breakpoints" idlwave-shell-clear-all-bp t]
4220 ["Disable/Enable Breakpoint" idlwave-shell-toggle-enable-current-bp t] 4220 ["Disable/Enable Breakpoint" idlwave-shell-toggle-enable-current-bp t]
4221 ["Goto Previous Breakpoint" idlwave-shell-goto-previous-bp 4221 ["Goto Previous Breakpoint" idlwave-shell-goto-previous-bp
4222 :keys "C-c C-d [" :active (eq major-mode 'idlwave-mode)] 4222 :keys "C-c C-d [" :active (eq major-mode 'idlwave-mode)]
4223 ["Goto Next Breakpoint" idlwave-shell-goto-next-bp 4223 ["Goto Next Breakpoint" idlwave-shell-goto-next-bp
4224 :keys "C-c C-d ]" :active (eq major-mode 'idlwave-mode)] 4224 :keys "C-c C-d ]" :active (eq major-mode 'idlwave-mode)]
4225 ["List All Breakpoints" idlwave-shell-list-all-bp t] 4225 ["List All Breakpoints" idlwave-shell-list-all-bp t]
4226 ["Resync Breakpoints" idlwave-shell-bp-query t]) 4226 ["Resync Breakpoints" idlwave-shell-bp-query t])
@@ -4252,38 +4252,38 @@ idlwave-shell-electric-debug-mode-map)
4252 ["Redisplay and Sync" idlwave-shell-redisplay t]) 4252 ["Redisplay and Sync" idlwave-shell-redisplay t])
4253 ("Show Commands" 4253 ("Show Commands"
4254 ["Everything" (if (eq idlwave-shell-show-commands 'everything) 4254 ["Everything" (if (eq idlwave-shell-show-commands 'everything)
4255 (progn 4255 (progn
4256 (setq idlwave-shell-show-commands 4256 (setq idlwave-shell-show-commands
4257 (get 'idlwave-shell-show-commands 'last-val)) 4257 (get 'idlwave-shell-show-commands 'last-val))
4258 (put 'idlwave-shell-show-commands 'last-val nil)) 4258 (put 'idlwave-shell-show-commands 'last-val nil))
4259 (put 'idlwave-shell-show-commands 'last-val 4259 (put 'idlwave-shell-show-commands 'last-val
4260 idlwave-shell-show-commands) 4260 idlwave-shell-show-commands)
4261 (setq idlwave-shell-show-commands 'everything)) 4261 (setq idlwave-shell-show-commands 'everything))
4262 :style toggle :selected (and (not (listp idlwave-shell-show-commands)) 4262 :style toggle :selected (and (not (listp idlwave-shell-show-commands))
4263 (eq idlwave-shell-show-commands 4263 (eq idlwave-shell-show-commands
4264 'everything))] 4264 'everything))]
4265 "--" 4265 "--"
4266 ["Compiling Commands" (idlwave-shell-add-or-remove-show 'run) 4266 ["Compiling Commands" (idlwave-shell-add-or-remove-show 'run)
4267 :style toggle 4267 :style toggle
4268 :selected (not (idlwave-shell-hide-p 4268 :selected (not (idlwave-shell-hide-p
4269 'run 4269 'run
4270 (get 'idlwave-shell-show-commands 'last-val))) 4270 (get 'idlwave-shell-show-commands 'last-val)))
4271 :active (not (eq idlwave-shell-show-commands 'everything))] 4271 :active (not (eq idlwave-shell-show-commands 'everything))]
4272 ["Breakpoint Commands" (idlwave-shell-add-or-remove-show 'breakpoint) 4272 ["Breakpoint Commands" (idlwave-shell-add-or-remove-show 'breakpoint)
4273 :style toggle 4273 :style toggle
4274 :selected (not (idlwave-shell-hide-p 4274 :selected (not (idlwave-shell-hide-p
4275 'breakpoint 4275 'breakpoint
4276 (get 'idlwave-shell-show-commands 'last-val))) 4276 (get 'idlwave-shell-show-commands 'last-val)))
4277 :active (not (eq idlwave-shell-show-commands 'everything))] 4277 :active (not (eq idlwave-shell-show-commands 'everything))]
4278 ["Debug Commands" (idlwave-shell-add-or-remove-show 'debug) 4278 ["Debug Commands" (idlwave-shell-add-or-remove-show 'debug)
4279 :style toggle 4279 :style toggle
4280 :selected (not (idlwave-shell-hide-p 4280 :selected (not (idlwave-shell-hide-p
4281 'debug 4281 'debug
4282 (get 'idlwave-shell-show-commands 'last-val))) 4282 (get 'idlwave-shell-show-commands 'last-val)))
4283 :active (not (eq idlwave-shell-show-commands 'everything))] 4283 :active (not (eq idlwave-shell-show-commands 'everything))]
4284 ["Miscellaneous Commands" (idlwave-shell-add-or-remove-show 'misc) 4284 ["Miscellaneous Commands" (idlwave-shell-add-or-remove-show 'misc)
4285 :style toggle 4285 :style toggle
4286 :selected (not (idlwave-shell-hide-p 4286 :selected (not (idlwave-shell-hide-p
4287 'misc 4287 'misc
4288 (get 'idlwave-shell-show-commands 'last-val))) 4288 (get 'idlwave-shell-show-commands 'last-val)))
4289 :active (not (eq idlwave-shell-show-commands 'everything))]) 4289 :active (not (eq idlwave-shell-show-commands 'everything))])
@@ -4297,7 +4297,7 @@ idlwave-shell-electric-debug-mode-map)
4297 :style toggle :selected idlwave-shell-use-input-mode-magic]) 4297 :style toggle :selected idlwave-shell-use-input-mode-magic])
4298 "--" 4298 "--"
4299 ["Update Working Dir" idlwave-shell-resync-dirs t] 4299 ["Update Working Dir" idlwave-shell-resync-dirs t]
4300 ["Save Path Info" 4300 ["Save Path Info"
4301 (idlwave-shell-send-command idlwave-shell-path-query 4301 (idlwave-shell-send-command idlwave-shell-path-query
4302 'idlwave-shell-get-path-info 4302 'idlwave-shell-get-path-info
4303 'hide) 4303 'hide)
@@ -4309,7 +4309,7 @@ idlwave-shell-electric-debug-mode-map)
4309 4309
4310(if (or (featurep 'easymenu) (load "easymenu" t)) 4310(if (or (featurep 'easymenu) (load "easymenu" t))
4311 (progn 4311 (progn
4312 (easy-menu-define 4312 (easy-menu-define
4313 idlwave-mode-debug-menu idlwave-mode-map "IDL debugging menus" 4313 idlwave-mode-debug-menu idlwave-mode-map "IDL debugging menus"
4314 idlwave-shell-menu-def) 4314 idlwave-shell-menu-def)
4315 (easy-menu-define 4315 (easy-menu-define
@@ -4329,7 +4329,7 @@ idlwave-shell-electric-debug-mode-map)
4329(defvar idlwave-shell-bp-glyph nil 4329(defvar idlwave-shell-bp-glyph nil
4330 "The glyphs to mark breakpoint lines in the source code.") 4330 "The glyphs to mark breakpoint lines in the source code.")
4331 4331
4332(let ((image-alist 4332(let ((image-alist
4333 '((bp . "/* XPM */ 4333 '((bp . "/* XPM */
4334static char * file[] = { 4334static char * file[] = {
4335\"14 12 3 1\", 4335\"14 12 3 1\",
@@ -4462,7 +4462,7 @@ static char * file[] = {
4462\" .XXXX. \", 4462\" .XXXX. \",
4463\" .... \", 4463\" .... \",
4464\" \"};"))) im-cons im) 4464\" \"};"))) im-cons im)
4465 4465
4466 (while (setq im-cons (pop image-alist)) 4466 (while (setq im-cons (pop image-alist))
4467 (setq im (cond ((and (featurep 'xemacs) 4467 (setq im (cond ((and (featurep 'xemacs)
4468 (featurep 'xpm)) 4468 (featurep 'xpm))
@@ -4475,7 +4475,7 @@ static char * file[] = {
4475 ((and (not (featurep 'xemacs)) 4475 ((and (not (featurep 'xemacs))
4476 (fboundp 'image-type-available-p) 4476 (fboundp 'image-type-available-p)
4477 (image-type-available-p 'xpm)) 4477 (image-type-available-p 'xpm))
4478 (list 'image :type 'xpm :data (cdr im-cons) 4478 (list 'image :type 'xpm :data (cdr im-cons)
4479 :ascent 'center)) 4479 :ascent 'center))
4480 (t nil))) 4480 (t nil)))
4481 (if im (push (cons (car im-cons) im) idlwave-shell-bp-glyph)))) 4481 (if im (push (cons (car im-cons) im) idlwave-shell-bp-glyph))))
@@ -4485,7 +4485,7 @@ static char * file[] = {
4485 4485
4486;;; Load the toolbar when wanted by the user. 4486;;; Load the toolbar when wanted by the user.
4487 4487
4488(autoload 'idlwave-toolbar-toggle "idlw-toolbar" 4488(autoload 'idlwave-toolbar-toggle "idlw-toolbar"
4489 "Toggle the IDLWAVE toolbar") 4489 "Toggle the IDLWAVE toolbar")
4490(autoload 'idlwave-toolbar-add-everywhere "idlw-toolbar" 4490(autoload 'idlwave-toolbar-add-everywhere "idlw-toolbar"
4491 "Add IDLWAVE toolbar") 4491 "Add IDLWAVE toolbar")
diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el
index 083d87f581c..13bc7f08999 100644
--- a/lisp/progmodes/inf-lisp.el
+++ b/lisp/progmodes/inf-lisp.el
@@ -214,10 +214,8 @@ processes, you can change `inferior-lisp-buffer' to another process
214buffer with \\[set-variable].") 214buffer with \\[set-variable].")
215 215
216;;;###autoload 216;;;###autoload
217(defcustom inferior-lisp-mode-hook '() 217(defvar inferior-lisp-mode-hook '()
218 "*Hook for customising Inferior Lisp mode." 218 "*Hook for customising Inferior Lisp mode.")
219 :type 'hook
220 :group 'inferior-lisp)
221 219
222(put 'inferior-lisp-mode 'mode-class 'special) 220(put 'inferior-lisp-mode 'mode-class 'special)
223 221
@@ -590,10 +588,8 @@ See variable `lisp-describe-sym-command'."
590 588
591;;; Do the user's customisation... 589;;; Do the user's customisation...
592;;;=============================== 590;;;===============================
593(defcustom inferior-lisp-load-hook nil 591(defvar inferior-lisp-load-hook nil
594 "This hook is run when the library `inf-lisp' is loaded." 592 "This hook is run when the library `inf-lisp' is loaded.")
595 :type 'hook
596 :group 'inferior-lisp)
597 593
598(run-hooks 'inferior-lisp-load-hook) 594(run-hooks 'inferior-lisp-load-hook)
599 595
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el
index 7c1ccb25fb0..86002768757 100644
--- a/lisp/progmodes/make-mode.el
+++ b/lisp/progmodes/make-mode.el
@@ -100,12 +100,35 @@
100 :prefix "makefile-") 100 :prefix "makefile-")
101 101
102(defface makefile-space-face 102(defface makefile-space-face
103 '((((class color)) (:background "hotpink")) 103 '((((class color)) (:background "hotpink"))
104 (t (:reverse-video t))) 104 (t (:reverse-video t)))
105 "Face to use for highlighting leading spaces in Font-Lock mode." 105 "Face to use for highlighting leading spaces in Font-Lock mode."
106 :group 'faces 106 :group 'faces
107 :group 'makefile) 107 :group 'makefile)
108 108
109(defface makefile-targets-face
110 ;; This needs to go along both with foreground and background colors (i.e. shell)
111 '((t (:underline t)))
112 "Face to use for additionally highlighting rule targets in Font-Lock mode."
113 :group 'faces
114 :group 'makefile)
115
116(defface makefile-shell-face
117 '((((class color) (background light)) (:background "seashell1"))
118 (((class color) (background dark)) (:background "seashell4"))
119 (t (:reverse-video t)))
120 "Face to use for additionally highlighting Shell commands in Font-Lock mode."
121 :group 'faces
122 :group 'makefile)
123
124(defface makefile-makepp-perl-face
125 '((((class color) (background light)) (:background "LightBlue1")) ; Camel Book
126 (((class color) (background dark)) (:background "DarkBlue"))
127 (t (:reverse-video t)))
128 "Face to use for additionally highlighting Perl code in Font-Lock mode."
129 :group 'faces
130 :group 'makefile)
131
109(defcustom makefile-browser-buffer-name "*Macros and Targets*" 132(defcustom makefile-browser-buffer-name "*Macros and Targets*"
110 "*Name of the macro- and target browser buffer." 133 "*Name of the macro- and target browser buffer."
111 :type 'string 134 :type 'string
@@ -234,17 +257,29 @@ not be enclosed in { } or ( )."
234;; Note that the first big subexpression is used by font lock. Note 257;; Note that the first big subexpression is used by font lock. Note
235;; that if you change this regexp you might have to fix the imenu 258;; that if you change this regexp you might have to fix the imenu
236;; index in makefile-imenu-generic-expression. 259;; index in makefile-imenu-generic-expression.
237(defconst makefile-dependency-regex 260(defvar makefile-dependency-regex
238 "^ *\\([^ \n\t#:=]+\\([ \t]+\\([^ \t\n#:=]+\\|\\$[({][^ \t\n#})]+[})]\\)\\)*\\)[ \t]*:\\([ \t]*$\\|\\([^=\n].*$\\)\\)" 261 ;; Allow for two nested levels $(v1:$(v2:$(v3:a=b)=c)=d)
262 "^ *\\(\\(?: *\\$\\(?:[({]\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[^({]\\|.[^\n$#})]+?[})]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\| *[^ \n$#:=]+\\)+?\\)[ \t]*\\(:\\)\\(?:[ \t]*$\\|[^=\n]\\(?:[^#\n]*?;[ \t]*\\(.+\\)\\)?\\)"
239 "Regex used to find dependency lines in a makefile.") 263 "Regex used to find dependency lines in a makefile.")
240 264
241;; Note that the first subexpression is used by font lock. Note 265(defvar makefile-dependency-skip "^:"
242;; that if you change this regexp you might have to fix the imenu 266 "Characters to skip to find a line that might be a dependency.")
243;; index in makefile-imenu-generic-expression. 267
268(defvar makefile-rule-action-regex
269 "^\t[ \t]*\\([-@]*\\)[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)"
270 "Regex used to highlight rule action lines in font lock mode.")
271
272;; Note that the first and second subexpression is used by font lock. Note
273;; that if you change this regexp you might have to fix the imenu index in
274;; makefile-imenu-generic-expression.
244(defconst makefile-macroassign-regex 275(defconst makefile-macroassign-regex
245 "^ *\\([^ \n\t][^:#= \t\n]*\\)[ \t]*[*:+]?[:?]?=" 276 "^ *\\([^ \n\t][^:#= \t\n]*\\)[ \t]*\\(?:!=[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)\\|[*:+]?[:?]?=[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)\\)"
246 "Regex used to find macro assignment lines in a makefile.") 277 "Regex used to find macro assignment lines in a makefile.")
247 278
279(defconst makefile-var-use-regex
280 "[^$]\\$[({]\\([-a-zA-Z0-9_.]+\\|[@%<?^+*][FD]?\\)"
281 "Regex used to find $(macro) uses in a makefile.")
282
248(defconst makefile-ignored-files-in-pickup-regex 283(defconst makefile-ignored-files-in-pickup-regex
249 "\\(^\\..*\\)\\|\\(.*~$\\)\\|\\(.*,v$\\)\\|\\(\\.[chy]\\)" 284 "\\(^\\..*\\)\\|\\(.*~$\\)\\|\\(.*,v$\\)\\|\\(\\.[chy]\\)"
250 "Regex for filenames that will NOT be included in the target list.") 285 "Regex for filenames that will NOT be included in the target list.")
@@ -254,50 +289,189 @@ not be enclosed in { } or ( )."
254(defvar makefile-space-face 'makefile-space-face 289(defvar makefile-space-face 'makefile-space-face
255 "Face to use for highlighting leading spaces in Font-Lock mode.") 290 "Face to use for highlighting leading spaces in Font-Lock mode.")
256 291
257(defconst makefile-font-lock-keywords 292;; These lists were inspired by the old solution. But they are silly, because
258 (list 293;; you can't differentiate what follows. They need to be split up.
294(defconst makefile-statements '("include")
295 "List of keywords understood by standard make.")
296
297(defconst makefile-automake-statements
298 `("if" "else" "endif" ,@makefile-statements)
299 "List of keywords understood by automake.")
300
301(defconst makefile-gmake-statements
302 `("-sinclude" "sinclude" "override" "vpath"
303 "ifdef" "ifndef" "ifeq" "ifneq" "-include" "define" "endef" "export"
304 "unexport"
305 ,@(cdr makefile-automake-statements))
306 "List of keywords understood by gmake.")
307
308;; These are even more silly, because you can have more spaces in between.
309(defconst makefile-makepp-statements
310 `("and ifdef" "and ifndef" "and ifeq" "and ifneq" "and ifperl"
311 "and ifmakeperl" "and ifsys" "and ifnsys" "build_cache" "build_check"
312 "else ifdef" "else ifndef" "else ifeq" "else ifneq" "else ifperl"
313 "else ifmakeperl" "else ifsys" "else ifnsys" "enddef" "load_makefile"
314 "ifperl" "ifmakeperl" "ifsys" "ifnsys" "_include" "makeperl" "makesub"
315 "no_implicit_load" "perl" "perl-begin" "perl_begin" "perl-end" "perl_end"
316 "prebuild" "or ifdef" "or ifndef" "or ifeq" "or ifneq" "or ifperl"
317 "or ifmakeperl" "or ifsys" "or ifnsys" "register_command_parser"
318 "register_scanner" "repository" "runtime" "signature" "sub"
319 ,@(nthcdr 4 makefile-gmake-statements))
320 "List of keywords understood by gmake.")
321
322(defconst makefile-bsdmake-statements
323 `(".elif" ".elifdef" ".elifmake" ".elifndef" ".elifnmake" ".else" ".endfor"
324 ".endif" ".for" ".if" ".ifdef" ".ifmake" ".ifndef" ".ifnmake" ".undef")
325 "List of keywords understood by BSD make.")
326
327(defun makefile-make-font-lock-keywords (var keywords space
328 &optional negation
329 &rest font-lock-keywords)
330 `(;; Do macro assignments. These get the "variable-name" face.
331 (,makefile-macroassign-regex
332 (1 font-lock-variable-name-face)
333 ;; This is for after !=
334 (2 'makefile-shell-face prepend t)
335 ;; This is for after normal assignment
336 (3 'font-lock-string-face prepend t))
337
338 ;; Rule actions.
339 (makefile-match-action
340 (1 font-lock-type-face)
341 (2 'makefile-shell-face prepend)
342 ;; Only makepp has builtin commands.
343 (3 font-lock-builtin-face prepend t))
344
345 ;; Variable references even in targets/strings/comments.
346 (,var 1 font-lock-variable-name-face prepend)
347
348 ;; Automatic variable references and single character variable references,
349 ;; but not shell variables references.
350 ("[^$]\\$\\([@%<?^+*_]\\|[a-zA-Z0-9]\\>\\)"
351 1 font-lock-constant-face prepend)
352 ("[^$]\\(\\$[@%*]\\)"
353 1 'makefile-targets-face prepend)
259 354
260 ;; Do macro assignments. These get the "variable-name" face rather 355 ;; Fontify conditionals and includes.
261 ;; arbitrarily. 356 (,(concat "^\\(?: [ \t]*\\)?"
262 (list makefile-macroassign-regex 1 'font-lock-variable-name-face) 357 (regexp-opt keywords t)
358 "\\>[ \t]*\\([^: \t\n#]*\\)")
359 (1 font-lock-keyword-face) (2 font-lock-variable-name-face))
263 360
264 ;; Do dependencies. These get the function name face. 361 ,@(if negation
265 (list makefile-dependency-regex 1 'font-lock-function-name-face) 362 `((,negation (1 font-lock-negation-char-face prepend)
363 (2 font-lock-negation-char-face prepend t))))
266 364
267 ;; Variable references even in targets/strings/comments. 365 ,@(if space
268 '("[^$]\\$[({]\\([-a-zA-Z0-9_.]+\\|[@%<?^+*][FD]?\\)[}):]" 366 '(;; Highlight lines that contain just whitespace.
269 1 font-lock-constant-face prepend) 367 ;; They can cause trouble, especially if they start with a tab.
368 ("^[ \t]+$" . makefile-space-face)
270 369
271 ;; Automatic variable references and single character variable references, 370 ;; Highlight shell comments that Make treats as commands,
272 ;; but not shell variables references. 371 ;; since these can fool people.
273 '("[^$]\\$\\([@%<?^+*_]\\|[a-zA-Z0-9]\\>\\)" 372 ("^\t+#" 0 makefile-space-face t)
274 1 font-lock-constant-face prepend)
275 373
276 ;; Fontify conditionals and includes. 374 ;; Highlight spaces that precede tabs.
277 ;; Note that plain `if' is an automake conditional, and not a bug. 375 ;; They can make a tab fail to be effective.
278 (list 376 ("^\\( +\\)\t" 1 makefile-space-face)))
279 (concat "^\\(?: [ \t]*\\)?"
280 (regexp-opt '("-include" "-sinclude" "include" "sinclude" "ifeq"
281 "if" "ifneq" "ifdef" "ifndef" "endif" "else"
282 "define" "endef" "override"
283 "export" "unexport" "vpath") t)
284 "\\>[ \t]*\\([^: \t\n#]*\\)")
285 '(1 font-lock-keyword-face) '(2 font-lock-variable-name-face))
286 377
287 '("^\\(?: [ \t]*\\)?if\\(n\\)\\(?:def\\|eq\\)\\>" 378 ,@font-lock-keywords
288 1 font-lock-negation-char-face prepend)
289 379
290 ;; Highlight lines that contain just whitespace. 380 ;; Do dependencies.
291 ;; They can cause trouble, especially if they start with a tab. 381 (makefile-match-dependency
292 '("^[ \t]+$" . makefile-space-face) 382 (1 'makefile-targets-face prepend)
383 (3 'makefile-shell-face prepend t))))
293 384
294 ;; Highlight shell comments that Make treats as commands, 385(defconst makefile-font-lock-keywords
295 ;; since these can fool people. 386 (makefile-make-font-lock-keywords
296 '("^\t+#" 0 makefile-space-face t) 387 makefile-var-use-regex
388 makefile-statements
389 t))
390
391(defconst makefile-automake-font-lock-keywords
392 (makefile-make-font-lock-keywords
393 makefile-var-use-regex
394 makefile-automake-statements
395 t))
396
397(defconst makefile-gmake-font-lock-keywords
398 (makefile-make-font-lock-keywords
399 makefile-var-use-regex
400 makefile-gmake-statements
401 t
402 "^\\(?: [ \t]*\\)?if\\(n\\)\\(?:def\\|eq\\)\\>"
403
404 '("[^$]\\(\\$[({][@%*][DF][})]\\)"
405 1 'makefile-targets-face prepend)
406
407 ;; $(function ...) ${function ...}
408 '("[^$]\\$[({]\\([-a-zA-Z0-9_.]+\\s \\)"
409 1 font-lock-function-name-face prepend)
410
411 ;; $(shell ...) ${shell ...}
412 '("[^$]\\$\\([({]\\)shell[ \t]+"
413 makefile-match-function-end nil nil
414 (1 'makefile-shell-face prepend t))))
415
416(defconst makefile-makepp-font-lock-keywords
417 (makefile-make-font-lock-keywords
418 makefile-var-use-regex
419 makefile-makepp-statements
420 nil
421 "^\\(?: [ \t]*\\)?\\(?:and[ \t]+\\|else[ \t]+\\|or[ \t]+\\)?if\\(n\\)\\(?:def\\|eq\\|sys\\)\\>"
422
423 '("[^$]\\(\\$[({]\\(?:target\\|output\\)s?\\_>.*?[})]\\)"
424 1 'makefile-targets-face prepend)
425
426 ;; Colon modifier keywords.
427 '("\\(:\\s *\\)\\(build_c\\(?:ache\\|heck\\)\\|env\\(?:ironment\\)?\\|foreach\\|signature\\|scanner\\|quickscan\\|smartscan\\)\\>\\([^:\n]*\\)"
428 (1 font-lock-type-face t)
429 (2 font-lock-keyword-face t)
430 (3 font-lock-variable-name-face t))
431
432 ;; $(function ...) $((function ...)) ${function ...} ${{function ...}}
433 '("[^$]\\$\\(?:((?\\|{{?\\)\\([-a-zA-Z0-9_.]+\\s \\)"
434 1 font-lock-function-name-face prepend)
435
436 ;; $(shell ...) $((shell ...)) ${shell ...} ${{shell ...}}
437 '("[^$]\\$\\(((?\\|{{?\\)shell\\(?:[-_]\\(?:global[-_]\\)?once\\)?[ \t]+"
438 makefile-match-function-end nil nil
439 (1 'makefile-shell-face prepend t))
440
441 ;; $(perl ...) $((perl ...)) ${perl ...} ${{perl ...}}
442 '("[^$]\\$\\(((?\\|{{?\\)makeperl[ \t]+"
443 makefile-match-function-end nil nil
444 (1 'makefile-makepp-perl-face prepend t))
445 '("[^$]\\$\\(((?\\|{{?\\)perl[ \t]+"
446 makefile-match-function-end nil nil
447 (1 'makefile-makepp-perl-face t t))
448
449 ;; Can we unify these with (if (match-end 1) 'prepend t)?
450 '("ifmakeperl\\s +\\(.*\\)" 1 'makefile-makepp-perl-face prepend)
451 '("ifperl\\s +\\(.*\\)" 1 'makefile-makepp-perl-face t)
452
453 ;; Perl block single- or multiline, as statement or rule action.
454 ;; Don't know why the initial newline in 2nd variant of group 2 doesn't get skipped.
455 '("\\<make\\(?:perl\\|sub\\s +\\S +\\)\\s *\n?\\s *{\\(?:{\\s *\n?\\(\\(?:.*\n\\)+?\\)\\s *}\\|\\s *\\(\\(?:.*?\\|\n?\\(?:.*\n\\)+?\\)\\)\\)}"
456 (1 'makefile-makepp-perl-face prepend t)
457 (2 'makefile-makepp-perl-face prepend t))
458 '("\\<\\(?:perl\\|sub\\s +\\S +\\)\\s *\n?\\s *{\\(?:{\\s *\n?\\(\\(?:.*\n\\)+?\\)\\s *}\\|\\s *\\(\\(?:.*?\\|\n?\\(?:.*\n\\)+?\\)\\)\\)}"
459 (1 'makefile-makepp-perl-face t t)
460 (2 'makefile-makepp-perl-face t t))
461
462 ;; Statement style perl block.
463 '("perl[-_]begin\\s *\\(?:\\s #.*\\)?\n\\(\\(?:.*\n\\)+?\\)\\s *perl[-_]end\\>"
464 1 'makefile-makepp-perl-face t)))
465
466(defconst makefile-bsdmake-font-lock-keywords
467 (makefile-make-font-lock-keywords
468 ;; A lot more could be done for variables here:
469 makefile-var-use-regex
470 makefile-bsdmake-statements
471 t
472 "^\\(?: [ \t]*\\)?\\.\\(?:el\\)?if\\(n?\\)\\(?:def\\|make\\)?\\>[ \t]*\\(!?\\)"
473 '("^[ \t]*\\.for[ \t].+[ \t]\\(in\\)\\>" 1 font-lock-keyword-face)))
297 474
298 ;; Highlight spaces that precede tabs.
299 ;; They can make a tab fail to be effective.
300 '("^\\( +\\)\t" 1 makefile-space-face)))
301 475
302(defconst makefile-font-lock-syntactic-keywords 476(defconst makefile-font-lock-syntactic-keywords
303 ;; From sh-script.el. 477 ;; From sh-script.el.
@@ -310,9 +484,8 @@ not be enclosed in { } or ( )."
310 ("\\\\\n" 0 "."))) 484 ("\\\\\n" 0 ".")))
311 485
312(defvar makefile-imenu-generic-expression 486(defvar makefile-imenu-generic-expression
313 (list 487 `(("Dependencies" ,makefile-dependency-regex 1)
314 (list "Dependencies" makefile-dependency-regex 1) 488 ("Macro Assignment" ,makefile-macroassign-regex 1))
315 (list "Macro Assignment" makefile-macroassign-regex 1))
316 "Imenu generic expression for Makefile mode. See `imenu-generic-expression'.") 489 "Imenu generic expression for Makefile mode. See `imenu-generic-expression'.")
317 490
318;;; ------------------------------------------------------------ 491;;; ------------------------------------------------------------
@@ -371,47 +544,50 @@ The function must satisfy this calling convention:
371 () 544 ()
372 (define-abbrev-table 'makefile-mode-abbrev-table ())) 545 (define-abbrev-table 'makefile-mode-abbrev-table ()))
373 546
374(defvar makefile-mode-map nil 547(defvar makefile-mode-map
548 (let ((map (make-sparse-keymap)))
549 ;; set up the keymap
550 (define-key map "\C-c:" 'makefile-insert-target-ref)
551 (if makefile-electric-keys
552 (progn
553 (define-key map "$" 'makefile-insert-macro-ref)
554 (define-key map ":" 'makefile-electric-colon)
555 (define-key map "=" 'makefile-electric-equal)
556 (define-key map "." 'makefile-electric-dot)))
557 (define-key map "\C-c\C-f" 'makefile-pickup-filenames-as-targets)
558 (define-key map "\C-c\C-b" 'makefile-switch-to-browser)
559 (define-key map "\C-c\C-c" 'comment-region)
560 (define-key map "\C-c\C-p" 'makefile-pickup-everything)
561 (define-key map "\C-c\C-u" 'makefile-create-up-to-date-overview)
562 (define-key map "\C-c\C-i" 'makefile-insert-gmake-function)
563 (define-key map "\C-c\C-\\" 'makefile-backslash-region)
564 (define-key map "\C-c\C-m\C-a" 'makefile-automake-mode)
565 (define-key map "\C-c\C-m\C-b" 'makefile-bsdmake-mode)
566 (define-key map "\C-c\C-m\C-g" 'makefile-gmake-mode)
567 (define-key map "\C-c\C-m\C-m" 'makefile-mode)
568 (define-key map "\C-c\C-m\C-p" 'makefile-makepp-mode)
569 (define-key map "\M-p" 'makefile-previous-dependency)
570 (define-key map "\M-n" 'makefile-next-dependency)
571 (define-key map "\e\t" 'makefile-complete)
572
573 ;; Make menus.
574 (define-key map [menu-bar makefile-mode]
575 (cons "Makefile" (make-sparse-keymap "Makefile")))
576
577 (define-key map [menu-bar makefile-mode browse]
578 '("Pop up Makefile Browser" . makefile-switch-to-browser))
579 (define-key map [menu-bar makefile-mode complete]
580 '("Complete Target or Macro" . makefile-complete))
581 (define-key map [menu-bar makefile-mode pickup]
582 '("Find Targets and Macros" . makefile-pickup-everything))
583
584 (define-key map [menu-bar makefile-mode prev]
585 '("Move to Previous Dependency" . makefile-previous-dependency))
586 (define-key map [menu-bar makefile-mode next]
587 '("Move to Next Dependency" . makefile-next-dependency))
588 map)
375 "The keymap that is used in Makefile mode.") 589 "The keymap that is used in Makefile mode.")
376 590
377(if makefile-mode-map
378 ()
379 (setq makefile-mode-map (make-sparse-keymap))
380 ;; set up the keymap
381 (define-key makefile-mode-map "\C-c:" 'makefile-insert-target-ref)
382 (if makefile-electric-keys
383 (progn
384 (define-key makefile-mode-map "$" 'makefile-insert-macro-ref)
385 (define-key makefile-mode-map ":" 'makefile-electric-colon)
386 (define-key makefile-mode-map "=" 'makefile-electric-equal)
387 (define-key makefile-mode-map "." 'makefile-electric-dot)))
388 (define-key makefile-mode-map "\C-c\C-f" 'makefile-pickup-filenames-as-targets)
389 (define-key makefile-mode-map "\C-c\C-b" 'makefile-switch-to-browser)
390 (define-key makefile-mode-map "\C-c\C-c" 'comment-region)
391 (define-key makefile-mode-map "\C-c\C-p" 'makefile-pickup-everything)
392 (define-key makefile-mode-map "\C-c\C-u" 'makefile-create-up-to-date-overview)
393 (define-key makefile-mode-map "\C-c\C-i" 'makefile-insert-gmake-function)
394 (define-key makefile-mode-map "\C-c\C-\\" 'makefile-backslash-region)
395 (define-key makefile-mode-map "\M-p" 'makefile-previous-dependency)
396 (define-key makefile-mode-map "\M-n" 'makefile-next-dependency)
397 (define-key makefile-mode-map "\e\t" 'makefile-complete)
398
399 ;; Make menus.
400 (define-key makefile-mode-map [menu-bar makefile-mode]
401 (cons "Makefile" (make-sparse-keymap "Makefile")))
402
403 (define-key makefile-mode-map [menu-bar makefile-mode browse]
404 '("Pop up Makefile Browser" . makefile-switch-to-browser))
405 (define-key makefile-mode-map [menu-bar makefile-mode complete]
406 '("Complete Target or Macro" . makefile-complete))
407 (define-key makefile-mode-map [menu-bar makefile-mode pickup]
408 '("Find Targets and Macros" . makefile-pickup-everything))
409
410 (define-key makefile-mode-map [menu-bar makefile-mode prev]
411 '("Move to Previous Dependency" . makefile-previous-dependency))
412 (define-key makefile-mode-map [menu-bar makefile-mode next]
413 '("Move to Next Dependency" . makefile-next-dependency)))
414
415(defvar makefile-browser-map nil 591(defvar makefile-browser-map nil
416 "The keymap that is used in the macro- and target browser.") 592 "The keymap that is used in the macro- and target browser.")
417(if makefile-browser-map 593(if makefile-browser-map
@@ -504,8 +680,19 @@ The function must satisfy this calling convention:
504 680
505;;;###autoload 681;;;###autoload
506(defun makefile-mode () 682(defun makefile-mode ()
507 "Major mode for editing Makefiles. 683 "Major mode for editing standard Makefiles.
508This function ends by invoking the function(s) `makefile-mode-hook'. 684
685If you are editing a file for a different make, try one of the
686variants `makefile-automake-mode', `makefile-gmake-mode',
687`makefile-makepp-mode' or `makefile-bsdmake-mode'. All but the
688last should be correctly chosen based on the file name, except if
689it is *.mk. This function ends by invoking the function(s)
690`makefile-mode-hook'.
691
692It is strongly recommended to use `font-lock-mode', because that
693provides additional parsing information. This is used for
694example to see that a rule action `echo foo: bar' is a not rule
695dependency, despite the colon.
509 696
510\\{makefile-mode-map} 697\\{makefile-mode-map}
511 698
@@ -601,7 +788,8 @@ Makefile mode can be configured by modifying the following variables:
601 nil nil 788 nil nil
602 ((?$ . ".")) 789 ((?$ . "."))
603 backward-paragraph 790 backward-paragraph
604 (font-lock-syntactic-keywords . makefile-font-lock-syntactic-keywords))) 791 (font-lock-syntactic-keywords . makefile-font-lock-syntactic-keywords)
792 (font-lock-support-mode))) ; JIT breaks on long series of continuation lines.
605 793
606 ;; Add-log. 794 ;; Add-log.
607 (make-local-variable 'add-log-current-defun-function) 795 (make-local-variable 'add-log-current-defun-function)
@@ -643,7 +831,45 @@ Makefile mode can be configured by modifying the following variables:
643 831
644 ;; Real TABs are important in makefiles 832 ;; Real TABs are important in makefiles
645 (setq indent-tabs-mode t) 833 (setq indent-tabs-mode t)
646 (run-hooks 'makefile-mode-hook)) 834 (run-mode-hooks 'makefile-mode-hook))
835
836;; These should do more than just differentiate font-lock.
837;;;###autoload
838(define-derived-mode makefile-automake-mode makefile-mode "Makefile.am"
839 "An adapted `makefile-mode' that knows about automake."
840 (setq font-lock-defaults
841 `(makefile-automake-font-lock-keywords ,@(cdr font-lock-defaults))))
842
843;;;###autoload
844(define-derived-mode makefile-gmake-mode makefile-mode "GNUmakefile"
845 "An adapted `makefile-mode' that knows about gmake."
846 (setq font-lock-defaults
847 `(makefile-gmake-font-lock-keywords ,@(cdr font-lock-defaults))))
848
849;;;###autoload
850(define-derived-mode makefile-makepp-mode makefile-mode "Makeppfile"
851 "An adapted `makefile-mode' that knows about makepp."
852 (set (make-local-variable 'makefile-rule-action-regex)
853 ;; Don't care about initial tab, but I don't know how to font-lock correctly without.
854 "^\t[ \t]*\\(\\(?:\\(?:noecho\\|ignore[-_]error\\|[-@]+\\)[ \t]*\\)*\\)\\(\\(&\\S +\\)?\\(?:.+\\\\\n\\)*.+\\)")
855
856 (setq font-lock-defaults
857 `(makefile-makepp-font-lock-keywords ,@(cdr font-lock-defaults))))
858
859;;;###autoload
860(define-derived-mode makefile-bsdmake-mode makefile-mode "BSDmakefile"
861 "An adapted `makefile-mode' that knows about BSD make."
862 (set (make-local-variable 'makefile-dependency-regex)
863 ;; Identical to default, except allows `!' instead of `:'.
864 "^ *\\(\\(?: *\\$\\(?:[({]\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[^({]\\|.[^\n$#})]+?[})]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\| *[^ \n$#:=]+\\)+?\\)[ \t]*\\([:!]\\)\\(?:[ \t]*$\\|[^=\n]\\(?:[^#\n]*?;[ \t]*\\(.+\\)\\)?\\)")
865 (set (make-local-variable 'makefile-dependency-skip) "^:!")
866 (set (make-local-variable 'makefile-rule-action-regex)
867 "^\t[ \t]*\\([-+@]*\\)[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)")
868 (setq font-lock-defaults
869 `(makefile-bsdmake-font-lock-keywords ,@(cdr font-lock-defaults))
870 imenu-generic-expression
871 `(("Dependencies" ,makefile-dependency-regex 1)
872 ,@(cdr imenu-generic-expression))))
647 873
648 874
649 875
@@ -654,18 +880,27 @@ Makefile mode can be configured by modifying the following variables:
654 (interactive) 880 (interactive)
655 (let ((here (point))) 881 (let ((here (point)))
656 (end-of-line) 882 (end-of-line)
657 (if (re-search-forward makefile-dependency-regex (point-max) t) 883 (if (makefile-match-dependency nil)
658 (progn (beginning-of-line) t) ; indicate success 884 (progn (beginning-of-line) t) ; indicate success
659 (goto-char here) nil))) 885 (goto-char here) nil)))
660 886
661(defun makefile-previous-dependency () 887(defun makefile-previous-dependency ()
662 "Move point to the beginning of the previous dependency line." 888 "Move point to the beginning of the previous dependency line."
663 (interactive) 889 (interactive)
664 (let ((here (point))) 890 (let ((pt (point)))
665 (beginning-of-line) 891 (beginning-of-line)
666 (if (re-search-backward makefile-dependency-regex (point-min) t) 892 ;; makefile-match-dependency done backwards:
667 (progn (beginning-of-line) t) ; indicate success 893 (catch 'found
668 (goto-char here) nil))) 894 (while (progn (skip-chars-backward makefile-dependency-skip)
895 (not (bobp)))
896 (or (prog1 (eq (char-after) ?=)
897 (backward-char))
898 (get-text-property (point) 'face)
899 (beginning-of-line)
900 (if (looking-at makefile-dependency-regex)
901 (throw 'found t))))
902 (goto-char pt)
903 nil)))
669 904
670 905
671 906
@@ -763,74 +998,56 @@ Anywhere else just self-inserts."
763(defun makefile-pickup-targets () 998(defun makefile-pickup-targets ()
764 "Notice names of all target definitions in Makefile." 999 "Notice names of all target definitions in Makefile."
765 (interactive) 1000 (interactive)
766 (if (not makefile-need-target-pickup) 1001 (when makefile-need-target-pickup
767 nil 1002 (setq makefile-need-target-pickup nil
768 (setq makefile-need-target-pickup nil) 1003 makefile-target-table nil
769 (setq makefile-target-table nil) 1004 makefile-has-prereqs nil)
770 (setq makefile-has-prereqs nil)
771 (save-excursion 1005 (save-excursion
772 (goto-char (point-min)) 1006 (goto-char (point-min))
773 (while (re-search-forward makefile-dependency-regex nil t) 1007 (while (makefile-match-dependency nil)
774 (makefile-add-this-line-targets))) 1008 (goto-char (match-beginning 1))
775 (message "Read targets OK."))) 1009 (while (let ((target-name
776 1010 (buffer-substring-no-properties (point)
777(defun makefile-add-this-line-targets () 1011 (progn
778 (save-excursion 1012 (skip-chars-forward "^ \t:#")
779 (beginning-of-line) 1013 (point))))
780 (let ((done-with-line nil)
781 (line-number (1+ (count-lines (point-min) (point)))))
782 (while (not done-with-line)
783 (skip-chars-forward " \t")
784 (if (not (setq done-with-line (or (eolp)
785 (char-equal (char-after (point)) ?:))))
786 (progn
787 (let* ((start-of-target-name (point))
788 (target-name
789 (progn
790 (skip-chars-forward "^ \t:#")
791 (buffer-substring start-of-target-name (point))))
792 (has-prereqs 1014 (has-prereqs
793 (not (looking-at ":[ \t]*$")))) 1015 (not (looking-at ":[ \t]*$"))))
794 (if (makefile-remember-target target-name has-prereqs) 1016 (if (makefile-remember-target target-name has-prereqs)
795 (message "Picked up target \"%s\" from line %d" 1017 (message "Picked up target \"%s\" from line %d"
796 target-name line-number))))))))) 1018 target-name (line-number-at-pos)))
1019 (skip-chars-forward " \t")
1020 (not (or (eolp) (eq (char-after) ?:)))))
1021 (forward-line)))
1022 (message "Read targets OK.")))
797 1023
798(defun makefile-pickup-macros () 1024(defun makefile-pickup-macros ()
799 "Notice names of all macro definitions in Makefile." 1025 "Notice names of all macro definitions in Makefile."
800 (interactive) 1026 (interactive)
801 (if (not makefile-need-macro-pickup) 1027 (when makefile-need-macro-pickup
802 nil 1028 (setq makefile-need-macro-pickup nil
803 (setq makefile-need-macro-pickup nil) 1029 makefile-macro-table nil)
804 (setq makefile-macro-table nil)
805 (save-excursion 1030 (save-excursion
806 (goto-char (point-min)) 1031 (goto-char (point-min))
807 (while (re-search-forward makefile-macroassign-regex nil t) 1032 (while (re-search-forward makefile-macroassign-regex nil t)
808 (makefile-add-this-line-macro) 1033 (goto-char (match-beginning 1))
809 (forward-line 1))) 1034 (let ((macro-name (buffer-substring-no-properties (point)
1035 (progn
1036 (skip-chars-forward "^ \t:#=*")
1037 (point)))))
1038 (if (makefile-remember-macro macro-name)
1039 (message "Picked up macro \"%s\" from line %d"
1040 macro-name (line-number-at-pos))))
1041 (forward-line)))
810 (message "Read macros OK."))) 1042 (message "Read macros OK.")))
811 1043
812(defun makefile-add-this-line-macro ()
813 (save-excursion
814 (beginning-of-line)
815 (skip-chars-forward " \t")
816 (unless (eolp)
817 (let* ((start-of-macro-name (point))
818 (line-number (1+ (count-lines (point-min) (point))))
819 (macro-name (progn
820 (skip-chars-forward "^ \t:#=*")
821 (buffer-substring start-of-macro-name (point)))))
822 (if (makefile-remember-macro macro-name)
823 (message "Picked up macro \"%s\" from line %d"
824 macro-name line-number))))))
825
826(defun makefile-pickup-everything (arg) 1044(defun makefile-pickup-everything (arg)
827 "Notice names of all macros and targets in Makefile. 1045 "Notice names of all macros and targets in Makefile.
828Prefix arg means force pickups to be redone." 1046Prefix arg means force pickups to be redone."
829 (interactive "P") 1047 (interactive "P")
830 (if arg 1048 (if arg
831 (progn 1049 (setq makefile-need-target-pickup t
832 (setq makefile-need-target-pickup t) 1050 makefile-need-macro-pickup t))
833 (setq makefile-need-macro-pickup t)))
834 (makefile-pickup-macros) 1051 (makefile-pickup-macros)
835 (makefile-pickup-targets) 1052 (makefile-pickup-targets)
836 (if makefile-pickup-everything-picks-up-filenames-p 1053 (if makefile-pickup-everything-picks-up-filenames-p
@@ -841,17 +1058,12 @@ Prefix arg means force pickups to be redone."
841Checks each filename against `makefile-ignored-files-in-pickup-regex' 1058Checks each filename against `makefile-ignored-files-in-pickup-regex'
842and adds all qualifying names to the list of known targets." 1059and adds all qualifying names to the list of known targets."
843 (interactive) 1060 (interactive)
844 (let* ((dir (file-name-directory (buffer-file-name))) 1061 (mapc (lambda (name)
845 (raw-filename-list (if dir 1062 (or (file-directory-p name)
846 (file-name-all-completions "" dir) 1063 (string-match makefile-ignored-files-in-pickup-regex name)
847 (file-name-all-completions "" "")))) 1064 (if (makefile-remember-target name)
848 (mapcar (lambda (name) 1065 (message "Picked up file \"%s\" as target" name))))
849 (if (and (not (file-directory-p name)) 1066 (file-name-all-completions "" (or (file-name-directory (buffer-file-name)) ""))))
850 (not (string-match makefile-ignored-files-in-pickup-regex
851 name)))
852 (if (makefile-remember-target name)
853 (message "Picked up file \"%s\" as target" name))))
854 raw-filename-list)))
855 1067
856 1068
857 1069
@@ -1453,6 +1665,41 @@ Then prompts for all required parameters."
1453;;; Utility functions 1665;;; Utility functions
1454;;; ------------------------------------------------------------ 1666;;; ------------------------------------------------------------
1455 1667
1668(defun makefile-match-function-end (end)
1669 "To be called as an anchored matcher by font-lock.
1670The anchor must have matched the opening parens in the first group."
1671 (let ((s (match-string-no-properties 1)))
1672 (setq s (cond ((string= s "(") "\\(.*?\\)[ \t]*)")
1673 ((string= s "{") "\\(.*?\\)[ \t]*}")
1674 ((string= s "((") "\\(.*?\\)[ \t]*))")
1675 ((string= s "{{") "\\(.*?\\)[ \t]*}}")))
1676 (if s (looking-at s))))
1677
1678(defun makefile-match-dependency (bound)
1679 "Search for `makefile-dependency-regex' up to BOUND.
1680Checks that the colon has not already been fontified, else we
1681matched in a rule action."
1682 (catch 'found
1683 (let ((pt (point)))
1684 (while (progn (skip-chars-forward makefile-dependency-skip bound)
1685 (not (eobp)))
1686 (forward-char)
1687 (or (eq (char-after) ?=)
1688 (get-text-property (1- (point)) 'face)
1689 (when (save-excursion
1690 (beginning-of-line)
1691 (looking-at makefile-dependency-regex))
1692 (end-of-line)
1693 (throw 'found (point)))))
1694 (goto-char pt))
1695 nil))
1696
1697(defun makefile-match-action (bound)
1698 (catch 'found
1699 (while (re-search-forward makefile-rule-action-regex bound t)
1700 (or (eq ?\\ (char-after (- (match-beginning 0) 2)))
1701 (throw 'found t)))))
1702
1456(defun makefile-do-macro-insertion (macro-name) 1703(defun makefile-do-macro-insertion (macro-name)
1457 "Insert a macro reference." 1704 "Insert a macro reference."
1458 (if (not (zerop (length macro-name))) 1705 (if (not (zerop (length macro-name)))
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index 0febea4450f..f2576ad94db 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -376,33 +376,41 @@ The expansion is entirely correct because it uses the C preprocessor."
376 376
377(defcustom perl-indent-level 4 377(defcustom perl-indent-level 4
378 "*Indentation of Perl statements with respect to containing block." 378 "*Indentation of Perl statements with respect to containing block."
379 :type 'integer) 379 :type 'integer
380 :group 'perl)
380(defcustom perl-continued-statement-offset 4 381(defcustom perl-continued-statement-offset 4
381 "*Extra indent for lines not starting new statements." 382 "*Extra indent for lines not starting new statements."
382 :type 'integer) 383 :type 'integer
384 :group 'perl)
383(defcustom perl-continued-brace-offset -4 385(defcustom perl-continued-brace-offset -4
384 "*Extra indent for substatements that start with open-braces. 386 "*Extra indent for substatements that start with open-braces.
385This is in addition to `perl-continued-statement-offset'." 387This is in addition to `perl-continued-statement-offset'."
386 :type 'integer) 388 :type 'integer
389 :group 'perl)
387(defcustom perl-brace-offset 0 390(defcustom perl-brace-offset 0
388 "*Extra indentation for braces, compared with other text in same context." 391 "*Extra indentation for braces, compared with other text in same context."
389 :type 'integer) 392 :type 'integer
393 :group 'perl)
390(defcustom perl-brace-imaginary-offset 0 394(defcustom perl-brace-imaginary-offset 0
391 "*Imagined indentation of an open brace that actually follows a statement." 395 "*Imagined indentation of an open brace that actually follows a statement."
392 :type 'integer) 396 :type 'integer
397 :group 'perl)
393(defcustom perl-label-offset -2 398(defcustom perl-label-offset -2
394 "*Offset of Perl label lines relative to usual indentation." 399 "*Offset of Perl label lines relative to usual indentation."
395 :type 'integer) 400 :type 'integer
401 :group 'perl)
396(defcustom perl-indent-continued-arguments nil 402(defcustom perl-indent-continued-arguments nil
397 "*If non-nil offset of argument lines relative to usual indentation. 403 "*If non-nil offset of argument lines relative to usual indentation.
398If nil, continued arguments are aligned with the first argument." 404If nil, continued arguments are aligned with the first argument."
399 :type '(choice integer (const nil))) 405 :type '(choice integer (const nil))
406 :group 'perl)
400 407
401(defcustom perl-tab-always-indent tab-always-indent 408(defcustom perl-tab-always-indent tab-always-indent
402 "Non-nil means TAB in Perl mode always indents the current line. 409 "Non-nil means TAB in Perl mode always indents the current line.
403Otherwise it inserts a tab character if you type it past the first 410Otherwise it inserts a tab character if you type it past the first
404nonwhite character on the line." 411nonwhite character on the line."
405 :type 'boolean) 412 :type 'boolean
413 :group 'perl)
406 414
407;; I changed the default to nil for consistency with general Emacs 415;; I changed the default to nil for consistency with general Emacs
408;; conventions -- rms. 416;; conventions -- rms.
@@ -411,11 +419,13 @@ nonwhite character on the line."
411For lines which don't need indenting, TAB either indents an 419For lines which don't need indenting, TAB either indents an
412existing comment, moves to end-of-line, or if at end-of-line already, 420existing comment, moves to end-of-line, or if at end-of-line already,
413create a new comment." 421create a new comment."
414 :type 'boolean) 422 :type 'boolean
423 :group 'perl)
415 424
416(defcustom perl-nochange ";?#\\|\f\\|\\s(\\|\\(\\w\\|\\s_\\)+:[^:]" 425(defcustom perl-nochange ";?#\\|\f\\|\\s(\\|\\(\\w\\|\\s_\\)+:[^:]"
417 "*Lines starting with this regular expression are not auto-indented." 426 "*Lines starting with this regular expression are not auto-indented."
418 :type 'regexp) 427 :type 'regexp
428 :group 'perl)
419 429
420;; Outline support 430;; Outline support
421 431
diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el
index 25bc337a7b2..73450dec61a 100644
--- a/lisp/progmodes/prolog.el
+++ b/lisp/progmodes/prolog.el
@@ -234,8 +234,8 @@ Entry to this mode calls the value of `prolog-mode-hook' with no arguments,
234if that value is non-nil. Likewise with the value of `comint-mode-hook'. 234if that value is non-nil. Likewise with the value of `comint-mode-hook'.
235`prolog-mode-hook' is called after `comint-mode-hook'. 235`prolog-mode-hook' is called after `comint-mode-hook'.
236 236
237You can send text to the inferior Prolog from other buffers 237You can send text to the inferior Prolog from other buffers using the commands
238using the commands `send-region', `send-string' and \\[prolog-consult-region]. 238`process-send-region', `process-send-string' and \\[prolog-consult-region].
239 239
240Commands: 240Commands:
241Tab indents for Prolog; with argument, shifts rest 241Tab indents for Prolog; with argument, shifts rest
@@ -265,12 +265,12 @@ If COMPILE (prefix arg) is not nil, use compile mode rather than consult mode."
265 (interactive "P\nr") 265 (interactive "P\nr")
266 (save-excursion 266 (save-excursion
267 (if compile 267 (if compile
268 (send-string "prolog" prolog-compile-string) 268 (process-send-string "prolog" prolog-compile-string)
269 (send-string "prolog" prolog-consult-string)) 269 (process-send-string "prolog" prolog-consult-string))
270 (send-region "prolog" beg end) 270 (process-send-region "prolog" beg end)
271 (send-string "prolog" "\n") ;May be unnecessary 271 (process-send-string "prolog" "\n") ;May be unnecessary
272 (if prolog-eof-string 272 (if prolog-eof-string
273 (send-string "prolog" prolog-eof-string) 273 (process-send-string "prolog" prolog-eof-string)
274 (process-send-eof "prolog")))) ;Send eof to prolog process. 274 (process-send-eof "prolog")))) ;Send eof to prolog process.
275 275
276(defun prolog-consult-region-and-go (compile beg end) 276(defun prolog-consult-region-and-go (compile beg end)
diff --git a/lisp/progmodes/ps-mode.el b/lisp/progmodes/ps-mode.el
index b3495c74491..2d8f1d80aae 100644
--- a/lisp/progmodes/ps-mode.el
+++ b/lisp/progmodes/ps-mode.el
@@ -1173,7 +1173,7 @@ Use line numbers if `ps-run-error-line-numbers' is not nil"
1173 (let (i) 1173 (let (i)
1174 (setq 1174 (setq
1175 i 1175 i
1176 (string-to-int 1176 (string-to-number
1177 (buffer-substring (match-beginning 0) (match-end 0)))) 1177 (buffer-substring (match-beginning 0) (match-end 0))))
1178 (goto-char p) 1178 (goto-char p)
1179 (pop-to-buffer ps-run-parent) 1179 (pop-to-buffer ps-run-parent)
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index f2389d8defa..0173c419b5d 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -1015,7 +1015,7 @@ Anything else means: whenever we have a \"good guess\" as to the value."
1015 :group 'sh-indentation) 1015 :group 'sh-indentation)
1016 1016
1017(defcustom sh-popup-occur-buffer nil 1017(defcustom sh-popup-occur-buffer nil
1018 "*Controls when `sh-learn-buffer-indent' pops the *indent* buffer. 1018 "*Controls when `sh-learn-buffer-indent' pops the `*indent*' buffer.
1019If t it is always shown. If nil, it is shown only when there 1019If t it is always shown. If nil, it is shown only when there
1020are conflicts." 1020are conflicts."
1021 :type '(choice 1021 :type '(choice
@@ -1044,7 +1044,7 @@ Can be set to a number, or to nil which means leave it as is."
1044 1044
1045(defcustom sh-basic-offset 4 1045(defcustom sh-basic-offset 4
1046 "*The default indentation increment. 1046 "*The default indentation increment.
1047This value is used for the + and - symbols in an indentation variable." 1047This value is used for the `+' and `-' symbols in an indentation variable."
1048 :type 'integer 1048 :type 'integer
1049 :group 'sh-indentation) 1049 :group 'sh-indentation)
1050 1050
@@ -1088,7 +1088,7 @@ a number means align to that column, e.g. 0 means fist column."
1088 :menu-tag "/ Indent left half sh-basic-offset"))) 1088 :menu-tag "/ Indent left half sh-basic-offset")))
1089 1089
1090(defcustom sh-indent-for-else 0 1090(defcustom sh-indent-for-else 0
1091 "*How much to indent an else relative to an if. Usually 0." 1091 "*How much to indent an `else' relative to its `if'. Usually 0."
1092 :type `(choice 1092 :type `(choice
1093 (integer :menu-tag "A number (positive=>indent right)" 1093 (integer :menu-tag "A number (positive=>indent right)"
1094 :tag "A number") 1094 :tag "A number")
@@ -1104,75 +1104,75 @@ a number means align to that column, e.g. 0 means fist column."
1104 sh-symbol-list)) 1104 sh-symbol-list))
1105 1105
1106(defcustom sh-indent-for-fi 0 1106(defcustom sh-indent-for-fi 0
1107 "*How much to indent a fi relative to an if. Usually 0." 1107 "*How much to indent a `fi' relative to its `if'. Usually 0."
1108 :type `(choice ,@ sh-number-or-symbol-list ) 1108 :type `(choice ,@ sh-number-or-symbol-list )
1109 :group 'sh-indentation) 1109 :group 'sh-indentation)
1110 1110
1111(defcustom sh-indent-for-done '0 1111(defcustom sh-indent-for-done 0
1112 "*How much to indent a done relative to its matching stmt. Usually 0." 1112 "*How much to indent a `done' relative to its matching stmt. Usually 0."
1113 :type `(choice ,@ sh-number-or-symbol-list ) 1113 :type `(choice ,@ sh-number-or-symbol-list )
1114 :group 'sh-indentation) 1114 :group 'sh-indentation)
1115 1115
1116(defcustom sh-indent-after-else '+ 1116(defcustom sh-indent-after-else '+
1117 "*How much to indent a statement after an else statement." 1117 "*How much to indent a statement after an `else' statement."
1118 :type `(choice ,@ sh-number-or-symbol-list ) 1118 :type `(choice ,@ sh-number-or-symbol-list )
1119 :group 'sh-indentation) 1119 :group 'sh-indentation)
1120 1120
1121(defcustom sh-indent-after-if '+ 1121(defcustom sh-indent-after-if '+
1122 "*How much to indent a statement after an if statement. 1122 "*How much to indent a statement after an `if' statement.
1123This includes lines after else and elif statements, too, but 1123This includes lines after `else' and `elif' statements, too, but
1124does not affect then else elif or fi statements themselves." 1124does not affect the `else', `elif' or `fi' statements themselves."
1125 :type `(choice ,@ sh-number-or-symbol-list ) 1125 :type `(choice ,@ sh-number-or-symbol-list )
1126 :group 'sh-indentation) 1126 :group 'sh-indentation)
1127 1127
1128(defcustom sh-indent-for-then 0 1128(defcustom sh-indent-for-then 0
1129 "*How much to indent a then relative to an if." 1129 "*How much to indent a `then' relative to its `if'."
1130 :type `(choice ,@ sh-number-or-symbol-list ) 1130 :type `(choice ,@ sh-number-or-symbol-list )
1131 :group 'sh-indentation) 1131 :group 'sh-indentation)
1132 1132
1133(defcustom sh-indent-for-do 0 1133(defcustom sh-indent-for-do 0
1134 "*How much to indent a do statement. 1134 "*How much to indent a `do' statement.
1135This is relative to the statement before the do, i.e. the 1135This is relative to the statement before the `do', typically a
1136while until or for statement." 1136`while', `until', `for', `repeat' or `select' statement."
1137 :type `(choice ,@ sh-number-or-symbol-list) 1137 :type `(choice ,@ sh-number-or-symbol-list)
1138 :group 'sh-indentation) 1138 :group 'sh-indentation)
1139 1139
1140(defcustom sh-indent-after-do '* 1140(defcustom sh-indent-after-do '+
1141 "*How much to indent a line after a do statement. 1141 "*How much to indent a line after a `do' statement.
1142This is used when the do is the first word of the line. 1142This is used when the `do' is the first word of the line.
1143This is relative to the statement before the do, e.g. a 1143This is relative to the statement before the `do', typically a
1144while for repeat or select statement." 1144`while', `until', `for', `repeat' or `select' statement."
1145 :type `(choice ,@ sh-number-or-symbol-list) 1145 :type `(choice ,@ sh-number-or-symbol-list)
1146 :group 'sh-indentation) 1146 :group 'sh-indentation)
1147 1147
1148(defcustom sh-indent-after-loop-construct '+ 1148(defcustom sh-indent-after-loop-construct '+
1149 "*How much to indent a statement after a loop construct. 1149 "*How much to indent a statement after a loop construct.
1150 1150
1151This variable is used when the keyword \"do\" is on the same line as the 1151This variable is used when the keyword `do' is on the same line as the
1152loop statement (e.g. \"until\", \"while\" or \"for\"). 1152loop statement (e.g., `until', `while' or `for').
1153If the do is on a line by itself, then `sh-indent-after-do' is used instead." 1153If the `do' is on a line by itself, then `sh-indent-after-do' is used instead."
1154 :type `(choice ,@ sh-number-or-symbol-list) 1154 :type `(choice ,@ sh-number-or-symbol-list)
1155 :group 'sh-indentation) 1155 :group 'sh-indentation)
1156 1156
1157 1157
1158(defcustom sh-indent-after-done 0 1158(defcustom sh-indent-after-done 0
1159 "*How much to indent a statement after a \"done\" keyword. 1159 "*How much to indent a statement after a `done' keyword.
1160Normally this is 0, which aligns the \"done\" to the matching 1160Normally this is 0, which aligns the `done' to the matching
1161looping construct line. 1161looping construct line.
1162Setting it non-zero allows you to have the \"do\" statement on a line 1162Setting it non-zero allows you to have the `do' statement on a line
1163by itself and align the done under to do." 1163by itself and align the done under to do."
1164 :type `(choice ,@ sh-number-or-symbol-list) 1164 :type `(choice ,@ sh-number-or-symbol-list)
1165 :group 'sh-indentation) 1165 :group 'sh-indentation)
1166 1166
1167(defcustom sh-indent-for-case-label '+ 1167(defcustom sh-indent-for-case-label '+
1168 "*How much to indent a case label statement. 1168 "*How much to indent a case label statement.
1169This is relative to the line containing the case statement." 1169This is relative to the line containing the `case' statement."
1170 :type `(choice ,@ sh-number-or-symbol-list) 1170 :type `(choice ,@ sh-number-or-symbol-list)
1171 :group 'sh-indentation) 1171 :group 'sh-indentation)
1172 1172
1173(defcustom sh-indent-for-case-alt '++ 1173(defcustom sh-indent-for-case-alt '++
1174 "*How much to indent statements after the case label. 1174 "*How much to indent statements after the case label.
1175This is relative to the line containing the case statement." 1175This is relative to the line containing the `case' statement."
1176 :type `(choice ,@ sh-number-or-symbol-list) 1176 :type `(choice ,@ sh-number-or-symbol-list)
1177 :group 'sh-indentation) 1177 :group 'sh-indentation)
1178 1178
@@ -1184,7 +1184,7 @@ This is relative to the line containing the case statement."
1184 1184
1185(defcustom sh-indent-after-open '+ 1185(defcustom sh-indent-after-open '+
1186 "*How much to indent after a line with an opening parenthesis or brace. 1186 "*How much to indent after a line with an opening parenthesis or brace.
1187For an open paren after a function `sh-indent-after-function' is used." 1187For an open paren after a function, `sh-indent-after-function' is used."
1188 :type `(choice ,@ sh-number-or-symbol-list) 1188 :type `(choice ,@ sh-number-or-symbol-list)
1189 :group 'sh-indentation) 1189 :group 'sh-indentation)
1190 1190
@@ -1196,13 +1196,13 @@ For an open paren after a function `sh-indent-after-function' is used."
1196;; These 2 are for the rc shell: 1196;; These 2 are for the rc shell:
1197 1197
1198(defcustom sh-indent-after-switch '+ 1198(defcustom sh-indent-after-switch '+
1199 "*How much to indent a case statement relative to the switch statement. 1199 "*How much to indent a `case' statement relative to the `switch' statement.
1200This is for the rc shell." 1200This is for the rc shell."
1201 :type `(choice ,@ sh-number-or-symbol-list) 1201 :type `(choice ,@ sh-number-or-symbol-list)
1202 :group 'sh-indentation) 1202 :group 'sh-indentation)
1203 1203
1204(defcustom sh-indent-after-case '+ 1204(defcustom sh-indent-after-case '+
1205 "*How much to indent a statement relative to the case statement. 1205 "*How much to indent a statement relative to the `case' statement.
1206This is for the rc shell." 1206This is for the rc shell."
1207 :type `(choice ,@ sh-number-or-symbol-list) 1207 :type `(choice ,@ sh-number-or-symbol-list)
1208 :group 'sh-indentation) 1208 :group 'sh-indentation)
diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el
index 95cfbb15196..a3447befa20 100644
--- a/lisp/progmodes/tcl.el
+++ b/lisp/progmodes/tcl.el
@@ -123,15 +123,18 @@
123 123
124(defcustom tcl-indent-level 4 124(defcustom tcl-indent-level 4
125 "*Indentation of Tcl statements with respect to containing block." 125 "*Indentation of Tcl statements with respect to containing block."
126 :type 'integer) 126 :type 'integer
127 :group 'tcl)
127 128
128(defcustom tcl-continued-indent-level 4 129(defcustom tcl-continued-indent-level 4
129 "*Indentation of continuation line relative to first line of command." 130 "*Indentation of continuation line relative to first line of command."
130 :type 'integer) 131 :type 'integer
132 :group 'tcl)
131 133
132(defcustom tcl-auto-newline nil 134(defcustom tcl-auto-newline nil
133 "*Non-nil means automatically newline before and after braces you insert." 135 "*Non-nil means automatically newline before and after braces you insert."
134 :type 'boolean) 136 :type 'boolean
137 :group 'tcl)
135 138
136(defcustom tcl-tab-always-indent tab-always-indent 139(defcustom tcl-tab-always-indent tab-always-indent
137 "*Control effect of TAB key. 140 "*Control effect of TAB key.
@@ -149,7 +152,8 @@ to take place:
149 6. Move backward to start of comment, indenting if necessary." 152 6. Move backward to start of comment, indenting if necessary."
150 :type '(choice (const :tag "Always" t) 153 :type '(choice (const :tag "Always" t)
151 (const :tag "Beginning only" nil) 154 (const :tag "Beginning only" nil)
152 (const :tag "Maybe move or make or delete comment" 'tcl))) 155 (const :tag "Maybe move or make or delete comment" 'tcl))
156 :group 'tcl)
153 157
154 158
155(defcustom tcl-electric-hash-style nil ;; 'smart 159(defcustom tcl-electric-hash-style nil ;; 'smart
@@ -160,23 +164,28 @@ meaning that the choice between `backslash' and `quote' should be
160made depending on the number of hashes inserted; or nil, meaning that 164made depending on the number of hashes inserted; or nil, meaning that
161no quoting should be done. Any other value for this variable is 165no quoting should be done. Any other value for this variable is
162taken to mean `smart'. The default is nil." 166taken to mean `smart'. The default is nil."
163 :type '(choice (const backslash) (const quote) (const smart) (const nil))) 167 :type '(choice (const backslash) (const quote) (const smart) (const nil))
168 :group 'tcl)
164 169
165(defcustom tcl-help-directory-list nil 170(defcustom tcl-help-directory-list nil
166 "*List of topmost directories containing TclX help files." 171 "*List of topmost directories containing TclX help files."
167 :type '(repeat directory)) 172 :type '(repeat directory)
173 :group 'tcl)
168 174
169(defcustom tcl-use-smart-word-finder t 175(defcustom tcl-use-smart-word-finder t
170 "*If not nil, use smart way to find current word, for Tcl help feature." 176 "*If not nil, use smart way to find current word, for Tcl help feature."
171 :type 'boolean) 177 :type 'boolean
178 :group 'tcl)
172 179
173(defcustom tcl-application "wish" 180(defcustom tcl-application "wish"
174 "*Name of Tcl program to run in inferior Tcl mode." 181 "*Name of Tcl program to run in inferior Tcl mode."
175 :type 'string) 182 :type 'string
183 :group 'tcl)
176 184
177(defcustom tcl-command-switches nil 185(defcustom tcl-command-switches nil
178 "*List of switches to supply to the `tcl-application' program." 186 "*List of switches to supply to the `tcl-application' program."
179 :type '(repeat string)) 187 :type '(repeat string)
188 :group 'tcl)
180 189
181(defcustom tcl-prompt-regexp "^\\(% \\|\\)" 190(defcustom tcl-prompt-regexp "^\\(% \\|\\)"
182 "*If not nil, a regexp that will match the prompt in the inferior process. 191 "*If not nil, a regexp that will match the prompt in the inferior process.
@@ -184,7 +193,8 @@ If nil, the prompt is the name of the application with \">\" appended.
184 193
185The default is \"^\\(% \\|\\)\", which will match the default primary 194The default is \"^\\(% \\|\\)\", which will match the default primary
186and secondary prompts for tclsh and wish." 195and secondary prompts for tclsh and wish."
187 :type 'regexp) 196 :type 'regexp
197 :group 'tcl)
188 198
189(defcustom inferior-tcl-source-command "source %s\n" 199(defcustom inferior-tcl-source-command "source %s\n"
190 "*Format-string for building a Tcl command to load a file. 200 "*Format-string for building a Tcl command to load a file.
@@ -192,7 +202,8 @@ This format string should use `%s' to substitute a file name
192and should result in a Tcl expression that will command the 202and should result in a Tcl expression that will command the
193inferior Tcl to load that file. The filename will be appropriately 203inferior Tcl to load that file. The filename will be appropriately
194quoted for Tcl." 204quoted for Tcl."
195 :type 'string) 205 :type 'string
206 :group 'tcl)
196 207
197(defface tcl-escaped-newline '((t :inherit font-lock-string-face)) 208(defface tcl-escaped-newline '((t :inherit font-lock-string-face))
198 "Face used for (non-escaped) backslash at end of a line in Tcl mode." 209 "Face used for (non-escaped) backslash at end of a line in Tcl mode."
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index 9f0e63e80a6..12f04895f98 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -5082,7 +5082,7 @@ Return a valid value only."
5082 ((string-equal "++" input) '++) 5082 ((string-equal "++" input) '++)
5083 ((string-equal "--" input) '--) 5083 ((string-equal "--" input) '--)
5084 ((string-match "^-?[0-9]+$" input) 5084 ((string-match "^-?[0-9]+$" input)
5085 (string-to-int input)) 5085 (string-to-number input))
5086 ((fboundp (setq interned (intern input))) 5086 ((fboundp (setq interned (intern input)))
5087 interned) 5087 interned)
5088 ((boundp interned) interned) 5088 ((boundp interned) interned)
@@ -13701,10 +13701,10 @@ entity ENT-KEY."
13701 (condition-case () 13701 (condition-case ()
13702 (progn (load-file file-dir-name) 13702 (progn (load-file file-dir-name)
13703 (string< (mapconcat 13703 (string< (mapconcat
13704 (lambda (a) (format "%3d" (string-to-int a))) 13704 (lambda (a) (format "%3d" (string-to-number a)))
13705 (split-string "3.31.14" "\\.") "") 13705 (split-string "3.31.14" "\\.") "")
13706 (mapconcat 13706 (mapconcat
13707 (lambda (a) (format "%3d" (string-to-int a))) 13707 (lambda (a) (format "%3d" (string-to-number a)))
13708 (split-string vhdl-cache-version "\\.") ""))) 13708 (split-string vhdl-cache-version "\\.") "")))
13709 (error (progn (vhdl-warning (format "ERROR: Corrupted cache file: \"%s\"" file-dir-name)) 13709 (error (progn (vhdl-warning (format "ERROR: Corrupted cache file: \"%s\"" file-dir-name))
13710 nil)))))) 13710 nil))))))
@@ -14075,7 +14075,7 @@ otherwise use cached data."
14075 (beginning-of-line) (looking-at "^\\([0-9]+\\):")) 14075 (beginning-of-line) (looking-at "^\\([0-9]+\\):"))
14076 (re-search-backward 14076 (re-search-backward
14077 (format "^[0-%d]:\\s-*[[{<]-" 14077 (format "^[0-%d]:\\s-*[[{<]-"
14078 (max (1- (string-to-int (match-string 1))) 0)) nil t))) 14078 (max (1- (string-to-number (match-string 1))) 0)) nil t)))
14079 (goto-char (match-end 0)) 14079 (goto-char (match-end 0))
14080 (speedbar-do-function-pointer) 14080 (speedbar-do-function-pointer)
14081 (speedbar-center-buffer-smartly))) 14081 (speedbar-center-buffer-smartly)))
diff --git a/lisp/replace.el b/lisp/replace.el
index 1cef7ecc52a..c9c70b59de5 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -1288,14 +1288,14 @@ passed in. If LITERAL is set, no checking is done, anyway."
1288 (while (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\(\\\\\\?\\)" 1288 (while (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\(\\\\\\?\\)"
1289 newtext) 1289 newtext)
1290 (setq newtext 1290 (setq newtext
1291 (read-input "Edit replacement string: " 1291 (read-string "Edit replacement string: "
1292 (prog1 1292 (prog1
1293 (cons 1293 (cons
1294 (replace-match "" t t newtext 3) 1294 (replace-match "" t t newtext 3)
1295 (1+ (match-beginning 3))) 1295 (1+ (match-beginning 3)))
1296 (setq match-data 1296 (setq match-data
1297 (replace-match-data 1297 (replace-match-data
1298 nil match-data match-data)))) 1298 nil match-data match-data))))
1299 noedit nil))) 1299 noedit nil)))
1300 (set-match-data match-data) 1300 (set-match-data match-data)
1301 (replace-match newtext fixedcase literal) 1301 (replace-match newtext fixedcase literal)
@@ -1571,8 +1571,8 @@ make, or the user didn't cancel the call."
1571 nil real-match-data 1571 nil real-match-data
1572 real-match-data) 1572 real-match-data)
1573 next-replacement 1573 next-replacement
1574 (read-input "Edit replacement string: " 1574 (read-string "Edit replacement string: "
1575 next-replacement) 1575 next-replacement)
1576 noedit nil) 1576 noedit nil)
1577 (if replaced 1577 (if replaced
1578 (set-match-data real-match-data) 1578 (set-match-data real-match-data)
diff --git a/lisp/reveal.el b/lisp/reveal.el
index 97411fc1669..c08f9b604cb 100644
--- a/lisp/reveal.el
+++ b/lisp/reveal.el
@@ -54,7 +54,8 @@
54 54
55(defcustom reveal-around-mark t 55(defcustom reveal-around-mark t
56 "Reveal text around the mark, if active." 56 "Reveal text around the mark, if active."
57 :type 'boolean) 57 :type 'boolean
58 :group 'reveal)
58 59
59(defvar reveal-open-spots nil) 60(defvar reveal-open-spots nil)
60(make-variable-buffer-local 'reveal-open-spots) 61(make-variable-buffer-local 'reveal-open-spots)
diff --git a/lisp/server.el b/lisp/server.el
index a0f41e59ff8..0a5fc942206 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -325,11 +325,11 @@ PROC is the server process. Format of STRING is \"PATH PATH PATH... \\n\"."
325 (setq request ""))))) 325 (setq request "")))))
326 ;; ARG is a line number option. 326 ;; ARG is a line number option.
327 ((string-match "\\`\\+[0-9]+\\'" arg) 327 ((string-match "\\`\\+[0-9]+\\'" arg)
328 (setq lineno (string-to-int (substring arg 1)))) 328 (setq lineno (string-to-number (substring arg 1))))
329 ;; ARG is line number:column option. 329 ;; ARG is line number:column option.
330 ((string-match "\\`+\\([0-9]+\\):\\([0-9]+\\)\\'" arg) 330 ((string-match "\\`+\\([0-9]+\\):\\([0-9]+\\)\\'" arg)
331 (setq lineno (string-to-int (match-string 1 arg)) 331 (setq lineno (string-to-number (match-string 1 arg))
332 columnno (string-to-int (match-string 2 arg)))) 332 columnno (string-to-number (match-string 2 arg))))
333 (t 333 (t
334 ;; Undo the quoting that emacsclient does 334 ;; Undo the quoting that emacsclient does
335 ;; for certain special characters. 335 ;; for certain special characters.
diff --git a/lisp/shadowfile.el b/lisp/shadowfile.el
index b3149500ae5..653c1e7f042 100644
--- a/lisp/shadowfile.el
+++ b/lisp/shadowfile.el
@@ -675,7 +675,7 @@ Returns t unless files were locked; then returns nil."
675 (message "Data recovered from %s." 675 (message "Data recovered from %s."
676 (car (insert-file-contents (make-auto-save-file-name)))) 676 (car (insert-file-contents (make-auto-save-file-name))))
677 (sit-for 1)) 677 (sit-for 1))
678 (eval-current-buffer)) 678 (eval-buffer))
679 (when shadow-todo-file 679 (when shadow-todo-file
680 (set-buffer (setq shadow-todo-buffer 680 (set-buffer (setq shadow-todo-buffer
681 (find-file-noselect shadow-todo-file))) 681 (find-file-noselect shadow-todo-file)))
@@ -686,7 +686,7 @@ Returns t unless files were locked; then returns nil."
686 (message "Data recovered from %s." 686 (message "Data recovered from %s."
687 (car (insert-file-contents (make-auto-save-file-name)))) 687 (car (insert-file-contents (make-auto-save-file-name))))
688 (sit-for 1)) 688 (sit-for 1))
689 (eval-current-buffer nil)) 689 (eval-buffer nil))
690 (shadow-invalidate-hashtable)) 690 (shadow-invalidate-hashtable))
691 t)) 691 t))
692 692
diff --git a/lisp/shell.el b/lisp/shell.el
index 354ed88f80f..fd5e6c25032 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -759,7 +759,7 @@ Environment variables are expanded, see function `substitute-in-file-name'."
759;; If STR is of the form +n, for n>0, return n. Otherwise, nil. 759;; If STR is of the form +n, for n>0, return n. Otherwise, nil.
760(defun shell-extract-num (str) 760(defun shell-extract-num (str)
761 (and (string-match "^\\+[1-9][0-9]*$" str) 761 (and (string-match "^\\+[1-9][0-9]*$" str)
762 (string-to-int str))) 762 (string-to-number str)))
763 763
764 764
765(defun shell-dirtrack-mode () 765(defun shell-dirtrack-mode ()
diff --git a/lisp/startup.el b/lisp/startup.el
index a6679f923d0..96213f2924e 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -1634,11 +1634,11 @@ normal otherwise."
1634 (kill-emacs t)) 1634 (kill-emacs t))
1635 1635
1636 ((string-match "^\\+[0-9]+\\'" argi) 1636 ((string-match "^\\+[0-9]+\\'" argi)
1637 (setq line (string-to-int argi))) 1637 (setq line (string-to-number argi)))
1638 1638
1639 ((string-match "^\\+\\([0-9]+\\):\\([0-9]+\\)\\'" argi) 1639 ((string-match "^\\+\\([0-9]+\\):\\([0-9]+\\)\\'" argi)
1640 (setq line (string-to-int (match-string 1 argi)) 1640 (setq line (string-to-number (match-string 1 argi))
1641 column (string-to-int (match-string 2 argi)))) 1641 column (string-to-number (match-string 2 argi))))
1642 1642
1643 ((setq tem (assoc argi command-line-x-option-alist)) 1643 ((setq tem (assoc argi command-line-x-option-alist))
1644 ;; Ignore X-windows options and their args if not using X. 1644 ;; Ignore X-windows options and their args if not using X.
diff --git a/lisp/subr.el b/lisp/subr.el
index 1c2c01e6b16..d91642c5cbe 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -603,8 +603,13 @@ in the current Emacs session, then this function may return nil."
603 (setq event (car event))) 603 (setq event (car event)))
604 (if (symbolp event) 604 (if (symbolp event)
605 (car (get event 'event-symbol-elements)) 605 (car (get event 'event-symbol-elements))
606 (let ((base (logand event (1- ?\A-\^@)))) 606 (let* ((base (logand event (1- ?\A-\^@)))
607 (downcase (if (< base 32) (logior base 64) base))))) 607 (uncontrolled (if (< base 32) (logior base 64) base)))
608 ;; There are some numbers that are invalid characters and
609 ;; cause `downcase' to get an error.
610 (condition-case ()
611 (downcase uncontrolled)
612 (error uncontrolled)))))
608 613
609(defsubst mouse-movement-p (object) 614(defsubst mouse-movement-p (object)
610 "Return non-nil if OBJECT is a mouse movement event." 615 "Return non-nil if OBJECT is a mouse movement event."
@@ -753,16 +758,14 @@ and `event-end' functions."
753 758
754;;;; Obsolescent names for functions. 759;;;; Obsolescent names for functions.
755 760
756(defalias 'window-dot 'window-point) 761(define-obsolete-function-alias 'window-dot 'window-point "22.1")
757(defalias 'set-window-dot 'set-window-point) 762(define-obsolete-function-alias 'set-window-dot 'set-window-point "22.1")
758(defalias 'read-input 'read-string) 763(define-obsolete-function-alias 'read-input 'read-string "22.1")
759(defalias 'send-string 'process-send-string) 764(define-obsolete-function-alias 'show-buffer 'set-window-buffer "22.1")
760(defalias 'send-region 'process-send-region) 765(define-obsolete-function-alias 'eval-current-buffer 'eval-buffer "22.1")
761(defalias 'show-buffer 'set-window-buffer) 766(define-obsolete-function-alias 'string-to-int 'string-to-number "22.1")
762(defalias 'eval-current-buffer 'eval-buffer)
763 767
764(make-obsolete 'char-bytes "now always returns 1." "20.4") 768(make-obsolete 'char-bytes "now always returns 1." "20.4")
765(make-obsolete 'baud-rate "use the `baud-rate' variable instead." "before 19.15")
766 769
767(defun insert-string (&rest args) 770(defun insert-string (&rest args)
768 "Mocklisp-compatibility insert function. 771 "Mocklisp-compatibility insert function.
@@ -771,6 +774,7 @@ is converted into a string by expressing it in decimal."
771 (dolist (el args) 774 (dolist (el args)
772 (insert (if (integerp el) (number-to-string el) el)))) 775 (insert (if (integerp el) (number-to-string el) el))))
773(make-obsolete 'insert-string 'insert "22.1") 776(make-obsolete 'insert-string 'insert "22.1")
777
774(defun makehash (&optional test) (make-hash-table :test (or test 'eql))) 778(defun makehash (&optional test) (make-hash-table :test (or test 'eql)))
775(make-obsolete 'makehash 'make-hash-table "22.1") 779(make-obsolete 'makehash 'make-hash-table "22.1")
776 780
@@ -778,6 +782,7 @@ is converted into a string by expressing it in decimal."
778(defun baud-rate () 782(defun baud-rate ()
779 "Return the value of the `baud-rate' variable." 783 "Return the value of the `baud-rate' variable."
780 baud-rate) 784 baud-rate)
785(make-obsolete 'baud-rate "use the `baud-rate' variable instead." "before 19.15")
781 786
782 787
783;;;; Obsolescence declarations for variables, and aliases. 788;;;; Obsolescence declarations for variables, and aliases.
@@ -787,10 +792,6 @@ is converted into a string by expressing it in decimal."
787(make-obsolete-variable 'unread-command-char 792(make-obsolete-variable 'unread-command-char
788 "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." 793 "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."
789 "before 19.15") 794 "before 19.15")
790(make-obsolete-variable 'post-command-idle-hook
791 "use timers instead, with `run-with-idle-timer'." "before 19.34")
792(make-obsolete-variable 'post-command-idle-delay
793 "use timers instead, with `run-with-idle-timer'." "before 19.34")
794 795
795;; Lisp manual only updated in 22.1. 796;; Lisp manual only updated in 22.1.
796(define-obsolete-variable-alias 'executing-macro 'executing-kbd-macro 797(define-obsolete-variable-alias 'executing-macro 'executing-kbd-macro
@@ -805,6 +806,8 @@ is converted into a string by expressing it in decimal."
805 806
806;;;; Alternate names for functions - these are not being phased out. 807;;;; Alternate names for functions - these are not being phased out.
807 808
809(defalias 'send-string 'process-send-string)
810(defalias 'send-region 'process-send-region)
808(defalias 'string= 'string-equal) 811(defalias 'string= 'string-equal)
809(defalias 'string< 'string-lessp) 812(defalias 'string< 'string-lessp)
810(defalias 'move-marker 'set-marker) 813(defalias 'move-marker 'set-marker)
@@ -822,9 +825,6 @@ is converted into a string by expressing it in decimal."
822(defalias 'point-at-eol 'line-end-position) 825(defalias 'point-at-eol 'line-end-position)
823(defalias 'point-at-bol 'line-beginning-position) 826(defalias 'point-at-bol 'line-beginning-position)
824 827
825;;; Should this be an obsolete name? If you decide it should, you get
826;;; to go through all the sources and change them.
827(define-obsolete-function-alias 'string-to-int 'string-to-number)
828 828
829;;;; Hook manipulation functions. 829;;;; Hook manipulation functions.
830 830
@@ -983,7 +983,8 @@ It can also be nil, if the definition is not associated with any file.
983 983
984If TYPE is nil, then any kind of definition is acceptable. 984If TYPE is nil, then any kind of definition is acceptable.
985If TYPE is `defun' or `defvar', that specifies function 985If TYPE is `defun' or `defvar', that specifies function
986definition only or variable definition only." 986definition only or variable definition only.
987`defface' specifies a face definition only."
987 (if (and (or (null type) (eq type 'defun)) 988 (if (and (or (null type) (eq type 'defun))
988 (symbolp symbol) (fboundp symbol) 989 (symbolp symbol) (fboundp symbol)
989 (eq 'autoload (car-safe (symbol-function symbol)))) 990 (eq 'autoload (car-safe (symbol-function symbol))))
@@ -1040,12 +1041,10 @@ This makes or adds to an entry on `after-load-alist'.
1040FILE should be the name of a library, with no directory name." 1041FILE should be the name of a library, with no directory name."
1041 (eval-after-load file (read))) 1042 (eval-after-load file (read)))
1042 1043
1043;;; make-network-process wrappers 1044;;; open-network-stream is a wrapper around make-network-process.
1044 1045
1045(if (featurep 'make-network-process) 1046(when (featurep 'make-network-process)
1046 (progn 1047 (defun open-network-stream (name buffer host service)
1047
1048(defun open-network-stream (name buffer host service)
1049 "Open a TCP connection for a service to a host. 1048 "Open a TCP connection for a service to a host.
1050Returns a subprocess-object to represent the connection. 1049Returns a subprocess-object to represent the connection.
1051Input and output work as for subprocesses; `delete-process' closes it. 1050Input and output work as for subprocesses; `delete-process' closes it.
@@ -1061,56 +1060,7 @@ HOST is name of the host to connect to, or its IP address.
1061SERVICE is name of the service desired, or an integer specifying 1060SERVICE is name of the service desired, or an integer specifying
1062 a port number to connect to." 1061 a port number to connect to."
1063 (make-network-process :name name :buffer buffer 1062 (make-network-process :name name :buffer buffer
1064 :host host :service service)) 1063 :host host :service service)))
1065
1066(defun open-network-stream-nowait (name buffer host service &optional sentinel filter)
1067 "Initiate connection to a TCP connection for a service to a host.
1068It returns nil if non-blocking connects are not supported; otherwise,
1069it returns a subprocess-object to represent the connection.
1070
1071This function is similar to `open-network-stream', except that it
1072returns before the connection is established. When the connection
1073is completed, the sentinel function will be called with second arg
1074matching `open' (if successful) or `failed' (on error).
1075
1076Args are NAME BUFFER HOST SERVICE SENTINEL FILTER.
1077NAME, BUFFER, HOST, and SERVICE are as for `open-network-stream'.
1078Optional args SENTINEL and FILTER specify the sentinel and filter
1079functions to be used for this network stream."
1080 (if (featurep 'make-network-process '(:nowait t))
1081 (make-network-process :name name :buffer buffer :nowait t
1082 :host host :service service
1083 :filter filter :sentinel sentinel)))
1084
1085(defun open-network-stream-server (name buffer service &optional sentinel filter)
1086 "Create a network server process for a TCP service.
1087It returns nil if server processes are not supported; otherwise,
1088it returns a subprocess-object to represent the server.
1089
1090When a client connects to the specified service, a new subprocess
1091is created to handle the new connection, and the sentinel function
1092is called for the new process.
1093
1094Args are NAME BUFFER SERVICE SENTINEL FILTER.
1095NAME is name for the server process. Client processes are named by
1096 appending the ip-address and port number of the client to NAME.
1097BUFFER is the buffer (or buffer name) to associate with the server
1098 process. Client processes will not get a buffer if a process filter
1099 is specified or BUFFER is nil; otherwise, a new buffer is created for
1100 the client process. The name is similar to the process name.
1101Third arg SERVICE is name of the service desired, or an integer
1102 specifying a port number to connect to. It may also be t to select
1103 an unused port number for the server.
1104Optional args SENTINEL and FILTER specify the sentinel and filter
1105 functions to be used for the client processes; the server process
1106 does not use these function."
1107 (if (featurep 'make-network-process '(:server t))
1108 (make-network-process :name name :buffer buffer
1109 :service service :server t :noquery t
1110 :sentinel sentinel :filter filter)))
1111
1112)) ;; (featurep 'make-network-process)
1113
1114 1064
1115;; compatibility 1065;; compatibility
1116 1066
@@ -2362,7 +2312,7 @@ macros."
2362 "Delete from ALIST all elements whose car is `eq' to KEY. 2312 "Delete from ALIST all elements whose car is `eq' to KEY.
2363Return the modified alist. 2313Return the modified alist.
2364Elements of ALIST that are not conses are ignored." 2314Elements of ALIST that are not conses are ignored."
2365 (while (and (consp (car alist)) 2315 (while (and (consp (car alist))
2366 (eq (car (car alist)) key)) 2316 (eq (car (car alist)) key))
2367 (setq alist (cdr alist))) 2317 (setq alist (cdr alist)))
2368 (let ((tail alist) tail-cdr) 2318 (let ((tail alist) tail-cdr)
@@ -2377,7 +2327,7 @@ Elements of ALIST that are not conses are ignored."
2377 "Delete from ALIST all elements whose cdr is `eq' to VALUE. 2327 "Delete from ALIST all elements whose cdr is `eq' to VALUE.
2378Return the modified alist. 2328Return the modified alist.
2379Elements of ALIST that are not conses are ignored." 2329Elements of ALIST that are not conses are ignored."
2380 (while (and (consp (car alist)) 2330 (while (and (consp (car alist))
2381 (eq (cdr (car alist)) value)) 2331 (eq (cdr (car alist)) value))
2382 (setq alist (cdr alist))) 2332 (setq alist (cdr alist)))
2383 (let ((tail alist) tail-cdr) 2333 (let ((tail alist) tail-cdr)
diff --git a/lisp/term.el b/lisp/term.el
index 1e04f7ac015..7f8347a986d 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -3337,7 +3337,7 @@ The top-most line is line 0."
3337 (second-colon 3337 (second-colon
3338 (string-match ":" string (1+ first-colon))) 3338 (string-match ":" string (1+ first-colon)))
3339 (filename (substring string 1 first-colon)) 3339 (filename (substring string 1 first-colon))
3340 (fileline (string-to-int 3340 (fileline (string-to-number
3341 (substring string (1+ first-colon) second-colon)))) 3341 (substring string (1+ first-colon) second-colon))))
3342 (setq term-pending-frame (cons filename fileline)))) 3342 (setq term-pending-frame (cons filename fileline))))
3343 ((= (aref string 0) ?/) 3343 ((= (aref string 0) ?/)
diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el
index 02a6564f6a1..f44fd616560 100644
--- a/lisp/term/mac-win.el
+++ b/lisp/term/mac-win.el
@@ -106,7 +106,7 @@
106 (let ((param (nth 3 aelt))) 106 (let ((param (nth 3 aelt)))
107 (setq default-frame-alist 107 (setq default-frame-alist
108 (cons (cons param 108 (cons (cons param
109 (string-to-int (car x-invocation-args))) 109 (string-to-number (car x-invocation-args)))
110 default-frame-alist) 110 default-frame-alist)
111 x-invocation-args 111 x-invocation-args
112 (cdr x-invocation-args)))))) 112 (cdr x-invocation-args))))))
@@ -1328,6 +1328,13 @@ in `selection-converter-alist', which see."
1328 coding 'utf-16))) 1328 coding 'utf-16)))
1329 (setq str (or s (encode-coding-string str 'utf-16-mac))))) 1329 (setq str (or s (encode-coding-string str 'utf-16-mac)))))
1330 ((eq type 'com.apple.traditional-mac-plain-text) 1330 ((eq type 'com.apple.traditional-mac-plain-text)
1331 (let ((encodables (find-coding-systems-string str))
1332 (rest mac-script-code-coding-systems))
1333 (unless (memq coding encodables)
1334 (while (and rest (not (memq (cdar rest) encodables)))
1335 (setq rest (cdr rest)))
1336 (if rest
1337 (setq coding (cdar rest)))))
1331 (setq coding (coding-system-change-eol-conversion coding 'mac)) 1338 (setq coding (coding-system-change-eol-conversion coding 'mac))
1332 (setq str (encode-coding-string str coding))) 1339 (setq str (encode-coding-string str coding)))
1333 (t 1340 (t
diff --git a/lisp/term/sun-mouse.el b/lisp/term/sun-mouse.el
index 8d9bfb67cf7..cee02919a66 100644
--- a/lisp/term/sun-mouse.el
+++ b/lisp/term/sun-mouse.el
@@ -615,7 +615,7 @@ CODE values: 13 = Tool-Position, 14 = Size-in-Pixels, 18 = Size-in-Chars."
615 (setq str (substring str (match-end 0))) 615 (setq str (substring str (match-end 0)))
616 (string-match ";[0-9]*" str) 616 (string-match ";[0-9]*" str)
617 (setq x (substring str (1+ (match-beginning 0)) (match-end 0))) 617 (setq x (substring str (1+ (match-beginning 0)) (match-end 0)))
618 (cons (string-to-int y) (string-to-int x)))) 618 (cons (string-to-number y) (string-to-number x))))
619 619
620(defun sm::font-size () 620(defun sm::font-size ()
621 "Returns font size in pixels: (cons Ysize Xsize)" 621 "Returns font size in pixels: (cons Ysize Xsize)"
diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el
index b4bd84cad03..3fcf281a9b9 100644
--- a/lisp/term/w32-win.el
+++ b/lisp/term/w32-win.el
@@ -146,7 +146,7 @@ the last file dropped is selected."
146 "Handle SWITCH of the form \"-switch n\"." 146 "Handle SWITCH of the form \"-switch n\"."
147 (let ((aelt (assoc switch command-line-x-option-alist))) 147 (let ((aelt (assoc switch command-line-x-option-alist)))
148 (if aelt 148 (if aelt
149 (push (cons (nth 3 aelt) (string-to-int (pop x-invocation-args))) 149 (push (cons (nth 3 aelt) (string-to-number (pop x-invocation-args)))
150 default-frame-alist)))) 150 default-frame-alist))))
151 151
152;; Handle options that apply to initial frame only 152;; Handle options that apply to initial frame only
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index 8641909da1c..4f440207c96 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -105,7 +105,7 @@
105 (let ((param (nth 3 aelt))) 105 (let ((param (nth 3 aelt)))
106 (setq default-frame-alist 106 (setq default-frame-alist
107 (cons (cons param 107 (cons (cons param
108 (string-to-int (car x-invocation-args))) 108 (string-to-number (car x-invocation-args)))
109 default-frame-alist) 109 default-frame-alist)
110 x-invocation-args 110 x-invocation-args
111 (cdr x-invocation-args)))))) 111 (cdr x-invocation-args))))))
diff --git a/lisp/terminal.el b/lisp/terminal.el
index d33ba914cd3..b84b1b6ed00 100644
--- a/lisp/terminal.el
+++ b/lisp/terminal.el
@@ -489,7 +489,7 @@ lets you type a terminal emulator command."
489 (progn 489 (progn
490 (and terminal-more-processing (null (cdr te-pending-output)) 490 (and terminal-more-processing (null (cdr te-pending-output))
491 (te-set-more-count nil)) 491 (te-set-more-count nil))
492 (send-string te-process (make-string 1 last-input-char)) 492 (process-send-string te-process (make-string 1 last-input-char))
493 (te-process-output t)) 493 (te-process-output t))
494 (message "Function key `%s' ignored" 494 (message "Function key `%s' ignored"
495 (single-key-description last-input-char)))))) 495 (single-key-description last-input-char))))))
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el
index c41145befc8..1615da60910 100644
--- a/lisp/textmodes/fill.el
+++ b/lisp/textmodes/fill.el
@@ -61,7 +61,8 @@ If the function returns nil, then `fill-paragraph' does its normal work.")
61Kinsoku processing is designed to prevent certain characters from being 61Kinsoku processing is designed to prevent certain characters from being
62placed at the beginning or end of a line by filling. 62placed at the beginning or end of a line by filling.
63See the documentation of `kinsoku' for more information." 63See the documentation of `kinsoku' for more information."
64 :type 'boolean) 64 :type 'boolean
65 :group 'fill)
65 66
66(defun set-fill-prefix () 67(defun set-fill-prefix ()
67 "Set the fill prefix to the current line up to point. 68 "Set the fill prefix to the current line up to point.
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index b171e6530fc..6aff0a731c7 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -2266,9 +2266,9 @@ Optional third arg SHIFT is an offset to apply based on previous corrections."
2266 (setq output (substring output (match-end 0))) ; skip over misspelling 2266 (setq output (substring output (match-end 0))) ; skip over misspelling
2267 (if (eq type ?#) 2267 (if (eq type ?#)
2268 (setq count 0) ; no misses for type # 2268 (setq count 0) ; no misses for type #
2269 (setq count (string-to-int output) ; get number of misses. 2269 (setq count (string-to-number output) ; get number of misses.
2270 output (substring output (1+ (string-match " " output 1))))) 2270 output (substring output (1+ (string-match " " output 1)))))
2271 (setq offset (string-to-int output)) 2271 (setq offset (string-to-number output))
2272 (if (eq type ?#) ; No miss or guess list. 2272 (if (eq type ?#) ; No miss or guess list.
2273 (setq output nil) 2273 (setq output nil)
2274 (setq output (substring output (1+ (string-match " " output 1))))) 2274 (setq output (substring output (1+ (string-match " " output 1)))))
diff --git a/lisp/textmodes/nroff-mode.el b/lisp/textmodes/nroff-mode.el
index c0638804ffa..9c5addb85fa 100644
--- a/lisp/textmodes/nroff-mode.el
+++ b/lisp/textmodes/nroff-mode.el
@@ -134,7 +134,7 @@ closing requests for requests that are used in matched pairs."
134 (save-excursion 134 (save-excursion
135 (looking-at outline-regexp) 135 (looking-at outline-regexp)
136 (skip-chars-forward ".H ") 136 (skip-chars-forward ".H ")
137 (string-to-int (buffer-substring (point) (+ 1 (point)))))) 137 (string-to-number (buffer-substring (point) (+ 1 (point))))))
138 138
139;;; Compute how much to indent a comment in nroff/troff source. 139;;; Compute how much to indent a comment in nroff/troff source.
140;;; By mit-erl!gildea April 86 140;;; By mit-erl!gildea April 86
diff --git a/lisp/textmodes/reftex-auc.el b/lisp/textmodes/reftex-auc.el
index 93cd0757b4e..821eb7feca2 100644
--- a/lisp/textmodes/reftex-auc.el
+++ b/lisp/textmodes/reftex-auc.el
@@ -1,8 +1,9 @@
1;;; reftex-auc.el --- RefTeX's interface to AUCTeX 1;;; reftex-auc.el --- RefTeX's interface to AUCTeX
2;; Copyright (c) 1997, 1998, 1999, 2000, 2003, 2004 Free Software Foundation, Inc. 2;; Copyright (c) 1997, 1998, 1999, 2000, 2003, 2004, 2005
3;; Free Software Foundation, Inc.
3 4
4;; Author: Carsten Dominik <dominik@science.uva.nl> 5;; Author: Carsten Dominik <dominik@science.uva.nl>
5;; Version: 4.26 6;; Version: 4.28
6 7
7;; This file is part of GNU Emacs. 8;; This file is part of GNU Emacs.
8 9
diff --git a/lisp/textmodes/reftex-cite.el b/lisp/textmodes/reftex-cite.el
index f12d01716fe..90ab8b7a3af 100644
--- a/lisp/textmodes/reftex-cite.el
+++ b/lisp/textmodes/reftex-cite.el
@@ -3,7 +3,7 @@
3;; Free Software Foundation, Inc. 3;; Free Software Foundation, Inc.
4 4
5;; Author: Carsten Dominik <dominik@science.uva.nl> 5;; Author: Carsten Dominik <dominik@science.uva.nl>
6;; Version: 4.26 6;; Version: 4.28
7 7
8;; This file is part of GNU Emacs. 8;; This file is part of GNU Emacs.
9 9
@@ -312,12 +312,12 @@
312 (not (stringp (car al1)))))) 312 (not (stringp (car al1))))))
313 313
314(defun reftex-bib-sort-year (e1 e2) 314(defun reftex-bib-sort-year (e1 e2)
315 (< (string-to-int (or (cdr (assoc "year" e1)) "0")) 315 (< (string-to-number (or (cdr (assoc "year" e1)) "0"))
316 (string-to-int (or (cdr (assoc "year" e2)) "0")))) 316 (string-to-number (or (cdr (assoc "year" e2)) "0"))))
317 317
318(defun reftex-bib-sort-year-reverse (e1 e2) 318(defun reftex-bib-sort-year-reverse (e1 e2)
319 (> (string-to-int (or (cdr (assoc "year" e1)) "0")) 319 (> (string-to-number (or (cdr (assoc "year" e1)) "0"))
320 (string-to-int (or (cdr (assoc "year" e2)) "0")))) 320 (string-to-number (or (cdr (assoc "year" e2)) "0"))))
321 321
322(defun reftex-get-crossref-alist (entry) 322(defun reftex-get-crossref-alist (entry)
323 ;; return the alist from a crossref entry 323 ;; return the alist from a crossref entry
@@ -681,7 +681,7 @@ While entering the regexp, completion on knows citation keys is possible.
681 ;; Should we cleanup empty optional arguments? 681 ;; Should we cleanup empty optional arguments?
682 ;; if the first is empty, it can be removed. If the second is empty, 682 ;; if the first is empty, it can be removed. If the second is empty,
683 ;; it has to go. If there is only a single arg and empty, it can go 683 ;; it has to go. If there is only a single arg and empty, it can go
684 ;; as well. 684 ;; as well.
685 (when reftex-cite-cleanup-optional-args 685 (when reftex-cite-cleanup-optional-args
686 (cond 686 (cond
687 ((string-match "\\([a-zA-Z0-9]\\)\\[\\]{" string) 687 ((string-match "\\([a-zA-Z0-9]\\)\\[\\]{" string)
@@ -988,7 +988,7 @@ While entering the regexp, completion on knows citation keys is possible.
988 (while (string-match 988 (while (string-match
989 "\\(\\`\\|[^%]\\)\\(\\(%\\([0-9]*\\)\\([a-zA-Z]\\)\\)[.,;: ]*\\)" 989 "\\(\\`\\|[^%]\\)\\(\\(%\\([0-9]*\\)\\([a-zA-Z]\\)\\)[.,;: ]*\\)"
990 format) 990 format)
991 (let ((n (string-to-int (match-string 4 format))) 991 (let ((n (string-to-number (match-string 4 format)))
992 (l (string-to-char (match-string 5 format))) 992 (l (string-to-char (match-string 5 format)))
993 rpl b e) 993 rpl b e)
994 (save-match-data 994 (save-match-data
diff --git a/lisp/textmodes/reftex-dcr.el b/lisp/textmodes/reftex-dcr.el
index e832465cf17..b73c62a9a0a 100644
--- a/lisp/textmodes/reftex-dcr.el
+++ b/lisp/textmodes/reftex-dcr.el
@@ -1,8 +1,9 @@
1;;; reftex-dcr.el --- viewing cross references and citations with RefTeX 1;;; reftex-dcr.el --- viewing cross references and citations with RefTeX
2;; Copyright (c) 1997, 1998, 1999, 2000, 2003, 2004 Free Software Foundation, Inc. 2;; Copyright (c) 1997, 1998, 1999, 2000, 2003, 2004, 2005
3;; Free Software Foundation, Inc.
3 4
4;; Author: Carsten Dominik <dominik@science.uva.nl> 5;; Author: Carsten Dominik <dominik@science.uva.nl>
5;; Version: 4.26 6;; Version: 4.28
6;; 7;;
7 8
8;; This file is part of GNU Emacs. 9;; This file is part of GNU Emacs.
diff --git a/lisp/textmodes/reftex-global.el b/lisp/textmodes/reftex-global.el
index d3ef2dcb788..76c03c13188 100644
--- a/lisp/textmodes/reftex-global.el
+++ b/lisp/textmodes/reftex-global.el
@@ -1,8 +1,9 @@
1;;; reftex-global.el --- operations on entire documents with RefTeX 1;;; reftex-global.el --- operations on entire documents with RefTeX
2;; Copyright (c) 1997, 1998, 1999, 2000, 2003, 2004 Free Software Foundation, Inc. 2;; Copyright (c) 1997, 1998, 1999, 2000, 2003, 2004, 2005
3;; Free Software Foundation, Inc.
3 4
4;; Author: Carsten Dominik <dominik@science.uva.nl> 5;; Author: Carsten Dominik <dominik@science.uva.nl>
5;; Version: 4.26 6;; Version: 4.28
6 7
7;; This file is part of GNU Emacs. 8;; This file is part of GNU Emacs.
8 9
@@ -416,10 +417,6 @@ Also checks if buffers visiting the files are in read-only mode."
416 (find-file (car flist)))))) 417 (find-file (car flist))))))
417 418
418;;;###autoload 419;;;###autoload
419(defvar reftex-isearch-minor-mode nil)
420(make-variable-buffer-local 'reftex-isearch-minor-mode)
421
422;;;###autoload
423(defun reftex-isearch-minor-mode (&optional arg) 420(defun reftex-isearch-minor-mode (&optional arg)
424 "When on, isearch searches the whole document, not only the current file. 421 "When on, isearch searches the whole document, not only the current file.
425This minor mode allows isearch to search through all the files of 422This minor mode allows isearch to search through all the files of
diff --git a/lisp/textmodes/reftex-index.el b/lisp/textmodes/reftex-index.el
index 8fada9c4930..ff2ea70a011 100644
--- a/lisp/textmodes/reftex-index.el
+++ b/lisp/textmodes/reftex-index.el
@@ -3,7 +3,7 @@
3;; Free Software Foundation, Inc. 3;; Free Software Foundation, Inc.
4 4
5;; Author: Carsten Dominik <dominik@science.uva.nl> 5;; Author: Carsten Dominik <dominik@science.uva.nl>
6;; Version: 4.26 6;; Version: 4.28
7 7
8;; This file is part of GNU Emacs. 8;; This file is part of GNU Emacs.
9 9
diff --git a/lisp/textmodes/reftex-parse.el b/lisp/textmodes/reftex-parse.el
index ce1e3d77d72..0046c1b34b8 100644
--- a/lisp/textmodes/reftex-parse.el
+++ b/lisp/textmodes/reftex-parse.el
@@ -3,7 +3,7 @@
3;; Free Software Foundation, Inc. 3;; Free Software Foundation, Inc.
4 4
5;; Author: Carsten Dominik <dominik@science.uva.nl> 5;; Author: Carsten Dominik <dominik@science.uva.nl>
6;; Version: 4.26 6;; Version: 4.28
7;; 7;;
8 8
9;; This file is part of GNU Emacs. 9;; This file is part of GNU Emacs.
@@ -999,7 +999,7 @@ of master file."
999 (if (string-match "\\`[A-Z]\\'" number-string) 999 (if (string-match "\\`[A-Z]\\'" number-string)
1000 (aset reftex-section-numbers i 1000 (aset reftex-section-numbers i
1001 (- (string-to-char number-string) ?A -1)) 1001 (- (string-to-char number-string) ?A -1))
1002 (aset reftex-section-numbers i (string-to-int number-string))) 1002 (aset reftex-section-numbers i (string-to-number number-string)))
1003 (pop numbers)) 1003 (pop numbers))
1004 (decf i))) 1004 (decf i)))
1005 (put 'reftex-section-numbers 'appendix appendix)) 1005 (put 'reftex-section-numbers 'appendix appendix))
@@ -1045,7 +1045,7 @@ of master file."
1045 (setq string 1045 (setq string
1046 (concat 1046 (concat
1047 (char-to-string 1047 (char-to-string
1048 (1- (+ ?A (string-to-int (match-string 0 string))))) 1048 (1- (+ ?A (string-to-number (match-string 0 string)))))
1049 (substring string (match-end 0)))))) 1049 (substring string (match-end 0))))))
1050 (if star 1050 (if star
1051 (concat (make-string (1- (length string)) ?\ ) "*") 1051 (concat (make-string (1- (length string)) ?\ ) "*")
diff --git a/lisp/textmodes/reftex-ref.el b/lisp/textmodes/reftex-ref.el
index 6afbb77767c..be6f95d6ebc 100644
--- a/lisp/textmodes/reftex-ref.el
+++ b/lisp/textmodes/reftex-ref.el
@@ -3,7 +3,7 @@
3;; Free Software Foundation, Inc. 3;; Free Software Foundation, Inc.
4 4
5;; Author: Carsten Dominik <dominik@science.uva.nl> 5;; Author: Carsten Dominik <dominik@science.uva.nl>
6;; Version: 4.26 6;; Version: 4.28
7 7
8;; This file is part of GNU Emacs. 8;; This file is part of GNU Emacs.
9 9
@@ -29,6 +29,7 @@
29(eval-when-compile (require 'cl)) 29(eval-when-compile (require 'cl))
30(provide 'reftex-ref) 30(provide 'reftex-ref)
31(require 'reftex) 31(require 'reftex)
32(require 'reftex-parse)
32;;; 33;;;
33 34
34(defun reftex-label-location (&optional bound) 35(defun reftex-label-location (&optional bound)
@@ -200,13 +201,13 @@ This function is controlled by the settings of reftex-insert-label-flags."
200 force-prompt) 201 force-prompt)
201 202
202 (while (not valid) 203 (while (not valid)
203 ;; iterate until we get a legal label 204 ;; iterate until we get a valid label
204 205
205 (setq label (read-string 206 (setq label (read-string
206 (if naked "Naked Label: " "Label: ") 207 (if naked "Naked Label: " "Label: ")
207 default)) 208 default))
208 209
209 ;; Lets make sure that this is a legal label 210 ;; Lets make sure that this is a valid label
210 (cond 211 (cond
211 212
212 ((string-match (concat "\\`\\(" (regexp-quote prefix) 213 ((string-match (concat "\\`\\(" (regexp-quote prefix)
diff --git a/lisp/textmodes/reftex-sel.el b/lisp/textmodes/reftex-sel.el
index 8b0ebb2ca2b..eb8c3035c90 100644
--- a/lisp/textmodes/reftex-sel.el
+++ b/lisp/textmodes/reftex-sel.el
@@ -1,8 +1,9 @@
1;;; reftex-sel.el --- the selection modes for RefTeX 1;;; reftex-sel.el --- the selection modes for RefTeX
2;; Copyright (c) 1997, 1998, 1999, 2000, 2003, 2004 Free Software Foundation, Inc. 2;; Copyright (c) 1997, 1998, 1999, 2000, 2003, 2004, 2005
3;; Free Software Foundation, Inc.
3 4
4;; Author: Carsten Dominik <dominik@science.uva.nl> 5;; Author: Carsten Dominik <dominik@science.uva.nl>
5;; Version: 4.26 6;; Version: 4.28
6 7
7;; This file is part of GNU Emacs. 8;; This file is part of GNU Emacs.
8 9
@@ -418,7 +419,7 @@ During a selection process, these are the local bindings.
418 (remove-hook 'post-command-hook 419 (remove-hook 'post-command-hook
419 'reftex-select-post-command-hook t)) 420 'reftex-select-post-command-hook t))
420 ;; Kill the mark overlays 421 ;; Kill the mark overlays
421 (mapcar (lambda (c) (delete-overlay (nth 1 c))) 422 (mapcar (lambda (c) (reftex-delete-overlay (nth 1 c)))
422 reftex-select-marked))))) 423 reftex-select-marked)))))
423 424
424 (set (make-local-variable 'reftex-last-line) 425 (set (make-local-variable 'reftex-last-line)
@@ -604,14 +605,14 @@ Useful for large TOC's."
604 (setq boe (or (previous-single-property-change (1+ (point)) :data) 605 (setq boe (or (previous-single-property-change (1+ (point)) :data)
605 (point-min)) 606 (point-min))
606 eoe (or (next-single-property-change (point) :data) (point-max))) 607 eoe (or (next-single-property-change (point) :data) (point-max)))
607 (setq ovl (make-overlay boe eoe)) 608 (setq ovl (reftex-make-overlay boe eoe))
608 (push (list data ovl separator) reftex-select-marked) 609 (push (list data ovl separator) reftex-select-marked)
609 (overlay-put ovl 'face reftex-select-mark-face) 610 (reftex-overlay-put ovl 'face reftex-select-mark-face)
610 (overlay-put ovl 'before-string 611 (reftex-overlay-put ovl 'before-string
611 (if separator 612 (if separator
612 (format "*%c%d* " separator 613 (format "*%c%d* " separator
613 (length reftex-select-marked)) 614 (length reftex-select-marked))
614 (format "*%d* " (length reftex-select-marked)))) 615 (format "*%d* " (length reftex-select-marked))))
615 (message "Entry has mark no. %d" (length reftex-select-marked)))) 616 (message "Entry has mark no. %d" (length reftex-select-marked))))
616 617
617(defun reftex-select-mark-comma () 618(defun reftex-select-mark-comma ()
@@ -637,19 +638,16 @@ Useful for large TOC's."
637 sep) 638 sep)
638 (unless cell 639 (unless cell
639 (error "No marked entry at point")) 640 (error "No marked entry at point"))
640 (and ovl (delete-overlay ovl)) 641 (and ovl (reftex-delete-overlay ovl))
641 (setq reftex-select-marked (delq cell reftex-select-marked)) 642 (setq reftex-select-marked (delq cell reftex-select-marked))
642 (if (featurep 'xemacs) 643 (setq cnt (1+ (length reftex-select-marked)))
643 ;; before-string property is broken in Emacs 644 (mapcar (lambda (c)
644 (progn 645 (setq sep (nth 2 c))
645 (setq cnt (1+ (length reftex-select-marked))) 646 (reftex-overlay-put (nth 1 c) 'before-string
646 (mapcar (lambda (c) 647 (if sep
647 (setq sep (nth 2 c)) 648 (format "*%c%d* " sep (decf cnt))
648 (overlay-put (nth 1 c) 'before-string 649 (format "*%d* " (decf cnt)))))
649 (if sep 650 reftex-select-marked)
650 (format "*%c%d* " sep (decf cnt))
651 (format "*%d* " (decf cnt)))))
652 reftex-select-marked)))
653 (message "Entry no longer marked"))) 651 (message "Entry no longer marked")))
654 652
655(defun reftex-select-help () 653(defun reftex-select-help ()
diff --git a/lisp/textmodes/reftex-toc.el b/lisp/textmodes/reftex-toc.el
index ed9746f8a69..8ad811391c7 100644
--- a/lisp/textmodes/reftex-toc.el
+++ b/lisp/textmodes/reftex-toc.el
@@ -1,8 +1,9 @@
1;;; reftex-toc.el --- RefTeX's table of contents mode 1;;; reftex-toc.el --- RefTeX's table of contents mode
2;; Copyright (c) 1997, 1998, 1999, 2000, 2003, 2004 Free Software Foundation, Inc. 2;; Copyright (c) 1997, 1998, 1999, 2000, 2003, 2004, 2005
3;; Free Software Foundation, Inc.
3 4
4;; Author: Carsten Dominik <dominik@science.uva.nl> 5;; Author: Carsten Dominik <dominik@science.uva.nl>
5;; Version: 4.26 6;; Version: 4.28
6 7
7;; This file is part of GNU Emacs. 8;; This file is part of GNU Emacs.
8 9
diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el
index b2ca7bed250..b9748b31df2 100644
--- a/lisp/textmodes/reftex-vars.el
+++ b/lisp/textmodes/reftex-vars.el
@@ -3,7 +3,7 @@
3;; Free Software Foundation, Inc. 3;; Free Software Foundation, Inc.
4 4
5;; Author: Carsten Dominik <dominik@science.uva.nl> 5;; Author: Carsten Dominik <dominik@science.uva.nl>
6;; Version: 4.26 6;; Version: 4.28
7 7
8;; This file is part of GNU Emacs. 8;; This file is part of GNU Emacs.
9 9
@@ -155,6 +155,21 @@ distribution. Mixed-case symbols are convenience aliases.")
155 (?f . "\\fullcite{%l}") 155 (?f . "\\fullcite{%l}")
156 (?F . "\\fullocite{%l}") 156 (?F . "\\fullocite{%l}")
157 (?n . "\\nocite{%l}"))) 157 (?n . "\\nocite{%l}")))
158 (jurabib "The Jurabib package"
159 ((?\C-m . "\\cite{%l}")
160 (?c . "\\cite[][]{%l}")
161 (?t . "\\citet{%l}")
162 (?p . "\\citep{%l}")
163 (?e . "\\citep[e.g.][]{%l}")
164 (?s . "\\citep[see][]{%l}")
165 (?u . "\\fullcite{%l}")
166 (?i . "\\citetitle{%l}")
167 (?a . "\\citeauthor{%l}")
168 (?e . "\\citefield{}{%l}")
169 (?y . "\\citeyear{%l}")
170 (?f . "\\footcite{%l}")
171 (?F . "\\footcite[][]{%l}")
172 (?l . "\\footfullcite{%l}")))
158 (bibentry "The Bibentry package" 173 (bibentry "The Bibentry package"
159 "\\bibentry{%l}") 174 "\\bibentry{%l}")
160 (harvard "The Harvard package" 175 (harvard "The Harvard package"
@@ -639,7 +654,7 @@ or macro."
639 "Non-nil means, trust the label prefix when determining label type. 654 "Non-nil means, trust the label prefix when determining label type.
640It is customary to use special label prefixes to distinguish different label 655It is customary to use special label prefixes to distinguish different label
641types. The label prefixes have no syntactic meaning in LaTeX (unless 656types. The label prefixes have no syntactic meaning in LaTeX (unless
642special packages like fancyref) are being used. RefTeX can and by 657special packages like fancyref are being used). RefTeX can and by
643default does parse around each label to detect the correct label type, 658default does parse around each label to detect the correct label type,
644but this process can be slow when a document contains thousands of 659but this process can be slow when a document contains thousands of
645labels. If you use label prefixes consistently, you may speed up 660labels. If you use label prefixes consistently, you may speed up
@@ -1373,7 +1388,9 @@ Inserting indexing commands in a line makes the line longer - often
1373so long that it does not fit onto the screen. When this variable is 1388so long that it does not fit onto the screen. When this variable is
1374non-nil, newlines will be added as necessary before and/or after the 1389non-nil, newlines will be added as necessary before and/or after the
1375indexing command to keep lines short. However, the matched text 1390indexing command to keep lines short. However, the matched text
1376phrase and its index command will always end up on a single line.") 1391phrase and its index command will always end up on a single line."
1392 :group 'reftex-index-support
1393 :type 'boolean)
1377 1394
1378(defcustom reftex-index-phrases-sort-prefers-entry nil 1395(defcustom reftex-index-phrases-sort-prefers-entry nil
1379 "*Non-nil means when sorting phrase lines, the explicit index entry is used. 1396 "*Non-nil means when sorting phrase lines, the explicit index entry is used.
@@ -1529,7 +1546,7 @@ TYPE: File type like \"bib\" or \"tex\".
1529DEF-EXT: The default extension for that file type, like \".tex\" or \".bib\". 1546DEF-EXT: The default extension for that file type, like \".tex\" or \".bib\".
1530OTHER-EXT: Any number of other valid extensions for this file type. 1547OTHER-EXT: Any number of other valid extensions for this file type.
1531 1548
1532When a files is searched and it does not have any of the valid extensions, 1549When a files is searched and it does not have any of the legal extensions,
1533we try the default extension first, and then the naked file name. 1550we try the default extension first, and then the naked file name.
1534 1551
1535If you are using AUCTeX, you also need to add new extensions to 1552If you are using AUCTeX, you also need to add new extensions to
diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el
index 865217dab08..f8b4cba65ae 100644
--- a/lisp/textmodes/reftex.el
+++ b/lisp/textmodes/reftex.el
@@ -3,7 +3,7 @@
3;; Free Software Foundation, Inc. 3;; Free Software Foundation, Inc.
4 4
5;; Author: Carsten Dominik <dominik@science.uva.nl> 5;; Author: Carsten Dominik <dominik@science.uva.nl>
6;; Version: 4.26 6;; Version: 4.28
7;; Keywords: tex 7;; Keywords: tex
8 8
9;; This file is part of GNU Emacs. 9;; This file is part of GNU Emacs.
@@ -301,7 +301,7 @@
301;;; Define the formal stuff for a minor mode named RefTeX. 301;;; Define the formal stuff for a minor mode named RefTeX.
302;;; 302;;;
303 303
304(defconst reftex-version "RefTeX version 4.26" 304(defconst reftex-version "RefTeX version 4.28"
305 "Version string for RefTeX.") 305 "Version string for RefTeX.")
306 306
307(defvar reftex-mode nil 307(defvar reftex-mode nil
@@ -1501,7 +1501,7 @@ When DIE is non-nil, throw an error if file not found."
1501 (when (null (get pathvar 'status)) 1501 (when (null (get pathvar 'status))
1502 ;; Get basic path 1502 ;; Get basic path
1503 (set pathvar 1503 (set pathvar
1504 (reftex-uniq 1504 (reftex-uniquify
1505 (reftex-parse-colon-path 1505 (reftex-parse-colon-path
1506 (mapconcat 1506 (mapconcat
1507 (lambda(x) 1507 (lambda(x)
@@ -1606,15 +1606,6 @@ When DIE is non-nil, throw an error if file not found."
1606 (push dir path1))) 1606 (push dir path1)))
1607 path1)) 1607 path1))
1608 1608
1609(defun reftex-uniq (list)
1610 (let (new)
1611 (while list
1612 (or (member (car list) new)
1613 (push (car list) new))
1614 (pop list))
1615 (nreverse new)))
1616
1617
1618;;; ========================================================================= 1609;;; =========================================================================
1619;;; 1610;;;
1620;;; Parser functions 1611;;; Parser functions
@@ -2145,7 +2136,7 @@ Works on both Emacs and XEmacs."
2145 (nreverse rtn))) 2136 (nreverse rtn)))
2146 2137
2147(defun reftex-uniquify (list) 2138(defun reftex-uniquify (list)
2148 ;; Return a list of all elements in LIST, but each only once 2139 ;; Return a list of all elements in LIST, but each only once, keeping order
2149 (let (new elm) 2140 (let (new elm)
2150 (while list 2141 (while list
2151 (setq elm (pop list)) 2142 (setq elm (pop list))
@@ -2342,31 +2333,40 @@ IGNORE-WORDS List of words which should be removed from the string."
2342 (if (find-face face) (throw 'exit face)) 2333 (if (find-face face) (throw 'exit face))
2343 (if (facep face) (throw 'exit face))))))) 2334 (if (facep face) (throw 'exit face)))))))
2344 2335
2345;; Highlighting uses overlays. For XEmacs, we need the emulation. 2336;; Highlighting uses overlays. For XEmacs, we use extends.
2346(if (featurep 'xemacs) (require 'overlay)) 2337(if (featurep 'xemacs)
2338 (progn
2339 (defalias 'reftex-make-overlay 'make-extent)
2340 (defalias 'reftex-overlay-put 'set-extent-property)
2341 (defalias 'reftex-move-overlay 'set-extent-endpoints)
2342 (defalias 'reftex-delete-overlay 'detach-extent))
2343 (defalias 'reftex-make-overlay 'make-overlay)
2344 (defalias 'reftex-overlay-put 'overlay-put)
2345 (defalias 'reftex-move-overlay 'move-overlay)
2346 (defalias 'reftex-delete-overlay 'delete-overlay))
2347 2347
2348;; We keep a vector with several different overlays to do our highlighting. 2348;; We keep a vector with several different overlays to do our highlighting.
2349(defvar reftex-highlight-overlays [nil nil nil]) 2349(defvar reftex-highlight-overlays [nil nil nil])
2350 2350
2351;; Initialize the overlays 2351;; Initialize the overlays
2352(aset reftex-highlight-overlays 0 (make-overlay 1 1)) 2352(aset reftex-highlight-overlays 0 (reftex-make-overlay 1 1))
2353(overlay-put (aref reftex-highlight-overlays 0) 2353(reftex-overlay-put (aref reftex-highlight-overlays 0)
2354 'face 'highlight) 2354 'face 'highlight)
2355(aset reftex-highlight-overlays 1 (make-overlay 1 1)) 2355(aset reftex-highlight-overlays 1 (reftex-make-overlay 1 1))
2356(overlay-put (aref reftex-highlight-overlays 1) 2356(reftex-overlay-put (aref reftex-highlight-overlays 1)
2357 'face reftex-cursor-selected-face) 2357 'face reftex-cursor-selected-face)
2358(aset reftex-highlight-overlays 2 (make-overlay 1 1)) 2358(aset reftex-highlight-overlays 2 (reftex-make-overlay 1 1))
2359(overlay-put (aref reftex-highlight-overlays 2) 2359(reftex-overlay-put (aref reftex-highlight-overlays 2)
2360 'face reftex-cursor-selected-face) 2360 'face reftex-cursor-selected-face)
2361 2361
2362;; Two functions for activating and deactivation highlight overlays 2362;; Two functions for activating and deactivation highlight overlays
2363(defun reftex-highlight (index begin end &optional buffer) 2363(defun reftex-highlight (index begin end &optional buffer)
2364 "Highlight a region with overlay INDEX." 2364 "Highlight a region with overlay INDEX."
2365 (move-overlay (aref reftex-highlight-overlays index) 2365 (reftex-move-overlay (aref reftex-highlight-overlays index)
2366 begin end (or buffer (current-buffer)))) 2366 begin end (or buffer (current-buffer))))
2367(defun reftex-unhighlight (index) 2367(defun reftex-unhighlight (index)
2368 "Detach overlay INDEX." 2368 "Detach overlay INDEX."
2369 (delete-overlay (aref reftex-highlight-overlays index))) 2369 (reftex-delete-overlay (aref reftex-highlight-overlays index)))
2370 2370
2371(defun reftex-highlight-shall-die () 2371(defun reftex-highlight-shall-die ()
2372 ;; Function used in pre-command-hook to remove highlights. 2372 ;; Function used in pre-command-hook to remove highlights.
@@ -2424,6 +2424,9 @@ IGNORE-WORDS List of words which should be removed from the string."
2424 2424
2425;; Define a menu for the menu bar if Emacs is running under X 2425;; Define a menu for the menu bar if Emacs is running under X
2426 2426
2427(defvar reftex-isearch-minor-mode nil)
2428(make-variable-buffer-local 'reftex-isearch-minor-mode)
2429
2427(require 'easymenu) 2430(require 'easymenu)
2428 2431
2429(easy-menu-define reftex-mode-menu reftex-mode-map 2432(easy-menu-define reftex-mode-menu reftex-mode-map
diff --git a/lisp/textmodes/spell.el b/lisp/textmodes/spell.el
index c6289819c88..6afaae83703 100644
--- a/lisp/textmodes/spell.el
+++ b/lisp/textmodes/spell.el
@@ -128,9 +128,9 @@ for example, \"word\"."
128 (forward-char 1) 128 (forward-char 1)
129 (delete-region (point-min) (point)) 129 (delete-region (point-min) (point))
130 (setq newword 130 (setq newword
131 (read-input (concat "`" word 131 (read-string (concat "`" word
132 "' not recognized; edit a replacement: ") 132 "' not recognized; edit a replacement: ")
133 word)) 133 word))
134 (flush-lines (concat "^" (regexp-quote word) "$"))) 134 (flush-lines (concat "^" (regexp-quote word) "$")))
135 (if (not (equal word newword)) 135 (if (not (equal word newword))
136 (progn 136 (progn
diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el
index a85e968d3ee..118ca3bb3fa 100644
--- a/lisp/textmodes/table.el
+++ b/lisp/textmodes/table.el
@@ -842,7 +842,8 @@ simply by any key input."
842 :group 'table-hooks) 842 :group 'table-hooks)
843 843
844(defcustom table-yank-handler '(nil nil t nil) 844(defcustom table-yank-handler '(nil nil t nil)
845 "*yank-handler for table.") 845 "*yank-handler for table."
846 :group 'table)
846 847
847(setplist 'table-disable-incompatibility-warning nil) 848(setplist 'table-disable-incompatibility-warning nil)
848 849
diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el
index e478169c250..ad029266f3b 100644
--- a/lisp/textmodes/texinfmt.el
+++ b/lisp/textmodes/texinfmt.el
@@ -2807,7 +2807,7 @@ Default is to leave the number of spaces as is."
2807 (let ((arg (texinfo-parse-arg-discard))) 2807 (let ((arg (texinfo-parse-arg-discard)))
2808 (if (string= "asis" arg) 2808 (if (string= "asis" arg)
2809 (setq texinfo-paragraph-indent "asis") 2809 (setq texinfo-paragraph-indent "asis")
2810 (setq texinfo-paragraph-indent (string-to-int arg))))) 2810 (setq texinfo-paragraph-indent (string-to-number arg)))))
2811 2811
2812(put 'refill 'texinfo-format 'texinfo-format-refill) 2812(put 'refill 'texinfo-format 'texinfo-format-refill)
2813(defun texinfo-format-refill () 2813(defun texinfo-format-refill ()
diff --git a/lisp/time-stamp.el b/lisp/time-stamp.el
index c0ba69f80c2..96f48434ab5 100644
--- a/lisp/time-stamp.el
+++ b/lisp/time-stamp.el
@@ -270,7 +270,7 @@ template."
270 (string-match "\\`\\(\\(-?[0-9]+\\)/\\)?\\([^%]+\\)?\\(\\(%[-.,:@+_ #^()0-9]*[A-Za-z%][^%]*\\)*%[-.,:@+_ #^()0-9]*[A-Za-z%]\\)?\\([^%]+\\)?\\'" time-stamp-pattern) 270 (string-match "\\`\\(\\(-?[0-9]+\\)/\\)?\\([^%]+\\)?\\(\\(%[-.,:@+_ #^()0-9]*[A-Za-z%][^%]*\\)*%[-.,:@+_ #^()0-9]*[A-Za-z%]\\)?\\([^%]+\\)?\\'" time-stamp-pattern)
271 (and (match-beginning 2) 271 (and (match-beginning 2)
272 (setq line-limit 272 (setq line-limit
273 (string-to-int (match-string 2 time-stamp-pattern)))) 273 (string-to-number (match-string 2 time-stamp-pattern))))
274 (and (match-beginning 3) 274 (and (match-beginning 3)
275 (setq ts-start (match-string 3 time-stamp-pattern))) 275 (setq ts-start (match-string 3 time-stamp-pattern)))
276 (and (match-beginning 4) 276 (and (match-beginning 4)
@@ -558,9 +558,9 @@ and all `time-stamp-format' compatibility."
558 ((eq cur-char ?y) ;year 558 ((eq cur-char ?y) ;year
559 (or alt-form (not (string-equal field-width "")) 559 (or alt-form (not (string-equal field-width ""))
560 (time-stamp-conv-warn "%y" "%:y")) 560 (time-stamp-conv-warn "%y" "%:y"))
561 (string-to-int (format-time-string "%Y" time))) 561 (string-to-number (format-time-string "%Y" time)))
562 ((eq cur-char ?Y) ;4-digit year, new style 562 ((eq cur-char ?Y) ;4-digit year, new style
563 (string-to-int (format-time-string "%Y" time))) 563 (string-to-number (format-time-string "%Y" time)))
564 ((eq cur-char ?z) ;time zone lower case 564 ((eq cur-char ?z) ;time zone lower case
565 (if change-case 565 (if change-case
566 "" ;discourage %z variations 566 "" ;discourage %z variations
@@ -597,7 +597,7 @@ and all `time-stamp-format' compatibility."
597 (let* ((initial-length (length padded-result)) 597 (let* ((initial-length (length padded-result))
598 (desired-length (if (string-equal field-width "") 598 (desired-length (if (string-equal field-width "")
599 initial-length 599 initial-length
600 (string-to-int field-width)))) 600 (string-to-number field-width))))
601 (if (> initial-length desired-length) 601 (if (> initial-length desired-length)
602 ;; truncate strings on right, years on left 602 ;; truncate strings on right, years on left
603 (if (stringp field-result) 603 (if (stringp field-result)
@@ -621,7 +621,7 @@ width specification or \"\". TIME is the time to convert."
621 (format "%%:%c" format-char))) 621 (format "%%:%c" format-char)))
622 (if (and alt-form (not (string-equal field-width ""))) 622 (if (and alt-form (not (string-equal field-width "")))
623 "" ;discourage "%:2d" and the like 623 "" ;discourage "%:2d" and the like
624 (string-to-int (format-time-string format-string time))))) 624 (string-to-number (format-time-string format-string time)))))
625 625
626(defvar time-stamp-conversion-warn t 626(defvar time-stamp-conversion-warn t
627 "Warn about soon-to-be-unsupported forms in `time-stamp-format'. 627 "Warn about soon-to-be-unsupported forms in `time-stamp-format'.
diff --git a/lisp/time.el b/lisp/time.el
index 850843402ca..ddf0d932733 100644
--- a/lisp/time.el
+++ b/lisp/time.el
@@ -331,7 +331,7 @@ update which can wait for the next redisplay."
331 ;; Record that mail file is accessible. 331 ;; Record that mail file is accessible.
332 (setq display-time-server-down-time nil))))))) 332 (setq display-time-server-down-time nil)))))))
333 (24-hours (substring time 11 13)) 333 (24-hours (substring time 11 13))
334 (hour (string-to-int 24-hours)) 334 (hour (string-to-number 24-hours))
335 (12-hours (int-to-string (1+ (% (+ hour 11) 12)))) 335 (12-hours (int-to-string (1+ (% (+ hour 11) 12))))
336 (am-pm (if (>= hour 12) "pm" "am")) 336 (am-pm (if (>= hour 12) "pm" "am"))
337 (minutes (substring time 14 16)) 337 (minutes (substring time 14 16))
diff --git a/lisp/timezone.el b/lisp/timezone.el
index bad269d9cbc..62c8f86f79b 100644
--- a/lisp/timezone.el
+++ b/lisp/timezone.el
@@ -205,7 +205,7 @@ Understands the following styles:
205 ;; Unix Epoch, so are 2000+. Three-digit years are assumed to 205 ;; Unix Epoch, so are 2000+. Three-digit years are assumed to
206 ;; be relative to 1900. 206 ;; be relative to 1900.
207 (if (< (length year) 4) 207 (if (< (length year) 4)
208 (let ((y (string-to-int year))) 208 (let ((y (string-to-number year)))
209 (if (< y 69) 209 (if (< y 69)
210 (setq y (+ y 100))) 210 (setq y (+ y 100)))
211 (setq year (int-to-string (+ 1900 y))))) 211 (setq year (int-to-string (+ 1900 y)))))
@@ -271,7 +271,7 @@ or an integer of the form +-HHMM, or a time zone name."
271 ;; +900 271 ;; +900
272 timezone)) 272 timezone))
273 (if (stringp timezone) 273 (if (stringp timezone)
274 (setq timezone (string-to-int timezone))) 274 (setq timezone (string-to-number timezone)))
275 ;; Taking account of minute in timezone. 275 ;; Taking account of minute in timezone.
276 ;; HHMM -> MM 276 ;; HHMM -> MM
277 (let* ((abszone (abs timezone)) 277 (let* ((abszone (abs timezone))
@@ -314,7 +314,7 @@ Gregorian date Sunday, December 31, 1 BC."
314If LOCAL is nil, it is assumed to be GMT. 314If LOCAL is nil, it is assumed to be GMT.
315If TIMEZONE is nil, use the local time zone." 315If TIMEZONE is nil, use the local time zone."
316 (let* ((date (timezone-parse-date date)) 316 (let* ((date (timezone-parse-date date))
317 (year (string-to-int (aref date 0))) 317 (year (string-to-number (aref date 0)))
318 (year (cond ((< year 69) 318 (year (cond ((< year 69)
319 (+ year 2000)) 319 (+ year 2000))
320 ((< year 100) 320 ((< year 100)
@@ -322,12 +322,12 @@ If TIMEZONE is nil, use the local time zone."
322 ((< year 1000) ; possible 3-digit years. 322 ((< year 1000) ; possible 3-digit years.
323 (+ year 1900)) 323 (+ year 1900))
324 (t year))) 324 (t year)))
325 (month (string-to-int (aref date 1))) 325 (month (string-to-number (aref date 1)))
326 (day (string-to-int (aref date 2))) 326 (day (string-to-number (aref date 2)))
327 (time (timezone-parse-time (aref date 3))) 327 (time (timezone-parse-time (aref date 3)))
328 (hour (string-to-int (aref time 0))) 328 (hour (string-to-number (aref time 0)))
329 (minute (string-to-int (aref time 1))) 329 (minute (string-to-number (aref time 1)))
330 (second (string-to-int (aref time 2))) 330 (second (string-to-number (aref time 2)))
331 (local (or (aref date 4) local)) ;Use original if defined 331 (local (or (aref date 4) local)) ;Use original if defined
332 (timezone 332 (timezone
333 (or timezone 333 (or timezone
diff --git a/lisp/tmm.el b/lisp/tmm.el
index 99931867792..3e0a8e95701 100644
--- a/lisp/tmm.el
+++ b/lisp/tmm.el
@@ -395,7 +395,7 @@ element of keymap, an `x-popup-menu' argument, or an element of
395`x-popup-menu' argument (when IN-X-MENU is not-nil). 395`x-popup-menu' argument (when IN-X-MENU is not-nil).
396This function adds the element only if it is not already present. 396This function adds the element only if it is not already present.
397It uses the free variable `tmm-table-undef' to keep undefined keys." 397It uses the free variable `tmm-table-undef' to keep undefined keys."
398 (let (km str cache plist filter visible (event (car elt))) 398 (let (km str cache plist filter visible enable (event (car elt)))
399 (setq elt (cdr elt)) 399 (setq elt (cdr elt))
400 (if (eq elt 'undefined) 400 (if (eq elt 'undefined)
401 (setq tmm-table-undef (cons (cons event nil) tmm-table-undef)) 401 (setq tmm-table-undef (cons (cons event nil) tmm-table-undef))
@@ -436,6 +436,9 @@ It uses the free variable `tmm-table-undef' to keep undefined keys."
436 (setq visible (plist-get plist :visible)) 436 (setq visible (plist-get plist :visible))
437 (if visible 437 (if visible
438 (setq km (and (eval visible) km))) 438 (setq km (and (eval visible) km)))
439 (setq enable (plist-get plist :enable))
440 (if enable
441 (setq km (and (eval enable) km)))
439 (and str 442 (and str
440 (consp (nth 3 elt)) 443 (consp (nth 3 elt))
441 (stringp (cdr (nth 3 elt))) ; keyseq cache 444 (stringp (cdr (nth 3 elt))) ; keyseq cache
diff --git a/lisp/toolbar/tool-bar.el b/lisp/toolbar/tool-bar.el
index f22d84cafaf..5f2e3afd46c 100644
--- a/lisp/toolbar/tool-bar.el
+++ b/lisp/toolbar/tool-bar.el
@@ -1,6 +1,6 @@
1;;; tool-bar.el --- setting up the tool bar 1;;; tool-bar.el --- setting up the tool bar
2;; 2;;
3;; Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. 3;; Copyright (C) 2000, 2001, 2002, 2005 Free Software Foundation, Inc.
4;; 4;;
5;; Author: Dave Love <fx@gnu.org> 5;; Author: Dave Love <fx@gnu.org>
6;; Keywords: mouse frames 6;; Keywords: mouse frames
diff --git a/lisp/uniquify.el b/lisp/uniquify.el
index ea9094da78a..792a81f3221 100644
--- a/lisp/uniquify.el
+++ b/lisp/uniquify.el
@@ -110,17 +110,20 @@ would have the following buffer names in the various styles:
110 (const post-forward) 110 (const post-forward)
111 (const post-forward-angle-brackets) 111 (const post-forward-angle-brackets)
112 (const :tag "standard Emacs behavior (nil)" nil)) 112 (const :tag "standard Emacs behavior (nil)" nil))
113 :require 'uniquify) 113 :require 'uniquify
114 :group 'uniquify)
114 115
115(defcustom uniquify-after-kill-buffer-p t 116(defcustom uniquify-after-kill-buffer-p t
116 "If non-nil, rerationalize buffer names after a buffer has been killed." 117 "If non-nil, rerationalize buffer names after a buffer has been killed."
117 :type 'boolean) 118 :type 'boolean
119 :group 'uniquify)
118 120
119(defcustom uniquify-ask-about-buffer-names-p nil 121(defcustom uniquify-ask-about-buffer-names-p nil
120 "*If non-nil, permit user to choose names for buffers with same base file. 122 "*If non-nil, permit user to choose names for buffers with same base file.
121If the user chooses to name a buffer, uniquification is preempted and no 123If the user chooses to name a buffer, uniquification is preempted and no
122other buffer names are changed." 124other buffer names are changed."
123 :type 'boolean) 125 :type 'boolean
126 :group 'uniquify)
124 127
125;; The default value matches certain Gnus buffers. 128;; The default value matches certain Gnus buffers.
126(defcustom uniquify-ignore-buffers-re nil 129(defcustom uniquify-ignore-buffers-re nil
@@ -128,11 +131,13 @@ other buffer names are changed."
128For instance, set this to \"^draft-[0-9]+$\" to avoid having uniquify rename 131For instance, set this to \"^draft-[0-9]+$\" to avoid having uniquify rename
129draft buffers even if `uniquify-after-kill-buffer-p' is non-nil and the 132draft buffers even if `uniquify-after-kill-buffer-p' is non-nil and the
130visited file name isn't the same as that of the buffer." 133visited file name isn't the same as that of the buffer."
131 :type '(choice (const :tag "Uniquify all buffers" nil) regexp)) 134 :type '(choice (const :tag "Uniquify all buffers" nil) regexp)
135 :group 'uniquify)
132 136
133(defcustom uniquify-min-dir-content 0 137(defcustom uniquify-min-dir-content 0
134 "*Minimum number of directory name components included in buffer name." 138 "*Minimum number of directory name components included in buffer name."
135 :type 'integer) 139 :type 'integer
140 :group 'uniquify)
136 141
137(defcustom uniquify-separator nil 142(defcustom uniquify-separator nil
138 "*String separator for buffer name components. 143 "*String separator for buffer name components.
@@ -140,14 +145,16 @@ When `uniquify-buffer-name-style' is `post-forward', separates
140base file name from directory part in buffer names (default \"|\"). 145base file name from directory part in buffer names (default \"|\").
141When `uniquify-buffer-name-style' is `reverse', separates all 146When `uniquify-buffer-name-style' is `reverse', separates all
142file name components (default \"\\\")." 147file name components (default \"\\\")."
143 :type '(choice (const nil) string)) 148 :type '(choice (const nil) string)
149 :group 'uniquify)
144 150
145(defcustom uniquify-trailing-separator-p nil 151(defcustom uniquify-trailing-separator-p nil
146 "*If non-nil, add a file name separator to dired buffer names. 152 "*If non-nil, add a file name separator to dired buffer names.
147If `uniquify-buffer-name-style' is `forward', add the separator at the end; 153If `uniquify-buffer-name-style' is `forward', add the separator at the end;
148if it is `reverse', add the separator at the beginning; otherwise, this 154if it is `reverse', add the separator at the beginning; otherwise, this
149variable is ignored." 155variable is ignored."
150 :type 'boolean) 156 :type 'boolean
157 :group 'uniquify)
151 158
152(defcustom uniquify-strip-common-suffix 159(defcustom uniquify-strip-common-suffix
153 ;; Using it when uniquify-min-dir-content>0 doesn't make much sense. 160 ;; Using it when uniquify-min-dir-content>0 doesn't make much sense.
@@ -156,7 +163,8 @@ variable is ignored."
156E.g. if you open /a1/b/c/d and /a2/b/c/d, the buffer names will say 163E.g. if you open /a1/b/c/d and /a2/b/c/d, the buffer names will say
157\"d|a1\" and \"d|a2\" instead of \"d|a1/b/c\" and \"d|a2/b/c\". 164\"d|a1\" and \"d|a2\" instead of \"d|a1/b/c\" and \"d|a2/b/c\".
158This can be handy when you have deep parallel hierarchies." 165This can be handy when you have deep parallel hierarchies."
159 :type 'boolean) 166 :type 'boolean
167 :group 'uniquify)
160 168
161(defvar uniquify-list-buffers-directory-modes '(dired-mode cvs-mode) 169(defvar uniquify-list-buffers-directory-modes '(dired-mode cvs-mode)
162 "List of modes for which uniquify should obey `list-buffers-directory'. 170 "List of modes for which uniquify should obey `list-buffers-directory'.
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index a023bdf18c7..546af477106 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,21 @@
12005-05-19 Juanma Barranquero <lekktu@gmail.com>
2
3 * url-cookie.el (url-cookie-multiple-line):
4 Specify group and type in defcustom.
5
62005-05-06 Juanma Barranquero <lekktu@gmail.com>
7
8 * url-auth.el (url-register-auth-scheme):
9 * url-cookie.el (url-cookie-expired-p):
10 * url-dav.el (url-dav-process-date-property)
11 (url-dav-process-boolean-property, url-dav-process-DAV:status):
12 * url-http.el (url-http-chunked-encoding-after-change-function)
13 (url-http-wait-for-headers-change-function):
14 * url-ns.el (isInNet):
15 * url-parse.el (url-generic-parse-url):
16 * url-util.el (url-get-normalized-date): Replace `string-to-int'
17 by `string-to-number'.
18
12005-04-18 Stefan Monnier <monnier@iro.umontreal.ca> 192005-04-18 Stefan Monnier <monnier@iro.umontreal.ca>
2 20
3 * url.el (url-retrieve-synchronously): Work around the fact that 21 * url.el (url-retrieve-synchronously): Work around the fact that
diff --git a/lisp/url/url-auth.el b/lisp/url/url-auth.el
index 260315c5d54..ea208ccadea 100644
--- a/lisp/url/url-auth.el
+++ b/lisp/url/url-auth.el
@@ -293,7 +293,7 @@ RATING a rating between 1 and 10 of the strength of the authentication.
293 (function (or function (intern (concat "url-" type "-auth")))) 293 (function (or function (intern (concat "url-" type "-auth"))))
294 (rating (cond 294 (rating (cond
295 ((null rating) 2) 295 ((null rating) 2)
296 ((stringp rating) (string-to-int rating)) 296 ((stringp rating) (string-to-number rating))
297 (t rating))) 297 (t rating)))
298 (node (assoc type url-registered-auth-schemes))) 298 (node (assoc type url-registered-auth-schemes)))
299 (if (not (fboundp function)) 299 (if (not (fboundp function))
diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el
index 9f7db867597..328e60b63bc 100644
--- a/lisp/url/url-cookie.el
+++ b/lisp/url/url-cookie.el
@@ -87,7 +87,9 @@
87 "*If nil, HTTP requests put all cookies for the server on one line. 87 "*If nil, HTTP requests put all cookies for the server on one line.
88Some web servers, such as http://www.hotmail.com/, only accept cookies 88Some web servers, such as http://www.hotmail.com/, only accept cookies
89when they are on one line. This is broken behaviour, but just try 89when they are on one line. This is broken behaviour, but just try
90telling Microsoft that.") 90telling Microsoft that."
91 :type 'boolean
92 :group 'url-cookie)
91 93
92(defvar url-cookies-changed-since-last-save nil 94(defvar url-cookies-changed-since-last-save nil
93 "Whether the cookies list has changed since the last save operation.") 95 "Whether the cookies list has changed since the last save operation.")
@@ -208,13 +210,13 @@ telling Microsoft that.")
208 (cur-date (and exp (timezone-parse-date (current-time-string)))) 210 (cur-date (and exp (timezone-parse-date (current-time-string))))
209 (exp-date (and exp (timezone-parse-date exp))) 211 (exp-date (and exp (timezone-parse-date exp)))
210 (cur-greg (and cur-date (timezone-absolute-from-gregorian 212 (cur-greg (and cur-date (timezone-absolute-from-gregorian
211 (string-to-int (aref cur-date 1)) 213 (string-to-number (aref cur-date 1))
212 (string-to-int (aref cur-date 2)) 214 (string-to-number (aref cur-date 2))
213 (string-to-int (aref cur-date 0))))) 215 (string-to-number (aref cur-date 0)))))
214 (exp-greg (and exp (timezone-absolute-from-gregorian 216 (exp-greg (and exp (timezone-absolute-from-gregorian
215 (string-to-int (aref exp-date 1)) 217 (string-to-number (aref exp-date 1))
216 (string-to-int (aref exp-date 2)) 218 (string-to-number (aref exp-date 2))
217 (string-to-int (aref exp-date 0))))) 219 (string-to-number (aref exp-date 0)))))
218 (diff-in-days (and exp (- cur-greg exp-greg))) 220 (diff-in-days (and exp (- cur-greg exp-greg)))
219 ) 221 )
220 (cond 222 (cond
@@ -224,12 +226,12 @@ telling Microsoft that.")
224 (t ; Expires sometime today, check times 226 (t ; Expires sometime today, check times
225 (let* ((cur-time (timezone-parse-time (aref cur-date 3))) 227 (let* ((cur-time (timezone-parse-time (aref cur-date 3)))
226 (exp-time (timezone-parse-time (aref exp-date 3))) 228 (exp-time (timezone-parse-time (aref exp-date 3)))
227 (cur-norm (+ (* 360 (string-to-int (aref cur-time 2))) 229 (cur-norm (+ (* 360 (string-to-number (aref cur-time 2)))
228 (* 60 (string-to-int (aref cur-time 1))) 230 (* 60 (string-to-number (aref cur-time 1)))
229 (* 1 (string-to-int (aref cur-time 0))))) 231 (* 1 (string-to-number (aref cur-time 0)))))
230 (exp-norm (+ (* 360 (string-to-int (aref exp-time 2))) 232 (exp-norm (+ (* 360 (string-to-number (aref exp-time 2)))
231 (* 60 (string-to-int (aref exp-time 1))) 233 (* 60 (string-to-number (aref exp-time 1)))
232 (* 1 (string-to-int (aref exp-time 0)))))) 234 (* 1 (string-to-number (aref exp-time 0))))))
233 (> (- cur-norm exp-norm) 1)))))) 235 (> (- cur-norm exp-norm) 1))))))
234 236
235;;;###autoload 237;;;###autoload
diff --git a/lisp/url/url-dav.el b/lisp/url/url-dav.el
index d6c5ffffa43..a0f1ae1ebe7 100644
--- a/lisp/url/url-dav.el
+++ b/lisp/url/url-dav.el
@@ -121,17 +121,17 @@
121 121
122 ;; Nobody else handles iso8601 correctly, lets do it ourselves. 122 ;; Nobody else handles iso8601 correctly, lets do it ourselves.
123 (when (string-match date-re date-string re-start) 123 (when (string-match date-re date-string re-start)
124 (setq year (string-to-int (match-string 1 date-string)) 124 (setq year (string-to-number (match-string 1 date-string))
125 month (string-to-int (match-string 2 date-string)) 125 month (string-to-number (match-string 2 date-string))
126 day (string-to-int (match-string 3 date-string)) 126 day (string-to-number (match-string 3 date-string))
127 re-start (match-end 0)) 127 re-start (match-end 0))
128 (when (string-match time-re date-string re-start) 128 (when (string-match time-re date-string re-start)
129 (setq hour (string-to-int (match-string 1 date-string)) 129 (setq hour (string-to-number (match-string 1 date-string))
130 minute (string-to-int (match-string 2 date-string)) 130 minute (string-to-number (match-string 2 date-string))
131 seconds (string-to-int (match-string 3 date-string)) 131 seconds (string-to-number (match-string 3 date-string))
132 fractional-seconds (string-to-int (or 132 fractional-seconds (string-to-number (or
133 (match-string 4 date-string) 133 (match-string 4 date-string)
134 "0")) 134 "0"))
135 re-start (match-end 0)) 135 re-start (match-end 0))
136 (when (string-match tz-re date-string re-start) 136 (when (string-match tz-re date-string re-start)
137 (setq tz (match-string 1 date-string))) 137 (setq tz (match-string 1 date-string)))
@@ -149,7 +149,7 @@
149 time)) 149 time))
150 150
151(defun url-dav-process-boolean-property (node) 151(defun url-dav-process-boolean-property (node)
152 (/= 0 (string-to-int (url-dav-node-text node)))) 152 (/= 0 (string-to-number (url-dav-node-text node))))
153 153
154(defun url-dav-process-uri-property (node) 154(defun url-dav-process-uri-property (node)
155 ;; Returns a parsed representation of the URL... 155 ;; Returns a parsed representation of the URL...
@@ -318,7 +318,7 @@
318 ;; only care about the numeric status code. 318 ;; only care about the numeric status code.
319 (let ((status (url-dav-node-text node))) 319 (let ((status (url-dav-node-text node)))
320 (if (string-match "\\`[ \r\t\n]*HTTP/[0-9.]+ \\([0-9]+\\)" status) 320 (if (string-match "\\`[ \r\t\n]*HTTP/[0-9.]+ \\([0-9]+\\)" status)
321 (string-to-int (match-string 1 status)) 321 (string-to-number (match-string 1 status))
322 500))) 322 500)))
323 323
324(defun url-dav-process-DAV:propstat (node) 324(defun url-dav-process-DAV:propstat (node)
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index 872ea22ce05..16d51a0258c 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -827,10 +827,10 @@ the end of the document."
827 'text-cursor 827 'text-cursor
828 'cursor) 828 'cursor)
829 'invisible t)) 829 'invisible t))
830 (setq url-http-chunked-length (string-to-int (buffer-substring 830 (setq url-http-chunked-length (string-to-number (buffer-substring
831 (match-beginning 1) 831 (match-beginning 1)
832 (match-end 1)) 832 (match-end 1))
833 16) 833 16)
834 url-http-chunked-counter (1+ url-http-chunked-counter) 834 url-http-chunked-counter (1+ url-http-chunked-counter)
835 url-http-chunked-start (set-marker 835 url-http-chunked-start (set-marker
836 (or url-http-chunked-start 836 (or url-http-chunked-start
@@ -904,7 +904,7 @@ the end of the document."
904 url-http-content-type (mail-fetch-field "content-type")) 904 url-http-content-type (mail-fetch-field "content-type"))
905 (if (mail-fetch-field "content-length") 905 (if (mail-fetch-field "content-length")
906 (setq url-http-content-length 906 (setq url-http-content-length
907 (string-to-int (mail-fetch-field "content-length")))) 907 (string-to-number (mail-fetch-field "content-length"))))
908 (widen))) 908 (widen)))
909 (if url-http-transfer-encoding 909 (if url-http-transfer-encoding
910 (setq url-http-transfer-encoding 910 (setq url-http-transfer-encoding
diff --git a/lisp/url/url-ns.el b/lisp/url/url-ns.el
index fe181422e4f..1dcb1f85f27 100644
--- a/lisp/url/url-ns.el
+++ b/lisp/url/url-ns.el
@@ -51,9 +51,9 @@
51 (if (or (/= (length netc) (length ipc)) 51 (if (or (/= (length netc) (length ipc))
52 (/= (length ipc) (length maskc))) 52 (/= (length ipc) (length maskc)))
53 nil 53 nil
54 (setq netc (mapcar 'string-to-int netc) 54 (setq netc (mapcar 'string-to-number netc)
55 ipc (mapcar 'string-to-int ipc) 55 ipc (mapcar 'string-to-number ipc)
56 maskc (mapcar 'string-to-int maskc)) 56 maskc (mapcar 'string-to-number maskc))
57 (and 57 (and
58 (= (logand (nth 0 netc) (nth 0 maskc)) 58 (= (logand (nth 0 netc) (nth 0 maskc))
59 (logand (nth 0 ipc) (nth 0 maskc))) 59 (logand (nth 0 ipc) (nth 0 maskc)))
diff --git a/lisp/url/url-parse.el b/lisp/url/url-parse.el
index 97348ab5db2..5b5250ab31f 100644
--- a/lisp/url/url-parse.el
+++ b/lisp/url/url-parse.el
@@ -167,7 +167,7 @@ Format is:
167 (setq pass (match-string 2 user) 167 (setq pass (match-string 2 user)
168 user (match-string 1 user))) 168 user (match-string 1 user)))
169 (if (string-match ":\\([0-9+]+\\)" host) 169 (if (string-match ":\\([0-9+]+\\)" host)
170 (setq port (string-to-int (match-string 1 host)) 170 (setq port (string-to-number (match-string 1 host))
171 host (substring host 0 (match-beginning 0)))) 171 host (substring host 0 (match-beginning 0))))
172 (if (string-match ":$" host) 172 (if (string-match ":$" host)
173 (setq host (substring host 0 (match-beginning 0)))) 173 (setq host (substring host 0 (match-beginning 0))))
diff --git a/lisp/url/url-util.el b/lisp/url/url-util.el
index 1d0bfcf0c48..b796d695461 100644
--- a/lisp/url/url-util.el
+++ b/lisp/url/url-util.el
@@ -196,7 +196,7 @@ Will not do anything if `url-show-status' is nil."
196 (year nil) 196 (year nil)
197 (month (car 197 (month (car
198 (rassoc 198 (rassoc
199 (string-to-int (aref parsed 1)) url-monthabbrev-alist))) 199 (string-to-number (aref parsed 1)) url-monthabbrev-alist)))
200 ) 200 )
201 (setq day (or (car-safe (rassoc day url-weekday-alist)) 201 (setq day (or (car-safe (rassoc day url-weekday-alist))
202 (substring raw 0 3)) 202 (substring raw 0 3))
diff --git a/lisp/vms-patch.el b/lisp/vms-patch.el
index 48174f41237..60033dc7f20 100644
--- a/lisp/vms-patch.el
+++ b/lisp/vms-patch.el
@@ -93,7 +93,7 @@ If the logical name `EMACS_FILE_NAME' is defined, `find-file' that file."
93 (if (not args) 93 (if (not args)
94 (if file 94 (if file
95 (progn (find-file file) 95 (progn (find-file file)
96 (if line (goto-line (string-to-int line))))) 96 (if line (goto-line (string-to-number line)))))
97 (cd (file-name-directory file)) 97 (cd (file-name-directory file))
98 (vms-command-line-again)))) 98 (vms-command-line-again))))
99 99
diff --git a/lisp/w32-vars.el b/lisp/w32-vars.el
index 6a3ff36108e..1877e159ae7 100644
--- a/lisp/w32-vars.el
+++ b/lisp/w32-vars.el
@@ -146,7 +146,8 @@ menu if the variable `w32-use-w32-font-dialog' is nil."
146 (const :tag "Seperator" ("")) 146 (const :tag "Seperator" (""))
147 (list :tag "Font Entry" 147 (list :tag "Font Entry"
148 (string :tag "Menu text") 148 (string :tag "Menu text")
149 (string :tag "Font")))))))) 149 (string :tag "Font")))))))
150 :group 'w32)
150 151
151(defcustom x-select-enable-clipboard t 152(defcustom x-select-enable-clipboard t
152 "*Non-nil means cutting and pasting uses the clipboard. 153 "*Non-nil means cutting and pasting uses the clipboard.