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 ()
|
(defun lean-grab-id ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(save-excursion
|
(when (not (bolp))
|
||||||
(when (and (or (eolp)
|
(save-excursion
|
||||||
(looking-at (rx white))
|
(let ((cur-pos (point))
|
||||||
(eobp))
|
id-beg)
|
||||||
(not (bolp)))
|
(backward-char 1)
|
||||||
(backward-char 1))
|
(setq id-beg (lean-find-id-beg))
|
||||||
(let ((cur-pos (point))
|
(when id-beg
|
||||||
(id-beg (lean-find-id-beg)))
|
(buffer-substring id-beg cur-pos))))))
|
||||||
(when id-beg
|
|
||||||
(buffer-substring id-beg (1+ (point)))))))
|
|
||||||
|
|
||||||
(provide 'lean-util)
|
(provide 'lean-util)
|
||||||
|
|
Loading…
Reference in a new issue