mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-29 08:31:35 -08:00
Update FSF's address.
This commit is contained in:
parent
8f65287798
commit
b578f267af
351 changed files with 5589 additions and 5125 deletions
|
|
@ -20,8 +20,9 @@
|
|||
;; 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
;; 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.
|
||||
|
||||
;; LCD Archive Entry:
|
||||
;; advice|Hans Chalupsky|hans@cs.buffalo.edu|
|
||||
|
|
|
|||
|
|
@ -1,20 +1,26 @@
|
|||
;;; assoc.el --- insert/delete/sort functions on association lists
|
||||
|
||||
;; Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Barry A. Warsaw <bwarsaw@cen.com>
|
||||
;; Keywords: extensions
|
||||
|
||||
;; This software is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY. No author or distributor accepts
|
||||
;; responsibility to anyone for the consequences of using it or for
|
||||
;; whether it serves any particular purpose or works at all, unless he
|
||||
;; says so in writing.
|
||||
;; This file is part of GNU Emacs.
|
||||
|
||||
;; This software was written as part of the supercite author's
|
||||
;; official duty as an employee of the United States Government and is
|
||||
;; thus in the public domain. You are free to use that particular
|
||||
;; software as you wish, but WITHOUT ANY WARRANTY WHATSOEVER. It
|
||||
;; would be nice, though if when you use any of this code, you give
|
||||
;; due credit to the author.
|
||||
;; 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.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
|
|
|||
|
|
@ -1,25 +1,26 @@
|
|||
;;; autoload.el --- maintain autoloads in loaddefs.el.
|
||||
|
||||
;;; Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
;;;
|
||||
;; Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Roland McGrath <roland@gnu.ai.mit.edu>
|
||||
;; Keywords: maint
|
||||
|
||||
;;; This program is free software; you can redistribute it and/or modify
|
||||
;;; it under the terms of the GNU General Public License as published by
|
||||
;;; the Free Software Foundation; either version 2, or (at your option)
|
||||
;;; any later version.
|
||||
;;;
|
||||
;;; This program is distributed in the hope that it will be useful,
|
||||
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;;; GNU General Public License for more details.
|
||||
;;;
|
||||
;;; A copy of the GNU General Public License can be obtained from this
|
||||
;;; program's author (send electronic mail to roland@ai.mit.edu) or from
|
||||
;;; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
|
||||
;;; 02139, USA.
|
||||
;;;
|
||||
;; 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.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
;;; backquote.el -- implement the ` Lisp construct
|
||||
|
||||
;;; Copyright (C) 1990, 1992, 1994 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Rick Sladkey <jrs@world.std.com>
|
||||
|
|
@ -18,8 +19,9 @@
|
|||
;; 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
;; 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.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
|
|
|||
|
|
@ -19,131 +19,132 @@
|
|||
;; 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
;; 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.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;;; ========================================================================
|
||||
;;; "No matter how hard you try, you can't make a racehorse out of a pig.
|
||||
;;; You can, however, make a faster pig."
|
||||
;;;
|
||||
;;; Or, to put it another way, the emacs byte compiler is a VW Bug. This code
|
||||
;;; makes it be a VW Bug with fuel injection and a turbocharger... You're
|
||||
;;; still not going to make it go faster than 70 mph, but it might be easier
|
||||
;;; to get it there.
|
||||
;;;
|
||||
;; ========================================================================
|
||||
;; "No matter how hard you try, you can't make a racehorse out of a pig.
|
||||
;; You can, however, make a faster pig."
|
||||
;;
|
||||
;; Or, to put it another way, the emacs byte compiler is a VW Bug. This code
|
||||
;; makes it be a VW Bug with fuel injection and a turbocharger... You're
|
||||
;; still not going to make it go faster than 70 mph, but it might be easier
|
||||
;; to get it there.
|
||||
;;
|
||||
|
||||
;;; TO DO:
|
||||
;;;
|
||||
;;; (apply '(lambda (x &rest y) ...) 1 (foo))
|
||||
;;;
|
||||
;;; maintain a list of functions known not to access any global variables
|
||||
;;; (actually, give them a 'dynamically-safe property) and then
|
||||
;;; (let ( v1 v2 ... vM vN ) <...dynamically-safe...> ) ==>
|
||||
;;; (let ( v1 v2 ... vM ) vN <...dynamically-safe...> )
|
||||
;;; by recursing on this, we might be able to eliminate the entire let.
|
||||
;;; However certain variables should never have their bindings optimized
|
||||
;;; away, because they affect everything.
|
||||
;;; (put 'debug-on-error 'binding-is-magic t)
|
||||
;;; (put 'debug-on-abort 'binding-is-magic t)
|
||||
;;; (put 'debug-on-next-call 'binding-is-magic t)
|
||||
;;; (put 'mocklisp-arguments 'binding-is-magic t)
|
||||
;;; (put 'inhibit-quit 'binding-is-magic t)
|
||||
;;; (put 'quit-flag 'binding-is-magic t)
|
||||
;;; (put 't 'binding-is-magic t)
|
||||
;;; (put 'nil 'binding-is-magic t)
|
||||
;;; possibly also
|
||||
;;; (put 'gc-cons-threshold 'binding-is-magic t)
|
||||
;;; (put 'track-mouse 'binding-is-magic t)
|
||||
;;; others?
|
||||
;;;
|
||||
;;; Simple defsubsts often produce forms like
|
||||
;;; (let ((v1 (f1)) (v2 (f2)) ...)
|
||||
;;; (FN v1 v2 ...))
|
||||
;;; It would be nice if we could optimize this to
|
||||
;;; (FN (f1) (f2) ...)
|
||||
;;; but we can't unless FN is dynamically-safe (it might be dynamically
|
||||
;;; referring to the bindings that the lambda arglist established.)
|
||||
;;; One of the uncountable lossages introduced by dynamic scope...
|
||||
;;;
|
||||
;;; Maybe there should be a control-structure that says "turn on
|
||||
;;; fast-and-loose type-assumptive optimizations here." Then when
|
||||
;;; we see a form like (car foo) we can from then on assume that
|
||||
;;; the variable foo is of type cons, and optimize based on that.
|
||||
;;; But, this won't win much because of (you guessed it) dynamic
|
||||
;;; scope. Anything down the stack could change the value.
|
||||
;;; (Another reason it doesn't work is that it is perfectly valid
|
||||
;;; to call car with a null argument.) A better approach might
|
||||
;;; be to allow type-specification of the form
|
||||
;;; (put 'foo 'arg-types '(float (list integer) dynamic))
|
||||
;;; (put 'foo 'result-type 'bool)
|
||||
;;; It should be possible to have these types checked to a certain
|
||||
;;; degree.
|
||||
;;;
|
||||
;;; collapse common subexpressions
|
||||
;;;
|
||||
;;; It would be nice if redundant sequences could be factored out as well,
|
||||
;;; when they are known to have no side-effects:
|
||||
;;; (list (+ a b c) (+ a b c)) --> a b add c add dup list-2
|
||||
;;; but beware of traps like
|
||||
;;; (cons (list x y) (list x y))
|
||||
;;;
|
||||
;;; Tail-recursion elimination is not really possible in Emacs Lisp.
|
||||
;;; Tail-recursion elimination is almost always impossible when all variables
|
||||
;;; have dynamic scope, but given that the "return" byteop requires the
|
||||
;;; binding stack to be empty (rather than emptying it itself), there can be
|
||||
;;; no truly tail-recursive Emacs Lisp functions that take any arguments or
|
||||
;;; make any bindings.
|
||||
;;;
|
||||
;;; Here is an example of an Emacs Lisp function which could safely be
|
||||
;;; byte-compiled tail-recursively:
|
||||
;;;
|
||||
;;; (defun tail-map (fn list)
|
||||
;;; (cond (list
|
||||
;;; (funcall fn (car list))
|
||||
;;; (tail-map fn (cdr list)))))
|
||||
;;;
|
||||
;;; However, if there was even a single let-binding around the COND,
|
||||
;;; it could not be byte-compiled, because there would be an "unbind"
|
||||
;;; byte-op between the final "call" and "return." Adding a
|
||||
;;; Bunbind_all byteop would fix this.
|
||||
;;;
|
||||
;;; (defun foo (x y z) ... (foo a b c))
|
||||
;;; ... (const foo) (varref a) (varref b) (varref c) (call 3) END: (return)
|
||||
;;; ... (varref a) (varbind x) (varref b) (varbind y) (varref c) (varbind z) (goto 0) END: (unbind-all) (return)
|
||||
;;; ... (varref a) (varset x) (varref b) (varset y) (varref c) (varset z) (goto 0) END: (return)
|
||||
;;;
|
||||
;;; this also can be considered tail recursion:
|
||||
;;;
|
||||
;;; ... (const foo) (varref a) (call 1) (goto X) ... X: (return)
|
||||
;;; could generalize this by doing the optimization
|
||||
;;; (goto X) ... X: (return) --> (return)
|
||||
;;;
|
||||
;;; But this doesn't solve all of the problems: although by doing tail-
|
||||
;;; recursion elimination in this way, the call-stack does not grow, the
|
||||
;;; binding-stack would grow with each recursive step, and would eventually
|
||||
;;; overflow. I don't believe there is any way around this without lexical
|
||||
;;; scope.
|
||||
;;;
|
||||
;;; Wouldn't it be nice if Emacs Lisp had lexical scope.
|
||||
;;;
|
||||
;;; Idea: the form (lexical-scope) in a file means that the file may be
|
||||
;;; compiled lexically. This proclamation is file-local. Then, within
|
||||
;;; that file, "let" would establish lexical bindings, and "let-dynamic"
|
||||
;;; would do things the old way. (Or we could use CL "declare" forms.)
|
||||
;;; We'd have to notice defvars and defconsts, since those variables should
|
||||
;;; always be dynamic, and attempting to do a lexical binding of them
|
||||
;;; should simply do a dynamic binding instead.
|
||||
;;; But! We need to know about variables that were not necessarily defvarred
|
||||
;;; in the file being compiled (doing a boundp check isn't good enough.)
|
||||
;;; Fdefvar() would have to be modified to add something to the plist.
|
||||
;;;
|
||||
;;; A major disadvantage of this scheme is that the interpreter and compiler
|
||||
;;; would have different semantics for files compiled with (dynamic-scope).
|
||||
;;; Since this would be a file-local optimization, there would be no way to
|
||||
;;; modify the interpreter to obey this (unless the loader was hacked
|
||||
;;; in some grody way, but that's a really bad idea.)
|
||||
;; TO DO:
|
||||
;;
|
||||
;; (apply '(lambda (x &rest y) ...) 1 (foo))
|
||||
;;
|
||||
;; maintain a list of functions known not to access any global variables
|
||||
;; (actually, give them a 'dynamically-safe property) and then
|
||||
;; (let ( v1 v2 ... vM vN ) <...dynamically-safe...> ) ==>
|
||||
;; (let ( v1 v2 ... vM ) vN <...dynamically-safe...> )
|
||||
;; by recursing on this, we might be able to eliminate the entire let.
|
||||
;; However certain variables should never have their bindings optimized
|
||||
;; away, because they affect everything.
|
||||
;; (put 'debug-on-error 'binding-is-magic t)
|
||||
;; (put 'debug-on-abort 'binding-is-magic t)
|
||||
;; (put 'debug-on-next-call 'binding-is-magic t)
|
||||
;; (put 'mocklisp-arguments 'binding-is-magic t)
|
||||
;; (put 'inhibit-quit 'binding-is-magic t)
|
||||
;; (put 'quit-flag 'binding-is-magic t)
|
||||
;; (put 't 'binding-is-magic t)
|
||||
;; (put 'nil 'binding-is-magic t)
|
||||
;; possibly also
|
||||
;; (put 'gc-cons-threshold 'binding-is-magic t)
|
||||
;; (put 'track-mouse 'binding-is-magic t)
|
||||
;; others?
|
||||
;;
|
||||
;; Simple defsubsts often produce forms like
|
||||
;; (let ((v1 (f1)) (v2 (f2)) ...)
|
||||
;; (FN v1 v2 ...))
|
||||
;; It would be nice if we could optimize this to
|
||||
;; (FN (f1) (f2) ...)
|
||||
;; but we can't unless FN is dynamically-safe (it might be dynamically
|
||||
;; referring to the bindings that the lambda arglist established.)
|
||||
;; One of the uncountable lossages introduced by dynamic scope...
|
||||
;;
|
||||
;; Maybe there should be a control-structure that says "turn on
|
||||
;; fast-and-loose type-assumptive optimizations here." Then when
|
||||
;; we see a form like (car foo) we can from then on assume that
|
||||
;; the variable foo is of type cons, and optimize based on that.
|
||||
;; But, this won't win much because of (you guessed it) dynamic
|
||||
;; scope. Anything down the stack could change the value.
|
||||
;; (Another reason it doesn't work is that it is perfectly valid
|
||||
;; to call car with a null argument.) A better approach might
|
||||
;; be to allow type-specification of the form
|
||||
;; (put 'foo 'arg-types '(float (list integer) dynamic))
|
||||
;; (put 'foo 'result-type 'bool)
|
||||
;; It should be possible to have these types checked to a certain
|
||||
;; degree.
|
||||
;;
|
||||
;; collapse common subexpressions
|
||||
;;
|
||||
;; It would be nice if redundant sequences could be factored out as well,
|
||||
;; when they are known to have no side-effects:
|
||||
;; (list (+ a b c) (+ a b c)) --> a b add c add dup list-2
|
||||
;; but beware of traps like
|
||||
;; (cons (list x y) (list x y))
|
||||
;;
|
||||
;; Tail-recursion elimination is not really possible in Emacs Lisp.
|
||||
;; Tail-recursion elimination is almost always impossible when all variables
|
||||
;; have dynamic scope, but given that the "return" byteop requires the
|
||||
;; binding stack to be empty (rather than emptying it itself), there can be
|
||||
;; no truly tail-recursive Emacs Lisp functions that take any arguments or
|
||||
;; make any bindings.
|
||||
;;
|
||||
;; Here is an example of an Emacs Lisp function which could safely be
|
||||
;; byte-compiled tail-recursively:
|
||||
;;
|
||||
;; (defun tail-map (fn list)
|
||||
;; (cond (list
|
||||
;; (funcall fn (car list))
|
||||
;; (tail-map fn (cdr list)))))
|
||||
;;
|
||||
;; However, if there was even a single let-binding around the COND,
|
||||
;; it could not be byte-compiled, because there would be an "unbind"
|
||||
;; byte-op between the final "call" and "return." Adding a
|
||||
;; Bunbind_all byteop would fix this.
|
||||
;;
|
||||
;; (defun foo (x y z) ... (foo a b c))
|
||||
;; ... (const foo) (varref a) (varref b) (varref c) (call 3) END: (return)
|
||||
;; ... (varref a) (varbind x) (varref b) (varbind y) (varref c) (varbind z) (goto 0) END: (unbind-all) (return)
|
||||
;; ... (varref a) (varset x) (varref b) (varset y) (varref c) (varset z) (goto 0) END: (return)
|
||||
;;
|
||||
;; this also can be considered tail recursion:
|
||||
;;
|
||||
;; ... (const foo) (varref a) (call 1) (goto X) ... X: (return)
|
||||
;; could generalize this by doing the optimization
|
||||
;; (goto X) ... X: (return) --> (return)
|
||||
;;
|
||||
;; But this doesn't solve all of the problems: although by doing tail-
|
||||
;; recursion elimination in this way, the call-stack does not grow, the
|
||||
;; binding-stack would grow with each recursive step, and would eventually
|
||||
;; overflow. I don't believe there is any way around this without lexical
|
||||
;; scope.
|
||||
;;
|
||||
;; Wouldn't it be nice if Emacs Lisp had lexical scope.
|
||||
;;
|
||||
;; Idea: the form (lexical-scope) in a file means that the file may be
|
||||
;; compiled lexically. This proclamation is file-local. Then, within
|
||||
;; that file, "let" would establish lexical bindings, and "let-dynamic"
|
||||
;; would do things the old way. (Or we could use CL "declare" forms.)
|
||||
;; We'd have to notice defvars and defconsts, since those variables should
|
||||
;; always be dynamic, and attempting to do a lexical binding of them
|
||||
;; should simply do a dynamic binding instead.
|
||||
;; But! We need to know about variables that were not necessarily defvarred
|
||||
;; in the file being compiled (doing a boundp check isn't good enough.)
|
||||
;; Fdefvar() would have to be modified to add something to the plist.
|
||||
;;
|
||||
;; A major disadvantage of this scheme is that the interpreter and compiler
|
||||
;; would have different semantics for files compiled with (dynamic-scope).
|
||||
;; Since this would be a file-local optimization, there would be no way to
|
||||
;; modify the interpreter to obey this (unless the loader was hacked
|
||||
;; in some grody way, but that's a really bad idea.)
|
||||
|
||||
;; Other things to consider:
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
;;; bytecomp.el --- compilation of Lisp code into byte code.
|
||||
|
||||
;;; Copyright (C) 1985, 1986, 1987, 1992, 1994 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 1985, 1986, 1987, 1992, 1994 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Jamie Zawinski <jwz@lucid.com>
|
||||
;; Hallvard Furuseth <hbf@ulrik.uio.no>
|
||||
|
|
@ -25,8 +25,9 @@
|
|||
;; 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
;; 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.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
|
@ -36,120 +37,120 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
;;; ========================================================================
|
||||
;;; Entry points:
|
||||
;;; byte-recompile-directory, byte-compile-file,
|
||||
;;; batch-byte-compile, batch-byte-recompile-directory,
|
||||
;;; byte-compile, compile-defun,
|
||||
;;; display-call-tree
|
||||
;;; (byte-compile-buffer and byte-compile-and-load-file were turned off
|
||||
;;; because they are not terribly useful and get in the way of completion.)
|
||||
;; ========================================================================
|
||||
;; Entry points:
|
||||
;; byte-recompile-directory, byte-compile-file,
|
||||
;; batch-byte-compile, batch-byte-recompile-directory,
|
||||
;; byte-compile, compile-defun,
|
||||
;; display-call-tree
|
||||
;; (byte-compile-buffer and byte-compile-and-load-file were turned off
|
||||
;; because they are not terribly useful and get in the way of completion.)
|
||||
|
||||
;;; This version of the byte compiler has the following improvements:
|
||||
;;; + optimization of compiled code:
|
||||
;;; - removal of unreachable code;
|
||||
;;; - removal of calls to side-effectless functions whose return-value
|
||||
;;; is unused;
|
||||
;;; - compile-time evaluation of safe constant forms, such as (consp nil)
|
||||
;;; and (ash 1 6);
|
||||
;;; - open-coding of literal lambdas;
|
||||
;;; - peephole optimization of emitted code;
|
||||
;;; - trivial functions are left uncompiled for speed.
|
||||
;;; + support for inline functions;
|
||||
;;; + compile-time evaluation of arbitrary expressions;
|
||||
;;; + compile-time warning messages for:
|
||||
;;; - functions being redefined with incompatible arglists;
|
||||
;;; - functions being redefined as macros, or vice-versa;
|
||||
;;; - functions or macros defined multiple times in the same file;
|
||||
;;; - functions being called with the incorrect number of arguments;
|
||||
;;; - functions being called which are not defined globally, in the
|
||||
;;; file, or as autoloads;
|
||||
;;; - assignment and reference of undeclared free variables;
|
||||
;;; - various syntax errors;
|
||||
;;; + correct compilation of nested defuns, defmacros, defvars and defsubsts;
|
||||
;;; + correct compilation of top-level uses of macros;
|
||||
;;; + the ability to generate a histogram of functions called.
|
||||
;; This version of the byte compiler has the following improvements:
|
||||
;; + optimization of compiled code:
|
||||
;; - removal of unreachable code;
|
||||
;; - removal of calls to side-effectless functions whose return-value
|
||||
;; is unused;
|
||||
;; - compile-time evaluation of safe constant forms, such as (consp nil)
|
||||
;; and (ash 1 6);
|
||||
;; - open-coding of literal lambdas;
|
||||
;; - peephole optimization of emitted code;
|
||||
;; - trivial functions are left uncompiled for speed.
|
||||
;; + support for inline functions;
|
||||
;; + compile-time evaluation of arbitrary expressions;
|
||||
;; + compile-time warning messages for:
|
||||
;; - functions being redefined with incompatible arglists;
|
||||
;; - functions being redefined as macros, or vice-versa;
|
||||
;; - functions or macros defined multiple times in the same file;
|
||||
;; - functions being called with the incorrect number of arguments;
|
||||
;; - functions being called which are not defined globally, in the
|
||||
;; file, or as autoloads;
|
||||
;; - assignment and reference of undeclared free variables;
|
||||
;; - various syntax errors;
|
||||
;; + correct compilation of nested defuns, defmacros, defvars and defsubsts;
|
||||
;; + correct compilation of top-level uses of macros;
|
||||
;; + the ability to generate a histogram of functions called.
|
||||
|
||||
;;; User customization variables:
|
||||
;;;
|
||||
;;; byte-compile-verbose Whether to report the function currently being
|
||||
;;; compiled in the minibuffer;
|
||||
;;; byte-optimize Whether to do optimizations; this may be
|
||||
;;; t, nil, 'source, or 'byte;
|
||||
;;; byte-optimize-log Whether to report (in excruciating detail)
|
||||
;;; exactly which optimizations have been made.
|
||||
;;; This may be t, nil, 'source, or 'byte;
|
||||
;;; byte-compile-error-on-warn Whether to stop compilation when a warning is
|
||||
;;; produced;
|
||||
;;; byte-compile-delete-errors Whether the optimizer may delete calls or
|
||||
;;; variable references that are side-effect-free
|
||||
;;; except that they may return an error.
|
||||
;;; byte-compile-generate-call-tree Whether to generate a histogram of
|
||||
;;; function calls. This can be useful for
|
||||
;;; finding unused functions, as well as simple
|
||||
;;; performance metering.
|
||||
;;; byte-compile-warnings List of warnings to issue, or t. May contain
|
||||
;;; 'free-vars (references to variables not in the
|
||||
;;; current lexical scope)
|
||||
;;; 'unresolved (calls to unknown functions)
|
||||
;;; 'callargs (lambda calls with args that don't
|
||||
;;; match the lambda's definition)
|
||||
;;; 'redefine (function cell redefined from
|
||||
;;; a macro to a lambda or vice versa,
|
||||
;;; or redefined to take other args)
|
||||
;;; 'obsolete (obsolete variables and functions)
|
||||
;;; byte-compile-compatibility Whether the compiler should
|
||||
;;; generate .elc files which can be loaded into
|
||||
;;; generic emacs 18.
|
||||
;;; emacs-lisp-file-regexp Regexp for the extension of source-files;
|
||||
;;; see also the function byte-compile-dest-file.
|
||||
;; User customization variables:
|
||||
;;
|
||||
;; byte-compile-verbose Whether to report the function currently being
|
||||
;; compiled in the minibuffer;
|
||||
;; byte-optimize Whether to do optimizations; this may be
|
||||
;; t, nil, 'source, or 'byte;
|
||||
;; byte-optimize-log Whether to report (in excruciating detail)
|
||||
;; exactly which optimizations have been made.
|
||||
;; This may be t, nil, 'source, or 'byte;
|
||||
;; byte-compile-error-on-warn Whether to stop compilation when a warning is
|
||||
;; produced;
|
||||
;; byte-compile-delete-errors Whether the optimizer may delete calls or
|
||||
;; variable references that are side-effect-free
|
||||
;; except that they may return an error.
|
||||
;; byte-compile-generate-call-tree Whether to generate a histogram of
|
||||
;; function calls. This can be useful for
|
||||
;; finding unused functions, as well as simple
|
||||
;; performance metering.
|
||||
;; byte-compile-warnings List of warnings to issue, or t. May contain
|
||||
;; 'free-vars (references to variables not in the
|
||||
;; current lexical scope)
|
||||
;; 'unresolved (calls to unknown functions)
|
||||
;; 'callargs (lambda calls with args that don't
|
||||
;; match the lambda's definition)
|
||||
;; 'redefine (function cell redefined from
|
||||
;; a macro to a lambda or vice versa,
|
||||
;; or redefined to take other args)
|
||||
;; 'obsolete (obsolete variables and functions)
|
||||
;; byte-compile-compatibility Whether the compiler should
|
||||
;; generate .elc files which can be loaded into
|
||||
;; generic emacs 18.
|
||||
;; emacs-lisp-file-regexp Regexp for the extension of source-files;
|
||||
;; see also the function byte-compile-dest-file.
|
||||
|
||||
;;; New Features:
|
||||
;;;
|
||||
;;; o The form `defsubst' is just like `defun', except that the function
|
||||
;;; generated will be open-coded in compiled code which uses it. This
|
||||
;;; means that no function call will be generated, it will simply be
|
||||
;;; spliced in. Lisp functions calls are very slow, so this can be a
|
||||
;;; big win.
|
||||
;;;
|
||||
;;; You can generally accomplish the same thing with `defmacro', but in
|
||||
;;; that case, the defined procedure can't be used as an argument to
|
||||
;;; mapcar, etc.
|
||||
;;;
|
||||
;;; o You can also open-code one particular call to a function without
|
||||
;;; open-coding all calls. Use the 'inline' form to do this, like so:
|
||||
;;;
|
||||
;;; (inline (foo 1 2 3)) ;; `foo' will be open-coded
|
||||
;;; or...
|
||||
;;; (inline ;; `foo' and `baz' will be
|
||||
;;; (foo 1 2 3 (bar 5)) ;; open-coded, but `bar' will not.
|
||||
;;; (baz 0))
|
||||
;;;
|
||||
;;; o It is possible to open-code a function in the same file it is defined
|
||||
;;; in without having to load that file before compiling it. the
|
||||
;;; byte-compiler has been modified to remember function definitions in
|
||||
;;; the compilation environment in the same way that it remembers macro
|
||||
;;; definitions.
|
||||
;;;
|
||||
;;; o Forms like ((lambda ...) ...) are open-coded.
|
||||
;;;
|
||||
;;; o The form `eval-when-compile' is like progn, except that the body
|
||||
;;; is evaluated at compile-time. When it appears at top-level, this
|
||||
;;; is analogous to the Common Lisp idiom (eval-when (compile) ...).
|
||||
;;; When it does not appear at top-level, it is similar to the
|
||||
;;; Common Lisp #. reader macro (but not in interpreted code).
|
||||
;;;
|
||||
;;; o The form `eval-and-compile' is similar to eval-when-compile, but
|
||||
;;; the whole form is evalled both at compile-time and at run-time.
|
||||
;;;
|
||||
;;; o The command compile-defun is analogous to eval-defun.
|
||||
;;;
|
||||
;;; o If you run byte-compile-file on a filename which is visited in a
|
||||
;;; buffer, and that buffer is modified, you are asked whether you want
|
||||
;;; to save the buffer before compiling.
|
||||
;;;
|
||||
;;; o byte-compiled files now start with the string `;ELC'.
|
||||
;;; Some versions of `file' can be customized to recognize that.
|
||||
;; New Features:
|
||||
;;
|
||||
;; o The form `defsubst' is just like `defun', except that the function
|
||||
;; generated will be open-coded in compiled code which uses it. This
|
||||
;; means that no function call will be generated, it will simply be
|
||||
;; spliced in. Lisp functions calls are very slow, so this can be a
|
||||
;; big win.
|
||||
;;
|
||||
;; You can generally accomplish the same thing with `defmacro', but in
|
||||
;; that case, the defined procedure can't be used as an argument to
|
||||
;; mapcar, etc.
|
||||
;;
|
||||
;; o You can also open-code one particular call to a function without
|
||||
;; open-coding all calls. Use the 'inline' form to do this, like so:
|
||||
;;
|
||||
;; (inline (foo 1 2 3)) ;; `foo' will be open-coded
|
||||
;; or...
|
||||
;; (inline ;; `foo' and `baz' will be
|
||||
;; (foo 1 2 3 (bar 5)) ;; open-coded, but `bar' will not.
|
||||
;; (baz 0))
|
||||
;;
|
||||
;; o It is possible to open-code a function in the same file it is defined
|
||||
;; in without having to load that file before compiling it. the
|
||||
;; byte-compiler has been modified to remember function definitions in
|
||||
;; the compilation environment in the same way that it remembers macro
|
||||
;; definitions.
|
||||
;;
|
||||
;; o Forms like ((lambda ...) ...) are open-coded.
|
||||
;;
|
||||
;; o The form `eval-when-compile' is like progn, except that the body
|
||||
;; is evaluated at compile-time. When it appears at top-level, this
|
||||
;; is analogous to the Common Lisp idiom (eval-when (compile) ...).
|
||||
;; When it does not appear at top-level, it is similar to the
|
||||
;; Common Lisp #. reader macro (but not in interpreted code).
|
||||
;;
|
||||
;; o The form `eval-and-compile' is similar to eval-when-compile, but
|
||||
;; the whole form is evalled both at compile-time and at run-time.
|
||||
;;
|
||||
;; o The command compile-defun is analogous to eval-defun.
|
||||
;;
|
||||
;; o If you run byte-compile-file on a filename which is visited in a
|
||||
;; buffer, and that buffer is modified, you are asked whether you want
|
||||
;; to save the buffer before compiling.
|
||||
;;
|
||||
;; o byte-compiled files now start with the string `;ELC'.
|
||||
;; Some versions of `file' can be customized to recognize that.
|
||||
|
||||
(require 'backquote)
|
||||
|
||||
|
|
|
|||
|
|
@ -19,8 +19,9 @@
|
|||
;; 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
;; 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.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
|
|
|||
|
|
@ -19,8 +19,9 @@
|
|||
;; 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
;; 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.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
|
|
|||
|
|
@ -20,8 +20,9 @@
|
|||
;; 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
;; 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.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
|
|
|||
|
|
@ -19,8 +19,9 @@
|
|||
;; 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
;; 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.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
|
|
|||
|
|
@ -19,8 +19,9 @@
|
|||
;; 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
;; 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.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
;; LCD Archive Entry:
|
||||
;; cl-specs.el|Daniel LaLiberte|liberte@cs.uiuc.edu
|
||||
;; |Edebug specs for cl.el
|
||||
;; |$Date: 1995/10/30 16:51:55 $|1.1|
|
||||
;; |$Date: 1996/01/05 21:56:25 $|1.1|
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
||||
|
|
@ -22,8 +22,9 @@
|
|||
;; 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
;; 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.
|
||||
|
||||
;;;; Commentary:
|
||||
|
||||
|
|
|
|||
|
|
@ -19,8 +19,9 @@
|
|||
;; 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
;; 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.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
|
|
|||
|
|
@ -18,8 +18,9 @@
|
|||
;; 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
;; 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.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
|
|
|||
|
|
@ -18,8 +18,9 @@
|
|||
;; 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
;; 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.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
;;; disass.el --- disassembler for compiled Emacs Lisp code
|
||||
|
||||
;;; Copyright (C) 1986, 1991 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 1986, 1991 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Doug Cutting <doug@csli.stanford.edu>
|
||||
;; Jamie Zawinski <jwz@lucid.com>
|
||||
|
|
@ -20,8 +20,9 @@
|
|||
;; 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
;; 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.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
|
|
|||
|
|
@ -18,12 +18,15 @@
|
|||
;; 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
;; 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.
|
||||
|
||||
;;; This is compatible with easymenu.el by Per Abrahamsen
|
||||
;;; but it is much simpler as it doesn't try to support other Emacs versions.
|
||||
;;; The code was mostly derived from lmenu.el.
|
||||
;;; Commentary:
|
||||
|
||||
;; This is compatible with easymenu.el by Per Abrahamsen
|
||||
;; but it is much simpler as it doesn't try to support other Emacs versions.
|
||||
;; The code was mostly derived from lmenu.el.
|
||||
|
||||
;;; Code:
|
||||
|
||||
|
|
|
|||
|
|
@ -22,8 +22,9 @@
|
|||
;; 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
;; 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.
|
||||
|
||||
;;; Commentary:
|
||||
;;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
;;; eval-reg.el --- Redefine eval-region, and subrs that use it, in Lisp
|
||||
|
||||
;; Copyright (C) 1994 Daniel LaLiberte
|
||||
;; Copyright (C) 1994, 1996 Daniel LaLiberte
|
||||
|
||||
;; Author: Daniel LaLiberte <liberte@cs.uiuc.edu>
|
||||
;; Keywords: lisp
|
||||
|
|
@ -21,26 +21,28 @@
|
|||
;; along with GNU Emacs; see the file COPYING. If not, write to
|
||||
;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
;;;; Commentary:
|
||||
;;; Commentary:
|
||||
|
||||
;;; eval-region, eval-buffer, and eval-current-buffer are redefined in
|
||||
;;; Lisp to allow customizations by Lisp code. eval-region calls
|
||||
;;; `read', `eval', and `prin1', so Lisp replacements of these
|
||||
;;; functions will affect eval-region and anything else that calls it.
|
||||
;;; eval-buffer and eval-current-buffer are redefined in Lisp to call
|
||||
;;; eval-region on the buffer.
|
||||
;; eval-region, eval-buffer, and eval-current-buffer are redefined in
|
||||
;; Lisp to allow customizations by Lisp code. eval-region calls
|
||||
;; `read', `eval', and `prin1', so Lisp replacements of these
|
||||
;; functions will affect eval-region and anything else that calls it.
|
||||
;; eval-buffer and eval-current-buffer are redefined in Lisp to call
|
||||
;; eval-region on the buffer.
|
||||
|
||||
;;; Because of dynamic binding, all local variables are protected from
|
||||
;;; being seen by eval by giving them funky names. But variables in
|
||||
;;; routines that call eval-region are similarly exposed.
|
||||
;; Because of dynamic binding, all local variables are protected from
|
||||
;; being seen by eval by giving them funky names. But variables in
|
||||
;; routines that call eval-region are similarly exposed.
|
||||
|
||||
;;; Perhaps this should be one of several files in an `elisp' package
|
||||
;;; that replaces Emacs Lisp subroutines with Lisp versions of the
|
||||
;;; same.
|
||||
;; Perhaps this should be one of several files in an `elisp' package
|
||||
;; that replaces Emacs Lisp subroutines with Lisp versions of the
|
||||
;; same.
|
||||
|
||||
;;; Eval-region may be installed, after loading, by calling:
|
||||
;;; (elisp-eval-region-install). Installation can be undone with:
|
||||
;;; (elisp-eval-region-uninstall).
|
||||
;; Eval-region may be installed, after loading, by calling:
|
||||
;; (elisp-eval-region-install). Installation can be undone with:
|
||||
;; (elisp-eval-region-uninstall).
|
||||
|
||||
;;; Code:
|
||||
|
||||
'(defpackage "elisp-eval-region"
|
||||
(:nicknames "elisp")
|
||||
|
|
|
|||
|
|
@ -19,8 +19,9 @@
|
|||
;; 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
;; 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.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
|
|
|||
|
|
@ -19,12 +19,13 @@
|
|||
;; 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
;; 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.
|
||||
|
||||
;;; Code:
|
||||
|
||||
; hey, here's a helping hand.
|
||||
;; hey, here's a helping hand.
|
||||
|
||||
;; Bind this to a string for <blank> in "... Other keys <blank>".
|
||||
;; Helper-help uses this to construct help string when scrolling.
|
||||
|
|
|
|||
|
|
@ -15,8 +15,9 @@
|
|||
;; 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
;; 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.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
|
||||
;; Maintainer: Eric S. Raymond <esr@snark.thyrsus.com>
|
||||
;; Created: 14 Jul 1992
|
||||
;; Version: $Id: lisp-mnt.el,v 1.10 1995/03/16 04:37:48 rms Exp kwzh $
|
||||
;; Version: $Id: lisp-mnt.el,v 1.11 1995/06/15 20:42:24 kwzh Exp erik $
|
||||
;; Keywords: docs
|
||||
;; X-Bogus-Bureaucratic-Cruft: Gruad will get you if you don't watch out!
|
||||
|
||||
|
|
@ -22,8 +22,9 @@
|
|||
;; 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
;; 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.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
|
|
|||
|
|
@ -18,8 +18,9 @@
|
|||
;; 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
;; 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.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
|
|
|||
|
|
@ -18,8 +18,9 @@
|
|||
;; 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
;; 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.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
;;; lmenu.el --- emulate Lucid's menubar support
|
||||
|
||||
;; Keywords: emulations
|
||||
|
||||
;; Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
|
||||
|
||||
;; Keywords: emulations
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
||||
;; GNU Emacs is free software; you can redistribute it and/or modify
|
||||
|
|
@ -17,8 +17,9 @@
|
|||
;; 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
;; 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.
|
||||
|
||||
;;; Code:
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
;;; lselect.el --- Lucid interface to X Selections
|
||||
|
||||
;; Copyright (C) 1990, 1993 Free Software Foundation, Inc.
|
||||
|
||||
;; Keywords: emulations
|
||||
|
||||
;; This won't completely work until we support or emulate Lucid-style extents.
|
||||
;; Copyright (C) 1990, 1993 Free Software Foundation, Inc.
|
||||
;; Based on Lucid's selection code.
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
|
@ -19,8 +20,9 @@
|
|||
;; 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
;; 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.
|
||||
|
||||
;;; Code:
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
;;; lucid.el --- Emulate some Lucid Emacs functions.
|
||||
|
||||
;; Copyright (C) 1993, 1995 Free Software Foundation, Inc.
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
|
@ -14,9 +15,11 @@
|
|||
;; 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
;; 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.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(defun add-timeout (secs function object &optional resignal)
|
||||
(run-at-time secs resignal function object))
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
;;; pp.el --- pretty printer for Emacs Lisp
|
||||
|
||||
;; Copyright (C) 1989, 1993 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Randal Schwartz <merlyn@ora.com>
|
||||
|
|
@ -16,8 +17,9 @@
|
|||
;; 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
;; 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.
|
||||
|
||||
;;; Code:
|
||||
|
||||
|
|
|
|||
|
|
@ -21,49 +21,50 @@
|
|||
;; 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
;; 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.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
; DESCRIPTION:
|
||||
; ------------
|
||||
; This program can be used to monitor running time performance of Emacs Lisp
|
||||
; functions. It takes a list of functions and report the real time spent
|
||||
; inside these functions. It runs a process with a separate timer program.
|
||||
; Caveat: the C code in ../lib-src/profile.c requires BSD-compatible
|
||||
; time-of-day functions. If you're running an AT&T version prior to SVr4,
|
||||
; you may have difficulty getting it to work. Your X library may supply
|
||||
; the required routines if the standard C library does not.
|
||||
;; DESCRIPTION:
|
||||
;; ------------
|
||||
;; This program can be used to monitor running time performance of Emacs Lisp
|
||||
;; functions. It takes a list of functions and report the real time spent
|
||||
;; inside these functions. It runs a process with a separate timer program.
|
||||
;; Caveat: the C code in ../lib-src/profile.c requires BSD-compatible
|
||||
;; time-of-day functions. If you're running an AT&T version prior to SVr4,
|
||||
;; you may have difficulty getting it to work. Your X library may supply
|
||||
;; the required routines if the standard C library does not.
|
||||
|
||||
; HOW TO USE:
|
||||
; -----------
|
||||
; Set the variable profile-functions-list to the list of functions
|
||||
; (as symbols) You want to profile. Call M-x profile-functions to set
|
||||
; this list on and start using your program. Note that profile-functions
|
||||
; MUST be called AFTER all the functions in profile-functions-list have
|
||||
; been loaded !! (This call modifies the code of the profiled functions.
|
||||
; Hence if you reload these functions, you need to call profile-functions
|
||||
; again! ).
|
||||
; To display the results do M-x profile-results . For example:
|
||||
;-------------------------------------------------------------------
|
||||
; (setq profile-functions-list '(sokoban-set-mode-line sokoban-load-game
|
||||
; sokoban-move-vertical sokoban-move))
|
||||
; (load "sokoban")
|
||||
; M-x profile-functions
|
||||
; ... I play the sokoban game ..........
|
||||
; M-x profile-results
|
||||
;
|
||||
; Function Time (Seconds.Useconds)
|
||||
; ======== =======================
|
||||
; sokoban-move 0.539088
|
||||
; sokoban-move-vertical 0.410130
|
||||
; sokoban-load-game 0.453235
|
||||
; sokoban-set-mode-line 1.949203
|
||||
;-----------------------------------------------------
|
||||
; To clear all the settings to profile use profile-finish.
|
||||
; To set one function at a time (instead of or in addition to setting the
|
||||
; above list and M-x profile-functions) use M-x profile-a-function.
|
||||
;; HOW TO USE:
|
||||
;; -----------
|
||||
;; Set the variable profile-functions-list to the list of functions
|
||||
;; (as symbols) You want to profile. Call M-x profile-functions to set
|
||||
;; this list on and start using your program. Note that profile-functions
|
||||
;; MUST be called AFTER all the functions in profile-functions-list have
|
||||
;; been loaded !! (This call modifies the code of the profiled functions.
|
||||
;; Hence if you reload these functions, you need to call profile-functions
|
||||
;; again! ).
|
||||
;; To display the results do M-x profile-results . For example:
|
||||
;;-------------------------------------------------------------------
|
||||
;; (setq profile-functions-list '(sokoban-set-mode-line sokoban-load-game
|
||||
;; sokoban-move-vertical sokoban-move))
|
||||
;; (load "sokoban")
|
||||
;; M-x profile-functions
|
||||
;; ... I play the sokoban game ..........
|
||||
;; M-x profile-results
|
||||
;;
|
||||
;; Function Time (Seconds.Useconds)
|
||||
;; ======== =======================
|
||||
;; sokoban-move 0.539088
|
||||
;; sokoban-move-vertical 0.410130
|
||||
;; sokoban-load-game 0.453235
|
||||
;; sokoban-set-mode-line 1.949203
|
||||
;;-----------------------------------------------------
|
||||
;; To clear all the settings to profile use profile-finish.
|
||||
;; To set one function at a time (instead of or in addition to setting the
|
||||
;; above list and M-x profile-functions) use M-x profile-a-function.
|
||||
|
||||
;;; Code:
|
||||
|
||||
|
|
|
|||
|
|
@ -18,24 +18,25 @@
|
|||
;; 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
;; 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.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;;; This code defines a ring data structure. A ring is a
|
||||
;;; (hd-index length . vector)
|
||||
;;; list. You can insert to, remove from, and rotate a ring. When the ring
|
||||
;;; fills up, insertions cause the oldest elts to be quietly dropped.
|
||||
;;;
|
||||
;;; In ring-ref, 0 is the index of the newest element. Higher indexes
|
||||
;;; correspond to older elements until they wrap.
|
||||
;;;
|
||||
;;; hd-index = index of the newest item on the ring.
|
||||
;;; length = number of ring items.
|
||||
;;;
|
||||
;;; These functions are used by the input history mechanism, but they can
|
||||
;;; be used for other purposes as well.
|
||||
;; This code defines a ring data structure. A ring is a
|
||||
;; (hd-index length . vector)
|
||||
;; list. You can insert to, remove from, and rotate a ring. When the ring
|
||||
;; fills up, insertions cause the oldest elts to be quietly dropped.
|
||||
;;
|
||||
;; In ring-ref, 0 is the index of the newest element. Higher indexes
|
||||
;; correspond to older elements until they wrap.
|
||||
;;
|
||||
;; hd-index = index of the newest item on the ring.
|
||||
;; length = number of ring items.
|
||||
;;
|
||||
;; These functions are used by the input history mechanism, but they can
|
||||
;; be used for other purposes as well.
|
||||
|
||||
;;; Code:
|
||||
|
||||
|
|
|
|||
|
|
@ -19,11 +19,12 @@
|
|||
;; 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
;; 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.
|
||||
|
||||
;;; Commentary:
|
||||
;;
|
||||
|
||||
;; The functions in this file detect (`find-emacs-lisp-shadows')
|
||||
;; and display (`list-load-path-shadows') potential load-path
|
||||
;; problems that arise when Emacs Lisp files "shadow" each other.
|
||||
|
|
|
|||
|
|
@ -19,8 +19,9 @@
|
|||
;; 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
;; 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.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
|
|
|||
|
|
@ -19,8 +19,9 @@
|
|||
;; 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
;; 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.
|
||||
|
||||
;; LCD Archive Entry:
|
||||
;; trace|Hans Chalupsky|hans@cs.buffalo.edu|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue