]> git.eshelyaron.com Git - emacs.git/commitdiff
Accept NO-PROPERTIES in thing-at-point aliases (Bug#35491)
authorNoam Postavsky <npostavs@gmail.com>
Tue, 7 May 2019 22:15:35 +0000 (18:15 -0400)
committerNoam Postavsky <npostavs@gmail.com>
Thu, 16 May 2019 10:53:05 +0000 (06:53 -0400)
* lisp/thingatpt.el (word-at-point, sentence-at-point): Accept and
pass NO-PROPERTIES to thing-at-point.
* etc/NEWS: Announce change.

etc/NEWS
lisp/thingatpt.el

index 699a04b524688825307941848a407943d01e1786..ce637a7679be76ea06c5e1ac9d54d7c2d5733a63 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1283,11 +1283,18 @@ automatically updates.  In the buffer, you can use 's q' or 's e' to
 signal a thread with quit or error respectively, or get a snapshot
 backtrace with 'b'.
 
+
+** thingatpt.el
+
 ---
-** thingatpt.el supports a new "thing" called 'uuid'.
+*** 'thing-at-point' supports a new "thing" called 'uuid'.
 A symbol 'uuid' can be passed to 'thing-at-point' and it returns the
 UUID at point.
 
+---
+*** 'word-at-point' and 'sentence-at-point' accept NO-PROPERTIES.
+Just like 'thing-at-point' itself.
+
 ** Interactive automatic highlighting
 
 +++
index 26e084320bd2e99ec083d93658a333a72c88a03a..60a20e2d188bb1d17b683e18e6b750cf50cd87ff 100644 (file)
@@ -585,13 +585,13 @@ See RFC 4122 for the description of the format.")
 
 ;;  Aliases
 
-(defun word-at-point ()
+(defun word-at-point (&optional no-properties)
   "Return the word at point.  See `thing-at-point'."
-  (thing-at-point 'word))
+  (thing-at-point 'word no-properties))
 
-(defun sentence-at-point ()
+(defun sentence-at-point (&optional no-properties)
   "Return the sentence at point.  See `thing-at-point'."
-  (thing-at-point 'sentence))
+  (thing-at-point 'sentence no-properties))
 
 (defun thing-at-point--read-from-whole-string (str)
   "Read a Lisp expression from STR.