diff options
Diffstat (limited to 'lisp/erc/erc-button.el')
| -rw-r--r-- | lisp/erc/erc-button.el | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lisp/erc/erc-button.el b/lisp/erc/erc-button.el index 3a897347dea..7fbbbc317d0 100644 --- a/lisp/erc/erc-button.el +++ b/lisp/erc/erc-button.el @@ -430,19 +430,19 @@ call it with the value of the `erc-data' text property." (defun erc-button-next-function () "Pseudo completion function that actually jumps to the next button. For use on `completion-at-point-functions'." - (let ((here (point))) - (when (< here (erc-beg-of-input-line)) - (lambda () - (while (and (get-text-property here 'erc-callback) - (not (= here (point-max)))) - (setq here (1+ here))) - (while (and (not (get-text-property here 'erc-callback)) - (not (= here (point-max)))) - (setq here (1+ here))) - (if (< here (point-max)) - (goto-char here) - (error "No next button")) - t)))) + (when (< (point) (erc-beg-of-input-line)) + `(lambda () + (let ((here ,(point))) + (while (and (get-text-property here 'erc-callback) + (not (= here (point-max)))) + (setq here (1+ here))) + (while (and (not (get-text-property here 'erc-callback)) + (not (= here (point-max)))) + (setq here (1+ here))) + (if (< here (point-max)) + (goto-char here) + (error "No next button")) + t)))) (defun erc-button-next () "Go to the next button in this buffer." |
