The <specification-type> - functions must have two arguments, the first one
is the source or destination and the second is the <value>. It must return
-nil, if the test wasn't successful
l and a number (in general 1), which
+nil, if the test wasn't successful and a number (in general 1), which
specifies the weight of the test function. The weights of all single tests
are added to a summary weight and assigned to the action. The action
with the highest weight is called from the action handler. Look at
the definition of `idd-if-major-mode-p', `idd-if-minor-mode-p' and so on for
examples. Look at the function `idd-get-source-or-destination-alist', if
't to know the structure of the 'source-or-destination' argument
+you want to know the structure of the 'source-or-destination' argument
The <destination-specification> looks like <source-specification>,
to define a general `idd-actions' list, where the destination mode is
specified by `idd-if-major-mode-p'.
t a function, which has two arguments, the first specifies the
+<action> is a function, which has two arguments, the first specifies the
source and the second the destination. Look at the function definition
of `idd-action-copy-region' and `idd-action-copy-replace-region'. They are
examples for such actions."
(defun idd-if-dired-file-on-line-p (source-or-destination filename-regexp)
"Checks, if the filename on the line match FILENAME-REGEXP.
The function `dired-get-filename' is used, to get the filename from
-the SOURCE-OR-DESTINATION. It returns 1, if it matchs or nil."
+the SOURCE-OR-DESTINATION. It returns 1, if it matchs or nil."
(let ((case-fold-search t))
(if (and (idd-get-dired-filename-from-line source-or-destination)
(defun idd-if-modifiers-p (source-or-destination modifiers)
"Checks, if the MODIFIERS hold during selecting the SOURCE-OR-DESTINATION.
Returns 1, if the list MODIFIERS contains the same modifiers,
-or if any modyfiers are hold and MODIFIERS is t,
-or if no modyfiers are hold and MODIFIERS is nil.
+or if any modifiers are hold and MODIFIERS is t,
+or if no modifiers are hold and MODIFIERS is nil.
Otherwise nil is returned."
(let ((event-modifiers (event-modifiers
(cdr (assoc ':event source-or-destination)))))
- "Macro, useful
l for the definition of action functions.
+ "Macro, useful for the definition of action functions.
Look at the example `idd-action-move-region'."
(if (idd-if-region-active-p ,source t)