diff options
author | Kenichi Handa <handa@m17n.org> | 2003-09-08 11:56:09 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2003-09-08 11:56:09 +0000 |
commit | 463f5630a5e7cbe7f042bc1175d1fa1c4e98860f (patch) | |
tree | 3287d0c628fea2249abf4635b3a4f45bedd6f8c4 /lisp/emacs-lisp | |
parent | 4256310de631bd57c78b88b5131caa073315b3d7 (diff) | |
download | emacs-463f5630a5e7cbe7f042bc1175d1fa1c4e98860f.tar.gz emacs-463f5630a5e7cbe7f042bc1175d1fa1c4e98860f.tar.bz2 emacs-463f5630a5e7cbe7f042bc1175d1fa1c4e98860f.zip |
New directory
Diffstat (limited to 'lisp/emacs-lisp')
61 files changed, 79 insertions, 1001 deletions
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el index 93ce7776d2f..bc047802720 100644 --- a/lisp/emacs-lisp/advice.el +++ b/lisp/emacs-lisp/advice.el @@ -3983,5 +3983,4 @@ Use only in REAL emergencies." (provide 'advice) -;;; arch-tag: 29f8c9a1-8c88-471f-95d7-e28541c6b7c0 ;;; advice.el ends here diff --git a/lisp/emacs-lisp/assoc.el b/lisp/emacs-lisp/assoc.el index 42ce33ad7b7..997badc1732 100644 --- a/lisp/emacs-lisp/assoc.el +++ b/lisp/emacs-lisp/assoc.el @@ -137,5 +137,4 @@ extra values are ignored. Returns the created alist." (provide 'assoc) -;;; arch-tag: 3e58bd89-d912-4b74-a0dc-6ed9735922bc ;;; assoc.el ends here diff --git a/lisp/emacs-lisp/authors.el b/lisp/emacs-lisp/authors.el index 671935ec7d0..325d3903e89 100644 --- a/lisp/emacs-lisp/authors.el +++ b/lisp/emacs-lisp/authors.el @@ -638,5 +638,4 @@ the Emacs source tree, from which to build the file." (authors root) (write-file file))) -;;; arch-tag: 659d5900-5ff2-43b0-954c-a315cc1e4dc1 ;;; authors.el ends here diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 43da3d09827..7aafeb3bebc 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -567,5 +567,4 @@ Calls `update-directory-autoloads' on the command line arguments." (provide 'autoload) -;;; arch-tag: 00244766-98f4-4767-bf42-8a22103441c6 ;;; autoload.el ends here diff --git a/lisp/emacs-lisp/backquote.el b/lisp/emacs-lisp/backquote.el index 81e1a91f76c..eafa63d6e32 100644 --- a/lisp/emacs-lisp/backquote.el +++ b/lisp/emacs-lisp/backquote.el @@ -214,5 +214,4 @@ Vectors work just like lists. Nested backquotes are permitted." tail)) (t (cons 'list heads))))) -;;; arch-tag: 1a26206a-6b5e-4c56-8e24-2eef0f7e0e7a ;;; backquote.el ends here diff --git a/lisp/emacs-lisp/benchmark.el b/lisp/emacs-lisp/benchmark.el index acf9806c519..cc8a7bf96f6 100644 --- a/lisp/emacs-lisp/benchmark.el +++ b/lisp/emacs-lisp/benchmark.el @@ -114,6 +114,4 @@ non-interactive use see also `benchmark-run' and (nth 2 result) (nth 1 result))))) (provide 'benchmark) - -;;; arch-tag: be570e24-4b51-4784-adf3-fa2b56c31946 ;;; benchmark.el ends here diff --git a/lisp/emacs-lisp/bindat.el b/lisp/emacs-lisp/bindat.el index d8b4b4f6c19..312d4b386b3 100644 --- a/lisp/emacs-lisp/bindat.el +++ b/lisp/emacs-lisp/bindat.el @@ -619,5 +619,4 @@ If optional second arg SEP is a string, use that as separator." (provide 'bindat) -;;; arch-tag: 5e6708c3-03e2-4ad7-9885-5041b779c3fb ;;; bindat.el ends here diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index a07eb64d737..c02e8b02dea 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -2025,5 +2025,4 @@ byte-optimize-lapcode)))) nil) -;;; arch-tag: 0f14076b-737e-4bef-aae6-908826ec1ff1 ;;; byte-opt.el ends here diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index 15377c033d9..a28f89cd91a 100644 --- a/lisp/emacs-lisp/byte-run.el +++ b/lisp/emacs-lisp/byte-run.el @@ -169,5 +169,4 @@ The result of the body appears to the compiler as a quoted constant." ;; (file-format emacs19))" ;; nil) -;;; arch-tag: 76f8328a-1f66-4df2-9b6d-5c3666dc05e9 ;;; byte-run.el ends here diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 077c68523c2..43ce86921e8 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -10,7 +10,7 @@ ;;; This version incorporates changes up to version 2.10 of the ;;; Zawinski-Furuseth compiler. -(defconst byte-compile-version "$Revision: 2.136 $") +(defconst byte-compile-version "$Revision: 2.134 $") ;; This file is part of GNU Emacs. @@ -351,9 +351,6 @@ Elements of the list may be be: (const callargs) (const redefine) (const obsolete) (const noruntime) (const cl-functions)))) -(defvar byte-compile-not-obsolete-var nil - "If non-nil, this is a variable that shouldn't be reported as obsolete.") - (defcustom byte-compile-generate-call-tree nil "*Non-nil means collect call-graph information when compiling. This records functions were called and from where. @@ -985,7 +982,7 @@ Each function's symbol gets marked with the `byte-compile-noruntime' property." ;; Also log the current function and file if not already done. (defun byte-compile-log-warning (string &optional fill level) (let ((warning-prefix-function 'byte-compile-warning-prefix) - (warning-type-format "") + (warning-group-format "") (warning-fill-prefix (if fill " "))) (display-warning 'bytecomp string level "*Compile-Log*"))) @@ -2708,8 +2705,7 @@ If FORM is a lambda or a macro, byte-compile it as a function." (if (symbolp var) "constant" "nonvariable") (prin1-to-string var)) (if (and (get var 'byte-obsolete-variable) - (memq 'obsolete byte-compile-warnings) - (not (eq var byte-compile-not-obsolete-var))) + (memq 'obsolete byte-compile-warnings)) (let* ((ob (get var 'byte-obsolete-variable)) (when (cdr ob))) (byte-compile-warn "%s is an obsolete variable%s; %s" var @@ -3612,14 +3608,13 @@ If FORM is a lambda or a macro, byte-compile it as a function." fun var string)) `(put ',var 'variable-documentation ,string)) (if (cddr form) ; `value' provided - (let ((byte-compile-not-obsolete-var var)) - (if (eq fun 'defconst) - ;; `defconst' sets `var' unconditionally. - (let ((tmp (make-symbol "defconst-tmp-var"))) - `(funcall '(lambda (,tmp) (defconst ,var ,tmp)) - ,value)) - ;; `defvar' sets `var' only when unbound. - `(if (not (default-boundp ',var)) (setq-default ,var ,value)))) + (if (eq fun 'defconst) + ;; `defconst' sets `var' unconditionally. + (let ((tmp (make-symbol "defconst-tmp-var"))) + `(funcall '(lambda (,tmp) (defconst ,var ,tmp)) + ,value)) + ;; `defvar' sets `var' only when unbound. + `(if (not (default-boundp ',var)) (setq-default ,var ,value))) (when (eq fun 'defconst) ;; This will signal an appropriate error at runtime. `(eval ',form))) @@ -4039,5 +4034,4 @@ For example, invoke `emacs -batch -f batch-byte-recompile-directory .'." (run-hooks 'bytecomp-load-hook) -;;; arch-tag: 9c97b0f0-8745-4571-bfc3-8dceb677292a ;;; bytecomp.el ends here diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 05f0bb0977d..a5fb3cede5e 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -2696,5 +2696,4 @@ function called to create the messages." (provide 'checkdoc) -;;; arch-tag: c49a7ec8-3bb7-46f2-bfbc-d5f26e033b26 ;;; checkdoc.el ends here diff --git a/lisp/emacs-lisp/cl-compat.el b/lisp/emacs-lisp/cl-compat.el index c3fbbe0993b..9afe4fe426a 100644 --- a/lisp/emacs-lisp/cl-compat.el +++ b/lisp/emacs-lisp/cl-compat.el @@ -185,5 +185,4 @@ (provide 'cl-compat) -;;; arch-tag: 9996bb4f-aaf5-4592-b436-bf64759a3163 ;;; cl-compat.el ends here diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el index bfd21e27d05..b0b8d3379f2 100644 --- a/lisp/emacs-lisp/cl-extra.el +++ b/lisp/emacs-lisp/cl-extra.el @@ -749,5 +749,4 @@ This also does some trivial optimizations to make the form prettier." (run-hooks 'cl-extra-load-hook) -;;; arch-tag: bcd03437-0871-43fb-a8f1-ad0e0b5427ed ;;; cl-extra.el ends here diff --git a/lisp/emacs-lisp/cl-indent.el b/lisp/emacs-lisp/cl-indent.el index 2e6265d4dfd..485a0522952 100644 --- a/lisp/emacs-lisp/cl-indent.el +++ b/lisp/emacs-lisp/cl-indent.el @@ -605,5 +605,4 @@ If nil, indent backquoted lists as data, i.e., like quoted lists." ;(put 'defclass 'common-lisp-indent-function '((&whole 2 &rest (&whole 2 &rest 1) &rest (&whole 2 &rest 1))) ;(put 'defgeneric 'common-lisp-indent-function 'defun) -;;; arch-tag: 7914d50f-92ec-4476-93fc-0f043a380e03 ;;; cl-indent.el ends here diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 038786bb944..ad757149509 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -2657,5 +2657,4 @@ surrounded by (block NAME ...). ;;; byte-compile-warnings: (redefine callargs free-vars unresolved obsolete noruntime) ;;; End: -;;; arch-tag: afd947a6-b553-4df1-bba5-000be6388f46 ;;; cl-macs.el ends here diff --git a/lisp/emacs-lisp/cl-seq.el b/lisp/emacs-lisp/cl-seq.el index 93237f0206f..8cb6412f774 100644 --- a/lisp/emacs-lisp/cl-seq.el +++ b/lisp/emacs-lisp/cl-seq.el @@ -903,5 +903,4 @@ Keywords supported: :test :test-not :key" (run-hooks 'cl-seq-load-hook) -;;; arch-tag: ec1cc072-9006-4225-b6ba-d6b07ed1710c ;;; cl-seq.el ends here diff --git a/lisp/emacs-lisp/cl-specs.el b/lisp/emacs-lisp/cl-specs.el index 10aade7dc75..077f006ec3b 100644 --- a/lisp/emacs-lisp/cl-specs.el +++ b/lisp/emacs-lisp/cl-specs.el @@ -7,7 +7,7 @@ ;; LCD Archive Entry: ;; cl-specs.el|Daniel LaLiberte|liberte@holonexus.org ;; |Edebug specs for cl.el -;; |$Date: 2003/06/16 16:27:27 $|1.1| +;; |$Date: 2003/02/04 12:53:34 $|1.1| ;; This file is part of GNU Emacs. @@ -470,5 +470,4 @@ (def-edebug-spec loop-d-type-spec (&or (loop-d-type-spec . [&or nil loop-d-type-spec]) cl-type-spec)) -;;; arch-tag: b29aa3c2-cf67-4af8-9ee1-318fea61b478 ;;; cl-specs.el ends here diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el index dc56262272f..f2ced20e59e 100644 --- a/lisp/emacs-lisp/cl.el +++ b/lisp/emacs-lisp/cl.el @@ -695,5 +695,4 @@ Keywords supported: :test :test-not :key" (run-hooks 'cl-load-hook) -;;; arch-tag: 5f07fa74-f153-4524-9303-21f5be125851 ;;; cl.el ends here diff --git a/lisp/emacs-lisp/copyright.el b/lisp/emacs-lisp/copyright.el index fc0a5b74726..c2ad007e3a8 100644 --- a/lisp/emacs-lisp/copyright.el +++ b/lisp/emacs-lisp/copyright.el @@ -42,8 +42,11 @@ A value of nil means to search whole buffer." :type '(choice (integer :tag "Limit") (const :tag "No limit"))) -;; The character classes have the Latin-1 version and the Latin-9 -;; version, which is probably enough. +;; Would it be cleaner to specify Latin-1 coding for this file, +;; and not use both unibyte and multibyte copyright symbol characters? + +;; The character classes include the unibyte (C) sign, +;; the Latin-1 version, and the Latin-9 version. (defcustom copyright-regexp "\\([]\\|@copyright{}\\|[Cc]opyright\\s *:?\\s *\\(?:(C)\\)?\ \\|[Cc]opyright\\s *:?\\s *[]\\)\ @@ -191,5 +194,4 @@ version \\([0-9]+\\), or (at" ;; coding: emacs-mule ;; End: -;;; arch-tag: b4991afb-b6b1-4590-bebe-e076d9d4aee8 ;;; copyright.el ends here diff --git a/lisp/emacs-lisp/crm.el b/lisp/emacs-lisp/crm.el index 572c658d0fc..46293bf94f3 100644 --- a/lisp/emacs-lisp/crm.el +++ b/lisp/emacs-lisp/crm.el @@ -629,5 +629,4 @@ INHERIT-INPUT-METHOD." (provide 'crm) -;;; arch-tag: db1911d9-86c6-4a42-b32a-4910701b15a6 ;;; crm.el ends here diff --git a/lisp/emacs-lisp/cust-print.el b/lisp/emacs-lisp/cust-print.el index 929989b618a..a8cf6acd177 100644 --- a/lisp/emacs-lisp/cust-print.el +++ b/lisp/emacs-lisp/cust-print.el @@ -688,5 +688,4 @@ See `custom-format' for the details." (provide 'cust-print) -;;; arch-tag: 3a5a8650-622c-48c4-87d8-e01bf72ec580 ;;; cust-print.el ends here diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 6e10b596e23..10c4fd4f734 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -733,5 +733,4 @@ If argument is nil or an empty string, cancel for all functions." (provide 'debug) -;;; arch-tag: b6ec7047-f801-4103-9c63-d69322db9d3b ;;; debug.el ends here diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el index 811511a1f00..4aa85290801 100644 --- a/lisp/emacs-lisp/derived.el +++ b/lisp/emacs-lisp/derived.el @@ -437,5 +437,4 @@ Where the new table already has an entry, nothing is copied from the old one." (provide 'derived) -;;; arch-tag: 630be248-47d1-4f02-afa0-8207de0ebea0 ;;; derived.el ends here diff --git a/lisp/emacs-lisp/disass.el b/lisp/emacs-lisp/disass.el index d8890bd0239..6b7f9bc1b3e 100644 --- a/lisp/emacs-lisp/disass.el +++ b/lisp/emacs-lisp/disass.el @@ -265,5 +265,4 @@ OBJ should be a call to BYTE-CODE generated by the byte compiler." (provide 'disass) -;;; arch-tag: 89482fe4-a087-4761-8dc6-d771054e763a ;;; disass.el ends here diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 9d73a8cdac8..9175f692aae 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -464,5 +464,4 @@ ENDFUN should return the end position (with or without moving point)." (provide 'easy-mmode) -;;; arch-tag: d48a5250-6961-4528-9cb0-3c9ea042a66a ;;; easy-mmode.el ends here diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el index a5b35a7d018..2bed70866a1 100644 --- a/lisp/emacs-lisp/easymenu.el +++ b/lisp/emacs-lisp/easymenu.el @@ -620,5 +620,4 @@ In some cases we use that to select between the local and global maps." (provide 'easymenu) -;;; arch-tag: 2a04020d-90d2-476d-a7c6-71e072007a4a ;;; easymenu.el ends here diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 41b473f6d3f..8fd8bf95ea9 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -4415,5 +4415,4 @@ With prefix argument, make it a temporary breakpoint." (provide 'edebug) -;;; arch-tag: 19c8d05c-4554-426e-ac72-e0fa1fcb0808 ;;; edebug.el ends here diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index b5f37487ac5..cbcd5b2a555 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -7,7 +7,7 @@ ;; Keywords: extensions ;; Created: 1995-10-06 -;; $Id: eldoc.el,v 1.25 2003/05/06 17:36:16 lektu Exp $ +;; $Id: eldoc.el,v 1.24 2003/02/11 00:11:55 monnier Exp $ ;; This file is part of GNU Emacs. @@ -451,5 +451,4 @@ With prefix ARG, turn ElDoc mode on if and only if ARG is positive." (provide 'eldoc) -;;; arch-tag: c9a58f9d-2055-46c1-9b82-7248b71a8375 ;;; eldoc.el ends here diff --git a/lisp/emacs-lisp/elint.el b/lisp/emacs-lisp/elint.el index 75ca3122773..502094fd376 100644 --- a/lisp/emacs-lisp/elint.el +++ b/lisp/emacs-lisp/elint.el @@ -801,5 +801,4 @@ If no documentation could be found args will be `unknown'." (provide 'elint) -;;; arch-tag: b2f061e2-af84-4ddc-8e39-f5e969ac228f ;;; elint.el ends here diff --git a/lisp/emacs-lisp/elp.el b/lisp/emacs-lisp/elp.el index 44400dcaa2c..01544e3aa14 100644 --- a/lisp/emacs-lisp/elp.el +++ b/lisp/emacs-lisp/elp.el @@ -603,5 +603,4 @@ displayed." (provide 'elp) -;;; arch-tag: c4eef311-9b3e-4bb2-8a54-3485d41b4eb1 ;;; elp.el ends here diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el index a0c2e3c0d70..7194d4e54d4 100644 --- a/lisp/emacs-lisp/ewoc.el +++ b/lisp/emacs-lisp/ewoc.el @@ -609,5 +609,4 @@ Returns nil if the buffer has been deleted." ;;; eval: (put 'ewoc--set-buffer-bind-dll-let* 'lisp-indent-hook 2) ;;; End: -;;; arch-tag: d78915b9-9a07-44bf-aac6-04a1fc1bd6d4 ;;; ewoc.el ends here diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index 5a7cd1093c4..c4ae7f12b38 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -403,5 +403,4 @@ Point is saved if FUNCTION is in the current buffer." (provide 'find-func) -;;; arch-tag: 43ecd81c-74dc-4d9a-8f63-a61e55670d64 ;;; find-func.el ends here diff --git a/lisp/emacs-lisp/find-gc.el b/lisp/emacs-lisp/find-gc.el index 1c127295216..a52ae3631fd 100644 --- a/lisp/emacs-lisp/find-gc.el +++ b/lisp/emacs-lisp/find-gc.el @@ -151,5 +151,4 @@ (provide 'find-gc) -;;; arch-tag: 4a26a538-a008-40d9-a1ef-23bb6dbecef4 ;;; find-gc.el ends here diff --git a/lisp/emacs-lisp/float-sup.el b/lisp/emacs-lisp/float-sup.el index ce5d6124ad7..4c45112e980 100644 --- a/lisp/emacs-lisp/float-sup.el +++ b/lisp/emacs-lisp/float-sup.el @@ -60,5 +60,4 @@ (provide 'lisp-float-type) -;;; arch-tag: e7837072-a4af-4d08-9953-8a3e755abf9d ;;; float-sup.el ends here diff --git a/lisp/emacs-lisp/gulp.el b/lisp/emacs-lisp/gulp.el index 589be6fb771..a176a7ac013 100644 --- a/lisp/emacs-lisp/gulp.el +++ b/lisp/emacs-lisp/gulp.el @@ -173,5 +173,4 @@ That is a list of elements, each of the form (MAINTAINER PACKAGES...)." (provide 'gulp) -;;; arch-tag: 42750a11-460a-4efc-829f-342d075530e5 ;;; gulp.el ends here diff --git a/lisp/emacs-lisp/helper.el b/lisp/emacs-lisp/helper.el index 9d22735e1d0..0e02f05955f 100644 --- a/lisp/emacs-lisp/helper.el +++ b/lisp/emacs-lisp/helper.el @@ -157,5 +157,4 @@ (provide 'helper) -;;; arch-tag: a0984577-d3e9-4124-ae0d-c46fe740f6a9 ;;; helper.el ends here diff --git a/lisp/emacs-lisp/levents.el b/lisp/emacs-lisp/levents.el index cd3fe2764c2..13d13beb998 100644 --- a/lisp/emacs-lisp/levents.el +++ b/lisp/emacs-lisp/levents.el @@ -290,5 +290,4 @@ GNU Emacs 19 does not currently generate process-output events." (provide 'levents) -;;; arch-tag: a80c21da-69d7-46de-9cdb-5f68577b5525 ;;; levents.el ends here diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el index d8593442620..18967677b38 100644 --- a/lisp/emacs-lisp/lisp-mnt.el +++ b/lisp/emacs-lisp/lisp-mnt.el @@ -607,5 +607,4 @@ Prompts for bug subject TOPIC. Leaves you in a mail buffer." (provide 'lisp-mnt) -;;; arch-tag: fa3c5ab4-a37b-4e46-b7cf-b6d78b90e69e ;;; lisp-mnt.el ends here diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 04d00a2bdb5..fa9661f54a5 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -358,9 +358,6 @@ if that value is non-nil." (set-syntax-table lisp-mode-syntax-table) (run-mode-hooks 'lisp-mode-hook)) -;; Used in old LispM code. -(defalias 'common-lisp-mode 'lisp-mode) - ;; This will do unless inf-lisp.el is loaded. (defun lisp-eval-defun (&optional and-go) "Send the current defun to the Lisp process made by \\[run-lisp]." @@ -515,30 +512,27 @@ With argument, print output into current buffer." expr 'args))))) expr))))))) - (eval-last-sexp-print-value value)))) - -(defun eval-last-sexp-print-value (value) - (let ((unabbreviated (let ((print-length nil) (print-level nil)) - (prin1-to-string value))) - (print-length eval-expression-print-length) - (print-level eval-expression-print-level) - (char-string (prin1-char value)) - (beg (point)) - end) - (prog1 - (prin1 value) - (if (and (eq standard-output t) char-string) - (princ (concat " = " char-string))) - (setq end (point)) - (when (and (bufferp standard-output) - (or (not (null print-length)) - (not (null print-level))) - (not (string= unabbreviated - (buffer-substring-no-properties beg end)))) - (last-sexp-setup-props beg end value - unabbreviated - (buffer-substring-no-properties beg end)) - )))) + (let ((unabbreviated (let ((print-length nil) (print-level nil)) + (prin1-to-string value))) + (print-length eval-expression-print-length) + (print-level eval-expression-print-level) + (char-string (prin1-char value)) + (beg (point)) + end) + (prog1 + (prin1 value) + (if (and (eq standard-output t) char-string) + (princ (concat " = " char-string))) + (setq end (point)) + (when (and (bufferp standard-output) + (or (not (null print-length)) + (not (null print-level))) + (not (string= unabbreviated + (buffer-substring-no-properties beg end)))) + (last-sexp-setup-props beg end value + unabbreviated + (buffer-substring-no-properties beg end)) + )))))) (defun eval-last-sexp (eval-last-sexp-arg-internal) @@ -1173,5 +1167,4 @@ means don't indent that line." (provide 'lisp-mode) -;;; arch-tag: 414c7f93-c245-4b77-8ed5-ed05ef7ff1bf ;;; lisp-mode.el ends here diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 7f059d3f99f..c6ec7cf5b9e 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -157,9 +157,8 @@ normal recipe (see `beginning-of-defun'). Major modes can define this if defining `defun-prompt-regexp' is not sufficient to handle the mode's needs. -The function (of no args) should go to the line on which the current -defun starts, and return non-nil, or should return nil if it can't -find the beginning.") +The function should go to the line on which the current defun starts, +and return non-nil, or should return nil if it can't find the beginning.") (defun beginning-of-defun (&optional arg) "Move backward to the beginning of a defun. @@ -446,5 +445,4 @@ considered." (display-completion-list list))) (message "Making completion list...%s" "done"))))))) -;;; arch-tag: aa7fa8a4-2e6f-4e9b-9cd9-fef06340e67e ;;; lisp.el ends here diff --git a/lisp/emacs-lisp/lmenu.el b/lisp/emacs-lisp/lmenu.el index ab29ed972fc..b97b3577edb 100644 --- a/lisp/emacs-lisp/lmenu.el +++ b/lisp/emacs-lisp/lmenu.el @@ -436,5 +436,4 @@ BEFORE, if provided, is the name of a menu before which this menu should (provide 'lmenu) -;;; arch-tag: 7051c396-2837-435a-ae11-b2d2e2af8fc1 ;;; lmenu.el ends here diff --git a/lisp/emacs-lisp/lselect.el b/lisp/emacs-lisp/lselect.el index b292eefbaec..693e6474f0a 100644 --- a/lisp/emacs-lisp/lselect.el +++ b/lisp/emacs-lisp/lselect.el @@ -232,5 +232,4 @@ the kill ring or the Clipboard." (provide 'lselect) -;;; arch-tag: 92fa54d4-c5d1-4e9b-ad58-cf1e13930556 ;;; lselect.el ends here diff --git a/lisp/emacs-lisp/lucid.el b/lisp/emacs-lisp/lucid.el index 80e5ef330d3..d039fcea9ca 100644 --- a/lisp/emacs-lisp/lucid.el +++ b/lisp/emacs-lisp/lucid.el @@ -263,5 +263,4 @@ This is an XEmacs compatibility function." (provide 'lucid) -;;; arch-tag: 80f9ab46-0b36-4151-86ed-3edb6d449c9e ;;; lucid.el ends here diff --git a/lisp/emacs-lisp/map-ynp.el b/lisp/emacs-lisp/map-ynp.el index 1f493e746fe..2fa97f163d7 100644 --- a/lisp/emacs-lisp/map-ynp.el +++ b/lisp/emacs-lisp/map-ynp.el @@ -261,5 +261,4 @@ the current %s and exit." ;; Return the number of actions that were taken. actions)) -;;; arch-tag: 1d0a3201-a151-4c10-b231-4da47c9e6dc3 ;;; map-ynp.el ends here diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el index 85ec7dbae78..2e54f224a47 100644 --- a/lisp/emacs-lisp/pp.el +++ b/lisp/emacs-lisp/pp.el @@ -167,5 +167,4 @@ Ignores leading comment characters." (provide 'pp) ; so (require 'pp) works -;;; arch-tag: b0f7c65b-02c7-42bb-9ee3-508a59b8fbb9 ;;; pp.el ends here diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el index 9c904e6c0bc..8740a68911f 100644 --- a/lisp/emacs-lisp/re-builder.el +++ b/lisp/emacs-lisp/re-builder.el @@ -682,5 +682,4 @@ If SUBEXP is non-nil mark only the corresponding sub-expressions." (provide 're-builder) -;;; arch-tag: 5c5515ac-4085-4524-a421-033f44f032e7 ;;; re-builder.el ends here diff --git a/lisp/emacs-lisp/regexp-opt.el b/lisp/emacs-lisp/regexp-opt.el index f24789eb4a1..11a66aa2a14 100644 --- a/lisp/emacs-lisp/regexp-opt.el +++ b/lisp/emacs-lisp/regexp-opt.el @@ -299,5 +299,4 @@ in REGEXP." (provide 'regexp-opt) -;;; arch-tag: 6c5a66f4-29af-4fd6-8c3b-4b554d5b4370 ;;; regexp-opt.el ends here diff --git a/lisp/emacs-lisp/regi.el b/lisp/emacs-lisp/regi.el index ae9151585fe..c0cae5b5771 100644 --- a/lisp/emacs-lisp/regi.el +++ b/lisp/emacs-lisp/regi.el @@ -255,5 +255,4 @@ useful information: (provide 'regi) -;;; arch-tag: 804b4e45-4109-4f76-9a88-21887b881747 ;;; regi.el ends here diff --git a/lisp/emacs-lisp/ring.el b/lisp/emacs-lisp/ring.el index fce07953ba9..6891619c20e 100644 --- a/lisp/emacs-lisp/ring.el +++ b/lisp/emacs-lisp/ring.el @@ -162,5 +162,4 @@ will be performed." (provide 'ring) -;;; arch-tag: e707682b-ed69-47c9-b20f-cf2c68cc92d2 ;;; ring.el ends here diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el index 8e38aed10d2..3ac3538822d 100644 --- a/lisp/emacs-lisp/rx.el +++ b/lisp/emacs-lisp/rx.el @@ -791,5 +791,4 @@ CHAR (provide 'rx) -;;; arch-tag: 12d01a63-0008-42bb-ab8c-1c7d63be370b ;;; rx.el ends here diff --git a/lisp/emacs-lisp/shadow.el b/lisp/emacs-lisp/shadow.el index 571ee7ee1c9..82230b1d2ec 100644 --- a/lisp/emacs-lisp/shadow.el +++ b/lisp/emacs-lisp/shadow.el @@ -257,5 +257,4 @@ version unless you know what you are doing.\n") (provide 'shadow) -;;; arch-tag: 0480e8a7-62ed-4a12-a9f6-f44ded9b0830 ;;; shadow.el ends here diff --git a/lisp/emacs-lisp/sregex.el b/lisp/emacs-lisp/sregex.el index 3f7aaa16bce..1200e7b3c30 100644 --- a/lisp/emacs-lisp/sregex.el +++ b/lisp/emacs-lisp/sregex.el @@ -605,5 +605,4 @@ has one of the following forms: (provide 'sregex) -;;; arch-tag: 460c1f5a-eb6e-42ec-a451-ffac78bdf492 ;;; sregex.el ends here diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el index 793306adda5..7bd8378ab86 100644 --- a/lisp/emacs-lisp/syntax.el +++ b/lisp/emacs-lisp/syntax.el @@ -289,6 +289,4 @@ Point is at POS when this function returns." ;; (syntax-ppss-depth (syntax-ppss)))) (provide 'syntax) - -;;; arch-tag: 302f1eeb-e77c-4680-a8c5-c543e01161a5 ;;; syntax.el ends here diff --git a/lisp/emacs-lisp/testcover-ses.el b/lisp/emacs-lisp/testcover-ses.el deleted file mode 100644 index 48ec9fa64da..00000000000 --- a/lisp/emacs-lisp/testcover-ses.el +++ /dev/null @@ -1,712 +0,0 @@ -;;;; testcover-ses.el -- Example use of `testcover' to test "SES" - -;; Copyright (C) 2002 Free Software Foundation, Inc. - -;; Author: Jonathan Yavner <jyavner@engineer.com> -;; Maintainer: Jonathan Yavner <jyavner@engineer.com> -;; Keywords: spreadsheet lisp utility - -;; GNU Emacs is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -(require 'testcover) - -;;;Here are some macros that exercise SES. Set `pause' to t if you want the -;;;macros to pause after each step. -(let* ((pause nil) - (x (if pause "q" "")) - (y "ses-test.ses\r<")) - ;;Fiddle with the existing spreadsheet - (fset 'ses-exercise-example - (concat "" data-directory "ses-example.ses\r<" - x "10" - x "" - x "" - x "pses-center\r" - x "p\r" - x "\t\t" - x "\r A9 B9\r" - x "" - x "\r2\r" - x "" - x "50\r" - x "4" - x "" - x "" - x "(+ o\0" - x "-1o \r" - x "" - x)) - ;;Create a new spreadsheet - (fset 'ses-exercise-new - (concat y - x "\"%.8g\"\r" - x "2\r" - x "" - x "" - x "2" - x "\"Header\r" - x "(sqrt 1\r" - x "pses-center\r" - x "\t" - x "(+ A2 A3\r" - x "(* B2 A3\r" - x "2" - x "\rB3\r" - x "" - x)) - ;;Basic cell display - (fset 'ses-exercise-display - (concat y ":(revert-buffer t t)\r" - x "" - x "\"Very long\r" - x "w3\r" - x "w3\r" - x "(/ 1 0\r" - x "234567\r" - x "5w" - x "\t1\r" - x "" - x "234567\r" - x "\t" - x "" - x "345678\r" - x "3w" - x "\0>" - x "" - x "" - x "" - x "" - x "" - x "" - x "" - x "1\r" - x "" - x "" - x "\"1234567-1234567-1234567\r" - x "123\r" - x "2" - x "\"1234567-1234567-1234567\r" - x "123\r" - x "w8\r" - x "\"1234567\r" - x "w5\r" - x)) - ;;Cell formulas - (fset 'ses-exercise-formulas - (concat y ":(revert-buffer t t)\r" - x "\t\t" - x "\t" - x "(* B1 B2 D1\r" - x "(* B2 B3\r" - x "(apply '+ (ses-range B1 B3)\r" - x "(apply 'ses+ (ses-range B1 B3)\r" - x "(apply 'ses+ (ses-range A2 A3)\r" - x "(mapconcat'number-to-string(ses-range B2 B4) \"-\"\r" - x "(apply 'concat (reverse (ses-range A3 D3))\r" - x "(* (+ A2 A3) (ses+ B2 B3)\r" - x "" - x "2" - x "5\t" - x "(apply 'ses+ (ses-range E1 E2)\r" - x "(apply 'ses+ (ses-range A5 B5)\r" - x "(apply 'ses+ (ses-range E1 F1)\r" - x "(apply 'ses+ (ses-range D1 E1)\r" - x "\t" - x "(ses-average (ses-range A2 A5)\r" - x "(apply 'ses+ (ses-range A5 A6)\r" - x "k" - x "" - x "" - x "2" - x "3" - x "o" - x "2o" - x "3k" - x "(ses-average (ses-range B3 E3)\r" - x "k" - x "12345678\r" - x)) - ;;Recalculating and reconstructing - (fset 'ses-exercise-recalc - (concat y ":(revert-buffer t t)\r" - x "" - x "\t\t" - x "" - x "(/ 1 0\r" - x "" - x "\n" - x "" - x "\"%.6g\"\r" - x "" - x ">nw" - x "\0>xdelete-region\r" - x "" - x "8" - x "\0>xdelete-region\r" - x "" - x "" - x "k" - x "" - x "\"Very long\r" - x "" - x "\r\r" - x "" - x "o" - x "" - x "\"Very long2\r" - x "o" - x "" - x "\rC3\r" - x "\rC2\r" - x "\0" - x "\rC4\r" - x "\rC2\r" - x "\0" - x "" - x "xses-mode\r" - x "<" - x "2k" - x)) - ;;Header line - (fset 'ses-exercise-header-row - (concat y ":(revert-buffer t t)\r" - x "<" - x ">" - x "6<" - x ">" - x "7<" - x ">" - x "8<" - x "2<" - x ">" - x "3w" - x "10<" - x ">" - x "2" - x)) - ;;Detecting unsafe formulas and printers - (fset 'ses-exercise-unsafe - (concat y ":(revert-buffer t t)\r" - x "p(lambda (x) (delete-file x))\rn" - x "p(lambda (x) (delete-file \"ses-nothing\"))\ry" - x "\0n" - x "(delete-file \"x\"\rn" - x "(delete-file \"ses-nothing\"\ry" - x "\0n" - x "(open-network-stream \"x\" nil \"localhost\" \"smtp\"\ry" - x "\0n" - x)) - ;;Inserting and deleting rows - (fset 'ses-exercise-rows - (concat y ":(revert-buffer t t)\r" - x "" - x "\"%s=\"\r" - x "20" - x "p\"%s+\"\r" - x "" - x "123456789\r" - x "\021" - x "" - x "" - x "(not B25\r" - x "k" - x "jA3\r" - x "19" - x "" - x "100" ;Make this approx your CPU speed in MHz - x)) - ;;Inserting and deleting columns - (fset 'ses-exercise-columns - (concat y ":(revert-buffer t t)\r" - x "\"%s@\"\r" - x "o" - x "" - x "o" - x "" - x "k" - x "w8\r" - x "p\"%.7s*\"\r" - x "o" - x "" - x "2o" - x "3k" - x "\"%.6g\"\r" - x "26o" - x "\026\t" - x "26o" - x "0\r" - x "26\t" - x "400" - x "50k" - x "\0D" - x)) - (fset 'ses-exercise-editing - (concat y ":(revert-buffer t t)\r" - x "1\r" - x "('x\r" - x "" - x "" - x "\r\r" - x "w9\r" - x "\r.5\r" - x "\r 10\r" - x "w12\r" - x "\r'\r" - x "\r\r" - x "jA4\r" - x "(+ A2 100\r" - x "3\r" - x "jB1\r" - x "(not A1\r" - x "\"Very long\r" - x "" - x "h" - x "H" - x "" - x ">\t" - x "" - x "" - x "2" - x "" - x "o" - x "h" - x "\0" - x "\"Also very long\r" - x "H" - x "\0'\r" - x "'Trial\r" - x "'qwerty\r" - x "(concat o<\0" - x "-1o\r" - x "(apply '+ o<\0-1o\r" - x "2" - x "-2" - x "-2" - x "2" - x "" - x "H" - x "\0" - x "\"Another long one\r" - x "H" - x "" - x "<" - x "" - x ">" - x "\0" - x)) - ;;Sorting of columns - (fset 'ses-exercise-sort-column - (concat y ":(revert-buffer t t)\r" - x "\"Very long\r" - x "99\r" - x "o13\r" - x "(+ A3 B3\r" - x "7\r8\r(* A4 B4\r" - x "\0A\r" - x "\0B\r" - x "\0C\r" - x "o" - x "\0C\r" - x)) - ;;Simple cell printers - (fset 'ses-exercise-cell-printers - (concat y ":(revert-buffer t t)\r" - x "\"4\t76\r" - x "\"4\n7\r" - x "p\"{%S}\"\r" - x "p(\"[%s]\")\r" - x "p(\"<%s>\")\r" - x "\0" - x "p\r" - x "pnil\r" - x "pses-dashfill\r" - x "48\r" - x "\t" - x "\0p\r" - x "p\r" - x "pses-dashfill\r" - x "\0pnil\r" - x "5\r" - x "pses-center\r" - x "\"%s\"\r" - x "w8\r" - x "p\r" - x "p\"%.7g@\"\r" - x "\r" - x "\"%.6g#\"\r" - x "\"%.6g.\"\r" - x "\"%.6g.\"\r" - x "pidentity\r" - x "6\r" - x "\"UPCASE\r" - x "pdowncase\r" - x "(* 3 4\r" - x "p(lambda (x) '(\"Hi\"))\r" - x "p(lambda (x) '(\"Bye\"))\r" - x)) - ;;Spanning cell printers - (fset 'ses-exercise-spanning-printers - (concat y ":(revert-buffer t t)\r" - x "p\"%.6g*\"\r" - x "pses-dashfill-span\r" - x "5\r" - x "pses-tildefill-span\r" - x "\"4\r" - x "p\"$%s\"\r" - x "p(\"$%s\")\r" - x "8\r" - x "p(\"!%s!\")\r" - x "\t\"12345678\r" - x "pses-dashfill-span\r" - x "\"23456789\r" - x "\t" - x "(not t\r" - x "w6\r" - x "\"5\r" - x "o" - x "k" - x "k" - x "\t" - x "" - x "o" - x "2k" - x "k" - x)) - ;;Cut/copy/paste - within same buffer - (fset 'ses-exercise-paste-1buf - (concat y ":(revert-buffer t t)\r" - x "\0w" - x "" - x "o" - x "\"middle\r" - x "\0" - x "w" - x "\0" - x "w" - x "" - x "" - x "2y" - x "y" - x "y" - x ">" - x "y" - x ">y" - x "<" - x "p\"<%s>\"\r" - x "pses-dashfill\r" - x "\0" - x "" - x "" - x "y" - x "\r\0w" - x "\r" - x "3(+ G2 H1\r" - x "\0w" - x ">" - x "" - x "8(ses-average (ses-range G2 H2)\r" - x "\0k" - x "7" - x "" - x "(ses-average (ses-range E7 E9)\r" - x "\0" - x "" - x "(ses-average (ses-range E7 F7)\r" - x "\0k" - x "" - x "(ses-average (ses-range D6 E6)\r" - x "\0k" - x "" - x "2" - x "\"Line A\r" - x "pses-tildefill-span\r" - x "\"Subline A(1)\r" - x "pses-dashfill-span\r" - x "\0w" - x "" - x "" - x "\0w" - x "" - x)) - ;;Cut/copy/paste - between two buffers - (fset 'ses-exercise-paste-2buf - (concat y ":(revert-buffer t t)\r" - x "o\"middle\r\0" - x "" - x "4bses-test.txt\r" - x " " - x "\"xxx\0" - x "wo" - x "" - x "" - x "o\"\0" - x "wo" - x "o123.45\0" - x "o" - x "o1 \0" - x "o" - x ">y" - x "o symb\0" - x "oy2y" - x "o1\t\0" - x "o" - x "w9\np\"<%s>\"\n" - x "o\n2\t\"3\nxxx\t5\n\0" - x "oy" - x)) - ;;Export text, import it back - (fset 'ses-exercise-import-export - (concat y ":(revert-buffer t t)\r" - x "\0xt" - x "4bses-test.txt\r" - x "\n-1o" - x "xTo-1o" - x "'crunch\r" - x "pses-center-span\r" - x "\0xT" - x "o\n-1o" - x "\0y" - x "\0xt" - x "\0y" - x "12345678\r" - x "'bunch\r" - x "\0xtxT" - x))) - -(defun ses-exercise-macros () - "Executes all SES coverage-test macros." - (dolist (x '(ses-exercise-example - ses-exercise-new - ses-exercise-display - ses-exercise-formulas - ses-exercise-recalc - ses-exercise-header-row - ses-exercise-unsafe - ses-exercise-rows - ses-exercise-columns - ses-exercise-editing - ses-exercise-sort-column - ses-exercise-cell-printers - ses-exercise-spanning-printers - ses-exercise-paste-1buf - ses-exercise-paste-2buf - ses-exercise-import-export)) - (message "<Testing %s>" x) - (execute-kbd-macro x))) - -(defun ses-exercise-signals () - "Exercise code paths that lead to error signals, other than those for -spreadsheet files with invalid formatting." - (message "<Checking for expected errors>") - (switch-to-buffer "ses-test.ses") - (deactivate-mark) - (ses-jump 'A1) - (ses-set-curcell) - (dolist (x '((ses-column-widths 14) - (ses-column-printers "%s") - (ses-column-printers ["%s" "%s" "%s"]) ;Should be two - (ses-column-widths [14]) - (ses-delete-column -99) - (ses-delete-column 2) - (ses-delete-row -1) - (ses-goto-data 'hogwash) - (ses-header-row -56) - (ses-header-row 99) - (ses-insert-column -14) - (ses-insert-row 0) - (ses-jump 'B8) ;Covered by preceding cell - (ses-printer-validate '("%s" t)) - (ses-printer-validate '([47])) - (ses-read-header-row -1) - (ses-read-header-row 32767) - (ses-relocate-all 0 0 -1 1) - (ses-relocate-all 0 0 1 -1) - (ses-select (ses-range A1 A2) 'x (ses-range B1 B1)) - (ses-set-cell 0 0 'hogwash nil) - (ses-set-column-width 0 0) - (ses-yank-cells #("a\nb" - 0 1 (ses (A1 nil nil)) - 2 3 (ses (A3 nil nil))) - nil) - (ses-yank-cells #("ab" - 0 1 (ses (A1 nil nil)) - 1 2 (ses (A2 nil nil))) - nil) - (ses-yank-pop nil) - (ses-yank-tsf "1\t2\n3" nil) - (let ((curcell nil)) (ses-check-curcell)) - (let ((curcell 'A1)) (ses-check-curcell 'needrange)) - (let ((curcell '(A1 . A2))) (ses-check-curcell 'end)) - (let ((curcell '(A1 . A2))) (ses-sort-column "B")) - (let ((curcell '(C1 . D2))) (ses-sort-column "B")) - (execute-kbd-macro "jB10\n2") - (execute-kbd-macro [?j ?B ?9 ?\n ?\C-@ ?\C-f ?\C-f cut]) - (progn (kill-new "x") (execute-kbd-macro ">n")) - (execute-kbd-macro "\0w"))) - (condition-case nil - (progn - (eval x) - (signal 'singularity-error nil)) ;Shouldn't get here - (singularity-error (error "No error from %s?" x)) - (error nil))) - ;;Test quit-handling in ses-update-cells. Cant' use `eval' here. - (let ((inhibit-quit t)) - (setq quit-flag t) - (condition-case nil - (progn - (ses-update-cells '(A1)) - (signal 'singularity-error nil)) - (singularity-error (error "Quit failure in ses-update-cells")) - (error nil)) - (setq quit-flag nil))) - -(defun ses-exercise-invalid-spreadsheets () - "Execute code paths that detect invalid spreadsheet files." - ;;Detect invalid spreadsheets - (let ((p&d "\n\n\n(ses-cell A1 nil nil nil nil)\n\n") - (cw "(ses-column-widths [7])\n") - (cp "(ses-column-printers [ses-center])\n") - (dp "(ses-default-printer \"%.7g\")\n") - (hr "(ses-header-row 0)\n") - (p11 "(2 1 1)") - (igp ses-initial-global-parameters)) - (dolist (x (list "(1)" - "(x 2 3)" - "(1 x 3)" - "(1 -1 0)" - "(1 2 x)" - "(1 2 -1)" - "(3 1 1)" - "\n\n(2 1 1)" - "\n\n\n(ses-cell)(2 1 1)" - "\n\n\n(x)\n(2 1 1)" - "\n\n\n\n(ses-cell A2)\n(2 2 2)" - "\n\n\n\n(ses-cell B1)\n(2 2 2)" - "\n\n\n(ses-cell A1 nil nil nil nil)\n(2 1 1)" - (concat p&d "(x)\n(x)\n(x)\n(x)\n" p11) - (concat p&d "(ses-column-widths)(x)\n(x)\n(x)\n" p11) - (concat p&d cw "(x)\n(x)\n(x)\n(2 1 1)") - (concat p&d cw "(ses-column-printers)(x)\n(x)\n" p11) - (concat p&d cw cp "(x)\n(x)\n" p11) - (concat p&d cw cp "(ses-default-printer)(x)\n" p11) - (concat p&d cw cp dp "(x)\n" p11) - (concat p&d cw cp dp "(ses-header-row)" p11) - (concat p&d cw cp dp hr p11) - (concat p&d cw cp dp "\n" hr igp))) - (condition-case nil - (with-temp-buffer - (insert x) - (ses-load) - (signal 'singularity-error nil)) ;Shouldn't get here - (singularity-error (error "%S is an invalid spreadsheet!" x)) - (error nil))))) - -(defun ses-exercise-startup () - "Prepare for coverage tests" - ;;Clean up from any previous runs - (condition-case nil (kill-buffer "ses-example.ses") (error nil)) - (condition-case nil (kill-buffer "ses-test.ses") (error nil)) - (condition-case nil (delete-file "ses-test.ses") (file-error nil)) - (delete-other-windows) ;Needed for "\C-xo" in ses-exercise-editing - (setq ses-mode-map nil) ;Force rebuild - (testcover-unmark-all "ses.el") - ;;Enable - (let ((testcover-1value-functions - ;;forward-line always returns 0, for us. - ;;remove-text-properties always returns t for us. - ;;ses-recalculate-cell returns the same " " any time curcell is a cons - ;;Macros ses-dorange and ses-dotimes-msg generate code that always - ;; returns nil - (append '(forward-line remove-text-properties ses-recalculate-cell - ses-dorange ses-dotimes-msg) - testcover-1value-functions)) - (testcover-constants - ;;These maps get initialized, then never changed again - (append '(ses-mode-map ses-mode-print-map ses-mode-edit-map) - testcover-constants))) - (testcover-start "ses.el" t)) - (require 'unsafep)) ;In case user has safe-functions = t! - - -;;;######################################################################### -(defun ses-exercise () - "Executes all SES coverage tests and displays the results." - (interactive) - (ses-exercise-startup) - ;;Run the keyboard-macro tests - (let ((safe-functions nil) - (ses-initial-size '(1 . 1)) - (ses-initial-column-width 7) - (ses-initial-default-printer "%.7g") - (ses-after-entry-functions '(forward-char)) - (ses-mode-hook nil)) - (ses-exercise-macros) - (ses-exercise-signals) - (ses-exercise-invalid-spreadsheets) - ;;Upgrade of old-style spreadsheet - (with-temp-buffer - (insert " \n\n\n(ses-cell A1 nil nil nil nil)\n\n(ses-column-widths [7])\n(ses-column-printers [nil])\n(ses-default-printer \"%.7g\")\n\n( ;Global parameters (these are read first)\n 1 ;SES file-format\n 1 ;numrows\n 1 ;numcols\n)\n\n") - (ses-load)) - ;;ses-vector-delete is always called from buffer-undo-list with the same - ;;symbol as argument. We'll give it a different one here. - (let ((x [1 2 3])) - (ses-vector-delete 'x 0 0)) - ;;ses-create-header-string behaves differently in a non-window environment - ;;but we always test under windows. - (let ((window-system (not window-system))) - (scroll-left 7) - (ses-create-header-string)) - ;;Test for nonstandard after-entry functions - (let ((ses-after-entry-functions '(forward-line)) - ses-mode-hook) - (ses-read-cell 0 0 1) - (ses-read-symbol 0 0 t))) - ;;Tests with unsafep disabled - (let ((safe-functions t) - ses-mode-hook) - (message "<Checking safe-functions = t>") - (kill-buffer "ses-example.ses") - (find-file "ses-example.ses")) - ;;Checks for nonstandard default values for new spreadsheets - (let (ses-mode-hook) - (dolist (x '(("%.6g" 8 (2 . 2)) - ("%.8g" 6 (3 . 3)))) - (let ((ses-initial-size (nth 2 x)) - (ses-initial-column-width (nth 1 x)) - (ses-initial-default-printer (nth 0 x))) - (with-temp-buffer - (set-buffer-modified-p t) - (ses-mode))))) - ;;Test error-handling in command hook, outside a macro. - ;;This will ring the bell. - (let (curcell-overlay) - (ses-command-hook)) - ;;Due to use of run-with-timer, ses-command-hook sometimes gets called - ;;after we switch to another buffer. - (switch-to-buffer "*scratch*") - (ses-command-hook) - ;;Print results - (message "<Marking source code>") - (testcover-mark-all "ses.el") - (testcover-next-mark) - ;;Cleanup - (delete-other-windows) - (kill-buffer "ses-test.txt") - ;;Could do this here: (testcover-end "ses.el") - (message "Done")) - -;;; arch-tag: 87052ba4-5cf8-46cf-9375-fe245f3360b8 -;; testcover-ses.el ends here. diff --git a/lisp/emacs-lisp/testcover-unsafep.el b/lisp/emacs-lisp/testcover-unsafep.el deleted file mode 100644 index 4359209b4d4..00000000000 --- a/lisp/emacs-lisp/testcover-unsafep.el +++ /dev/null @@ -1,140 +0,0 @@ -;;;; testcover-unsafep.el -- Use testcover to test unsafep's code coverage - -;; Copyright (C) 2002 Free Software Foundation, Inc. - -;; Author: Jonathan Yavner <jyavner@engineer.com> -;; Maintainer: Jonathan Yavner <jyavner@engineer.com> -;; Keywords: safety lisp utility - -;; This file is part of GNU Emacs. - -;; GNU Emacs is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -(require 'testcover) - -;;;These forms are all considered safe -(defconst testcover-unsafep-safe - '(((lambda (x) (* x 2)) 14) - (apply 'cdr (mapcar '(lambda (x) (car x)) y)) - (cond ((= x 4) 5) (t 27)) - (condition-case x (car y) (error (car x))) - (dolist (x y) (message "here: %s" x)) - (dotimes (x 14 (* x 2)) (message "here: %d" x)) - (let (x) (dolist (y '(1 2 3) (1+ y)) (push y x))) - (let (x) (apply '(lambda (x) (* x 2)) 14)) - (let ((x '(2))) (push 1 x) (pop x) (add-to-list 'x 2)) - (let ((x 1) (y 2)) (setq x (+ x y))) - (let ((x 1)) (let ((y (+ x 3))) (* x y))) - (let* nil (current-time)) - (let* ((x 1) (y (+ x 3))) (* x y)) - (mapcar (lambda (x &optional y &rest z) (setq y (+ x 2)) (* y 3)) '(1 2 3)) - (mapconcat #'(lambda (var) (propertize var 'face 'bold)) '("1" "2") ", ") - (setq buffer-display-count 14 mark-active t) - ;;This is not safe if you insert it into a buffer! - (propertize "x" 'display '(height (progn (delete-file "x") 1)))) - "List of forms that `unsafep' should decide are safe.") - -;;;These forms are considered unsafe -(defconst testcover-unsafep-unsafe - '(( (add-to-list x y) - . (unquoted x)) - ( (add-to-list y x) - . (unquoted y)) - ( (add-to-list 'y x) - . (global-variable y)) - ( (not (delete-file "unsafep.el")) - . (function delete-file)) - ( (cond (t (aset local-abbrev-table 0 0))) - . (function aset)) - ( (cond (t (setq unsafep-vars ""))) - . (risky-local-variable unsafep-vars)) - ( (condition-case format-alist 1) - . (risky-local-variable format-alist)) - ( (condition-case x 1 (error (setq format-alist ""))) - . (risky-local-variable format-alist)) - ( (dolist (x (sort globalvar 'car)) (princ x)) - . (function sort)) - ( (dotimes (x 14) (delete-file "x")) - . (function delete-file)) - ( (let ((post-command-hook "/tmp/")) 1) - . (risky-local-variable post-command-hook)) - ( (let ((x (delete-file "x"))) 2) - . (function delete-file)) - ( (let (x) (add-to-list 'x (delete-file "x"))) - . (function delete-file)) - ( (let (x) (condition-case y (setq x 1 z 2))) - . (global-variable z)) - ( (let (x) (condition-case z 1 (error (delete-file "x")))) - . (function delete-file)) - ( (let (x) (mapc (lambda (x) (setcar x 1)) '((1 . 2) (3 . 4)))) - . (function setcar)) - ( (let (y) (push (delete-file "x") y)) - . (function delete-file)) - ( (let* ((x 1)) (setq y 14)) - . (global-variable y)) - ( (mapc 'car (list '(1 . 2) (cons 3 4) (kill-buffer "unsafep.el"))) - . (function kill-buffer)) - ( (mapcar x y) - . (unquoted x)) - ( (mapcar '(lambda (x) (rename-file x "x")) '("unsafep.el")) - . (function rename-file)) - ( (mapconcat x1 x2 " ") - . (unquoted x1)) - ( (pop format-alist) - . (risky-local-variable format-alist)) - ( (push 1 format-alist) - . (risky-local-variable format-alist)) - ( (setq buffer-display-count (delete-file "x")) - . (function delete-file)) - ;;These are actualy safe (they signal errors) - ( (apply '(x) '(1 2 3)) - . (function (x))) - ( (let (((x))) 1) - . (variable (x))) - ( (let (1) 2) - . (variable 1)) - ) - "A-list of (FORM . REASON)... that`unsafep' should decide are unsafe.") - - -;;;######################################################################### -(defun testcover-unsafep () - "Executes all unsafep tests and displays the coverage results." - (interactive) - (testcover-unmark-all "unsafep.el") - (testcover-start "unsafep.el") - (let (save-functions) - (dolist (x testcover-unsafep-safe) - (if (unsafep x) - (error "%S should be safe" x))) - (dolist (x testcover-unsafep-unsafe) - (if (not (equal (unsafep (car x)) (cdr x))) - (error "%S should be unsafe: %s" (car x) (cdr x)))) - (setq safe-functions t) - (if (or (unsafep '(delete-file "x")) - (unsafep-function 'delete-file)) - (error "safe-functions=t should allow delete-file")) - (setq safe-functions '(setcar)) - (if (unsafep '(setcar x 1)) - (error "safe-functions=(setcar) should allow setcar")) - (if (not (unsafep '(setcdr x 1))) - (error "safe-functions=(setcar) should not allow setcdr"))) - (testcover-mark-all "unsafep.el") - (testcover-end "unsafep.el") - (message "Done")) - -;;; arch-tag: a7616c27-1998-47ae-9304-76d1439dbf29 -;; testcover-unsafep.el ends here. diff --git a/lisp/emacs-lisp/testcover.el b/lisp/emacs-lisp/testcover.el index 4d668a78678..d422a42374b 100644 --- a/lisp/emacs-lisp/testcover.el +++ b/lisp/emacs-lisp/testcover.el @@ -334,8 +334,8 @@ always be nil, so we return t for 1-valued." result)) (defun testcover-reinstrument-clauses (clauselist) - "Reinstrument each list in CLAUSELIST. -Result is t if every clause is 1-valued." + "Reinstruments each list in CLAUSELIST. Result is t if every +clause is 1-valued." (let ((result t)) (mapc #'(lambda (x) (setq result (and (testcover-reinstrument-list x) result))) @@ -349,13 +349,13 @@ Result is t if every clause is 1-valued." (eval-buffer buf t))) (defmacro 1value (form) - "For coverage testing, indicate FORM should always have the same value." + "For code-coverage testing, indicate that FORM is expected to always have +the same value." form) (defmacro noreturn (form) - "For coverage testing, indicate that FORM will never return." - `(prog1 ,form - (error "Form marked with `noreturn' did return"))) + "For code-coverage testing, indicate that FORM will always signal an error." + form) ;;;========================================================================= @@ -445,5 +445,4 @@ coverage tests. This function creates many overlays." (goto-char (next-overlay-change (point))) (end-of-line)) -;;; arch-tag: 72324a4a-4a2e-4142-9249-cc56d6757588 ;; testcover.el ends here. diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el index 4ab2ac8e0d4..b7db0d01dc1 100644 --- a/lisp/emacs-lisp/timer.el +++ b/lisp/emacs-lisp/timer.el @@ -476,5 +476,4 @@ If the user does not answer after SECONDS seconds, return DEFAULT-VALUE." (provide 'timer) -;;; arch-tag: b1a9237b-7787-4382-9e46-8f2c3b3273e0 ;;; timer.el ends here diff --git a/lisp/emacs-lisp/tq.el b/lisp/emacs-lisp/tq.el index 516816b4320..917309e3b98 100644 --- a/lisp/emacs-lisp/tq.el +++ b/lisp/emacs-lisp/tq.el @@ -120,5 +120,4 @@ that's how we tell where the answer ends." (provide 'tq) -;;; arch-tag: 65dea08c-4edd-4cde-83a5-e8a15b993b79 ;;; tq.el ends here diff --git a/lisp/emacs-lisp/trace.el b/lisp/emacs-lisp/trace.el index a6ff9b15286..b2cbb529809 100644 --- a/lisp/emacs-lisp/trace.el +++ b/lisp/emacs-lisp/trace.el @@ -309,5 +309,4 @@ was not traced this is a noop." (provide 'trace) -;;; arch-tag: cfd170a7-4932-4331-8c8b-b7151942e5a1 ;;; trace.el ends here diff --git a/lisp/emacs-lisp/unsafep.el b/lisp/emacs-lisp/unsafep.el index 197728d2327..5daa345dbcf 100644 --- a/lisp/emacs-lisp/unsafep.el +++ b/lisp/emacs-lisp/unsafep.el @@ -259,5 +259,4 @@ is okay if GLOBAL-OKAY is non-nil." (local-variable-p sym))) `(global-variable ,sym)))) -;;; arch-tag: 6216f98b-eb8f-467a-9c33-7a7644f50658 ;; unsafep.el ends here. diff --git a/lisp/emacs-lisp/warnings.el b/lisp/emacs-lisp/warnings.el index ff6d074fd1f..4d0354236a8 100644 --- a/lisp/emacs-lisp/warnings.el +++ b/lisp/emacs-lisp/warnings.el @@ -43,7 +43,7 @@ Each element looks like (LEVEL STRING FUNCTION) and defines LEVEL as a severity level. STRING specifies the description of this level. STRING should use `%s' to -specify where to put the warning type information, +specify where to put the warning group information, or it can omit the `%s' so as not to include that information. The optional FUNCTION, if non-nil, is a function to call @@ -91,26 +91,26 @@ the warning is completely ignored." (defcustom warning-suppress-log-types nil "List of warning types that should not be logged. -If any element of this list matches the TYPE argument to `display-warning', +If any element of this list matches the GROUP argument to `display-warning', the warning is completely ignored. -The element must match the first elements of TYPE. +The element must match the first elements of GROUP. Thus, (foo bar) as an element matches (foo bar) -or (foo bar ANYTHING...) as TYPE. -If TYPE is a symbol FOO, that is equivalent to the list (FOO), +or (foo bar ANYTHING...) as GROUP. +If GROUP is a symbol FOO, that is equivalent to the list (FOO), so only the element (FOO) will match it." :group 'warnings :type '(repeat (repeat symbol)) :version "21.4") (defcustom warning-suppress-types nil - "List of warning types not to display immediately. -If any element of this list matches the TYPE argument to `display-warning', + "Custom groups for warnings not to display immediately. +If any element of this list matches the GROUP argument to `display-warning', the warning is logged nonetheless, but the warnings buffer is not immediately displayed. -The element must match an initial segment of the list TYPE. +The element must match an initial segment of the list GROUP. Thus, (foo bar) as an element matches (foo bar) -or (foo bar ANYTHING...) as TYPE. -If TYPE is a symbol FOO, that is equivalent to the list (FOO), +or (foo bar ANYTHING...) as GROUP. +If GROUP is a symbol FOO, that is equivalent to the list (FOO), so only the element (FOO) will match it. See also `warning-suppress-log-types'." :group 'warnings @@ -155,9 +155,9 @@ also call that function before the next warning.") ;;; safely, testing the existing value, before they call one of the ;;; warnings functions. ;;;###autoload -(defvar warning-type-format " (%s)" - "Format for displaying the warning type in the warning message. -The result of formatting the type this way gets included in the +(defvar warning-group-format " (%s)" + "Format for displaying the warning group in the warning message. +The result of formatting the group this way gets included in the message under the control of the string in `warning-levels'.") (defun warning-numeric-level (level) @@ -166,19 +166,19 @@ message under the control of the string in `warning-levels'.") (link (memq elt warning-levels))) (length link))) -(defun warning-suppress-p (type suppress-list) - "Non-nil if a warning with type TYPE should be suppressed. +(defun warning-suppress-p (group suppress-list) + "Non-nil if a warning with group GROUP should be suppressed. SUPPRESS-LIST is the list of kinds of warnings to suppress." (let (some-match) (dolist (elt suppress-list) - (if (symbolp type) - ;; If TYPE is a symbol, the ELT must be (TYPE). + (if (symbolp group) + ;; If GROUP is a symbol, the ELT must be (GROUP). (if (and (consp elt) - (eq (car elt) type) + (eq (car elt) group) (null (cdr elt))) (setq some-match t)) - ;; If TYPE is a list, ELT must match it or some initial segment of it. - (let ((tem1 type) + ;; If GROUP is a list, ELT must match it or some initial segment of it. + (let ((tem1 group) (tem2 elt) (match t)) ;; Check elements of ELT until we run out of them. @@ -187,7 +187,7 @@ SUPPRESS-LIST is the list of kinds of warnings to suppress." (setq match nil)) (setq tem1 (cdr tem1) tem2 (cdr tem2))) - ;; If ELT is an initial segment of TYPE, MATCH is t now. + ;; If ELT is an initial segment of GROUP, MATCH is t now. ;; So set SOME-MATCH. (if match (setq some-match t))))) @@ -196,10 +196,10 @@ SUPPRESS-LIST is the list of kinds of warnings to suppress." some-match)) ;;;###autoload -(defun display-warning (type message &optional level buffer-name) +(defun display-warning (group message &optional level buffer-name) "Display a warning message, MESSAGE. -TYPE is the warning type: either a custom group name (a symbol), -or a list of symbols whose first element is a custom group name. +GROUP should be a custom group name (a symbol), +or else a list of symbols whose first element is a custom group name. \(The rest of the symbols represent subcategories, for warning purposes only, and you can use whatever symbols you like.) @@ -224,8 +224,8 @@ See also `warning-series', `warning-prefix-function' and (setq level (cdr (assq level warning-level-aliases)))) (or (< (warning-numeric-level level) (warning-numeric-level warning-minimum-log-level)) - (warning-suppress-p type warning-suppress-log-types) - (let* ((typename (if (consp type) (car type) type)) + (warning-suppress-p group warning-suppress-log-types) + (let* ((groupname (if (consp group) (car group) group)) (buffer (get-buffer-create (or buffer-name "*Warnings*"))) (level-info (assq level warning-levels)) start end) @@ -243,7 +243,7 @@ See also `warning-series', `warning-prefix-function' and (setq level-info (funcall warning-prefix-function level level-info))) (insert (format (nth 1 level-info) - (format warning-type-format typename)) + (format warning-group-format groupname)) message) (newline) (when (and warning-fill-prefix (not (string-match "\n" message))) @@ -273,7 +273,7 @@ See also `warning-series', `warning-prefix-function' and ;; immediate display. (or (< (warning-numeric-level level) (warning-numeric-level warning-minimum-level)) - (warning-suppress-p type warning-suppress-types) + (warning-suppress-p group warning-suppress-types) (let ((window (display-buffer buffer))) (when (and (markerp warning-series) (eq (marker-buffer warning-series) buffer)) @@ -281,13 +281,13 @@ See also `warning-series', `warning-prefix-function' and (sit-for 0))))))) ;;;###autoload -(defun lwarn (type level message &rest args) +(defun lwarn (group level message &rest args) "Display a warning message made from (format MESSAGE ARGS...). Aside from generating the message with `format', this is equivalent to `display-warning'. -TYPE is the warning type: either a custom group name (a symbol). -or a list of symbols whose first element is a custom group name. +GROUP should be a custom group name (a symbol). +or else a list of symbols whose first element is a custom group name. \(The rest of the symbols represent subcategories and can be whatever you like.) @@ -296,17 +296,16 @@ LEVEL should be either :warning, :error, or :emergency. if you do not attend to it promptly. :error -- invalid data or circumstances. :warning -- suspicious data or circumstances." - (display-warning type (apply 'format message args) level)) + (display-warning group (apply 'format message args) level)) ;;;###autoload (defun warn (message &rest args) "Display a warning message made from (format MESSAGE ARGS...). Aside from generating the message with `format', this is equivalent to `display-warning', using -`emacs' as the type and `:warning' as the level." +`emacs' as the group and `:warning' as the level." (display-warning 'emacs (apply 'format message args))) (provide 'warnings) -;;; arch-tag: faaad1c8-7b2a-4161-af38-5ab4afde0496 ;;; warnings.el ends here |