diff options
| author | Karoly Lorentey | 2004-09-16 13:09:53 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-09-16 13:09:53 +0000 |
| commit | 98a92e2d7b1f9993215dd4db3d5810586b3da7d3 (patch) | |
| tree | 36549b6c7ca6056a0e3b5fd72264160953b23f15 | |
| parent | aeeb70757cd8c57689a1b3238e9b25a2d422e38f (diff) | |
| parent | 113e270a241bcabe4aae4eb13f0ceb62744ec1f4 (diff) | |
| download | emacs-98a92e2d7b1f9993215dd4db3d5810586b3da7d3.tar.gz emacs-98a92e2d7b1f9993215dd4db3d5810586b3da7d3.zip | |
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-547
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-548
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-549
Use symbol-matching for generic-mode keywords
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-550
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-551
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-246
| -rw-r--r-- | etc/ETAGS.EBNF | 4 | ||||
| -rw-r--r-- | etc/NEWS | 4 | ||||
| -rw-r--r-- | etc/etags.1 | 4 | ||||
| -rw-r--r-- | lib-src/ChangeLog | 6 | ||||
| -rw-r--r-- | lib-src/etags.c | 6 | ||||
| -rw-r--r-- | lisp/ChangeLog | 80 | ||||
| -rw-r--r-- | lisp/calc/calc-embed.el | 2 | ||||
| -rw-r--r-- | lisp/calc/calc.el | 420 | ||||
| -rw-r--r-- | lisp/faces.el | 4 | ||||
| -rw-r--r-- | lisp/files.el | 1 | ||||
| -rw-r--r-- | lisp/generic.el | 4 | ||||
| -rw-r--r-- | lisp/ibuf-ext.el | 5 | ||||
| -rw-r--r-- | lisp/novice.el | 6 | ||||
| -rw-r--r-- | lisp/textmodes/dns-mode.el | 198 | ||||
| -rw-r--r-- | lisp/vc-arch.el | 32 | ||||
| -rw-r--r-- | lisp/vc-mcvs.el | 32 | ||||
| -rw-r--r-- | lisp/vc.el | 5 | ||||
| -rw-r--r-- | lisp/windmove.el | 70 | ||||
| -rw-r--r-- | man/maintaining.texi | 3 | ||||
| -rw-r--r-- | src/ChangeLog | 26 | ||||
| -rw-r--r-- | src/alloc.c | 33 | ||||
| -rw-r--r-- | src/bytecode.c | 35 | ||||
| -rw-r--r-- | src/fileio.c | 8 | ||||
| -rw-r--r-- | src/puresize.h | 2 | ||||
| -rw-r--r-- | src/xfaces.c | 59 |
25 files changed, 701 insertions, 348 deletions
diff --git a/etc/ETAGS.EBNF b/etc/ETAGS.EBNF index 55c90dc4701..4d09eaa581d 100644 --- a/etc/ETAGS.EBNF +++ b/etc/ETAGS.EBNF | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | This file contains two sections: | 3 | This file contains two sections: |
| 4 | 4 | ||
| 5 | 1) An EBNF (Extended Backus Normal Form) description of the format of | 5 | 1) An EBNF (Extended Backus-Naur Form) description of the format of |
| 6 | the tags file created by etags.c and interpreted by etags.el; | 6 | the tags file created by etags.c and interpreted by etags.el; |
| 7 | 2) A discussion of tag names and implicit tag names. | 7 | 2) A discussion of tag names and implicit tag names. |
| 8 | 8 | ||
| @@ -81,7 +81,7 @@ substring of the tag pattern. We define a set of rules to decide | |||
| 81 | whether it is possible to deduce the tag name from the pattern, and make | 81 | whether it is possible to deduce the tag name from the pattern, and make |
| 82 | an unnamed tag in those cases. The name deduced from the pattern of an | 82 | an unnamed tag in those cases. The name deduced from the pattern of an |
| 83 | unnamed tag is the implicit name of that tag. | 83 | unnamed tag is the implicit name of that tag. |
| 84 | When the user looks for a tag, and Emacs founds no explicit tag names | 84 | When the user looks for a tag, and Emacs finds no explicit tag names |
| 85 | that match it, Emacs then looks for an tag whose implicit tag name | 85 | that match it, Emacs then looks for an tag whose implicit tag name |
| 86 | matches the request. etags.c uses implicit tag names when possible, in | 86 | matches the request. etags.c uses implicit tag names when possible, in |
| 87 | order to reduce the size of the tags file. | 87 | order to reduce the size of the tags file. |
| @@ -2004,6 +2004,10 @@ anyone has committed to the repository since you last executed | |||
| 2004 | 2004 | ||
| 2005 | * New modes and packages in Emacs 21.4 | 2005 | * New modes and packages in Emacs 21.4 |
| 2006 | 2006 | ||
| 2007 | ** The new package dns-mode.el add syntax highlight of DNS master files. | ||
| 2008 | The key binding C-c C-s (`dns-mode-soa-increment-serial') can be used | ||
| 2009 | to increment the SOA serial. | ||
| 2010 | |||
| 2007 | ** The new package flymake.el does on-the-fly syntax checking of program | 2011 | ** The new package flymake.el does on-the-fly syntax checking of program |
| 2008 | source files. See the Flymake's Info manual for more details. | 2012 | source files. See the Flymake's Info manual for more details. |
| 2009 | 2013 | ||
diff --git a/etc/etags.1 b/etc/etags.1 index 5bb43707f6e..2a84c622e0e 100644 --- a/etc/etags.1 +++ b/etc/etags.1 | |||
| @@ -58,7 +58,9 @@ table (defaults: \fBTAGS\fP for \fBetags\fP, \fBtags\fP for | |||
| 58 | \fBctags\fP) in the current working directory. | 58 | \fBctags\fP) in the current working directory. |
| 59 | Files specified with relative file names will be recorded in the tag | 59 | Files specified with relative file names will be recorded in the tag |
| 60 | table with file names relative to the directory where the tag table | 60 | table with file names relative to the directory where the tag table |
| 61 | resides. Files specified with absolute file names will be recorded | 61 | resides. If the tag table is in /dev, however, the file names are made |
| 62 | relative to the working directory. Files specified with absolute file | ||
| 63 | names will be recorded | ||
| 62 | with absolute file names. Files generated from a source file\-\-like | 64 | with absolute file names. Files generated from a source file\-\-like |
| 63 | a C file generated from a source Cweb file\-\-will be recorded with | 65 | a C file generated from a source Cweb file\-\-will be recorded with |
| 64 | the name of the source file. | 66 | the name of the source file. |
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index b0960f9a98b..c04bdf2f094 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,5 +1,11 @@ | |||
| 1 | 2004-09-13 Francesco Potort,Al(B <pot@gnu.org> | 1 | 2004-09-13 Francesco Potort,Al(B <pot@gnu.org> |
| 2 | 2 | ||
| 3 | * etags.c (main): When relative file names are given as argument, | ||
| 4 | make them relative to the current working dir, rather than | ||
| 5 | relative to the output tags file, if the latter is in /dev. | ||
| 6 | |||
| 7 | 2004-09-13 Francesco Potort,Al(B <pot@gnu.org> | ||
| 8 | |||
| 3 | * etags.c [EXIT_SUCCESS, EXIT_FAILURE]: Define them when no | 9 | * etags.c [EXIT_SUCCESS, EXIT_FAILURE]: Define them when no |
| 4 | <stdlib.h> is available. | 10 | <stdlib.h> is available. |
| 5 | (enum sym_type): New st_C_attribute value for parsing | 11 | (enum sym_type): New st_C_attribute value for parsing |
diff --git a/lib-src/etags.c b/lib-src/etags.c index f68c2e2bb95..a6004a048a9 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c | |||
| @@ -40,7 +40,7 @@ | |||
| 40 | * configuration file containing regexp definitions for etags. | 40 | * configuration file containing regexp definitions for etags. |
| 41 | */ | 41 | */ |
| 42 | 42 | ||
| 43 | char pot_etags_version[] = "@(#) pot revision number is 17.4"; | 43 | char pot_etags_version[] = "@(#) pot revision number is 17.5"; |
| 44 | 44 | ||
| 45 | #define TRUE 1 | 45 | #define TRUE 1 |
| 46 | #define FALSE 0 | 46 | #define FALSE 0 |
| @@ -1314,7 +1314,9 @@ main (argc, argv) | |||
| 1314 | cwd = concat (oldcwd, "/", ""); | 1314 | cwd = concat (oldcwd, "/", ""); |
| 1315 | free (oldcwd); | 1315 | free (oldcwd); |
| 1316 | } | 1316 | } |
| 1317 | if (streq (tagfile, "-")) | 1317 | /* Relative file names are made relative to the current directory. */ |
| 1318 | if (streq (tagfile, "-") | ||
| 1319 | || strneq (tagfile, "/dev/", 5)) | ||
| 1318 | tagfiledir = cwd; | 1320 | tagfiledir = cwd; |
| 1319 | else | 1321 | else |
| 1320 | tagfiledir = absolute_dirname (tagfile, cwd); | 1322 | tagfiledir = absolute_dirname (tagfile, cwd); |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 892e2c4790b..d5dab8bb0cb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,9 +1,53 @@ | |||
| 1 | 2004-09-15 Thien-Thi Nguyen <ttn@gnu.org> | ||
| 2 | |||
| 3 | * vc.el (annotate-time): Document point handling. | ||
| 4 | (vc-annotate-display-autoscale): Doc fix. | ||
| 5 | |||
| 6 | 2004-09-15 Miles Bader <miles@gnu.org> | ||
| 7 | |||
| 8 | * generic.el (generic-make-keywords-list): Use symbol rather than | ||
| 9 | word anchors in regexp. | ||
| 10 | |||
| 11 | 2004-09-14 Sean O'Rourke <sorourke@cs.ucsd.edu> | ||
| 12 | |||
| 13 | * ibuf-ext.el (define-ibuffer-filter filename): If buffer has | ||
| 14 | no file name consider `dired-directory'. | ||
| 15 | |||
| 16 | 2004-09-14 Kim F. Storm <storm@cua.dk> | ||
| 17 | |||
| 18 | * faces.el (cursor): Add face-no-inherit property. Doc fix. | ||
| 19 | |||
| 20 | 2004-09-14 Simon Josefsson <jas@extundo.com> | ||
| 21 | |||
| 22 | * files.el (auto-mode-alist): Map .soa and .zone to dns-mode. | ||
| 23 | |||
| 24 | * textmodes/dns-mode.el: Add. | ||
| 25 | |||
| 26 | 2004-09-13 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 27 | |||
| 28 | * novice.el (disabled-command-hook): Use shorthand for obsolescence. | ||
| 29 | (disabled-command-function): Make the ?\ char more obvious. | ||
| 30 | |||
| 31 | * vc-arch.el (vc-arch-root, vc-arch-registered): | ||
| 32 | * vc-mcvs.el (vc-mcvs-root, vc-mcvs-registered): Use vc-find-root. | ||
| 33 | |||
| 34 | 2004-09-13 Hovav Shacham <hovav@sha1.stanford.edu> | ||
| 35 | |||
| 36 | * windmove.el (windmove-frame-edges): Report coordinates of | ||
| 37 | outside edges of frame, not inside edges. | ||
| 38 | (windmove-coordinates-of-position): Convert into wrapper to new | ||
| 39 | function `windmove-coordinates-of-window-position'; | ||
| 40 | `compute-motion' always applies to selected window. | ||
| 41 | (windmove-coordinates-of-position): Update documentation to refer | ||
| 42 | to Emacs 21 Lisp Reference Manual. | ||
| 43 | (windmove-find-other-window): Fix off-by-one errors for max x,y. | ||
| 44 | |||
| 1 | 2004-09-13 Kim F. Storm <storm@cua.dk> | 45 | 2004-09-13 Kim F. Storm <storm@cua.dk> |
| 2 | 46 | ||
| 3 | * isearch.el (isearch-resume-in-command-history): Rename from | 47 | * isearch.el (isearch-resume-in-command-history): Rename from |
| 4 | isearch-resume-enabled and change default to nil. | 48 | isearch-resume-enabled and change default to nil. |
| 5 | 49 | ||
| 6 | 2004-09-12 Stefan <monnier@iro.umontreal.ca> | 50 | 2004-09-12 Stefan Monnier <monnier@iro.umontreal.ca> |
| 7 | 51 | ||
| 8 | * vc-hooks.el (vc-ignore-dir-regexp): New var. | 52 | * vc-hooks.el (vc-ignore-dir-regexp): New var. |
| 9 | (vc-registered): Use it. | 53 | (vc-registered): Use it. |
| @@ -109,7 +153,7 @@ | |||
| 109 | * desktop.el (desktop-clear-preserve-buffers): | 153 | * desktop.el (desktop-clear-preserve-buffers): |
| 110 | Remove make-obsolete-variable. | 154 | Remove make-obsolete-variable. |
| 111 | 155 | ||
| 112 | 2004-09-08 Stefan <monnier@iro.umontreal.ca> | 156 | 2004-09-08 Stefan Monnier <monnier@iro.umontreal.ca> |
| 113 | 157 | ||
| 114 | * vc-arch.el (vc-arch-state): Fix parsing for `names' method. | 158 | * vc-arch.el (vc-arch-state): Fix parsing for `names' method. |
| 115 | 159 | ||
| @@ -196,7 +240,7 @@ | |||
| 196 | window system if overflow-newline-into-fringe is enabled. | 240 | window system if overflow-newline-into-fringe is enabled. |
| 197 | (term-mode): Don't disable overflow-newline-into-fringe. | 241 | (term-mode): Don't disable overflow-newline-into-fringe. |
| 198 | 242 | ||
| 199 | 2004-09-07 Stefan <monnier@iro.umontreal.ca> | 243 | 2004-09-07 Stefan Monnier <monnier@iro.umontreal.ca> |
| 200 | 244 | ||
| 201 | * term/xterm.el (function-key-map): Add bindings for C- and S- cursor | 245 | * term/xterm.el (function-key-map): Add bindings for C- and S- cursor |
| 202 | motion as seen on my Mac OS X xterms. | 246 | motion as seen on my Mac OS X xterms. |
| @@ -453,8 +497,8 @@ | |||
| 453 | 497 | ||
| 454 | 2004-08-29 Kim F. Storm <storm@cua.dk> | 498 | 2004-08-29 Kim F. Storm <storm@cua.dk> |
| 455 | 499 | ||
| 456 | * emulation/cua-base.el (cua-auto-expand-rectangles): Remove | 500 | * emulation/cua-base.el (cua-auto-expand-rectangles): |
| 457 | automatic rectangle padding feature; replace by non-destructive | 501 | Remove automatic rectangle padding feature; replace by non-destructive |
| 458 | virtual rectangle edges feature. | 502 | virtual rectangle edges feature. |
| 459 | (cua-virtual-rectangle-edges): New defcustom. | 503 | (cua-virtual-rectangle-edges): New defcustom. |
| 460 | (cua-auto-tabify-rectangles): New defcustom. | 504 | (cua-auto-tabify-rectangles): New defcustom. |
| @@ -937,8 +981,8 @@ | |||
| 937 | key-translation-map. | 981 | key-translation-map. |
| 938 | (encoded-kbd-setup-keymap): Setup key-translation-map. | 982 | (encoded-kbd-setup-keymap): Setup key-translation-map. |
| 939 | (saved-key-translation-map): New variable. | 983 | (saved-key-translation-map): New variable. |
| 940 | (encoded-kbd-mode): Save/restore key-translation-map. Adjusted | 984 | (encoded-kbd-mode): Save/restore key-translation-map. |
| 941 | for the change of encoded-kbd-setup-keymap. | 985 | Adjust for the change of encoded-kbd-setup-keymap. |
| 942 | 986 | ||
| 943 | 2004-08-02 Kim F. Storm <storm@cua.dk> | 987 | 2004-08-02 Kim F. Storm <storm@cua.dk> |
| 944 | 988 | ||
| @@ -1101,12 +1145,11 @@ | |||
| 1101 | 1145 | ||
| 1102 | Sync with Tramp 2.0.43. | 1146 | Sync with Tramp 2.0.43. |
| 1103 | 1147 | ||
| 1104 | * net/tramp.el (tramp-handle-verify-visited-file-modtime): Remove | 1148 | * net/tramp.el (tramp-handle-verify-visited-file-modtime): |
| 1105 | outdated comment. | 1149 | Remove outdated comment. |
| 1106 | (tramp-locked, tramp-locker): New variables for implementing a | 1150 | (tramp-locked, tramp-locker): New variables for implementing a |
| 1107 | global lock. | 1151 | global lock. |
| 1108 | (tramp-sh-file-name-handler): Use them to implement the global | 1152 | (tramp-sh-file-name-handler): Use them to implement the global lock. |
| 1109 | lock. | ||
| 1110 | 1153 | ||
| 1111 | 2004-07-13 Michael Albinus <michael.albinus@gmx.de> | 1154 | 2004-07-13 Michael Albinus <michael.albinus@gmx.de> |
| 1112 | 1155 | ||
| @@ -1141,14 +1184,15 @@ | |||
| 1141 | * emacs-lisp/testcover.el: New category "potentially-1valued" for | 1184 | * emacs-lisp/testcover.el: New category "potentially-1valued" for |
| 1142 | functions that are not erroneous if either 1-valued or | 1185 | functions that are not erroneous if either 1-valued or |
| 1143 | multi-valued. Detect functions in this class. | 1186 | multi-valued. Detect functions in this class. |
| 1144 | (testcover-1value-functions, testcover-compose-functions, | 1187 | (testcover-1value-functions, testcover-compose-functions) |
| 1145 | testcover-progn-functions) Added some additional functions to lists. | 1188 | (testcover-progn-functions) Added some additional functions to lists. |
| 1146 | (testcover-mark): Bugfix when marking up the definition for an | 1189 | (testcover-mark): Bugfix when marking up the definition for an |
| 1147 | empty function. | 1190 | empty function. |
| 1148 | 1191 | ||
| 1149 | 2004-07-17 Richard M. Stallman <rms@gnu.org> | 1192 | 2004-07-17 Richard M. Stallman <rms@gnu.org> |
| 1150 | 1193 | ||
| 1151 | * replace.el (occur-read-primary-args): Pass default to read-from-minibuffer. | 1194 | * replace.el (occur-read-primary-args): Pass default to |
| 1195 | read-from-minibuffer. | ||
| 1152 | 1196 | ||
| 1153 | * mail/footnote.el (footnote-section-tag): Use defcustom. | 1197 | * mail/footnote.el (footnote-section-tag): Use defcustom. |
| 1154 | 1198 | ||
| @@ -1257,8 +1301,8 @@ | |||
| 1257 | 1301 | ||
| 1258 | 2004-07-09 John Paul Wallington <jpw@gnu.org> | 1302 | 2004-07-09 John Paul Wallington <jpw@gnu.org> |
| 1259 | 1303 | ||
| 1260 | * emacs-lisp/re-builder.el (reb-update-overlays): Distinguish | 1304 | * emacs-lisp/re-builder.el (reb-update-overlays): |
| 1261 | between one and several matches in message. | 1305 | Distinguish between one and several matches in message. |
| 1262 | 1306 | ||
| 1263 | 2004-07-09 Richard M. Stallman <rms@gnu.org> | 1307 | 2004-07-09 Richard M. Stallman <rms@gnu.org> |
| 1264 | 1308 | ||
| @@ -1296,11 +1340,11 @@ | |||
| 1296 | Do not treat double clicks and triple clicks specially in the | 1340 | Do not treat double clicks and triple clicks specially in the |
| 1297 | scroll bar (preventing strange repositioning problems) | 1341 | scroll bar (preventing strange repositioning problems) |
| 1298 | 1342 | ||
| 1299 | 2004-07-06 Stefan <monnier@iro.umontreal.ca> | 1343 | 2004-07-06 Stefan Monnier <monnier@iro.umontreal.ca> |
| 1300 | 1344 | ||
| 1301 | * replace.el (query-replace-regexp-eval): Fix last change. | 1345 | * replace.el (query-replace-regexp-eval): Fix last change. |
| 1302 | 1346 | ||
| 1303 | 2004-07-05 Stefan <monnier@iro.umontreal.ca> | 1347 | 2004-07-05 Stefan Monnier <monnier@iro.umontreal.ca> |
| 1304 | 1348 | ||
| 1305 | * replace.el (query-replace-descr): New fun. | 1349 | * replace.el (query-replace-descr): New fun. |
| 1306 | (query-replace-read-from, query-replace-read-args): Default to the | 1350 | (query-replace-read-from, query-replace-read-args): Default to the |
diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el index 5fd77fe625f..b3c5a4cff64 100644 --- a/lisp/calc/calc-embed.el +++ b/lisp/calc/calc-embed.el | |||
| @@ -557,7 +557,7 @@ The command \\[yank] can retrieve it from there." | |||
| 557 | (not (eq (cdr found) 'default))) | 557 | (not (eq (cdr found) 'default))) |
| 558 | (progn | 558 | (progn |
| 559 | (if (eq (setq value (cdr (car v))) 'default) | 559 | (if (eq (setq value (cdr (car v))) 'default) |
| 560 | (setq value (cdr (assq (car (car v)) calc-mode-var-list)))) | 560 | (setq value (list (nth 1 (assq (car (car v)) calc-mode-var-list))))) |
| 561 | (equal (symbol-value (car (car v))) value)) | 561 | (equal (symbol-value (car (car v))) value)) |
| 562 | (progn | 562 | (progn |
| 563 | (setq changed t) | 563 | (setq changed t) |
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 782275c9b07..d3e00a7a5a1 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el | |||
| @@ -3,8 +3,7 @@ | |||
| 3 | ;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: David Gillespie <daveg@synaptics.com> | 5 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 6 | ;; Maintainers: D. Goel <deego@gnufans.org> | 6 | ;; Maintainer: Jay Belanger <belanger@truman.edu> |
| 7 | ;; Colin Walters <walters@debian.org> | ||
| 8 | ;; Keywords: convenience, extensions | 7 | ;; Keywords: convenience, extensions |
| 9 | ;; Version: 2.02g | 8 | ;; Version: 2.02g |
| 10 | 9 | ||
| @@ -237,7 +236,7 @@ This can safely be nil as long as the Calc files are on the load-path.") | |||
| 237 | (defvar calc-gnuplot-print-command "lp %s" | 236 | (defvar calc-gnuplot-print-command "lp %s" |
| 238 | "*Name of command for printing GNUPLOT output; %s = file name to print.") | 237 | "*Name of command for printing GNUPLOT output; %s = file name to print.") |
| 239 | 238 | ||
| 240 | (defvar calc-bug-address "deego@gnufans.org" | 239 | (defvar calc-bug-address "belanger@truman.edu" |
| 241 | "Address of the author of Calc, for use by `report-calc-bug'.") | 240 | "Address of the author of Calc, for use by `report-calc-bug'.") |
| 242 | 241 | ||
| 243 | (defvar calc-scan-for-dels t | 242 | (defvar calc-scan-for-dels t |
| @@ -257,60 +256,145 @@ Entries are 3-lists: Formula, Height (in lines), Selection (or nil).") | |||
| 257 | "Index into `calc-stack' of \"top\" of stack. | 256 | "Index into `calc-stack' of \"top\" of stack. |
| 258 | This is 1 unless `calc-truncate-stack' has been used.") | 257 | This is 1 unless `calc-truncate-stack' has been used.") |
| 259 | 258 | ||
| 260 | (defvar calc-always-load-extensions nil | 259 | (defvar calc-display-sci-high 0 |
| 261 | "If non-nil, load the calc-ext module automatically when calc is loaded.") | 260 | "Floating-point numbers with this positive exponent or higher above the |
| 261 | current precision are displayed in scientific notation in calc-mode.") | ||
| 262 | |||
| 263 | (defvar calc-display-sci-low -3 | ||
| 264 | "Floating-point numbers with this negative exponent or lower are displayed | ||
| 265 | scientific notation in calc-mode.") | ||
| 266 | |||
| 267 | (defvar calc-other-modes nil | ||
| 268 | "List of used-defined strings to append to Calculator mode line.") | ||
| 262 | 269 | ||
| 263 | (defvar calc-line-numbering t | 270 | (defvar calc-Y-help-msgs nil |
| 264 | "If non-nil, display line numbers in Calculator stack.") | 271 | "List of strings for Y prefix help.") |
| 265 | 272 | ||
| 266 | (defvar calc-line-breaking t | 273 | (defvar calc-loaded-settings-file nil |
| 267 | "If non-nil, break long values across multiple lines in Calculator stack.") | 274 | "t if `calc-settings-file' has been loaded yet.") |
| 268 | 275 | ||
| 269 | (defvar calc-display-just nil | 276 | (defvar calc-always-load-extensions) |
| 270 | "If nil, stack display is left-justified. | 277 | (defvar calc-line-numbering) |
| 278 | (defvar calc-line-breaking) | ||
| 279 | (defvar calc-display-just) | ||
| 280 | (defvar calc-display-origin) | ||
| 281 | (defvar calc-number-radix) | ||
| 282 | (defvar calc-leading-zeros) | ||
| 283 | (defvar calc-group-digits) | ||
| 284 | (defvar calc-group-char) | ||
| 285 | (defvar calc-point-char) | ||
| 286 | (defvar calc-frac-format) | ||
| 287 | (defvar calc-prefer-frac) | ||
| 288 | (defvar calc-hms-format) | ||
| 289 | (defvar calc-date-format) | ||
| 290 | (defvar calc-float-format) | ||
| 291 | (defvar calc-full-float-format) | ||
| 292 | (defvar calc-complex-format) | ||
| 293 | (defvar calc-complex-mode) | ||
| 294 | (defvar calc-infinite-mode) | ||
| 295 | (defvar calc-display-strings) | ||
| 296 | (defvar calc-matrix-just) | ||
| 297 | (defvar calc-break-vectors) | ||
| 298 | (defvar calc-full-vectors) | ||
| 299 | (defvar calc-full-trail-vectors) | ||
| 300 | (defvar calc-vector-commas) | ||
| 301 | (defvar calc-vector-brackets) | ||
| 302 | (defvar calc-matrix-brackets) | ||
| 303 | (defvar calc-language) | ||
| 304 | (defvar calc-language-option) | ||
| 305 | (defvar calc-left-label) | ||
| 306 | (defvar calc-right-label) | ||
| 307 | (defvar calc-word-size) | ||
| 308 | (defvar calc-previous-modulo) | ||
| 309 | (defvar calc-simplify-mode) | ||
| 310 | (defvar calc-auto-recompute) | ||
| 311 | (defvar calc-display-raw) | ||
| 312 | (defvar calc-internal-prec) | ||
| 313 | (defvar calc-angle-mode) | ||
| 314 | (defvar calc-algebraic-mode) | ||
| 315 | (defvar calc-incomplete-algebraic-mode) | ||
| 316 | (defvar calc-symbolic-mode) | ||
| 317 | (defvar calc-matrix-mode) | ||
| 318 | (defvar calc-shift-prefix) | ||
| 319 | (defvar calc-window-height) | ||
| 320 | (defvar calc-display-trail) | ||
| 321 | (defvar calc-show-selections) | ||
| 322 | (defvar calc-use-selections) | ||
| 323 | (defvar calc-assoc-selections) | ||
| 324 | (defvar calc-display-working-message) | ||
| 325 | (defvar calc-auto-why) | ||
| 326 | (defvar calc-timing) | ||
| 327 | (defvar calc-mode-save-mode) | ||
| 328 | (defvar calc-standard-date-formats) | ||
| 329 | (defvar calc-autorange-units) | ||
| 330 | (defvar calc-was-keypad-mode) | ||
| 331 | (defvar calc-full-mode) | ||
| 332 | (defvar calc-user-parse-tables) | ||
| 333 | (defvar calc-gnuplot-default-device) | ||
| 334 | (defvar calc-gnuplot-default-output) | ||
| 335 | (defvar calc-gnuplot-print-device) | ||
| 336 | (defvar calc-gnuplot-print-output) | ||
| 337 | (defvar calc-gnuplot-geometry) | ||
| 338 | (defvar calc-graph-default-resolution) | ||
| 339 | (defvar calc-graph-default-resolution-3d) | ||
| 340 | (defvar calc-invocation-macro) | ||
| 341 | (defvar calc-show-banner) | ||
| 342 | |||
| 343 | (defconst calc-mode-var-list '( | ||
| 344 | (calc-always-load-extensions nil | ||
| 345 | "If non-nil, load the calc-ext module automatically when calc is loaded.") | ||
| 346 | |||
| 347 | (calc-line-numbering t | ||
| 348 | "If non-nil, display line numbers in Calculator stack.") | ||
| 349 | |||
| 350 | (calc-line-breaking t | ||
| 351 | "If non-nil, break long values across multiple lines in Calculator stack.") | ||
| 352 | |||
| 353 | (calc-display-just nil | ||
| 354 | "If nil, stack display is left-justified. | ||
| 271 | If `right', stack display is right-justified. | 355 | If `right', stack display is right-justified. |
| 272 | If `center', stack display is centered.") | 356 | If `center', stack display is centered.") |
| 273 | 357 | ||
| 274 | (defvar calc-display-origin nil | 358 | (calc-display-origin nil |
| 275 | "Horizontal origin of displayed stack entries. | 359 | "Horizontal origin of displayed stack entries. |
| 276 | In left-justified mode, this is effectively indentation. (Default 0). | 360 | In left-justified mode, this is effectively indentation. (Default 0). |
| 277 | In right-justified mode, this is effectively window width. | 361 | In right-justified mode, this is effectively window width. |
| 278 | In centered mode, center of stack entry is placed here.") | 362 | In centered mode, center of stack entry is placed here.") |
| 279 | 363 | ||
| 280 | (defvar calc-number-radix 10 | 364 | (calc-number-radix 10 |
| 281 | "Radix for entry and display of numbers in calc-mode, 2-36.") | 365 | "Radix for entry and display of numbers in calc-mode, 2-36.") |
| 282 | 366 | ||
| 283 | (defvar calc-leading-zeros nil | 367 | (calc-leading-zeros nil |
| 284 | "If non-nil, leading zeros are provided to pad integers to calc-word-size.") | 368 | "If non-nil, leading zeros are provided to pad integers to calc-word-size.") |
| 285 | 369 | ||
| 286 | (defvar calc-group-digits nil | 370 | (calc-group-digits nil |
| 287 | "If non-nil, group digits in large displayed integers by inserting spaces. | 371 | "If non-nil, group digits in large displayed integers by inserting spaces. |
| 288 | If an integer, group that many digits at a time. | 372 | If an integer, group that many digits at a time. |
| 289 | If t, use 4 for binary and hex, 3 otherwise.") | 373 | If t, use 4 for binary and hex, 3 otherwise.") |
| 290 | 374 | ||
| 291 | (defvar calc-group-char "," | 375 | (calc-group-char "," |
| 292 | "The character (in the form of a string) to be used for grouping digits. | 376 | "The character (in the form of a string) to be used for grouping digits. |
| 293 | This is used only when calc-group-digits mode is on.") | 377 | This is used only when calc-group-digits mode is on.") |
| 294 | 378 | ||
| 295 | (defvar calc-point-char "." | 379 | (calc-point-char "." |
| 296 | "The character (in the form of a string) to be used as a decimal point.") | 380 | "The character (in the form of a string) to be used as a decimal point.") |
| 381 | |||
| 382 | (calc-frac-format (":" nil) | ||
| 383 | "Format of displayed fractions; a string of one or two of \":\" or \"/\".") | ||
| 297 | 384 | ||
| 298 | (defvar calc-frac-format '(":" nil) | 385 | (calc-prefer-frac nil |
| 299 | "Format of displayed fractions; a string of one or two of \":\" or \"/\".") | 386 | "If non-nil, prefer fractional over floating-point results.") |
| 300 | 387 | ||
| 301 | (defvar calc-prefer-frac nil | 388 | (calc-hms-format "%s@ %s' %s\"" |
| 302 | "If non-nil, prefer fractional over floating-point results.") | 389 | "Format of displayed hours-minutes-seconds angles, a format string. |
| 303 | |||
| 304 | (defvar calc-hms-format "%s@ %s' %s\"" | ||
| 305 | "Format of displayed hours-minutes-seconds angles, a format string. | ||
| 306 | String must contain three %s marks for hours, minutes, seconds respectively.") | 390 | String must contain three %s marks for hours, minutes, seconds respectively.") |
| 307 | 391 | ||
| 308 | (defvar calc-date-format '((H ":" mm C SS pp " ") | 392 | (calc-date-format ((H ":" mm C SS pp " ") |
| 309 | Www " " Mmm " " D ", " YYYY) | 393 | Www " " Mmm " " D ", " YYYY) |
| 310 | "Format of displayed date forms.") | 394 | "Format of displayed date forms.") |
| 311 | 395 | ||
| 312 | (defvar calc-float-format '(float 0) | 396 | (calc-float-format (float 0) |
| 313 | "Format to use for display of floating-point numbers in calc-mode. | 397 | "Format to use for display of floating-point numbers in calc-mode. |
| 314 | Must be a list of one of the following forms: | 398 | Must be a list of one of the following forms: |
| 315 | (float 0) Floating point format, display full precision. | 399 | (float 0) Floating point format, display full precision. |
| 316 | (float N) N > 0: Floating point format, at most N significant figures. | 400 | (float N) N > 0: Floating point format, at most N significant figures. |
| @@ -323,54 +407,54 @@ Must be a list of one of the following forms: | |||
| 323 | (eng N) N > 0: Engineering notation, N significant figures. | 407 | (eng N) N > 0: Engineering notation, N significant figures. |
| 324 | (eng -N) -N < 0: Engineering notation, calc-internal-prec - N figs.") | 408 | (eng -N) -N < 0: Engineering notation, calc-internal-prec - N figs.") |
| 325 | 409 | ||
| 326 | (defvar calc-full-float-format '(float 0) | 410 | (calc-full-float-format (float 0) |
| 327 | "Format to use when full precision must be displayed.") | 411 | "Format to use when full precision must be displayed.") |
| 328 | 412 | ||
| 329 | (defvar calc-complex-format nil | 413 | (calc-complex-format nil |
| 330 | "Format to use for display of complex numbers in calc-mode. Must be one of: | 414 | "Format to use for display of complex numbers in calc-mode. Must be one of: |
| 331 | nil Use (x, y) form. | 415 | nil Use (x, y) form. |
| 332 | i Use x + yi form. | 416 | i Use x + yi form. |
| 333 | j Use x + yj form.") | 417 | j Use x + yj form.") |
| 334 | 418 | ||
| 335 | (defvar calc-complex-mode 'cplx | 419 | (calc-complex-mode cplx |
| 336 | "Preferred form, either `cplx' or `polar', for complex numbers.") | 420 | "Preferred form, either `cplx' or `polar', for complex numbers.") |
| 337 | 421 | ||
| 338 | (defvar calc-infinite-mode nil | 422 | (calc-infinite-mode nil |
| 339 | "If nil, 1 / 0 is left unsimplified. | 423 | "If nil, 1 / 0 is left unsimplified. |
| 340 | If 0, 1 / 0 is changed to inf (zeros are considered positive). | 424 | If 0, 1 / 0 is changed to inf (zeros are considered positive). |
| 341 | Otherwise, 1 / 0 is changed to uinf (undirected infinity).") | 425 | Otherwise, 1 / 0 is changed to uinf (undirected infinity).") |
| 342 | 426 | ||
| 343 | (defvar calc-display-strings nil | 427 | (calc-display-strings nil |
| 344 | "If non-nil, display vectors of byte-sized integers as strings.") | 428 | "If non-nil, display vectors of byte-sized integers as strings.") |
| 345 | 429 | ||
| 346 | (defvar calc-matrix-just 'center | 430 | (calc-matrix-just 'center |
| 347 | "If nil, vector elements are left-justified. | 431 | "If nil, vector elements are left-justified. |
| 348 | If `right', vector elements are right-justified. | 432 | If `right', vector elements are right-justified. |
| 349 | If `center', vector elements are centered.") | 433 | If `center', vector elements are centered.") |
| 350 | 434 | ||
| 351 | (defvar calc-break-vectors nil | 435 | (calc-break-vectors nil |
| 352 | "If non-nil, display vectors one element per line.") | 436 | "If non-nil, display vectors one element per line.") |
| 353 | 437 | ||
| 354 | (defvar calc-full-vectors t | 438 | (calc-full-vectors t |
| 355 | "If non-nil, display long vectors in full. If nil, use abbreviated form.") | 439 | "If non-nil, display long vectors in full. If nil, use abbreviated form.") |
| 356 | 440 | ||
| 357 | (defvar calc-full-trail-vectors t | 441 | (calc-full-trail-vectors t |
| 358 | "If non-nil, display long vectors in full in the trail.") | 442 | "If non-nil, display long vectors in full in the trail.") |
| 359 | 443 | ||
| 360 | (defvar calc-vector-commas "," | 444 | (calc-vector-commas "," |
| 361 | "If non-nil, separate elements of displayed vectors with this string.") | 445 | "If non-nil, separate elements of displayed vectors with this string.") |
| 362 | 446 | ||
| 363 | (defvar calc-vector-brackets "[]" | 447 | (calc-vector-brackets "[]" |
| 364 | "If non-nil, surround displayed vectors with these characters.") | 448 | "If non-nil, surround displayed vectors with these characters.") |
| 365 | 449 | ||
| 366 | (defvar calc-matrix-brackets '(R O) | 450 | (calc-matrix-brackets '(R O) |
| 367 | "A list of code-letter symbols that control \"big\" matrix display. | 451 | "A list of code-letter symbols that control \"big\" matrix display. |
| 368 | If `R' is present, display inner brackets for matrices. | 452 | If `R' is present, display inner brackets for matrices. |
| 369 | If `O' is present, display outer brackets for matrices (above/below). | 453 | If `O' is present, display outer brackets for matrices (above/below). |
| 370 | If `C' is present, display outer brackets for matrices (centered).") | 454 | If `C' is present, display outer brackets for matrices (centered).") |
| 371 | 455 | ||
| 372 | (defvar calc-language nil | 456 | (calc-language nil |
| 373 | "Language or format for entry and display of stack values. Must be one of: | 457 | "Language or format for entry and display of stack values. Must be one of: |
| 374 | nil Use standard Calc notation. | 458 | nil Use standard Calc notation. |
| 375 | flat Use standard Calc notation, one-line format. | 459 | flat Use standard Calc notation, one-line format. |
| 376 | big Display formulas in 2-d notation (enter w/std notation). | 460 | big Display formulas in 2-d notation (enter w/std notation). |
| @@ -383,38 +467,23 @@ If `C' is present, display outer brackets for matrices (centered).") | |||
| 383 | math Use Mathematica(tm) notation. | 467 | math Use Mathematica(tm) notation. |
| 384 | maple Use Maple notation.") | 468 | maple Use Maple notation.") |
| 385 | 469 | ||
| 386 | (defvar calc-language-option nil | 470 | (calc-language-option nil |
| 387 | "Numeric prefix argument for the command that set `calc-language'.") | 471 | "Numeric prefix argument for the command that set `calc-language'.") |
| 388 | |||
| 389 | (defvar calc-function-open "(" | ||
| 390 | "Open-parenthesis string for function call notation.") | ||
| 391 | |||
| 392 | (defvar calc-function-close ")" | ||
| 393 | "Close-parenthesis string for function call notation.") | ||
| 394 | |||
| 395 | (defvar calc-language-output-filter nil | ||
| 396 | "Function through which to pass strings after formatting.") | ||
| 397 | |||
| 398 | (defvar calc-language-input-filter nil | ||
| 399 | "Function through which to pass strings before parsing.") | ||
| 400 | |||
| 401 | (defvar calc-radix-formatter nil | ||
| 402 | "Formatting function used for non-decimal numbers.") | ||
| 403 | 472 | ||
| 404 | (defvar calc-left-label "" | 473 | (calc-left-label "" |
| 405 | "Label to display at left of formula.") | 474 | "Label to display at left of formula.") |
| 406 | 475 | ||
| 407 | (defvar calc-right-label "" | 476 | (calc-right-label "" |
| 408 | "Label to display at right of formula.") | 477 | "Label to display at right of formula.") |
| 409 | 478 | ||
| 410 | (defvar calc-word-size 32 | 479 | (calc-word-size 32 |
| 411 | "Minimum number of bits per word, if any, for binary operations in calc-mode.") | 480 | "Minimum number of bits per word, if any, for binary operations in calc-mode.") |
| 412 | 481 | ||
| 413 | (defvar calc-previous-modulo nil | 482 | (calc-previous-modulo nil |
| 414 | "Most recently used value of M in a modulo form.") | 483 | "Most recently used value of M in a modulo form.") |
| 415 | 484 | ||
| 416 | (defvar calc-simplify-mode nil | 485 | (calc-simplify-mode nil |
| 417 | "Type of simplification applied to results. | 486 | "Type of simplification applied to results. |
| 418 | If `none', results are not simplified when pushed on the stack. | 487 | If `none', results are not simplified when pushed on the stack. |
| 419 | If `num', functions are simplified only when args are constant. | 488 | If `num', functions are simplified only when args are constant. |
| 420 | If nil, only fast simplifications are applied. | 489 | If nil, only fast simplifications are applied. |
| @@ -423,119 +492,112 @@ If `alg', `math-simplify' is applied. | |||
| 423 | If `ext', `math-simplify-extended' is applied. | 492 | If `ext', `math-simplify-extended' is applied. |
| 424 | If `units', `math-simplify-units' is applied.") | 493 | If `units', `math-simplify-units' is applied.") |
| 425 | 494 | ||
| 426 | (defvar calc-auto-recompute t | 495 | (calc-auto-recompute t |
| 427 | "If non-nil, recompute evalto's automatically when necessary.") | 496 | "If non-nil, recompute evalto's automatically when necessary.") |
| 428 | 497 | ||
| 429 | (defvar calc-display-raw nil | 498 | (calc-display-raw nil |
| 430 | "If non-nil, display shows unformatted Lisp exprs. (For debugging)") | 499 | "If non-nil, display shows unformatted Lisp exprs. (For debugging)") |
| 431 | 500 | ||
| 432 | (defvar calc-internal-prec 12 | 501 | (calc-internal-prec 12 |
| 433 | "Number of digits of internal precision for calc-mode calculations.") | 502 | "Number of digits of internal precision for calc-mode calculations.") |
| 434 | |||
| 435 | (defvar calc-inverse-flag nil | ||
| 436 | "If non-nil, next operation is Inverse.") | ||
| 437 | |||
| 438 | (defvar calc-hyperbolic-flag nil | ||
| 439 | "If non-nil, next operation is Hyperbolic.") | ||
| 440 | 503 | ||
| 441 | (defvar calc-keep-args-flag nil | 504 | (calc-angle-mode deg |
| 442 | "If non-nil, next operation should not remove its arguments from stack.") | 505 | "If deg, angles are in degrees; if rad, angles are in radians. |
| 443 | |||
| 444 | (defvar calc-angle-mode 'deg | ||
| 445 | "If deg, angles are in degrees; if rad, angles are in radians. | ||
| 446 | If hms, angles are in degrees-minutes-seconds.") | 506 | If hms, angles are in degrees-minutes-seconds.") |
| 447 | 507 | ||
| 448 | (defvar calc-algebraic-mode nil | 508 | (calc-algebraic-mode nil |
| 449 | "If non-nil, numeric entry accepts whole algebraic expressions. | 509 | "If non-nil, numeric entry accepts whole algebraic expressions. |
| 450 | If nil, algebraic expressions must be preceded by \"'\".") | 510 | If nil, algebraic expressions must be preceded by \"'\".") |
| 451 | 511 | ||
| 452 | (defvar calc-incomplete-algebraic-mode nil | 512 | (calc-incomplete-algebraic-mode nil |
| 453 | "Like calc-algebraic-mode except only affects ( and [ keys.") | 513 | "Like calc-algebraic-mode except only affects ( and [ keys.") |
| 454 | 514 | ||
| 455 | (defvar calc-symbolic-mode nil | 515 | (calc-symbolic-mode nil |
| 456 | "If non-nil, inexact numeric computations like sqrt(2) are postponed. | 516 | "If non-nil, inexact numeric computations like sqrt(2) are postponed. |
| 457 | If nil, computations on numbers always yield numbers where possible.") | 517 | If nil, computations on numbers always yield numbers where possible.") |
| 458 | 518 | ||
| 459 | (defvar calc-matrix-mode nil | 519 | (calc-matrix-mode nil |
| 460 | "If `matrix', variables are assumed to be matrix-valued. | 520 | "If `matrix', variables are assumed to be matrix-valued. |
| 461 | If a number, variables are assumed to be NxN matrices. | 521 | If a number, variables are assumed to be NxN matrices. |
| 462 | If `scalar', variables are assumed to be scalar-valued. | 522 | If `scalar', variables are assumed to be scalar-valued. |
| 463 | If nil, symbolic math routines make no assumptions about variables.") | 523 | If nil, symbolic math routines make no assumptions about variables.") |
| 464 | 524 | ||
| 465 | (defvar calc-shift-prefix nil | 525 | (calc-shift-prefix nil |
| 466 | "If non-nil, shifted letter keys are prefix keys rather than normal meanings.") | 526 | "If non-nil, shifted letter keys are prefix keys rather than normal meanings.") |
| 467 | 527 | ||
| 468 | (defvar calc-window-height 7 | 528 | (calc-window-height 7 |
| 469 | "Initial height of Calculator window.") | 529 | "Initial height of Calculator window.") |
| 470 | 530 | ||
| 471 | (defvar calc-display-trail t | 531 | (calc-display-trail t |
| 472 | "If non-nil, M-x calc creates a window to display Calculator trail.") | 532 | "If non-nil, M-x calc creates a window to display Calculator trail.") |
| 473 | 533 | ||
| 474 | (defvar calc-show-selections t | 534 | (calc-show-selections t |
| 475 | "If non-nil, selected sub-formulas are shown by obscuring rest of formula. | 535 | "If non-nil, selected sub-formulas are shown by obscuring rest of formula. |
| 476 | If nil, selected sub-formulas are highlighted by obscuring the sub-formulas.") | 536 | If nil, selected sub-formulas are highlighted by obscuring the sub-formulas.") |
| 477 | 537 | ||
| 478 | (defvar calc-use-selections t | 538 | (calc-use-selections t |
| 479 | "If non-nil, commands operate only on selected portions of formulas. | 539 | "If non-nil, commands operate only on selected portions of formulas. |
| 480 | If nil, selections displayed but ignored.") | 540 | If nil, selections displayed but ignored.") |
| 481 | 541 | ||
| 482 | (defvar calc-assoc-selections t | 542 | (calc-assoc-selections t |
| 483 | "If non-nil, selection hides deep structure of associative formulas.") | 543 | "If non-nil, selection hides deep structure of associative formulas.") |
| 484 | 544 | ||
| 485 | (defvar calc-display-working-message 'lots | 545 | (calc-display-working-message 'lots |
| 486 | "If non-nil, display \"Working...\" for potentially slow Calculator commands.") | 546 | "If non-nil, display \"Working...\" for potentially slow Calculator commands.") |
| 487 | 547 | ||
| 488 | (defvar calc-auto-why 'maybe | 548 | (calc-auto-why 'maybe |
| 489 | "If non-nil, automatically execute a \"why\" command to explain odd results.") | 549 | "If non-nil, automatically execute a \"why\" command to explain odd results.") |
| 490 | 550 | ||
| 491 | (defvar calc-timing nil | 551 | (calc-timing nil |
| 492 | "If non-nil, display timing information on each slow command.") | 552 | "If non-nil, display timing information on each slow command.") |
| 493 | 553 | ||
| 494 | (defvar calc-display-sci-high 0 | 554 | (calc-mode-save-mode local) |
| 495 | "Floating-point numbers with this positive exponent or higher above the | ||
| 496 | current precision are displayed in scientific notation in calc-mode.") | ||
| 497 | 555 | ||
| 498 | (defvar calc-display-sci-low -3 | 556 | (calc-standard-date-formats |
| 499 | "Floating-point numbers with this negative exponent or lower are displayed | 557 | '("N" |
| 500 | scientific notation in calc-mode.") | 558 | "<H:mm:SSpp >Www Mmm D, YYYY" |
| 559 | "D Mmm YYYY<, h:mm:SS>" | ||
| 560 | "Www Mmm BD< hh:mm:ss> YYYY" | ||
| 561 | "M/D/Y< H:mm:SSpp>" | ||
| 562 | "D.M.Y< h:mm:SS>" | ||
| 563 | "M-D-Y< H:mm:SSpp>" | ||
| 564 | "D-M-Y< h:mm:SS>" | ||
| 565 | "j<, h:mm:SS>" | ||
| 566 | "YYddd< hh:mm:ss>")) | ||
| 501 | 567 | ||
| 568 | (calc-autorange-units nil) | ||
| 569 | |||
| 570 | (calc-was-keypad-mode nil) | ||
| 571 | |||
| 572 | (calc-full-mode nil) | ||
| 502 | 573 | ||
| 503 | (defvar calc-other-modes nil | 574 | (calc-user-parse-tables nil) |
| 504 | "List of used-defined strings to append to Calculator mode line.") | ||
| 505 | 575 | ||
| 506 | (defvar calc-Y-help-msgs nil | 576 | (calc-gnuplot-default-device "default") |
| 507 | "List of strings for Y prefix help.") | ||
| 508 | 577 | ||
| 509 | (defvar calc-loaded-settings-file nil | 578 | (calc-gnuplot-default-output "STDOUT") |
| 510 | "t if `calc-settings-file' has been loaded yet.") | 579 | |
| 580 | (calc-gnuplot-print-device "postscript") | ||
| 581 | |||
| 582 | (calc-gnuplot-print-output "auto") | ||
| 583 | |||
| 584 | (calc-gnuplot-geometry nil) | ||
| 585 | |||
| 586 | (calc-graph-default-resolution 15) | ||
| 511 | 587 | ||
| 588 | (calc-graph-default-resolution-3d 5) | ||
| 589 | |||
| 590 | (calc-invocation-macro nil) | ||
| 512 | 591 | ||
| 592 | (calc-show-banner t)) | ||
| 593 | "List of variables (and default values) used in customizing GNU Calc.") | ||
| 513 | 594 | ||
| 514 | (defvar calc-mode-save-mode 'local) | 595 | (mapcar (function (lambda (v) |
| 515 | (defvar calc-standard-date-formats | 596 | (or (boundp (car v)) |
| 516 | '("N" | 597 | (set (car v) (nth 1 v))) |
| 517 | "<H:mm:SSpp >Www Mmm D, YYYY" | 598 | (if (nth 2 v) |
| 518 | "D Mmm YYYY<, h:mm:SS>" | 599 | (put (car v) 'variable-documentation (nth 2 v))))) |
| 519 | "Www Mmm BD< hh:mm:ss> YYYY" | 600 | calc-mode-var-list) |
| 520 | "M/D/Y< H:mm:SSpp>" | ||
| 521 | "D.M.Y< h:mm:SS>" | ||
| 522 | "M-D-Y< H:mm:SSpp>" | ||
| 523 | "D-M-Y< h:mm:SS>" | ||
| 524 | "j<, h:mm:SS>" | ||
| 525 | "YYddd< hh:mm:ss>")) | ||
| 526 | (defvar calc-autorange-units nil) | ||
| 527 | (defvar calc-was-keypad-mode nil) | ||
| 528 | (defvar calc-full-mode nil) | ||
| 529 | (defvar calc-user-parse-tables nil) | ||
| 530 | (defvar calc-gnuplot-default-device "default") | ||
| 531 | (defvar calc-gnuplot-default-output "STDOUT") | ||
| 532 | (defvar calc-gnuplot-print-device "postscript") | ||
| 533 | (defvar calc-gnuplot-print-output "auto") | ||
| 534 | (defvar calc-gnuplot-geometry nil) | ||
| 535 | (defvar calc-graph-default-resolution 15) | ||
| 536 | (defvar calc-graph-default-resolution-3d 5) | ||
| 537 | (defvar calc-invocation-macro nil) | ||
| 538 | (defvar calc-show-banner t) | ||
| 539 | 601 | ||
| 540 | (defconst calc-local-var-list '(calc-stack | 602 | (defconst calc-local-var-list '(calc-stack |
| 541 | calc-stack-top | 603 | calc-stack-top |
| @@ -666,9 +728,23 @@ scientific notation in calc-mode.") | |||
| 666 | (defvar calc-trail-buffer nil) ; Pointer to Calc Trail buffer. | 728 | (defvar calc-trail-buffer nil) ; Pointer to Calc Trail buffer. |
| 667 | (defvar calc-why nil) ; Explanations of most recent errors. | 729 | (defvar calc-why nil) ; Explanations of most recent errors. |
| 668 | (defvar calc-next-why nil) | 730 | (defvar calc-next-why nil) |
| 669 | (defvar calc-inverse-flag nil) | 731 | (defvar calc-inverse-flag nil |
| 670 | (defvar calc-hyperbolic-flag nil) | 732 | "If non-nil, next operation is Inverse.") |
| 671 | (defvar calc-keep-args-flag nil) | 733 | (defvar calc-hyperbolic-flag nil |
| 734 | "If non-nil, next operation is Hyperbolic.") | ||
| 735 | (defvar calc-keep-args-flag nil | ||
| 736 | "If non-nil, next operation should not remove its arguments from stack.") | ||
| 737 | (defvar calc-function-open "(" | ||
| 738 | "Open-parenthesis string for function call notation.") | ||
| 739 | (defvar calc-function-close ")" | ||
| 740 | "Close-parenthesis string for function call notation.") | ||
| 741 | (defvar calc-language-output-filter nil | ||
| 742 | "Function through which to pass strings after formatting.") | ||
| 743 | (defvar calc-language-input-filter nil | ||
| 744 | "Function through which to pass strings before parsing.") | ||
| 745 | (defvar calc-radix-formatter nil | ||
| 746 | "Formatting function used for non-decimal numbers.") | ||
| 747 | |||
| 672 | (defvar calc-last-kill nil) ; Last number killed in calc-mode. | 748 | (defvar calc-last-kill nil) ; Last number killed in calc-mode. |
| 673 | (defvar calc-previous-alg-entry nil) ; Previous algebraic entry. | 749 | (defvar calc-previous-alg-entry nil) ; Previous algebraic entry. |
| 674 | (defvar calc-dollar-values nil) ; Values to be used for '$'. | 750 | (defvar calc-dollar-values nil) ; Values to be used for '$'. |
| @@ -982,7 +1058,7 @@ Notations: 3.14e6 3.14 * 10^6 | |||
| 982 | (setq calc-stack-top (- (length calc-stack) calc-stack-top -1)) | 1058 | (setq calc-stack-top (- (length calc-stack) calc-stack-top -1)) |
| 983 | (or calc-loaded-settings-file | 1059 | (or calc-loaded-settings-file |
| 984 | (null calc-settings-file) | 1060 | (null calc-settings-file) |
| 985 | (string-match "\\.emacs" calc-settings-file) | 1061 | (equal calc-settings-file user-init-file) |
| 986 | (progn | 1062 | (progn |
| 987 | (setq calc-loaded-settings-file t) | 1063 | (setq calc-loaded-settings-file t) |
| 988 | (load calc-settings-file t))) ; t = missing-ok | 1064 | (load calc-settings-file t))) ; t = missing-ok |
diff --git a/lisp/faces.el b/lisp/faces.el index 15e0f2549a8..d7a088da46c 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -1954,11 +1954,13 @@ created." | |||
| 1954 | 1954 | ||
| 1955 | 1955 | ||
| 1956 | (defface cursor '() | 1956 | (defface cursor '() |
| 1957 | "Basic face for the cursor color under X." | 1957 | "Basic face for the cursor color under X. |
| 1958 | Note: Other faces cannot inherit from the cursor face." | ||
| 1958 | :version "21.1" | 1959 | :version "21.1" |
| 1959 | :group 'cursor | 1960 | :group 'cursor |
| 1960 | :group 'basic-faces) | 1961 | :group 'basic-faces) |
| 1961 | 1962 | ||
| 1963 | (put 'cursor 'face-no-inherit t) | ||
| 1962 | 1964 | ||
| 1963 | (defface mouse '() | 1965 | (defface mouse '() |
| 1964 | "Basic face for the mouse color under X." | 1966 | "Basic face for the mouse color under X." |
diff --git a/lisp/files.el b/lisp/files.el index 208f0b915ae..138cced4845 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -1771,6 +1771,7 @@ in that case, this function acts as if `enable-local-variables' were t." | |||
| 1771 | ("\\.g\\'" . antlr-mode) | 1771 | ("\\.g\\'" . antlr-mode) |
| 1772 | ("\\.ses\\'" . ses-mode) | 1772 | ("\\.ses\\'" . ses-mode) |
| 1773 | ("\\.orig\\'" nil t) ; from patch | 1773 | ("\\.orig\\'" nil t) ; from patch |
| 1774 | ("\\.\\(soa\\|zone\\)\\'" . dns-mode) | ||
| 1774 | ("\\.in\\'" nil t))) | 1775 | ("\\.in\\'" nil t))) |
| 1775 | "Alist of filename patterns vs corresponding major mode functions. | 1776 | "Alist of filename patterns vs corresponding major mode functions. |
| 1776 | Each element looks like (REGEXP . FUNCTION) or (REGEXP FUNCTION NON-NIL). | 1777 | Each element looks like (REGEXP . FUNCTION) or (REGEXP FUNCTION NON-NIL). |
diff --git a/lisp/generic.el b/lisp/generic.el index ca4b47ff4b1..57937be6c0b 100644 --- a/lisp/generic.el +++ b/lisp/generic.el | |||
| @@ -405,10 +405,10 @@ INI file. This hook is NOT installed by default." | |||
| 405 | The regexp is highlighted with FACE." | 405 | The regexp is highlighted with FACE." |
| 406 | (unless (listp keywords-list) | 406 | (unless (listp keywords-list) |
| 407 | (error "Keywords argument must be a list of strings")) | 407 | (error "Keywords argument must be a list of strings")) |
| 408 | (list (concat prefix "\\<" | 408 | (list (concat prefix "\\_<" |
| 409 | ;; Use an optimized regexp. | 409 | ;; Use an optimized regexp. |
| 410 | (regexp-opt keywords-list t) | 410 | (regexp-opt keywords-list t) |
| 411 | "\\>" suffix) | 411 | "\\_>" suffix) |
| 412 | 1 | 412 | 1 |
| 413 | face)) | 413 | face)) |
| 414 | 414 | ||
diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el index 96678d2bc9a..b7e6741e9d4 100644 --- a/lisp/ibuf-ext.el +++ b/lisp/ibuf-ext.el | |||
| @@ -1015,7 +1015,10 @@ currently used by buffers." | |||
| 1015 | "Toggle current view to buffers with filename matching QUALIFIER." | 1015 | "Toggle current view to buffers with filename matching QUALIFIER." |
| 1016 | (:description "filename" | 1016 | (:description "filename" |
| 1017 | :reader (read-from-minibuffer "Filter by filename (regexp): ")) | 1017 | :reader (read-from-minibuffer "Filter by filename (regexp): ")) |
| 1018 | (ibuffer-awhen (buffer-file-name buf) | 1018 | (ibuffer-awhen (with-current-buffer buf |
| 1019 | (or buffer-file-name | ||
| 1020 | (and (boundp 'dired-directory) | ||
| 1021 | dired-directory))) | ||
| 1019 | (string-match qualifier it))) | 1022 | (string-match qualifier it))) |
| 1020 | 1023 | ||
| 1021 | ;;;###autoload (autoload 'ibuffer-filter-by-size-gt "ibuf-ext.el") | 1024 | ;;;###autoload (autoload 'ibuffer-filter-by-size-gt "ibuf-ext.el") |
diff --git a/lisp/novice.el b/lisp/novice.el index ca9a06769d5..b2a0bec0204 100644 --- a/lisp/novice.el +++ b/lisp/novice.el | |||
| @@ -44,7 +44,7 @@ If nil, the feature is disabled, i.e., all commands work normally.") | |||
| 44 | (defvaralias 'disabled-command-hook 'disabled-command-function) | 44 | (defvaralias 'disabled-command-hook 'disabled-command-function) |
| 45 | (make-obsolete-variable | 45 | (make-obsolete-variable |
| 46 | 'disabled-command-hook | 46 | 'disabled-command-hook |
| 47 | "use the variable `disabled-command-function' instead." "21.4") | 47 | 'disabled-command-function "21.4") |
| 48 | 48 | ||
| 49 | ;;;###autoload | 49 | ;;;###autoload |
| 50 | (defun disabled-command-function (&rest ignore) | 50 | (defun disabled-command-function (&rest ignore) |
| @@ -93,7 +93,7 @@ SPC to try the command just this once, but leave it disabled. | |||
| 93 | (message "Type y, n, ! or SPC (the space bar): ") | 93 | (message "Type y, n, ! or SPC (the space bar): ") |
| 94 | (let ((cursor-in-echo-area t)) | 94 | (let ((cursor-in-echo-area t)) |
| 95 | (while (not (memq (setq char (downcase (read-char))) | 95 | (while (not (memq (setq char (downcase (read-char))) |
| 96 | '(?! ? ?y ?n))) | 96 | '(?! ?y ?n ?\ ))) |
| 97 | (ding) | 97 | (ding) |
| 98 | (message "Please type y, n, ! or SPC (the space bar): ")))) | 98 | (message "Please type y, n, ! or SPC (the space bar): ")))) |
| 99 | (if (= char ?!) | 99 | (if (= char ?!) |
| @@ -185,5 +185,5 @@ to future sessions." | |||
| 185 | 185 | ||
| 186 | (provide 'novice) | 186 | (provide 'novice) |
| 187 | 187 | ||
| 188 | ;;; arch-tag: f83c0f96-497e-4db6-a430-8703716c6dd9 | 188 | ;; arch-tag: f83c0f96-497e-4db6-a430-8703716c6dd9 |
| 189 | ;;; novice.el ends here | 189 | ;;; novice.el ends here |
diff --git a/lisp/textmodes/dns-mode.el b/lisp/textmodes/dns-mode.el new file mode 100644 index 00000000000..400f87205c4 --- /dev/null +++ b/lisp/textmodes/dns-mode.el | |||
| @@ -0,0 +1,198 @@ | |||
| 1 | ;;; dns-mode.el --- a mode for viewing/editing Domain Name System master files | ||
| 2 | ;; Copyright (c) 2000, 2001, 2003, 2004 Free Software Foundation, Inc. | ||
| 3 | |||
| 4 | ;; Author: Simon Josefsson <simon@josefsson.org> | ||
| 5 | ;; Keywords: DNS master zone file SOA | ||
| 6 | |||
| 7 | ;; This file is part of GNU Emacs. | ||
| 8 | |||
| 9 | ;; GNU Emacs is free software; you can redistribute it and/or modify | ||
| 10 | ;; it under the terms of the GNU General Public License as published by | ||
| 11 | ;; the Free Software Foundation; either version 2, or (at your option) | ||
| 12 | ;; any later version. | ||
| 13 | |||
| 14 | ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 15 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | ;; GNU General Public License for more details. | ||
| 18 | |||
| 19 | ;; You should have received a copy of the GNU General Public License | ||
| 20 | ;; along with GNU Emacs; see the file COPYING. If not, write to the | ||
| 21 | ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
| 22 | ;; Boston, MA 02111-1307, USA. | ||
| 23 | |||
| 24 | ;;; Commentary: | ||
| 25 | |||
| 26 | ;; Use M-x dns-mode RET to invoke in master files. | ||
| 27 | ;; | ||
| 28 | ;; C-c C-s Increment SOA serial. | ||
| 29 | ;; Understands YYYYMMDDNN, Unix time, and serial number formats, | ||
| 30 | ;; and complains if it fail to find SOA serial. | ||
| 31 | ;; | ||
| 32 | ;; Put something similar to the following in your ~/.emacs to use this file: | ||
| 33 | ;; | ||
| 34 | ;; (load "~/path/to/dns-mode.el") | ||
| 35 | ;; (setq auto-mode-alist (cons '("\\.soa\\'" . dns-mode) auto-mode-alist)) | ||
| 36 | |||
| 37 | ;;; References: | ||
| 38 | |||
| 39 | ;; RFC 1034, "DOMAIN NAMES - CONCEPTS AND FACILITIES", P. Mockapetris. | ||
| 40 | ;; RFC 1035, "DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION", P. Mockapetris. | ||
| 41 | |||
| 42 | ;;; Release history: | ||
| 43 | |||
| 44 | ;; 2004-09-11 Posted on gnu.emacs.sources. | ||
| 45 | ;; 2004-09-13 Ported to XEmacs. | ||
| 46 | ;; 2004-09-14 Installed in Emacs CVS. | ||
| 47 | |||
| 48 | ;;; Code: | ||
| 49 | |||
| 50 | (defgroup dns-mode nil | ||
| 51 | "DNS master file mode configuration.") | ||
| 52 | |||
| 53 | (defconst dns-mode-classes '("IN" "CS" "CH" "HS") | ||
| 54 | "List of strings with known DNS classes.") | ||
| 55 | |||
| 56 | (defconst dns-mode-types '("A" "NS" "MD" "MF" "CNAME" "SOA" "MB" "MG" "MR" | ||
| 57 | "NULL" "WKS" "PTR" "HINFO" "MINFO" "MX" "TXT" | ||
| 58 | "RP" "AFSDB" "X25" "ISDN" "RT" "NSAP" "NSAP" | ||
| 59 | "SIG" "KEY" "PX" "GPOS" "AAAA" "LOC" "NXT" | ||
| 60 | "EID" "NIMLOC" "SRV" "ATMA" "NAPTR" "KX" "CERT" | ||
| 61 | "A6" "DNAME" "SINK" "OPT" "APL" "DS" "SSHFP" | ||
| 62 | "RRSIG" "NSEC" "DNSKEY" "UINFO" "UID" "GID" | ||
| 63 | "UNSPEC" "TKEY" "TSIG" "IXFR" "AXFR" "MAILB" | ||
| 64 | "MAILA") | ||
| 65 | "List of strings with known DNS types.") | ||
| 66 | |||
| 67 | ;; Font lock. | ||
| 68 | |||
| 69 | (defvar dns-mode-control-entity-face 'font-lock-keyword-face | ||
| 70 | "Name of face used for control entities, e.g. $ORIGIN.") | ||
| 71 | |||
| 72 | (defvar dns-mode-bad-control-entity-face 'font-lock-warning-face | ||
| 73 | "Name of face used for non-standard control entities, e.g. $FOO.") | ||
| 74 | |||
| 75 | (defvar dns-mode-type-face 'font-lock-type-face | ||
| 76 | "Name of face used for DNS types, e.g., SOA.") | ||
| 77 | |||
| 78 | (defvar dns-mode-class-face 'font-lock-constant-face | ||
| 79 | "Name of face used for DNS classes, e.g., IN.") | ||
| 80 | |||
| 81 | (defcustom dns-mode-font-lock-keywords | ||
| 82 | `(("^$ORIGIN" 0 ,dns-mode-control-entity-face) | ||
| 83 | ("^$INCLUDE" 0 ,dns-mode-control-entity-face) | ||
| 84 | ("^$[a-z0-9A-Z]+" 0 ,dns-mode-bad-control-entity-face) | ||
| 85 | (,(regexp-opt dns-mode-classes) 0 ,dns-mode-class-face) | ||
| 86 | (,(regexp-opt dns-mode-types) 0 ,dns-mode-type-face)) | ||
| 87 | "Font lock keywords used to highlight text in DNS master file mode." | ||
| 88 | :type 'sexp | ||
| 89 | :group 'dns-mode) | ||
| 90 | |||
| 91 | ;; Syntax table. | ||
| 92 | |||
| 93 | (defvar dns-mode-syntax-table | ||
| 94 | (let ((table (make-syntax-table))) | ||
| 95 | (modify-syntax-entry ?\; "< " table) | ||
| 96 | (modify-syntax-entry ?\n "> " table) | ||
| 97 | table) | ||
| 98 | "Syntax table in use in DNS master file buffers.") | ||
| 99 | |||
| 100 | ;; Keymap. | ||
| 101 | |||
| 102 | (defvar dns-mode-map | ||
| 103 | (let ((map (make-sparse-keymap))) | ||
| 104 | (define-key map "\C-c\C-s" 'dns-mode-soa-increment-serial) | ||
| 105 | map) | ||
| 106 | "Keymap for DNS master file mode.") | ||
| 107 | |||
| 108 | ;; Menu. | ||
| 109 | |||
| 110 | (defvar dns-mode-menu nil | ||
| 111 | "Menubar used in DNS master file mode.") | ||
| 112 | |||
| 113 | (easy-menu-define dns-mode-menu dns-mode-map | ||
| 114 | "DNS Menu." | ||
| 115 | '("DNS" | ||
| 116 | ["Increment SOA serial" dns-mode-soa-increment-serial t])) | ||
| 117 | |||
| 118 | ;; Mode. | ||
| 119 | |||
| 120 | ;;;###autoload | ||
| 121 | (define-derived-mode dns-mode text-mode "DNS" | ||
| 122 | "Major mode for viewing and editing DNS master files. | ||
| 123 | This mode is inherited from text mode. It add syntax | ||
| 124 | highlighting, and some commands for handling DNS master files. | ||
| 125 | Its keymap inherits from `text-mode' and it has the same | ||
| 126 | variables for customizing indentation. It has its own abbrev | ||
| 127 | table and its own syntax table. | ||
| 128 | |||
| 129 | Turning on DNS mode runs `dns-mode-hook'." | ||
| 130 | (set (make-local-variable 'comment-start) ";") | ||
| 131 | (set (make-local-variable 'comment-end) "") | ||
| 132 | (set (make-local-variable 'comment-start-skip) ";+ *") | ||
| 133 | (unless (featurep 'xemacs) | ||
| 134 | (set (make-local-variable 'font-lock-defaults) | ||
| 135 | '(dns-mode-font-lock-keywords nil nil ((?_ . "w"))))) | ||
| 136 | (easy-menu-add dns-mode-menu dns-mode-map)) | ||
| 137 | |||
| 138 | ;; Tools. | ||
| 139 | |||
| 140 | ;;;###autoload | ||
| 141 | (defun dns-mode-soa-increment-serial () | ||
| 142 | "Locate SOA record and increment the serial field." | ||
| 143 | (interactive) | ||
| 144 | (save-excursion | ||
| 145 | (goto-char (point-min)) | ||
| 146 | (unless (re-search-forward | ||
| 147 | (concat "^\\(\\(\\([^ \t]+[ \t]+\\)?[^ \t]+" | ||
| 148 | "[ \t]+\\)?[^ \t]+[ \t]+\\)?SOA") nil t) | ||
| 149 | (error "Cannot locate SOA record")) | ||
| 150 | (if (re-search-forward (concat "\\<\\(" | ||
| 151 | ;; year | ||
| 152 | "\\(198\\|199\\|20[0-9]\\)[0-9]" | ||
| 153 | ;; month | ||
| 154 | "\\(0[0-9]\\|10\\|11\\|12\\)" | ||
| 155 | ;; day | ||
| 156 | "\\([012][0-9]\\|30\\|31\\)" | ||
| 157 | ;; counter | ||
| 158 | "\\([0-9]\\{1,3\\}\\)" | ||
| 159 | "\\)\\>") | ||
| 160 | nil t) | ||
| 161 | ;; YYYYMMDDIII format, one to three I's. | ||
| 162 | (let* ((serial (match-string 1)) | ||
| 163 | (counterstr (match-string 5)) | ||
| 164 | (counter (string-to-number counterstr)) | ||
| 165 | (now (format-time-string "%Y%m%d")) | ||
| 166 | (nowandoldserial (concat now counterstr))) | ||
| 167 | (if (string< serial nowandoldserial) | ||
| 168 | (let ((new (format "%s00" now))) | ||
| 169 | (replace-match new nil nil nil 1) | ||
| 170 | (message "Replaced old serial %s with %s" serial new)) | ||
| 171 | (if (string= serial nowandoldserial) | ||
| 172 | (let ((new (format (format "%%s%%0%dd" (length counterstr)) | ||
| 173 | now (1+ counter)))) | ||
| 174 | (replace-match new nil nil nil 1) | ||
| 175 | (message "Replaced old serial %s with %s" serial new)) | ||
| 176 | (error "Current SOA serial is in the future")))) | ||
| 177 | (if (re-search-forward "\\<\\([0-9]\\{9,10\\}\\)\\>" nil t) | ||
| 178 | ;; Unix time | ||
| 179 | (let* ((serial (match-string 1)) | ||
| 180 | (new (format-time-string "%s"))) | ||
| 181 | (if (not (string< serial new)) | ||
| 182 | (error "Current SOA serial is in the future") | ||
| 183 | (replace-match new nil nil nil 1) | ||
| 184 | (message "Replaced old serial %s with %s" serial new))) | ||
| 185 | (if (re-search-forward "\\<\\([0-9]+\\)\\>" nil t) | ||
| 186 | ;; Just any serial number. | ||
| 187 | (let* ((serial (match-string 1)) | ||
| 188 | (new (format "%d" (1+ (string-to-number serial))))) | ||
| 189 | (replace-match new nil nil nil 1) | ||
| 190 | (message "Replaced old serial %s with %s" serial new)) | ||
| 191 | (error "Cannot locate serial number in SOA record")))))) | ||
| 192 | |||
| 193 | ;;;###autoload(add-to-list 'auto-mode-alist '("\\.soa\\'" . dns-mode)) | ||
| 194 | |||
| 195 | (provide 'dns-mode) | ||
| 196 | |||
| 197 | ;; arch-tag: 6a179f0a-072f-49db-8b01-37b8f23998c0 | ||
| 198 | ;;; dns-mode.el ends here | ||
diff --git a/lisp/vc-arch.el b/lisp/vc-arch.el index c4c484a9347..e32fc474d94 100644 --- a/lisp/vc-arch.el +++ b/lisp/vc-arch.el | |||
| @@ -73,18 +73,10 @@ | |||
| 73 | (put 'Arch 'vc-functions nil) | 73 | (put 'Arch 'vc-functions nil) |
| 74 | 74 | ||
| 75 | ;;;###autoload (defun vc-arch-registered (file) | 75 | ;;;###autoload (defun vc-arch-registered (file) |
| 76 | ;;;###autoload (let ((dir file)) | 76 | ;;;###autoload (if (vc-find-root file "{arch}/=tagging-method") |
| 77 | ;;;###autoload (while (and (stringp dir) | 77 | ;;;###autoload (progn |
| 78 | ;;;###autoload (not (equal | 78 | ;;;###autoload (load "vc-arch") |
| 79 | ;;;###autoload dir (setq dir (file-name-directory dir)))) | 79 | ;;;###autoload (vc-arch-registered file)))) |
| 80 | ;;;###autoload dir) | ||
| 81 | ;;;###autoload (setq dir (if (file-directory-p | ||
| 82 | ;;;###autoload (expand-file-name "{arch}" dir)) | ||
| 83 | ;;;###autoload t (directory-file-name dir)))) | ||
| 84 | ;;;###autoload (if (eq dir t) | ||
| 85 | ;;;###autoload (progn | ||
| 86 | ;;;###autoload (load "vc-arch") | ||
| 87 | ;;;###autoload (vc-arch-registered file))))) | ||
| 88 | 80 | ||
| 89 | (defun vc-arch-add-tagline () | 81 | (defun vc-arch-add-tagline () |
| 90 | "Add an `arch-tag' to the end of the current file." | 82 | "Add an `arch-tag' to the end of the current file." |
| @@ -186,18 +178,10 @@ Only the value `maybe' can be trusted :-(." | |||
| 186 | (defun vc-arch-root (file) | 178 | (defun vc-arch-root (file) |
| 187 | "Return the root directory of a Arch project, if any." | 179 | "Return the root directory of a Arch project, if any." |
| 188 | (or (vc-file-getprop file 'arch-root) | 180 | (or (vc-file-getprop file 'arch-root) |
| 189 | (vc-file-setprop | 181 | (vc-file-setprop |
| 190 | file 'arch-root | 182 | ;; Check the =tagging-method, in case someone naively manually |
| 191 | (let ((root nil)) | 183 | ;; creates a {arch} directory somewhere. |
| 192 | (while (not (or root | 184 | file 'arch-root (vc-find-root file "{arch}/=tagging-method")))) |
| 193 | (equal file (setq file (file-name-directory file))) | ||
| 194 | (null file))) | ||
| 195 | ;; Check the =tagging-method, in case someone naively manually | ||
| 196 | ;; creates a {arch} directory somewhere. | ||
| 197 | (if (file-exists-p (expand-file-name "{arch}/=tagging-method" file)) | ||
| 198 | (setq root file) | ||
| 199 | (setq file (directory-file-name file)))) | ||
| 200 | root)))) | ||
| 201 | 185 | ||
| 202 | (defun vc-arch-register (file &optional rev comment) | 186 | (defun vc-arch-register (file &optional rev comment) |
| 203 | (if rev (error "Explicit initial revision not supported for Arch")) | 187 | (if rev (error "Explicit initial revision not supported for Arch")) |
diff --git a/lisp/vc-mcvs.el b/lisp/vc-mcvs.el index 5c0bac48b3a..d2ac776170f 100644 --- a/lisp/vc-mcvs.el +++ b/lisp/vc-mcvs.el | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | ;;; vc-mcvs.el --- VC backend for the Meta-CVS version-control system | 1 | ;;; vc-mcvs.el --- VC backend for the Meta-CVS version-control system |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1995,98,99,2000,01,02,03,2004 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004 |
| 4 | ;; Free Software Foundation, Inc. | ||
| 4 | 5 | ||
| 5 | ;; Author: FSF (see vc.el for full credits) | 6 | ;; Author: FSF (see vc.el for full credits) |
| 6 | ;; Maintainer: Stefan Monnier <monnier@gnu.org> | 7 | ;; Maintainer: Stefan Monnier <monnier@gnu.org> |
| @@ -114,32 +115,15 @@ This is only meaningful if you don't use the implicit checkout model | |||
| 114 | ;;; | 115 | ;;; |
| 115 | 116 | ||
| 116 | ;;;###autoload (defun vc-mcvs-registered (file) | 117 | ;;;###autoload (defun vc-mcvs-registered (file) |
| 117 | ;;;###autoload (let ((dir file)) | 118 | ;;;###autoload (if (vc-find-root file "MCVS/CVS") |
| 118 | ;;;###autoload (while (and (stringp dir) | 119 | ;;;###autoload (progn |
| 119 | ;;;###autoload (not (equal | 120 | ;;;###autoload (load "vc-mcvs") |
| 120 | ;;;###autoload dir (setq dir (file-name-directory dir)))) | 121 | ;;;###autoload (vc-mcvs-registered file)))) |
| 121 | ;;;###autoload dir) | ||
| 122 | ;;;###autoload (setq dir (if (file-directory-p | ||
| 123 | ;;;###autoload (expand-file-name "MCVS/CVS" dir)) | ||
| 124 | ;;;###autoload t (directory-file-name dir)))) | ||
| 125 | ;;;###autoload (if (eq dir t) | ||
| 126 | ;;;###autoload (progn | ||
| 127 | ;;;###autoload (load "vc-mcvs") | ||
| 128 | ;;;###autoload (vc-mcvs-registered file))))) | ||
| 129 | 122 | ||
| 130 | (defun vc-mcvs-root (file) | 123 | (defun vc-mcvs-root (file) |
| 131 | "Return the root directory of a Meta-CVS project, if any." | 124 | "Return the root directory of a Meta-CVS project, if any." |
| 132 | (or (vc-file-getprop file 'mcvs-root) | 125 | (or (vc-file-getprop file 'mcvs-root) |
| 133 | (vc-file-setprop | 126 | (vc-file-setprop file 'mcvs-root (vc-find-root file "MCVS/CVS")))) |
| 134 | file 'mcvs-root | ||
| 135 | (let ((root nil)) | ||
| 136 | (while (not (or root | ||
| 137 | (equal file (setq file (file-name-directory file))) | ||
| 138 | (null file))) | ||
| 139 | (if (file-directory-p (expand-file-name "MCVS/CVS" file)) | ||
| 140 | (setq root file) | ||
| 141 | (setq file (directory-file-name file)))) | ||
| 142 | root)))) | ||
| 143 | 127 | ||
| 144 | (defun vc-mcvs-read (file) | 128 | (defun vc-mcvs-read (file) |
| 145 | (if (file-readable-p file) | 129 | (if (file-readable-p file) |
| @@ -608,5 +592,5 @@ and that it passes `vc-mcvs-global-switches' to it before FLAGS." | |||
| 608 | 592 | ||
| 609 | (provide 'vc-mcvs) | 593 | (provide 'vc-mcvs) |
| 610 | 594 | ||
| 611 | ;;; arch-tag: a39c7c1c-5247-429d-88df-dd7187d2e704 | 595 | ;; arch-tag: a39c7c1c-5247-429d-88df-dd7187d2e704 |
| 612 | ;;; vc-mcvs.el ends here | 596 | ;;; vc-mcvs.el ends here |
diff --git a/lisp/vc.el b/lisp/vc.el index edb2c789f52..663c45fd466 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -338,7 +338,8 @@ | |||
| 338 | ;; in the buffer. You can safely assume that point is placed at the | 338 | ;; in the buffer. You can safely assume that point is placed at the |
| 339 | ;; beginning of each line, starting at `point-min'. The buffer that | 339 | ;; beginning of each line, starting at `point-min'. The buffer that |
| 340 | ;; point is placed in is the Annotate output, as defined by the | 340 | ;; point is placed in is the Annotate output, as defined by the |
| 341 | ;; relevant backend. | 341 | ;; relevant backend. This function also affects how much of the line |
| 342 | ;; is fontified; where it leaves point is where fontification begins. | ||
| 342 | ;; | 343 | ;; |
| 343 | ;; - annotate-current-time () | 344 | ;; - annotate-current-time () |
| 344 | ;; | 345 | ;; |
| @@ -2896,7 +2897,7 @@ if present. The current time is used as the offset." | |||
| 2896 | (message "Redisplaying annotation...done")) | 2897 | (message "Redisplaying annotation...done")) |
| 2897 | 2898 | ||
| 2898 | (defun vc-annotate-display-autoscale (&optional full) | 2899 | (defun vc-annotate-display-autoscale (&optional full) |
| 2899 | "Highlight the output of \\[vc-annotate]] using an autoscaled color map. | 2900 | "Highlight the output of \\[vc-annotate] using an autoscaled color map. |
| 2900 | Autoscaling means that the map is scaled from the current time to the | 2901 | Autoscaling means that the map is scaled from the current time to the |
| 2901 | oldest annotation in the buffer, or, with argument FULL non-nil, to | 2902 | oldest annotation in the buffer, or, with argument FULL non-nil, to |
| 2902 | cover the range from the oldest annotation to the newest." | 2903 | cover the range from the oldest annotation to the newest." |
diff --git a/lisp/windmove.el b/lisp/windmove.el index 642f04a1d8d..986280c0bb1 100644 --- a/lisp/windmove.el +++ b/lisp/windmove.el | |||
| @@ -324,11 +324,11 @@ from `windmove-frame-edges' will be the list (0 0 180 75)." | |||
| 324 | (let* ((frame (if window | 324 | (let* ((frame (if window |
| 325 | (window-frame window) | 325 | (window-frame window) |
| 326 | (selected-frame))) | 326 | (selected-frame))) |
| 327 | (top-left (window-inside-edges (frame-first-window frame))) | 327 | (top-left (window-edges (frame-first-window frame))) |
| 328 | (x-min (nth 0 top-left)) | 328 | (x-min (nth 0 top-left)) |
| 329 | (y-min (nth 1 top-left)) | 329 | (y-min (nth 1 top-left)) |
| 330 | (x-max (+ x-min (frame-width frame) -1)) ; 1- for last row & col | 330 | (x-max (1- (frame-width frame))) ; 1- for last row & col |
| 331 | (y-max (+ x-max (frame-height frame) -1))) | 331 | (y-max (1- (frame-height frame)))) |
| 332 | (list x-min y-min x-max y-max))) | 332 | (list x-min y-min x-max y-max))) |
| 333 | 333 | ||
| 334 | ;; it turns out that constraining is always a good thing, even when | 334 | ;; it turns out that constraining is always a good thing, even when |
| @@ -406,7 +406,7 @@ Returns the wrapped coordinate." | |||
| 406 | 406 | ||
| 407 | 407 | ||
| 408 | ;; `windmove-coordinates-of-position' is stolen and modified from the | 408 | ;; `windmove-coordinates-of-position' is stolen and modified from the |
| 409 | ;; Emacs Lisp Reference Manual, section 27.2.5. It seems to work | 409 | ;; Emacs 20 Lisp Reference Manual, section 27.2.5. It seems to work |
| 410 | ;; okay, although I am bothered by the fact that tab-offset (the cdr | 410 | ;; okay, although I am bothered by the fact that tab-offset (the cdr |
| 411 | ;; of the next-to- last argument) is set to 0. On the other hand, I | 411 | ;; of the next-to- last argument) is set to 0. On the other hand, I |
| 412 | ;; can't find a single usage of `compute-motion' anywhere that doesn't | 412 | ;; can't find a single usage of `compute-motion' anywhere that doesn't |
| @@ -418,28 +418,43 @@ Returns the wrapped coordinate." | |||
| 418 | ;; the number that `window-width' gives, or continuation lines aren't | 418 | ;; the number that `window-width' gives, or continuation lines aren't |
| 419 | ;; counted correctly. I haven't seen anyone doing this before, | 419 | ;; counted correctly. I haven't seen anyone doing this before, |
| 420 | ;; though. | 420 | ;; though. |
| 421 | (defun windmove-coordinates-of-position (pos &optional window) | 421 | ;; |
| 422 | "Return the coordinates of position POS in window WINDOW. | 422 | ;; Now updated for Emacs 21, based on the Emacs 21 Lisp Reference |
| 423 | ;; Manual, section 30.2.5. It is no longer necessary to subtract | ||
| 424 | ;; 1 for the usable width of the window. | ||
| 425 | ;; TODO: also handle minibuffer case, w/ `minibuffer-prompt-width'. | ||
| 426 | (defun windmove-coordinates-of-position (pos) | ||
| 427 | "Return the coordinates of position POS in the current window. | ||
| 423 | Return the window-based coodinates in a cons pair: (HPOS . VPOS), | 428 | Return the window-based coodinates in a cons pair: (HPOS . VPOS), |
| 424 | where HPOS and VPOS are the zero-based x and y components of the | 429 | where HPOS and VPOS are the zero-based x and y components of the |
| 425 | screen location of POS. If WINDOW is nil, return the coordinates in | 430 | screen location of POS. |
| 426 | the currently selected window. | ||
| 427 | As an example, if point is in the top left corner of a window, then | 431 | As an example, if point is in the top left corner of a window, then |
| 428 | the return value from `windmove-coordinates-of-position' is (0 . 0) | 432 | the return value from `windmove-coordinates-of-position' is (0 . 0) |
| 429 | regardless of the where point is in the buffer and where the window | 433 | regardless of the where point is in the buffer and where the window |
| 430 | is placed in the frame." | 434 | is placed in the frame." |
| 431 | (let* ((wind (if (null window) (selected-window) window)) | 435 | (let ((big-hairy-result (compute-motion |
| 432 | (big-hairy-result (compute-motion | 436 | (window-start) |
| 433 | (window-start) | 437 | '(0 . 0) |
| 434 | '(0 . 0) | 438 | pos |
| 435 | pos | 439 | nil ; (window-width window-height) |
| 436 | nil ; (window-width window-height) | 440 | nil ; window-width |
| 437 | nil ; window-width | 441 | (cons (window-hscroll) |
| 438 | (cons (window-hscroll) | 442 | 0) ; why zero? |
| 439 | 0) ; why zero? | 443 | (selected-window)))) |
| 440 | wind))) | 444 | (cons (nth 1 big-hairy-result) ; hpos, not vpos as documented |
| 441 | (cons (nth 1 big-hairy-result) ; hpos, not vpos as documented | 445 | (nth 2 big-hairy-result)))) ; vpos, not hpos as documented |
| 442 | (nth 2 big-hairy-result)))) ; vpos, not hpos as documented | 446 | |
| 447 | (defun windmove-coordinates-of-window-position (pos &optional window) | ||
| 448 | "Return the coordinates of position POS in WINDOW. | ||
| 449 | Return the window-based coodinates in a cons pair: (HPOS . VPOS), | ||
| 450 | where HPOS and VPOS are the zero-based x and y components of the | ||
| 451 | screen location of POS. If WINDOW is nil, return the coordinates in | ||
| 452 | the currently selected window." | ||
| 453 | (if (null window) | ||
| 454 | (windmove-coordinates-of-position pos) | ||
| 455 | (save-selected-window | ||
| 456 | (select-window window) | ||
| 457 | (windmove-coordinates-of-position pos)))) | ||
| 443 | 458 | ||
| 444 | ;; This calculates the reference location in the current window: the | 459 | ;; This calculates the reference location in the current window: the |
| 445 | ;; frame-based (x . y) of either point, the top-left, or the | 460 | ;; frame-based (x . y) of either point, the top-left, or the |
| @@ -467,8 +482,9 @@ supplied, if ARG is greater or smaller than zero, respectively." | |||
| 467 | ((= effective-arg 0) | 482 | ((= effective-arg 0) |
| 468 | (windmove-coord-add | 483 | (windmove-coord-add |
| 469 | top-left | 484 | top-left |
| 470 | (windmove-coordinates-of-position (window-point window) | 485 | (windmove-coordinates-of-window-position |
| 471 | window))))))) | 486 | (window-point window) |
| 487 | window))))))) | ||
| 472 | 488 | ||
| 473 | ;; This uses the reference location in the current window (calculated | 489 | ;; This uses the reference location in the current window (calculated |
| 474 | ;; by `windmove-reference-loc' above) to find a reference location | 490 | ;; by `windmove-reference-loc' above) to find a reference location |
| @@ -491,13 +507,13 @@ movement is relative to." | |||
| 491 | (- (nth 1 edges) | 507 | (- (nth 1 edges) |
| 492 | windmove-window-distance-delta))) ; (x, y0-d) | 508 | windmove-window-distance-delta))) ; (x, y0-d) |
| 493 | ((eq dir 'right) | 509 | ((eq dir 'right) |
| 494 | (cons (+ (nth 2 edges) | 510 | (cons (+ (1- (nth 2 edges)) ; -1 to get actual max x |
| 495 | windmove-window-distance-delta) | 511 | windmove-window-distance-delta) |
| 496 | (cdr refpoint))) ; (x1+d, y) | 512 | (cdr refpoint))) ; (x1+d-1, y) |
| 497 | ((eq dir 'down) | 513 | ((eq dir 'down) ; -1 to get actual max y |
| 498 | (cons (car refpoint) | 514 | (cons (car refpoint) |
| 499 | (+ (nth 3 edges) | 515 | (+ (1- (nth 3 edges)) |
| 500 | windmove-window-distance-delta))) ; (x, y1+d) | 516 | windmove-window-distance-delta))) ; (x, y1+d-1) |
| 501 | (t (error "Invalid direction of movement: %s" dir))))) | 517 | (t (error "Invalid direction of movement: %s" dir))))) |
| 502 | 518 | ||
| 503 | (defun windmove-find-other-window (dir &optional arg window) | 519 | (defun windmove-find-other-window (dir &optional arg window) |
diff --git a/man/maintaining.texi b/man/maintaining.texi index 1a8edf13188..e7d98e67591 100644 --- a/man/maintaining.texi +++ b/man/maintaining.texi | |||
| @@ -445,7 +445,8 @@ well as the files it directly contains. | |||
| 445 | directory where the tags file was initially written. This way, you can | 445 | directory where the tags file was initially written. This way, you can |
| 446 | move an entire directory tree containing both the tags file and the | 446 | move an entire directory tree containing both the tags file and the |
| 447 | source files, and the tags file will still refer correctly to the source | 447 | source files, and the tags file will still refer correctly to the source |
| 448 | files. | 448 | files. If the tags file is in @file{/dev}, however, the file names are |
| 449 | made relative to the current working directory. | ||
| 449 | 450 | ||
| 450 | If you specify absolute file names as arguments to @code{etags}, then | 451 | If you specify absolute file names as arguments to @code{etags}, then |
| 451 | the tags file will contain absolute file names. This way, the tags file | 452 | the tags file will contain absolute file names. This way, the tags file |
diff --git a/src/ChangeLog b/src/ChangeLog index 5fee1e8d97d..955c8929f92 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,27 @@ | |||
| 1 | 2004-09-14 Stefan <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * fileio.c (Finsert_file_contents): Fix case of replacement in a | ||
| 4 | narrowed buffer. | ||
| 5 | |||
| 6 | 2004-09-14 Kim F. Storm <storm@cua.dk> | ||
| 7 | |||
| 8 | * puresize.h (PURESIZE_RATIO): Define based on BITS_PER_EMACS_INT. | ||
| 9 | |||
| 10 | * xfaces.c (Qface_no_inherit): New var. | ||
| 11 | (syms_of_xfaces): Intern and staticpro it. | ||
| 12 | (Finternal_make_lisp_face, Finternal_set_lisp_face_attribute) | ||
| 13 | (Finternal_copy_lisp_face, update_face_from_frame_parameter): | ||
| 14 | Don't increment face_change_count when face has non-nil | ||
| 15 | face-no-inherit property. | ||
| 16 | |||
| 17 | 2004-09-13 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 18 | |||
| 19 | * bytecode.c (BYTE_CODE_QUIT): Add missing AFTER_POTENTIAL_GC. | ||
| 20 | (Fbyte_code): Remove dead code after `wrong_type_argument'. | ||
| 21 | |||
| 22 | * alloc.c (Fgarbage_collect): Mark keyboards, gtk data, and specpdl | ||
| 23 | before doing the mark_stack_check_gcpros since they are not on the stack. | ||
| 24 | |||
| 1 | 2004-09-12 Kim F. Storm <storm@cua.dk> | 25 | 2004-09-12 Kim F. Storm <storm@cua.dk> |
| 2 | 26 | ||
| 3 | * editfns.c (Fformat): Handle format strings with multiple text | 27 | * editfns.c (Fformat): Handle format strings with multiple text |
| @@ -12504,7 +12528,7 @@ | |||
| 12504 | 12528 | ||
| 12505 | 2002-02-15 Andreas Schwab <schwab@suse.de> | 12529 | 2002-02-15 Andreas Schwab <schwab@suse.de> |
| 12506 | 12530 | ||
| 12507 | * puresize.h (BASE_PURESIZE): Increase to 9/5. | 12531 | * puresize.h (PURESIZE_RATIO): Increase to 9/5. |
| 12508 | 12532 | ||
| 12509 | * alloc.c (NSTATICS): Increase to 1280. | 12533 | * alloc.c (NSTATICS): Increase to 1280. |
| 12510 | 12534 | ||
diff --git a/src/alloc.c b/src/alloc.c index e1fadc155f6..12e673495c3 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Storage allocation and gc for GNU Emacs Lisp interpreter. | 1 | /* Storage allocation and gc for GNU Emacs Lisp interpreter. |
| 2 | Copyright (C) 1985,86,88,93,94,95,97,98,1999,2000,01,02,03,2004 | 2 | Copyright (C) 1985, 1986, 1988, 1993, 1994, 1995, 1997, 1998, 1999, |
| 3 | Free Software Foundation, Inc. | 3 | 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -4455,6 +4455,21 @@ returns nil, because real GC can't be done. */) | |||
| 4455 | for (i = 0; i < staticidx; i++) | 4455 | for (i = 0; i < staticidx; i++) |
| 4456 | mark_object (*staticvec[i]); | 4456 | mark_object (*staticvec[i]); |
| 4457 | 4457 | ||
| 4458 | for (bind = specpdl; bind != specpdl_ptr; bind++) | ||
| 4459 | { | ||
| 4460 | mark_object (bind->symbol); | ||
| 4461 | mark_object (bind->old_value); | ||
| 4462 | } | ||
| 4463 | mark_kboards (); | ||
| 4464 | mark_ttys (); | ||
| 4465 | |||
| 4466 | #ifdef USE_GTK | ||
| 4467 | { | ||
| 4468 | extern void xg_mark_data (); | ||
| 4469 | xg_mark_data (); | ||
| 4470 | } | ||
| 4471 | #endif | ||
| 4472 | |||
| 4458 | #if (GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS \ | 4473 | #if (GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS \ |
| 4459 | || GC_MARK_STACK == GC_MARK_STACK_CHECK_GCPROS) | 4474 | || GC_MARK_STACK == GC_MARK_STACK_CHECK_GCPROS) |
| 4460 | mark_stack (); | 4475 | mark_stack (); |
| @@ -4468,11 +4483,6 @@ returns nil, because real GC can't be done. */) | |||
| 4468 | #endif | 4483 | #endif |
| 4469 | 4484 | ||
| 4470 | mark_byte_stack (); | 4485 | mark_byte_stack (); |
| 4471 | for (bind = specpdl; bind != specpdl_ptr; bind++) | ||
| 4472 | { | ||
| 4473 | mark_object (bind->symbol); | ||
| 4474 | mark_object (bind->old_value); | ||
| 4475 | } | ||
| 4476 | for (catch = catchlist; catch; catch = catch->next) | 4486 | for (catch = catchlist; catch; catch = catch->next) |
| 4477 | { | 4487 | { |
| 4478 | mark_object (catch->tag); | 4488 | mark_object (catch->tag); |
| @@ -4484,20 +4494,11 @@ returns nil, because real GC can't be done. */) | |||
| 4484 | mark_object (handler->var); | 4494 | mark_object (handler->var); |
| 4485 | } | 4495 | } |
| 4486 | mark_backtrace (); | 4496 | mark_backtrace (); |
| 4487 | mark_kboards (); | ||
| 4488 | mark_ttys (); | ||
| 4489 | 4497 | ||
| 4490 | #if GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES | 4498 | #if GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES |
| 4491 | mark_stack (); | 4499 | mark_stack (); |
| 4492 | #endif | 4500 | #endif |
| 4493 | 4501 | ||
| 4494 | #ifdef USE_GTK | ||
| 4495 | { | ||
| 4496 | extern void xg_mark_data (); | ||
| 4497 | xg_mark_data (); | ||
| 4498 | } | ||
| 4499 | #endif | ||
| 4500 | |||
| 4501 | /* Everything is now marked, except for the things that require special | 4502 | /* Everything is now marked, except for the things that require special |
| 4502 | finalization, i.e. the undo_list. | 4503 | finalization, i.e. the undo_list. |
| 4503 | Look thru every buffer's undo list | 4504 | Look thru every buffer's undo list |
diff --git a/src/bytecode.c b/src/bytecode.c index 0d3be49877c..e8d006e67d1 100644 --- a/src/bytecode.c +++ b/src/bytecode.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Execution of byte code produced by bytecomp.el. | 1 | /* Execution of byte code produced by bytecomp.el. |
| 2 | Copyright (C) 1985, 1986, 1987, 1988, 1993, 2000, 2001, 2002, 2003 | 2 | Copyright (C) 1985, 1986, 1987, 1988, 1993, 2000, 2001, 2002, 2003, 2004 |
| 3 | Free Software Foundation, Inc. | 3 | Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| @@ -387,6 +387,7 @@ unmark_byte_stack () | |||
| 387 | Vquit_flag = Qnil; \ | 387 | Vquit_flag = Qnil; \ |
| 388 | BEFORE_POTENTIAL_GC (); \ | 388 | BEFORE_POTENTIAL_GC (); \ |
| 389 | Fsignal (Qquit, Qnil); \ | 389 | Fsignal (Qquit, Qnil); \ |
| 390 | AFTER_POTENTIAL_GC (); \ | ||
| 390 | } \ | 391 | } \ |
| 391 | } while (0) | 392 | } while (0) |
| 392 | 393 | ||
| @@ -539,9 +540,7 @@ If the third argument is incorrect, Emacs may crash. */) | |||
| 539 | TOP = Qnil; | 540 | TOP = Qnil; |
| 540 | else | 541 | else |
| 541 | { | 542 | { |
| 542 | BEFORE_POTENTIAL_GC (); | 543 | wrong_type_argument (Qlistp, v1); |
| 543 | Fcar (wrong_type_argument (Qlistp, v1)); | ||
| 544 | AFTER_POTENTIAL_GC (); | ||
| 545 | } | 544 | } |
| 546 | break; | 545 | break; |
| 547 | } | 546 | } |
| @@ -574,9 +573,7 @@ If the third argument is incorrect, Emacs may crash. */) | |||
| 574 | TOP = Qnil; | 573 | TOP = Qnil; |
| 575 | else | 574 | else |
| 576 | { | 575 | { |
| 577 | BEFORE_POTENTIAL_GC (); | 576 | wrong_type_argument (Qlistp, v1); |
| 578 | Fcdr (wrong_type_argument (Qlistp, v1)); | ||
| 579 | AFTER_POTENTIAL_GC (); | ||
| 580 | } | 577 | } |
| 581 | break; | 578 | break; |
| 582 | } | 579 | } |
| @@ -907,11 +904,7 @@ If the third argument is incorrect, Emacs may crash. */) | |||
| 907 | else if (!NILP (v1)) | 904 | else if (!NILP (v1)) |
| 908 | { | 905 | { |
| 909 | immediate_quit = 0; | 906 | immediate_quit = 0; |
| 910 | BEFORE_POTENTIAL_GC (); | 907 | wrong_type_argument (Qlistp, v1); |
| 911 | v1 = wrong_type_argument (Qlistp, v1); | ||
| 912 | AFTER_POTENTIAL_GC (); | ||
| 913 | immediate_quit = 1; | ||
| 914 | op++; | ||
| 915 | } | 908 | } |
| 916 | } | 909 | } |
| 917 | immediate_quit = 0; | 910 | immediate_quit = 0; |
| @@ -920,11 +913,7 @@ If the third argument is incorrect, Emacs may crash. */) | |||
| 920 | else if (NILP (v1)) | 913 | else if (NILP (v1)) |
| 921 | TOP = Qnil; | 914 | TOP = Qnil; |
| 922 | else | 915 | else |
| 923 | { | 916 | wrong_type_argument (Qlistp, v1); |
| 924 | BEFORE_POTENTIAL_GC (); | ||
| 925 | Fcar (wrong_type_argument (Qlistp, v1)); | ||
| 926 | AFTER_POTENTIAL_GC (); | ||
| 927 | } | ||
| 928 | break; | 917 | break; |
| 929 | } | 918 | } |
| 930 | 919 | ||
| @@ -1554,11 +1543,7 @@ If the third argument is incorrect, Emacs may crash. */) | |||
| 1554 | else if (!NILP (v1)) | 1543 | else if (!NILP (v1)) |
| 1555 | { | 1544 | { |
| 1556 | immediate_quit = 0; | 1545 | immediate_quit = 0; |
| 1557 | BEFORE_POTENTIAL_GC (); | 1546 | wrong_type_argument (Qlistp, v1); |
| 1558 | v1 = wrong_type_argument (Qlistp, v1); | ||
| 1559 | AFTER_POTENTIAL_GC (); | ||
| 1560 | immediate_quit = 1; | ||
| 1561 | op++; | ||
| 1562 | } | 1547 | } |
| 1563 | } | 1548 | } |
| 1564 | immediate_quit = 0; | 1549 | immediate_quit = 0; |
| @@ -1567,11 +1552,7 @@ If the third argument is incorrect, Emacs may crash. */) | |||
| 1567 | else if (NILP (v1)) | 1552 | else if (NILP (v1)) |
| 1568 | TOP = Qnil; | 1553 | TOP = Qnil; |
| 1569 | else | 1554 | else |
| 1570 | { | 1555 | wrong_type_argument (Qlistp, v1); |
| 1571 | BEFORE_POTENTIAL_GC (); | ||
| 1572 | Fcar (wrong_type_argument (Qlistp, v1)); | ||
| 1573 | AFTER_POTENTIAL_GC (); | ||
| 1574 | } | ||
| 1575 | } | 1556 | } |
| 1576 | else | 1557 | else |
| 1577 | { | 1558 | { |
diff --git a/src/fileio.c b/src/fileio.c index e95205d7489..9e86b6a9189 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* File IO for GNU Emacs. | 1 | /* File IO for GNU Emacs. |
| 2 | Copyright (C) 1985,86,87,88,93,94,95,96,97,98,99,2000,01,03,2004 | 2 | Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1996, 1997, 1998, |
| 3 | Free Software Foundation, Inc. | 3 | 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -4329,7 +4329,7 @@ actually used. */) | |||
| 4329 | /* Replace the chars that we need to replace, | 4329 | /* Replace the chars that we need to replace, |
| 4330 | and update INSERTED to equal the number of bytes | 4330 | and update INSERTED to equal the number of bytes |
| 4331 | we are taking from the file. */ | 4331 | we are taking from the file. */ |
| 4332 | inserted -= (Z_BYTE - same_at_end) + (same_at_start - BEG_BYTE); | 4332 | inserted -= (ZV_BYTE - same_at_end) + (same_at_start - BEGV_BYTE); |
| 4333 | 4333 | ||
| 4334 | if (same_at_end != same_at_start) | 4334 | if (same_at_end != same_at_start) |
| 4335 | { | 4335 | { |
| @@ -4343,7 +4343,7 @@ actually used. */) | |||
| 4343 | } | 4343 | } |
| 4344 | /* Insert from the file at the proper position. */ | 4344 | /* Insert from the file at the proper position. */ |
| 4345 | SET_PT_BOTH (temp, same_at_start); | 4345 | SET_PT_BOTH (temp, same_at_start); |
| 4346 | insert_1 (conversion_buffer + same_at_start - BEG_BYTE, inserted, | 4346 | insert_1 (conversion_buffer + same_at_start - BEGV_BYTE, inserted, |
| 4347 | 0, 0, 0); | 4347 | 0, 0, 0); |
| 4348 | if (coding.cmp_data && coding.cmp_data->used) | 4348 | if (coding.cmp_data && coding.cmp_data->used) |
| 4349 | coding_restore_composition (&coding, Fcurrent_buffer ()); | 4349 | coding_restore_composition (&coding, Fcurrent_buffer ()); |
diff --git a/src/puresize.h b/src/puresize.h index 8088a374765..054b2bc4c89 100644 --- a/src/puresize.h +++ b/src/puresize.h | |||
| @@ -47,7 +47,7 @@ Boston, MA 02111-1307, USA. */ | |||
| 47 | 47 | ||
| 48 | /* Increase BASE_PURESIZE by a ratio depending on the machine's word size. */ | 48 | /* Increase BASE_PURESIZE by a ratio depending on the machine's word size. */ |
| 49 | #ifndef PURESIZE_RATIO | 49 | #ifndef PURESIZE_RATIO |
| 50 | #if VALBITS + GCTYPEBITS + 1 > 32 | 50 | #if BITS_PER_EMACS_INT > 32 |
| 51 | #define PURESIZE_RATIO 9/5 /* Don't surround with `()'. */ | 51 | #define PURESIZE_RATIO 9/5 /* Don't surround with `()'. */ |
| 52 | #else | 52 | #else |
| 53 | #define PURESIZE_RATIO 1 | 53 | #define PURESIZE_RATIO 1 |
diff --git a/src/xfaces.c b/src/xfaces.c index 10b7ef1148c..5137ab7e721 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -388,6 +388,10 @@ Lisp_Object Qforeground_color, Qbackground_color; | |||
| 388 | Lisp_Object Qface; | 388 | Lisp_Object Qface; |
| 389 | extern Lisp_Object Qmouse_face; | 389 | extern Lisp_Object Qmouse_face; |
| 390 | 390 | ||
| 391 | /* Property for basic faces which other faces cannot inherit. */ | ||
| 392 | |||
| 393 | Lisp_Object Qface_no_inherit; | ||
| 394 | |||
| 391 | /* Error symbol for wrong_type_argument in load_pixmap. */ | 395 | /* Error symbol for wrong_type_argument in load_pixmap. */ |
| 392 | 396 | ||
| 393 | Lisp_Object Qbitmap_spec_p; | 397 | Lisp_Object Qbitmap_spec_p; |
| @@ -3868,8 +3872,11 @@ Value is a vector of face attributes. */) | |||
| 3868 | depend on the face, make sure they are all removed. This is done | 3872 | depend on the face, make sure they are all removed. This is done |
| 3869 | by incrementing face_change_count. The next call to | 3873 | by incrementing face_change_count. The next call to |
| 3870 | init_iterator will then free realized faces. */ | 3874 | init_iterator will then free realized faces. */ |
| 3871 | ++face_change_count; | 3875 | if (NILP (Fget (face, Qface_no_inherit))) |
| 3872 | ++windows_or_buffers_changed; | 3876 | { |
| 3877 | ++face_change_count; | ||
| 3878 | ++windows_or_buffers_changed; | ||
| 3879 | } | ||
| 3873 | 3880 | ||
| 3874 | xassert (LFACEP (lface)); | 3881 | xassert (LFACEP (lface)); |
| 3875 | check_lface (lface); | 3882 | check_lface (lface); |
| @@ -3944,8 +3951,11 @@ The value is TO. */) | |||
| 3944 | depend on the face, make sure they are all removed. This is done | 3951 | depend on the face, make sure they are all removed. This is done |
| 3945 | by incrementing face_change_count. The next call to | 3952 | by incrementing face_change_count. The next call to |
| 3946 | init_iterator will then free realized faces. */ | 3953 | init_iterator will then free realized faces. */ |
| 3947 | ++face_change_count; | 3954 | if (NILP (Fget (to, Qface_no_inherit))) |
| 3948 | ++windows_or_buffers_changed; | 3955 | { |
| 3956 | ++face_change_count; | ||
| 3957 | ++windows_or_buffers_changed; | ||
| 3958 | } | ||
| 3949 | 3959 | ||
| 3950 | return to; | 3960 | return to; |
| 3951 | } | 3961 | } |
| @@ -4302,6 +4312,7 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 4302 | by incrementing face_change_count. The next call to | 4312 | by incrementing face_change_count. The next call to |
| 4303 | init_iterator will then free realized faces. */ | 4313 | init_iterator will then free realized faces. */ |
| 4304 | if (!EQ (frame, Qt) | 4314 | if (!EQ (frame, Qt) |
| 4315 | && NILP (Fget (face, Qface_no_inherit)) | ||
| 4305 | && (EQ (attr, QCfont) | 4316 | && (EQ (attr, QCfont) |
| 4306 | || NILP (Fequal (old_value, value)))) | 4317 | || NILP (Fequal (old_value, value)))) |
| 4307 | { | 4318 | { |
| @@ -4454,6 +4465,7 @@ update_face_from_frame_parameter (f, param, new_value) | |||
| 4454 | struct frame *f; | 4465 | struct frame *f; |
| 4455 | Lisp_Object param, new_value; | 4466 | Lisp_Object param, new_value; |
| 4456 | { | 4467 | { |
| 4468 | Lisp_Object face = Qnil; | ||
| 4457 | Lisp_Object lface; | 4469 | Lisp_Object lface; |
| 4458 | 4470 | ||
| 4459 | /* If there are no faces yet, give up. This is the case when called | 4471 | /* If there are no faces yet, give up. This is the case when called |
| @@ -4462,17 +4474,10 @@ update_face_from_frame_parameter (f, param, new_value) | |||
| 4462 | if (NILP (f->face_alist)) | 4474 | if (NILP (f->face_alist)) |
| 4463 | return; | 4475 | return; |
| 4464 | 4476 | ||
| 4465 | /* Changing a named face means that all realized faces depending on | ||
| 4466 | that face are invalid. Since we cannot tell which realized faces | ||
| 4467 | depend on the face, make sure they are all removed. This is done | ||
| 4468 | by incrementing face_change_count. The next call to | ||
| 4469 | init_iterator will then free realized faces. */ | ||
| 4470 | ++face_change_count; | ||
| 4471 | ++windows_or_buffers_changed; | ||
| 4472 | |||
| 4473 | if (EQ (param, Qforeground_color)) | 4477 | if (EQ (param, Qforeground_color)) |
| 4474 | { | 4478 | { |
| 4475 | lface = lface_from_face_name (f, Qdefault, 1); | 4479 | face = Qdefault; |
| 4480 | lface = lface_from_face_name (f, face, 1); | ||
| 4476 | LFACE_FOREGROUND (lface) = (STRINGP (new_value) | 4481 | LFACE_FOREGROUND (lface) = (STRINGP (new_value) |
| 4477 | ? new_value : Qunspecified); | 4482 | ? new_value : Qunspecified); |
| 4478 | realize_basic_faces (f); | 4483 | realize_basic_faces (f); |
| @@ -4487,29 +4492,45 @@ update_face_from_frame_parameter (f, param, new_value) | |||
| 4487 | XSETFRAME (frame, f); | 4492 | XSETFRAME (frame, f); |
| 4488 | call1 (Qframe_update_face_colors, frame); | 4493 | call1 (Qframe_update_face_colors, frame); |
| 4489 | 4494 | ||
| 4490 | lface = lface_from_face_name (f, Qdefault, 1); | 4495 | face = Qdefault; |
| 4496 | lface = lface_from_face_name (f, face, 1); | ||
| 4491 | LFACE_BACKGROUND (lface) = (STRINGP (new_value) | 4497 | LFACE_BACKGROUND (lface) = (STRINGP (new_value) |
| 4492 | ? new_value : Qunspecified); | 4498 | ? new_value : Qunspecified); |
| 4493 | realize_basic_faces (f); | 4499 | realize_basic_faces (f); |
| 4494 | } | 4500 | } |
| 4495 | if (EQ (param, Qborder_color)) | 4501 | else if (EQ (param, Qborder_color)) |
| 4496 | { | 4502 | { |
| 4497 | lface = lface_from_face_name (f, Qborder, 1); | 4503 | face = Qborder; |
| 4504 | lface = lface_from_face_name (f, face, 1); | ||
| 4498 | LFACE_BACKGROUND (lface) = (STRINGP (new_value) | 4505 | LFACE_BACKGROUND (lface) = (STRINGP (new_value) |
| 4499 | ? new_value : Qunspecified); | 4506 | ? new_value : Qunspecified); |
| 4500 | } | 4507 | } |
| 4501 | else if (EQ (param, Qcursor_color)) | 4508 | else if (EQ (param, Qcursor_color)) |
| 4502 | { | 4509 | { |
| 4503 | lface = lface_from_face_name (f, Qcursor, 1); | 4510 | face = Qcursor; |
| 4511 | lface = lface_from_face_name (f, face, 1); | ||
| 4504 | LFACE_BACKGROUND (lface) = (STRINGP (new_value) | 4512 | LFACE_BACKGROUND (lface) = (STRINGP (new_value) |
| 4505 | ? new_value : Qunspecified); | 4513 | ? new_value : Qunspecified); |
| 4506 | } | 4514 | } |
| 4507 | else if (EQ (param, Qmouse_color)) | 4515 | else if (EQ (param, Qmouse_color)) |
| 4508 | { | 4516 | { |
| 4509 | lface = lface_from_face_name (f, Qmouse, 1); | 4517 | face = Qmouse; |
| 4518 | lface = lface_from_face_name (f, face, 1); | ||
| 4510 | LFACE_BACKGROUND (lface) = (STRINGP (new_value) | 4519 | LFACE_BACKGROUND (lface) = (STRINGP (new_value) |
| 4511 | ? new_value : Qunspecified); | 4520 | ? new_value : Qunspecified); |
| 4512 | } | 4521 | } |
| 4522 | |||
| 4523 | /* Changing a named face means that all realized faces depending on | ||
| 4524 | that face are invalid. Since we cannot tell which realized faces | ||
| 4525 | depend on the face, make sure they are all removed. This is done | ||
| 4526 | by incrementing face_change_count. The next call to | ||
| 4527 | init_iterator will then free realized faces. */ | ||
| 4528 | if (!NILP (face) | ||
| 4529 | && NILP (Fget (face, Qface_no_inherit))) | ||
| 4530 | { | ||
| 4531 | ++face_change_count; | ||
| 4532 | ++windows_or_buffers_changed; | ||
| 4533 | } | ||
| 4513 | } | 4534 | } |
| 4514 | 4535 | ||
| 4515 | 4536 | ||
| @@ -7767,6 +7788,8 @@ syms_of_xfaces () | |||
| 7767 | { | 7788 | { |
| 7768 | Qface = intern ("face"); | 7789 | Qface = intern ("face"); |
| 7769 | staticpro (&Qface); | 7790 | staticpro (&Qface); |
| 7791 | Qface_no_inherit = intern ("face-no-inherit"); | ||
| 7792 | staticpro (&Qface_no_inherit); | ||
| 7770 | Qbitmap_spec_p = intern ("bitmap-spec-p"); | 7793 | Qbitmap_spec_p = intern ("bitmap-spec-p"); |
| 7771 | staticpro (&Qbitmap_spec_p); | 7794 | staticpro (&Qbitmap_spec_p); |
| 7772 | Qframe_update_face_colors = intern ("frame-update-face-colors"); | 7795 | Qframe_update_face_colors = intern ("frame-update-face-colors"); |