[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 04e9938 1/2: Accept NO-PROPERTIES in thing-at-point
From: |
Noam Postavsky |
Subject: |
[Emacs-diffs] master 04e9938 1/2: Accept NO-PROPERTIES in thing-at-point aliases (Bug#35491) |
Date: |
Thu, 16 May 2019 07:24:55 -0400 (EDT) |
branch: master
commit 04e9938350d3820648d28d7cf4aa1885a08fd9b7
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>
Accept NO-PROPERTIES in thing-at-point aliases (Bug#35491)
* lisp/thingatpt.el (word-at-point, sentence-at-point): Accept and
pass NO-PROPERTIES to thing-at-point.
* etc/NEWS: Announce change.
---
etc/NEWS | 9 ++++++++-
lisp/thingatpt.el | 8 ++++----
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index 699a04b..ce637a7 100644
--- 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
+++
diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el
index 26e0843..60a20e2 100644
--- a/lisp/thingatpt.el
+++ b/lisp/thingatpt.el
@@ -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.