]> code.delx.au - gnu-emacs/blobdiff - lisp/cedet/pulse.el
Update copyright year to 2015
[gnu-emacs] / lisp / cedet / pulse.el
index 8f367d918dc3dab89f31c3f3c6274317f5ff5eea..89d44c20a6f0831070d6dec462aaca8d05eb661e 100644 (file)
@@ -1,6 +1,6 @@
 ;;; pulse.el --- Pulsing Overlays
 
-;;; Copyright (C) 2007-2012 Free Software Foundation, Inc.
+;;; Copyright (C) 2007-2015 Free Software Foundation, Inc.
 
 ;; Author: Eric M. Ludlam <eric@siege-engine.com>
 ;; Version: 1.0
@@ -180,7 +180,7 @@ Be sure to call `pulse-reset-face' after calling pulse."
 
 (defun pulse-momentary-highlight-overlay (o &optional face)
   "Pulse the overlay O, unhighlighting before next command.
-Optional argument FACE specifies the fact to do the highlighting."
+Optional argument FACE specifies the face to do the highlighting."
   (overlay-put o 'original-face (overlay-get o 'face))
   (add-to-list 'pulse-momentary-overlay o)
   (if (eq pulse-flag 'never)
@@ -227,17 +227,19 @@ Optional argument FACE specifies the fact to do the highlighting."
 (defun pulse-momentary-highlight-one-line (point &optional face)
   "Highlight the line around POINT, unhighlighting before next command.
 Optional argument FACE specifies the face to do the highlighting."
-  (let ((start (point-at-bol))
-       (end (save-excursion
-              (end-of-line)
-              (when (not (eobp))
-                (forward-char 1))
-              (point))))
-    (pulse-momentary-highlight-region start end face)))
+  (save-excursion
+    (goto-char point)
+    (let ((start (point-at-bol))
+          (end (save-excursion
+                 (end-of-line)
+                 (when (not (eobp))
+                   (forward-char 1))
+                 (point))))
+      (pulse-momentary-highlight-region start end face))))
 
 (defun pulse-momentary-highlight-region (start end &optional face)
   "Highlight between START and END, unhighlighting before next command.
-Optional argument FACE specifies the fact to do the highlighting."
+Optional argument FACE specifies the face to do the highlighting."
   (let ((o (make-overlay start end)))
     ;; Mark it for deletion
     (overlay-put o 'pulse-delete t)