diff options
| author | Noam Postavsky | 2019-05-07 18:15:35 -0400 |
|---|---|---|
| committer | Noam Postavsky | 2019-05-16 06:53:05 -0400 |
| commit | 04e9938350d3820648d28d7cf4aa1885a08fd9b7 (patch) | |
| tree | 17d94d6502a0de7d3fc7e27833b5fc7035c3400b | |
| parent | 88cc910abee32df385e9596d2390ae010a5e6650 (diff) | |
| download | emacs-04e9938350d3820648d28d7cf4aa1885a08fd9b7.tar.gz emacs-04e9938350d3820648d28d7cf4aa1885a08fd9b7.zip | |
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.
| -rw-r--r-- | etc/NEWS | 9 | ||||
| -rw-r--r-- | lisp/thingatpt.el | 8 |
2 files changed, 12 insertions, 5 deletions
| @@ -1283,11 +1283,18 @@ automatically updates. In the buffer, you can use 's q' or 's e' to | |||
| 1283 | signal a thread with quit or error respectively, or get a snapshot | 1283 | signal a thread with quit or error respectively, or get a snapshot |
| 1284 | backtrace with 'b'. | 1284 | backtrace with 'b'. |
| 1285 | 1285 | ||
| 1286 | |||
| 1287 | ** thingatpt.el | ||
| 1288 | |||
| 1286 | --- | 1289 | --- |
| 1287 | ** thingatpt.el supports a new "thing" called 'uuid'. | 1290 | *** 'thing-at-point' supports a new "thing" called 'uuid'. |
| 1288 | A symbol 'uuid' can be passed to 'thing-at-point' and it returns the | 1291 | A symbol 'uuid' can be passed to 'thing-at-point' and it returns the |
| 1289 | UUID at point. | 1292 | UUID at point. |
| 1290 | 1293 | ||
| 1294 | --- | ||
| 1295 | *** 'word-at-point' and 'sentence-at-point' accept NO-PROPERTIES. | ||
| 1296 | Just like 'thing-at-point' itself. | ||
| 1297 | |||
| 1291 | ** Interactive automatic highlighting | 1298 | ** Interactive automatic highlighting |
| 1292 | 1299 | ||
| 1293 | +++ | 1300 | +++ |
diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el index 26e084320bd..60a20e2d188 100644 --- a/lisp/thingatpt.el +++ b/lisp/thingatpt.el | |||
| @@ -585,13 +585,13 @@ See RFC 4122 for the description of the format.") | |||
| 585 | 585 | ||
| 586 | ;; Aliases | 586 | ;; Aliases |
| 587 | 587 | ||
| 588 | (defun word-at-point () | 588 | (defun word-at-point (&optional no-properties) |
| 589 | "Return the word at point. See `thing-at-point'." | 589 | "Return the word at point. See `thing-at-point'." |
| 590 | (thing-at-point 'word)) | 590 | (thing-at-point 'word no-properties)) |
| 591 | 591 | ||
| 592 | (defun sentence-at-point () | 592 | (defun sentence-at-point (&optional no-properties) |
| 593 | "Return the sentence at point. See `thing-at-point'." | 593 | "Return the sentence at point. See `thing-at-point'." |
| 594 | (thing-at-point 'sentence)) | 594 | (thing-at-point 'sentence no-properties)) |
| 595 | 595 | ||
| 596 | (defun thing-at-point--read-from-whole-string (str) | 596 | (defun thing-at-point--read-from-whole-string (str) |
| 597 | "Read a Lisp expression from STR. | 597 | "Read a Lisp expression from STR. |