mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
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).
This commit is contained in:
parent
866e3c050f
commit
786ab4a5ca
1 changed files with 4 additions and 1 deletions
|
|
@ -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 ()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue