Commit da20e0f1 authored by William Xu's avatar William Xu Committed by Stefan Monnier
Browse files

* lisp/progmodes/hideif.el (hif-string-to-number): Don't return float for

hex integer constants.

Fixes: debbugs:17807
parent 27966b81
2014-06-19 William Xu <>
* progmodes/hideif.el (hif-string-to-number): Don't return float for
hex integer constants (bug#17807).
2014-06-19 Stefan Monnier <>
* 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)
(if (= num (truncate num))
(truncate num)
(defun hif-tokenize (start end)
"Separate string between START and END into a list of tokens."
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment