[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#34233: 27.0.50; defvar in comment
From: |
Lars Ingebrigtsen |
Subject: |
bug#34233: 27.0.50; defvar in comment |
Date: |
Thu, 11 Jul 2019 15:45:24 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Noam Postavsky <npostavs@gmail.com> writes:
>> + ;; Top-level.
>> + (and (zerop (car syntax))
>> + ;; Not in a comment.
>> + (null (nth 4 syntax))
>> + ;; Not in a string.
>> + (null (nth 3 syntax)))))
>> (push var vars))))
>> `(progn ,@(mapcar (lambda (v) `(defvar ,v)) vars) ,exp)))))
[...]
> There is already a function for this particular case:
> syntax-ppss-toplevel-pos.
Are you referring to just the (car syntax) bit or the nth 4/3 bit (which
are the same as nth 8, apparently? (And which I've now committed.)
Feel free to touch it up if you want to, but I couldn't convince myself
that they were equivalent...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no