Replace string-to-int' by
string-to-number'.
This commit is contained in:
parent
216d380630
commit
027a4b6b3f
58 changed files with 570 additions and 491 deletions
|
@ -1,5 +1,84 @@
|
|||
2005-05-16 Juanma Barranquero <lekktu@gmail.com>
|
||||
|
||||
* align.el (align-regexp):
|
||||
* ansi-color.el (ansi-color-get-face):
|
||||
* array.el (array-reconfigure-rows, array-init-max-row)
|
||||
(array-init-max-column, array-init-columns-per-line)
|
||||
(array-init-field-width):
|
||||
* dired-aux.el (dired-trample-file-versions):
|
||||
* dired-x.el (dired-mark-sexp):
|
||||
* ediff-diff.el (ediff-extract-diffs, ediff-get-diff3-group):
|
||||
* edmacro.el (edmacro-finish-edit, edmacro-parse-keys):
|
||||
* emerge.el (emerge-extract-diffs, emerge-get-diff3-group):
|
||||
* faces.el (face-read-integer):
|
||||
* files.el (backup-extract-version, insert-directory):
|
||||
* hexl.el (hexl-insert-decimal-char):
|
||||
* server.el (server-process-filter):
|
||||
* shell.el (shell-extract-num):
|
||||
* startup.el (command-line-1):
|
||||
* term.el (term-command-hook):
|
||||
* time-stamp.el (time-stamp, time-stamp-string-preprocess)
|
||||
(time-stamp-do-number):
|
||||
* time.el (display-time-update):
|
||||
* timezone.el (timezone-parse-date, timezone-zone-to-minute)
|
||||
(timezone-fix-time):
|
||||
* vms-patch.el (vms-suspend-resume-hook):
|
||||
* calendar/appt.el (appt-convert-time):
|
||||
* calendar/cal-bahai.el (mark-bahai-diary-entries):
|
||||
* calendar/cal-hebrew.el (mark-hebrew-diary-entries):
|
||||
* calendar/cal-islam.el (mark-islamic-diary-entries):
|
||||
* calendar/calendar.el (calendar-cursor-to-date)
|
||||
(calendar-star-date):
|
||||
* calendar/diary-lib.el (diary-attrtype-convert)
|
||||
(mark-diary-entries, diary-entry-time):
|
||||
* calendar/solar.el (solar-get-number):
|
||||
* emacs-lisp/lisp-mnt.el (lm-last-modified-date):
|
||||
* emacs-lisp/re-builder.el (reb-display-subexp):
|
||||
* emulation/edt.el (edt-set-scroll-margins):
|
||||
* emulation/tpu-extras.el (tpu-set-scroll-margins):
|
||||
* emulation/vip.el (vip-get-ex-token, vip-get-ex-buffer)
|
||||
(vip-get-ex-count):
|
||||
* emulation/viper-ex.el (viper-get-ex-token)
|
||||
(viper-get-ex-buffer, viper-get-ex-count, ex-next):
|
||||
* international/fontset.el (fontset-plain-name):
|
||||
* mail/feedmail.el (feedmail-look-at-queue-directory):
|
||||
* mail/mailalias.el (mail-get-names):
|
||||
* mail/rmail.el (rmail-convert-to-babyl-format):
|
||||
* mail/rmailsum.el (rmail-make-basic-summary-line)
|
||||
(rmail-summary-next-same-subject, rmail-summary-rmail-update)
|
||||
(rmail-summary-goto-msg):
|
||||
* mail/smtpmail.el (smtpmail-read-response):
|
||||
* net/ange-ftp.el (ange-ftp-guess-hash-mark-size)
|
||||
(ange-ftp-vms-add-file-entry):
|
||||
* play/gametree.el (gametree-looking-at-ply)
|
||||
(gametree-current-branch-score):
|
||||
* progmodes/ada-xref.el (ada-prj-find-prj-file)
|
||||
(ada-xref-find-in-modified-ali, ada-find-in-src-path):
|
||||
* progmodes/cperl-mode.el (condition-case):
|
||||
* progmodes/ebrowse.el (ebrowse-set-tree-indentation)
|
||||
(ebrowse-set-member-buffer-column-width)
|
||||
(ebrowse-select-1st-to-9nth):
|
||||
* progmodes/etags.el (etags-snarf-tag):
|
||||
* progmodes/flymake.el (flymake-parse-line):
|
||||
* progmodes/idlw-shell.el (idlwave-shell-parse-line)
|
||||
(idlwave-shell-filter-bp, idlwave-shell-goto-next-error)
|
||||
(idlwave-shell-menu-def):
|
||||
* progmodes/ps-mode.el (ps-run-goto-error):
|
||||
* progmodes/vhdl-mode.el (vhdl-read-offset, vhdl-load-cache)
|
||||
(vhdl-speedbar-contract-level):
|
||||
* term/mac-win.el (x-handle-numeric-switch):
|
||||
* term/sun-mouse.el (sun-get-frame-data):
|
||||
* term/w32-win.el (x-handle-numeric-switch):
|
||||
* term/x-win.el (x-handle-numeric-switch):
|
||||
* textmodes/ispell.el (ispell-parse-output):
|
||||
* textmodes/nroff-mode.el (nroff-outline-level):
|
||||
* textmodes/reftex-cite.el (reftex-bib-sort-year)
|
||||
(reftex-bib-sort-year-reverse, reftex-format-citation):
|
||||
* textmodes/reftex-parse.el (reftex-init-section-numbers)
|
||||
(reftex-section-number):
|
||||
* textmodes/texinfmt.el (texinfo-paragraphindent): Replace
|
||||
`string-to-int' by `string-to-number'.
|
||||
|
||||
* international/latexenc.el: Add page marker to force the "Local
|
||||
Variables:" string out of the last page.
|
||||
|
||||
|
|
|
@ -938,10 +938,10 @@ region, call `align-regexp' and type in that regular expression."
|
|||
(if current-prefix-arg
|
||||
(list (read-string "Complex align using regexp: "
|
||||
"\\(\\s-*\\)")
|
||||
(string-to-int
|
||||
(string-to-number
|
||||
(read-string
|
||||
"Parenthesis group to modify (justify if negative): " "1"))
|
||||
(string-to-int
|
||||
(string-to-number
|
||||
(read-string "Amount of spacing (or column if negative): "
|
||||
(number-to-string align-default-spacing)))
|
||||
(y-or-n-p "Repeat throughout line? "))
|
||||
|
|
|
@ -619,7 +619,7 @@ ESCAPE-SEQ is a SGR control sequences such as \\033[34m. The parameter
|
|||
(while (string-match ansi-color-r escape-seq i)
|
||||
(setq i (match-end 0)
|
||||
val (ansi-color-get-face-1
|
||||
(string-to-int (match-string 0 escape-seq) 10)))
|
||||
(string-to-number (match-string 0 escape-seq) 10)))
|
||||
(cond ((not val))
|
||||
((eq val 'default)
|
||||
(setq f (list val)))
|
||||
|
|
|
@ -647,7 +647,7 @@ of array-rows-numbered."
|
|||
(<= new-columns-per-line array-max-column))
|
||||
(setq check nil)
|
||||
(setq new-columns-per-line
|
||||
(string-to-int
|
||||
(string-to-number
|
||||
(read-input
|
||||
(format "Columns per line (1 - %d): " array-max-column)))))))
|
||||
;; Check on new-rows-numbered. It has to be done this way
|
||||
|
@ -927,22 +927,22 @@ Entering array mode calls the function `array-mode-hook'."
|
|||
(defun array-init-max-row (&optional arg)
|
||||
"Initialize the value of `array-max-row'."
|
||||
(setq array-max-row
|
||||
(or arg (string-to-int (read-input "Number of array rows: ")))))
|
||||
(or arg (string-to-number (read-input "Number of array rows: ")))))
|
||||
|
||||
(defun array-init-max-column (&optional arg)
|
||||
"Initialize the value of `array-max-column'."
|
||||
(setq array-max-column
|
||||
(or arg (string-to-int (read-input "Number of array columns: ")))))
|
||||
(or arg (string-to-number (read-input "Number of array columns: ")))))
|
||||
|
||||
(defun array-init-columns-per-line (&optional arg)
|
||||
"Initialize the value of `array-columns-per-line'."
|
||||
(setq array-columns-per-line
|
||||
(or arg (string-to-int (read-input "Array columns per line: ")))))
|
||||
(or arg (string-to-number (read-input "Array columns per line: ")))))
|
||||
|
||||
(defun array-init-field-width (&optional arg)
|
||||
"Initialize the value of `array-field-width'."
|
||||
(setq array-field-width
|
||||
(or arg (string-to-int (read-input "Field width: ")))))
|
||||
(or arg (string-to-number (read-input "Field width: ")))))
|
||||
|
||||
(defun array-init-rows-numbered (&optional arg)
|
||||
"Initialize the value of `array-rows-numbered'."
|
||||
|
|
|
@ -633,11 +633,11 @@ hour and minute parts."
|
|||
(min 0))
|
||||
|
||||
(string-match "[:.]\\([0-9][0-9]\\)" time2conv)
|
||||
(setq min (string-to-int
|
||||
(setq min (string-to-number
|
||||
(match-string 1 time2conv)))
|
||||
|
||||
(string-match "[0-9]?[0-9][:.]" time2conv)
|
||||
(setq hr (string-to-int
|
||||
(setq hr (string-to-number
|
||||
(match-string 0 time2conv)))
|
||||
|
||||
;; convert the time appointment time into 24 hour time
|
||||
|
|
|
@ -340,13 +340,13 @@ nongregorian-diary-marking-hook."
|
|||
(buffer-substring
|
||||
(match-beginning m-name-pos)
|
||||
(match-end m-name-pos))))
|
||||
(mm (string-to-int
|
||||
(mm (string-to-number
|
||||
(if m-pos
|
||||
(buffer-substring
|
||||
(match-beginning m-pos)
|
||||
(match-end m-pos))
|
||||
"")))
|
||||
(dd (string-to-int
|
||||
(dd (string-to-number
|
||||
(if d-pos
|
||||
(buffer-substring
|
||||
(match-beginning d-pos)
|
||||
|
@ -365,14 +365,14 @@ nongregorian-diary-marking-hook."
|
|||
(calendar-bahai-from-absolute
|
||||
(calendar-absolute-from-gregorian
|
||||
(calendar-current-date)))))
|
||||
(y (+ (string-to-int y-str)
|
||||
(y (+ (string-to-number y-str)
|
||||
(* 100 (/ current-y 100)))))
|
||||
(if (> (- y current-y) 50)
|
||||
(- y 100)
|
||||
(if (> (- current-y y) 50)
|
||||
(+ y 100)
|
||||
y)))
|
||||
(string-to-int y-str)))))
|
||||
(string-to-number y-str)))))
|
||||
(if dd-name
|
||||
(mark-calendar-days-named
|
||||
(cdr (assoc-string (substring dd-name 0 3)
|
||||
|
|
|
@ -718,13 +718,13 @@ is provided for use as part of the nongregorian-diary-marking-hook."
|
|||
(buffer-substring
|
||||
(match-beginning m-name-pos)
|
||||
(match-end m-name-pos))))
|
||||
(mm (string-to-int
|
||||
(mm (string-to-number
|
||||
(if m-pos
|
||||
(buffer-substring
|
||||
(match-beginning m-pos)
|
||||
(match-end m-pos))
|
||||
"")))
|
||||
(dd (string-to-int
|
||||
(dd (string-to-number
|
||||
(if d-pos
|
||||
(buffer-substring
|
||||
(match-beginning d-pos)
|
||||
|
@ -743,14 +743,14 @@ is provided for use as part of the nongregorian-diary-marking-hook."
|
|||
(calendar-hebrew-from-absolute
|
||||
(calendar-absolute-from-gregorian
|
||||
(calendar-current-date)))))
|
||||
(y (+ (string-to-int y-str)
|
||||
(y (+ (string-to-number y-str)
|
||||
(* 100 (/ current-y 100)))))
|
||||
(if (> (- y current-y) 50)
|
||||
(- y 100)
|
||||
(if (> (- current-y y) 50)
|
||||
(+ y 100)
|
||||
y)))
|
||||
(string-to-int y-str)))))
|
||||
(string-to-number y-str)))))
|
||||
(if dd-name
|
||||
(mark-calendar-days-named
|
||||
(cdr (assoc-string dd-name
|
||||
|
|
|
@ -337,13 +337,13 @@ provided for use as part of the nongregorian-diary-marking-hook."
|
|||
(buffer-substring
|
||||
(match-beginning m-name-pos)
|
||||
(match-end m-name-pos))))
|
||||
(mm (string-to-int
|
||||
(mm (string-to-number
|
||||
(if m-pos
|
||||
(buffer-substring
|
||||
(match-beginning m-pos)
|
||||
(match-end m-pos))
|
||||
"")))
|
||||
(dd (string-to-int
|
||||
(dd (string-to-number
|
||||
(if d-pos
|
||||
(buffer-substring
|
||||
(match-beginning d-pos)
|
||||
|
@ -362,14 +362,14 @@ provided for use as part of the nongregorian-diary-marking-hook."
|
|||
(calendar-islamic-from-absolute
|
||||
(calendar-absolute-from-gregorian
|
||||
(calendar-current-date)))))
|
||||
(y (+ (string-to-int y-str)
|
||||
(y (+ (string-to-number y-str)
|
||||
(* 100 (/ current-y 100)))))
|
||||
(if (> (- y current-y) 50)
|
||||
(- y 100)
|
||||
(if (> (- current-y y) 50)
|
||||
(+ y 100)
|
||||
y)))
|
||||
(string-to-int y-str)))))
|
||||
(string-to-number y-str)))))
|
||||
(if dd-name
|
||||
(mark-calendar-days-named
|
||||
(cdr (assoc-string dd-name
|
||||
|
|
|
@ -2574,7 +2574,7 @@ ERROR is t, otherwise just returns nil."
|
|||
(if (not (looking-at " "))
|
||||
(re-search-backward "[^0-9]"))
|
||||
(list month
|
||||
(string-to-int (buffer-substring (1+ (point)) (+ 4 (point))))
|
||||
(string-to-number (buffer-substring (1+ (point)) (+ 4 (point))))
|
||||
year))
|
||||
(if (looking-at "\\*")
|
||||
(save-excursion
|
||||
|
@ -2964,7 +2964,7 @@ calendar window has been prepared."
|
|||
(make-local-variable 'calendar-starred-day)
|
||||
(forward-char 1)
|
||||
(setq calendar-starred-day
|
||||
(string-to-int
|
||||
(string-to-number
|
||||
(buffer-substring (point) (- (point) 2))))
|
||||
(delete-char -2)
|
||||
(insert "**")
|
||||
|
|
|
@ -205,7 +205,7 @@ Valid TYPEs are: string, symbol, int, stringtnil, tnil."
|
|||
(let (ret)
|
||||
(setq ret (cond ((eq type 'string) attrvalue)
|
||||
((eq type 'symbol) (read attrvalue))
|
||||
((eq type 'int) (string-to-int attrvalue))
|
||||
((eq type 'int) (string-to-number attrvalue))
|
||||
((eq type 'stringtnil)
|
||||
(cond ((string= "t" attrvalue) t)
|
||||
((string= "nil" attrvalue) nil)
|
||||
|
@ -908,13 +908,13 @@ diary entries."
|
|||
(buffer-substring-no-properties
|
||||
(match-beginning m-name-pos)
|
||||
(match-end m-name-pos))))
|
||||
(mm (string-to-int
|
||||
(mm (string-to-number
|
||||
(if m-pos
|
||||
(buffer-substring-no-properties
|
||||
(match-beginning m-pos)
|
||||
(match-end m-pos))
|
||||
"")))
|
||||
(dd (string-to-int
|
||||
(dd (string-to-number
|
||||
(if d-pos
|
||||
(buffer-substring-no-properties
|
||||
(match-beginning d-pos)
|
||||
|
@ -931,7 +931,7 @@ diary entries."
|
|||
(let* ((current-y
|
||||
(extract-calendar-year
|
||||
(calendar-current-date)))
|
||||
(y (+ (string-to-int y-str)
|
||||
(y (+ (string-to-number y-str)
|
||||
(* 100
|
||||
(/ current-y 100)))))
|
||||
(if (> (- y current-y) 50)
|
||||
|
@ -939,7 +939,7 @@ diary entries."
|
|||
(if (> (- current-y y) 50)
|
||||
(+ y 100)
|
||||
y)))
|
||||
(string-to-int y-str))))
|
||||
(string-to-number y-str))))
|
||||
(save-excursion
|
||||
(setq entry (buffer-substring-no-properties
|
||||
(point) (line-end-position))
|
||||
|
@ -1149,22 +1149,22 @@ be used instead of a colon (:) to separate the hour and minute parts."
|
|||
(cond ((string-match ; Military time
|
||||
"\\`[ \t\n\\^M]*\\([0-9]?[0-9]\\)[:.]?\\([0-9][0-9]\\)\\(\\>\\|[^ap]\\)"
|
||||
s)
|
||||
(+ (* 100 (string-to-int
|
||||
(+ (* 100 (string-to-number
|
||||
(substring s (match-beginning 1) (match-end 1))))
|
||||
(string-to-int (substring s (match-beginning 2) (match-end 2)))))
|
||||
(string-to-number (substring s (match-beginning 2) (match-end 2)))))
|
||||
((string-match ; Hour only XXam or XXpm
|
||||
"\\`[ \t\n\\^M]*\\([0-9]?[0-9]\\)\\([ap]\\)m\\>" s)
|
||||
(+ (* 100 (% (string-to-int
|
||||
(+ (* 100 (% (string-to-number
|
||||
(substring s (match-beginning 1) (match-end 1)))
|
||||
12))
|
||||
(if (equal ?a (downcase (aref s (match-beginning 2))))
|
||||
0 1200)))
|
||||
((string-match ; Hour and minute XX:XXam or XX:XXpm
|
||||
"\\`[ \t\n\\^M]*\\([0-9]?[0-9]\\)[:.]\\([0-9][0-9]\\)\\([ap]\\)m\\>" s)
|
||||
(+ (* 100 (% (string-to-int
|
||||
(+ (* 100 (% (string-to-number
|
||||
(substring s (match-beginning 1) (match-end 1)))
|
||||
12))
|
||||
(string-to-int (substring s (match-beginning 2) (match-end 2)))
|
||||
(string-to-number (substring s (match-beginning 2) (match-end 2)))
|
||||
(if (equal ?a (downcase (aref s (match-beginning 3))))
|
||||
0 1200)))
|
||||
(t diary-unknown-time)))) ; Unrecognizable
|
||||
|
|
|
@ -227,7 +227,7 @@ Needed for polar areas, in order to know whether the day lasts 0 or 24 hours.")
|
|||
Returns nil if nothing was entered."
|
||||
(let ((x (read-string prompt "")))
|
||||
(if (not (string-equal x ""))
|
||||
(string-to-int x))))
|
||||
(string-to-number x))))
|
||||
|
||||
;; The condition-case stuff is needed to catch bogus arithmetic
|
||||
;; exceptions that occur on some machines (like Sparcs)
|
||||
|
|
|
@ -428,7 +428,7 @@ with a prefix argument."
|
|||
(setq base-version-list ; there was a base version to which
|
||||
(assoc (substring fn 0 start-vn) ; this looks like a
|
||||
dired-file-version-alist)) ; subversion
|
||||
(not (memq (string-to-int (substring fn (+ 2 start-vn)))
|
||||
(not (memq (string-to-number (substring fn (+ 2 start-vn)))
|
||||
base-version-list)) ; this one doesn't make the cut
|
||||
(progn (beginning-of-line)
|
||||
(delete-char 1)
|
||||
|
|
|
@ -1501,10 +1501,10 @@ to mark all zero length files."
|
|||
(if (looking-at dired-re-inode-size)
|
||||
(progn
|
||||
(goto-char (match-end 0))
|
||||
(setq inode (string-to-int (buffer-substring (match-beginning 1)
|
||||
(match-end 1)))
|
||||
s (string-to-int (buffer-substring (match-beginning 2)
|
||||
(match-end 2)))))
|
||||
(setq inode (string-to-number (buffer-substring (match-beginning 1)
|
||||
(match-end 1)))
|
||||
s (string-to-number (buffer-substring (match-beginning 2)
|
||||
(match-end 2)))))
|
||||
(setq inode nil
|
||||
s nil))
|
||||
(setq mode (buffer-substring (point) (+ mode-len (point))))
|
||||
|
@ -1516,10 +1516,10 @@ to mark all zero length files."
|
|||
(re-search-forward dired-move-to-filename-regexp)
|
||||
(goto-char (match-beginning 1))
|
||||
(forward-char -1)
|
||||
(setq size (string-to-int (buffer-substring (save-excursion
|
||||
(backward-word 1)
|
||||
(setq pos (point)))
|
||||
(point))))
|
||||
(setq size (string-to-number (buffer-substring (save-excursion
|
||||
(backward-word 1)
|
||||
(setq pos (point)))
|
||||
(point))))
|
||||
(goto-char pos)
|
||||
(backward-word 1)
|
||||
;; if no gid is displayed, gid will be set to uid
|
||||
|
|
|
@ -393,20 +393,20 @@ one optional arguments, diff-number to refine.")
|
|||
(ediff-with-current-buffer diff-buffer
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward ediff-match-diff-line nil t)
|
||||
(let* ((a-begin (string-to-int (buffer-substring (match-beginning 1)
|
||||
(match-end 1))))
|
||||
(let* ((a-begin (string-to-number (buffer-substring (match-beginning 1)
|
||||
(match-end 1))))
|
||||
(a-end (let ((b (match-beginning 3))
|
||||
(e (match-end 3)))
|
||||
(if b
|
||||
(string-to-int (buffer-substring b e))
|
||||
(string-to-number (buffer-substring b e))
|
||||
a-begin)))
|
||||
(diff-type (buffer-substring (match-beginning 4) (match-end 4)))
|
||||
(b-begin (string-to-int (buffer-substring (match-beginning 5)
|
||||
(match-end 5))))
|
||||
(b-begin (string-to-number (buffer-substring (match-beginning 5)
|
||||
(match-end 5))))
|
||||
(b-end (let ((b (match-beginning 7))
|
||||
(e (match-end 7)))
|
||||
(if b
|
||||
(string-to-int (buffer-substring b e))
|
||||
(string-to-number (buffer-substring b e))
|
||||
b-begin)))
|
||||
a-begin-pt a-end-pt b-begin-pt b-end-pt
|
||||
c-begin c-end c-begin-pt c-end-pt)
|
||||
|
@ -934,16 +934,16 @@ delimiter regions"))
|
|||
;; it is a "c" group
|
||||
(if (match-beginning 2)
|
||||
;; it has two numbers
|
||||
(list (string-to-int
|
||||
(list (string-to-number
|
||||
(buffer-substring (match-beginning 1) (match-end 1)))
|
||||
(1+ (string-to-int
|
||||
(1+ (string-to-number
|
||||
(buffer-substring (match-beginning 3) (match-end 3)))))
|
||||
;; it has one number
|
||||
(let ((x (string-to-int
|
||||
(let ((x (string-to-number
|
||||
(buffer-substring (match-beginning 1) (match-end 1)))))
|
||||
(list x (1+ x))))
|
||||
;; it is an "a" group
|
||||
(let ((x (1+ (string-to-int
|
||||
(let ((x (1+ (string-to-number
|
||||
(buffer-substring (match-beginning 1) (match-end 1))))))
|
||||
(list x x)))))
|
||||
|
||||
|
|
|
@ -280,7 +280,7 @@ or nil, use a compact 80-column format."
|
|||
(let ((str (buffer-substring (match-beginning 1)
|
||||
(match-end 1))))
|
||||
(unless (equal str "")
|
||||
(setq mac-counter (string-to-int str))))
|
||||
(setq mac-counter (string-to-number str))))
|
||||
t)
|
||||
((looking-at "Format:[ \t]*\"\\([^\n]*\\)\"[ \t]*$")
|
||||
(when edmacro-store-hook
|
||||
|
@ -698,7 +698,7 @@ This function assumes that the events can be stored in a string."
|
|||
(times 1))
|
||||
(setq pos (match-end 0))
|
||||
(when (string-match "\\([0-9]+\\)\\*." word)
|
||||
(setq times (string-to-int (substring word 0 (match-end 1))))
|
||||
(setq times (string-to-number (substring word 0 (match-end 1))))
|
||||
(setq word (substring word (1+ (match-end 1)))))
|
||||
(cond ((string-match "^<<.+>>$" word)
|
||||
(setq key (vconcat (if (eq (key-binding [?\M-x])
|
||||
|
|
|
@ -418,7 +418,7 @@ ISO-DATE non-nil means return the date in ISO 8601 format."
|
|||
(format "%s-%s-%s" yyyy mm dd)
|
||||
(format "%s %s %s"
|
||||
dd
|
||||
(nth (string-to-int mm)
|
||||
(nth (string-to-number mm)
|
||||
'("" "Jan" "Feb" "Mar" "Apr" "May" "Jun"
|
||||
"Jul" "Aug" "Sep" "Oct" "Nov" "Dec"))
|
||||
yyyy))))))
|
||||
|
|
|
@ -557,7 +557,7 @@ optional fourth argument FORCE is non-nil."
|
|||
(interactive)
|
||||
|
||||
(setq reb-subexp-displayed
|
||||
(or subexp (string-to-int (format "%c" last-command-char))))
|
||||
(or subexp (string-to-number (format "%c" last-command-char))))
|
||||
(reb-update-modestring)
|
||||
(reb-do-update reb-subexp-displayed))
|
||||
|
||||
|
|
|
@ -657,20 +657,20 @@ This is *not* a user option, since Emerge uses it for its own processing.")
|
|||
diff-buffer
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward emerge-match-diff-line nil t)
|
||||
(let* ((a-begin (string-to-int (buffer-substring (match-beginning 1)
|
||||
(match-end 1))))
|
||||
(let* ((a-begin (string-to-number (buffer-substring (match-beginning 1)
|
||||
(match-end 1))))
|
||||
(a-end (let ((b (match-beginning 3))
|
||||
(e (match-end 3)))
|
||||
(if b
|
||||
(string-to-int (buffer-substring b e))
|
||||
(string-to-number (buffer-substring b e))
|
||||
a-begin)))
|
||||
(diff-type (buffer-substring (match-beginning 4) (match-end 4)))
|
||||
(b-begin (string-to-int (buffer-substring (match-beginning 5)
|
||||
(match-end 5))))
|
||||
(b-begin (string-to-number (buffer-substring (match-beginning 5)
|
||||
(match-end 5))))
|
||||
(b-end (let ((b (match-beginning 7))
|
||||
(e (match-end 7)))
|
||||
(if b
|
||||
(string-to-int (buffer-substring b e))
|
||||
(string-to-number (buffer-substring b e))
|
||||
b-begin))))
|
||||
;; fix the beginning and end numbers, because diff is somewhat
|
||||
;; strange about how it numbers lines
|
||||
|
@ -862,16 +862,16 @@ This is *not* a user option, since Emerge uses it for its own processing.")
|
|||
;; it is a "c" group
|
||||
(if (match-beginning 2)
|
||||
;; it has two numbers
|
||||
(list (string-to-int
|
||||
(list (string-to-number
|
||||
(buffer-substring (match-beginning 1) (match-end 1)))
|
||||
(1+ (string-to-int
|
||||
(1+ (string-to-number
|
||||
(buffer-substring (match-beginning 3) (match-end 3)))))
|
||||
;; it has one number
|
||||
(let ((x (string-to-int
|
||||
(let ((x (string-to-number
|
||||
(buffer-substring (match-beginning 1) (match-end 1)))))
|
||||
(list x (1+ x))))
|
||||
;; it is an "a" group
|
||||
(let ((x (1+ (string-to-int
|
||||
(let ((x (1+ (string-to-number
|
||||
(buffer-substring (match-beginning 1) (match-end 1))))))
|
||||
(list x x)))))
|
||||
|
||||
|
|
|
@ -1256,16 +1256,16 @@ Argument BOTTOM is the bottom margin in number of lines or percent of window."
|
|||
;; set top scroll margin
|
||||
(or (string= top "")
|
||||
(if (string= "%" (substring top -1))
|
||||
(setq edt-top-scroll-margin (string-to-int top))
|
||||
(setq edt-top-scroll-margin (string-to-number top))
|
||||
(setq edt-top-scroll-margin
|
||||
(/ (1- (+ (* (string-to-int top) 100) (window-height)))
|
||||
(/ (1- (+ (* (string-to-number top) 100) (window-height)))
|
||||
(window-height)))))
|
||||
;; set bottom scroll margin
|
||||
(or (string= bottom "")
|
||||
(if (string= "%" (substring bottom -1))
|
||||
(setq edt-bottom-scroll-margin (string-to-int bottom))
|
||||
(setq edt-bottom-scroll-margin (string-to-number bottom))
|
||||
(setq edt-bottom-scroll-margin
|
||||
(/ (1- (+ (* (string-to-int bottom) 100) (window-height)))
|
||||
(/ (1- (+ (* (string-to-number bottom) 100) (window-height)))
|
||||
(window-height)))))
|
||||
;; report scroll margin settings if running interactively
|
||||
(and (interactive-p)
|
||||
|
|
|
@ -440,16 +440,16 @@ version that respects the bottom scroll margin."
|
|||
;; set top scroll margin
|
||||
(or (string= top "")
|
||||
(if (string= "%" (substring top -1))
|
||||
(setq tpu-top-scroll-margin (string-to-int top))
|
||||
(setq tpu-top-scroll-margin (string-to-number top))
|
||||
(setq tpu-top-scroll-margin
|
||||
(/ (1- (+ (* (string-to-int top) 100) (window-height)))
|
||||
(/ (1- (+ (* (string-to-number top) 100) (window-height)))
|
||||
(window-height)))))
|
||||
;; set bottom scroll margin
|
||||
(or (string= bottom "")
|
||||
(if (string= "%" (substring bottom -1))
|
||||
(setq tpu-bottom-scroll-margin (string-to-int bottom))
|
||||
(setq tpu-bottom-scroll-margin (string-to-number bottom))
|
||||
(setq tpu-bottom-scroll-margin
|
||||
(/ (1- (+ (* (string-to-int bottom) 100) (window-height)))
|
||||
(/ (1- (+ (* (string-to-number bottom) 100) (window-height)))
|
||||
(window-height)))))
|
||||
;; report scroll margin settings if running interactively
|
||||
(and (interactive-p)
|
||||
|
|
|
@ -2177,7 +2177,7 @@ a token has type \(command, address, end-mark\) and value."
|
|||
(cond ((string= ex-token-type "plus") "add-number")
|
||||
((string= ex-token-type "minus") "sub-number")
|
||||
(t "abs-number")))
|
||||
(setq ex-token (string-to-int (buffer-substring (point) (mark)))))
|
||||
(setq ex-token (string-to-number (buffer-substring (point) (mark)))))
|
||||
((looking-at "\\$")
|
||||
(forward-char 1)
|
||||
(setq ex-token-type "end"))
|
||||
|
@ -2471,7 +2471,7 @@ a token has type \(command, address, end-mark\) and value."
|
|||
(progn
|
||||
(set-mark (point))
|
||||
(re-search-forward "[0-9][0-9]*")
|
||||
(setq ex-count (string-to-int (buffer-substring (point) (mark))))
|
||||
(setq ex-count (string-to-number (buffer-substring (point) (mark))))
|
||||
(skip-chars-forward " \t")))
|
||||
(if (looking-at "[pl#]")
|
||||
(progn
|
||||
|
@ -2496,7 +2496,7 @@ a token has type \(command, address, end-mark\) and value."
|
|||
(progn
|
||||
(set-mark (point))
|
||||
(re-search-forward "[0-9][0-9]*")
|
||||
(setq ex-count (string-to-int (buffer-substring (point) (mark))))
|
||||
(setq ex-count (string-to-number (buffer-substring (point) (mark))))
|
||||
(skip-chars-forward " \t")))
|
||||
(if (looking-at "[pl#]")
|
||||
(progn
|
||||
|
|
|
@ -434,7 +434,7 @@ reversed."
|
|||
((eq ex-token-type 'minus) 'sub-number)
|
||||
(t 'abs-number)))
|
||||
(setq ex-token
|
||||
(string-to-int (buffer-substring (point) (mark t)))))
|
||||
(string-to-number (buffer-substring (point) (mark t)))))
|
||||
((looking-at "\\$")
|
||||
(forward-char 1)
|
||||
(setq ex-token-type 'end))
|
||||
|
@ -912,7 +912,7 @@ reversed."
|
|||
(progn
|
||||
(set-mark (point))
|
||||
(re-search-forward "[0-9][0-9]*")
|
||||
(setq ex-count (string-to-int (buffer-substring (point) (mark t))))
|
||||
(setq ex-count (string-to-number (buffer-substring (point) (mark t))))
|
||||
(skip-chars-forward " \t")))
|
||||
(if (looking-at "[pl#]")
|
||||
(progn
|
||||
|
@ -938,7 +938,7 @@ reversed."
|
|||
(progn
|
||||
(set-mark (point))
|
||||
(re-search-forward "[0-9][0-9]*")
|
||||
(setq ex-count (string-to-int (buffer-substring (point) (mark t))))
|
||||
(setq ex-count (string-to-number (buffer-substring (point) (mark t))))
|
||||
(skip-chars-forward " \t")))
|
||||
(if (looking-at "[pl#]")
|
||||
(progn
|
||||
|
@ -1490,7 +1490,7 @@ reversed."
|
|||
(progn
|
||||
(ex-edit t)
|
||||
(throw 'ex-edit nil))
|
||||
(setq count (string-to-int ex-file))
|
||||
(setq count (string-to-number ex-file))
|
||||
(if (= count 0) (setq count 1))
|
||||
(if (< count 0) (error "Usage: `next <count>' (count >= 0)"))))
|
||||
(setq count 1))
|
||||
|
|
|
@ -1014,7 +1014,7 @@ name of the attribute for prompting. Value is the new attribute value."
|
|||
((member new-value '("unspecified-fg" "unspecified-bg"))
|
||||
new-value)
|
||||
(t
|
||||
(string-to-int new-value)))))
|
||||
(string-to-number new-value)))))
|
||||
|
||||
|
||||
(defun read-face-attribute (face attribute &optional frame)
|
||||
|
|
|
@ -2988,7 +2988,7 @@ Uses the free variable `backup-extract-version-start', whose value should be
|
|||
the index in the name where the version number begins."
|
||||
(if (and (string-match "[0-9]+~$" fn backup-extract-version-start)
|
||||
(= (match-beginning 0) backup-extract-version-start))
|
||||
(string-to-int (substring fn backup-extract-version-start -1))
|
||||
(string-to-number (substring fn backup-extract-version-start -1))
|
||||
0))
|
||||
|
||||
;; I believe there is no need to alter this behavior for VMS;
|
||||
|
@ -4552,7 +4552,7 @@ normally equivalent short `-D' option is just passed on to
|
|||
(if (string-match "ls (.*utils) \\([0-9.]*\\)$" version-out)
|
||||
(let* ((version (match-string 1 version-out))
|
||||
(split (split-string version "[.]"))
|
||||
(numbers (mapcar 'string-to-int split))
|
||||
(numbers (mapcar 'string-to-number split))
|
||||
(min '(5 2 1))
|
||||
comparison)
|
||||
(while (and (not comparison) (or numbers min))
|
||||
|
|
|
@ -874,7 +874,7 @@ Embedded whitespace, dashes, and periods in the string are ignored."
|
|||
(defun hexl-insert-decimal-char (arg)
|
||||
"Insert a character given by its decimal code ARG times at point."
|
||||
(interactive "p")
|
||||
(let ((num (string-to-int (read-string "Decimal Number: "))))
|
||||
(let ((num (string-to-number (read-string "Decimal Number: "))))
|
||||
(if (< num 0)
|
||||
(error "Decimal number out of range")
|
||||
(hexl-insert-multibyte-char num arg))))
|
||||
|
|
|
@ -492,7 +492,7 @@ with \"fontset\" in `<CHARSET_REGISTRY> field."
|
|||
name)
|
||||
(if (not (string= "fontset" charset))
|
||||
fontset
|
||||
(if (> (string-to-int size) 0)
|
||||
(if (> (string-to-number size) 0)
|
||||
(setq name (format "%s: %s-dot" nickname size))
|
||||
(setq name nickname))
|
||||
(cond ((string-match "^medium$" weight)
|
||||
|
|
|
@ -1835,7 +1835,7 @@ the counts."
|
|||
(setq blobbet (file-name-nondirectory blobby))
|
||||
(if (string-match "^[0-9][0-9][0-9]-" blobbet)
|
||||
(let ((water-mark))
|
||||
(setq water-mark (string-to-int (substring blobbet 0 3)))
|
||||
(setq water-mark (string-to-number (substring blobbet 0 3)))
|
||||
(if (> water-mark high-water) (setq high-water water-mark))))
|
||||
(setq q-cnt (1+ q-cnt)))
|
||||
(t (setq q-oth (1+ q-oth)))
|
||||
|
|
|
@ -449,7 +449,7 @@ PATTERN is the string we want to complete."
|
|||
(add-to-list 'mail-local-names
|
||||
(cons (match-string 1)
|
||||
(user-full-name
|
||||
(string-to-int (match-string 2))))))
|
||||
(string-to-number (match-string 2))))))
|
||||
(beginning-of-line 2))
|
||||
(kill-buffer (current-buffer))))
|
||||
(if (or (eq mail-names t)
|
||||
|
|
|
@ -1990,7 +1990,7 @@ is non-nil if the user has supplied the password interactively.
|
|||
header-end t)
|
||||
(let ((beg (point))
|
||||
(eol (progn (end-of-line) (point))))
|
||||
(string-to-int (buffer-substring beg eol)))))))
|
||||
(string-to-number (buffer-substring beg eol)))))))
|
||||
(and size
|
||||
(if (and (natnump size)
|
||||
(<= (+ header-end size) (point-max))
|
||||
|
|
|
@ -375,17 +375,17 @@ Setting this variable has an effect only before reading a mail."
|
|||
(cond ((re-search-forward "\\([^0-9:]\\)\\([0-3]?[0-9]\\)\\([- \t_]+\\)\\([adfjmnos][aceopu][bcglnprtvy]\\)"
|
||||
(save-excursion (end-of-line) (point)) t)
|
||||
(format "%2d-%3s"
|
||||
(string-to-int (buffer-substring
|
||||
(match-beginning 2)
|
||||
(match-end 2)))
|
||||
(string-to-number (buffer-substring
|
||||
(match-beginning 2)
|
||||
(match-end 2)))
|
||||
(buffer-substring
|
||||
(match-beginning 4) (match-end 4))))
|
||||
((re-search-forward "\\([^a-z]\\)\\([adfjmnos][acepou][bcglnprtvy]\\)\\([-a-z \t_]*\\)\\([0-9][0-9]?\\)"
|
||||
(save-excursion (end-of-line) (point)) t)
|
||||
(format "%2d-%3s"
|
||||
(string-to-int (buffer-substring
|
||||
(match-beginning 4)
|
||||
(match-end 4)))
|
||||
(string-to-number (buffer-substring
|
||||
(match-beginning 4)
|
||||
(match-end 4)))
|
||||
(buffer-substring
|
||||
(match-beginning 2) (match-end 2))))
|
||||
((re-search-forward "\\(19\\|20\\)\\([0-9][0-9]\\)-\\([01][0-9]\\)-\\([0-3][0-9]\\)"
|
||||
|
@ -580,7 +580,7 @@ If N is negative, go backwards."
|
|||
;; Advance thru summary.
|
||||
(forward-line (if forward 1 -1))
|
||||
;; Get msg number of this line.
|
||||
(setq i (string-to-int
|
||||
(setq i (string-to-number
|
||||
(buffer-substring (point)
|
||||
(min (point-max) (+ 6 (point))))))
|
||||
;; See if that msg has desired subject.
|
||||
|
@ -791,10 +791,10 @@ Search, the `unseen' attribute is restored.")
|
|||
(forward-line -1))
|
||||
(beginning-of-line)
|
||||
(skip-chars-forward " ")
|
||||
(let ((msg-num (string-to-int (buffer-substring
|
||||
(point)
|
||||
(progn (skip-chars-forward "0-9")
|
||||
(point))))))
|
||||
(let ((msg-num (string-to-number (buffer-substring
|
||||
(point)
|
||||
(progn (skip-chars-forward "0-9")
|
||||
(point))))))
|
||||
;; Always leave `unseen' removed
|
||||
;; if we get out of isearch mode.
|
||||
;; Don't let a subsequent isearch restore that `unseen'.
|
||||
|
@ -1061,7 +1061,7 @@ If SKIP-RMAIL, don't do anything to the Rmail buffer."
|
|||
(buf rmail-buffer)
|
||||
(cur (point))
|
||||
message-not-found
|
||||
(curmsg (string-to-int
|
||||
(curmsg (string-to-number
|
||||
(buffer-substring (point)
|
||||
(min (point-max) (+ 6 (point))))))
|
||||
(total (save-excursion (set-buffer buf) rmail-total-messages)))
|
||||
|
|
|
@ -822,7 +822,7 @@ This is relative to `smtpmail-queue-dir'.")
|
|||
nil
|
||||
(setq response-continue nil)
|
||||
(setq return-value
|
||||
(cons (string-to-int
|
||||
(cons (string-to-number
|
||||
(buffer-substring begin end))
|
||||
(nreverse response-strings)))))
|
||||
|
||||
|
|
|
@ -2109,7 +2109,7 @@ suffix of the form #PORT to specify a non-default port"
|
|||
(line (cdr status)))
|
||||
(save-match-data
|
||||
(if (string-match ange-ftp-hash-mark-msgs line)
|
||||
(let ((size (string-to-int (match-string 1 line))))
|
||||
(let ((size (string-to-number (match-string 1 line))))
|
||||
(setq ange-ftp-ascii-hash-mark-size size
|
||||
ange-ftp-hash-mark-unit (ash size -4))
|
||||
|
||||
|
@ -5082,7 +5082,7 @@ Other orders of $ and _ seem to all work just fine.")
|
|||
(and (string-match regexp name)
|
||||
(setq version
|
||||
(max version
|
||||
(string-to-int (match-string 1 name))))))
|
||||
(string-to-number (match-string 1 name))))))
|
||||
files)
|
||||
(setq version (1+ version))
|
||||
(puthash
|
||||
|
|
|
@ -204,12 +204,12 @@ should be no leading white space."
|
|||
gametree-half-ply-regexp "\\)"))
|
||||
(limit (save-excursion (beginning-of-line 1) (point))))
|
||||
(if (looking-at boundary)
|
||||
(+ (* 2 (string-to-int (match-string 1)))
|
||||
(+ (* 2 (string-to-number (match-string 1)))
|
||||
(if (string-match gametree-half-ply-regexp (match-string 2)) 1 0))
|
||||
(save-excursion
|
||||
(re-search-backward boundary limit)
|
||||
(skip-chars-backward "0123456789")
|
||||
(1+ (* 2 (string-to-int
|
||||
(1+ (* 2 (string-to-number
|
||||
(buffer-substring (point) (match-end 1))))))))))
|
||||
|
||||
(defun gametree-current-branch-ply ()
|
||||
|
@ -345,7 +345,7 @@ This value is simply the outline heading level of the current line."
|
|||
"Return score of current variation according to its score tag.
|
||||
When no score tag is present, use the value of `gametree-default-score'."
|
||||
(if (looking-at gametree-score-regexp)
|
||||
(string-to-int (match-string 3))
|
||||
(string-to-number (match-string 3))
|
||||
gametree-default-score))
|
||||
|
||||
(defun gametree-compute-reduced-score ()
|
||||
|
|
|
@ -672,7 +672,7 @@ file. If none is set, return nil."
|
|||
(not (integerp choice))
|
||||
(< choice 1)
|
||||
(> choice (length prj-files)))
|
||||
(setq choice (string-to-int
|
||||
(setq choice (string-to-number
|
||||
(read-from-minibuffer "Enter No. of your choice: "))))
|
||||
(set 'selected (nth (1- choice) prj-files))))
|
||||
|
||||
|
@ -1800,7 +1800,7 @@ This function is disabled for operators, and only works for identifiers."
|
|||
(< choice 1)
|
||||
(> choice len))
|
||||
(setq choice
|
||||
(string-to-int
|
||||
(string-to-number
|
||||
(read-from-minibuffer "Enter No. of your choice: "))))
|
||||
)
|
||||
(set-buffer ali-buffer)
|
||||
|
@ -1988,7 +1988,7 @@ is using."
|
|||
(< choice 1)
|
||||
(> choice (length list)))
|
||||
(setq choice
|
||||
(string-to-int
|
||||
(string-to-number
|
||||
(read-from-minibuffer "Enter No. of your choice: "))))
|
||||
)
|
||||
(set 'choice (1- choice))
|
||||
|
|
|
@ -120,7 +120,7 @@
|
|||
;; Probably will not work due to some save-excursion???
|
||||
;; Or save-file-position?
|
||||
;; (message "Did I get to line %s?" (elt (, elt) 1))
|
||||
`(goto-line (string-to-int (elt ,elt 1))))
|
||||
`(goto-line (string-to-number (elt ,elt 1))))
|
||||
;;)
|
||||
(defmacro cperl-etags-goto-tag-location (elt)
|
||||
`(etags-goto-tag-location ,elt))))
|
||||
|
|
|
@ -1448,10 +1448,10 @@ Pop to member buffer if no prefix ARG, to tree buffer otherwise."
|
|||
(defun ebrowse-set-tree-indentation ()
|
||||
"Set the indentation width of the tree display."
|
||||
(interactive)
|
||||
(let ((width (string-to-int (read-from-minibuffer
|
||||
(concat "Indentation ("
|
||||
(int-to-string ebrowse--indentation)
|
||||
"): ")))))
|
||||
(let ((width (string-to-number (read-from-minibuffer
|
||||
(concat "Indentation ("
|
||||
(int-to-string ebrowse--indentation)
|
||||
"): ")))))
|
||||
(when (plusp width)
|
||||
(setf ebrowse--indentation width)
|
||||
(ebrowse-redraw-tree))))
|
||||
|
@ -2329,7 +2329,7 @@ With prefix ARG, switch to the tree buffer else pop to it."
|
|||
"Set the column width of the member display.
|
||||
The new width is read from the minibuffer."
|
||||
(interactive)
|
||||
(let ((width (string-to-int
|
||||
(let ((width (string-to-number
|
||||
(read-from-minibuffer
|
||||
(concat "Column width ("
|
||||
(int-to-string (if ebrowse--long-display-flag
|
||||
|
@ -4313,7 +4313,7 @@ NUMBER-OF-STATIC-VARIABLES:"
|
|||
"Select the nth entry in the list by the keys 1..9."
|
||||
(interactive)
|
||||
(let* ((maxlin (count-lines (point-min) (point-max)))
|
||||
(n (min maxlin (+ 2 (string-to-int (this-command-keys))))))
|
||||
(n (min maxlin (+ 2 (string-to-number (this-command-keys))))))
|
||||
(goto-line n)
|
||||
(throw 'electric-buffer-menu-select (point))))
|
||||
|
||||
|
|
|
@ -1283,16 +1283,16 @@ where they were found."
|
|||
|
||||
|
||||
(if (looking-at "[0-9]")
|
||||
(setq line (string-to-int (buffer-substring
|
||||
(point)
|
||||
(progn (skip-chars-forward "0-9")
|
||||
(point))))))
|
||||
(setq line (string-to-number (buffer-substring
|
||||
(point)
|
||||
(progn (skip-chars-forward "0-9")
|
||||
(point))))))
|
||||
(search-forward ",")
|
||||
(if (looking-at "[0-9]")
|
||||
(setq startpos (string-to-int (buffer-substring
|
||||
(point)
|
||||
(progn (skip-chars-forward "0-9")
|
||||
(point)))))))
|
||||
(setq startpos (string-to-number (buffer-substring
|
||||
(point)
|
||||
(progn (skip-chars-forward "0-9")
|
||||
(point)))))))
|
||||
;; Leave point on the next line of the tags file.
|
||||
(forward-line 1)
|
||||
(cons tag-text (cons line startpos))))
|
||||
|
|
|
@ -1004,7 +1004,7 @@ Return its components if so, nil if no."
|
|||
(line-idx (nth 2 (car patterns))))
|
||||
|
||||
(setq raw-file-name (if file-idx (match-string file-idx line) nil))
|
||||
(setq line-no (if line-idx (string-to-int (match-string line-idx line)) 0))
|
||||
(setq line-no (if line-idx (string-to-number (match-string line-idx line)) 0))
|
||||
(setq err-text (if (> (length (car patterns)) 4)
|
||||
(match-string (nth 4 (car patterns)) line)
|
||||
(flymake-patch-err-text (substring line (match-end 0)))))
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1173,7 +1173,7 @@ Use line numbers if `ps-run-error-line-numbers' is not nil"
|
|||
(let (i)
|
||||
(setq
|
||||
i
|
||||
(string-to-int
|
||||
(string-to-number
|
||||
(buffer-substring (match-beginning 0) (match-end 0))))
|
||||
(goto-char p)
|
||||
(pop-to-buffer ps-run-parent)
|
||||
|
|
|
@ -5082,7 +5082,7 @@ Return a valid value only."
|
|||
((string-equal "++" input) '++)
|
||||
((string-equal "--" input) '--)
|
||||
((string-match "^-?[0-9]+$" input)
|
||||
(string-to-int input))
|
||||
(string-to-number input))
|
||||
((fboundp (setq interned (intern input)))
|
||||
interned)
|
||||
((boundp interned) interned)
|
||||
|
@ -13701,10 +13701,10 @@ entity ENT-KEY."
|
|||
(condition-case ()
|
||||
(progn (load-file file-dir-name)
|
||||
(string< (mapconcat
|
||||
(lambda (a) (format "%3d" (string-to-int a)))
|
||||
(lambda (a) (format "%3d" (string-to-number a)))
|
||||
(split-string "3.31.14" "\\.") "")
|
||||
(mapconcat
|
||||
(lambda (a) (format "%3d" (string-to-int a)))
|
||||
(lambda (a) (format "%3d" (string-to-number a)))
|
||||
(split-string vhdl-cache-version "\\.") "")))
|
||||
(error (progn (vhdl-warning (format "ERROR: Corrupted cache file: \"%s\"" file-dir-name))
|
||||
nil))))))
|
||||
|
@ -14075,7 +14075,7 @@ otherwise use cached data."
|
|||
(beginning-of-line) (looking-at "^\\([0-9]+\\):"))
|
||||
(re-search-backward
|
||||
(format "^[0-%d]:\\s-*[[{<]-"
|
||||
(max (1- (string-to-int (match-string 1))) 0)) nil t)))
|
||||
(max (1- (string-to-number (match-string 1))) 0)) nil t)))
|
||||
(goto-char (match-end 0))
|
||||
(speedbar-do-function-pointer)
|
||||
(speedbar-center-buffer-smartly)))
|
||||
|
|
|
@ -325,11 +325,11 @@ PROC is the server process. Format of STRING is \"PATH PATH PATH... \\n\"."
|
|||
(setq request "")))))
|
||||
;; ARG is a line number option.
|
||||
((string-match "\\`\\+[0-9]+\\'" arg)
|
||||
(setq lineno (string-to-int (substring arg 1))))
|
||||
(setq lineno (string-to-number (substring arg 1))))
|
||||
;; ARG is line number:column option.
|
||||
((string-match "\\`+\\([0-9]+\\):\\([0-9]+\\)\\'" arg)
|
||||
(setq lineno (string-to-int (match-string 1 arg))
|
||||
columnno (string-to-int (match-string 2 arg))))
|
||||
(setq lineno (string-to-number (match-string 1 arg))
|
||||
columnno (string-to-number (match-string 2 arg))))
|
||||
(t
|
||||
;; Undo the quoting that emacsclient does
|
||||
;; for certain special characters.
|
||||
|
|
|
@ -759,7 +759,7 @@ Environment variables are expanded, see function `substitute-in-file-name'."
|
|||
;; If STR is of the form +n, for n>0, return n. Otherwise, nil.
|
||||
(defun shell-extract-num (str)
|
||||
(and (string-match "^\\+[1-9][0-9]*$" str)
|
||||
(string-to-int str)))
|
||||
(string-to-number str)))
|
||||
|
||||
|
||||
(defun shell-dirtrack-mode ()
|
||||
|
|
|
@ -1631,11 +1631,11 @@ normal otherwise."
|
|||
(kill-emacs t))
|
||||
|
||||
((string-match "^\\+[0-9]+\\'" argi)
|
||||
(setq line (string-to-int argi)))
|
||||
(setq line (string-to-number argi)))
|
||||
|
||||
((string-match "^\\+\\([0-9]+\\):\\([0-9]+\\)\\'" argi)
|
||||
(setq line (string-to-int (match-string 1 argi))
|
||||
column (string-to-int (match-string 2 argi))))
|
||||
(setq line (string-to-number (match-string 1 argi))
|
||||
column (string-to-number (match-string 2 argi))))
|
||||
|
||||
((setq tem (assoc argi command-line-x-option-alist))
|
||||
;; Ignore X-windows options and their args if not using X.
|
||||
|
|
|
@ -3339,7 +3339,7 @@ The top-most line is line 0."
|
|||
(second-colon
|
||||
(string-match ":" string (1+ first-colon)))
|
||||
(filename (substring string 1 first-colon))
|
||||
(fileline (string-to-int
|
||||
(fileline (string-to-number
|
||||
(substring string (1+ first-colon) second-colon))))
|
||||
(setq term-pending-frame (cons filename fileline))))
|
||||
((= (aref string 0) ?/)
|
||||
|
|
|
@ -106,7 +106,7 @@
|
|||
(let ((param (nth 3 aelt)))
|
||||
(setq default-frame-alist
|
||||
(cons (cons param
|
||||
(string-to-int (car x-invocation-args)))
|
||||
(string-to-number (car x-invocation-args)))
|
||||
default-frame-alist)
|
||||
x-invocation-args
|
||||
(cdr x-invocation-args))))))
|
||||
|
|
|
@ -615,7 +615,7 @@ CODE values: 13 = Tool-Position, 14 = Size-in-Pixels, 18 = Size-in-Chars."
|
|||
(setq str (substring str (match-end 0)))
|
||||
(string-match ";[0-9]*" str)
|
||||
(setq x (substring str (1+ (match-beginning 0)) (match-end 0)))
|
||||
(cons (string-to-int y) (string-to-int x))))
|
||||
(cons (string-to-number y) (string-to-number x))))
|
||||
|
||||
(defun sm::font-size ()
|
||||
"Returns font size in pixels: (cons Ysize Xsize)"
|
||||
|
|
|
@ -146,7 +146,7 @@ the last file dropped is selected."
|
|||
"Handle SWITCH of the form \"-switch n\"."
|
||||
(let ((aelt (assoc switch command-line-x-option-alist)))
|
||||
(if aelt
|
||||
(push (cons (nth 3 aelt) (string-to-int (pop x-invocation-args)))
|
||||
(push (cons (nth 3 aelt) (string-to-number (pop x-invocation-args)))
|
||||
default-frame-alist))))
|
||||
|
||||
;; Handle options that apply to initial frame only
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
(let ((param (nth 3 aelt)))
|
||||
(setq default-frame-alist
|
||||
(cons (cons param
|
||||
(string-to-int (car x-invocation-args)))
|
||||
(string-to-number (car x-invocation-args)))
|
||||
default-frame-alist)
|
||||
x-invocation-args
|
||||
(cdr x-invocation-args))))))
|
||||
|
|
|
@ -2296,9 +2296,9 @@ Optional third arg SHIFT is an offset to apply based on previous corrections."
|
|||
(setq output (substring output (match-end 0))) ; skip over misspelling
|
||||
(if (eq type ?#)
|
||||
(setq count 0) ; no misses for type #
|
||||
(setq count (string-to-int output) ; get number of misses.
|
||||
(setq count (string-to-number output) ; get number of misses.
|
||||
output (substring output (1+ (string-match " " output 1)))))
|
||||
(setq offset (string-to-int output))
|
||||
(setq offset (string-to-number output))
|
||||
(if (eq type ?#) ; No miss or guess list.
|
||||
(setq output nil)
|
||||
(setq output (substring output (1+ (string-match " " output 1)))))
|
||||
|
|
|
@ -134,7 +134,7 @@ closing requests for requests that are used in matched pairs."
|
|||
(save-excursion
|
||||
(looking-at outline-regexp)
|
||||
(skip-chars-forward ".H ")
|
||||
(string-to-int (buffer-substring (point) (+ 1 (point))))))
|
||||
(string-to-number (buffer-substring (point) (+ 1 (point))))))
|
||||
|
||||
;;; Compute how much to indent a comment in nroff/troff source.
|
||||
;;; By mit-erl!gildea April 86
|
||||
|
|
|
@ -312,12 +312,12 @@
|
|||
(not (stringp (car al1))))))
|
||||
|
||||
(defun reftex-bib-sort-year (e1 e2)
|
||||
(< (string-to-int (or (cdr (assoc "year" e1)) "0"))
|
||||
(string-to-int (or (cdr (assoc "year" e2)) "0"))))
|
||||
(< (string-to-number (or (cdr (assoc "year" e1)) "0"))
|
||||
(string-to-number (or (cdr (assoc "year" e2)) "0"))))
|
||||
|
||||
(defun reftex-bib-sort-year-reverse (e1 e2)
|
||||
(> (string-to-int (or (cdr (assoc "year" e1)) "0"))
|
||||
(string-to-int (or (cdr (assoc "year" e2)) "0"))))
|
||||
(> (string-to-number (or (cdr (assoc "year" e1)) "0"))
|
||||
(string-to-number (or (cdr (assoc "year" e2)) "0"))))
|
||||
|
||||
(defun reftex-get-crossref-alist (entry)
|
||||
;; return the alist from a crossref entry
|
||||
|
@ -988,7 +988,7 @@ While entering the regexp, completion on knows citation keys is possible.
|
|||
(while (string-match
|
||||
"\\(\\`\\|[^%]\\)\\(\\(%\\([0-9]*\\)\\([a-zA-Z]\\)\\)[.,;: ]*\\)"
|
||||
format)
|
||||
(let ((n (string-to-int (match-string 4 format)))
|
||||
(let ((n (string-to-number (match-string 4 format)))
|
||||
(l (string-to-char (match-string 5 format)))
|
||||
rpl b e)
|
||||
(save-match-data
|
||||
|
|
|
@ -999,7 +999,7 @@ of master file."
|
|||
(if (string-match "\\`[A-Z]\\'" number-string)
|
||||
(aset reftex-section-numbers i
|
||||
(- (string-to-char number-string) ?A -1))
|
||||
(aset reftex-section-numbers i (string-to-int number-string)))
|
||||
(aset reftex-section-numbers i (string-to-number number-string)))
|
||||
(pop numbers))
|
||||
(decf i)))
|
||||
(put 'reftex-section-numbers 'appendix appendix))
|
||||
|
@ -1045,7 +1045,7 @@ of master file."
|
|||
(setq string
|
||||
(concat
|
||||
(char-to-string
|
||||
(1- (+ ?A (string-to-int (match-string 0 string)))))
|
||||
(1- (+ ?A (string-to-number (match-string 0 string)))))
|
||||
(substring string (match-end 0))))))
|
||||
(if star
|
||||
(concat (make-string (1- (length string)) ?\ ) "*")
|
||||
|
|
|
@ -2807,7 +2807,7 @@ Default is to leave the number of spaces as is."
|
|||
(let ((arg (texinfo-parse-arg-discard)))
|
||||
(if (string= "asis" arg)
|
||||
(setq texinfo-paragraph-indent "asis")
|
||||
(setq texinfo-paragraph-indent (string-to-int arg)))))
|
||||
(setq texinfo-paragraph-indent (string-to-number arg)))))
|
||||
|
||||
(put 'refill 'texinfo-format 'texinfo-format-refill)
|
||||
(defun texinfo-format-refill ()
|
||||
|
|
|
@ -270,7 +270,7 @@ template."
|
|||
(string-match "\\`\\(\\(-?[0-9]+\\)/\\)?\\([^%]+\\)?\\(\\(%[-.,:@+_ #^()0-9]*[A-Za-z%][^%]*\\)*%[-.,:@+_ #^()0-9]*[A-Za-z%]\\)?\\([^%]+\\)?\\'" time-stamp-pattern)
|
||||
(and (match-beginning 2)
|
||||
(setq line-limit
|
||||
(string-to-int (match-string 2 time-stamp-pattern))))
|
||||
(string-to-number (match-string 2 time-stamp-pattern))))
|
||||
(and (match-beginning 3)
|
||||
(setq ts-start (match-string 3 time-stamp-pattern)))
|
||||
(and (match-beginning 4)
|
||||
|
@ -558,9 +558,9 @@ and all `time-stamp-format' compatibility."
|
|||
((eq cur-char ?y) ;year
|
||||
(or alt-form (not (string-equal field-width ""))
|
||||
(time-stamp-conv-warn "%y" "%:y"))
|
||||
(string-to-int (format-time-string "%Y" time)))
|
||||
(string-to-number (format-time-string "%Y" time)))
|
||||
((eq cur-char ?Y) ;4-digit year, new style
|
||||
(string-to-int (format-time-string "%Y" time)))
|
||||
(string-to-number (format-time-string "%Y" time)))
|
||||
((eq cur-char ?z) ;time zone lower case
|
||||
(if change-case
|
||||
"" ;discourage %z variations
|
||||
|
@ -597,7 +597,7 @@ and all `time-stamp-format' compatibility."
|
|||
(let* ((initial-length (length padded-result))
|
||||
(desired-length (if (string-equal field-width "")
|
||||
initial-length
|
||||
(string-to-int field-width))))
|
||||
(string-to-number field-width))))
|
||||
(if (> initial-length desired-length)
|
||||
;; truncate strings on right, years on left
|
||||
(if (stringp field-result)
|
||||
|
@ -621,7 +621,7 @@ width specification or \"\". TIME is the time to convert."
|
|||
(format "%%:%c" format-char)))
|
||||
(if (and alt-form (not (string-equal field-width "")))
|
||||
"" ;discourage "%:2d" and the like
|
||||
(string-to-int (format-time-string format-string time)))))
|
||||
(string-to-number (format-time-string format-string time)))))
|
||||
|
||||
(defvar time-stamp-conversion-warn t
|
||||
"Warn about soon-to-be-unsupported forms in `time-stamp-format'.
|
||||
|
|
|
@ -331,7 +331,7 @@ update which can wait for the next redisplay."
|
|||
;; Record that mail file is accessible.
|
||||
(setq display-time-server-down-time nil)))))))
|
||||
(24-hours (substring time 11 13))
|
||||
(hour (string-to-int 24-hours))
|
||||
(hour (string-to-number 24-hours))
|
||||
(12-hours (int-to-string (1+ (% (+ hour 11) 12))))
|
||||
(am-pm (if (>= hour 12) "pm" "am"))
|
||||
(minutes (substring time 14 16))
|
||||
|
|
|
@ -205,7 +205,7 @@ Understands the following styles:
|
|||
;; Unix Epoch, so are 2000+. Three-digit years are assumed to
|
||||
;; be relative to 1900.
|
||||
(if (< (length year) 4)
|
||||
(let ((y (string-to-int year)))
|
||||
(let ((y (string-to-number year)))
|
||||
(if (< y 69)
|
||||
(setq y (+ y 100)))
|
||||
(setq year (int-to-string (+ 1900 y)))))
|
||||
|
@ -271,7 +271,7 @@ or an integer of the form +-HHMM, or a time zone name."
|
|||
;; +900
|
||||
timezone))
|
||||
(if (stringp timezone)
|
||||
(setq timezone (string-to-int timezone)))
|
||||
(setq timezone (string-to-number timezone)))
|
||||
;; Taking account of minute in timezone.
|
||||
;; HHMM -> MM
|
||||
(let* ((abszone (abs timezone))
|
||||
|
@ -314,7 +314,7 @@ Gregorian date Sunday, December 31, 1 BC."
|
|||
If LOCAL is nil, it is assumed to be GMT.
|
||||
If TIMEZONE is nil, use the local time zone."
|
||||
(let* ((date (timezone-parse-date date))
|
||||
(year (string-to-int (aref date 0)))
|
||||
(year (string-to-number (aref date 0)))
|
||||
(year (cond ((< year 69)
|
||||
(+ year 2000))
|
||||
((< year 100)
|
||||
|
@ -322,12 +322,12 @@ If TIMEZONE is nil, use the local time zone."
|
|||
((< year 1000) ; possible 3-digit years.
|
||||
(+ year 1900))
|
||||
(t year)))
|
||||
(month (string-to-int (aref date 1)))
|
||||
(day (string-to-int (aref date 2)))
|
||||
(month (string-to-number (aref date 1)))
|
||||
(day (string-to-number (aref date 2)))
|
||||
(time (timezone-parse-time (aref date 3)))
|
||||
(hour (string-to-int (aref time 0)))
|
||||
(minute (string-to-int (aref time 1)))
|
||||
(second (string-to-int (aref time 2)))
|
||||
(hour (string-to-number (aref time 0)))
|
||||
(minute (string-to-number (aref time 1)))
|
||||
(second (string-to-number (aref time 2)))
|
||||
(local (or (aref date 4) local)) ;Use original if defined
|
||||
(timezone
|
||||
(or timezone
|
||||
|
|
|
@ -93,7 +93,7 @@ If the logical name `EMACS_FILE_NAME' is defined, `find-file' that file."
|
|||
(if (not args)
|
||||
(if file
|
||||
(progn (find-file file)
|
||||
(if line (goto-line (string-to-int line)))))
|
||||
(if line (goto-line (string-to-number line)))))
|
||||
(cd (file-name-directory file))
|
||||
(vms-command-line-again))))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue