diff options
| author | Lars Ingebrigtsen | 2021-09-18 16:12:56 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2021-09-18 18:18:13 +0200 |
| commit | c19576759f3468b5653241633b0ea85469f6bb06 (patch) | |
| tree | 917048dd317317ecbeffe3a15167b61aabd39e2b /lisp/cedet | |
| parent | 045a4fe94c18cd36ef297e62a80cdff449af3aa5 (diff) | |
| download | emacs-c19576759f3468b5653241633b0ea85469f6bb06.tar.gz emacs-c19576759f3468b5653241633b0ea85469f6bb06.zip | |
Make argument optional in pulse-momentary-highlight-one-line
* lisp/cedet/pulse.el (pulse-momentary-highlight-one-line): Make
POINT optional (bug#50642) so that the function can be used more
easily from some hook functions.
Diffstat (limited to 'lisp/cedet')
| -rw-r--r-- | lisp/cedet/pulse.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/cedet/pulse.el b/lisp/cedet/pulse.el index 7928fa1bf42..b0269440291 100644 --- a/lisp/cedet/pulse.el +++ b/lisp/cedet/pulse.el | |||
| @@ -195,11 +195,13 @@ Optional argument FACE specifies the face to do the highlighting." | |||
| 195 | (remove-hook 'pre-command-hook #'pulse-momentary-unhighlight)) | 195 | (remove-hook 'pre-command-hook #'pulse-momentary-unhighlight)) |
| 196 | 196 | ||
| 197 | ;;;###autoload | 197 | ;;;###autoload |
| 198 | (defun pulse-momentary-highlight-one-line (point &optional face) | 198 | (defun pulse-momentary-highlight-one-line (&optional point face) |
| 199 | "Highlight the line around POINT, unhighlighting before next command. | 199 | "Highlight the line around POINT, unhighlighting before next command. |
| 200 | If POINT is nil or missing, the current point is used instead. | ||
| 201 | |||
| 200 | Optional argument FACE specifies the face to do the highlighting." | 202 | Optional argument FACE specifies the face to do the highlighting." |
| 201 | (save-excursion | 203 | (save-excursion |
| 202 | (goto-char point) | 204 | (goto-char (or point (point))) |
| 203 | (let ((start (point-at-bol)) | 205 | (let ((start (point-at-bol)) |
| 204 | (end (save-excursion | 206 | (end (save-excursion |
| 205 | (end-of-line) | 207 | (end-of-line) |