Hi Keita, Ikumi Keita <[email protected]> writes:
>>>>>> Arash Esbati <[email protected]> writes: > I have no knowledge about xparse.sty, so I'll comment on very minor > aspects. Me either, but many thanks for your comments on lisp :-) >> (defun LaTeX-xparse-macro-parse (type) >> "Process parsed macro and environment definitions. >> TYPE is one of the symobols mac or env." >> (dolist (xcmd (if (eq type 'mac) >> (LaTeX-xparse-macro-list) >> (LaTeX-xparse-environment-list))) >> (let ((name (car xcmd)) >> (spec (cadr xcmd)) >> args opt-star opt-token) >> (with-temp-buffer >> (with-syntax-table LaTeX-mode-syntax-table > > Since we are working in temporal buffer, we need not use > `with-syntax-table'. Just (set-syntax-table LaTeX-mode-syntax-table) > would be enough. True, I changed that. >> (goto-char (point-min)) >> (save-excursion >> (insert (replace-regexp-in-string "[ \t\r\n%]" "" spec))) > > Maybe it's a bit efficient to do in the order of `insert' followed by > `goto-char' without `save-excursion' :-) I changed this one as well. Now I have 2 (goto-char (point-min)), one before and one after the (insert ...) I admit that the first one is probably not needed. >> ;; Fully-expandable document commands >> '("DeclareExpandableDocumentCommand" >> TeX-arg-define-macro "Argument specification" t) > > It seems that other "Expandable" variants should be added as well. Upps, thanks for catching this. I confess I didn't look after the macros provided by the package. I've pushed that change to AUCTeX repo. Best, Arash
