; More minor docfixes found by checkdoc
This commit is contained in:
parent
cf2fa6c87f
commit
25ebb9374b
69 changed files with 228 additions and 228 deletions
|
@ -36,12 +36,12 @@
|
|||
;; @ Introduction:
|
||||
;; ===============
|
||||
;; This package implements a full-fledged Lisp-style advice mechanism
|
||||
;; for Emacs Lisp. Advice is a clean and efficient way to modify the
|
||||
;; for Emacs Lisp. Advice is a clean and efficient way to modify the
|
||||
;; behavior of Emacs Lisp functions without having to keep personal
|
||||
;; modified copies of such functions around. A great number of such
|
||||
;; modified copies of such functions around. A great number of such
|
||||
;; modifications can be achieved by treating the original function as a
|
||||
;; black box and specifying a different execution environment for it
|
||||
;; with a piece of advice. Think of a piece of advice as a kind of fancy
|
||||
;; with a piece of advice. Think of a piece of advice as a kind of fancy
|
||||
;; hook that you can attach to any function/macro/subr.
|
||||
|
||||
;; @ Highlights:
|
||||
|
@ -95,7 +95,7 @@
|
|||
;; @ Restrictions:
|
||||
;; ===============
|
||||
;; - Advised functions/macros/subrs will only exhibit their advised behavior
|
||||
;; when they are invoked via their function cell. This means that advice will
|
||||
;; when they are invoked via their function cell. This means that advice will
|
||||
;; not work for the following:
|
||||
;; + advised subrs that are called directly from other subrs or C-code
|
||||
;; + advised subrs that got replaced with their byte-code during
|
||||
|
@ -107,7 +107,7 @@
|
|||
;; ==========
|
||||
;; This package is an extension and generalization of packages such as
|
||||
;; insert-hooks.el written by Noah S. Friedman, and advise.el written by
|
||||
;; Raul J. Acevedo. Some ideas used in here come from these packages,
|
||||
;; Raul J. Acevedo. Some ideas used in here come from these packages,
|
||||
;; others come from the various Lisp advice mechanisms I've come across
|
||||
;; so far, and a few are simply mine.
|
||||
|
||||
|
@ -235,10 +235,10 @@
|
|||
;; found in the list of before/around/after advices will be used.
|
||||
|
||||
;; <flags> is a list of symbols that specify further information about the
|
||||
;; advice. All flags can be specified with unambiguous initial substrings.
|
||||
;; advice. All flags can be specified with unambiguous initial substrings.
|
||||
;; `activate': Specifies that the advice information of the advised
|
||||
;; function should be activated right after this advice has been
|
||||
;; defined. In forward advices `activate' will be ignored.
|
||||
;; defined. In forward advices `activate' will be ignored.
|
||||
;; `protect': Specifies that this advice should be protected against
|
||||
;; non-local exits and errors in preceding code/advices.
|
||||
;; `compile': Specifies that the advised function should be byte-compiled.
|
||||
|
@ -347,7 +347,7 @@
|
|||
;; argument list redefinition given in a piece of advice. While this simple
|
||||
;; method might be sufficient in many cases, it has the disadvantage that it
|
||||
;; is not very portable because it hardcodes the argument names into the
|
||||
;; advice. If the definition of the original function changes the advice
|
||||
;; advice. If the definition of the original function changes the advice
|
||||
;; might break even though the code might still be correct. Situations like
|
||||
;; that arise, for example, if one advises a subr like `eval-region' which
|
||||
;; gets redefined in a non-advice style into a function by the edebug
|
||||
|
@ -443,7 +443,7 @@
|
|||
;; of the advised function we need a mapping mechanism that maps this
|
||||
;; argument list onto that of the original function. Hence SYM and
|
||||
;; NEWDEF have to be properly mapped onto the &rest variable when the
|
||||
;; original definition is called. Advice automatically takes care of
|
||||
;; original definition is called. Advice automatically takes care of
|
||||
;; that mapping, hence, the advice programmer can specify an argument
|
||||
;; list without having to know about the exact structure of the
|
||||
;; original argument list as long as the new argument list takes a
|
||||
|
@ -467,7 +467,7 @@
|
|||
;; The advised definition will get compiled either if `ad-activate' was called
|
||||
;; interactively with a prefix argument, or called explicitly with its second
|
||||
;; argument as t, or, if `ad-default-compilation-action' justifies it according
|
||||
;; to the current system state. If the advised definition was
|
||||
;; to the current system state. If the advised definition was
|
||||
;; constructed during "preactivation" (see below) then that definition will
|
||||
;; be already compiled because it was constructed during byte-compilation of
|
||||
;; the file that contained the `defadvice' with the `preactivate' flag.
|
||||
|
@ -707,7 +707,7 @@
|
|||
;; @@ Adding a piece of advice with `ad-add-advice':
|
||||
;; =================================================
|
||||
;; The non-interactive function `ad-add-advice' can be used to add a piece of
|
||||
;; advice to some function without using `defadvice'. This is useful if advice
|
||||
;; advice to some function without using `defadvice'. This is useful if advice
|
||||
;; has to be added somewhere by a function (also look at `ad-make-advice').
|
||||
|
||||
;; @@ Activation/deactivation advices, file load hooks:
|
||||
|
@ -739,7 +739,7 @@
|
|||
;; A piece of advice gets defined with `defadvice' and added to the
|
||||
;; `advice-info' property of a function.
|
||||
;; - Enablement:
|
||||
;; Every piece of advice has an enablement flag associated with it. Only
|
||||
;; Every piece of advice has an enablement flag associated with it. Only
|
||||
;; enabled advices are considered during construction of an advised
|
||||
;; definition.
|
||||
;; - Activation:
|
||||
|
@ -808,9 +808,9 @@
|
|||
;; argument access text macros to get/set the values of
|
||||
;; actual arguments at a certain position
|
||||
;; ad-arg-bindings text macro that returns the actual names, values
|
||||
;; and types of the arguments as a list of bindings. The
|
||||
;; and types of the arguments as a list of bindings. The
|
||||
;; order of the bindings corresponds to the order of the
|
||||
;; arguments. The individual fields of every binding (name,
|
||||
;; arguments. The individual fields of every binding (name,
|
||||
;; value and type) can be accessed with the function
|
||||
;; `ad-arg-binding-field' (see example above).
|
||||
;; ad-do-it text macro that identifies the place where the original
|
||||
|
@ -839,20 +839,20 @@
|
|||
;; use the macro `defadvice' which takes a function name, a list of advice
|
||||
;; specifiers and a list of body forms as arguments. The first element of
|
||||
;; the advice specifiers is the class of the advice, the second is its name,
|
||||
;; the third its position and the rest are some flags. The class of our
|
||||
;; the third its position and the rest are some flags. The class of our
|
||||
;; first advice is `before', its name is `fg-add2', its position among the
|
||||
;; currently defined before advices (none so far) is `first', and the advice
|
||||
;; will be `activate'ed immediately. Advice names are global symbols, hence,
|
||||
;; the name space conventions used for function names should be applied. All
|
||||
;; will be `activate'ed immediately. Advice names are global symbols, hence,
|
||||
;; the name space conventions used for function names should be applied. All
|
||||
;; advice names in this tutorial will be prefixed with `fg' for `Foo Games'
|
||||
;; (because everybody has the right to be inconsistent all the function names
|
||||
;; used in this tutorial do NOT follow this convention).
|
||||
;;
|
||||
;; In the body of an advice we can refer to the argument variables of the
|
||||
;; original function by name. Here we add 1 to X so the effect of calling
|
||||
;; original function by name. Here we add 1 to X so the effect of calling
|
||||
;; `foo' will be to actually add 2. All of the advice definitions below only
|
||||
;; have one body form for simplicity, but there is no restriction to that
|
||||
;; extent. Every piece of advice can have a documentation string which will
|
||||
;; extent. Every piece of advice can have a documentation string which will
|
||||
;; be combined with the documentation of the original function.
|
||||
;;
|
||||
;; (defadvice foo (before fg-add2 first activate)
|
||||
|
@ -866,11 +866,11 @@
|
|||
;; @@ Specifying the position of an advice:
|
||||
;; ========================================
|
||||
;; Now we define the second before advice which will cancel the effect of
|
||||
;; the previous advice. This time we specify the position as 0 which is
|
||||
;; equivalent to `first'. A number can be used to specify the zero-based
|
||||
;; position of an advice among the list of advices in the same class. This
|
||||
;; the previous advice. This time we specify the position as 0 which is
|
||||
;; equivalent to `first'. A number can be used to specify the zero-based
|
||||
;; position of an advice among the list of advices in the same class. This
|
||||
;; time we already have one before advice hence the position specification
|
||||
;; actually has an effect. So, after the following definition the position
|
||||
;; actually has an effect. So, after the following definition the position
|
||||
;; of the previous advice will be 1 even though we specified it with `first'
|
||||
;; above, the reason for this is that the position argument is relative to
|
||||
;; the currently defined pieces of advice which by now has changed.
|
||||
|
@ -886,7 +886,7 @@
|
|||
;; @@ Redefining a piece of advice:
|
||||
;; ================================
|
||||
;; Now we define an advice with the same class and same name but with a
|
||||
;; different position. Defining an advice in a class in which an advice with
|
||||
;; different position. Defining an advice in a class in which an advice with
|
||||
;; that name already exists is interpreted as a redefinition of that
|
||||
;; particular advice, in which case the position argument will be ignored
|
||||
;; and the previous position of the redefined piece of advice is used.
|
||||
|
@ -919,7 +919,7 @@
|
|||
;; =================================
|
||||
;; We can make a function interactive (or change its interactive behavior)
|
||||
;; by specifying an interactive form in one of the before or around
|
||||
;; advices (there could also be body forms in this advice). The particular
|
||||
;; advices (there could also be body forms in this advice). The particular
|
||||
;; definition always assigns 5 as an argument to X which gives us 6 as a
|
||||
;; result when we call foo interactively:
|
||||
;;
|
||||
|
@ -945,13 +945,13 @@
|
|||
;;
|
||||
;; @@ Around advices:
|
||||
;; ==================
|
||||
;; Now we'll try some `around' advices. An around advice is a wrapper around
|
||||
;; the original definition. It can shadow or establish bindings for the
|
||||
;; Now we'll try some `around' advices. An around advice is a wrapper around
|
||||
;; the original definition. It can shadow or establish bindings for the
|
||||
;; original definition, and it can look at and manipulate the value returned
|
||||
;; by the original function. The position of the special keyword `ad-do-it'
|
||||
;; specifies where the code of the original function will be executed. The
|
||||
;; by the original function. The position of the special keyword `ad-do-it'
|
||||
;; specifies where the code of the original function will be executed. The
|
||||
;; keyword can appear multiple times which will result in multiple calls of
|
||||
;; the original function in the resulting advised code. Note, that if we don't
|
||||
;; the original function in the resulting advised code. Note, that if we don't
|
||||
;; specify a position argument (i.e., `first', `last' or a number), then
|
||||
;; `first' (or 0) is the default):
|
||||
;;
|
||||
|
@ -967,7 +967,7 @@
|
|||
;; Around advices are assembled like onion skins where the around advice
|
||||
;; with position 0 is the outermost skin and the advice at the last position
|
||||
;; is the innermost skin which is directly wrapped around the call of the
|
||||
;; original definition of the function. Hence, after the next `defadvice' we
|
||||
;; original definition of the function. Hence, after the next `defadvice' we
|
||||
;; will first multiply X by 2 then add 1 and then call the original
|
||||
;; definition (i.e., add 1 again):
|
||||
;;
|
||||
|
@ -984,8 +984,8 @@
|
|||
;; =================================
|
||||
;; In every `defadvice' so far we have used the flag `activate' to activate
|
||||
;; the advice immediately after its definition, and that's what we want in
|
||||
;; most cases. However, if we define multiple pieces of advice for a single
|
||||
;; function then activating every advice immediately is inefficient. A
|
||||
;; most cases. However, if we define multiple pieces of advice for a single
|
||||
;; function then activating every advice immediately is inefficient. A
|
||||
;; better way to do this is to only activate the last defined advice.
|
||||
;; For example:
|
||||
;;
|
||||
|
@ -1077,7 +1077,7 @@
|
|||
;; neutralize the effect of the advice of one of the packages.
|
||||
;;
|
||||
;; The following disables the after advice `fg-times-x' in the function `foo'.
|
||||
;; All that does is to change a flag for this particular advice. All the
|
||||
;; All that does is to change a flag for this particular advice. All the
|
||||
;; other information defining it will be left unchanged (e.g., its relative
|
||||
;; position in this advice class, etc.).
|
||||
;;
|
||||
|
@ -1094,9 +1094,9 @@
|
|||
;; 24
|
||||
;;
|
||||
;; If we want to disable all multiplication advices in `foo' we can use a
|
||||
;; regular expression that matches the names of such advices. Actually, any
|
||||
;; regular expression that matches the names of such advices. Actually, any
|
||||
;; advice name that contains a match for the regular expression will be
|
||||
;; called a match. A special advice class `any' can be used to consider
|
||||
;; called a match. A special advice class `any' can be used to consider
|
||||
;; all advice classes:
|
||||
;;
|
||||
;; (ad-disable-advice 'foo 'any "^fg-.*times")
|
||||
|
@ -1122,7 +1122,7 @@
|
|||
;; 9
|
||||
;;
|
||||
;; The following will activate all currently active advised functions that
|
||||
;; contain some advice matched by the regular expression. This is a save
|
||||
;; contain some advice matched by the regular expression. This is a save
|
||||
;; way to update the activation of advised functions whose advice changed
|
||||
;; in some way or other without accidentally also activating currently
|
||||
;; inactive functions:
|
||||
|
@ -1136,7 +1136,7 @@
|
|||
;;
|
||||
;; Another use for the dis/enablement mechanism is to define a piece of advice
|
||||
;; and keep it "dormant" until a particular condition is satisfied, i.e., until
|
||||
;; then the advice will not be used during activation. The `disable' flag lets
|
||||
;; then the advice will not be used during activation. The `disable' flag lets
|
||||
;; one do that with `defadvice':
|
||||
;;
|
||||
;; (defadvice foo (before fg-1-more dis)
|
||||
|
@ -1165,7 +1165,7 @@
|
|||
;; ===========
|
||||
;; Advised definitions get cached to allow efficient activation/deactivation
|
||||
;; without having to reconstruct them if nothing in the advice-info of a
|
||||
;; function has changed. The following idiom can be used to temporarily
|
||||
;; function has changed. The following idiom can be used to temporarily
|
||||
;; deactivate functions that have a piece of advice defined by a certain
|
||||
;; package (we save the old definition to check out caching):
|
||||
;;
|
||||
|
@ -1350,9 +1350,9 @@
|
|||
;; @@ Portable argument access:
|
||||
;; ============================
|
||||
;; So far, we always used the actual argument variable names to access an
|
||||
;; argument in a piece of advice. For many advice applications this is
|
||||
;; perfectly ok and keeps advices simple. However, it decreases portability
|
||||
;; of advices because it assumes specific argument variable names. For example,
|
||||
;; argument in a piece of advice. For many advice applications this is
|
||||
;; perfectly ok and keeps advices simple. However, it decreases portability
|
||||
;; of advices because it assumes specific argument variable names. For example,
|
||||
;; if one advises a subr such as `eval-region' which then gets redefined by
|
||||
;; some package (e.g., edebug) into a function with different argument names,
|
||||
;; then a piece of advice written for `eval-region' that was written with
|
||||
|
@ -1360,7 +1360,7 @@
|
|||
;;
|
||||
;; Argument access text macros allow one to access arguments of an advised
|
||||
;; function in a portable way without having to worry about all these
|
||||
;; possibilities. These macros will be translated into the proper access forms
|
||||
;; possibilities. These macros will be translated into the proper access forms
|
||||
;; at activation time, hence, argument access will be as efficient as if
|
||||
;; the arguments had been used directly in the definition of the advice.
|
||||
;;
|
||||
|
@ -1386,7 +1386,7 @@
|
|||
;; (fuu 1 1 1)
|
||||
;; 6
|
||||
;;
|
||||
;; Now suppose somebody redefines `fuu' with a rest argument. Our advice
|
||||
;; Now suppose somebody redefines `fuu' with a rest argument. Our advice
|
||||
;; will still work because we used access macros (note, that automatic
|
||||
;; advice activation is still in effect, hence, the redefinition of `fuu'
|
||||
;; will automatically activate all its advice):
|
||||
|
@ -1444,9 +1444,9 @@
|
|||
;; give it an extra argument that controls the advised code, for example, one
|
||||
;; might want to make an interactive function sensitive to a prefix argument.
|
||||
;; For such cases `defadvice' allows the specification of an argument list
|
||||
;; for the advised function. Similar to the redefinition of interactive
|
||||
;; for the advised function. Similar to the redefinition of interactive
|
||||
;; behavior, the first argument list specification found in the list of before/
|
||||
;; around/after advices will be used. Of course, the specified argument list
|
||||
;; around/after advices will be used. Of course, the specified argument list
|
||||
;; should be downward compatible with the original argument list, otherwise
|
||||
;; functions that call the advised function with the original argument list
|
||||
;; in mind will break.
|
||||
|
@ -1457,9 +1457,9 @@
|
|||
;; fii
|
||||
;;
|
||||
;; Now we advise `fii' to use an optional second argument that controls the
|
||||
;; amount of incrementing. A list following the (optional) position
|
||||
;; amount of incrementing. A list following the (optional) position
|
||||
;; argument of the advice will be interpreted as an argument list
|
||||
;; specification. This means you cannot specify an empty argument list, and
|
||||
;; specification. This means you cannot specify an empty argument list, and
|
||||
;; why would you want to anyway?
|
||||
;;
|
||||
;; (defadvice fii (before fg-inc-x (x &optional incr) act)
|
||||
|
@ -1476,22 +1476,22 @@
|
|||
;; @@ Advising interactive subrs:
|
||||
;; ==============================
|
||||
;; For the most part there is no difference between advising functions and
|
||||
;; advising subrs. There is one situation though where one might have to write
|
||||
;; slightly different advice code for subrs than for functions. This case
|
||||
;; advising subrs. There is one situation though where one might have to write
|
||||
;; slightly different advice code for subrs than for functions. This case
|
||||
;; arises when one wants to access subr arguments in a before/around advice
|
||||
;; when the arguments were determined by an interactive call to the subr.
|
||||
;; Advice cannot determine what `interactive' form determines the interactive
|
||||
;; behavior of the subr, hence, when it calls the original definition in an
|
||||
;; interactive subr invocation it has to use `call-interactively' to generate
|
||||
;; the proper interactive behavior. Thus up to that call the arguments of the
|
||||
;; interactive subr will be nil. For example, the following advice for
|
||||
;; the proper interactive behavior. Thus up to that call the arguments of the
|
||||
;; interactive subr will be nil. For example, the following advice for
|
||||
;; `kill-buffer' will not work in an interactive invocation...
|
||||
;;
|
||||
;; (defadvice kill-buffer (before fg-kill-buffer-hook first act preact comp)
|
||||
;; (my-before-kill-buffer-hook (ad-get-arg 0)))
|
||||
;; kill-buffer
|
||||
;;
|
||||
;; ...because the buffer argument will be nil in that case. The way out of
|
||||
;; ...because the buffer argument will be nil in that case. The way out of
|
||||
;; this dilemma is to provide an `interactive' specification that mirrors
|
||||
;; the interactive behavior of the unadvised subr, for example, the following
|
||||
;; will do the right thing even when `kill-buffer' is called interactively:
|
||||
|
@ -1508,10 +1508,10 @@
|
|||
;; For an advised macro instead of evaluating the original definition we
|
||||
;; use `macroexpand', that is, changing argument values and binding
|
||||
;; environments by pieces of advice has an affect during macro expansion
|
||||
;; but not necessarily during evaluation. In particular, any side effects
|
||||
;; but not necessarily during evaluation. In particular, any side effects
|
||||
;; of pieces of advice will occur during macro expansion. To also affect
|
||||
;; the behavior during evaluation time one has to change the value of
|
||||
;; `ad-return-value' in a piece of after advice. For example:
|
||||
;; `ad-return-value' in a piece of after advice. For example:
|
||||
;;
|
||||
;; (defmacro foom (x)
|
||||
;; `(list ,x))
|
||||
|
@ -1562,7 +1562,7 @@
|
|||
;; because it allows one to influence macro expansion as well as evaluation.
|
||||
;; In general, advising macros should be a rather rare activity anyway, in
|
||||
;; particular, because compile-time macro expansion takes away a lot of the
|
||||
;; flexibility and effectiveness of the advice mechanism. Macros that were
|
||||
;; flexibility and effectiveness of the advice mechanism. Macros that were
|
||||
;; compile-time expanded before the advice was activated will of course never
|
||||
;; exhibit the advised behavior.
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
;;; Commentary:
|
||||
|
||||
;; The Emacs Lisp byte compiler. This crunches lisp source into a sort
|
||||
;; The Emacs Lisp byte compiler. This crunches Lisp source into a sort
|
||||
;; of p-code (`lapcode') which takes up less space and can be interpreted
|
||||
;; faster. [`LAP' == `Lisp Assembly Program'.]
|
||||
;; The user entry points are byte-compile-file and byte-recompile-directory.
|
||||
|
@ -319,7 +319,7 @@ Elements of the list may be:
|
|||
lexical global/dynamic variables lacking a prefix.
|
||||
lexical-dynamic
|
||||
lexically bound variable declared dynamic elsewhere
|
||||
make-local calls to make-variable-buffer-local that may be incorrect.
|
||||
make-local calls to `make-variable-buffer-local' that may be incorrect.
|
||||
mapcar mapcar called for effect.
|
||||
constants let-binding of, or assignment to, constants/nonvariables.
|
||||
docstrings docstrings that are too wide (longer than
|
||||
|
@ -3562,7 +3562,7 @@ for symbols generated by the byte compiler itself."
|
|||
"Warn if symbol VAR refers to a free variable.
|
||||
VAR must not be lexically bound.
|
||||
If optional argument ASSIGNMENT is non-nil, this is treated as an
|
||||
assignment (i.e. `setq'). "
|
||||
assignment (i.e. `setq')."
|
||||
(unless (or (not (byte-compile-warning-enabled-p 'free-vars var))
|
||||
(boundp var)
|
||||
(memq var byte-compile-bound-variables)
|
||||
|
@ -4335,7 +4335,7 @@ that suppresses all warnings during execution of BODY."
|
|||
(and (symbolp obj2) (macroexp-const-p obj1) (cons obj2 (eval obj1)))))
|
||||
|
||||
(defun byte-compile--common-test (test-1 test-2)
|
||||
"Most specific common test of `eq', `eql' and `equal'"
|
||||
"Most specific common test of `eq', `eql' and `equal'."
|
||||
(cond ((or (eq test-1 'equal) (eq test-2 'equal)) 'equal)
|
||||
((or (eq test-1 'eql) (eq test-2 'eql)) 'eql)
|
||||
(t 'eq)))
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
;; Here is a brief explanation how this code works.
|
||||
;; Firstly, we analyze the tree by calling cconv-analyze-form.
|
||||
;; This function finds all mutated variables, all functions that are suitable
|
||||
;; for lambda lifting and all variables captured by closure. It passes the tree
|
||||
;; for lambda lifting and all variables captured by closure. It passes the tree
|
||||
;; once, returning a list of three lists.
|
||||
;;
|
||||
;; Then we calculate the intersection of the first and third lists returned by
|
||||
|
|
|
@ -119,7 +119,7 @@ don't know how to recognize (e.g. some macros)."
|
|||
(autoload 'byte-compile-arglist-signature "bytecomp")
|
||||
|
||||
(defgroup check-declare nil
|
||||
"Check declare-function statements."
|
||||
"Check `declare-function' statements."
|
||||
:group 'tools)
|
||||
|
||||
(defcustom check-declare-ext-errors nil
|
||||
|
@ -230,8 +230,8 @@ fset\\|\\(?:cl-\\)?defmethod\\)\\>" type)
|
|||
errlist))
|
||||
|
||||
(defun check-declare-sort (alist)
|
||||
"Sort a list with elements FILE (FNFILE ...).
|
||||
Returned list has elements FNFILE (FILE ...)."
|
||||
"Sort list ALIST with elements FILE (FNFILE ...).
|
||||
Return list with elements FNFILE (FILE ...)."
|
||||
(let (file fnfile rest sort a)
|
||||
(dolist (e alist)
|
||||
(setq file (car e))
|
||||
|
|
|
@ -162,9 +162,9 @@ is set to `defun'.")
|
|||
(error t)))
|
||||
|
||||
(defun lisp-indent-find-method (symbol &optional no-compat)
|
||||
"Find the lisp indentation function for SYMBOL.
|
||||
"Find the Lisp indentation function for SYMBOL.
|
||||
If NO-COMPAT is non-nil, do not retrieve indenters intended for
|
||||
the standard lisp indent package."
|
||||
the standard Lisp indent package."
|
||||
(or (and (derived-mode-p 'emacs-lisp-mode)
|
||||
(get symbol 'common-lisp-indent-function-for-elisp))
|
||||
(get symbol 'common-lisp-indent-function)
|
||||
|
|
|
@ -120,7 +120,7 @@ When this is `function', only ask when called non-interactively."
|
|||
(re-search-forward regexp bound noerror count)))
|
||||
|
||||
(defun copyright-start-point ()
|
||||
"Return point-min or point-max, depending on `copyright-at-end-flag'."
|
||||
"Return `point-min' or `point-max', depending on `copyright-at-end-flag'."
|
||||
(if copyright-at-end-flag
|
||||
(point-max)
|
||||
(point-min)))
|
||||
|
@ -135,7 +135,7 @@ When this is `function', only ask when called non-interactively."
|
|||
(defun copyright-find-copyright ()
|
||||
"Return non-nil if a copyright header suitable for updating is found.
|
||||
The header must match `copyright-regexp' and `copyright-names-regexp', if set.
|
||||
This function sets the match-data that `copyright-update-year' uses."
|
||||
This function sets the match data that `copyright-update-year' uses."
|
||||
(widen)
|
||||
(goto-char (copyright-start-point))
|
||||
;; In case the regexp is rejected. This is useful because
|
||||
|
|
|
@ -390,7 +390,7 @@ Include the reason for debugger entry from ARGS."
|
|||
(`(set ,buffer) (format "setting %s in buffer %s to %s"
|
||||
symbol buffer
|
||||
(backtrace-print-to-string newval)))
|
||||
(_ (error "unrecognized watchpoint triggered %S" (cdr args))))
|
||||
(_ (error "Unrecognized watchpoint triggered %S" (cdr args))))
|
||||
": ")
|
||||
(insert ?\n))
|
||||
;; Debugger entered for an error.
|
||||
|
|
|
@ -114,7 +114,7 @@ redefine OBJECT if it is a symbol."
|
|||
(if (eq (car-safe obj) 'byte-code)
|
||||
(setq obj `(lambda () ,obj)))
|
||||
(when (consp obj)
|
||||
(unless (functionp obj) (error "not a function"))
|
||||
(unless (functionp obj) (error "Not a function"))
|
||||
(if (assq 'byte-code obj)
|
||||
nil
|
||||
(if interactive-p (message (if name
|
||||
|
@ -183,7 +183,7 @@ redefine OBJECT if it is a symbol."
|
|||
|
||||
|
||||
(defun disassemble-1 (obj indent)
|
||||
"Prints the byte-code call OBJ in the current buffer.
|
||||
"Print the byte-code call OBJ in the current buffer.
|
||||
OBJ should be a call to BYTE-CODE generated by the byte compiler."
|
||||
(let (bytes constvec)
|
||||
(if (consp obj)
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
;; natural for the minor-mode end-users.
|
||||
|
||||
;; For each mode, easy-mmode defines the following:
|
||||
;; <mode> : The minor mode predicate. A buffer-local variable.
|
||||
;; <mode> : The minor mode predicate. A buffer-local variable.
|
||||
;; <mode>-map : The keymap possibly associated to <mode>.
|
||||
;; see `define-minor-mode' documentation
|
||||
;;
|
||||
|
@ -182,7 +182,7 @@ BODY contains code to execute each time the mode is enabled or disabled.
|
|||
be assigned to PLACE. If you specify a :variable, this function
|
||||
does not define a MODE variable (nor any of the terms used
|
||||
in :variable).
|
||||
:after-hook A single lisp form which is evaluated after the mode hooks
|
||||
:after-hook A single Lisp form which is evaluated after the mode hooks
|
||||
have been run. It should not be quoted.
|
||||
|
||||
For example, you could write
|
||||
|
|
|
@ -333,7 +333,7 @@ Optional argument GROUP is the sub-group of slots to display."
|
|||
(let ((map (make-sparse-keymap)))
|
||||
(set-keymap-parent map widget-keymap)
|
||||
map)
|
||||
"Keymap for EIEIO Custom mode")
|
||||
"Keymap for EIEIO Custom mode.")
|
||||
|
||||
(define-derived-mode eieio-custom-mode fundamental-mode "EIEIO Custom"
|
||||
"Major mode for customizing EIEIO objects.
|
||||
|
|
|
@ -437,7 +437,7 @@ return any documentation.")
|
|||
(defvar eldoc-display-functions
|
||||
'(eldoc-display-in-echo-area eldoc-display-in-buffer)
|
||||
"Hook of functions tasked with displaying ElDoc results.
|
||||
Each function is passed two arguments: DOCS and INTERACTIVE. DOCS
|
||||
Each function is passed two arguments: DOCS and INTERACTIVE. DOCS
|
||||
is a list (DOC ...) where DOC looks like (STRING :KEY VALUE :KEY2
|
||||
VALUE2 ...). STRING is a string containing the documentation's
|
||||
text and the remainder of DOC is an optional list of
|
||||
|
|
|
@ -407,11 +407,11 @@ original definition, use \\[elp-restore-function] or \\[elp-restore-all]."
|
|||
(>= (aref vec1 0) (aref vec2 0)))
|
||||
|
||||
(defun elp-sort-by-total-time (vec1 vec2)
|
||||
"Predicate to sort by highest total time spent in function. See `sort'."
|
||||
"Predicate to sort by highest total time spent in function. See `sort'."
|
||||
(>= (aref vec1 1) (aref vec2 1)))
|
||||
|
||||
(defun elp-sort-by-average-time (vec1 vec2)
|
||||
"Predicate to sort by highest average time spent in function. See `sort'."
|
||||
"Predicate to sort by highest average time spent in function. See `sort'."
|
||||
(>= (aref vec1 2) (aref vec2 2)))
|
||||
|
||||
(defsubst elp-pack-number (number width)
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
;;
|
||||
;; Ewoc can be considered as the `view' part of a model-view-controller.
|
||||
;;
|
||||
;; A `element' can be any lisp object. When you use the ewoc
|
||||
;; An `element' can be any Lisp object. When you use the ewoc
|
||||
;; package you specify a pretty-printer, a function that inserts
|
||||
;; a printable representation of the element in the buffer. (The
|
||||
;; pretty-printer should use "insert" and not
|
||||
|
@ -67,7 +67,7 @@
|
|||
;; fixed when the ewoc is created). The header and the footer
|
||||
;; are constant strings. They appear before and after the elements.
|
||||
;;
|
||||
;; Ewoc does not affect the mode of the buffer in any way. It
|
||||
;; Ewoc does not affect the mode of the buffer in any way. It
|
||||
;; merely makes it easy to connect an underlying data representation
|
||||
;; to the buffer contents.
|
||||
;;
|
||||
|
@ -117,7 +117,7 @@
|
|||
(unless (eq dll L) L)))
|
||||
|
||||
(defun ewoc--node-nth (dll n)
|
||||
"Return the Nth node from the doubly linked list `dll'.
|
||||
"Return the Nth node from the doubly linked list DLL.
|
||||
N counts from zero. If N is negative, return the -(N+1)th last element.
|
||||
If N is out of range, return nil.
|
||||
Thus, (ewoc--node-nth dll 0) returns the first node,
|
||||
|
|
|
@ -765,7 +765,7 @@ See `find-function-on-key'."
|
|||
|
||||
;;;###autoload
|
||||
(defun find-function-setup-keys ()
|
||||
"Define some key bindings for the find-function family of functions."
|
||||
"Define some key bindings for the `find-function' family of functions."
|
||||
(define-key ctl-x-map "F" 'find-function)
|
||||
(define-key ctl-x-4-map "F" 'find-function-other-window)
|
||||
(define-key ctl-x-5-map "F" 'find-function-other-frame)
|
||||
|
|
|
@ -467,7 +467,7 @@ DYNAMIC-VAR bound to STATIC-VAR."
|
|||
(guard (cps--special-form-p name))
|
||||
(guard (not (memq name cps-standard-special-forms))))
|
||||
name ; Shut up byte compiler
|
||||
(error "special form %S incorrect or not supported" form))
|
||||
(error "Special form %S incorrect or not supported" form))
|
||||
|
||||
;; Process regular function applications with nontrivial
|
||||
;; parameters, converting them to applications of trivial
|
||||
|
@ -633,7 +633,7 @@ modified copy."
|
|||
;; If we're exiting non-locally (error, quit,
|
||||
;; etc.) close the iterator.
|
||||
,(cps--make-close-iterator-form terminal-state)))))
|
||||
(t (error "unknown iterator operation %S" op))))))
|
||||
(t (error "Unknown iterator operation %S" op))))))
|
||||
,(when finalizer-symbol
|
||||
'(funcall iterator
|
||||
:stash-finalizer
|
||||
|
@ -711,7 +711,7 @@ iterator cannot supply more values."
|
|||
|
||||
(defun iter-close (iterator)
|
||||
"Terminate an iterator early.
|
||||
Run any unwind-protect handlers in scope at the point ITERATOR
|
||||
Run any `unwind-protect' handlers in scope at the point ITERATOR
|
||||
is blocked."
|
||||
(funcall iterator :close nil))
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
;; .site.contents))
|
||||
;;
|
||||
;; If you nest `let-alist' invocations, the inner one can't access
|
||||
;; the variables of the outer one. You can, however, access alists
|
||||
;; the variables of the outer one. You can, however, access alists
|
||||
;; inside the original alist by using dots inside the symbol, as
|
||||
;; displayed in the example above by the `.site.contents'.
|
||||
;;
|
||||
|
@ -137,7 +137,7 @@ essentially expands to
|
|||
.site.contents))
|
||||
|
||||
If you nest `let-alist' invocations, the inner one can't access
|
||||
the variables of the outer one. You can, however, access alists
|
||||
the variables of the outer one. You can, however, access alists
|
||||
inside the original alist by using dots inside the symbol, as
|
||||
displayed in the example above."
|
||||
(declare (indent 1) (debug t))
|
||||
|
|
|
@ -824,7 +824,7 @@ function is `common-lisp-indent-function'."
|
|||
"Return Parse-Partial-Sexp State at POS, defaulting to point.
|
||||
Like `syntax-ppss' but includes the character address of the last
|
||||
complete sexp in the innermost containing list at position
|
||||
2 (counting from 0). This is important for lisp indentation."
|
||||
2 (counting from 0). This is important for Lisp indentation."
|
||||
(unless pos (setq pos (point)))
|
||||
(let ((pss (syntax-ppss pos)))
|
||||
(if (nth 9 pss)
|
||||
|
|
|
@ -243,19 +243,19 @@ is executed without being compiled first."
|
|||
(while arglist
|
||||
(cond ((eq (car arglist) '&optional)
|
||||
;; ok, I'll let this slide because funcall_lambda() does...
|
||||
;; (if optionalp (error "multiple &optional keywords in %s" name))
|
||||
;; (if optionalp (error "Multiple &optional keywords in %s" name))
|
||||
(if restp (error "&optional found after &rest in %s" name))
|
||||
(if (null (cdr arglist))
|
||||
(error "nothing after &optional in %s" name))
|
||||
(error "Nothing after &optional in %s" name))
|
||||
(setq optionalp t))
|
||||
((eq (car arglist) '&rest)
|
||||
;; ...but it is by no stretch of the imagination a reasonable
|
||||
;; thing that funcall_lambda() allows (&rest x y) and
|
||||
;; (&rest x &optional y) in arglists.
|
||||
(if (null (cdr arglist))
|
||||
(error "nothing after &rest in %s" name))
|
||||
(error "Nothing after &rest in %s" name))
|
||||
(if (cdr (cdr arglist))
|
||||
(error "multiple vars after &rest in %s" name))
|
||||
(error "Multiple vars after &rest in %s" name))
|
||||
(setq restp t))
|
||||
(restp
|
||||
(setq bindings (cons (list (car arglist)
|
||||
|
|
|
@ -245,7 +245,7 @@ WHERE is a symbol to select an entry in `advice--where-alist'."
|
|||
(list (advice--remove-function rest function)))))))
|
||||
|
||||
(defvar advice--buffer-local-function-sample nil
|
||||
"keeps an example of the special \"run the default value\" functions.
|
||||
"Keeps an example of the special \"run the default value\" functions.
|
||||
These functions play the same role as t in buffer-local hooks, and to recognize
|
||||
them, we keep a sample here against which to compare. Each instance is
|
||||
different, but `function-equal' will hopefully ignore those differences.")
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
;; (possibly one on a remote machine, accessed via Tramp).
|
||||
|
||||
;; Then call M-x package-upload-file, which prompts for a file to
|
||||
;; upload. Alternatively, M-x package-upload-buffer uploads the
|
||||
;; upload. Alternatively, M-x package-upload-buffer uploads the
|
||||
;; current buffer, if it's visiting a package file.
|
||||
|
||||
;; Once a package is uploaded, users can access it via the Package
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
(funcall pf (and me (symbolp me) (edebug-get-spec me))))))
|
||||
|
||||
(defun pcase--get-macroexpander (s)
|
||||
"Return the macroexpander for pcase pattern head S, or nil"
|
||||
"Return the macroexpander for pcase pattern head S, or nil."
|
||||
(get s 'pcase-macroexpander))
|
||||
|
||||
;;;###autoload
|
||||
|
|
|
@ -31,13 +31,13 @@
|
|||
;; a file with the same name in a later load-path directory. When
|
||||
;; this is unintentional, it may result in problems that could have
|
||||
;; been easily avoided. This occurs often (to me) when installing a
|
||||
;; new version of emacs and something in the site-lisp directory
|
||||
;; has been updated and added to the emacs distribution. The old
|
||||
;; version, now outdated, shadows the new one. This is obviously
|
||||
;; new version of Emacs and something in the site-lisp directory
|
||||
;; has been updated and added to the Emacs distribution. The old
|
||||
;; version, now outdated, shadows the new one. This is obviously
|
||||
;; undesirable.
|
||||
;;
|
||||
;; The `list-load-path-shadows' function was run when you installed
|
||||
;; this version of emacs. To run it by hand in emacs:
|
||||
;; this version of Emacs. To run it by hand in emacs:
|
||||
;;
|
||||
;; M-x list-load-path-shadows
|
||||
;;
|
||||
|
@ -181,7 +181,7 @@ See the documentation for `list-load-path-shadows' for further information."
|
|||
"Keywords to highlight in `load-path-shadows-mode'.")
|
||||
|
||||
(define-derived-mode load-path-shadows-mode fundamental-mode "LP-Shadows"
|
||||
"Major mode for load-path shadows buffer."
|
||||
"Major mode for `load-path' shadows buffer."
|
||||
(setq-local font-lock-defaults
|
||||
'((load-path-shadows-font-lock-keywords)))
|
||||
(setq buffer-undo-list t
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; * Use `testcover-start' to instrument a Lisp file for coverage testing.
|
||||
|
@ -62,6 +61,8 @@
|
|||
;; error if these "potentially" 1-valued forms actually return differing
|
||||
;; values.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(eval-when-compile (require 'cl-lib))
|
||||
(require 'edebug)
|
||||
(provide 'testcover)
|
||||
|
@ -80,8 +81,9 @@
|
|||
(defcustom testcover-constants
|
||||
'(nil t emacs-build-time emacs-version emacs-major-version
|
||||
emacs-minor-version)
|
||||
"Variables whose values never change. No brown splotch is shown for
|
||||
these. This list is quite incomplete!"
|
||||
"Variables whose values never change.
|
||||
No brown splotch is shown for these. This list is quite
|
||||
incomplete!"
|
||||
:group 'testcover
|
||||
:type '(repeat variable))
|
||||
|
||||
|
@ -103,8 +105,8 @@ incomplete! Notes: Nobody ever changes the current global map."
|
|||
|
||||
(defcustom testcover-noreturn-functions
|
||||
'(error noreturn throw signal)
|
||||
"Subset of `testcover-1value-functions' -- these never return. We mark
|
||||
them as having returned nil just before calling them."
|
||||
"Subset of `testcover-1value-functions' -- these never return.
|
||||
We mark them as having returned nil just before calling them."
|
||||
:group 'testcover
|
||||
:type '(repeat symbol))
|
||||
|
||||
|
@ -126,25 +128,26 @@ side-effect-free functions should be here."
|
|||
set set-default set-marker-insertion-type setq setq-default
|
||||
with-current-buffer with-output-to-temp-buffer with-syntax-table
|
||||
with-temp-buffer with-temp-file with-temp-message with-timeout)
|
||||
"Functions whose return value is the same as their last argument. No
|
||||
brown splotch is shown for these if the last argument is a constant or a
|
||||
call to one of the `testcover-1value-functions'. This list is probably
|
||||
incomplete!"
|
||||
"Functions whose return value is the same as their last argument.
|
||||
No brown splotch is shown for these if the last argument is a
|
||||
constant or a call to one of the `testcover-1value-functions'.
|
||||
This list is probably incomplete!"
|
||||
:group 'testcover
|
||||
:type '(repeat symbol))
|
||||
|
||||
(defcustom testcover-prog1-functions
|
||||
'(prog1 unwind-protect)
|
||||
"Functions whose return value is the same as their first argument. No
|
||||
brown splotch is shown for these if the first argument is a constant or a
|
||||
call to one of the `testcover-1value-functions'."
|
||||
"Functions whose return value is the same as their first argument.
|
||||
No brown splotch is shown for these if the first argument is a
|
||||
constant or a call to one of the `testcover-1value-functions'."
|
||||
:group 'testcover
|
||||
:type '(repeat symbol))
|
||||
|
||||
(defcustom testcover-potentially-1value-functions
|
||||
'(add-hook and beep or remove-hook unless when)
|
||||
"Functions that are potentially 1-valued. No brown splotch if actually
|
||||
1-valued, no error if actually multi-valued."
|
||||
"Functions that are potentially 1-valued.
|
||||
No brown splotch if actually 1-valued, no error if actually
|
||||
multi-valued."
|
||||
:group 'testcover
|
||||
:type '(repeat symbol))
|
||||
|
||||
|
@ -164,8 +167,7 @@ call to one of the `testcover-1value-functions'."
|
|||
;;;=========================================================================
|
||||
|
||||
(defvar testcover-module-constants nil
|
||||
"Symbols declared with defconst in the last file processed by
|
||||
`testcover-start'.")
|
||||
"Symbols declared with defconst in the last file processed by `testcover-start'.")
|
||||
|
||||
(defvar testcover-module-1value-functions nil
|
||||
"Symbols declared with defun in the last file processed by
|
||||
|
@ -388,7 +390,7 @@ coverage tests. This function creates many overlays."
|
|||
(error nil))) ;Ignore "No such buffer" errors
|
||||
|
||||
(defun testcover-next-mark ()
|
||||
"Moves point to next line in current buffer that has a splotch."
|
||||
"Move point to next line in current buffer that has a splotch."
|
||||
(interactive)
|
||||
(goto-char (next-overlay-change (point)))
|
||||
(end-of-line))
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
;; forms.
|
||||
;;
|
||||
;; Use `thunk-delay' to delay the evaluation of a form (requires
|
||||
;; lexical-binding), and `thunk-force' to evaluate it. The result of
|
||||
;; lexical-binding), and `thunk-force' to evaluate it. The result of
|
||||
;; the evaluation is cached, and only happens once.
|
||||
;;
|
||||
;; Here is an example of a form which evaluation is delayed:
|
||||
|
|
|
@ -164,7 +164,7 @@ or `eshell-printn' for display."
|
|||
(set-default-file-modes
|
||||
(- 511 (car (read-from-string
|
||||
(concat "?\\" (number-to-string (car args)))))))
|
||||
(error "setting umask symbolically is not yet implemented"))
|
||||
(error "Setting umask symbolically is not yet implemented"))
|
||||
(eshell-print
|
||||
"Warning: umask changed for all new files created by Emacs.\n"))
|
||||
nil))
|
||||
|
|
|
@ -91,7 +91,7 @@ This option slows down recursive glob processing by quite a bit."
|
|||
|
||||
(defcustom eshell-error-if-no-glob nil
|
||||
"If non-nil, it is an error for a glob pattern not to match.
|
||||
This mimics the behavior of zsh if non-nil, but bash if nil."
|
||||
This mimics the behavior of zsh if non-nil, but bash if nil."
|
||||
:type 'boolean
|
||||
:group 'eshell-glob)
|
||||
|
||||
|
@ -266,7 +266,7 @@ the form:
|
|||
|
||||
;; FIXME does this really need to abuse eshell-glob-matches, message-shown?
|
||||
(defun eshell-glob-entries (path globs &optional recurse-p)
|
||||
"Glob the entries in PATHS, possibly recursing if RECURSE-P is non-nil."
|
||||
"Glob the entries in PATH, possibly recursing if RECURSE-P is non-nil."
|
||||
(let* ((entries (ignore-errors
|
||||
(file-name-all-completions "" path)))
|
||||
(case-fold-search eshell-glob-case-insensitive)
|
||||
|
|
|
@ -402,7 +402,7 @@ variable `eshell-input-filter' returns non-nil when called on the
|
|||
command.
|
||||
|
||||
This function is supposed to be called from the minibuffer, presumably
|
||||
as a minibuffer-exit-hook."
|
||||
as a `minibuffer-exit-hook'."
|
||||
(eshell-add-input-to-history
|
||||
(buffer-substring (minibuffer-prompt-end) (point-max))))
|
||||
|
||||
|
|
|
@ -35,10 +35,10 @@
|
|||
;;;###autoload
|
||||
(progn
|
||||
(defgroup eshell-ls nil
|
||||
"This module implements the \"ls\" utility fully in Lisp. If it is
|
||||
passed any unrecognized command switches, it will revert to the
|
||||
operating system's version. This version of \"ls\" uses text
|
||||
properties to colorize its output based on the setting of
|
||||
"This module implements the \"ls\" utility fully in Lisp.
|
||||
If it is passed any unrecognized command switches, it will revert
|
||||
to the operating system's version. This version of \"ls\" uses
|
||||
text properties to colorize its output based on the setting of
|
||||
`eshell-ls-use-colors'."
|
||||
:tag "Implementation of `ls' in Lisp"
|
||||
:group 'eshell-module))
|
||||
|
@ -476,9 +476,9 @@ name should be displayed as, etc. Think of it as cooking a FILEINFO."
|
|||
fileinfo)
|
||||
|
||||
(defun eshell-ls-file (fileinfo &optional size-width copy-fileinfo)
|
||||
"Output FILE in long format.
|
||||
FILE may be a string, or a cons cell whose car is the filename and
|
||||
whose cdr is the list of file attributes."
|
||||
"Output FILEINFO in long format.
|
||||
FILEINFO may be a string, or a cons cell whose car is the
|
||||
filename and whose cdr is the list of file attributes."
|
||||
(if (not (cdr fileinfo))
|
||||
(funcall error-func (format "%s: No such file or directory\n"
|
||||
(car fileinfo)))
|
||||
|
|
|
@ -258,7 +258,7 @@ EXAMPLES:
|
|||
(eshell-pred-mode))
|
||||
|
||||
(defun eshell-apply-modifiers (lst predicates modifiers)
|
||||
"Apply to LIST a series of PREDICATES and MODIFIERS."
|
||||
"Apply to list LST a series of PREDICATES and MODIFIERS."
|
||||
(let (stringified)
|
||||
(if (stringp lst)
|
||||
(setq lst (list lst)
|
||||
|
|
|
@ -168,7 +168,7 @@ This is default behavior of shells like bash."
|
|||
|
||||
(defun eshell-lock-local-map (&optional arg)
|
||||
"Lock or unlock the current local keymap.
|
||||
Within a prefix arg, set the local keymap to its normal value, and
|
||||
With prefix ARG, set the local keymap to its normal value, and
|
||||
lock it at that."
|
||||
(interactive "P")
|
||||
(if (or arg (not eshell-lock-keymap))
|
||||
|
|
|
@ -131,7 +131,7 @@ only if that output can be presented in its entirely in the Eshell window."
|
|||
:group 'eshell-smart)
|
||||
|
||||
(defcustom eshell-smart-space-goes-to-end t
|
||||
"If non-nil, space will go to end of buffer when point-max is visible.
|
||||
"If non-nil, space will go to end of buffer when `point-max' is visible.
|
||||
That is, if a command is running and the user presses SPACE at a time
|
||||
when the end of the buffer is visible, point will go to the end of the
|
||||
buffer and smart-display will be turned off (that is, subsequently
|
||||
|
@ -195,7 +195,7 @@ The options are `begin', `after' or `end'."
|
|||
|
||||
;; This is called by window-scroll-functions with two arguments.
|
||||
(defun eshell-smart-scroll-window (wind _start)
|
||||
"Scroll the given Eshell window accordingly."
|
||||
"Scroll the given Eshell window WIND accordingly."
|
||||
(unless eshell-currently-handling-window
|
||||
(let ((inhibit-point-motion-hooks t)
|
||||
(eshell-currently-handling-window t))
|
||||
|
|
|
@ -203,7 +203,7 @@ treated as a literal character."
|
|||
(setq eshell-current-modifiers nil))
|
||||
|
||||
(defun eshell-finish-arg (&optional argument)
|
||||
"Finish the current argument being processed."
|
||||
"Finish the current ARGUMENT being processed."
|
||||
(if argument
|
||||
(setq eshell-current-argument argument))
|
||||
(throw 'eshell-arg-done t))
|
||||
|
|
|
@ -1236,10 +1236,10 @@ or an external command."
|
|||
(eshell-external-command command args))))
|
||||
|
||||
(defun eshell-exec-lisp (printer errprint func-or-form args form-p)
|
||||
"Execute a lisp FUNC-OR-FORM, maybe passing ARGS.
|
||||
"Execute a Lisp FUNC-OR-FORM, maybe passing ARGS.
|
||||
PRINTER and ERRPRINT are functions to use for printing regular
|
||||
messages, and errors. FORM-P should be non-nil if FUNC-OR-FORM
|
||||
represent a lisp form; ARGS will be ignored in that case."
|
||||
represent a Lisp form; ARGS will be ignored in that case."
|
||||
(eshell-condition-case err
|
||||
(let ((result
|
||||
(save-current-buffer
|
||||
|
|
|
@ -110,7 +110,7 @@ wholly ignored."
|
|||
(autoload 'eshell-parse-command "esh-cmd")
|
||||
|
||||
(defsubst eshell-invoke-batch-file (&rest args)
|
||||
"Invoke a .BAT or .CMD file on DOS/Windows systems."
|
||||
"Invoke a .BAT or .CMD file on MS-DOS/MS-Windows systems."
|
||||
;; since CMD.EXE can't handle forward slashes in the initial
|
||||
;; argument...
|
||||
(setcar args (subst-char-in-string ?/ ?\\ (car args)))
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
;;;_* Redirect to a Buffer or Process
|
||||
;;
|
||||
;; Buffers and processes can be named with '#<buffer buffer-name>' and
|
||||
;; '#<process process-name>', respectively. As a shorthand,
|
||||
;; '#<process process-name>', respectively. As a shorthand,
|
||||
;; '#<buffer-name>' without the explicit "buffer" arg is equivalent to
|
||||
;; '#<buffer buffer-name>'.
|
||||
;;
|
||||
|
|
|
@ -499,7 +499,7 @@ and the hook `eshell-exit-hook'."
|
|||
(yank)))
|
||||
|
||||
(defun eshell-bol ()
|
||||
"Goes to the beginning of line, then skips past the prompt, if any."
|
||||
"Go to the beginning of line, then skip past the prompt, if any."
|
||||
(interactive)
|
||||
(beginning-of-line)
|
||||
(and eshell-skip-prompt-function
|
||||
|
|
|
@ -33,15 +33,15 @@
|
|||
;; @ A high degree of configurability
|
||||
;;
|
||||
;; @ The ability to have the same shell on every system Emacs has been
|
||||
;; ported to. Since Eshell imposes no external requirements, and
|
||||
;; ported to. Since Eshell imposes no external requirements, and
|
||||
;; relies upon only the Lisp functions exposed by Emacs, it is quite
|
||||
;; operating system independent. Several of the common UNIX
|
||||
;; operating system independent. Several of the common UNIX
|
||||
;; commands, such as ls, mv, rm, ln, etc., have been implemented in
|
||||
;; Lisp in order to provide a more consistent work environment.
|
||||
;;
|
||||
;; For those who might be using an older version of Eshell, version
|
||||
;; 2.1 represents an entirely new, module-based architecture. It
|
||||
;; supports most of the features offered by modern shells. Here is a
|
||||
;; 2.1 represents an entirely new, module-based architecture. It
|
||||
;; supports most of the features offered by modern shells. Here is a
|
||||
;; brief list of some of its more visible features:
|
||||
;;
|
||||
;; @ Command argument completion (tcsh, zsh)
|
||||
|
@ -136,7 +136,7 @@
|
|||
;; errors, such as 'dri' for `dir'. Since executing non-existent
|
||||
;; programs is rarely the intention of the user, eshell could prompt
|
||||
;; for the replacement string, and then record that in a database of
|
||||
;; known misspellings. (Note: The typo at the beginning of this
|
||||
;; known misspellings. (Note: The typo at the beginning of this
|
||||
;; paragraph wasn't discovered until two months after I wrote the
|
||||
;; text; it was not intentional).
|
||||
;;
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
(require 'gnus-util)
|
||||
|
||||
(defcustom gnus-post-method 'current
|
||||
"Preferred method for posting USENET news.
|
||||
"Preferred method for posting Usenet news.
|
||||
|
||||
If this variable is `current' (which is the default), Gnus will use
|
||||
the \"current\" select method when posting. If it is `native', Gnus
|
||||
|
|
|
@ -3841,7 +3841,7 @@ text was killed."
|
|||
"Caesar rotate all letters in the current buffer by 13 places.
|
||||
Used to encode/decode possibly offensive messages (commonly in rec.humor).
|
||||
With prefix arg, specifies the number of places to rotate each letter forward.
|
||||
Mail and USENET news headers are not rotated unless WIDE is non-nil."
|
||||
Mail and Usenet news headers are not rotated unless WIDE is non-nil."
|
||||
(interactive (if current-prefix-arg
|
||||
(list (prefix-numeric-value current-prefix-arg))
|
||||
(list nil))
|
||||
|
|
|
@ -242,18 +242,18 @@ buffer's line and column of point."
|
|||
node t t))
|
||||
|
||||
(if (not (string-match "\\`([^)]*)" node))
|
||||
(info-xref-output-error "no `(file)' part at start of node: %s\n" node)
|
||||
(info-xref-output-error "No `(file)' part at start of node: %s\n" node)
|
||||
(let ((file (match-string 0 node)))
|
||||
|
||||
(if (string-equal "()" file)
|
||||
(info-xref-output-error "empty filename part: %s" node)
|
||||
(info-xref-output-error "Empty filename part: %s" node)
|
||||
|
||||
;; see if the file exists, if haven't looked before
|
||||
(unless (assoc file info-xref-xfile-alist)
|
||||
(let ((found (info-xref-goto-node-p file)))
|
||||
(push (cons file found) info-xref-xfile-alist)
|
||||
(unless found
|
||||
(info-xref-output-error "not available to check: %s\n (this reported once per file)" file))))
|
||||
(info-xref-output-error "Not available to check: %s\n (this reported once per file)" file))))
|
||||
|
||||
;; if the file exists, try the node
|
||||
(cond ((not (cdr (assoc file info-xref-xfile-alist)))
|
||||
|
@ -262,7 +262,7 @@ buffer's line and column of point."
|
|||
(cl-incf info-xref-good))
|
||||
(t
|
||||
(cl-incf info-xref-bad)
|
||||
(info-xref-output-error "no such node: %s" node)))))))
|
||||
(info-xref-output-error "No such node: %s" node)))))))
|
||||
|
||||
|
||||
;;-----------------------------------------------------------------------------
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
;; dictionary allows you to interact with dictionary servers.
|
||||
;; Use M-x customize-group dictionary to modify user settings.
|
||||
;;
|
||||
;; Main functions for interaction are:
|
||||
;; dictionary - opens a new dictionary buffer
|
||||
;; dictionary-search - search for the definition of a word
|
||||
;; Main commands for interaction are:
|
||||
;; M-x dictionary - opens a new dictionary buffer
|
||||
;; M-x dictionary-search - search for the definition of a word
|
||||
;;
|
||||
;; You can find more information in the README file of the GitHub
|
||||
;; repository https://github.com/myrkr/dictionary-el
|
||||
|
@ -58,11 +58,11 @@ the existing connection."
|
|||
(set-default name value))
|
||||
|
||||
(defgroup dictionary nil
|
||||
"Client for accessing the dictd server based dictionaries"
|
||||
"Client for accessing the dictd server based dictionaries."
|
||||
:group 'hypermedia)
|
||||
|
||||
(defgroup dictionary-proxy nil
|
||||
"Proxy configuration options for the dictionary client"
|
||||
"Proxy configuration options for the dictionary client."
|
||||
:group 'dictionary)
|
||||
|
||||
(defcustom dictionary-server
|
||||
|
@ -943,7 +943,6 @@ If PATTERN is omitted, it defaults to \"[ \\f\\t\\n\\r\\v]+\"."
|
|||
|
||||
(defun dictionary-set-dictionary (param &optional more)
|
||||
"Select the dictionary which is the car of PARAM as new default."
|
||||
|
||||
(if more
|
||||
(dictionary-display-more-info param)
|
||||
(let ((dictionary (car param)))
|
||||
|
@ -1051,7 +1050,6 @@ If PATTERN is omitted, it defaults to \"[ \\f\\t\\n\\r\\v]+\"."
|
|||
|
||||
(defun dictionary-do-matching (word dictionary strategy function)
|
||||
"Find matches for WORD with STRATEGY in DICTIONARY and display them with FUNCTION."
|
||||
|
||||
(message "Lookup matching words for %s in %s using %s"
|
||||
word dictionary strategy)
|
||||
(dictionary-send-command
|
||||
|
|
|
@ -444,7 +444,7 @@ negates this setting for the duration of the command."
|
|||
:safe (lambda (val) (or (booleanp val) (integerp val))))
|
||||
|
||||
(defcustom org-link-email-description-format "Email %c: %s"
|
||||
"Format of the description part of a link to an email or usenet message.
|
||||
"Format of the description part of a link to an email or Usenet message.
|
||||
The following %-escapes will be replaced by corresponding information:
|
||||
|
||||
%F full \"From\" field
|
||||
|
|
|
@ -1532,7 +1532,7 @@ This is the `so-long-revert-function' for `so-long-mode'."
|
|||
(interactive)
|
||||
(let ((so-long-original-mode (so-long-original 'major-mode)))
|
||||
(unless so-long-original-mode
|
||||
(error "Original mode unknown."))
|
||||
(error "Original mode unknown"))
|
||||
(funcall so-long-original-mode)
|
||||
;; Emacs 26+ has already called `hack-local-variables' (during
|
||||
;; `run-mode-hooks'; provided there was a `buffer-file-name'), but for older
|
||||
|
|
|
@ -188,7 +188,7 @@ otherwise. IMAGE-TYPE should be a MIME image type, like
|
|||
"Insert image placed at RELATIVE-FILENAME into the SVG structure.
|
||||
RELATIVE-FILENAME will be searched in `file-name-directory' of the
|
||||
image's `:base-uri' property. If `:base-uri' is not specified for the
|
||||
image, then embedding won't work. Embedding large images using this
|
||||
image, then embedding won't work. Embedding large images using this
|
||||
function is much faster than `svg-embed'."
|
||||
(svg--append
|
||||
svg
|
||||
|
|
|
@ -113,7 +113,7 @@ and the value `((4) (4))' for horizontally split windows."
|
|||
:version "22.1")
|
||||
|
||||
(defcustom compare-windows-highlight t
|
||||
"Non-nil means compare-windows highlights the differences.
|
||||
"Non-nil means `compare-windows' highlights the differences.
|
||||
The value t removes highlighting immediately after invoking a command
|
||||
other than `compare-windows'.
|
||||
The value `persistent' leaves all highlighted differences. You can clear
|
||||
|
|
|
@ -1479,7 +1479,7 @@ Supports unified and context diffs as well as (to a lesser extent)
|
|||
normal diffs.
|
||||
|
||||
When the buffer is read-only, the ESC prefix is not necessary.
|
||||
If you edit the buffer manually, diff-mode will try to update the hunk
|
||||
If you edit the buffer manually, `diff-mode' will try to update the hunk
|
||||
headers for you on-the-fly.
|
||||
|
||||
You can also switch between context diff and unified diff with \\[diff-context->unified],
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
|
||||
(require 'ediff-init)
|
||||
(require 'ediff-util)
|
||||
|
||||
|
@ -78,14 +77,14 @@ are `-I REGEXP', to ignore changes whose lines match the REGEXP."
|
|||
"Options to pass to `ediff-diff-program'.
|
||||
If Unix diff is used as `ediff-diff-program',
|
||||
then a useful option is `-w', to ignore space.
|
||||
Options `-c', `-u', and `-i' are not allowed. Case sensitivity can be
|
||||
Options `-c', `-u', and `-i' are not allowed. Case sensitivity can be
|
||||
toggled interactively using \\[ediff-toggle-ignore-case].
|
||||
|
||||
Do not remove the default options. If you need to change this variable, add new
|
||||
Do not remove the default options. If you need to change this variable, add new
|
||||
options after the default ones.
|
||||
|
||||
This variable is not for customizing the look of the differences produced by
|
||||
the command \\[ediff-show-diff-output]. Use the variable
|
||||
the command \\[ediff-show-diff-output]. Use the variable
|
||||
`ediff-custom-diff-options' for that."
|
||||
:set #'ediff-set-diff-options
|
||||
:type 'string)
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
|
||||
;; Compiler pacifier start
|
||||
(defvar ediff-multiframe)
|
||||
;; end pacifier
|
||||
|
|
|
@ -248,7 +248,7 @@ It needs to be killed when we quit the session.")
|
|||
;; Doesn't save the point and mark.
|
||||
;; This is `with-current-buffer' with the added test for live buffers."
|
||||
(defmacro ediff-with-current-buffer (buffer &rest body)
|
||||
"Evaluates BODY in BUFFER."
|
||||
"Evaluate BODY in BUFFER."
|
||||
(declare (indent 1) (debug (form body)))
|
||||
`(if (ediff-buffer-live-p ,buffer)
|
||||
(save-current-buffer
|
||||
|
@ -615,7 +615,7 @@ highlighted using ASCII flags."
|
|||
Actually, Ediff restores the scope of visibility that existed at startup.")
|
||||
|
||||
(defcustom ediff-keep-variants t
|
||||
"nil means prompt to remove unmodified buffers A/B/C at session end.
|
||||
"Nil means prompt to remove unmodified buffers A/B/C at session end.
|
||||
Supplying a prefix argument to the quit command `q' temporarily reverses the
|
||||
meaning of this variable."
|
||||
:type 'boolean
|
||||
|
@ -680,10 +680,10 @@ shown in brighter colors."
|
|||
(ediff-defvar-local ediff-custom-diff-buffer nil "")
|
||||
;; Buffer used for diff-style fine differences between regions.
|
||||
(ediff-defvar-local ediff-fine-diff-buffer nil "")
|
||||
;; Temporary buffer used for computing fine differences.
|
||||
(defconst ediff-tmp-buffer " *ediff-tmp*" "")
|
||||
;; Buffer used for messages
|
||||
(defconst ediff-msg-buffer " *ediff-message*" "")
|
||||
(defconst ediff-tmp-buffer " *ediff-tmp*"
|
||||
"Temporary buffer used for computing fine differences.")
|
||||
(defconst ediff-msg-buffer " *ediff-message*"
|
||||
"Buffer used for messages.")
|
||||
;; Buffer containing the output of diff when diff returns errors.
|
||||
(ediff-defvar-local ediff-error-buffer nil "")
|
||||
;; Buffer to display debug info
|
||||
|
@ -835,7 +835,7 @@ this variable represents.")
|
|||
;; this variable is set to nil, then again to the appropriate face.
|
||||
(defvar ediff-current-diff-face-B 'ediff-current-diff-B
|
||||
"Face for highlighting the selected difference in buffer B.
|
||||
this variable. Instead, use the customization
|
||||
DO NOT CHANGE this variable. Instead, use the customization
|
||||
widget to customize the actual face `ediff-current-diff-B'
|
||||
this variable represents.")
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ Valid values are the symbols `default-A', `default-B', and `combined'."
|
|||
"Pattern to be used for combining difference regions in buffers A and B.
|
||||
The value must be a list of the form
|
||||
\(STRING1 bufspec1 STRING2 bufspec2 STRING3 bufspec3 STRING4)
|
||||
where bufspec is the symbol A, B, or Ancestor. For instance, if the value is
|
||||
where bufspec is the symbol A, B, or Ancestor. For instance, if the value is
|
||||
'(STRING1 A STRING2 Ancestor STRING3 B STRING4) then the
|
||||
combined text will look like this:
|
||||
|
||||
|
@ -63,8 +63,7 @@ STRING2
|
|||
diff region from the ancestor
|
||||
STRING3
|
||||
diff region from variant B
|
||||
STRING4
|
||||
"
|
||||
STRING4"
|
||||
:type '(choice (list string symbol string symbol string)
|
||||
(list string symbol string symbol string symbol string))
|
||||
:group 'ediff-merge)
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
;; explanation of the two nil placeholders in such elements.
|
||||
;;
|
||||
;; There is API for extracting the components of the members of the
|
||||
;; above list. Search for `API for ediff-meta-list' for details.
|
||||
;; above list. Search for `API for ediff-meta-list' for details.
|
||||
;;
|
||||
;; HEADER must be a list of SIX elements (nil or string):
|
||||
;; (regexp metaobj1 metaobj2 metaobj3 merge-save-buffer
|
||||
|
@ -157,8 +157,7 @@ Useful commands (type ? to hide them and free up screen):
|
|||
(define-key map [delete] #'previous-line)
|
||||
(define-key map [backspace] #'previous-line)
|
||||
map)
|
||||
"The keymap to be installed in the buffer showing differences between
|
||||
directories.")
|
||||
"Keymap for buffer showing differences between directories.")
|
||||
|
||||
;; Variable specifying the action to take when the use invokes ediff in the
|
||||
;; meta buffer. This is usually ediff-registry-action or ediff-filegroup-action
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
;; Created: February 2, 1994
|
||||
;; Keywords: comparing, merging, patching, vc, tools, unix
|
||||
;; Version: 2.81.6
|
||||
(defconst ediff-version "2.81.6" "The current version of Ediff")
|
||||
(defconst ediff-version "2.81.6" "The current version of Ediff.")
|
||||
|
||||
;; Yoni Rabkin <yoni@rabkins.net> contacted the maintainer of this
|
||||
;; file on 20/3/2008, and the maintainer agreed that when a bug is
|
||||
|
|
|
@ -98,7 +98,7 @@
|
|||
(defcustom log-edit-confirm 'changed
|
||||
"If non-nil, `log-edit-done' will request confirmation.
|
||||
If `changed', only request confirmation if the list of files has
|
||||
changed since the beginning of the log-edit session."
|
||||
changed since the beginning of the `log-edit' session."
|
||||
:group 'log-edit
|
||||
:type '(choice (const changed) (const t) (const nil)))
|
||||
|
||||
|
@ -497,7 +497,7 @@ When done editing the log entry, type \\[log-edit-done], which will
|
|||
trigger the actual commit of the file(s).
|
||||
Several other handy support commands are provided, and the package
|
||||
from which this is used might also provide additional commands (under
|
||||
the \"C-x v\" prefix for VC commands, for example).
|
||||
the \\[vc-prefix-map] prefix for VC commands, for example).
|
||||
|
||||
\\{log-edit-mode-map}"
|
||||
(setq-local font-lock-defaults '(log-edit-font-lock-keywords t))
|
||||
|
|
|
@ -156,7 +156,7 @@
|
|||
:group 'log-view)
|
||||
|
||||
(easy-menu-define log-view-mode-menu log-view-mode-map
|
||||
"Log-View Display Menu"
|
||||
"Log-View Display Menu."
|
||||
'("Log-View"
|
||||
;; XXX Do we need menu entries for these?
|
||||
;; ["Quit" quit-window]
|
||||
|
|
|
@ -247,7 +247,7 @@ If -CVS-MODE!-FUN is provided, it is executed *cvs* being the current buffer
|
|||
(let* ((-cvs-mode!-buf (current-buffer))
|
||||
(cvsbuf (cond ((cvs-buffer-p) (current-buffer))
|
||||
((and cvs-buffer (cvs-buffer-p cvs-buffer)) cvs-buffer)
|
||||
(t (error "can't find the *cvs* buffer"))))
|
||||
(t (error "Can't find the *cvs* buffer"))))
|
||||
(-cvs-mode!-wrapper cvs-minor-wrap-function)
|
||||
(-cvs-mode!-cont (lambda ()
|
||||
(save-current-buffer
|
||||
|
|
|
@ -277,7 +277,7 @@ cover the range from the oldest annotation to the newest."
|
|||
|
||||
;; Menu -- Using easymenu.el
|
||||
(easy-menu-define vc-annotate-mode-menu vc-annotate-mode-map
|
||||
"VC Annotate Display Menu"
|
||||
"VC Annotate Display Menu."
|
||||
`("VC-Annotate"
|
||||
["By Color Map Range" (unless (null vc-annotate-display-mode)
|
||||
(setq vc-annotate-display-mode nil)
|
||||
|
|
|
@ -634,7 +634,7 @@ Returns nil if unable to find this information."
|
|||
(error "Don't know how to compute the next revision of %s" rev)))
|
||||
|
||||
(defun vc-bzr-register (files &optional _comment)
|
||||
"Register FILES under bzr. COMMENT is ignored."
|
||||
"Register FILES under bzr. COMMENT is ignored."
|
||||
(vc-bzr-command "add" nil 0 files))
|
||||
|
||||
;; Could run `bzr status' in the directory and see if it succeeds, but
|
||||
|
|
|
@ -136,7 +136,7 @@ It should return a status of either 0 (no differences found), or
|
|||
;; This should use url-dav-get-properties with a depth of `1' to get
|
||||
;; all the properties.
|
||||
(defun vc-dav-dir-state (_url)
|
||||
"find the version control state of all files in DIR in a fast way."
|
||||
"Find the version control state of all files in DIR in a fast way."
|
||||
)
|
||||
|
||||
(defun vc-dav-responsible-p (_url)
|
||||
|
|
|
@ -1113,33 +1113,33 @@ If it is a file, return the corresponding cons for the file itself."
|
|||
|
||||
(define-derived-mode vc-dir-mode special-mode "VC dir"
|
||||
"Major mode for VC directory buffers.
|
||||
Marking/Unmarking key bindings and actions:
|
||||
m - mark a file/directory
|
||||
Marking/Unmarking key bindings and actions: \\<vc-dir-mode-map>
|
||||
\\[vc-dir-mark] - mark a file/directory
|
||||
- if the region is active, mark all the files in region.
|
||||
Restrictions: - a file cannot be marked if any parent directory is marked
|
||||
- a directory cannot be marked if any child file or
|
||||
directory is marked
|
||||
u - unmark a file/directory
|
||||
\\[vc-dir-unmark] - unmark a file/directory
|
||||
- if the region is active, unmark all the files in region.
|
||||
M - if the cursor is on a file: mark all the files with the same state as
|
||||
\\[vc-dir-mark-all-files] - if the cursor is on a file: mark all the files with the same state as
|
||||
the current file
|
||||
- if the cursor is on a directory: mark all child files
|
||||
- with a prefix argument: mark all files
|
||||
U - if the cursor is on a file: unmark all the files with the same state
|
||||
\\[vc-dir-unmark-all-files] - if the cursor is on a file: unmark all the files with the same state
|
||||
as the current file
|
||||
- if the cursor is on a directory: unmark all child files
|
||||
- with a prefix argument: unmark all files
|
||||
|
||||
VC commands
|
||||
VC commands in the `C-x v' prefix can be used.
|
||||
VC commands in the \\[vc-prefix-map] prefix can be used.
|
||||
VC commands act on the marked entries. If nothing is marked, VC
|
||||
commands act on the current entry.
|
||||
|
||||
Search & Replace
|
||||
S - searches the marked files
|
||||
Q - does a query replace on the marked files
|
||||
M-s a C-s - does an isearch on the marked files
|
||||
M-s a C-M-s - does a regexp isearch on the marked files
|
||||
\\[vc-dir-search] - searches the marked files
|
||||
\\[vc-dir-query-replace-regexp] - does a query replace on the marked files
|
||||
\\[vc-dir-isearch] - does an isearch on the marked files
|
||||
\\[vc-dir-isearch-regexp] - does a regexp isearch on the marked files
|
||||
If nothing is marked, these commands act on the current entry.
|
||||
When a directory is current or marked, the Search & Replace
|
||||
commands act on the child files of that directory that are displayed in
|
||||
|
|
|
@ -104,12 +104,13 @@
|
|||
;; will be called with the buffer file name as argument whenever the
|
||||
;; dispatcher resyncs the buffer.
|
||||
|
||||
;; To do:
|
||||
;;
|
||||
;;; Code:
|
||||
|
||||
;; TODO:
|
||||
;; - log buffers need font-locking.
|
||||
;;
|
||||
|
||||
;; General customization
|
||||
|
||||
(defcustom vc-logentry-check-hook nil
|
||||
"Normal hook run by `vc-finish-logentry'.
|
||||
Use this to impose your own rules on the entry in addition to any the
|
||||
|
@ -662,7 +663,7 @@ contents of the log entry buffer. If COMMENT is a string and
|
|||
INITIAL-CONTENTS is nil, do action immediately as if the user had
|
||||
entered COMMENT. If COMMENT is t, also do action immediately with an
|
||||
empty comment. Remember the file's buffer in `vc-parent-buffer'
|
||||
\(current one if no file). Puts the log-entry buffer in major-mode
|
||||
\(current one if no file). Puts the log-entry buffer in major mode
|
||||
MODE, defaulting to `log-edit-mode' if MODE is nil.
|
||||
AFTER-HOOK specifies the local value for `vc-log-after-operation-hook'.
|
||||
BACKEND, if non-nil, specifies a VC backend for the Log Edit buffer."
|
||||
|
|
|
@ -408,7 +408,7 @@ in the order given by `git status'."
|
|||
orig-name) ;; Original name for renames or copies.
|
||||
|
||||
(defun vc-git-escape-file-name (name)
|
||||
"Escape a file name if necessary."
|
||||
"Escape filename NAME if necessary."
|
||||
(if (string-match "[\n\t\"\\]" name)
|
||||
(concat "\""
|
||||
(mapconcat (lambda (c)
|
||||
|
|
|
@ -271,9 +271,9 @@ If `ask', you will be prompted for a branch type."
|
|||
(defcustom vc-hg-symbolic-revision-styles
|
||||
'(builtin-active-bookmark
|
||||
"{if(bookmarks,sub(' ',',',bookmarks),if(phabdiff,phabdiff,shortest(node,6)))}")
|
||||
"List of ways to present versions symbolically. The version
|
||||
that we use is the first one that successfully produces a
|
||||
non-empty string.
|
||||
"List of ways to present versions symbolically.
|
||||
The version that we use is the first one that successfully
|
||||
produces a non-empty string.
|
||||
|
||||
Each entry in the list can be either:
|
||||
|
||||
|
@ -811,7 +811,7 @@ if we don't understand a construct, we signal
|
|||
(push c parts)
|
||||
(cond ((eq c ?\\) (setf state 'charclass-backslash))
|
||||
((eq c ?\]) (setf state 'normal))))
|
||||
(t (error "invalid state")))
|
||||
(t (error "Invalid state")))
|
||||
(setf i (1+ i))))
|
||||
(unless (eq state 'normal)
|
||||
(signal 'vc-hg-unsupported-syntax (list pcre)))
|
||||
|
@ -1151,7 +1151,7 @@ hg binary."
|
|||
(expand-file-name old)))
|
||||
|
||||
(defun vc-hg-register (files &optional _comment)
|
||||
"Register FILES under hg. COMMENT is ignored."
|
||||
"Register FILES under hg. COMMENT is ignored."
|
||||
(vc-hg-command nil 0 files "add"))
|
||||
|
||||
(defun vc-hg-create-repo ()
|
||||
|
|
|
@ -483,7 +483,7 @@ status of this file. Otherwise, the value returned is one of:
|
|||
(vc-call-backend backend 'state file)))
|
||||
|
||||
(defsubst vc-up-to-date-p (file)
|
||||
"Convenience function that checks whether `vc-state' of FILE is `up-to-date'."
|
||||
"Convenience function to check whether `vc-state' of FILE is `up-to-date'."
|
||||
(eq (vc-state file) 'up-to-date))
|
||||
|
||||
(defun vc-working-revision (file &optional backend)
|
||||
|
@ -627,7 +627,7 @@ Before doing that, check if there are any old backups and get rid of them."
|
|||
|
||||
(declare-function vc-dir-resynch-file "vc-dir" (&optional fname))
|
||||
|
||||
(defvar vc-dir-buffers nil "List of vc-dir buffers.")
|
||||
(defvar vc-dir-buffers nil "List of `vc-dir' buffers.")
|
||||
|
||||
(defun vc-after-save ()
|
||||
"Function to be called by `basic-save-buffer' (in files.el)."
|
||||
|
|
|
@ -242,7 +242,7 @@ When VERSION is given, perform check for that version."
|
|||
(autoload 'vc-switches "vc")
|
||||
|
||||
(defun vc-rcs-register (files &optional comment)
|
||||
"Register FILES into the RCS version-control system.
|
||||
"Register FILES into the RCS version control system.
|
||||
Automatically retrieve a read-only version of the file with keywords expanded.
|
||||
COMMENT can be used to provide an initial description for each FILES.
|
||||
Passes either `vc-rcs-register-switches' or `vc-register-switches'
|
||||
|
@ -382,8 +382,9 @@ whether to remove it."
|
|||
(vc-switches 'RCS 'checkout)))
|
||||
|
||||
(defun vc-rcs-checkout (file &optional rev)
|
||||
"Retrieve a copy of a saved version of FILE. If FILE is a directory,
|
||||
attempt the checkout for all registered files beneath it."
|
||||
"Retrieve a copy of a saved version of FILE.
|
||||
If FILE is a directory, attempt the checkout for all registered
|
||||
files beneath it."
|
||||
(if (file-directory-p file)
|
||||
(mapc #'vc-rcs-checkout (vc-expand-dirs (list file) 'RCS))
|
||||
(let ((file-buffer (get-file-buffer file))
|
||||
|
@ -448,8 +449,8 @@ attempt the checkout for all registered files beneath it."
|
|||
(message "Checking out %s...done" file))))))
|
||||
|
||||
(defun vc-rcs-revert (file &optional _contents-done)
|
||||
"Revert FILE to the version it was based on. If FILE is a directory,
|
||||
revert all registered files beneath it."
|
||||
"Revert FILE to the version it was based on.
|
||||
If FILE is a directory, revert all registered files beneath it."
|
||||
(if (file-directory-p file)
|
||||
(mapc #'vc-rcs-revert (vc-expand-dirs (list file) 'RCS))
|
||||
(vc-do-command "*vc*" 0 "co" (vc-master-name file) "-f"
|
||||
|
@ -516,8 +517,9 @@ Needs RCS 5.6.2 or later for -M."
|
|||
(kill-buffer filename)))))
|
||||
|
||||
(defun vc-rcs-modify-change-comment (files rev comment)
|
||||
"Modify the change comments change on FILES on a specified REV. If FILE is a
|
||||
directory the operation is applied to all registered files beneath it."
|
||||
"Modify the change comments change on FILES on a specified REV.
|
||||
If FILE is a directory the operation is applied to all registered
|
||||
files beneath it."
|
||||
(dolist (file (vc-expand-dirs files 'RCS))
|
||||
(vc-do-command "*vc*" 0 "rcs" (vc-master-name file)
|
||||
(concat "-m" rev ":" comment))))
|
||||
|
|
|
@ -191,7 +191,7 @@ Optional string REV is a revision."
|
|||
(autoload 'vc-switches "vc")
|
||||
|
||||
(defun vc-sccs-register (files &optional comment)
|
||||
"Register FILES into the SCCS version-control system.
|
||||
"Register FILES into the SCCS version control system.
|
||||
Automatically retrieve a read-only version of the files with keywords expanded.
|
||||
COMMENT can be used to provide an initial description of FILES.
|
||||
Passes either `vc-sccs-register-switches' or `vc-register-switches'
|
||||
|
@ -270,8 +270,8 @@ locked. REV is the revision to check out."
|
|||
(message "Checking out %s...done" file))))
|
||||
|
||||
(defun vc-sccs-revert (file &optional _contents-done)
|
||||
"Revert FILE to the version it was based on. If FILE is a directory,
|
||||
revert all subfiles."
|
||||
"Revert FILE to the version it was based on.
|
||||
If FILE is a directory, revert all subfiles."
|
||||
(if (file-directory-p file)
|
||||
(mapc #'vc-sccs-revert (vc-expand-dirs (list file) 'SCCS))
|
||||
(vc-sccs-do-command nil 0 "unget" (vc-master-name file))
|
||||
|
|
|
@ -238,7 +238,7 @@ This function differs from vc-do-command in that it invokes `vc-src-program'."
|
|||
(autoload 'vc-switches "vc")
|
||||
|
||||
(defun vc-src-register (files &optional _comment)
|
||||
"Register FILES under src. COMMENT is ignored."
|
||||
"Register FILES under src. COMMENT is ignored."
|
||||
(vc-src-command nil files "add"))
|
||||
|
||||
(defun vc-src-responsible-p (file)
|
||||
|
@ -268,15 +268,16 @@ REV is the revision to check out into WORKFILE."
|
|||
(vc-src-command nil file "co")))
|
||||
|
||||
(defun vc-src-revert (file &optional _contents-done)
|
||||
"Revert FILE to the version it was based on. If FILE is a directory,
|
||||
revert all registered files beneath it."
|
||||
"Revert FILE to the version it was based on.
|
||||
If FILE is a directory, revert all registered files beneath it."
|
||||
(if (file-directory-p file)
|
||||
(mapc #'vc-src-revert (vc-expand-dirs (list file) 'SRC))
|
||||
(vc-src-command nil file "co")))
|
||||
|
||||
(defun vc-src-modify-change-comment (files rev comment)
|
||||
"Modify the change comments change on FILES on a specified REV. If FILE is a
|
||||
directory the operation is applied to all registered files beneath it."
|
||||
"Modify the change comments change on FILES on a specified REV.
|
||||
If FILE is a directory the operation is applied to all registered
|
||||
files beneath it."
|
||||
(dolist (file (vc-expand-dirs files 'SRC))
|
||||
(vc-src-command nil file "amend" "-m" comment rev)))
|
||||
|
||||
|
|
|
@ -295,7 +295,7 @@ RESULT is a list of conses (FILE . STATE) for directory DIR."
|
|||
(autoload 'vc-switches "vc")
|
||||
|
||||
(defun vc-svn-register (files &optional _comment)
|
||||
"Register FILES into the SVN version-control system.
|
||||
"Register FILES into the SVN version control system.
|
||||
The COMMENT argument is ignored This does an add but not a commit.
|
||||
Passes either `vc-svn-register-switches' or `vc-register-switches'
|
||||
to the SVN command."
|
||||
|
|
|
@ -1012,7 +1012,7 @@ responsible for the given file."
|
|||
(error "No VC backend is responsible for %s" file))))
|
||||
|
||||
(defun vc-expand-dirs (file-or-dir-list backend)
|
||||
"Expands directories in a file list specification.
|
||||
"Expand directories in a file list specification.
|
||||
Within directories, only files already under version control are noticed."
|
||||
(let ((flattened '()))
|
||||
(dolist (node file-or-dir-list)
|
||||
|
@ -1152,7 +1152,7 @@ BEWARE: this function may change the current buffer."
|
|||
(memq (vc-state file) '(edited needs-merge conflict))))))
|
||||
|
||||
(defun vc-compatible-state (p q)
|
||||
"Controls which states can be in the same commit."
|
||||
"Control which states can be in the same commit."
|
||||
(or
|
||||
(eq p q)
|
||||
(and (member p '(edited added removed)) (member q '(edited added removed)))))
|
||||
|
|
|
@ -377,7 +377,7 @@ Currently XDND, Motif and old KDE 1.x protocols are recognized."
|
|||
("XdndActionMove" . move)
|
||||
("XdndActionLink" . link)
|
||||
("XdndActionAsk" . ask))
|
||||
"Mapping from XDND action types to lisp symbols.")
|
||||
"Mapping from XDND action types to Lisp symbols.")
|
||||
|
||||
(declare-function x-change-window-property "xfns.c"
|
||||
(prop value &optional frame type format outer-P))
|
||||
|
|
Loading…
Add table
Reference in a new issue