bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#58029: 28.2; Struct boundaries ignored by bounds-of-thing-at-point


From: Richard Hopkins
Subject: bug#58029: 28.2; Struct boundaries ignored by bounds-of-thing-at-point
Date: Sat, 24 Sep 2022 15:02:18 +0100
User-agent: Roundcube Webmail/1.4.12

On 2022-09-24 14:42, Lars Ingebrigtsen wrote:
It only recognises these constructs if you're in a buffer where the
syntax rules say so.  So try:

(with-temp-buffer
  (insert (prin1-to-string (make-foo :a 1)))
  (emacs-lisp-mode)
  (goto-char (point-min))
  (list
   (buffer-string)
   (bounds-of-thing-at-point 'sexp)
   (prin1-to-string (read (current-buffer)))))

=> ("#s(foo 1)" (1 . 10) "#s(foo 1)")

Ah, thanks for the pointer.  It works for me too (and `backward-sexp')
starting from Emacs 29 when the relevant mode is set, including the
scratch buffer with `lisp-interaction-mode'.

Please close, thanks.





reply via email to

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