>> "Mos" == Mos <Mos> writes:
>> - ""))))
>> + ""))
>> + ((nullp type)
>> + "")))
> ^^^^
> Sorry, I meant nil instead of ""
Hi
I modified (hopefully correctly) your patch, applied it
then used my old definitions such as
(defun LaTeX-rem-insert (environment) ;Version:1.20
(if (y-or-n-p
(format "Do you want a title "))
(let ((title (read-input " Title: ")))
(LaTeX-insert-environment "rem" (concat "[" title "]"))
(and (LaTeX-label environment)
(newline-and-indent)))
(LaTeX-insert-environment "rem")
(and (LaTeX-label environment)
(newline-and-indent))))
and got an error. I attach the modified patch, and the error
regards
Uwe
Debugger entered--Lisp error: (void-function nullp)
nullp(nil)
LaTeX-label("rem")
(and (LaTeX-label environment) (newline-and-indent))
(if (y-or-n-p (format "Do you want a title ")) (let (...)
(LaTeX-insert-environment "rem" ...) (and ... ...)) (LaTeX-insert-environment
"rem") (and (LaTeX-label environment) (newline-and-indent)))
LaTeX-rem-insert("rem")
apply(LaTeX-rem-insert "rem" nil)
LaTeX-environment-menu("rem")
LaTeX-environment(nil)
call-interactively(LaTeX-environment)
diff --git a/latex.el b/latex.el
index 80d2761..fa18167 100644
--- a/latex.el
+++ b/latex.el
@@ -941,7 +941,7 @@ either the prefix or a symbol referring to one."
(make-variable-buffer-local 'LaTeX-label-alist)
-(defun LaTeX-label (name type)
+(defun LaTeX-label (name &optional type)
"Insert a label for NAME at point.
TYPE can be either environment or section. If
`LaTeX-label-function' is a valid function, LaTeX label will
@@ -955,7 +955,9 @@ transfer the job to this function."
LaTeX-section-label
(and (listp LaTeX-section-label)
(cdr (assoc name LaTeX-section-label))))
- ""))))
+ ""))
+ ((nullp type)
+ nil)))
label)
(when (symbolp prefix)
(setq prefix (symbol-value prefix)))
_______________________________________________
bug-auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-auctex