* lisp/progmodes/hideif.el (hif-string-to-number): Don't return float for
hex integer constants. Fixes: debbugs:17807
This commit is contained in:
parent
27966b8101
commit
da20e0f1a8
2 changed files with 12 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2014-06-19 William Xu <william.xwl@gmail.com>
|
||||
|
||||
* progmodes/hideif.el (hif-string-to-number): Don't return float for
|
||||
hex integer constants (bug#17807).
|
||||
|
||||
2014-06-19 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* international/mule-util.el (truncate-string-ellipsis): New var.
|
||||
|
|
|
@ -412,9 +412,13 @@ that form should be displayed.")
|
|||
(if (or (not base) (= base 10))
|
||||
(string-to-number string base)
|
||||
(let* ((parts (split-string string "\\." t "[ \t]+"))
|
||||
(frac (cadr parts))
|
||||
(quot (expt (* base 1.0) (length frac))))
|
||||
(/ (string-to-number (concat (car parts) frac) base) quot))))
|
||||
(frac (cadr parts))
|
||||
(quot (expt (* base 1.0) (length frac)))
|
||||
(num (/ (string-to-number (concat (car parts) frac) base)
|
||||
quot)))
|
||||
(if (= num (truncate num))
|
||||
(truncate num)
|
||||
num))))
|
||||
|
||||
(defun hif-tokenize (start end)
|
||||
"Separate string between START and END into a list of tokens."
|
||||
|
|
Loading…
Add table
Reference in a new issue