diff options
| author | Antoine Levitt | 2011-09-23 17:22:31 -0400 |
|---|---|---|
| committer | Chong Yidong | 2011-09-23 17:22:31 -0400 |
| commit | 953ea722f439a38914cdf723341ac7b41deeec5f (patch) | |
| tree | 743259d63f2fb6c20eb2561ad8a8d3f12a258af5 | |
| parent | 0a39f27eb9b78ceacdf351eba4549efd3323c88d (diff) | |
| download | emacs-953ea722f439a38914cdf723341ac7b41deeec5f.tar.gz emacs-953ea722f439a38914cdf723341ac7b41deeec5f.zip | |
* erc-button.el (erc-button-next-function): Scoping fix (Bug#9487).
| -rw-r--r-- | lisp/erc/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/erc/erc-button.el | 26 |
2 files changed, 18 insertions, 13 deletions
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index 1560f2a9049..7c7f10de2c8 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-09-23 Antoine Levitt <antoine.levitt@gmail.com> | ||
| 2 | |||
| 3 | * erc-button.el (erc-button-next-function): Scoping fix | ||
| 4 | (Bug#9487). | ||
| 5 | |||
| 1 | 2011-07-04 Vivek Dasmohapatra <vivek@etla.org> | 6 | 2011-07-04 Vivek Dasmohapatra <vivek@etla.org> |
| 2 | 7 | ||
| 3 | * erc.el (erc-generate-new-buffer-name): Reuse old buffer names | 8 | * erc.el (erc-generate-new-buffer-name): Reuse old buffer names |
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." | |||
| 430 | (defun erc-button-next-function () | 430 | (defun erc-button-next-function () |
| 431 | "Pseudo completion function that actually jumps to the next button. | 431 | "Pseudo completion function that actually jumps to the next button. |
| 432 | For use on `completion-at-point-functions'." | 432 | For use on `completion-at-point-functions'." |
| 433 | (let ((here (point))) | 433 | (when (< (point) (erc-beg-of-input-line)) |
| 434 | (when (< here (erc-beg-of-input-line)) | 434 | `(lambda () |
| 435 | (lambda () | 435 | (let ((here ,(point))) |
| 436 | (while (and (get-text-property here 'erc-callback) | 436 | (while (and (get-text-property here 'erc-callback) |
| 437 | (not (= here (point-max)))) | 437 | (not (= here (point-max)))) |
| 438 | (setq here (1+ here))) | 438 | (setq here (1+ here))) |
| 439 | (while (and (not (get-text-property here 'erc-callback)) | 439 | (while (and (not (get-text-property here 'erc-callback)) |
| 440 | (not (= here (point-max)))) | 440 | (not (= here (point-max)))) |
| 441 | (setq here (1+ here))) | 441 | (setq here (1+ here))) |
| 442 | (if (< here (point-max)) | 442 | (if (< here (point-max)) |
| 443 | (goto-char here) | 443 | (goto-char here) |
| 444 | (error "No next button")) | 444 | (error "No next button")) |
| 445 | t)))) | 445 | t)))) |
| 446 | 446 | ||
| 447 | (defun erc-button-next () | 447 | (defun erc-button-next () |
| 448 | "Go to the next button in this buffer." | 448 | "Go to the next button in this buffer." |