auctex-devel
[Top][All Lists]
Advanced

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

Re: [AUCTeX-devel] [PATCH] A fix for longtable and a new style


From: Arash Esbati
Subject: Re: [AUCTeX-devel] [PATCH] A fix for longtable and a new style
Date: Mon, 05 Oct 2015 23:42:18 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5

Hi Tassilo,

Tassilo Horn <address@hidden> writes:

> Mosè Giordano <address@hidden> writes:
>
>> `pushnew' can't append to variables, but my understanding is that it's
>> safer than `add-to-list' when it comes to let-bound variables (can
>> someone please confirm this?),
>
> Yes, `add-to-list' should not be used on locals:

So I should update the following function in `enumitem.el' and replace
`add-to-list' with `pushnew'?

--8<---------------cut here---------------start------------->8---
(defun LaTeX-arg-SetEnumitemKey (optional &optional prompt)
  "Ask for a new key to be defined and add it to
`LaTeX-enumitem-key-val-options-local'."
  (LaTeX-enumitem-update-key-val-options)
  (let ((key     (TeX-read-string "New Key: "))
        (replace (TeX-read-key-val optional
                                   LaTeX-enumitem-key-val-options-local 
"Replacement")))
    (TeX-argument-insert key     optional)
    (TeX-argument-insert replace optional)
    (add-to-list 'LaTeX-enumitem-key-val-options-local (list key))
    (LaTeX-add-enumitem-SetEnumitemKeys key)))
--8<---------------cut here---------------end--------------->8---

Well, I should do it anyways and remove the unused prompt argument.

Best, Arash




reply via email to

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