fix(emacs/lean-util): fix lean-grab-id
This commit is contained in:
parent
f4e118de76
commit
9024cb23fd
1 changed files with 8 additions and 10 deletions
|
@ -110,15 +110,13 @@
|
|||
|
||||
(defun lean-grab-id ()
|
||||
(interactive)
|
||||
(save-excursion
|
||||
(when (and (or (eolp)
|
||||
(looking-at (rx white))
|
||||
(eobp))
|
||||
(not (bolp)))
|
||||
(backward-char 1))
|
||||
(let ((cur-pos (point))
|
||||
(id-beg (lean-find-id-beg)))
|
||||
(when id-beg
|
||||
(buffer-substring id-beg (1+ (point)))))))
|
||||
(when (not (bolp))
|
||||
(save-excursion
|
||||
(let ((cur-pos (point))
|
||||
id-beg)
|
||||
(backward-char 1)
|
||||
(setq id-beg (lean-find-id-beg))
|
||||
(when id-beg
|
||||
(buffer-substring id-beg cur-pos))))))
|
||||
|
||||
(provide 'lean-util)
|
||||
|
|
Loading…
Reference in a new issue