mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-21 05:00:47 -08:00
upstream
This commit is contained in:
commit
fd0ea43455
99 changed files with 1955 additions and 1397 deletions
|
|
@ -124,7 +124,7 @@
|
|||
;; Adding your own checks:
|
||||
;;
|
||||
;; You can experiment with adding your own checks by setting the
|
||||
;; hooks `checkdoc-style-hooks' and `checkdoc-comment-style-hooks'.
|
||||
;; hooks `checkdoc-style-functions' and `checkdoc-comment-style-hooks'.
|
||||
;; Return a string which is the error you wish to report. The cursor
|
||||
;; position should be preserved.
|
||||
;;
|
||||
|
|
@ -274,17 +274,21 @@ made in the style guide relating to order."
|
|||
:type 'boolean)
|
||||
;;;###autoload(put 'checkdoc-arguments-in-order-flag 'safe-local-variable 'booleanp)
|
||||
|
||||
(defvar checkdoc-style-hooks nil
|
||||
"Hooks called after the standard style check is completed.
|
||||
All hooks must return nil or a string representing the error found.
|
||||
(define-obsolete-variable-alias 'checkdoc-style-hooks
|
||||
'checkdoc-style-functions "24.3")
|
||||
(defvar checkdoc-style-functions nil
|
||||
"Hook run after the standard style check is completed.
|
||||
All functions must return nil or a string representing the error found.
|
||||
Useful for adding new user implemented commands.
|
||||
|
||||
Each hook is called with two parameters, (DEFUNINFO ENDPOINT).
|
||||
DEFUNINFO is the return value of `checkdoc-defun-info'. ENDPOINT is the
|
||||
location of end of the documentation string.")
|
||||
|
||||
(defvar checkdoc-comment-style-hooks nil
|
||||
"Hooks called after the standard comment style check is completed.
|
||||
(define-obsolete-variable-alias 'checkdoc-comment-style-hooks
|
||||
'checkdoc-comment-style-functions "24.3")
|
||||
(defvar checkdoc-comment-style-functions nil
|
||||
"Hook run after the standard comment style check is completed.
|
||||
Must return nil if no errors are found, or a string describing the
|
||||
problem discovered. This is useful for adding additional checks.")
|
||||
|
||||
|
|
@ -1843,7 +1847,7 @@ Replace with \"%s\"? " original replace)
|
|||
;; and reliance on the Ispell program.
|
||||
(checkdoc-ispell-docstring-engine e)
|
||||
;; User supplied checks
|
||||
(save-excursion (checkdoc-run-hooks 'checkdoc-style-hooks fp e))
|
||||
(save-excursion (checkdoc-run-hooks 'checkdoc-style-functions fp e))
|
||||
;; Done!
|
||||
)))
|
||||
|
||||
|
|
@ -2353,7 +2357,7 @@ Code:, and others referenced in the style guide."
|
|||
err
|
||||
(or
|
||||
;; Generic Full-file checks (should be comment related)
|
||||
(checkdoc-run-hooks 'checkdoc-comment-style-hooks)
|
||||
(checkdoc-run-hooks 'checkdoc-comment-style-functions)
|
||||
err))
|
||||
;; Done with full file comment checks
|
||||
err)))
|
||||
|
|
|
|||
|
|
@ -44,110 +44,101 @@ menus, turn this variable off, otherwise it is probably better to keep it on.")
|
|||
|
||||
;;;###autoload
|
||||
(defmacro easy-menu-define (symbol maps doc menu)
|
||||
"Define a menu bar submenu in maps MAPS, according to MENU.
|
||||
"Define a pop-up menu and/or menu bar menu specified by MENU.
|
||||
If SYMBOL is non-nil, define SYMBOL as a function to pop up the
|
||||
submenu defined by MENU, with DOC as its doc string.
|
||||
|
||||
If SYMBOL is non-nil, store the menu keymap in the value of SYMBOL,
|
||||
and define SYMBOL as a function to pop up the menu, with DOC as its doc string.
|
||||
If SYMBOL is nil, just store the menu keymap into MAPS.
|
||||
MAPS, if non-nil, should be a keymap or a list of keymaps; add
|
||||
the submenu defined by MENU to the keymap or each of the keymaps,
|
||||
as a top-level menu bar item.
|
||||
|
||||
The first element of MENU must be a string. It is the menu bar item name.
|
||||
It may be followed by the following keyword argument pairs
|
||||
The first element of MENU must be a string. It is the menu bar
|
||||
item name. It may be followed by the following keyword argument
|
||||
pairs:
|
||||
|
||||
:filter FUNCTION
|
||||
:filter FUNCTION
|
||||
FUNCTION must be a function which, if called with one
|
||||
argument---the list of the other menu items---returns the
|
||||
items to actually display.
|
||||
|
||||
FUNCTION is a function with one argument, the rest of menu items.
|
||||
It returns the remaining items of the displayed menu.
|
||||
:visible INCLUDE
|
||||
INCLUDE is an expression. The menu is visible if the
|
||||
expression evaluates to a non-nil value. `:included' is an
|
||||
alias for `:visible'.
|
||||
|
||||
:visible INCLUDE
|
||||
:active ENABLE
|
||||
ENABLE is an expression. The menu is enabled for selection
|
||||
if the expression evaluates to a non-nil value. `:enable' is
|
||||
an alias for `:active'.
|
||||
|
||||
INCLUDE is an expression; this menu is only visible if this
|
||||
expression has a non-nil value. `:included' is an alias for `:visible'.
|
||||
The rest of the elements in MENU are menu items.
|
||||
A menu item can be a vector of three elements:
|
||||
|
||||
:active ENABLE
|
||||
|
||||
ENABLE is an expression; the menu is enabled for selection whenever
|
||||
this expression's value is non-nil. `:enable' is an alias for `:active'.
|
||||
|
||||
The rest of the elements in MENU, are menu items.
|
||||
|
||||
A menu item is usually a vector of three elements: [NAME CALLBACK ENABLE]
|
||||
[NAME CALLBACK ENABLE]
|
||||
|
||||
NAME is a string--the menu item name.
|
||||
|
||||
CALLBACK is a command to run when the item is chosen,
|
||||
or a list to evaluate when the item is chosen.
|
||||
CALLBACK is a command to run when the item is chosen, or an
|
||||
expression to evaluate when the item is chosen.
|
||||
|
||||
ENABLE is an expression; the item is enabled for selection
|
||||
whenever this expression's value is non-nil.
|
||||
ENABLE is an expression; the item is enabled for selection if the
|
||||
expression evaluates to a non-nil value.
|
||||
|
||||
Alternatively, a menu item may have the form:
|
||||
|
||||
[ NAME CALLBACK [ KEYWORD ARG ] ... ]
|
||||
[ NAME CALLBACK [ KEYWORD ARG ]... ]
|
||||
|
||||
Where KEYWORD is one of the symbols defined below.
|
||||
where NAME and CALLBACK have the same meanings as above, and each
|
||||
optional KEYWORD and ARG pair should be one of the following:
|
||||
|
||||
:keys KEYS
|
||||
:keys KEYS
|
||||
KEYS is a string; a keyboard equivalent to the menu item.
|
||||
This is normally not needed because keyboard equivalents are
|
||||
usually computed automatically. KEYS is expanded with
|
||||
`substitute-command-keys' before it is used.
|
||||
|
||||
KEYS is a string; a complex keyboard equivalent to this menu item.
|
||||
This is normally not needed because keyboard equivalents are usually
|
||||
computed automatically.
|
||||
KEYS is expanded with `substitute-command-keys' before it is used.
|
||||
:key-sequence KEYS
|
||||
KEYS is a hint for speeding up Emacs's first display of the
|
||||
menu. It should be nil if you know that the menu item has no
|
||||
keyboard equivalent; otherwise it should be a string or
|
||||
vector specifying a keyboard equivalent for the menu item.
|
||||
|
||||
:key-sequence KEYS
|
||||
:active ENABLE
|
||||
ENABLE is an expression; the item is enabled for selection
|
||||
whenever this expression's value is non-nil. `:enable' is an
|
||||
alias for `:active'.
|
||||
|
||||
KEYS is nil, a string or a vector; nil or a keyboard equivalent to this
|
||||
menu item.
|
||||
This is a hint that will considerably speed up Emacs's first display of
|
||||
a menu. Use `:key-sequence nil' when you know that this menu item has no
|
||||
keyboard equivalent.
|
||||
:visible INCLUDE
|
||||
INCLUDE is an expression; this item is only visible if this
|
||||
expression has a non-nil value. `:included' is an alias for
|
||||
`:visible'.
|
||||
|
||||
:active ENABLE
|
||||
:label FORM
|
||||
FORM is an expression that is dynamically evaluated and whose
|
||||
value serves as the menu item's label (the default is NAME).
|
||||
|
||||
ENABLE is an expression; the item is enabled for selection whenever
|
||||
this expression's value is non-nil. `:enable' is an alias for `:active'.
|
||||
:suffix FORM
|
||||
FORM is an expression that is dynamically evaluated and whose
|
||||
value is concatenated with the menu entry's label.
|
||||
|
||||
:visible INCLUDE
|
||||
:style STYLE
|
||||
STYLE is a symbol describing the type of menu item; it should
|
||||
be `toggle' (a checkbox), or `radio' (a radio button), or any
|
||||
other value (meaning an ordinary menu item).
|
||||
|
||||
INCLUDE is an expression; this item is only visible if this
|
||||
expression has a non-nil value. `:included' is an alias for `:visible'.
|
||||
:selected SELECTED
|
||||
SELECTED is an expression; the checkbox or radio button is
|
||||
selected whenever the expression's value is non-nil.
|
||||
|
||||
:label FORM
|
||||
:help HELP
|
||||
HELP is a string, the help to display for the menu item.
|
||||
|
||||
FORM is an expression that will be dynamically evaluated and whose
|
||||
value will be used for the menu entry's text label (the default is NAME).
|
||||
Alternatively, a menu item can be a string. Then that string
|
||||
appears in the menu as unselectable text. A string consisting
|
||||
solely of dashes is displayed as a menu separator.
|
||||
|
||||
:suffix FORM
|
||||
|
||||
FORM is an expression that will be dynamically evaluated and whose
|
||||
value will be concatenated to the menu entry's label.
|
||||
|
||||
:style STYLE
|
||||
|
||||
STYLE is a symbol describing the type of menu item. The following are
|
||||
defined:
|
||||
|
||||
toggle: A checkbox.
|
||||
Prepend the name with `(*) ' or `( ) ' depending on if selected or not.
|
||||
radio: A radio button.
|
||||
Prepend the name with `[X] ' or `[ ] ' depending on if selected or not.
|
||||
button: Surround the name with `[' and `]'. Use this for an item in the
|
||||
menu bar itself.
|
||||
anything else means an ordinary menu item.
|
||||
|
||||
:selected SELECTED
|
||||
|
||||
SELECTED is an expression; the checkbox or radio button is selected
|
||||
whenever this expression's value is non-nil.
|
||||
|
||||
:help HELP
|
||||
|
||||
HELP is a string, the help to display for the menu item.
|
||||
|
||||
A menu item can be a string. Then that string appears in the menu as
|
||||
unselectable text. A string consisting solely of hyphens is displayed
|
||||
as a solid horizontal line.
|
||||
|
||||
A menu item can be a list with the same format as MENU. This is a submenu."
|
||||
Alternatively, a menu item can be a list with the same format as
|
||||
MENU. This is a submenu."
|
||||
(declare (indent defun) (debug (symbolp body)))
|
||||
`(progn
|
||||
,(if symbol `(defvar ,symbol nil ,doc))
|
||||
|
|
|
|||
|
|
@ -2066,7 +2066,9 @@ Keys are a number representing :before, :primary, and :after methods.")
|
|||
During executions, the list is first generated, then as each next method
|
||||
is called, the next method is popped off the stack.")
|
||||
|
||||
(defvar eieio-pre-method-execution-hooks nil
|
||||
(define-obsolete-variable-alias 'eieio-pre-method-execution-hooks
|
||||
'eieio-pre-method-execution-functions "24.3")
|
||||
(defvar eieio-pre-method-execution-functions nil
|
||||
"Abnormal hook run just before an EIEIO method is executed.
|
||||
The hook function must accept one argument, the list of forms
|
||||
about to be executed.")
|
||||
|
|
@ -2172,7 +2174,7 @@ This should only be called from a generic function."
|
|||
(eieiomt-method-list method method-primary nil)))
|
||||
)
|
||||
|
||||
(run-hook-with-args 'eieio-pre-method-execution-hooks
|
||||
(run-hook-with-args 'eieio-pre-method-execution-functions
|
||||
primarymethodlist)
|
||||
|
||||
;; Now loop through all occurrences forms which we must execute
|
||||
|
|
@ -2277,7 +2279,7 @@ for this common case to improve performance."
|
|||
|
||||
;; Do the regular implementation here.
|
||||
|
||||
(run-hook-with-args 'eieio-pre-method-execution-hooks
|
||||
(run-hook-with-args 'eieio-pre-method-execution-functions
|
||||
lambdas)
|
||||
|
||||
(setq lastval (apply (car lambdas) newargs))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue