Subject: bug#34233: 27.0.50; defvar in comment

From: Lars Ingebrigtsen <[email-masked]>
Date: Thu, 11 Jul 2019 15:45:24 +0200

Noam Postavsky <[email-masked]> 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