Remove the get-number-at-point function
thing-at-point already has `number-at-point`.
This commit is contained in:
parent
a6bd9c62c2
commit
2c490cfc36
@ -268,17 +268,6 @@ it as early as possible.
|
||||
|
||||
** Utility functions
|
||||
|
||||
*** Get the number at point
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun get-number-at-point ()
|
||||
(interactive)
|
||||
(skip-chars-backward "0123456789.-")
|
||||
(or (looking-at "[0123456789.-]+")
|
||||
(error "No number at point"))
|
||||
(string-to-number (match-string 0)))
|
||||
#+END_SRC
|
||||
|
||||
*** Round number at point to the given decimals
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
@ -290,7 +279,7 @@ it as early as possible.
|
||||
(fround
|
||||
(*
|
||||
mult
|
||||
(get-number-at-point)))
|
||||
(number-at-point)))
|
||||
mult)))))
|
||||
#+END_SRC
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user