summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien <bzg@gnu.org>2020-01-28 20:19:24 +0100
committerBastien <bzg@gnu.org>2020-01-28 20:19:24 +0100
commit241750b3c2a8af1145408574faf4376968d3247f (patch)
tree4b8e5ebc7d341c5eab265b7237ee9f157ef5219b
parente9526b5a79e64f9d333693bed4ec96acf4c0f1cb (diff)
downloadorg-mode-241750b3c2a8af1145408574faf4376968d3247f.tar.gz
Use `number-to-string' instead of `int-to-string'
* lisp/org.el (org-end-of-subtree): Use `number-to-string' instead of `int-to-string'. * lisp/org-table.el (org-table-edit-field) (org-table-fix-formulas, org-table-analyze, orgtbl-make-binding) (org-table-field-info): Ditto. * lisp/org-macs.el (org-shorten-string): Ditto. * lisp/org-agenda.el (org-get-time-of-day): Ditto.
-rw-r--r--lisp/org-agenda.el4
-rw-r--r--lisp/org-macs.el3
-rw-r--r--lisp/org-table.el14
-rw-r--r--lisp/org.el2
4 files changed, 12 insertions, 11 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 09832c5..73132de 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -2332,7 +2332,7 @@ The following commands are available:
(org-defkey org-agenda-mode-map "\C-c\C-d" #'org-agenda-deadline)
(let ((l '(1 2 3 4 5 6 7 8 9 0)))
(while l (org-defkey org-agenda-mode-map
- (int-to-string (pop l)) #'digit-argument)))
+ (number-to-string (pop l)) #'digit-argument)))
(org-defkey org-agenda-mode-map "F" #'org-agenda-follow-mode)
(org-defkey org-agenda-mode-map "R" #'org-agenda-clockreport-mode)
(org-defkey org-agenda-mode-map "E" #'org-agenda-entry-text-mode)
@@ -6871,7 +6871,7 @@ HH:MM."
(< t0 1000)) "0" "")
(if (< t0 100) "0" "")
(if (< t0 10) "0" "")
- (int-to-string t0))))
+ (number-to-string t0))))
(if string (concat (substring t1 -4 -2) ":" (substring t1 -2)) t0)))))
(defvar org-agenda-before-sorting-filter-function nil
diff --git a/lisp/org-macs.el b/lisp/org-macs.el
index 4a40765..7545e60 100644
--- a/lisp/org-macs.el
+++ b/lisp/org-macs.el
@@ -920,7 +920,8 @@ if necessary."
(if (<= (length s) maxlength)
s
(let* ((n (max (- maxlength 4) 1))
- (re (concat "\\`\\(.\\{1," (int-to-string n) "\\}[^ ]\\)\\([ ]\\|\\'\\)")))
+ (re (concat "\\`\\(.\\{1," (number-to-string n)
+ "\\}[^ ]\\)\\([ ]\\|\\'\\)")))
(if (string-match re s)
(concat (match-string 1 s) "...")
(concat (substring s 0 (max (- maxlength 3) 0)) "...")))))
diff --git a/lisp/org-table.el b/lisp/org-table.el
index 4976547..cc49650 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -1181,7 +1181,7 @@ value."
(save-excursion
(let* ((pos (point))
(col (org-table-current-column))
- (cname (car (rassoc (int-to-string col) org-table-column-names)))
+ (cname (car (rassoc (number-to-string col) org-table-column-names)))
(name (car (rassoc (list (count-lines org-table-current-begin-pos
(line-beginning-position))
col)
@@ -1958,9 +1958,9 @@ toggle `org-table-follow-field-mode'."
(coord
(if (eq org-table-use-standard-references t)
(concat (org-number-to-letters (org-table-current-column))
- (int-to-string (org-table-current-dline)))
- (concat "@" (int-to-string (org-table-current-dline))
- "$" (int-to-string (org-table-current-column)))))
+ (number-to-string (org-table-current-dline)))
+ (concat "@" (number-to-string (org-table-current-dline))
+ "$" (number-to-string (org-table-current-column)))))
(field (org-table-get-field))
(cw (current-window-configuration))
p)
@@ -2218,7 +2218,7 @@ For all numbers larger than LIMIT, shift them by DELTA."
(replace-match (concat key (cdr a)) t t)
(message msg))
((and limit (> n limit))
- (replace-match (concat key (int-to-string (+ n delta))) t t)
+ (replace-match (concat key (number-to-string (+ n delta))) t t)
(message msg))))))
(forward-line))))
@@ -4758,7 +4758,7 @@ This function sets up the following dynamically scoped variables:
(dolist (name (org-split-string (match-string 1) " *| *"))
(cl-incf c)
(when (string-match "\\`[a-zA-Z][_a-zA-Z0-9]*\\'" name)
- (push (cons name (int-to-string c)) org-table-column-names)))))
+ (push (cons name (number-to-string c)) org-table-column-names)))))
(setq org-table-column-names (nreverse org-table-column-names))
(setq org-table-column-name-regexp
(format "\\$\\(%s\\)\\>"
@@ -5147,7 +5147,7 @@ command name. KEYS are keys that should be checked in for a command
to execute outside of tables."
(eval
(list 'defun
- (intern (concat "orgtbl-hijacker-command-" (int-to-string n)))
+ (intern (concat "orgtbl-hijacker-command-" (number-to-string n)))
'(arg)
(concat "In tables, run `" (symbol-name fun) "'.\n"
"Outside of tables, run the binding of `"
diff --git a/lisp/org.el b/lisp/org.el
index 90a6dbd..d4e1753 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -20808,7 +20808,7 @@ If there is no such heading, return nil."
;; This means we can easily find the end by looking
;; only for the right number of stars. Using a regexp to do
;; this is so much faster than using a Lisp loop.
- (let ((re (concat "^\\*\\{1," (int-to-string level) "\\} ")))
+ (let ((re (concat "^\\*\\{1," (number-to-string level) "\\} ")))
(forward-char 1)
(and (re-search-forward re nil 'move) (beginning-of-line 1))))
(t