fix(emacs/lean-util): fix lean-grab-id

This commit is contained in:
Soonho Kong 2014-09-30 15:12:47 -07:00
parent f4e118de76
commit 9024cb23fd

View file

@ -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)