bug-auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#70525: [PATCH] Make auto-reveal customizations easier to extend


From: Paul Nelson
Subject: bug#70525: [PATCH] Make auto-reveal customizations easier to extend
Date: Tue, 30 Apr 2024 10:32:35 +0200

Hi Arash,

> --8<---------------cut here---------------start------------->8---
> (defun TeX-fold-auto-reveal-p (mode)
>   "Decide whether to auto-reveal.
> Return non-nil if folded region should be auto-opened.
> See `TeX-fold-auto-reveal' for definitions of MODE."
>   (cond ((symbolp mode)
>          (and (boundp mode)
>               (symbol-value mode)))
>         ;; Clause modified:
>         ((and (consp mode)
>               (null TeX-fold-auto-reveal-external-commands))
>          (apply (car mode) (cdr mode)))
>         ;; Clause added:
>         ((and (consp mode) TeX-fold-auto-reveal-external-commands)
>          (if (eq (car mode) #'eval)
>              (apply (car mode) (cons (caadr mode)
>                                      (append 
> TeX-fold-auto-reveal-external-commands
>                                              (cdadr mode))))
>            (apply (car mode) (append TeX-fold-auto-reveal-external-commands
>                                      (cdr mode)))))
>         (t mode)))
> --8<---------------cut here---------------end--------------->8---

I think essentially the same criticism applies.  What if the user has
customized *-reveal to, say, '(eval (my-cool-function (my-arg-1
my-arg-2))), with totally different semantics than the default?  Then
the tweaks under "Clause added" would become meaningless.

Is the intent behind your suggestions that you'd like to keep the
number of customizable variables low, or something else?

Thanks, best,

Paul





reply via email to

[Prev in Thread] Current Thread [Next in Thread]