Merge from origin/emacs-29
ecb80e0e8a
; Improve wording in documentation of 'not and 'null'5971aa1fd3
* lisp/dnd.el (dnd-handle-movement): Avoid errors (bug#70...bbc5204a0f
* doc/misc/calc.texi: Improve indexing.
This commit is contained in:
commit
9ea415cde3
4 changed files with 17 additions and 8 deletions
|
@ -350,7 +350,8 @@ kinds of multiple conditional constructs.
|
|||
This function tests for the falsehood of @var{condition}. It returns
|
||||
@code{t} if @var{condition} is @code{nil}, and @code{nil} otherwise.
|
||||
The function @code{not} is identical to @code{null}, and we recommend
|
||||
using the name @code{null} if you are testing for an empty list.
|
||||
using the name @code{null} if you are testing for an empty list or
|
||||
@code{nil} value.
|
||||
@end defun
|
||||
|
||||
@defspec and conditions@dots{}
|
||||
|
|
|
@ -143,9 +143,9 @@ This function is the opposite of @code{listp}: it returns @code{t} if
|
|||
@defun null object
|
||||
This function returns @code{t} if @var{object} is @code{nil}, and
|
||||
returns @code{nil} otherwise. This function is identical to @code{not},
|
||||
but as a matter of clarity we use @code{null} when @var{object} is
|
||||
considered a list and @code{not} when it is considered a truth value
|
||||
(see @code{not} in @ref{Combining Conditions}).
|
||||
but as a matter of clarity we use @code{not} when @var{object} is
|
||||
considered a truth value (see @code{not} in @ref{Combining
|
||||
Conditions}) and @code{null} otherwise.
|
||||
|
||||
@example
|
||||
@group
|
||||
|
|
|
@ -31468,6 +31468,7 @@ newline so that mode annotations will appear on lines by themselves.
|
|||
@node Programming
|
||||
@chapter Programming
|
||||
|
||||
@cindex Programming Calc
|
||||
@noindent
|
||||
There are several ways to ``program'' the Emacs Calculator, depending
|
||||
on the nature of the problem you need to solve.
|
||||
|
@ -31596,7 +31597,7 @@ following sections.
|
|||
|
||||
@noindent
|
||||
@kindex X
|
||||
@cindex Programming with keyboard macros
|
||||
@cindex Programming Calc, with keyboard macros
|
||||
@cindex Keyboard macros
|
||||
The easiest way to ``program'' the Emacs Calculator is to use standard
|
||||
keyboard macros. Press @w{@kbd{C-x (}} to begin recording a macro. From
|
||||
|
@ -31997,7 +31998,7 @@ The @kbd{m m} command saves the last invocation macro defined by
|
|||
@noindent
|
||||
@kindex Z F
|
||||
@pindex calc-user-define-formula
|
||||
@cindex Programming with algebraic formulas
|
||||
@cindex Programming Calc, with algebraic formulas
|
||||
Another way to create a new Calculator command uses algebraic formulas.
|
||||
The @kbd{Z F} (@code{calc-user-define-formula}) command stores the
|
||||
formula at the top of the stack as the definition for a key. This
|
||||
|
@ -32106,6 +32107,7 @@ in symbolic form without ever activating the @code{deriv} function. Press
|
|||
@node Lisp Definitions
|
||||
@section Programming with Lisp
|
||||
|
||||
@section Programming Calc, with Lisp
|
||||
@noindent
|
||||
The Calculator can be programmed quite extensively in Lisp. All you
|
||||
do is write a normal Lisp function definition, but with @code{defmath}
|
||||
|
@ -32851,6 +32853,7 @@ a large argument, a simpler program like the first one shown is fine.
|
|||
@node Calling Calc from Your Programs
|
||||
@subsection Calling Calc from Your Lisp Programs
|
||||
|
||||
@cindex Calling Calc from Lisp
|
||||
@noindent
|
||||
A later section (@pxref{Internals}) gives a full description of
|
||||
Calc's internal Lisp functions. It's not hard to call Calc from
|
||||
|
|
|
@ -151,8 +151,13 @@ Windows."
|
|||
(with-selected-window window
|
||||
(scroll-down 1))))))))
|
||||
(when dnd-indicate-insertion-point
|
||||
(ignore-errors
|
||||
(goto-char (posn-point posn)))))))
|
||||
(let ((pos (posn-point posn)))
|
||||
;; We avoid errors here, since on some systems this runs
|
||||
;; when waiting_for_input is non-zero, and that aborts on
|
||||
;; error.
|
||||
(if (and pos (<= (point-min) pos (point-max)))
|
||||
(goto-char pos)
|
||||
pos))))))
|
||||
|
||||
(defun dnd-handle-one-url (window action url)
|
||||
"Handle one dropped url by calling the appropriate handler.
|
||||
|
|
Loading…
Add table
Reference in a new issue