[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master c195767 1/2: Make argument optional in pulse-momentary-highlight-
From: |
Lars Ingebrigtsen |
Subject: |
master c195767 1/2: Make argument optional in pulse-momentary-highlight-one-line |
Date: |
Sat, 18 Sep 2021 12:18:19 -0400 (EDT) |
branch: master
commit c19576759f3468b5653241633b0ea85469f6bb06
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
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.
---
lisp/cedet/pulse.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lisp/cedet/pulse.el b/lisp/cedet/pulse.el
index 7928fa1..b026944 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."
(remove-hook 'pre-command-hook #'pulse-momentary-unhighlight))
;;;###autoload
-(defun pulse-momentary-highlight-one-line (point &optional face)
+(defun pulse-momentary-highlight-one-line (&optional point face)
"Highlight the line around POINT, unhighlighting before next command.
+If POINT is nil or missing, the current point is used instead.
+
Optional argument FACE specifies the face to do the highlighting."
(save-excursion
- (goto-char point)
+ (goto-char (or point (point)))
(let ((start (point-at-bol))
(end (save-excursion
(end-of-line)