[Top][All Lists]

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

Re: [AUCTeX-devel] Re: Usability of docTeX-mode

From: David Kastrup
Subject: Re: [AUCTeX-devel] Re: Usability of docTeX-mode
Date: Sat, 22 Jul 2006 15:17:47 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

David Kastrup <address@hidden> writes:

> Ralf Angeli <address@hidden> writes:
>> * David Kastrup (2006-07-14) writes:
>>> But to save the user the work of rescanning the buffer after a change
>>> of the parsing variables seems a bit pointless.
>> Not if you want to spare the user having to think about rescanning the
>> buffer.  That's one thing less the user has to care about.  Is there a
>> reason not to be as userfriendly as possible if that's achievable with
>> moderate effort?
> I consider it not userfriendly to double the amount of variables he
> has to look for.  If we want to save the user the trouble of applying
> his changes manually to existing buffers after customization, we can
> use an appropriate setter function.

Something like

(defun TeX-local-list-setter (var value)
  (let ((old (symbol-value var)) tail)
    (dolist (buffer (buffer-list))
      (when (local-variable-p var buffer)
        (with-current-buffer buffer
          (setq tail (symbol-value var))
          (while (consp tail)
            (if (eq (cdr tail) old)
                  (setcdr tail value)
                  (setq tail nil))
              (setq tail (cdr tail))))))))
  (custom-set-default var value))

> If the only thing that we have to cater for is "customize", I don't
> think we need duplicate local variables.

David Kastrup, Kriemhildstr. 15, 44793 Bochum

reply via email to

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