[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 5674746 49/62: Added function to check if point is in a co
From: |
Ian Dunn |
Subject: |
[elpa] master 5674746 49/62: Added function to check if point is in a comment |
Date: |
Sat, 9 Dec 2017 14:34:05 -0500 (EST) |
branch: master
commit 567474608b0fc1e69cbf8109b6df3ed4d7725f71
Author: Ian Dunn <address@hidden>
Commit: Ian Dunn <address@hidden>
Added function to check if point is in a comment
* paced.el (paced-in-comment-p): New defun.
(paced-exclude-function): Mention it as a possible value.
---
paced.el | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/paced.el b/paced.el
index 3c086f8..a2b970a 100644
--- a/paced.el
+++ b/paced.el
@@ -440,7 +440,15 @@ since population mostly uses temporary buffers.")
This should be a function of no arguments that returns non-nil if
the current thing-at-point should be excluded from paced dictionaries.
-By default, this allows everything.")
+By default, this allows everything.
+
+A useful function for this is `paced-in-comment-p'.")
+
+(defun paced-in-comment-p (&optional pos)
+ "Return non-nil if POS is in a comment.
+
+If POS is not specified, defaults to `point'."
+ (nth 8 (syntax-ppss (or pos (point)))))
(defun paced-excluded-p ()
"Return non-nil to exclude current thing at point.
- [elpa] master 23c4a65 48/62: Mention common variables in population commands settings, (continued)
- [elpa] master 23c4a65 48/62: Mention common variables in population commands settings, Ian Dunn, 2017/12/09
- [elpa] master e293378 50/62: Fix completion falling back to other backend, Ian Dunn, 2017/12/09
- [elpa] master 3cd1147 45/62: Add IDs and descriptions for Contributing section, Ian Dunn, 2017/12/09
- [elpa] master 158ff71 56/62: Fixed internal links in documentation, Ian Dunn, 2017/12/09
- [elpa] master e611e61 33/62: Changed Emacs requirement to 25.1, Ian Dunn, 2017/12/09
- [elpa] master 75e9490 30/62: Account for case handling in completion, Ian Dunn, 2017/12/09
- [elpa] master a96701c 34/62: Fixed up paced-dictionary comments, Ian Dunn, 2017/12/09
- [elpa] master 5f9ddc6 35/62: Mention case handling in paced-dictionary-completions, Ian Dunn, 2017/12/09
- [elpa] master 56129ca 27/62: Updated docstrings, Ian Dunn, 2017/12/09
- [elpa] master f0ac1d8 31/62: Added mixed-case case handling, Ian Dunn, 2017/12/09
- [elpa] master 5674746 49/62: Added function to check if point is in a comment,
Ian Dunn <=
- [elpa] master 56944b8 44/62: Added documentation section for working with EDE, Ian Dunn, 2017/12/09
- [elpa] master 895f479 41/62: Pushed info pages, Ian Dunn, 2017/12/09
- [elpa] master 223809e 61/62: Fixed elpaignore file, Ian Dunn, 2017/12/09
- [elpa] master 2e306c8 40/62: Improved Introduction, Ian Dunn, 2017/12/09
- [elpa] master 139a199 53/62: Added note about dictionary properties, Ian Dunn, 2017/12/09
- [elpa] master 1234c0c 54/62: Updated info pages, Ian Dunn, 2017/12/09
- [elpa] master a3a7eac 51/62: Added default dictionary settings for population, Ian Dunn, 2017/12/09
- [elpa] master 7535133 58/62: Updated copyright blocks in all files, Ian Dunn, 2017/12/09
- [elpa] master bfdb640 43/62: Updated pabbrev comparison, Ian Dunn, 2017/12/09
- [elpa] master 4823f53 55/62: Added section for a basic setup, Ian Dunn, 2017/12/09