[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/backports-25.2 51656da 28/46: Fix number-at-point
From: |
Noam Postavsky |
Subject: |
[Emacs-diffs] scratch/backports-25.2 51656da 28/46: Fix number-at-point in lisp buffers |
Date: |
Sun, 2 Oct 2016 14:04:49 +0000 (UTC) |
branch: scratch/backports-25.2
commit 51656dadaa28917e578bbcb2e2373ed6212418e9
Author: Nicolas Richard <address@hidden>
Commit: Noam Postavsky <address@hidden>
Fix number-at-point in lisp buffers
* lisp/thingatpt.el (number-at-point): Don't say that things
like ?a are numbers in lisp mode buffers (bug#8634).
(cherry picked from commit 786ab4a5ca0a326a1c2d44dcbfed8427f7783062)
---
lisp/thingatpt.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el
index 9920fa0..df5c52d 100644
--- a/lisp/thingatpt.el
+++ b/lisp/thingatpt.el
@@ -603,7 +603,10 @@ Signal an error if the entire string was not used."
;;;###autoload
(defun number-at-point ()
"Return the number at point, or nil if none is found."
- (form-at-point 'sexp 'numberp))
+ (when (thing-at-point-looking-at "-?[0-9]+\\.?[0-9]*" 500)
+ (string-to-number
+ (buffer-substring (match-beginning 0) (match-end 0)))))
+
(put 'number 'thing-at-point 'number-at-point)
;;;###autoload
(defun list-at-point ()
- [Emacs-diffs] scratch/backports-25.2 fbe5f7b 11/46: Completely ignore buffers with no name when copying file names, (continued)
- [Emacs-diffs] scratch/backports-25.2 fbe5f7b 11/46: Completely ignore buffers with no name when copying file names, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 70244eb 15/46: Allow highlighting things like @math{2^{12}}, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 95d5520 12/46: Allow optional parameter to be nil, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 0780aa5 16/46: Replace XXX acronyms with draft standard ones, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 5f4c54b 18/46: Declare $ as an expression prefix in SCSS, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 344bc2b 17/46: Strip out some leading whitespace when looking at logs, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 69e0e89 23/46: Handle auth-source items with special characters on OS X, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 1cd6309 14/46: Allow ff-find-other-file (etc) to work with indirect clone buffers, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 5c084d9 10/46: Remove spurious newline in package list, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 80cf0b6 21/46: Restore the fix to bug#18527 from commit d6868025, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 51656da 28/46: Fix number-at-point in lisp buffers,
Noam Postavsky <=
- [Emacs-diffs] scratch/backports-25.2 0876366 43/46: Fix back-white <-> black-white typo, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 f3a19cf 31/46: Make a menu less ambiguous, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 12d1955 41/46: * lisp/files.el (version-control): Drop :group vc (Bug #14687), Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 cf54324 42/46: Improve error when installing non-package dirs, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 9e9f7c8 45/46: Don't --load directories, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 eb5dd2c 46/46: Don't require isearch-update before isearch-done, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 aad7ede 07/46: Ensure progress when fetching from the queue, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 87a7490 35/46: Clarify `read-face-name' doc and tweak the code, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 171ec16 44/46: Avoid error in icalendar--read-element, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 a33eb50 03/46: Let url use default file modes when copying files, Noam Postavsky, 2016/10/02