aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2005-05-16 11:34:49 +0000
committerJuanma Barranquero2005-05-16 11:34:49 +0000
commit027a4b6b3fd229f8aea323f59cb246d99deb8a75 (patch)
treec92da7d3049376d7bd687db6bc5c8dce82ed9335
parent216d380630ec8be9569a56687f0e08b89ee97c47 (diff)
downloademacs-027a4b6b3fd229f8aea323f59cb246d99deb8a75.tar.gz
emacs-027a4b6b3fd229f8aea323f59cb246d99deb8a75.zip
Replace `string-to-int' by `string-to-number'.
-rw-r--r--lisp/ChangeLog79
-rw-r--r--lisp/align.el4
-rw-r--r--lisp/ansi-color.el2
-rw-r--r--lisp/array.el10
-rw-r--r--lisp/calendar/appt.el4
-rw-r--r--lisp/calendar/cal-bahai.el8
-rw-r--r--lisp/calendar/cal-hebrew.el8
-rw-r--r--lisp/calendar/cal-islam.el8
-rw-r--r--lisp/calendar/calendar.el4
-rw-r--r--lisp/calendar/diary-lib.el20
-rw-r--r--lisp/calendar/solar.el2
-rw-r--r--lisp/dired-aux.el2
-rw-r--r--lisp/dired-x.el16
-rw-r--r--lisp/ediff-diff.el20
-rw-r--r--lisp/edmacro.el4
-rw-r--r--lisp/emacs-lisp/lisp-mnt.el2
-rw-r--r--lisp/emacs-lisp/re-builder.el2
-rw-r--r--lisp/emerge.el20
-rw-r--r--lisp/emulation/edt.el8
-rw-r--r--lisp/emulation/tpu-extras.el8
-rw-r--r--lisp/emulation/vip.el6
-rw-r--r--lisp/emulation/viper-ex.el8
-rw-r--r--lisp/faces.el2
-rw-r--r--lisp/files.el4
-rw-r--r--lisp/hexl.el2
-rw-r--r--lisp/international/fontset.el2
-rw-r--r--lisp/mail/feedmail.el2
-rw-r--r--lisp/mail/mailalias.el2
-rw-r--r--lisp/mail/rmail.el2
-rw-r--r--lisp/mail/rmailsum.el24
-rw-r--r--lisp/mail/smtpmail.el2
-rw-r--r--lisp/net/ange-ftp.el4
-rw-r--r--lisp/play/gametree.el6
-rw-r--r--lisp/progmodes/ada-xref.el6
-rw-r--r--lisp/progmodes/cperl-mode.el2
-rw-r--r--lisp/progmodes/ebrowse.el12
-rw-r--r--lisp/progmodes/etags.el16
-rw-r--r--lisp/progmodes/flymake.el2
-rw-r--r--lisp/progmodes/idlw-shell.el612
-rw-r--r--lisp/progmodes/ps-mode.el2
-rw-r--r--lisp/progmodes/vhdl-mode.el8
-rw-r--r--lisp/server.el6
-rw-r--r--lisp/shell.el2
-rw-r--r--lisp/startup.el6
-rw-r--r--lisp/term.el2
-rw-r--r--lisp/term/mac-win.el2
-rw-r--r--lisp/term/sun-mouse.el2
-rw-r--r--lisp/term/w32-win.el2
-rw-r--r--lisp/term/x-win.el2
-rw-r--r--lisp/textmodes/ispell.el4
-rw-r--r--lisp/textmodes/nroff-mode.el2
-rw-r--r--lisp/textmodes/reftex-cite.el10
-rw-r--r--lisp/textmodes/reftex-parse.el4
-rw-r--r--lisp/textmodes/texinfmt.el2
-rw-r--r--lisp/time-stamp.el10
-rw-r--r--lisp/time.el2
-rw-r--r--lisp/timezone.el16
-rw-r--r--lisp/vms-patch.el2
58 files changed, 556 insertions, 477 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index bc460f52430..bfbeac70942 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,84 @@
12005-05-16 Juanma Barranquero <lekktu@gmail.com> 12005-05-16 Juanma Barranquero <lekktu@gmail.com>
2 2
3 * align.el (align-regexp):
4 * ansi-color.el (ansi-color-get-face):
5 * array.el (array-reconfigure-rows, array-init-max-row)
6 (array-init-max-column, array-init-columns-per-line)
7 (array-init-field-width):
8 * dired-aux.el (dired-trample-file-versions):
9 * dired-x.el (dired-mark-sexp):
10 * ediff-diff.el (ediff-extract-diffs, ediff-get-diff3-group):
11 * edmacro.el (edmacro-finish-edit, edmacro-parse-keys):
12 * emerge.el (emerge-extract-diffs, emerge-get-diff3-group):
13 * faces.el (face-read-integer):
14 * files.el (backup-extract-version, insert-directory):
15 * hexl.el (hexl-insert-decimal-char):
16 * server.el (server-process-filter):
17 * shell.el (shell-extract-num):
18 * startup.el (command-line-1):
19 * term.el (term-command-hook):
20 * time-stamp.el (time-stamp, time-stamp-string-preprocess)
21 (time-stamp-do-number):
22 * time.el (display-time-update):
23 * timezone.el (timezone-parse-date, timezone-zone-to-minute)
24 (timezone-fix-time):
25 * vms-patch.el (vms-suspend-resume-hook):
26 * calendar/appt.el (appt-convert-time):
27 * calendar/cal-bahai.el (mark-bahai-diary-entries):
28 * calendar/cal-hebrew.el (mark-hebrew-diary-entries):
29 * calendar/cal-islam.el (mark-islamic-diary-entries):
30 * calendar/calendar.el (calendar-cursor-to-date)
31 (calendar-star-date):
32 * calendar/diary-lib.el (diary-attrtype-convert)
33 (mark-diary-entries, diary-entry-time):
34 * calendar/solar.el (solar-get-number):
35 * emacs-lisp/lisp-mnt.el (lm-last-modified-date):
36 * emacs-lisp/re-builder.el (reb-display-subexp):
37 * emulation/edt.el (edt-set-scroll-margins):
38 * emulation/tpu-extras.el (tpu-set-scroll-margins):
39 * emulation/vip.el (vip-get-ex-token, vip-get-ex-buffer)
40 (vip-get-ex-count):
41 * emulation/viper-ex.el (viper-get-ex-token)
42 (viper-get-ex-buffer, viper-get-ex-count, ex-next):
43 * international/fontset.el (fontset-plain-name):
44 * mail/feedmail.el (feedmail-look-at-queue-directory):
45 * mail/mailalias.el (mail-get-names):
46 * mail/rmail.el (rmail-convert-to-babyl-format):
47 * mail/rmailsum.el (rmail-make-basic-summary-line)
48 (rmail-summary-next-same-subject, rmail-summary-rmail-update)
49 (rmail-summary-goto-msg):
50 * mail/smtpmail.el (smtpmail-read-response):
51 * net/ange-ftp.el (ange-ftp-guess-hash-mark-size)
52 (ange-ftp-vms-add-file-entry):
53 * play/gametree.el (gametree-looking-at-ply)
54 (gametree-current-branch-score):
55 * progmodes/ada-xref.el (ada-prj-find-prj-file)
56 (ada-xref-find-in-modified-ali, ada-find-in-src-path):
57 * progmodes/cperl-mode.el (condition-case):
58 * progmodes/ebrowse.el (ebrowse-set-tree-indentation)
59 (ebrowse-set-member-buffer-column-width)
60 (ebrowse-select-1st-to-9nth):
61 * progmodes/etags.el (etags-snarf-tag):
62 * progmodes/flymake.el (flymake-parse-line):
63 * progmodes/idlw-shell.el (idlwave-shell-parse-line)
64 (idlwave-shell-filter-bp, idlwave-shell-goto-next-error)
65 (idlwave-shell-menu-def):
66 * progmodes/ps-mode.el (ps-run-goto-error):
67 * progmodes/vhdl-mode.el (vhdl-read-offset, vhdl-load-cache)
68 (vhdl-speedbar-contract-level):
69 * term/mac-win.el (x-handle-numeric-switch):
70 * term/sun-mouse.el (sun-get-frame-data):
71 * term/w32-win.el (x-handle-numeric-switch):
72 * term/x-win.el (x-handle-numeric-switch):
73 * textmodes/ispell.el (ispell-parse-output):
74 * textmodes/nroff-mode.el (nroff-outline-level):
75 * textmodes/reftex-cite.el (reftex-bib-sort-year)
76 (reftex-bib-sort-year-reverse, reftex-format-citation):
77 * textmodes/reftex-parse.el (reftex-init-section-numbers)
78 (reftex-section-number):
79 * textmodes/texinfmt.el (texinfo-paragraphindent): Replace
80 `string-to-int' by `string-to-number'.
81
3 * international/latexenc.el: Add page marker to force the "Local 82 * international/latexenc.el: Add page marker to force the "Local
4 Variables:" string out of the last page. 83 Variables:" string out of the last page.
5 84
diff --git a/lisp/align.el b/lisp/align.el
index 5238a75807d..563e839f5fe 100644
--- a/lisp/align.el
+++ b/lisp/align.el
@@ -938,10 +938,10 @@ region, call `align-regexp' and type in that regular expression."
938 (if current-prefix-arg 938 (if current-prefix-arg
939 (list (read-string "Complex align using regexp: " 939 (list (read-string "Complex align using regexp: "
940 "\\(\\s-*\\)") 940 "\\(\\s-*\\)")
941 (string-to-int 941 (string-to-number
942 (read-string 942 (read-string
943 "Parenthesis group to modify (justify if negative): " "1")) 943 "Parenthesis group to modify (justify if negative): " "1"))
944 (string-to-int 944 (string-to-number
945 (read-string "Amount of spacing (or column if negative): " 945 (read-string "Amount of spacing (or column if negative): "
946 (number-to-string align-default-spacing))) 946 (number-to-string align-default-spacing)))
947 (y-or-n-p "Repeat throughout line? ")) 947 (y-or-n-p "Repeat throughout line? "))
diff --git a/lisp/ansi-color.el b/lisp/ansi-color.el
index e505f91e901..9b36a403b5d 100644
--- a/lisp/ansi-color.el
+++ b/lisp/ansi-color.el
@@ -619,7 +619,7 @@ ESCAPE-SEQ is a SGR control sequences such as \\033[34m. The parameter
619 (while (string-match ansi-color-r escape-seq i) 619 (while (string-match ansi-color-r escape-seq i)
620 (setq i (match-end 0) 620 (setq i (match-end 0)
621 val (ansi-color-get-face-1 621 val (ansi-color-get-face-1
622 (string-to-int (match-string 0 escape-seq) 10))) 622 (string-to-number (match-string 0 escape-seq) 10)))
623 (cond ((not val)) 623 (cond ((not val))
624 ((eq val 'default) 624 ((eq val 'default)
625 (setq f (list val))) 625 (setq f (list val)))
diff --git a/lisp/array.el b/lisp/array.el
index 3aa5d4bd319..56ef9b264de 100644
--- a/lisp/array.el
+++ b/lisp/array.el
@@ -647,7 +647,7 @@ of array-rows-numbered."
647 (<= new-columns-per-line array-max-column)) 647 (<= new-columns-per-line array-max-column))
648 (setq check nil) 648 (setq check nil)
649 (setq new-columns-per-line 649 (setq new-columns-per-line
650 (string-to-int 650 (string-to-number
651 (read-input 651 (read-input
652 (format "Columns per line (1 - %d): " array-max-column))))))) 652 (format "Columns per line (1 - %d): " array-max-column)))))))
653 ;; Check on new-rows-numbered. It has to be done this way 653 ;; 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'."
927(defun array-init-max-row (&optional arg) 927(defun array-init-max-row (&optional arg)
928 "Initialize the value of `array-max-row'." 928 "Initialize the value of `array-max-row'."
929 (setq array-max-row 929 (setq array-max-row
930 (or arg (string-to-int (read-input "Number of array rows: "))))) 930 (or arg (string-to-number (read-input "Number of array rows: ")))))
931 931
932(defun array-init-max-column (&optional arg) 932(defun array-init-max-column (&optional arg)
933 "Initialize the value of `array-max-column'." 933 "Initialize the value of `array-max-column'."
934 (setq array-max-column 934 (setq array-max-column
935 (or arg (string-to-int (read-input "Number of array columns: "))))) 935 (or arg (string-to-number (read-input "Number of array columns: ")))))
936 936
937(defun array-init-columns-per-line (&optional arg) 937(defun array-init-columns-per-line (&optional arg)
938 "Initialize the value of `array-columns-per-line'." 938 "Initialize the value of `array-columns-per-line'."
939 (setq array-columns-per-line 939 (setq array-columns-per-line
940 (or arg (string-to-int (read-input "Array columns per line: "))))) 940 (or arg (string-to-number (read-input "Array columns per line: ")))))
941 941
942(defun array-init-field-width (&optional arg) 942(defun array-init-field-width (&optional arg)
943 "Initialize the value of `array-field-width'." 943 "Initialize the value of `array-field-width'."
944 (setq array-field-width 944 (setq array-field-width
945 (or arg (string-to-int (read-input "Field width: "))))) 945 (or arg (string-to-number (read-input "Field width: ")))))
946 946
947(defun array-init-rows-numbered (&optional arg) 947(defun array-init-rows-numbered (&optional arg)
948 "Initialize the value of `array-rows-numbered'." 948 "Initialize the value of `array-rows-numbered'."
diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el
index d007e5b4546..c3f29e3d371 100644
--- a/lisp/calendar/appt.el
+++ b/lisp/calendar/appt.el
@@ -633,11 +633,11 @@ hour and minute parts."
633 (min 0)) 633 (min 0))
634 634
635 (string-match "[:.]\\([0-9][0-9]\\)" time2conv) 635 (string-match "[:.]\\([0-9][0-9]\\)" time2conv)
636 (setq min (string-to-int 636 (setq min (string-to-number
637 (match-string 1 time2conv))) 637 (match-string 1 time2conv)))
638 638
639 (string-match "[0-9]?[0-9][:.]" time2conv) 639 (string-match "[0-9]?[0-9][:.]" time2conv)
640 (setq hr (string-to-int 640 (setq hr (string-to-number
641 (match-string 0 time2conv))) 641 (match-string 0 time2conv)))
642 642
643 ;; convert the time appointment time into 24 hour time 643 ;; convert the time appointment time into 24 hour time
diff --git a/lisp/calendar/cal-bahai.el b/lisp/calendar/cal-bahai.el
index 2bcfaf648ec..7e6149d8e94 100644
--- a/lisp/calendar/cal-bahai.el
+++ b/lisp/calendar/cal-bahai.el
@@ -340,13 +340,13 @@ nongregorian-diary-marking-hook."
340 (buffer-substring 340 (buffer-substring
341 (match-beginning m-name-pos) 341 (match-beginning m-name-pos)
342 (match-end m-name-pos)))) 342 (match-end m-name-pos))))
343 (mm (string-to-int 343 (mm (string-to-number
344 (if m-pos 344 (if m-pos
345 (buffer-substring 345 (buffer-substring
346 (match-beginning m-pos) 346 (match-beginning m-pos)
347 (match-end m-pos)) 347 (match-end m-pos))
348 ""))) 348 "")))
349 (dd (string-to-int 349 (dd (string-to-number
350 (if d-pos 350 (if d-pos
351 (buffer-substring 351 (buffer-substring
352 (match-beginning d-pos) 352 (match-beginning d-pos)
@@ -365,14 +365,14 @@ nongregorian-diary-marking-hook."
365 (calendar-bahai-from-absolute 365 (calendar-bahai-from-absolute
366 (calendar-absolute-from-gregorian 366 (calendar-absolute-from-gregorian
367 (calendar-current-date))))) 367 (calendar-current-date)))))
368 (y (+ (string-to-int y-str) 368 (y (+ (string-to-number y-str)
369 (* 100 (/ current-y 100))))) 369 (* 100 (/ current-y 100)))))
370 (if (> (- y current-y) 50) 370 (if (> (- y current-y) 50)
371 (- y 100) 371 (- y 100)
372 (if (> (- current-y y) 50) 372 (if (> (- current-y y) 50)
373 (+ y 100) 373 (+ y 100)
374 y))) 374 y)))
375 (string-to-int y-str))))) 375 (string-to-number y-str)))))
376 (if dd-name 376 (if dd-name
377 (mark-calendar-days-named 377 (mark-calendar-days-named
378 (cdr (assoc-string (substring dd-name 0 3) 378 (cdr (assoc-string (substring dd-name 0 3)
diff --git a/lisp/calendar/cal-hebrew.el b/lisp/calendar/cal-hebrew.el
index f66b4966e57..8f9f7723d5d 100644
--- a/lisp/calendar/cal-hebrew.el
+++ b/lisp/calendar/cal-hebrew.el
@@ -718,13 +718,13 @@ is provided for use as part of the nongregorian-diary-marking-hook."
718 (buffer-substring 718 (buffer-substring
719 (match-beginning m-name-pos) 719 (match-beginning m-name-pos)
720 (match-end m-name-pos)))) 720 (match-end m-name-pos))))
721 (mm (string-to-int 721 (mm (string-to-number
722 (if m-pos 722 (if m-pos
723 (buffer-substring 723 (buffer-substring
724 (match-beginning m-pos) 724 (match-beginning m-pos)
725 (match-end m-pos)) 725 (match-end m-pos))
726 ""))) 726 "")))
727 (dd (string-to-int 727 (dd (string-to-number
728 (if d-pos 728 (if d-pos
729 (buffer-substring 729 (buffer-substring
730 (match-beginning d-pos) 730 (match-beginning d-pos)
@@ -743,14 +743,14 @@ is provided for use as part of the nongregorian-diary-marking-hook."
743 (calendar-hebrew-from-absolute 743 (calendar-hebrew-from-absolute
744 (calendar-absolute-from-gregorian 744 (calendar-absolute-from-gregorian
745 (calendar-current-date))))) 745 (calendar-current-date)))))
746 (y (+ (string-to-int y-str) 746 (y (+ (string-to-number y-str)
747 (* 100 (/ current-y 100))))) 747 (* 100 (/ current-y 100)))))
748 (if (> (- y current-y) 50) 748 (if (> (- y current-y) 50)
749 (- y 100) 749 (- y 100)
750 (if (> (- current-y y) 50) 750 (if (> (- current-y y) 50)
751 (+ y 100) 751 (+ y 100)
752 y))) 752 y)))
753 (string-to-int y-str))))) 753 (string-to-number y-str)))))
754 (if dd-name 754 (if dd-name
755 (mark-calendar-days-named 755 (mark-calendar-days-named
756 (cdr (assoc-string dd-name 756 (cdr (assoc-string dd-name
diff --git a/lisp/calendar/cal-islam.el b/lisp/calendar/cal-islam.el
index 1ac6f0677b1..786c71f24ce 100644
--- a/lisp/calendar/cal-islam.el
+++ b/lisp/calendar/cal-islam.el
@@ -337,13 +337,13 @@ provided for use as part of the nongregorian-diary-marking-hook."
337 (buffer-substring 337 (buffer-substring
338 (match-beginning m-name-pos) 338 (match-beginning m-name-pos)
339 (match-end m-name-pos)))) 339 (match-end m-name-pos))))
340 (mm (string-to-int 340 (mm (string-to-number
341 (if m-pos 341 (if m-pos
342 (buffer-substring 342 (buffer-substring
343 (match-beginning m-pos) 343 (match-beginning m-pos)
344 (match-end m-pos)) 344 (match-end m-pos))
345 ""))) 345 "")))
346 (dd (string-to-int 346 (dd (string-to-number
347 (if d-pos 347 (if d-pos
348 (buffer-substring 348 (buffer-substring
349 (match-beginning d-pos) 349 (match-beginning d-pos)
@@ -362,14 +362,14 @@ provided for use as part of the nongregorian-diary-marking-hook."
362 (calendar-islamic-from-absolute 362 (calendar-islamic-from-absolute
363 (calendar-absolute-from-gregorian 363 (calendar-absolute-from-gregorian
364 (calendar-current-date))))) 364 (calendar-current-date)))))
365 (y (+ (string-to-int y-str) 365 (y (+ (string-to-number y-str)
366 (* 100 (/ current-y 100))))) 366 (* 100 (/ current-y 100)))))
367 (if (> (- y current-y) 50) 367 (if (> (- y current-y) 50)
368 (- y 100) 368 (- y 100)
369 (if (> (- current-y y) 50) 369 (if (> (- current-y y) 50)
370 (+ y 100) 370 (+ y 100)
371 y))) 371 y)))
372 (string-to-int y-str))))) 372 (string-to-number y-str)))))
373 (if dd-name 373 (if dd-name
374 (mark-calendar-days-named 374 (mark-calendar-days-named
375 (cdr (assoc-string dd-name 375 (cdr (assoc-string dd-name
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index 305ecc1e9bc..45754110319 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -2574,7 +2574,7 @@ ERROR is t, otherwise just returns nil."
2574 (if (not (looking-at " ")) 2574 (if (not (looking-at " "))
2575 (re-search-backward "[^0-9]")) 2575 (re-search-backward "[^0-9]"))
2576 (list month 2576 (list month
2577 (string-to-int (buffer-substring (1+ (point)) (+ 4 (point)))) 2577 (string-to-number (buffer-substring (1+ (point)) (+ 4 (point))))
2578 year)) 2578 year))
2579 (if (looking-at "\\*") 2579 (if (looking-at "\\*")
2580 (save-excursion 2580 (save-excursion
@@ -2964,7 +2964,7 @@ calendar window has been prepared."
2964 (make-local-variable 'calendar-starred-day) 2964 (make-local-variable 'calendar-starred-day)
2965 (forward-char 1) 2965 (forward-char 1)
2966 (setq calendar-starred-day 2966 (setq calendar-starred-day
2967 (string-to-int 2967 (string-to-number
2968 (buffer-substring (point) (- (point) 2)))) 2968 (buffer-substring (point) (- (point) 2))))
2969 (delete-char -2) 2969 (delete-char -2)
2970 (insert "**") 2970 (insert "**")
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el
index 1832e0cd0fb..312b8841cf9 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -205,7 +205,7 @@ Valid TYPEs are: string, symbol, int, stringtnil, tnil."
205 (let (ret) 205 (let (ret)
206 (setq ret (cond ((eq type 'string) attrvalue) 206 (setq ret (cond ((eq type 'string) attrvalue)
207 ((eq type 'symbol) (read attrvalue)) 207 ((eq type 'symbol) (read attrvalue))
208 ((eq type 'int) (string-to-int attrvalue)) 208 ((eq type 'int) (string-to-number attrvalue))
209 ((eq type 'stringtnil) 209 ((eq type 'stringtnil)
210 (cond ((string= "t" attrvalue) t) 210 (cond ((string= "t" attrvalue) t)
211 ((string= "nil" attrvalue) nil) 211 ((string= "nil" attrvalue) nil)
@@ -908,13 +908,13 @@ diary entries."
908 (buffer-substring-no-properties 908 (buffer-substring-no-properties
909 (match-beginning m-name-pos) 909 (match-beginning m-name-pos)
910 (match-end m-name-pos)))) 910 (match-end m-name-pos))))
911 (mm (string-to-int 911 (mm (string-to-number
912 (if m-pos 912 (if m-pos
913 (buffer-substring-no-properties 913 (buffer-substring-no-properties
914 (match-beginning m-pos) 914 (match-beginning m-pos)
915 (match-end m-pos)) 915 (match-end m-pos))
916 ""))) 916 "")))
917 (dd (string-to-int 917 (dd (string-to-number
918 (if d-pos 918 (if d-pos
919 (buffer-substring-no-properties 919 (buffer-substring-no-properties
920 (match-beginning d-pos) 920 (match-beginning d-pos)
@@ -931,7 +931,7 @@ diary entries."
931 (let* ((current-y 931 (let* ((current-y
932 (extract-calendar-year 932 (extract-calendar-year
933 (calendar-current-date))) 933 (calendar-current-date)))
934 (y (+ (string-to-int y-str) 934 (y (+ (string-to-number y-str)
935 (* 100 935 (* 100
936 (/ current-y 100))))) 936 (/ current-y 100)))))
937 (if (> (- y current-y) 50) 937 (if (> (- y current-y) 50)
@@ -939,7 +939,7 @@ diary entries."
939 (if (> (- current-y y) 50) 939 (if (> (- current-y y) 50)
940 (+ y 100) 940 (+ y 100)
941 y))) 941 y)))
942 (string-to-int y-str)))) 942 (string-to-number y-str))))
943 (save-excursion 943 (save-excursion
944 (setq entry (buffer-substring-no-properties 944 (setq entry (buffer-substring-no-properties
945 (point) (line-end-position)) 945 (point) (line-end-position))
@@ -1149,22 +1149,22 @@ be used instead of a colon (:) to separate the hour and minute parts."
1149 (cond ((string-match ; Military time 1149 (cond ((string-match ; Military time
1150 "\\`[ \t\n\\^M]*\\([0-9]?[0-9]\\)[:.]?\\([0-9][0-9]\\)\\(\\>\\|[^ap]\\)" 1150 "\\`[ \t\n\\^M]*\\([0-9]?[0-9]\\)[:.]?\\([0-9][0-9]\\)\\(\\>\\|[^ap]\\)"
1151 s) 1151 s)
1152 (+ (* 100 (string-to-int 1152 (+ (* 100 (string-to-number
1153 (substring s (match-beginning 1) (match-end 1)))) 1153 (substring s (match-beginning 1) (match-end 1))))
1154 (string-to-int (substring s (match-beginning 2) (match-end 2))))) 1154 (string-to-number (substring s (match-beginning 2) (match-end 2)))))
1155 ((string-match ; Hour only XXam or XXpm 1155 ((string-match ; Hour only XXam or XXpm
1156 "\\`[ \t\n\\^M]*\\([0-9]?[0-9]\\)\\([ap]\\)m\\>" s) 1156 "\\`[ \t\n\\^M]*\\([0-9]?[0-9]\\)\\([ap]\\)m\\>" s)
1157 (+ (* 100 (% (string-to-int 1157 (+ (* 100 (% (string-to-number
1158 (substring s (match-beginning 1) (match-end 1))) 1158 (substring s (match-beginning 1) (match-end 1)))
1159 12)) 1159 12))
1160 (if (equal ?a (downcase (aref s (match-beginning 2)))) 1160 (if (equal ?a (downcase (aref s (match-beginning 2))))
1161 0 1200))) 1161 0 1200)))
1162 ((string-match ; Hour and minute XX:XXam or XX:XXpm 1162 ((string-match ; Hour and minute XX:XXam or XX:XXpm
1163 "\\`[ \t\n\\^M]*\\([0-9]?[0-9]\\)[:.]\\([0-9][0-9]\\)\\([ap]\\)m\\>" s) 1163 "\\`[ \t\n\\^M]*\\([0-9]?[0-9]\\)[:.]\\([0-9][0-9]\\)\\([ap]\\)m\\>" s)
1164 (+ (* 100 (% (string-to-int 1164 (+ (* 100 (% (string-to-number
1165 (substring s (match-beginning 1) (match-end 1))) 1165 (substring s (match-beginning 1) (match-end 1)))
1166 12)) 1166 12))
1167 (string-to-int (substring s (match-beginning 2) (match-end 2))) 1167 (string-to-number (substring s (match-beginning 2) (match-end 2)))
1168 (if (equal ?a (downcase (aref s (match-beginning 3)))) 1168 (if (equal ?a (downcase (aref s (match-beginning 3))))
1169 0 1200))) 1169 0 1200)))
1170 (t diary-unknown-time)))) ; Unrecognizable 1170 (t diary-unknown-time)))) ; Unrecognizable
diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el
index e1c4950b24b..8401aeb9bfd 100644
--- a/lisp/calendar/solar.el
+++ b/lisp/calendar/solar.el
@@ -227,7 +227,7 @@ Needed for polar areas, in order to know whether the day lasts 0 or 24 hours.")
227Returns nil if nothing was entered." 227Returns nil if nothing was entered."
228 (let ((x (read-string prompt ""))) 228 (let ((x (read-string prompt "")))
229 (if (not (string-equal x "")) 229 (if (not (string-equal x ""))
230 (string-to-int x)))) 230 (string-to-number x))))
231 231
232;; The condition-case stuff is needed to catch bogus arithmetic 232;; The condition-case stuff is needed to catch bogus arithmetic
233;; exceptions that occur on some machines (like Sparcs) 233;; exceptions that occur on some machines (like Sparcs)
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 0ce006af241..66150968e61 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -428,7 +428,7 @@ with a prefix argument."
428 (setq base-version-list ; there was a base version to which 428 (setq base-version-list ; there was a base version to which
429 (assoc (substring fn 0 start-vn) ; this looks like a 429 (assoc (substring fn 0 start-vn) ; this looks like a
430 dired-file-version-alist)) ; subversion 430 dired-file-version-alist)) ; subversion
431 (not (memq (string-to-int (substring fn (+ 2 start-vn))) 431 (not (memq (string-to-number (substring fn (+ 2 start-vn)))
432 base-version-list)) ; this one doesn't make the cut 432 base-version-list)) ; this one doesn't make the cut
433 (progn (beginning-of-line) 433 (progn (beginning-of-line)
434 (delete-char 1) 434 (delete-char 1)
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index 6b44b73b170..86c955650e8 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -1501,10 +1501,10 @@ to mark all zero length files."
1501 (if (looking-at dired-re-inode-size) 1501 (if (looking-at dired-re-inode-size)
1502 (progn 1502 (progn
1503 (goto-char (match-end 0)) 1503 (goto-char (match-end 0))
1504 (setq inode (string-to-int (buffer-substring (match-beginning 1) 1504 (setq inode (string-to-number (buffer-substring (match-beginning 1)
1505 (match-end 1))) 1505 (match-end 1)))
1506 s (string-to-int (buffer-substring (match-beginning 2) 1506 s (string-to-number (buffer-substring (match-beginning 2)
1507 (match-end 2))))) 1507 (match-end 2)))))
1508 (setq inode nil 1508 (setq inode nil
1509 s nil)) 1509 s nil))
1510 (setq mode (buffer-substring (point) (+ mode-len (point)))) 1510 (setq mode (buffer-substring (point) (+ mode-len (point))))
@@ -1516,10 +1516,10 @@ to mark all zero length files."
1516 (re-search-forward dired-move-to-filename-regexp) 1516 (re-search-forward dired-move-to-filename-regexp)
1517 (goto-char (match-beginning 1)) 1517 (goto-char (match-beginning 1))
1518 (forward-char -1) 1518 (forward-char -1)
1519 (setq size (string-to-int (buffer-substring (save-excursion 1519 (setq size (string-to-number (buffer-substring (save-excursion
1520 (backward-word 1) 1520 (backward-word 1)
1521 (setq pos (point))) 1521 (setq pos (point)))
1522 (point)))) 1522 (point))))
1523 (goto-char pos) 1523 (goto-char pos)
1524 (backward-word 1) 1524 (backward-word 1)
1525 ;; if no gid is displayed, gid will be set to uid 1525 ;; if no gid is displayed, gid will be set to uid
diff --git a/lisp/ediff-diff.el b/lisp/ediff-diff.el
index c41d733aaca..4c13e6fc0e1 100644
--- a/lisp/ediff-diff.el
+++ b/lisp/ediff-diff.el
@@ -393,20 +393,20 @@ one optional arguments, diff-number to refine.")
393 (ediff-with-current-buffer diff-buffer 393 (ediff-with-current-buffer diff-buffer
394 (goto-char (point-min)) 394 (goto-char (point-min))
395 (while (re-search-forward ediff-match-diff-line nil t) 395 (while (re-search-forward ediff-match-diff-line nil t)
396 (let* ((a-begin (string-to-int (buffer-substring (match-beginning 1) 396 (let* ((a-begin (string-to-number (buffer-substring (match-beginning 1)
397 (match-end 1)))) 397 (match-end 1))))
398 (a-end (let ((b (match-beginning 3)) 398 (a-end (let ((b (match-beginning 3))
399 (e (match-end 3))) 399 (e (match-end 3)))
400 (if b 400 (if b
401 (string-to-int (buffer-substring b e)) 401 (string-to-number (buffer-substring b e))
402 a-begin))) 402 a-begin)))
403 (diff-type (buffer-substring (match-beginning 4) (match-end 4))) 403 (diff-type (buffer-substring (match-beginning 4) (match-end 4)))
404 (b-begin (string-to-int (buffer-substring (match-beginning 5) 404 (b-begin (string-to-number (buffer-substring (match-beginning 5)
405 (match-end 5)))) 405 (match-end 5))))
406 (b-end (let ((b (match-beginning 7)) 406 (b-end (let ((b (match-beginning 7))
407 (e (match-end 7))) 407 (e (match-end 7)))
408 (if b 408 (if b
409 (string-to-int (buffer-substring b e)) 409 (string-to-number (buffer-substring b e))
410 b-begin))) 410 b-begin)))
411 a-begin-pt a-end-pt b-begin-pt b-end-pt 411 a-begin-pt a-end-pt b-begin-pt b-end-pt
412 c-begin c-end c-begin-pt c-end-pt) 412 c-begin c-end c-begin-pt c-end-pt)
@@ -934,16 +934,16 @@ delimiter regions"))
934 ;; it is a "c" group 934 ;; it is a "c" group
935 (if (match-beginning 2) 935 (if (match-beginning 2)
936 ;; it has two numbers 936 ;; it has two numbers
937 (list (string-to-int 937 (list (string-to-number
938 (buffer-substring (match-beginning 1) (match-end 1))) 938 (buffer-substring (match-beginning 1) (match-end 1)))
939 (1+ (string-to-int 939 (1+ (string-to-number
940 (buffer-substring (match-beginning 3) (match-end 3))))) 940 (buffer-substring (match-beginning 3) (match-end 3)))))
941 ;; it has one number 941 ;; it has one number
942 (let ((x (string-to-int 942 (let ((x (string-to-number
943 (buffer-substring (match-beginning 1) (match-end 1))))) 943 (buffer-substring (match-beginning 1) (match-end 1)))))
944 (list x (1+ x)))) 944 (list x (1+ x))))
945 ;; it is an "a" group 945 ;; it is an "a" group
946 (let ((x (1+ (string-to-int 946 (let ((x (1+ (string-to-number
947 (buffer-substring (match-beginning 1) (match-end 1)))))) 947 (buffer-substring (match-beginning 1) (match-end 1))))))
948 (list x x))))) 948 (list x x)))))
949 949
diff --git a/lisp/edmacro.el b/lisp/edmacro.el
index 67be9f34a15..939e275f1b9 100644
--- a/lisp/edmacro.el
+++ b/lisp/edmacro.el
@@ -280,7 +280,7 @@ or nil, use a compact 80-column format."
280 (let ((str (buffer-substring (match-beginning 1) 280 (let ((str (buffer-substring (match-beginning 1)
281 (match-end 1)))) 281 (match-end 1))))
282 (unless (equal str "") 282 (unless (equal str "")
283 (setq mac-counter (string-to-int str)))) 283 (setq mac-counter (string-to-number str))))
284 t) 284 t)
285 ((looking-at "Format:[ \t]*\"\\([^\n]*\\)\"[ \t]*$") 285 ((looking-at "Format:[ \t]*\"\\([^\n]*\\)\"[ \t]*$")
286 (when edmacro-store-hook 286 (when edmacro-store-hook
@@ -698,7 +698,7 @@ This function assumes that the events can be stored in a string."
698 (times 1)) 698 (times 1))
699 (setq pos (match-end 0)) 699 (setq pos (match-end 0))
700 (when (string-match "\\([0-9]+\\)\\*." word) 700 (when (string-match "\\([0-9]+\\)\\*." word)
701 (setq times (string-to-int (substring word 0 (match-end 1)))) 701 (setq times (string-to-number (substring word 0 (match-end 1))))
702 (setq word (substring word (1+ (match-end 1))))) 702 (setq word (substring word (1+ (match-end 1)))))
703 (cond ((string-match "^<<.+>>$" word) 703 (cond ((string-match "^<<.+>>$" word)
704 (setq key (vconcat (if (eq (key-binding [?\M-x]) 704 (setq key (vconcat (if (eq (key-binding [?\M-x])
diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el
index 701da1c4dec..a385a32935e 100644
--- a/lisp/emacs-lisp/lisp-mnt.el
+++ b/lisp/emacs-lisp/lisp-mnt.el
@@ -418,7 +418,7 @@ ISO-DATE non-nil means return the date in ISO 8601 format."
418 (format "%s-%s-%s" yyyy mm dd) 418 (format "%s-%s-%s" yyyy mm dd)
419 (format "%s %s %s" 419 (format "%s %s %s"
420 dd 420 dd
421 (nth (string-to-int mm) 421 (nth (string-to-number mm)
422 '("" "Jan" "Feb" "Mar" "Apr" "May" "Jun" 422 '("" "Jan" "Feb" "Mar" "Apr" "May" "Jun"
423 "Jul" "Aug" "Sep" "Oct" "Nov" "Dec")) 423 "Jul" "Aug" "Sep" "Oct" "Nov" "Dec"))
424 yyyy)))))) 424 yyyy))))))
diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el
index 1c8d12fef0e..a2aed39d00a 100644
--- a/lisp/emacs-lisp/re-builder.el
+++ b/lisp/emacs-lisp/re-builder.el
@@ -557,7 +557,7 @@ optional fourth argument FORCE is non-nil."
557 (interactive) 557 (interactive)
558 558
559 (setq reb-subexp-displayed 559 (setq reb-subexp-displayed
560 (or subexp (string-to-int (format "%c" last-command-char)))) 560 (or subexp (string-to-number (format "%c" last-command-char))))
561 (reb-update-modestring) 561 (reb-update-modestring)
562 (reb-do-update reb-subexp-displayed)) 562 (reb-do-update reb-subexp-displayed))
563 563
diff --git a/lisp/emerge.el b/lisp/emerge.el
index f9821111e71..1f105163f46 100644
--- a/lisp/emerge.el
+++ b/lisp/emerge.el
@@ -657,20 +657,20 @@ This is *not* a user option, since Emerge uses it for its own processing.")
657 diff-buffer 657 diff-buffer
658 (goto-char (point-min)) 658 (goto-char (point-min))
659 (while (re-search-forward emerge-match-diff-line nil t) 659 (while (re-search-forward emerge-match-diff-line nil t)
660 (let* ((a-begin (string-to-int (buffer-substring (match-beginning 1) 660 (let* ((a-begin (string-to-number (buffer-substring (match-beginning 1)
661 (match-end 1)))) 661 (match-end 1))))
662 (a-end (let ((b (match-beginning 3)) 662 (a-end (let ((b (match-beginning 3))
663 (e (match-end 3))) 663 (e (match-end 3)))
664 (if b 664 (if b
665 (string-to-int (buffer-substring b e)) 665 (string-to-number (buffer-substring b e))
666 a-begin))) 666 a-begin)))
667 (diff-type (buffer-substring (match-beginning 4) (match-end 4))) 667 (diff-type (buffer-substring (match-beginning 4) (match-end 4)))
668 (b-begin (string-to-int (buffer-substring (match-beginning 5) 668 (b-begin (string-to-number (buffer-substring (match-beginning 5)
669 (match-end 5)))) 669 (match-end 5))))
670 (b-end (let ((b (match-beginning 7)) 670 (b-end (let ((b (match-beginning 7))
671 (e (match-end 7))) 671 (e (match-end 7)))
672 (if b 672 (if b
673 (string-to-int (buffer-substring b e)) 673 (string-to-number (buffer-substring b e))
674 b-begin)))) 674 b-begin))))
675 ;; fix the beginning and end numbers, because diff is somewhat 675 ;; fix the beginning and end numbers, because diff is somewhat
676 ;; strange about how it numbers lines 676 ;; strange about how it numbers lines
@@ -862,16 +862,16 @@ This is *not* a user option, since Emerge uses it for its own processing.")
862 ;; it is a "c" group 862 ;; it is a "c" group
863 (if (match-beginning 2) 863 (if (match-beginning 2)
864 ;; it has two numbers 864 ;; it has two numbers
865 (list (string-to-int 865 (list (string-to-number
866 (buffer-substring (match-beginning 1) (match-end 1))) 866 (buffer-substring (match-beginning 1) (match-end 1)))
867 (1+ (string-to-int 867 (1+ (string-to-number
868 (buffer-substring (match-beginning 3) (match-end 3))))) 868 (buffer-substring (match-beginning 3) (match-end 3)))))
869 ;; it has one number 869 ;; it has one number
870 (let ((x (string-to-int 870 (let ((x (string-to-number
871 (buffer-substring (match-beginning 1) (match-end 1))))) 871 (buffer-substring (match-beginning 1) (match-end 1)))))
872 (list x (1+ x)))) 872 (list x (1+ x))))
873 ;; it is an "a" group 873 ;; it is an "a" group
874 (let ((x (1+ (string-to-int 874 (let ((x (1+ (string-to-number
875 (buffer-substring (match-beginning 1) (match-end 1)))))) 875 (buffer-substring (match-beginning 1) (match-end 1))))))
876 (list x x))))) 876 (list x x)))))
877 877
diff --git a/lisp/emulation/edt.el b/lisp/emulation/edt.el
index ff0298e9a17..01f0af6f307 100644
--- a/lisp/emulation/edt.el
+++ b/lisp/emulation/edt.el
@@ -1256,16 +1256,16 @@ Argument BOTTOM is the bottom margin in number of lines or percent of window."
1256 ;; set top scroll margin 1256 ;; set top scroll margin
1257 (or (string= top "") 1257 (or (string= top "")
1258 (if (string= "%" (substring top -1)) 1258 (if (string= "%" (substring top -1))
1259 (setq edt-top-scroll-margin (string-to-int top)) 1259 (setq edt-top-scroll-margin (string-to-number top))
1260 (setq edt-top-scroll-margin 1260 (setq edt-top-scroll-margin
1261 (/ (1- (+ (* (string-to-int top) 100) (window-height))) 1261 (/ (1- (+ (* (string-to-number top) 100) (window-height)))
1262 (window-height))))) 1262 (window-height)))))
1263 ;; set bottom scroll margin 1263 ;; set bottom scroll margin
1264 (or (string= bottom "") 1264 (or (string= bottom "")
1265 (if (string= "%" (substring bottom -1)) 1265 (if (string= "%" (substring bottom -1))
1266 (setq edt-bottom-scroll-margin (string-to-int bottom)) 1266 (setq edt-bottom-scroll-margin (string-to-number bottom))
1267 (setq edt-bottom-scroll-margin 1267 (setq edt-bottom-scroll-margin
1268 (/ (1- (+ (* (string-to-int bottom) 100) (window-height))) 1268 (/ (1- (+ (* (string-to-number bottom) 100) (window-height)))
1269 (window-height))))) 1269 (window-height)))))
1270 ;; report scroll margin settings if running interactively 1270 ;; report scroll margin settings if running interactively
1271 (and (interactive-p) 1271 (and (interactive-p)
diff --git a/lisp/emulation/tpu-extras.el b/lisp/emulation/tpu-extras.el
index ced88ff3fdf..9c417dd3a40 100644
--- a/lisp/emulation/tpu-extras.el
+++ b/lisp/emulation/tpu-extras.el
@@ -440,16 +440,16 @@ version that respects the bottom scroll margin."
440 ;; set top scroll margin 440 ;; set top scroll margin
441 (or (string= top "") 441 (or (string= top "")
442 (if (string= "%" (substring top -1)) 442 (if (string= "%" (substring top -1))
443 (setq tpu-top-scroll-margin (string-to-int top)) 443 (setq tpu-top-scroll-margin (string-to-number top))
444 (setq tpu-top-scroll-margin 444 (setq tpu-top-scroll-margin
445 (/ (1- (+ (* (string-to-int top) 100) (window-height))) 445 (/ (1- (+ (* (string-to-number top) 100) (window-height)))
446 (window-height))))) 446 (window-height)))))
447 ;; set bottom scroll margin 447 ;; set bottom scroll margin
448 (or (string= bottom "") 448 (or (string= bottom "")
449 (if (string= "%" (substring bottom -1)) 449 (if (string= "%" (substring bottom -1))
450 (setq tpu-bottom-scroll-margin (string-to-int bottom)) 450 (setq tpu-bottom-scroll-margin (string-to-number bottom))
451 (setq tpu-bottom-scroll-margin 451 (setq tpu-bottom-scroll-margin
452 (/ (1- (+ (* (string-to-int bottom) 100) (window-height))) 452 (/ (1- (+ (* (string-to-number bottom) 100) (window-height)))
453 (window-height))))) 453 (window-height)))))
454 ;; report scroll margin settings if running interactively 454 ;; report scroll margin settings if running interactively
455 (and (interactive-p) 455 (and (interactive-p)
diff --git a/lisp/emulation/vip.el b/lisp/emulation/vip.el
index af878085ba8..19f08d54989 100644
--- a/lisp/emulation/vip.el
+++ b/lisp/emulation/vip.el
@@ -2177,7 +2177,7 @@ a token has type \(command, address, end-mark\) and value."
2177 (cond ((string= ex-token-type "plus") "add-number") 2177 (cond ((string= ex-token-type "plus") "add-number")
2178 ((string= ex-token-type "minus") "sub-number") 2178 ((string= ex-token-type "minus") "sub-number")
2179 (t "abs-number"))) 2179 (t "abs-number")))
2180 (setq ex-token (string-to-int (buffer-substring (point) (mark))))) 2180 (setq ex-token (string-to-number (buffer-substring (point) (mark)))))
2181 ((looking-at "\\$") 2181 ((looking-at "\\$")
2182 (forward-char 1) 2182 (forward-char 1)
2183 (setq ex-token-type "end")) 2183 (setq ex-token-type "end"))
@@ -2471,7 +2471,7 @@ a token has type \(command, address, end-mark\) and value."
2471 (progn 2471 (progn
2472 (set-mark (point)) 2472 (set-mark (point))
2473 (re-search-forward "[0-9][0-9]*") 2473 (re-search-forward "[0-9][0-9]*")
2474 (setq ex-count (string-to-int (buffer-substring (point) (mark)))) 2474 (setq ex-count (string-to-number (buffer-substring (point) (mark))))
2475 (skip-chars-forward " \t"))) 2475 (skip-chars-forward " \t")))
2476 (if (looking-at "[pl#]") 2476 (if (looking-at "[pl#]")
2477 (progn 2477 (progn
@@ -2496,7 +2496,7 @@ a token has type \(command, address, end-mark\) and value."
2496 (progn 2496 (progn
2497 (set-mark (point)) 2497 (set-mark (point))
2498 (re-search-forward "[0-9][0-9]*") 2498 (re-search-forward "[0-9][0-9]*")
2499 (setq ex-count (string-to-int (buffer-substring (point) (mark)))) 2499 (setq ex-count (string-to-number (buffer-substring (point) (mark))))
2500 (skip-chars-forward " \t"))) 2500 (skip-chars-forward " \t")))
2501 (if (looking-at "[pl#]") 2501 (if (looking-at "[pl#]")
2502 (progn 2502 (progn
diff --git a/lisp/emulation/viper-ex.el b/lisp/emulation/viper-ex.el
index 90b006ffb65..9f33bdbad53 100644
--- a/lisp/emulation/viper-ex.el
+++ b/lisp/emulation/viper-ex.el
@@ -434,7 +434,7 @@ reversed."
434 ((eq ex-token-type 'minus) 'sub-number) 434 ((eq ex-token-type 'minus) 'sub-number)
435 (t 'abs-number))) 435 (t 'abs-number)))
436 (setq ex-token 436 (setq ex-token
437 (string-to-int (buffer-substring (point) (mark t))))) 437 (string-to-number (buffer-substring (point) (mark t)))))
438 ((looking-at "\\$") 438 ((looking-at "\\$")
439 (forward-char 1) 439 (forward-char 1)
440 (setq ex-token-type 'end)) 440 (setq ex-token-type 'end))
@@ -912,7 +912,7 @@ reversed."
912 (progn 912 (progn
913 (set-mark (point)) 913 (set-mark (point))
914 (re-search-forward "[0-9][0-9]*") 914 (re-search-forward "[0-9][0-9]*")
915 (setq ex-count (string-to-int (buffer-substring (point) (mark t)))) 915 (setq ex-count (string-to-number (buffer-substring (point) (mark t))))
916 (skip-chars-forward " \t"))) 916 (skip-chars-forward " \t")))
917 (if (looking-at "[pl#]") 917 (if (looking-at "[pl#]")
918 (progn 918 (progn
@@ -938,7 +938,7 @@ reversed."
938 (progn 938 (progn
939 (set-mark (point)) 939 (set-mark (point))
940 (re-search-forward "[0-9][0-9]*") 940 (re-search-forward "[0-9][0-9]*")
941 (setq ex-count (string-to-int (buffer-substring (point) (mark t)))) 941 (setq ex-count (string-to-number (buffer-substring (point) (mark t))))
942 (skip-chars-forward " \t"))) 942 (skip-chars-forward " \t")))
943 (if (looking-at "[pl#]") 943 (if (looking-at "[pl#]")
944 (progn 944 (progn
@@ -1490,7 +1490,7 @@ reversed."
1490 (progn 1490 (progn
1491 (ex-edit t) 1491 (ex-edit t)
1492 (throw 'ex-edit nil)) 1492 (throw 'ex-edit nil))
1493 (setq count (string-to-int ex-file)) 1493 (setq count (string-to-number ex-file))
1494 (if (= count 0) (setq count 1)) 1494 (if (= count 0) (setq count 1))
1495 (if (< count 0) (error "Usage: `next <count>' (count >= 0)")))) 1495 (if (< count 0) (error "Usage: `next <count>' (count >= 0)"))))
1496 (setq count 1)) 1496 (setq count 1))
diff --git a/lisp/faces.el b/lisp/faces.el
index 6b3811a3d26..6f8f3336450 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -1014,7 +1014,7 @@ name of the attribute for prompting. Value is the new attribute value."
1014 ((member new-value '("unspecified-fg" "unspecified-bg")) 1014 ((member new-value '("unspecified-fg" "unspecified-bg"))
1015 new-value) 1015 new-value)
1016 (t 1016 (t
1017 (string-to-int new-value))))) 1017 (string-to-number new-value)))))
1018 1018
1019 1019
1020(defun read-face-attribute (face attribute &optional frame) 1020(defun read-face-attribute (face attribute &optional frame)
diff --git a/lisp/files.el b/lisp/files.el
index 5cfb49307a5..d519f041152 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2988,7 +2988,7 @@ Uses the free variable `backup-extract-version-start', whose value should be
2988the index in the name where the version number begins." 2988the index in the name where the version number begins."
2989 (if (and (string-match "[0-9]+~$" fn backup-extract-version-start) 2989 (if (and (string-match "[0-9]+~$" fn backup-extract-version-start)
2990 (= (match-beginning 0) backup-extract-version-start)) 2990 (= (match-beginning 0) backup-extract-version-start))
2991 (string-to-int (substring fn backup-extract-version-start -1)) 2991 (string-to-number (substring fn backup-extract-version-start -1))
2992 0)) 2992 0))
2993 2993
2994;; I believe there is no need to alter this behavior for VMS; 2994;; 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
4552 (if (string-match "ls (.*utils) \\([0-9.]*\\)$" version-out) 4552 (if (string-match "ls (.*utils) \\([0-9.]*\\)$" version-out)
4553 (let* ((version (match-string 1 version-out)) 4553 (let* ((version (match-string 1 version-out))
4554 (split (split-string version "[.]")) 4554 (split (split-string version "[.]"))
4555 (numbers (mapcar 'string-to-int split)) 4555 (numbers (mapcar 'string-to-number split))
4556 (min '(5 2 1)) 4556 (min '(5 2 1))
4557 comparison) 4557 comparison)
4558 (while (and (not comparison) (or numbers min)) 4558 (while (and (not comparison) (or numbers min))
diff --git a/lisp/hexl.el b/lisp/hexl.el
index 99bbda91c6c..35674e1d10a 100644
--- a/lisp/hexl.el
+++ b/lisp/hexl.el
@@ -874,7 +874,7 @@ Embedded whitespace, dashes, and periods in the string are ignored."
874(defun hexl-insert-decimal-char (arg) 874(defun hexl-insert-decimal-char (arg)
875 "Insert a character given by its decimal code ARG times at point." 875 "Insert a character given by its decimal code ARG times at point."
876 (interactive "p") 876 (interactive "p")
877 (let ((num (string-to-int (read-string "Decimal Number: ")))) 877 (let ((num (string-to-number (read-string "Decimal Number: "))))
878 (if (< num 0) 878 (if (< num 0)
879 (error "Decimal number out of range") 879 (error "Decimal number out of range")
880 (hexl-insert-multibyte-char num arg)))) 880 (hexl-insert-multibyte-char num arg))))
diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el
index c67030ac067..863cc99c4db 100644
--- a/lisp/international/fontset.el
+++ b/lisp/international/fontset.el
@@ -492,7 +492,7 @@ with \"fontset\" in `<CHARSET_REGISTRY> field."
492 name) 492 name)
493 (if (not (string= "fontset" charset)) 493 (if (not (string= "fontset" charset))
494 fontset 494 fontset
495 (if (> (string-to-int size) 0) 495 (if (> (string-to-number size) 0)
496 (setq name (format "%s: %s-dot" nickname size)) 496 (setq name (format "%s: %s-dot" nickname size))
497 (setq name nickname)) 497 (setq name nickname))
498 (cond ((string-match "^medium$" weight) 498 (cond ((string-match "^medium$" weight)
diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el
index 3d1b1951421..7c7265ac8c9 100644
--- a/lisp/mail/feedmail.el
+++ b/lisp/mail/feedmail.el
@@ -1835,7 +1835,7 @@ the counts."
1835 (setq blobbet (file-name-nondirectory blobby)) 1835 (setq blobbet (file-name-nondirectory blobby))
1836 (if (string-match "^[0-9][0-9][0-9]-" blobbet) 1836 (if (string-match "^[0-9][0-9][0-9]-" blobbet)
1837 (let ((water-mark)) 1837 (let ((water-mark))
1838 (setq water-mark (string-to-int (substring blobbet 0 3))) 1838 (setq water-mark (string-to-number (substring blobbet 0 3)))
1839 (if (> water-mark high-water) (setq high-water water-mark)))) 1839 (if (> water-mark high-water) (setq high-water water-mark))))
1840 (setq q-cnt (1+ q-cnt))) 1840 (setq q-cnt (1+ q-cnt)))
1841 (t (setq q-oth (1+ q-oth))) 1841 (t (setq q-oth (1+ q-oth)))
diff --git a/lisp/mail/mailalias.el b/lisp/mail/mailalias.el
index b520841db3d..88f166707c3 100644
--- a/lisp/mail/mailalias.el
+++ b/lisp/mail/mailalias.el
@@ -449,7 +449,7 @@ PATTERN is the string we want to complete."
449 (add-to-list 'mail-local-names 449 (add-to-list 'mail-local-names
450 (cons (match-string 1) 450 (cons (match-string 1)
451 (user-full-name 451 (user-full-name
452 (string-to-int (match-string 2)))))) 452 (string-to-number (match-string 2))))))
453 (beginning-of-line 2)) 453 (beginning-of-line 2))
454 (kill-buffer (current-buffer)))) 454 (kill-buffer (current-buffer))))
455 (if (or (eq mail-names t) 455 (if (or (eq mail-names t)
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 8ba9408a76f..c68bb80d80f 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -1990,7 +1990,7 @@ is non-nil if the user has supplied the password interactively.
1990 header-end t) 1990 header-end t)
1991 (let ((beg (point)) 1991 (let ((beg (point))
1992 (eol (progn (end-of-line) (point)))) 1992 (eol (progn (end-of-line) (point))))
1993 (string-to-int (buffer-substring beg eol))))))) 1993 (string-to-number (buffer-substring beg eol)))))))
1994 (and size 1994 (and size
1995 (if (and (natnump size) 1995 (if (and (natnump size)
1996 (<= (+ header-end size) (point-max)) 1996 (<= (+ header-end size) (point-max))
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index a49b47453d8..f551239907d 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -375,17 +375,17 @@ Setting this variable has an effect only before reading a mail."
375 (cond ((re-search-forward "\\([^0-9:]\\)\\([0-3]?[0-9]\\)\\([- \t_]+\\)\\([adfjmnos][aceopu][bcglnprtvy]\\)" 375 (cond ((re-search-forward "\\([^0-9:]\\)\\([0-3]?[0-9]\\)\\([- \t_]+\\)\\([adfjmnos][aceopu][bcglnprtvy]\\)"
376 (save-excursion (end-of-line) (point)) t) 376 (save-excursion (end-of-line) (point)) t)
377 (format "%2d-%3s" 377 (format "%2d-%3s"
378 (string-to-int (buffer-substring 378 (string-to-number (buffer-substring
379 (match-beginning 2) 379 (match-beginning 2)
380 (match-end 2))) 380 (match-end 2)))
381 (buffer-substring 381 (buffer-substring
382 (match-beginning 4) (match-end 4)))) 382 (match-beginning 4) (match-end 4))))
383 ((re-search-forward "\\([^a-z]\\)\\([adfjmnos][acepou][bcglnprtvy]\\)\\([-a-z \t_]*\\)\\([0-9][0-9]?\\)" 383 ((re-search-forward "\\([^a-z]\\)\\([adfjmnos][acepou][bcglnprtvy]\\)\\([-a-z \t_]*\\)\\([0-9][0-9]?\\)"
384 (save-excursion (end-of-line) (point)) t) 384 (save-excursion (end-of-line) (point)) t)
385 (format "%2d-%3s" 385 (format "%2d-%3s"
386 (string-to-int (buffer-substring 386 (string-to-number (buffer-substring
387 (match-beginning 4) 387 (match-beginning 4)
388 (match-end 4))) 388 (match-end 4)))
389 (buffer-substring 389 (buffer-substring
390 (match-beginning 2) (match-end 2)))) 390 (match-beginning 2) (match-end 2))))
391 ((re-search-forward "\\(19\\|20\\)\\([0-9][0-9]\\)-\\([01][0-9]\\)-\\([0-3][0-9]\\)" 391 ((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."
580 ;; Advance thru summary. 580 ;; Advance thru summary.
581 (forward-line (if forward 1 -1)) 581 (forward-line (if forward 1 -1))
582 ;; Get msg number of this line. 582 ;; Get msg number of this line.
583 (setq i (string-to-int 583 (setq i (string-to-number
584 (buffer-substring (point) 584 (buffer-substring (point)
585 (min (point-max) (+ 6 (point)))))) 585 (min (point-max) (+ 6 (point))))))
586 ;; See if that msg has desired subject. 586 ;; See if that msg has desired subject.
@@ -791,10 +791,10 @@ Search, the `unseen' attribute is restored.")
791 (forward-line -1)) 791 (forward-line -1))
792 (beginning-of-line) 792 (beginning-of-line)
793 (skip-chars-forward " ") 793 (skip-chars-forward " ")
794 (let ((msg-num (string-to-int (buffer-substring 794 (let ((msg-num (string-to-number (buffer-substring
795 (point) 795 (point)
796 (progn (skip-chars-forward "0-9") 796 (progn (skip-chars-forward "0-9")
797 (point)))))) 797 (point))))))
798 ;; Always leave `unseen' removed 798 ;; Always leave `unseen' removed
799 ;; if we get out of isearch mode. 799 ;; if we get out of isearch mode.
800 ;; Don't let a subsequent isearch restore that `unseen'. 800 ;; Don't let a subsequent isearch restore that `unseen'.
@@ -1061,7 +1061,7 @@ If SKIP-RMAIL, don't do anything to the Rmail buffer."
1061 (buf rmail-buffer) 1061 (buf rmail-buffer)
1062 (cur (point)) 1062 (cur (point))
1063 message-not-found 1063 message-not-found
1064 (curmsg (string-to-int 1064 (curmsg (string-to-number
1065 (buffer-substring (point) 1065 (buffer-substring (point)
1066 (min (point-max) (+ 6 (point)))))) 1066 (min (point-max) (+ 6 (point))))))
1067 (total (save-excursion (set-buffer buf) rmail-total-messages))) 1067 (total (save-excursion (set-buffer buf) rmail-total-messages)))
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index 605af6cdbe7..3cf17f8968d 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -822,7 +822,7 @@ This is relative to `smtpmail-queue-dir'.")
822 nil 822 nil
823 (setq response-continue nil) 823 (setq response-continue nil)
824 (setq return-value 824 (setq return-value
825 (cons (string-to-int 825 (cons (string-to-number
826 (buffer-substring begin end)) 826 (buffer-substring begin end))
827 (nreverse response-strings))))) 827 (nreverse response-strings)))))
828 828
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index 8b4ed89e7b0..98e1bbf68f2 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -2109,7 +2109,7 @@ suffix of the form #PORT to specify a non-default port"
2109 (line (cdr status))) 2109 (line (cdr status)))
2110 (save-match-data 2110 (save-match-data
2111 (if (string-match ange-ftp-hash-mark-msgs line) 2111 (if (string-match ange-ftp-hash-mark-msgs line)
2112 (let ((size (string-to-int (match-string 1 line)))) 2112 (let ((size (string-to-number (match-string 1 line))))
2113 (setq ange-ftp-ascii-hash-mark-size size 2113 (setq ange-ftp-ascii-hash-mark-size size
2114 ange-ftp-hash-mark-unit (ash size -4)) 2114 ange-ftp-hash-mark-unit (ash size -4))
2115 2115
@@ -5082,7 +5082,7 @@ Other orders of $ and _ seem to all work just fine.")
5082 (and (string-match regexp name) 5082 (and (string-match regexp name)
5083 (setq version 5083 (setq version
5084 (max version 5084 (max version
5085 (string-to-int (match-string 1 name)))))) 5085 (string-to-number (match-string 1 name))))))
5086 files) 5086 files)
5087 (setq version (1+ version)) 5087 (setq version (1+ version))
5088 (puthash 5088 (puthash
diff --git a/lisp/play/gametree.el b/lisp/play/gametree.el
index f79ded4955e..abab58d6018 100644
--- a/lisp/play/gametree.el
+++ b/lisp/play/gametree.el
@@ -204,12 +204,12 @@ should be no leading white space."
204 gametree-half-ply-regexp "\\)")) 204 gametree-half-ply-regexp "\\)"))
205 (limit (save-excursion (beginning-of-line 1) (point)))) 205 (limit (save-excursion (beginning-of-line 1) (point))))
206 (if (looking-at boundary) 206 (if (looking-at boundary)
207 (+ (* 2 (string-to-int (match-string 1))) 207 (+ (* 2 (string-to-number (match-string 1)))
208 (if (string-match gametree-half-ply-regexp (match-string 2)) 1 0)) 208 (if (string-match gametree-half-ply-regexp (match-string 2)) 1 0))
209 (save-excursion 209 (save-excursion
210 (re-search-backward boundary limit) 210 (re-search-backward boundary limit)
211 (skip-chars-backward "0123456789") 211 (skip-chars-backward "0123456789")
212 (1+ (* 2 (string-to-int 212 (1+ (* 2 (string-to-number
213 (buffer-substring (point) (match-end 1)))))))))) 213 (buffer-substring (point) (match-end 1))))))))))
214 214
215(defun gametree-current-branch-ply () 215(defun gametree-current-branch-ply ()
@@ -345,7 +345,7 @@ This value is simply the outline heading level of the current line."
345 "Return score of current variation according to its score tag. 345 "Return score of current variation according to its score tag.
346When no score tag is present, use the value of `gametree-default-score'." 346When no score tag is present, use the value of `gametree-default-score'."
347 (if (looking-at gametree-score-regexp) 347 (if (looking-at gametree-score-regexp)
348 (string-to-int (match-string 3)) 348 (string-to-number (match-string 3))
349 gametree-default-score)) 349 gametree-default-score))
350 350
351(defun gametree-compute-reduced-score () 351(defun gametree-compute-reduced-score ()
diff --git a/lisp/progmodes/ada-xref.el b/lisp/progmodes/ada-xref.el
index e7eb0657eac..8dba21afe9b 100644
--- a/lisp/progmodes/ada-xref.el
+++ b/lisp/progmodes/ada-xref.el
@@ -672,7 +672,7 @@ file. If none is set, return nil."
672 (not (integerp choice)) 672 (not (integerp choice))
673 (< choice 1) 673 (< choice 1)
674 (> choice (length prj-files))) 674 (> choice (length prj-files)))
675 (setq choice (string-to-int 675 (setq choice (string-to-number
676 (read-from-minibuffer "Enter No. of your choice: ")))) 676 (read-from-minibuffer "Enter No. of your choice: "))))
677 (set 'selected (nth (1- choice) prj-files)))) 677 (set 'selected (nth (1- choice) prj-files))))
678 678
@@ -1800,7 +1800,7 @@ This function is disabled for operators, and only works for identifiers."
1800 (< choice 1) 1800 (< choice 1)
1801 (> choice len)) 1801 (> choice len))
1802 (setq choice 1802 (setq choice
1803 (string-to-int 1803 (string-to-number
1804 (read-from-minibuffer "Enter No. of your choice: ")))) 1804 (read-from-minibuffer "Enter No. of your choice: "))))
1805 ) 1805 )
1806 (set-buffer ali-buffer) 1806 (set-buffer ali-buffer)
@@ -1988,7 +1988,7 @@ is using."
1988 (< choice 1) 1988 (< choice 1)
1989 (> choice (length list))) 1989 (> choice (length list)))
1990 (setq choice 1990 (setq choice
1991 (string-to-int 1991 (string-to-number
1992 (read-from-minibuffer "Enter No. of your choice: ")))) 1992 (read-from-minibuffer "Enter No. of your choice: "))))
1993 ) 1993 )
1994 (set 'choice (1- choice)) 1994 (set 'choice (1- choice))
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index e32a43ede9e..436bc04d044 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -120,7 +120,7 @@
120 ;; Probably will not work due to some save-excursion??? 120 ;; Probably will not work due to some save-excursion???
121 ;; Or save-file-position? 121 ;; Or save-file-position?
122 ;; (message "Did I get to line %s?" (elt (, elt) 1)) 122 ;; (message "Did I get to line %s?" (elt (, elt) 1))
123 `(goto-line (string-to-int (elt ,elt 1)))) 123 `(goto-line (string-to-number (elt ,elt 1))))
124 ;;) 124 ;;)
125 (defmacro cperl-etags-goto-tag-location (elt) 125 (defmacro cperl-etags-goto-tag-location (elt)
126 `(etags-goto-tag-location ,elt)))) 126 `(etags-goto-tag-location ,elt))))
diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el
index 457c00d9008..6dd15897e7b 100644
--- a/lisp/progmodes/ebrowse.el
+++ b/lisp/progmodes/ebrowse.el
@@ -1448,10 +1448,10 @@ Pop to member buffer if no prefix ARG, to tree buffer otherwise."
1448(defun ebrowse-set-tree-indentation () 1448(defun ebrowse-set-tree-indentation ()
1449 "Set the indentation width of the tree display." 1449 "Set the indentation width of the tree display."
1450 (interactive) 1450 (interactive)
1451 (let ((width (string-to-int (read-from-minibuffer 1451 (let ((width (string-to-number (read-from-minibuffer
1452 (concat "Indentation (" 1452 (concat "Indentation ("
1453 (int-to-string ebrowse--indentation) 1453 (int-to-string ebrowse--indentation)
1454 "): "))))) 1454 "): ")))))
1455 (when (plusp width) 1455 (when (plusp width)
1456 (setf ebrowse--indentation width) 1456 (setf ebrowse--indentation width)
1457 (ebrowse-redraw-tree)))) 1457 (ebrowse-redraw-tree))))
@@ -2329,7 +2329,7 @@ With prefix ARG, switch to the tree buffer else pop to it."
2329 "Set the column width of the member display. 2329 "Set the column width of the member display.
2330The new width is read from the minibuffer." 2330The new width is read from the minibuffer."
2331 (interactive) 2331 (interactive)
2332 (let ((width (string-to-int 2332 (let ((width (string-to-number
2333 (read-from-minibuffer 2333 (read-from-minibuffer
2334 (concat "Column width (" 2334 (concat "Column width ("
2335 (int-to-string (if ebrowse--long-display-flag 2335 (int-to-string (if ebrowse--long-display-flag
@@ -4313,7 +4313,7 @@ NUMBER-OF-STATIC-VARIABLES:"
4313 "Select the nth entry in the list by the keys 1..9." 4313 "Select the nth entry in the list by the keys 1..9."
4314 (interactive) 4314 (interactive)
4315 (let* ((maxlin (count-lines (point-min) (point-max))) 4315 (let* ((maxlin (count-lines (point-min) (point-max)))
4316 (n (min maxlin (+ 2 (string-to-int (this-command-keys)))))) 4316 (n (min maxlin (+ 2 (string-to-number (this-command-keys))))))
4317 (goto-line n) 4317 (goto-line n)
4318 (throw 'electric-buffer-menu-select (point)))) 4318 (throw 'electric-buffer-menu-select (point))))
4319 4319
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index 0569d26db61..32ede0e1474 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -1283,16 +1283,16 @@ where they were found."
1283 1283
1284 1284
1285 (if (looking-at "[0-9]") 1285 (if (looking-at "[0-9]")
1286 (setq line (string-to-int (buffer-substring 1286 (setq line (string-to-number (buffer-substring
1287 (point) 1287 (point)
1288 (progn (skip-chars-forward "0-9") 1288 (progn (skip-chars-forward "0-9")
1289 (point)))))) 1289 (point))))))
1290 (search-forward ",") 1290 (search-forward ",")
1291 (if (looking-at "[0-9]") 1291 (if (looking-at "[0-9]")
1292 (setq startpos (string-to-int (buffer-substring 1292 (setq startpos (string-to-number (buffer-substring
1293 (point) 1293 (point)
1294 (progn (skip-chars-forward "0-9") 1294 (progn (skip-chars-forward "0-9")
1295 (point))))))) 1295 (point)))))))
1296 ;; Leave point on the next line of the tags file. 1296 ;; Leave point on the next line of the tags file.
1297 (forward-line 1) 1297 (forward-line 1)
1298 (cons tag-text (cons line startpos)))) 1298 (cons tag-text (cons line startpos))))
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index a2fa660bff0..5463ee3ffa9 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -1004,7 +1004,7 @@ Return its components if so, nil if no."
1004 (line-idx (nth 2 (car patterns)))) 1004 (line-idx (nth 2 (car patterns))))
1005 1005
1006 (setq raw-file-name (if file-idx (match-string file-idx line) nil)) 1006 (setq raw-file-name (if file-idx (match-string file-idx line) nil))
1007 (setq line-no (if line-idx (string-to-int (match-string line-idx line)) 0)) 1007 (setq line-no (if line-idx (string-to-number (match-string line-idx line)) 0))
1008 (setq err-text (if (> (length (car patterns)) 4) 1008 (setq err-text (if (> (length (car patterns)) 4)
1009 (match-string (nth 4 (car patterns)) line) 1009 (match-string (nth 4 (car patterns)) line)
1010 (flymake-patch-err-text (substring line (match-end 0))))) 1010 (flymake-patch-err-text (substring line (match-end 0)))))
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el
index 221a6f4aebb..77244819f1b 100644
--- a/lisp/progmodes/idlw-shell.el
+++ b/lisp/progmodes/idlw-shell.el
@@ -45,7 +45,7 @@
45;; 45;;
46;; INSTALLATION: 46;; INSTALLATION:
47;; ============= 47;; =============
48;; 48;;
49;; Follow the instructions in the INSTALL file of the distribution. 49;; Follow the instructions in the INSTALL file of the distribution.
50;; In short, put this file on your load path and add the following 50;; In short, put this file on your load path and add the following
51;; lines to your .emacs file: 51;; lines to your .emacs file:
@@ -58,9 +58,9 @@
58;; 58;;
59;; The newest version of this file can be found on the maintainers 59;; The newest version of this file can be found on the maintainers
60;; web site. 60;; web site.
61;; 61;;
62;; http://idlwave.org 62;; http://idlwave.org
63;; 63;;
64;; DOCUMENTATION 64;; DOCUMENTATION
65;; ============= 65;; =============
66;; 66;;
@@ -77,7 +77,7 @@
77;; it is a bug in XEmacs. 77;; it is a bug in XEmacs.
78;; The Debug menu in source buffers *does* display the bindings correctly. 78;; The Debug menu in source buffers *does* display the bindings correctly.
79;; 79;;
80;; 80;;
81;; CUSTOMIZATION VARIABLES 81;; CUSTOMIZATION VARIABLES
82;; ======================= 82;; =======================
83;; 83;;
@@ -101,12 +101,12 @@
101 (condition-case () (require 'custom) (error nil)) 101 (condition-case () (require 'custom) (error nil))
102 (if (and (featurep 'custom) 102 (if (and (featurep 'custom)
103 (fboundp 'custom-declare-variable) 103 (fboundp 'custom-declare-variable)
104 (fboundp 'defface)) 104 (fboundp 'defface))
105 ;; We've got what we needed 105 ;; We've got what we needed
106 (setq idlwave-shell-have-new-custom t) 106 (setq idlwave-shell-have-new-custom t)
107 ;; We have the old or no custom-library, hack around it! 107 ;; We have the old or no custom-library, hack around it!
108 (defmacro defgroup (&rest args) nil) 108 (defmacro defgroup (&rest args) nil)
109 (defmacro defcustom (var value doc &rest args) 109 (defmacro defcustom (var value doc &rest args)
110 `(defvar ,var ,value ,doc)))) 110 `(defvar ,var ,value ,doc))))
111 111
112;;; Customizations: idlwave-shell group 112;;; Customizations: idlwave-shell group
@@ -118,10 +118,10 @@
118 :group 'idlwave) 118 :group 'idlwave)
119 119
120(defcustom idlwave-shell-prompt-pattern "^ ?IDL> " 120(defcustom idlwave-shell-prompt-pattern "^ ?IDL> "
121 "*Regexp to match IDL prompt at beginning of a line. 121 "*Regexp to match IDL prompt at beginning of a line.
122For example, \"^IDL> \" or \"^WAVE> \". 122For example, \"^IDL> \" or \"^WAVE> \".
123The \"^\" means beginning of line, and is required. 123The \"^\" means beginning of line, and is required.
124This variable is used to initialize `comint-prompt-regexp' in the 124This variable is used to initialize `comint-prompt-regexp' in the
125process buffer. 125process buffer.
126 126
127This is a fine thing to set in your `.emacs' file." 127This is a fine thing to set in your `.emacs' file."
@@ -210,7 +210,7 @@ So by default setting a breakpoint will be on C-c C-d C-b."
210 :type 'boolean) 210 :type 'boolean)
211 211
212(defcustom idlwave-shell-automatic-electric-debug 'breakpoint 212(defcustom idlwave-shell-automatic-electric-debug 'breakpoint
213 "Enter the electric-debug minor mode automatically. 213 "Enter the electric-debug minor mode automatically.
214This occurs at a breakpoint or any other halt. The mode is exited 214This occurs at a breakpoint or any other halt. The mode is exited
215upon return to the main level. Can be set to 'breakpoint to enter 215upon return to the main level. Can be set to 'breakpoint to enter
216electric debug mode only when breakpoints are tripped." 216electric debug mode only when breakpoints are tripped."
@@ -295,7 +295,7 @@ The history is only saved if the variable `idlwave-shell-save-command-history'
295is non-nil." 295is non-nil."
296 :group 'idlwave-shell-command-setup 296 :group 'idlwave-shell-command-setup
297 :type 'file) 297 :type 'file)
298 298
299(defcustom idlwave-shell-show-commands 299(defcustom idlwave-shell-show-commands
300 '(run misc breakpoint) 300 '(run misc breakpoint)
301 "*A list of command types to show output from in the shell. 301 "*A list of command types to show output from in the shell.
@@ -306,12 +306,12 @@ the copious shell traffic to be displayed."
306 :type '(choice 306 :type '(choice
307 (const everything) 307 (const everything)
308 (set :tag "Checklist" :greedy t 308 (set :tag "Checklist" :greedy t
309 (const :tag "All .run and .compile commands" run) 309 (const :tag "All .run and .compile commands" run)
310 (const :tag "All breakpoint commands" breakpoint) 310 (const :tag "All breakpoint commands" breakpoint)
311 (const :tag "All debug and stepping commands" debug) 311 (const :tag "All debug and stepping commands" debug)
312 (const :tag "Close, window, retall, etc. commands" misc)))) 312 (const :tag "Close, window, retall, etc. commands" misc))))
313 313
314(defcustom idlwave-shell-examine-alist 314(defcustom idlwave-shell-examine-alist
315 '(("Print" . "print,___") 315 '(("Print" . "print,___")
316 ("Help" . "help,___") 316 ("Help" . "help,___")
317 ("Structure Help" . "help,___,/STRUCTURE") 317 ("Structure Help" . "help,___,/STRUCTURE")
@@ -322,14 +322,14 @@ the copious shell traffic to be displayed."
322 ("Ptr Valid" . "print,ptr_valid(___)") 322 ("Ptr Valid" . "print,ptr_valid(___)")
323 ("Widget Valid" . "print,widget_info(___,/VALID)") 323 ("Widget Valid" . "print,widget_info(___,/VALID)")
324 ("Widget Geometry" . "help,widget_info(___,/GEOMETRY)")) 324 ("Widget Geometry" . "help,widget_info(___,/GEOMETRY)"))
325 "Alist of special examine commands for popup selection. 325 "Alist of special examine commands for popup selection.
326The keys are used in the selection popup created by 326The keys are used in the selection popup created by
327`idlwave-shell-examine-select', and the corresponding value is sent as 327`idlwave-shell-examine-select', and the corresponding value is sent as
328a command to the shell, with special sequence `___' replaced by the 328a command to the shell, with special sequence `___' replaced by the
329expression being examined." 329expression being examined."
330 :group 'idlwave-shell-command-setup 330 :group 'idlwave-shell-command-setup
331 :type '(repeat 331 :type '(repeat
332 (cons 332 (cons
333 (string :tag "Label ") 333 (string :tag "Label ")
334 (string :tag "Command")))) 334 (string :tag "Command"))))
335 335
@@ -340,7 +340,7 @@ expression being examined."
340 "*Non-nil mean, put output of examine commands in their own buffer." 340 "*Non-nil mean, put output of examine commands in their own buffer."
341 :group 'idlwave-shell-command-setup 341 :group 'idlwave-shell-command-setup
342 :type 'boolean) 342 :type 'boolean)
343 343
344(defcustom idlwave-shell-comint-settings 344(defcustom idlwave-shell-comint-settings
345 '((comint-scroll-to-bottom-on-input . t) 345 '((comint-scroll-to-bottom-on-input . t)
346 (comint-scroll-to-bottom-on-output . t) 346 (comint-scroll-to-bottom-on-output . t)
@@ -403,7 +403,7 @@ strings. Here is some example code which makes use of the default spells.
403 answer = GET_KBRD(1) 403 answer = GET_KBRD(1)
404 404
405Since the IDLWAVE shell defines the system variable `!IDLWAVE_VERSION', 405Since the IDLWAVE shell defines the system variable `!IDLWAVE_VERSION',
406you could actually check if you are running under Emacs before printing 406you could actually check if you are running under Emacs before printing
407the magic strings. Here is a procedure which uses this. 407the magic strings. Here is a procedure which uses this.
408 408
409Usage: 409Usage:
@@ -420,7 +420,7 @@ pro idlwave_char_input,on=on,off=off
420 if keyword_set(on) then print,'<chars>' $ 420 if keyword_set(on) then print,'<chars>' $
421 else if keyword_set(off) then print,'</chars>' $ 421 else if keyword_set(off) then print,'</chars>' $
422 else print,'<onechar>' 422 else print,'<onechar>'
423 endif 423 endif
424end" 424end"
425 :group 'idlwave-shell-command-setup 425 :group 'idlwave-shell-command-setup
426 :type '(list 426 :type '(list
@@ -478,10 +478,10 @@ line where IDL is stopped. See also `idlwave-shell-mark-stop-line'."
478 :group 'idlwave-shell-highlighting-and-faces 478 :group 'idlwave-shell-highlighting-and-faces
479 :type 'string) 479 :type 'string)
480 480
481(defcustom idlwave-shell-electric-stop-line-face 481(defcustom idlwave-shell-electric-stop-line-face
482 (prog1 482 (prog1
483 (copy-face 'modeline 'idlwave-shell-electric-stop-line-face) 483 (copy-face 'modeline 'idlwave-shell-electric-stop-line-face)
484 (set-face-background 'idlwave-shell-electric-stop-line-face 484 (set-face-background 'idlwave-shell-electric-stop-line-face
485 idlwave-shell-electric-stop-color) 485 idlwave-shell-electric-stop-color)
486 (condition-case nil 486 (condition-case nil
487 (set-face-foreground 'idlwave-shell-electric-stop-line-face nil) 487 (set-face-foreground 'idlwave-shell-electric-stop-line-face nil)
@@ -527,7 +527,7 @@ lines which have a breakpoint. See also `idlwave-shell-mark-breakpoints'."
527 ;; Just copy the underline face to be on the safe side. 527 ;; Just copy the underline face to be on the safe side.
528 (copy-face 'underline 'idlwave-shell-bp-face)) 528 (copy-face 'underline 'idlwave-shell-bp-face))
529 529
530(defcustom idlwave-shell-disabled-breakpoint-face 530(defcustom idlwave-shell-disabled-breakpoint-face
531 'idlwave-shell-disabled-bp-face 531 'idlwave-shell-disabled-bp-face
532 "*The face for disabled breakpoint lines in the source code. 532 "*The face for disabled breakpoint lines in the source code.
533Allows you to choose the font, color and other properties for 533Allows you to choose the font, color and other properties for
@@ -580,18 +580,18 @@ before use by the shell.")
580 580
581TYPE is either 'pro' or 'rinfo', and `idlwave-shell-temp-pro-file' or 581TYPE is either 'pro' or 'rinfo', and `idlwave-shell-temp-pro-file' or
582`idlwave-shell-temp-rinfo-save-file' is set (respectively)." 582`idlwave-shell-temp-rinfo-save-file' is set (respectively)."
583 (cond 583 (cond
584 ((eq type 'rinfo) 584 ((eq type 'rinfo)
585 (or idlwave-shell-temp-rinfo-save-file 585 (or idlwave-shell-temp-rinfo-save-file
586 (setq idlwave-shell-temp-rinfo-save-file 586 (setq idlwave-shell-temp-rinfo-save-file
587 (idlwave-shell-make-temp-file idlwave-shell-temp-pro-prefix)))) 587 (idlwave-shell-make-temp-file idlwave-shell-temp-pro-prefix))))
588 ((eq type 'pro) 588 ((eq type 'pro)
589 (or idlwave-shell-temp-pro-file 589 (or idlwave-shell-temp-pro-file
590 (setq idlwave-shell-temp-pro-file 590 (setq idlwave-shell-temp-pro-file
591 (idlwave-shell-make-temp-file idlwave-shell-temp-pro-prefix)))) 591 (idlwave-shell-make-temp-file idlwave-shell-temp-pro-prefix))))
592 (t (error "Wrong argument (idlwave-shell-temp-file): %s" 592 (t (error "Wrong argument (idlwave-shell-temp-file): %s"
593 (symbol-name type))))) 593 (symbol-name type)))))
594 594
595 595
596(defun idlwave-shell-make-temp-file (prefix) 596(defun idlwave-shell-make-temp-file (prefix)
597 "Create a temporary file." 597 "Create a temporary file."
@@ -619,7 +619,7 @@ TYPE is either 'pro' or 'rinfo', and `idlwave-shell-temp-pro-file' or
619 619
620 620
621(defvar idlwave-shell-dirstack-query "cd,current=___cur & print,___cur" 621(defvar idlwave-shell-dirstack-query "cd,current=___cur & print,___cur"
622 "Command used by `idlwave-shell-resync-dirs' to query IDL for 622 "Command used by `idlwave-shell-resync-dirs' to query IDL for
623the directory stack.") 623the directory stack.")
624 624
625(defvar idlwave-shell-path-query "print,'PATH:<'+transpose(expand_path(!PATH,/ARRAY))+'>' & print,'SYSDIR:<'+!dir+'>'" 625(defvar idlwave-shell-path-query "print,'PATH:<'+transpose(expand_path(!PATH,/ARRAY))+'>' & print,'SYSDIR:<'+!dir+'>'"
@@ -627,7 +627,7 @@ the directory stack.")
627 "The command which gets !PATH and !DIR info from the shell.") 627 "The command which gets !PATH and !DIR info from the shell.")
628 628
629(defvar idlwave-shell-mode-line-info nil 629(defvar idlwave-shell-mode-line-info nil
630 "Additional info displayed in the mode line") 630 "Additional info displayed in the mode line")
631 631
632(defvar idlwave-shell-default-directory nil 632(defvar idlwave-shell-default-directory nil
633 "The default directory in the idlwave-shell buffer, of outside use.") 633 "The default directory in the idlwave-shell buffer, of outside use.")
@@ -678,7 +678,7 @@ the directory stack.")
678 window-system) ; Window systems always 678 window-system) ; Window systems always
679 (progn 679 (progn
680 (setq idlwave-shell-stop-line-overlay (make-overlay 1 1)) 680 (setq idlwave-shell-stop-line-overlay (make-overlay 1 1))
681 (overlay-put idlwave-shell-stop-line-overlay 681 (overlay-put idlwave-shell-stop-line-overlay
682 'face idlwave-shell-stop-line-face)))) 682 'face idlwave-shell-stop-line-face))))
683 683
684 (t 684 (t
@@ -686,7 +686,7 @@ the directory stack.")
686 (if window-system 686 (if window-system
687 (progn 687 (progn
688 (setq idlwave-shell-stop-line-overlay (make-overlay 1 1)) 688 (setq idlwave-shell-stop-line-overlay (make-overlay 1 1))
689 (overlay-put idlwave-shell-stop-line-overlay 689 (overlay-put idlwave-shell-stop-line-overlay
690 'face idlwave-shell-stop-line-face))))) 690 'face idlwave-shell-stop-line-face)))))
691 691
692;; Now the expression and output overlays 692;; Now the expression and output overlays
@@ -747,7 +747,7 @@ with `*'s."
747 747
748;;; The following are the types of messages we attempt to catch to 748;;; The following are the types of messages we attempt to catch to
749;;; resync our idea of where IDL execution currently is. 749;;; resync our idea of where IDL execution currently is.
750;;; 750;;;
751 751
752(defvar idlwave-shell-halt-frame nil 752(defvar idlwave-shell-halt-frame nil
753 "The frame associated with halt/breakpoint messages.") 753 "The frame associated with halt/breakpoint messages.")
@@ -791,7 +791,7 @@ IDL has currently stepped.")
791 791
792(defconst idlwave-shell-electric-debug-help 792(defconst idlwave-shell-electric-debug-help
793 " ==> IDLWAVE Electric Debug Mode Help <== 793 " ==> IDLWAVE Electric Debug Mode Help <==
794 794
795 Break Point Setting and Clearing: 795 Break Point Setting and Clearing:
796 b Set breakpoint ([C-u b] for conditional, [C-n b] nth hit, etc.). 796 b Set breakpoint ([C-u b] for conditional, [C-n b] nth hit, etc.).
797 d Clear nearby breakpoint. 797 d Clear nearby breakpoint.
@@ -817,7 +817,7 @@ IDL has currently stepped.")
817 Examining Expressions (with prefix for examining the region): 817 Examining Expressions (with prefix for examining the region):
818 p Print expression near point or in region ([C-u p]). 818 p Print expression near point or in region ([C-u p]).
819 ? Help on expression near point or in region ([C-u ?]). 819 ? Help on expression near point or in region ([C-u ?]).
820 x Examine expression near point or in region ([C-u x]) with 820 x Examine expression near point or in region ([C-u x]) with
821 letter completion of the examine type. 821 letter completion of the examine type.
822 822
823 Miscellaneous: 823 Miscellaneous:
@@ -871,18 +871,18 @@ IDL has currently stepped.")
871 `\\[idlwave-routine-info]' displays information about an IDL routine near point, 871 `\\[idlwave-routine-info]' displays information about an IDL routine near point,
872 just like in `idlwave-mode'. The module used is the one at point or 872 just like in `idlwave-mode'. The module used is the one at point or
873 the one whose argument list is being edited. 873 the one whose argument list is being edited.
874 To update IDLWAVE's knowledge about compiled or edited modules, use 874 To update IDLWAVE's knowledge about compiled or edited modules, use
875 \\[idlwave-update-routine-info]. 875 \\[idlwave-update-routine-info].
876 \\[idlwave-find-module] find the source of a module. 876 \\[idlwave-find-module] find the source of a module.
877 \\[idlwave-resolve] tells IDL to compile an unresolved module. 877 \\[idlwave-resolve] tells IDL to compile an unresolved module.
878 \\[idlwave-context-help] shows the online help on the item at 878 \\[idlwave-context-help] shows the online help on the item at
879 point, if online help has been installed. 879 point, if online help has been installed.
880 880
881 881
8824. Debugging 8824. Debugging
883 --------- 883 ---------
884 A complete set of commands for compiling and debugging IDL programs 884 A complete set of commands for compiling and debugging IDL programs
885 is available from the menu. Also keybindings starting with a 885 is available from the menu. Also keybindings starting with a
886 `C-c C-d' prefix are available for most commands in the *idl* buffer 886 `C-c C-d' prefix are available for most commands in the *idl* buffer
887 and also in source buffers. The best place to learn about the 887 and also in source buffers. The best place to learn about the
888 keybindings is again the menu. 888 keybindings is again the menu.
@@ -974,8 +974,8 @@ IDL has currently stepped.")
974 (idlwave-shell-display-line nil) 974 (idlwave-shell-display-line nil)
975 (setq idlwave-shell-calling-stack-index 0) 975 (setq idlwave-shell-calling-stack-index 0)
976 (setq idlwave-shell-only-prompt-pattern 976 (setq idlwave-shell-only-prompt-pattern
977 (concat "\\`[ \t\n]*" 977 (concat "\\`[ \t\n]*"
978 (substring idlwave-shell-prompt-pattern 1) 978 (substring idlwave-shell-prompt-pattern 1)
979 "[ \t\n]*\\'")) 979 "[ \t\n]*\\'"))
980 980
981 (when idlwave-shell-query-for-class 981 (when idlwave-shell-query-for-class
@@ -1010,14 +1010,14 @@ IDL has currently stepped.")
1010 (while (setq entry (pop list)) 1010 (while (setq entry (pop list))
1011 (set (make-local-variable (car entry)) (cdr entry))))) 1011 (set (make-local-variable (car entry)) (cdr entry)))))
1012 1012
1013 1013
1014 (unless (memq 'comint-carriage-motion 1014 (unless (memq 'comint-carriage-motion
1015 (default-value 'comint-output-filter-functions)) 1015 (default-value 'comint-output-filter-functions))
1016 ;; Strip those pesky ctrl-m's. 1016 ;; Strip those pesky ctrl-m's.
1017 (add-hook 'comint-output-filter-functions 1017 (add-hook 'comint-output-filter-functions
1018 (lambda (string) 1018 (lambda (string)
1019 (when (string-match "\r" string) 1019 (when (string-match "\r" string)
1020 (let ((pmark (process-mark (get-buffer-process 1020 (let ((pmark (process-mark (get-buffer-process
1021 (current-buffer))))) 1021 (current-buffer)))))
1022 (save-excursion 1022 (save-excursion
1023 ;; bare CR -> delete preceding line 1023 ;; bare CR -> delete preceding line
@@ -1059,8 +1059,8 @@ IDL has currently stepped.")
1059 (idlwave-shell-send-command idlwave-shell-initial-commands nil 'hide) 1059 (idlwave-shell-send-command idlwave-shell-initial-commands nil 'hide)
1060 ;; Turn off IDL's ^d interpreting, and define a system 1060 ;; Turn off IDL's ^d interpreting, and define a system
1061 ;; variable which knows the version of IDLWAVE 1061 ;; variable which knows the version of IDLWAVE
1062 (idlwave-shell-send-command 1062 (idlwave-shell-send-command
1063 (format "defsysv,'!idlwave_version','%s',1" 1063 (format "defsysv,'!idlwave_version','%s',1"
1064 idlwave-mode-version) 1064 idlwave-mode-version)
1065 nil 'hide) 1065 nil 'hide)
1066 ;; Get the paths if they weren't read in from file 1066 ;; Get the paths if they weren't read in from file
@@ -1081,7 +1081,7 @@ IDL has currently stepped.")
1081 (setq idlwave-system-directory sysdir) 1081 (setq idlwave-system-directory sysdir)
1082 (put 'idlwave-system-directory 'from-shell t)) 1082 (put 'idlwave-system-directory 'from-shell t))
1083 ;; Preserve any existing flags 1083 ;; Preserve any existing flags
1084 (setq idlwave-path-alist 1084 (setq idlwave-path-alist
1085 (mapcar (lambda (x) 1085 (mapcar (lambda (x)
1086 (let ((old-entry (assoc x old-path-alist))) 1086 (let ((old-entry (assoc x old-path-alist)))
1087 (if old-entry 1087 (if old-entry
@@ -1089,7 +1089,7 @@ IDL has currently stepped.")
1089 (list x)))) 1089 (list x))))
1090 dirs)) 1090 dirs))
1091 (put 'idlwave-path-alist 'from-shell t) 1091 (put 'idlwave-path-alist 'from-shell t)
1092 (if idlwave-path-alist 1092 (if idlwave-path-alist
1093 (if (and idlwave-auto-write-paths 1093 (if (and idlwave-auto-write-paths
1094 (not idlwave-library-path) 1094 (not idlwave-library-path)
1095 (not no-write) ) 1095 (not no-write) )
@@ -1125,8 +1125,8 @@ IDL has currently stepped.")
1125 (frame (selected-frame))) 1125 (frame (selected-frame)))
1126 (catch 'exit 1126 (catch 'exit
1127 (while flist 1127 (while flist
1128 (if (not (eq (car flist) 1128 (if (not (eq (car flist)
1129 idlwave-shell-idl-wframe)) 1129 idlwave-shell-idl-wframe))
1130 (throw 'exit (car flist)) 1130 (throw 'exit (car flist))
1131 (setq flist (cdr flist)))))) 1131 (setq flist (cdr flist))))))
1132 (make-frame)) 1132 (make-frame))
@@ -1144,9 +1144,9 @@ IDL has currently stepped.")
1144 ;; We do not have a source frame, so we use this one. 1144 ;; We do not have a source frame, so we use this one.
1145 (setq idlwave-shell-display-wframe (selected-frame))) 1145 (setq idlwave-shell-display-wframe (selected-frame)))
1146 ;; Return a new frame 1146 ;; Return a new frame
1147 (setq idlwave-shell-idl-wframe 1147 (setq idlwave-shell-idl-wframe
1148 (make-frame idlwave-shell-frame-parameters))))) 1148 (make-frame idlwave-shell-frame-parameters)))))
1149 1149
1150;;;###autoload 1150;;;###autoload
1151(defun idlwave-shell (&optional arg quick) 1151(defun idlwave-shell (&optional arg quick)
1152 "Run an inferior IDL, with I/O through buffer `(idlwave-shell-buffer)'. 1152 "Run an inferior IDL, with I/O through buffer `(idlwave-shell-buffer)'.
@@ -1173,14 +1173,14 @@ See also the variable `idlwave-shell-prompt-pattern'.
1173 (delete-other-windows)) 1173 (delete-other-windows))
1174 (and idlwave-shell-use-dedicated-frame 1174 (and idlwave-shell-use-dedicated-frame
1175 (setq idlwave-shell-idl-wframe (selected-frame))) 1175 (setq idlwave-shell-idl-wframe (selected-frame)))
1176 (add-hook 'idlwave-shell-sentinel-hook 1176 (add-hook 'idlwave-shell-sentinel-hook
1177 'save-buffers-kill-emacs t)) 1177 'save-buffers-kill-emacs t))
1178 1178
1179 ;; A non-nil arg means, we want a dedicated frame. This will last 1179 ;; A non-nil arg means, we want a dedicated frame. This will last
1180 ;; for the current editing session. 1180 ;; for the current editing session.
1181 (if arg (setq idlwave-shell-use-dedicated-frame t)) 1181 (if arg (setq idlwave-shell-use-dedicated-frame t))
1182 (if (equal arg '(16)) (setq idlwave-shell-use-dedicated-frame nil)) 1182 (if (equal arg '(16)) (setq idlwave-shell-use-dedicated-frame nil))
1183 1183
1184 ;; Check if the process still exists. If not, create it. 1184 ;; Check if the process still exists. If not, create it.
1185 (unless (comint-check-proc (idlwave-shell-buffer)) 1185 (unless (comint-check-proc (idlwave-shell-buffer))
1186 (let* ((prg (or idlwave-shell-explicit-file-name "idl")) 1186 (let* ((prg (or idlwave-shell-explicit-file-name "idl"))
@@ -1207,9 +1207,9 @@ See also the variable `idlwave-shell-prompt-pattern'.
1207 (if (eq (selected-frame) (window-frame window)) 1207 (if (eq (selected-frame) (window-frame window))
1208 (select-window window)))) 1208 (select-window window))))
1209 ;; Save the paths at the end 1209 ;; Save the paths at the end
1210 (add-hook 'idlwave-shell-sentinel-hook 1210 (add-hook 'idlwave-shell-sentinel-hook
1211 (lambda () 1211 (lambda ()
1212 (if (and 1212 (if (and
1213 idlwave-auto-write-paths 1213 idlwave-auto-write-paths
1214 idlwave-path-alist 1214 idlwave-path-alist
1215 (not idlwave-library-path) 1215 (not idlwave-library-path)
@@ -1240,7 +1240,7 @@ Return either nil or 'hide."
1240 (setq idlwave-shell-show-commands (list type)))) 1240 (setq idlwave-shell-show-commands (list type))))
1241 1241
1242 1242
1243(defun idlwave-shell-send-command (&optional cmd pcmd hide preempt 1243(defun idlwave-shell-send-command (&optional cmd pcmd hide preempt
1244 show-if-error) 1244 show-if-error)
1245 "Send a command to IDL process. 1245 "Send a command to IDL process.
1246 1246
@@ -1261,18 +1261,18 @@ If optional fourth argument PREEMPT is non-nil CMD is put at front of
1261`idlwave-shell-pending-commands'. If PREEMPT is 'wait, wait for all 1261`idlwave-shell-pending-commands'. If PREEMPT is 'wait, wait for all
1262output to complete and the next prompt to arrive before returning 1262output to complete and the next prompt to arrive before returning
1263\(useful if you need an answer now\). IDL is considered ready if the 1263\(useful if you need an answer now\). IDL is considered ready if the
1264prompt is present and if `idlwave-shell-ready' is non-nil. 1264prompt is present and if `idlwave-shell-ready' is non-nil.
1265 1265
1266If SHOW-IF-ERROR is non-nil, show the output it it contains an error 1266If SHOW-IF-ERROR is non-nil, show the output it it contains an error
1267message, independent of what HIDE is set to." 1267message, independent of what HIDE is set to."
1268 1268
1269; (setq hide nil) ; FIXME: turn this on for debugging only 1269; (setq hide nil) ; FIXME: turn this on for debugging only
1270; (if (null cmd) 1270; (if (null cmd)
1271; (progn 1271; (progn
1272; (message "SENDING Pending commands: %s" 1272; (message "SENDING Pending commands: %s"
1273; (prin1-to-string idlwave-shell-pending-commands))) 1273; (prin1-to-string idlwave-shell-pending-commands)))
1274; (message "SENDING %s|||%s" cmd pcmd)) 1274; (message "SENDING %s|||%s" cmd pcmd))
1275 (if (and (symbolp idlwave-shell-show-commands) 1275 (if (and (symbolp idlwave-shell-show-commands)
1276 (eq idlwave-shell-show-commands 'everything)) 1276 (eq idlwave-shell-show-commands 'everything))
1277 (setq hide nil)) 1277 (setq hide nil))
1278 (let ((save-buffer (current-buffer)) 1278 (let ((save-buffer (current-buffer))
@@ -1300,7 +1300,7 @@ message, independent of what HIDE is set to."
1300 (append (list (list cmd pcmd hide show-if-error)) 1300 (append (list (list cmd pcmd hide show-if-error))
1301 idlwave-shell-pending-commands) 1301 idlwave-shell-pending-commands)
1302 ;; Put at end. 1302 ;; Put at end.
1303 (append idlwave-shell-pending-commands 1303 (append idlwave-shell-pending-commands
1304 (list (list cmd pcmd hide show-if-error)))))) 1304 (list (list cmd pcmd hide show-if-error))))))
1305 ;; Check if IDL ready 1305 ;; Check if IDL ready
1306 (let ((save-point (point-marker))) 1306 (let ((save-point (point-marker)))
@@ -1349,7 +1349,7 @@ message, independent of what HIDE is set to."
1349 (if (or (not (setq buf (get-buffer (idlwave-shell-buffer)))) 1349 (if (or (not (setq buf (get-buffer (idlwave-shell-buffer))))
1350 (not (setq proc (get-buffer-process buf)))) 1350 (not (setq proc (get-buffer-process buf))))
1351 (funcall errf "Shell is not running")) 1351 (funcall errf "Shell is not running"))
1352 (if (equal c ?\C-g) 1352 (if (equal c ?\C-g)
1353 (funcall errf "Abort") 1353 (funcall errf "Abort")
1354 (comint-send-string proc (char-to-string c))))) 1354 (comint-send-string proc (char-to-string c)))))
1355 1355
@@ -1390,7 +1390,7 @@ when the IDL prompt gets displayed again after the current IDL command."
1390 (if idlwave-shell-ready 1390 (if idlwave-shell-ready
1391 (funcall errf "No IDL program seems to be waiting for input")) 1391 (funcall errf "No IDL program seems to be waiting for input"))
1392 1392
1393 ;; OK, start the loop 1393 ;; OK, start the loop
1394 (message "Character mode on: Sending single chars (`C-g' to exit)") 1394 (message "Character mode on: Sending single chars (`C-g' to exit)")
1395 (message 1395 (message
1396 (catch 'exit 1396 (catch 'exit
@@ -1470,14 +1470,14 @@ error messages, etc."
1470 (setq output (substring output (string-match "\n" output))) 1470 (setq output (substring output (string-match "\n" output)))
1471 (while (string-match "\\(\n\\|\\`\\)%.*\\(\n .*\\)*" output) 1471 (while (string-match "\\(\n\\|\\`\\)%.*\\(\n .*\\)*" output)
1472 (setq output (replace-match "" nil t output))) 1472 (setq output (replace-match "" nil t output)))
1473 (unless 1473 (unless
1474 (string-match idlwave-shell-only-prompt-pattern output) 1474 (string-match idlwave-shell-only-prompt-pattern output)
1475 output)) 1475 output))
1476 1476
1477(defvar idlwave-shell-hidden-output-buffer " *idlwave-shell-hidden-output*" 1477(defvar idlwave-shell-hidden-output-buffer " *idlwave-shell-hidden-output*"
1478 "Buffer containing hidden output from IDL commands.") 1478 "Buffer containing hidden output from IDL commands.")
1479(defvar idlwave-shell-current-state nil) 1479(defvar idlwave-shell-current-state nil)
1480 1480
1481(defun idlwave-shell-filter (proc string) 1481(defun idlwave-shell-filter (proc string)
1482 "Watch for IDL prompt and filter incoming text. 1482 "Watch for IDL prompt and filter incoming text.
1483When the IDL prompt is received executes `idlwave-shell-post-command-hook' 1483When the IDL prompt is received executes `idlwave-shell-post-command-hook'
@@ -1509,20 +1509,20 @@ and then calls `idlwave-shell-send-command' for any pending commands."
1509 (idlwave-shell-input-mode-magic 1509 (idlwave-shell-input-mode-magic
1510 (concat idlwave-shell-accumulation string))) 1510 (concat idlwave-shell-accumulation string)))
1511 (setq idlwave-shell-accumulation 1511 (setq idlwave-shell-accumulation
1512 (substring string 1512 (substring string
1513 (progn (string-match "\\(.*[\n\r]+\\)*" 1513 (progn (string-match "\\(.*[\n\r]+\\)*"
1514 string) 1514 string)
1515 (match-end 0))))) 1515 (match-end 0)))))
1516 (setq idlwave-shell-accumulation 1516 (setq idlwave-shell-accumulation
1517 (concat idlwave-shell-accumulation string))) 1517 (concat idlwave-shell-accumulation string)))
1518 1518
1519 1519
1520;;; Test/Debug code 1520;;; Test/Debug code
1521; (save-excursion (set-buffer 1521; (save-excursion (set-buffer
1522; (get-buffer-create "*idlwave-shell-output*")) 1522; (get-buffer-create "*idlwave-shell-output*"))
1523; (goto-char (point-max)) 1523; (goto-char (point-max))
1524; (insert "\nSTRING===>\n" string "\n<====\n")) 1524; (insert "\nSTRING===>\n" string "\n<====\n"))
1525 1525
1526 ;; Check for prompt in current accumulating output 1526 ;; Check for prompt in current accumulating output
1527 (if (setq idlwave-shell-ready 1527 (if (setq idlwave-shell-ready
1528 (string-match idlwave-shell-prompt-pattern 1528 (string-match idlwave-shell-prompt-pattern
@@ -1558,16 +1558,16 @@ and then calls `idlwave-shell-send-command' for any pending commands."
1558 (if (and idlwave-shell-show-if-error 1558 (if (and idlwave-shell-show-if-error
1559 (eq idlwave-shell-current-state 'error)) 1559 (eq idlwave-shell-current-state 'error))
1560 (idlwave-shell-comint-filter proc full-output) 1560 (idlwave-shell-comint-filter proc full-output)
1561 ;; If it's only *mostly* hidden, filter % lines, 1561 ;; If it's only *mostly* hidden, filter % lines,
1562 ;; and show anything that remains 1562 ;; and show anything that remains
1563 (if (eq idlwave-shell-hide-output 'mostly) 1563 (if (eq idlwave-shell-hide-output 'mostly)
1564 (let ((filtered 1564 (let ((filtered
1565 (idlwave-shell-filter-hidden-output 1565 (idlwave-shell-filter-hidden-output
1566 full-output))) 1566 full-output)))
1567 (if filtered 1567 (if filtered
1568 (idlwave-shell-comint-filter 1568 (idlwave-shell-comint-filter
1569 proc filtered)))))) 1569 proc filtered))))))
1570 1570
1571 ;; Call the post-command hook 1571 ;; Call the post-command hook
1572 (if (listp idlwave-shell-post-command-hook) 1572 (if (listp idlwave-shell-post-command-hook)
1573 (progn 1573 (progn
@@ -1612,7 +1612,7 @@ and then calls `idlwave-shell-send-command' for any pending commands."
1612 (condition-case nil 1612 (condition-case nil
1613 (comint-write-input-ring) 1613 (comint-write-input-ring)
1614 (error nil))))) 1614 (error nil)))))
1615 1615
1616 (when (and (> (length (frame-list)) 1) 1616 (when (and (> (length (frame-list)) 1)
1617 (frame-live-p idlwave-shell-idl-wframe)) 1617 (frame-live-p idlwave-shell-idl-wframe))
1618 (delete-frame idlwave-shell-idl-wframe) 1618 (delete-frame idlwave-shell-idl-wframe)
@@ -1636,8 +1636,8 @@ and then calls `idlwave-shell-send-command' for any pending commands."
1636;; in module and file names. I am not sure if it will be necessary to 1636;; in module and file names. I am not sure if it will be necessary to
1637;; change this. Currently it seems to work the way it is. 1637;; change this. Currently it seems to work the way it is.
1638(defvar idlwave-shell-syntax-error 1638(defvar idlwave-shell-syntax-error
1639 "^% Syntax error.\\s-*\n\\s-*At:\\s-*\\(.*\\),\\s-*Line\\s-*\\(.*\\)" 1639 "^% Syntax error.\\s-*\n\\s-*At:\\s-*\\(.*\\),\\s-*Line\\s-*\\(.*\\)"
1640 "A regular expression to match an IDL syntax error. 1640 "A regular expression to match an IDL syntax error.
1641The 1st pair matches the file name, the second pair matches the line 1641The 1st pair matches the file name, the second pair matches the line
1642number.") 1642number.")
1643 1643
@@ -1645,16 +1645,16 @@ number.")
1645 "^% .*\n\\s-*At:\\s-*\\(.*\\),\\s-*Line\\s-*\\(.*\\)" 1645 "^% .*\n\\s-*At:\\s-*\\(.*\\),\\s-*Line\\s-*\\(.*\\)"
1646 "A regular expression to match any IDL error.") 1646 "A regular expression to match any IDL error.")
1647 1647
1648(defvar idlwave-shell-halting-error 1648(defvar idlwave-shell-halting-error
1649 "^% .*\n\\([^%].*\n\\)*% Execution halted at:\\(\\s-*\\S-+\\s-*[0-9]+\\s-*.*\\)\n" 1649 "^% .*\n\\([^%].*\n\\)*% Execution halted at:\\(\\s-*\\S-+\\s-*[0-9]+\\s-*.*\\)\n"
1650 "A regular expression to match errors which halt execution.") 1650 "A regular expression to match errors which halt execution.")
1651 1651
1652(defvar idlwave-shell-cant-continue-error 1652(defvar idlwave-shell-cant-continue-error
1653 "^% Can't continue from this point.\n" 1653 "^% Can't continue from this point.\n"
1654 "A regular expression to match errors stepping errors.") 1654 "A regular expression to match errors stepping errors.")
1655 1655
1656(defvar idlwave-shell-file-line-message 1656(defvar idlwave-shell-file-line-message
1657 (concat 1657 (concat
1658 "\\(" ; program name group (1) 1658 "\\(" ; program name group (1)
1659 "\\$MAIN\\$\\|" ; main level routine 1659 "\\$MAIN\\$\\|" ; main level routine
1660 "\\<[a-zA-Z][a-zA-Z0-9_$:]*" ; start with a letter followed by [..] 1660 "\\<[a-zA-Z][a-zA-Z0-9_$:]*" ; start with a letter followed by [..]
@@ -1672,7 +1672,7 @@ number.")
1672 "\\)" ; end line number group (5) 1672 "\\)" ; end line number group (5)
1673 ) 1673 )
1674 "*A regular expression to parse out the file name and line number. 1674 "*A regular expression to parse out the file name and line number.
1675The 1st group should match the subroutine name. 1675The 1st group should match the subroutine name.
1676The 3rd group is the line number. 1676The 3rd group is the line number.
1677The 5th group is the file name. 1677The 5th group is the file name.
1678All parts may contain linebreaks surrounded by spaces. This is important 1678All parts may contain linebreaks surrounded by spaces. This is important
@@ -1691,9 +1691,9 @@ the above."
1691 (cond 1691 (cond
1692 ;; Make sure we have output 1692 ;; Make sure we have output
1693 ((not idlwave-shell-command-output)) 1693 ((not idlwave-shell-command-output))
1694 1694
1695 ;; First Priority: Syntax and other errors 1695 ;; First Priority: Syntax and other errors
1696 ((or 1696 ((or
1697 (string-match idlwave-shell-syntax-error 1697 (string-match idlwave-shell-syntax-error
1698 idlwave-shell-command-output) 1698 idlwave-shell-command-output)
1699 (string-match idlwave-shell-other-error 1699 (string-match idlwave-shell-other-error
@@ -1707,19 +1707,19 @@ the above."
1707 (setq idlwave-shell-error-last (point))) 1707 (setq idlwave-shell-error-last (point)))
1708 (setq idlwave-shell-current-state 'error) 1708 (setq idlwave-shell-current-state 'error)
1709 (idlwave-shell-goto-next-error)) 1709 (idlwave-shell-goto-next-error))
1710 1710
1711 ;; Second Priority: Halting errors 1711 ;; Second Priority: Halting errors
1712 ((string-match idlwave-shell-halting-error 1712 ((string-match idlwave-shell-halting-error
1713 idlwave-shell-command-output) 1713 idlwave-shell-command-output)
1714 ;; Grab the file and line state info. 1714 ;; Grab the file and line state info.
1715 (setq idlwave-shell-calling-stack-index 0) 1715 (setq idlwave-shell-calling-stack-index 0)
1716 (setq idlwave-shell-halt-frame 1716 (setq idlwave-shell-halt-frame
1717 (idlwave-shell-parse-line 1717 (idlwave-shell-parse-line
1718 (substring idlwave-shell-command-output 1718 (substring idlwave-shell-command-output
1719 (match-beginning 2))) 1719 (match-beginning 2)))
1720 idlwave-shell-current-state 'error) 1720 idlwave-shell-current-state 'error)
1721 (idlwave-shell-display-line (idlwave-shell-pc-frame))) 1721 (idlwave-shell-display-line (idlwave-shell-pc-frame)))
1722 1722
1723 ;; Third Priority: Various types of innocuous HALT and 1723 ;; Third Priority: Various types of innocuous HALT and
1724 ;; TRACEBACK messages. 1724 ;; TRACEBACK messages.
1725 ((or (setq trace (string-match idlwave-shell-trace-message-re 1725 ((or (setq trace (string-match idlwave-shell-trace-message-re
@@ -1729,25 +1729,25 @@ the above."
1729 ;; Grab the file and line state info. 1729 ;; Grab the file and line state info.
1730 (setq idlwave-shell-calling-stack-index 0) 1730 (setq idlwave-shell-calling-stack-index 0)
1731 (setq idlwave-shell-halt-frame 1731 (setq idlwave-shell-halt-frame
1732 (idlwave-shell-parse-line 1732 (idlwave-shell-parse-line
1733 (substring idlwave-shell-command-output (match-end 0)))) 1733 (substring idlwave-shell-command-output (match-end 0))))
1734 (setq idlwave-shell-current-state 'halt) 1734 (setq idlwave-shell-current-state 'halt)
1735 ;; Don't debug trace messages 1735 ;; Don't debug trace messages
1736 (idlwave-shell-display-line (idlwave-shell-pc-frame) nil 1736 (idlwave-shell-display-line (idlwave-shell-pc-frame) nil
1737 (if trace 'no-debug))) 1737 (if trace 'no-debug)))
1738 1738
1739 ;; Fourth Priority: Breakpoints 1739 ;; Fourth Priority: Breakpoints
1740 ((string-match idlwave-shell-break-message 1740 ((string-match idlwave-shell-break-message
1741 idlwave-shell-command-output) 1741 idlwave-shell-command-output)
1742 (setq idlwave-shell-calling-stack-index 0) 1742 (setq idlwave-shell-calling-stack-index 0)
1743 (setq idlwave-shell-halt-frame 1743 (setq idlwave-shell-halt-frame
1744 (idlwave-shell-parse-line 1744 (idlwave-shell-parse-line
1745 (substring idlwave-shell-command-output (match-end 0)))) 1745 (substring idlwave-shell-command-output (match-end 0))))
1746 ;; We used to count hits on breakpoints 1746 ;; We used to count hits on breakpoints
1747 ;; this is no longer supported since IDL breakpoints 1747 ;; this is no longer supported since IDL breakpoints
1748 ;; have learned counting. 1748 ;; have learned counting.
1749 ;; Do breakpoint command processing 1749 ;; Do breakpoint command processing
1750 (let ((bp (assoc 1750 (let ((bp (assoc
1751 (list 1751 (list
1752 (nth 0 idlwave-shell-halt-frame) 1752 (nth 0 idlwave-shell-halt-frame)
1753 (nth 1 idlwave-shell-halt-frame)) 1753 (nth 1 idlwave-shell-halt-frame))
@@ -1760,9 +1760,9 @@ the above."
1760 ;; A breakpoint that we did not know about - perhaps it was 1760 ;; A breakpoint that we did not know about - perhaps it was
1761 ;; set by the user... Let's update our list. 1761 ;; set by the user... Let's update our list.
1762 (idlwave-shell-bp-query))) 1762 (idlwave-shell-bp-query)))
1763 (setq idlwave-shell-current-state 'breakpoint) 1763 (setq idlwave-shell-current-state 'breakpoint)
1764 (idlwave-shell-display-line (idlwave-shell-pc-frame))) 1764 (idlwave-shell-display-line (idlwave-shell-pc-frame)))
1765 1765
1766 ;; Last Priority: Can't Step errors 1766 ;; Last Priority: Can't Step errors
1767 ((string-match idlwave-shell-cant-continue-error 1767 ((string-match idlwave-shell-cant-continue-error
1768 idlwave-shell-command-output) 1768 idlwave-shell-command-output)
@@ -1777,7 +1777,7 @@ We need to work hard here to remove the stupid line breaks inserted by
1777IDL5. These line breaks can be right in the middle of procedure 1777IDL5. These line breaks can be right in the middle of procedure
1778or file names. 1778or file names.
1779It is very difficult to come up with a robust solution. This one seems 1779It is very difficult to come up with a robust solution. This one seems
1780to be pretty good though. 1780to be pretty good though.
1781 1781
1782Here is in what ways it improves over the previous solution: 1782Here is in what ways it improves over the previous solution:
1783 1783
@@ -1802,7 +1802,7 @@ statements."
1802 (setq procedure (match-string 1 string) 1802 (setq procedure (match-string 1 string)
1803 number (match-string 3 string) 1803 number (match-string 3 string)
1804 file (match-string 5 string)) 1804 file (match-string 5 string))
1805 1805
1806 ;; Repair the strings 1806 ;; Repair the strings
1807 (setq procedure (idlwave-shell-repair-string procedure)) 1807 (setq procedure (idlwave-shell-repair-string procedure))
1808 (setq number (idlwave-shell-repair-string number)) 1808 (setq number (idlwave-shell-repair-string number))
@@ -1811,7 +1811,7 @@ statements."
1811 ;; If we have a file, return the frame list 1811 ;; If we have a file, return the frame list
1812 (if file 1812 (if file
1813 (list (idlwave-shell-file-name file) 1813 (list (idlwave-shell-file-name file)
1814 (string-to-int number) 1814 (string-to-number number)
1815 procedure) 1815 procedure)
1816 ;; No success finding a file 1816 ;; No success finding a file
1817 nil)))) 1817 nil))))
@@ -1828,7 +1828,7 @@ The last line of STRING may be garbage - we check which one makes a valid
1828file name." 1828file name."
1829 (let ((file1 "") (file2 "") (start 0)) 1829 (let ((file1 "") (file2 "") (start 0))
1830 ;; We scan no further than to the next "^%" line 1830 ;; We scan no further than to the next "^%" line
1831 (if (string-match "^%" file) 1831 (if (string-match "^%" file)
1832 (setq file (substring file 0 (match-beginning 0)))) 1832 (setq file (substring file 0 (match-beginning 0))))
1833 ;; Take out the line breaks 1833 ;; Take out the line breaks
1834 (while (string-match "[ \t]*\n[ \t]*" file start) 1834 (while (string-match "[ \t]*\n[ \t]*" file start)
@@ -1883,7 +1883,7 @@ file name."
1883The size is given by `idlwave-shell-graphics-window-size'." 1883The size is given by `idlwave-shell-graphics-window-size'."
1884 (interactive "P") 1884 (interactive "P")
1885 (let ((n (if n (prefix-numeric-value n) 0))) 1885 (let ((n (if n (prefix-numeric-value n) 0)))
1886 (idlwave-shell-send-command 1886 (idlwave-shell-send-command
1887 (apply 'format "window,%d,xs=%d,ys=%d" 1887 (apply 'format "window,%d,xs=%d,ys=%d"
1888 n idlwave-shell-graphics-window-size) 1888 n idlwave-shell-graphics-window-size)
1889 nil (idlwave-shell-hide-p 'misc) nil t))) 1889 nil (idlwave-shell-hide-p 'misc) nil t)))
@@ -1903,16 +1903,16 @@ directory."
1903Also get rid of widget events in the queue." 1903Also get rid of widget events in the queue."
1904 (interactive "P") 1904 (interactive "P")
1905 (save-selected-window 1905 (save-selected-window
1906 ;;if (widget_info(/MANAGED))[0] gt 0 then for i=0,n_elements(widget_info(/MANAGED))-1 do widget_control,(widget_info(/MANAGED))[i],/clear_events & 1906 ;;if (widget_info(/MANAGED))[0] gt 0 then for i=0,n_elements(widget_info(/MANAGED))-1 do widget_control,(widget_info(/MANAGED))[i],/clear_events &
1907 (idlwave-shell-send-command "retall" nil 1907 (idlwave-shell-send-command "retall" nil
1908 (if (idlwave-shell-hide-p 'misc) 'mostly) 1908 (if (idlwave-shell-hide-p 'misc) 'mostly)
1909 nil t) 1909 nil t)
1910 (idlwave-shell-display-line nil))) 1910 (idlwave-shell-display-line nil)))
1911 1911
1912(defun idlwave-shell-closeall (&optional arg) 1912(defun idlwave-shell-closeall (&optional arg)
1913 "Close all open files." 1913 "Close all open files."
1914 (interactive "P") 1914 (interactive "P")
1915 (idlwave-shell-send-command "close,/all" nil 1915 (idlwave-shell-send-command "close,/all" nil
1916 (idlwave-shell-hide-p 'misc) nil t)) 1916 (idlwave-shell-hide-p 'misc) nil t))
1917 1917
1918(defun idlwave-shell-quit (&optional arg) 1918(defun idlwave-shell-quit (&optional arg)
@@ -1928,7 +1928,7 @@ With prefix ARG, exit without confirmation."
1928 1928
1929(defun idlwave-shell-reset (&optional hidden) 1929(defun idlwave-shell-reset (&optional hidden)
1930 "Reset IDL. Return to main level and destroy the leftover variables. 1930 "Reset IDL. Return to main level and destroy the leftover variables.
1931This issues the following commands: 1931This issues the following commands:
1932RETALL 1932RETALL
1933WIDGET_CONTROL,/RESET 1933WIDGET_CONTROL,/RESET
1934CLOSE, /ALL 1934CLOSE, /ALL
@@ -1978,14 +1978,14 @@ HEAP_GC, /VERBOSE"
1978 ;; Set dummy values and kill the text 1978 ;; Set dummy values and kill the text
1979 (setq sep "@" sep-re "@ *" text "") 1979 (setq sep "@" sep-re "@ *" text "")
1980 (if idlwave-idlwave_routine_info-compiled 1980 (if idlwave-idlwave_routine_info-compiled
1981 (message 1981 (message
1982 "Routine Info warning: No match for BEGIN line in \n>>>\n%s\n<<<\n" 1982 "Routine Info warning: No match for BEGIN line in \n>>>\n%s\n<<<\n"
1983 idlwave-shell-command-output))) 1983 idlwave-shell-command-output)))
1984 (if (string-match "^>>>END OF IDLWAVE ROUTINE INFO.*" text) 1984 (if (string-match "^>>>END OF IDLWAVE ROUTINE INFO.*" text)
1985 (setq text (substring text 0 (match-beginning 0))) 1985 (setq text (substring text 0 (match-beginning 0)))
1986 (if idlwave-idlwave_routine_info-compiled 1986 (if idlwave-idlwave_routine_info-compiled
1987 (message 1987 (message
1988 "Routine Info warning: No match for END line in \n>>>\n%s\n<<<\n" 1988 "Routine Info warning: No match for END line in \n>>>\n%s\n<<<\n"
1989 idlwave-shell-command-output))) 1989 idlwave-shell-command-output)))
1990 (if (string-match "\\S-" text) 1990 (if (string-match "\\S-" text)
1991 ;; Obviously, the pro worked. Make a note that we have it now. 1991 ;; Obviously, the pro worked. Make a note that we have it now.
@@ -2003,59 +2003,59 @@ HEAP_GC, /VERBOSE"
2003 key (nth 4 specs) 2003 key (nth 4 specs)
2004 keys (if (and (stringp key) 2004 keys (if (and (stringp key)
2005 (not (string-match "\\` *\\'" key))) 2005 (not (string-match "\\` *\\'" key)))
2006 (mapcar 'list 2006 (mapcar 'list
2007 (delete "" (idlwave-split-string key " +"))))) 2007 (delete "" (idlwave-split-string key " +")))))
2008 (setq name (idlwave-sintern-routine-or-method name class t) 2008 (setq name (idlwave-sintern-routine-or-method name class t)
2009 class (idlwave-sintern-class class t) 2009 class (idlwave-sintern-class class t)
2010 file (if (equal file "") nil file) 2010 file (if (equal file "") nil file)
2011 keys (mapcar (lambda (x) 2011 keys (mapcar (lambda (x)
2012 (list (idlwave-sintern-keyword (car x) t))) keys)) 2012 (list (idlwave-sintern-keyword (car x) t))) keys))
2013 2013
2014 ;; In the following ignore routines already defined in buffers, 2014 ;; In the following ignore routines already defined in buffers,
2015 ;; assuming that if the buffer stuff differs, it is a "new" 2015 ;; assuming that if the buffer stuff differs, it is a "new"
2016 ;; version, not yet compiled, and should take precedence. 2016 ;; version, not yet compiled, and should take precedence.
2017 ;; We could do the same for the library to avoid duplicates - 2017 ;; We could do the same for the library to avoid duplicates -
2018 ;; but I think frequently a user might have several versions of 2018 ;; but I think frequently a user might have several versions of
2019 ;; the same function in different programs, and in this case the 2019 ;; the same function in different programs, and in this case the
2020 ;; compiled one will be the best guess of all versions. 2020 ;; compiled one will be the best guess of all versions.
2021 ;; Therefore, we leave duplicates of library routines in. 2021 ;; Therefore, we leave duplicates of library routines in.
2022 (cond ((string= name "$MAIN$")) ; ignore this one 2022 (cond ((string= name "$MAIN$")) ; ignore this one
2023 ((and (string= type "PRO") 2023 ((and (string= type "PRO")
2024 ;; FIXME: is it OK to make the buffer routines dominate? 2024 ;; FIXME: is it OK to make the buffer routines dominate?
2025 (or t (null file) 2025 (or t (null file)
2026 (not (idlwave-rinfo-assq name 'pro class 2026 (not (idlwave-rinfo-assq name 'pro class
2027 idlwave-buffer-routines))) 2027 idlwave-buffer-routines)))
2028 ;; FIXME: is it OK to make the library routines dominate? 2028 ;; FIXME: is it OK to make the library routines dominate?
2029 ;;(not (idlwave-rinfo-assq name 'pro class 2029 ;;(not (idlwave-rinfo-assq name 'pro class
2030 ;; idlwave-library-routines)) 2030 ;; idlwave-library-routines))
2031 ) 2031 )
2032 (setq entry (list name 'pro class 2032 (setq entry (list name 'pro class
2033 (cons 'compiled 2033 (cons 'compiled
2034 (if file 2034 (if file
2035 (list 2035 (list
2036 (file-name-nondirectory file) 2036 (file-name-nondirectory file)
2037 (idlwave-sintern-dir 2037 (idlwave-sintern-dir
2038 (file-name-directory file))))) 2038 (file-name-directory file)))))
2039 cs (cons nil keys))) 2039 cs (cons nil keys)))
2040 (if file 2040 (if file
2041 (push entry idlwave-compiled-routines) 2041 (push entry idlwave-compiled-routines)
2042 (push entry idlwave-unresolved-routines))) 2042 (push entry idlwave-unresolved-routines)))
2043 2043
2044 ((and (string= type "FUN") 2044 ((and (string= type "FUN")
2045 ;; FIXME: is it OK to make the buffer routines dominate? 2045 ;; FIXME: is it OK to make the buffer routines dominate?
2046 (or t (not file) 2046 (or t (not file)
2047 (not (idlwave-rinfo-assq name 'fun class 2047 (not (idlwave-rinfo-assq name 'fun class
2048 idlwave-buffer-routines))) 2048 idlwave-buffer-routines)))
2049 ;; FIXME: is it OK to make the library routines dominate? 2049 ;; FIXME: is it OK to make the library routines dominate?
2050 ;; (not (idlwave-rinfo-assq name 'fun class 2050 ;; (not (idlwave-rinfo-assq name 'fun class
2051 ;; idlwave-library-routines)) 2051 ;; idlwave-library-routines))
2052 ) 2052 )
2053 (setq entry (list name 'fun class 2053 (setq entry (list name 'fun class
2054 (cons 'compiled 2054 (cons 'compiled
2055 (if file 2055 (if file
2056 (list 2056 (list
2057 (file-name-nondirectory file) 2057 (file-name-nondirectory file)
2058 (idlwave-sintern-dir 2058 (idlwave-sintern-dir
2059 (file-name-directory file))))) 2059 (file-name-directory file)))))
2060 cs (cons nil keys))) 2060 cs (cons nil keys)))
2061 (if file 2061 (if file
@@ -2072,7 +2072,7 @@ Change the default directory for the process buffer to concur."
2072 (set-buffer (idlwave-shell-buffer)) 2072 (set-buffer (idlwave-shell-buffer))
2073 (if (string-match ",___cur[\n\r]\\(\\S-*\\) *[\n\r]" 2073 (if (string-match ",___cur[\n\r]\\(\\S-*\\) *[\n\r]"
2074 idlwave-shell-command-output) 2074 idlwave-shell-command-output)
2075 (let ((dir (substring idlwave-shell-command-output 2075 (let ((dir (substring idlwave-shell-command-output
2076 (match-beginning 1) (match-end 1)))) 2076 (match-beginning 1) (match-end 1))))
2077; (message "Setting Emacs working dir to %s" dir) 2077; (message "Setting Emacs working dir to %s" dir)
2078 (setq idlwave-shell-default-directory dir) 2078 (setq idlwave-shell-default-directory dir)
@@ -2086,10 +2086,10 @@ Change the default directory for the process buffer to concur."
2086 expression) 2086 expression)
2087 (save-excursion 2087 (save-excursion
2088 (goto-char apos) 2088 (goto-char apos)
2089 (setq expression (buffer-substring 2089 (setq expression (buffer-substring
2090 (catch 'exit 2090 (catch 'exit
2091 (while t 2091 (while t
2092 (if (not (re-search-backward 2092 (if (not (re-search-backward
2093 "[^][.A-Za-z0-9_() ]" bos t)) 2093 "[^][.A-Za-z0-9_() ]" bos t))
2094 (throw 'exit bos)) ;ran into bos 2094 (throw 'exit bos)) ;ran into bos
2095 (if (not (idlwave-is-pointer-dereference bol)) 2095 (if (not (idlwave-is-pointer-dereference bol))
@@ -2117,7 +2117,7 @@ Change the default directory for the process buffer to concur."
2117 idlwave-shell-command-output)) 2117 idlwave-shell-command-output))
2118 (string-match (concat match "\\([A-Za-z_0-9]+\\)") 2118 (string-match (concat match "\\([A-Za-z_0-9]+\\)")
2119 idlwave-shell-command-output)) 2119 idlwave-shell-command-output))
2120 (setq idlwave-shell-get-object-class 2120 (setq idlwave-shell-get-object-class
2121 (match-string 1 idlwave-shell-command-output))))) 2121 (match-string 1 idlwave-shell-command-output)))))
2122 2122
2123(defvar idlwave-sint-sysvars nil) 2123(defvar idlwave-sint-sysvars nil)
@@ -2131,7 +2131,7 @@ keywords."
2131 (interactive "P") 2131 (interactive "P")
2132 (let (exec-cmd) 2132 (let (exec-cmd)
2133 (cond 2133 (cond
2134 ((and 2134 ((and
2135 (setq exec-cmd (idlwave-shell-executive-command)) 2135 (setq exec-cmd (idlwave-shell-executive-command))
2136 (cdr exec-cmd) 2136 (cdr exec-cmd)
2137 (member (upcase (cdr exec-cmd)) 2137 (member (upcase (cdr exec-cmd))
@@ -2141,7 +2141,7 @@ keywords."
2141 (idlwave-shell-complete-filename)) 2141 (idlwave-shell-complete-filename))
2142 2142
2143 ((car-safe exec-cmd) 2143 ((car-safe exec-cmd)
2144 (setq idlwave-completion-help-info 2144 (setq idlwave-completion-help-info
2145 '(idlwave-shell-complete-execcomm-help)) 2145 '(idlwave-shell-complete-execcomm-help))
2146 (idlwave-complete-in-buffer 'execcomm 'execcomm 2146 (idlwave-complete-in-buffer 'execcomm 'execcomm
2147 idlwave-executive-commands-alist nil 2147 idlwave-executive-commands-alist nil
@@ -2160,7 +2160,7 @@ keywords."
2160 (let ((case-fold-search t)) 2160 (let ((case-fold-search t))
2161 (not (looking-at ".*obj_new"))))) 2161 (not (looking-at ".*obj_new")))))
2162 (idlwave-shell-complete-filename)) 2162 (idlwave-shell-complete-filename))
2163 2163
2164 (t 2164 (t
2165 ;; Default completion of modules and keywords 2165 ;; Default completion of modules and keywords
2166 (idlwave-complete arg))))) 2166 (idlwave-complete arg)))))
@@ -2182,7 +2182,7 @@ keywords."
2182We assume that we are after a file name when completing one of the 2182We assume that we are after a file name when completing one of the
2183args of an executive .run, .rnew or .compile." 2183args of an executive .run, .rnew or .compile."
2184 ;; CWD might have changed, resync, to set default directory 2184 ;; CWD might have changed, resync, to set default directory
2185 (idlwave-shell-resync-dirs) 2185 (idlwave-shell-resync-dirs)
2186 (let ((comint-file-name-chars idlwave-shell-file-name-chars)) 2186 (let ((comint-file-name-chars idlwave-shell-file-name-chars))
2187 (comint-dynamic-complete-as-filename))) 2187 (comint-dynamic-complete-as-filename)))
2188 2188
@@ -2223,7 +2223,7 @@ args of an executive .run, .rnew or .compile."
2223 2223
2224(defun idlwave-shell-redisplay (&optional hide) 2224(defun idlwave-shell-redisplay (&optional hide)
2225 "Tries to resync the display with where execution has stopped. 2225 "Tries to resync the display with where execution has stopped.
2226Issues a \"help,/trace\" command followed by a call to 2226Issues a \"help,/trace\" command followed by a call to
2227`idlwave-shell-display-line'. Also updates the breakpoint 2227`idlwave-shell-display-line'. Also updates the breakpoint
2228overlays." 2228overlays."
2229 (interactive) 2229 (interactive)
@@ -2236,7 +2236,7 @@ overlays."
2236 (idlwave-shell-bp-query)) 2236 (idlwave-shell-bp-query))
2237 2237
2238(defun idlwave-shell-display-level-in-calling-stack (&optional hide) 2238(defun idlwave-shell-display-level-in-calling-stack (&optional hide)
2239 (idlwave-shell-send-command 2239 (idlwave-shell-send-command
2240 "help,/trace" 2240 "help,/trace"
2241 `(progn 2241 `(progn
2242 ;; scanning for the state will reset the stack level - restore it 2242 ;; scanning for the state will reset the stack level - restore it
@@ -2267,14 +2267,14 @@ overlays."
2267 (setq idlwave-shell-calling-stack-index nmin 2267 (setq idlwave-shell-calling-stack-index nmin
2268 message (format "%d is the current calling stack level - can't go further down" 2268 message (format "%d is the current calling stack level - can't go further down"
2269 (- nmin))))) 2269 (- nmin)))))
2270 (setq idlwave-shell-calling-stack-routine 2270 (setq idlwave-shell-calling-stack-routine
2271 (nth 2 (nth idlwave-shell-calling-stack-index stack))) 2271 (nth 2 (nth idlwave-shell-calling-stack-index stack)))
2272 2272
2273 ;; only edebug if in that mode already 2273 ;; only edebug if in that mode already
2274 (idlwave-shell-display-line 2274 (idlwave-shell-display-line
2275 (nth idlwave-shell-calling-stack-index stack) nil 2275 (nth idlwave-shell-calling-stack-index stack) nil
2276 (unless idlwave-shell-electric-debug-mode 'no-debug)) 2276 (unless idlwave-shell-electric-debug-mode 'no-debug))
2277 (message (or message 2277 (message (or message
2278 (format "In routine %s (stack level %d)" 2278 (format "In routine %s (stack level %d)"
2279 idlwave-shell-calling-stack-routine 2279 idlwave-shell-calling-stack-routine
2280 (- idlwave-shell-calling-stack-index)))))) 2280 (- idlwave-shell-calling-stack-index))))))
@@ -2305,7 +2305,7 @@ used. Does nothing if the resulting frame is nil."
2305(defun idlwave-shell-pc-frame () 2305(defun idlwave-shell-pc-frame ()
2306 "Returns the frame for IDL execution." 2306 "Returns the frame for IDL execution."
2307 (and idlwave-shell-halt-frame 2307 (and idlwave-shell-halt-frame
2308 (list (nth 0 idlwave-shell-halt-frame) 2308 (list (nth 0 idlwave-shell-halt-frame)
2309 (nth 1 idlwave-shell-halt-frame) 2309 (nth 1 idlwave-shell-halt-frame)
2310 (nth 2 idlwave-shell-halt-frame)))) 2310 (nth 2 idlwave-shell-halt-frame))))
2311 2311
@@ -2323,7 +2323,7 @@ column in the line. If NO-DEBUG is non-nil, do *not* toggle the electric
2323debug mode." 2323debug mode."
2324 (if (not frame) 2324 (if (not frame)
2325 ;; Remove stop-line overlay from old position 2325 ;; Remove stop-line overlay from old position
2326 (progn 2326 (progn
2327 (setq overlay-arrow-string nil) 2327 (setq overlay-arrow-string nil)
2328 (setq idlwave-shell-mode-line-info nil) 2328 (setq idlwave-shell-mode-line-info nil)
2329 (setq idlwave-shell-is-stopped nil) 2329 (setq idlwave-shell-is-stopped nil)
@@ -2340,10 +2340,10 @@ debug mode."
2340;;; 2340;;;
2341;;; buffer : the buffer to display a line in. 2341;;; buffer : the buffer to display a line in.
2342;;; select-shell: current buffer is the shell. 2342;;; select-shell: current buffer is the shell.
2343;;; 2343;;;
2344 (setq idlwave-shell-mode-line-info 2344 (setq idlwave-shell-mode-line-info
2345 (if (nth 2 frame) 2345 (if (nth 2 frame)
2346 (format "[%d:%s]" 2346 (format "[%d:%s]"
2347 (- idlwave-shell-calling-stack-index) 2347 (- idlwave-shell-calling-stack-index)
2348 (nth 2 frame)))) 2348 (nth 2 frame))))
2349 (let* ((buffer (idlwave-find-file-noselect (car frame) 'shell)) 2349 (let* ((buffer (idlwave-find-file-noselect (car frame) 'shell))
@@ -2367,7 +2367,7 @@ debug mode."
2367 (forward-line 0) 2367 (forward-line 0)
2368 (setq pos (point)) 2368 (setq pos (point))
2369 (setq idlwave-shell-is-stopped t) 2369 (setq idlwave-shell-is-stopped t)
2370 2370
2371 (if idlwave-shell-stop-line-overlay 2371 (if idlwave-shell-stop-line-overlay
2372 ;; Move overlay 2372 ;; Move overlay
2373 (move-overlay idlwave-shell-stop-line-overlay 2373 (move-overlay idlwave-shell-stop-line-overlay
@@ -2389,12 +2389,12 @@ debug mode."
2389 ;; If we have the column of the error, move the cursor there. 2389 ;; If we have the column of the error, move the cursor there.
2390 (if col (move-to-column col)) 2390 (if col (move-to-column col))
2391 (setq pos (point)) 2391 (setq pos (point))
2392 2392
2393 ;; Enter electric debug mode, if not prohibited and not in 2393 ;; Enter electric debug mode, if not prohibited and not in
2394 ;; it already 2394 ;; it already
2395 (when (and (or 2395 (when (and (or
2396 (eq idlwave-shell-automatic-electric-debug t) 2396 (eq idlwave-shell-automatic-electric-debug t)
2397 (and 2397 (and
2398 (eq idlwave-shell-automatic-electric-debug 'breakpoint) 2398 (eq idlwave-shell-automatic-electric-debug 'breakpoint)
2399 (not (eq idlwave-shell-current-state 'error)))) 2399 (not (eq idlwave-shell-current-state 'error))))
2400 (not no-debug) 2400 (not no-debug)
@@ -2402,14 +2402,14 @@ debug mode."
2402 (not idlwave-shell-electric-debug-mode)) 2402 (not idlwave-shell-electric-debug-mode))
2403 (idlwave-shell-electric-debug-mode) 2403 (idlwave-shell-electric-debug-mode)
2404 (setq electric t))) 2404 (setq electric t)))
2405 2405
2406 ;; Make sure pos is really displayed in the window. 2406 ;; Make sure pos is really displayed in the window.
2407 (set-window-point window pos) 2407 (set-window-point window pos)
2408 2408
2409 ;; If we came from the shell, go back there. Otherwise select 2409 ;; If we came from the shell, go back there. Otherwise select
2410 ;; the window where the error is displayed. 2410 ;; the window where the error is displayed.
2411 (if (or (and idlwave-shell-electric-zap-to-file electric) 2411 (if (or (and idlwave-shell-electric-zap-to-file electric)
2412 (and (equal (buffer-name) (idlwave-shell-buffer)) 2412 (and (equal (buffer-name) (idlwave-shell-buffer))
2413 (not select-shell))) 2413 (not select-shell)))
2414 (select-window window)))))) 2414 (select-window window))))))
2415 2415
@@ -2419,35 +2419,35 @@ debug mode."
2419 (interactive "p") 2419 (interactive "p")
2420 (or (not arg) (< arg 1) 2420 (or (not arg) (< arg 1)
2421 (setq arg 1)) 2421 (setq arg 1))
2422 (idlwave-shell-send-command 2422 (idlwave-shell-send-command
2423 (concat ".s " (if (integerp arg) (int-to-string arg) arg)) 2423 (concat ".s " (if (integerp arg) (int-to-string arg) arg))
2424 nil (if (idlwave-shell-hide-p 'debug) 'mostly) nil t)) 2424 nil (if (idlwave-shell-hide-p 'debug) 'mostly) nil t))
2425 2425
2426(defun idlwave-shell-stepover (arg) 2426(defun idlwave-shell-stepover (arg)
2427 "Stepover one source line. 2427 "Stepover one source line.
2428If given prefix argument ARG, step ARG source lines. 2428If given prefix argument ARG, step ARG source lines.
2429Uses IDL's stepover executive command which does not enter called functions." 2429Uses IDL's stepover executive command which does not enter called functions."
2430 (interactive "p") 2430 (interactive "p")
2431 (or (not arg) (< arg 1) 2431 (or (not arg) (< arg 1)
2432 (setq arg 1)) 2432 (setq arg 1))
2433 (idlwave-shell-send-command 2433 (idlwave-shell-send-command
2434 (concat ".so " (if (integerp arg) (int-to-string arg) arg)) 2434 (concat ".so " (if (integerp arg) (int-to-string arg) arg))
2435 nil (if (idlwave-shell-hide-p 'debug) 'mostly) nil t)) 2435 nil (if (idlwave-shell-hide-p 'debug) 'mostly) nil t))
2436 2436
2437(defun idlwave-shell-break-here (&optional count cmd condition no-show) 2437(defun idlwave-shell-break-here (&optional count cmd condition no-show)
2438 "Set breakpoint at current line. 2438 "Set breakpoint at current line.
2439 2439
2440If Count is nil then an ordinary breakpoint is set. We treat a count 2440If Count is nil then an ordinary breakpoint is set. We treat a count
2441of 1 as a temporary breakpoint using the ONCE keyword. Counts greater 2441of 1 as a temporary breakpoint using the ONCE keyword. Counts greater
2442than 1 use the IDL AFTER=count keyword to break only after reaching 2442than 1 use the IDL AFTER=count keyword to break only after reaching
2443the statement count times. 2443the statement count times.
2444 2444
2445Optional argument CMD is a list or function to evaluate upon reaching 2445Optional argument CMD is a list or function to evaluate upon reaching
2446the breakpoint." 2446the breakpoint."
2447 2447
2448 (interactive "P") 2448 (interactive "P")
2449 (when (listp count) 2449 (when (listp count)
2450 (if (equal (car count) 4) 2450 (if (equal (car count) 4)
2451 (setq condition (read-string "Break Condition: "))) 2451 (setq condition (read-string "Break Condition: ")))
2452 (setq count nil)) 2452 (setq count nil))
2453 (idlwave-shell-set-bp 2453 (idlwave-shell-set-bp
@@ -2470,7 +2470,7 @@ the problem with not being able to set the breakpoint."
2470 (progn 2470 (progn
2471 (if (progn 2471 (if (progn
2472 (beep) 2472 (beep)
2473 (y-or-n-p 2473 (y-or-n-p
2474 (concat "Okay to recompile file " 2474 (concat "Okay to recompile file "
2475 (idlwave-shell-bp-get bp 'file) " "))) 2475 (idlwave-shell-bp-get bp 'file) " ")))
2476 ;; Recompile 2476 ;; Recompile
@@ -2478,7 +2478,7 @@ the problem with not being able to set the breakpoint."
2478 ;; Clean up before retrying 2478 ;; Clean up before retrying
2479 (idlwave-shell-command-failure) 2479 (idlwave-shell-command-failure)
2480 (idlwave-shell-send-command 2480 (idlwave-shell-send-command
2481 (concat ".run " (idlwave-shell-bp-get bp 'file)) nil 2481 (concat ".run " (idlwave-shell-bp-get bp 'file)) nil
2482 (if (idlwave-shell-hide-p 'run) 'mostly) nil t) 2482 (if (idlwave-shell-hide-p 'run) 'mostly) nil t)
2483 ;; Try setting breakpoint again 2483 ;; Try setting breakpoint again
2484 (idlwave-shell-set-bp bp)) 2484 (idlwave-shell-set-bp bp))
@@ -2502,9 +2502,9 @@ breakpoint can not be set."
2502(defun idlwave-shell-cont (&optional no-show) 2502(defun idlwave-shell-cont (&optional no-show)
2503 "Continue executing." 2503 "Continue executing."
2504 (interactive) 2504 (interactive)
2505 (idlwave-shell-send-command ".c" (unless no-show 2505 (idlwave-shell-send-command ".c" (unless no-show
2506 '(idlwave-shell-redisplay 'hide)) 2506 '(idlwave-shell-redisplay 'hide))
2507 (if (idlwave-shell-hide-p 'debug) 'mostly) 2507 (if (idlwave-shell-hide-p 'debug) 'mostly)
2508 nil t)) 2508 nil t))
2509 2509
2510(defun idlwave-shell-go () 2510(defun idlwave-shell-go ()
@@ -2585,7 +2585,7 @@ at a breakpoint."
2585 ((eq force 'enable) (setq disabled t))) 2585 ((eq force 'enable) (setq disabled t)))
2586 (when bp 2586 (when bp
2587 (setf (nth 3 (cdr (cdr bp))) (not disabled)) 2587 (setf (nth 3 (cdr (cdr bp))) (not disabled))
2588 (idlwave-shell-send-command 2588 (idlwave-shell-send-command
2589 (concat "breakpoint," 2589 (concat "breakpoint,"
2590 (if disabled "/enable," "/disable,") 2590 (if disabled "/enable," "/disable,")
2591 (int-to-string (idlwave-shell-bp-get bp))) 2591 (int-to-string (idlwave-shell-bp-get bp)))
@@ -2599,13 +2599,13 @@ If ENABLE is non-nil, enable them instead."
2599 (while bpl 2599 (while bpl
2600 (setq disabled (idlwave-shell-bp-get (car bpl) 'disabled)) 2600 (setq disabled (idlwave-shell-bp-get (car bpl) 'disabled))
2601 (when (idlwave-xor (not disabled) (eq enable 'enable)) 2601 (when (idlwave-xor (not disabled) (eq enable 'enable))
2602 (idlwave-shell-toggle-enable-current-bp 2602 (idlwave-shell-toggle-enable-current-bp
2603 (car bpl) (if (eq enable 'enable) 'enable 'disable) no-update) 2603 (car bpl) (if (eq enable 'enable) 'enable 'disable) no-update)
2604 (push (car bpl) modified)) 2604 (push (car bpl) modified))
2605 (setq bpl (cdr bpl))) 2605 (setq bpl (cdr bpl)))
2606 (unless no-update (idlwave-shell-bp-query)) 2606 (unless no-update (idlwave-shell-bp-query))
2607 modified)) 2607 modified))
2608 2608
2609(defun idlwave-shell-to-here () 2609(defun idlwave-shell-to-here ()
2610 "Set a breakpoint with count 1 then continue." 2610 "Set a breakpoint with count 1 then continue."
2611 (interactive) 2611 (interactive)
@@ -2643,7 +2643,7 @@ in the current routine."
2643(defun idlwave-shell-set-bp-in-module (module) 2643(defun idlwave-shell-set-bp-in-module (module)
2644 "Set breakpoint in module. Assumes that `idlwave-shell-sources-alist' 2644 "Set breakpoint in module. Assumes that `idlwave-shell-sources-alist'
2645contains an entry for that module." 2645contains an entry for that module."
2646 (let ((source-file (car-safe 2646 (let ((source-file (car-safe
2647 (cdr-safe 2647 (cdr-safe
2648 (assoc (upcase module) 2648 (assoc (upcase module)
2649 idlwave-shell-sources-alist)))) 2649 idlwave-shell-sources-alist))))
@@ -2662,7 +2662,7 @@ contains an entry for that module."
2662 (save-excursion 2662 (save-excursion
2663 (goto-char (point-min)) 2663 (goto-char (point-min))
2664 (let ((case-fold-search t)) 2664 (let ((case-fold-search t))
2665 (if (re-search-forward 2665 (if (re-search-forward
2666 (concat "^[ \t]*\\(pro\\|function\\)[ \t]+" 2666 (concat "^[ \t]*\\(pro\\|function\\)[ \t]+"
2667 (downcase module) 2667 (downcase module)
2668 "[ \t\n,]") nil t) 2668 "[ \t\n,]") nil t)
@@ -2704,7 +2704,7 @@ Sets a breakpoint with count 1 at end of block, then continues."
2704 "Attempt to run until this procedure exits. 2704 "Attempt to run until this procedure exits.
2705Runs to the last statement and then steps 1 statement. Use the .out command." 2705Runs to the last statement and then steps 1 statement. Use the .out command."
2706 (interactive) 2706 (interactive)
2707 (idlwave-shell-send-command ".o" nil 2707 (idlwave-shell-send-command ".o" nil
2708 (if (idlwave-shell-hide-p 'debug) 'mostly) 2708 (if (idlwave-shell-hide-p 'debug) 'mostly)
2709 nil t)) 2709 nil t))
2710 2710
@@ -2751,7 +2751,7 @@ Runs to the last statement and then steps 1 statement. Use the .out command."
2751 (interactive "e") 2751 (interactive "e")
2752 (let ((transient-mark-mode t) 2752 (let ((transient-mark-mode t)
2753 (zmacs-regions t) 2753 (zmacs-regions t)
2754 (tracker (if (featurep 'xemacs) 2754 (tracker (if (featurep 'xemacs)
2755 (if (fboundp 'default-mouse-track-event-is-with-button) 2755 (if (fboundp 'default-mouse-track-event-is-with-button)
2756 'idlwave-xemacs-hack-mouse-track 2756 'idlwave-xemacs-hack-mouse-track
2757 'mouse-track) 2757 'mouse-track)
@@ -2769,7 +2769,7 @@ Runs to the last statement and then steps 1 statement. Use the .out command."
2769 (let ((oldfunc (symbol-function 'default-mouse-track-event-is-with-button))) 2769 (let ((oldfunc (symbol-function 'default-mouse-track-event-is-with-button)))
2770 (unwind-protect 2770 (unwind-protect
2771 (progn 2771 (progn
2772 (fset 'default-mouse-track-event-is-with-button 2772 (fset 'default-mouse-track-event-is-with-button
2773 'idlwave-default-mouse-track-event-is-with-button) 2773 'idlwave-default-mouse-track-event-is-with-button)
2774 (mouse-track event)) 2774 (mouse-track event))
2775 (fset 'default-mouse-track-event-is-with-button oldfunc)))) 2775 (fset 'default-mouse-track-event-is-with-button oldfunc))))
@@ -2801,7 +2801,7 @@ Runs to the last statement and then steps 1 statement. Use the .out command."
2801(defvar idlwave-shell-examine-completion-list nil) 2801(defvar idlwave-shell-examine-completion-list nil)
2802 2802
2803(defun idlwave-shell-print (arg &optional help ev complete-help-type) 2803(defun idlwave-shell-print (arg &optional help ev complete-help-type)
2804 "Print current expression. 2804 "Print current expression.
2805 2805
2806With HELP non-nil, show help on expression. If HELP is a string, 2806With HELP non-nil, show help on expression. If HELP is a string,
2807the expression will be put in place of ___, e.g.: 2807the expression will be put in place of ___, e.g.:
@@ -2834,11 +2834,11 @@ idlw-shell-examine-alist via mini-buffer shortcut key."
2834 (save-excursion 2834 (save-excursion
2835 (let* ((process (get-buffer-process (current-buffer))) 2835 (let* ((process (get-buffer-process (current-buffer)))
2836 (process-mark (if process (process-mark process))) 2836 (process-mark (if process (process-mark process)))
2837 (stack-label 2837 (stack-label
2838 (if (and (integerp idlwave-shell-calling-stack-index) 2838 (if (and (integerp idlwave-shell-calling-stack-index)
2839 (> idlwave-shell-calling-stack-index 0)) 2839 (> idlwave-shell-calling-stack-index 0))
2840 (format " [-%d:%s]" 2840 (format " [-%d:%s]"
2841 idlwave-shell-calling-stack-index 2841 idlwave-shell-calling-stack-index
2842 idlwave-shell-calling-stack-routine))) 2842 idlwave-shell-calling-stack-routine)))
2843 expr beg end cmd examine-hook) 2843 expr beg end cmd examine-hook)
2844 (cond 2844 (cond
@@ -2868,7 +2868,7 @@ idlw-shell-examine-alist via mini-buffer shortcut key."
2868 ;; an array 2868 ;; an array
2869 (forward-sexp)) 2869 (forward-sexp))
2870 (setq end (point))))) 2870 (setq end (point)))))
2871 2871
2872 ;; Get expression, but first move the begin mark if a 2872 ;; Get expression, but first move the begin mark if a
2873 ;; process-mark is inside the region, to keep the overlay from 2873 ;; process-mark is inside the region, to keep the overlay from
2874 ;; wandering in the Shell. 2874 ;; wandering in the Shell.
@@ -2879,17 +2879,17 @@ idlw-shell-examine-alist via mini-buffer shortcut key."
2879 2879
2880 ;; Show the overlay(s) and attach any necessary hooks and filters 2880 ;; Show the overlay(s) and attach any necessary hooks and filters
2881 (when (and beg end idlwave-shell-expression-overlay) 2881 (when (and beg end idlwave-shell-expression-overlay)
2882 (move-overlay idlwave-shell-expression-overlay beg end 2882 (move-overlay idlwave-shell-expression-overlay beg end
2883 (current-buffer)) 2883 (current-buffer))
2884 (add-hook 'pre-command-hook 2884 (add-hook 'pre-command-hook
2885 'idlwave-shell-delete-expression-overlay)) 2885 'idlwave-shell-delete-expression-overlay))
2886 (setq examine-hook 2886 (setq examine-hook
2887 (if idlwave-shell-separate-examine-output 2887 (if idlwave-shell-separate-examine-output
2888 'idlwave-shell-examine-display 2888 'idlwave-shell-examine-display
2889 'idlwave-shell-examine-highlight)) 2889 'idlwave-shell-examine-highlight))
2890 (add-hook 'pre-command-hook 2890 (add-hook 'pre-command-hook
2891 'idlwave-shell-delete-output-overlay) 2891 'idlwave-shell-delete-output-overlay)
2892 2892
2893 ;; Remove empty or comment-only lines 2893 ;; Remove empty or comment-only lines
2894 (while (string-match "\n[ \t]*\\(;.*\\)?\r*\n" expr) 2894 (while (string-match "\n[ \t]*\\(;.*\\)?\r*\n" expr)
2895 (setq expr (replace-match "\n" t t expr))) 2895 (setq expr (replace-match "\n" t t expr)))
@@ -2899,41 +2899,41 @@ idlw-shell-examine-alist via mini-buffer shortcut key."
2899 ;; Remove final newline 2899 ;; Remove final newline
2900 (if (string-match "\n[ \t\r]*\\'" expr) 2900 (if (string-match "\n[ \t\r]*\\'" expr)
2901 (setq expr (replace-match "" t t expr))) 2901 (setq expr (replace-match "" t t expr)))
2902 2902
2903 (catch 'exit 2903 (catch 'exit
2904 ;; Pop-up or complete on the examine selection list, if appropriate 2904 ;; Pop-up or complete on the examine selection list, if appropriate
2905 (if (or 2905 (if (or
2906 complete-help-type 2906 complete-help-type
2907 (and ev idlwave-shell-examine-alist) 2907 (and ev idlwave-shell-examine-alist)
2908 (consp help)) 2908 (consp help))
2909 (let ((help-cons 2909 (let ((help-cons
2910 (if (consp help) help 2910 (if (consp help) help
2911 (assoc 2911 (assoc
2912 ;; A cons from either a pop-up or mini-buffer completion 2912 ;; A cons from either a pop-up or mini-buffer completion
2913 (if complete-help-type 2913 (if complete-help-type
2914 (idlwave-one-key-select 'idlwave-shell-examine-alist 2914 (idlwave-one-key-select 'idlwave-shell-examine-alist
2915 "Examine with: " 1.5) 2915 "Examine with: " 1.5)
2916;; (idlwave-completing-read 2916;; (idlwave-completing-read
2917;; "Examine with: " 2917;; "Examine with: "
2918;; idlwave-shell-examine-alist nil nil nil 2918;; idlwave-shell-examine-alist nil nil nil
2919;; 'idlwave-shell-examine-completion-list 2919;; 'idlwave-shell-examine-completion-list
2920;; "Print") 2920;; "Print")
2921 (idlwave-popup-select 2921 (idlwave-popup-select
2922 ev 2922 ev
2923 (mapcar 'car idlwave-shell-examine-alist) 2923 (mapcar 'car idlwave-shell-examine-alist)
2924 "Examine with")) 2924 "Examine with"))
2925 idlwave-shell-examine-alist)))) 2925 idlwave-shell-examine-alist))))
2926 (setq help (cdr help-cons)) 2926 (setq help (cdr help-cons))
2927 (if (null help) (throw 'exit nil)) 2927 (if (null help) (throw 'exit nil))
2928 (if idlwave-shell-separate-examine-output 2928 (if idlwave-shell-separate-examine-output
2929 (setq idlwave-shell-examine-label 2929 (setq idlwave-shell-examine-label
2930 (concat 2930 (concat
2931 (format "==>%s<==\n%s:" expr (car help-cons)) 2931 (format "==>%s<==\n%s:" expr (car help-cons))
2932 stack-label "\n")))) 2932 stack-label "\n"))))
2933 ;; The regular help label (no popups, cons cells, etc.) 2933 ;; The regular help label (no popups, cons cells, etc.)
2934 (setq idlwave-shell-examine-label 2934 (setq idlwave-shell-examine-label
2935 (concat 2935 (concat
2936 (format "==>%s<==\n%s:" expr 2936 (format "==>%s<==\n%s:" expr
2937 (cond ((null help) "print") 2937 (cond ((null help) "print")
2938 ((stringp help) help) 2938 ((stringp help) help)
2939 (t (symbol-name help)))) 2939 (t (symbol-name help))))
@@ -2946,9 +2946,9 @@ idlw-shell-examine-alist via mini-buffer shortcut key."
2946 idlwave-shell-calling-stack-index))) 2946 idlwave-shell-calling-stack-index)))
2947 (setq cmd (idlwave-shell-help-statement help expr)) 2947 (setq cmd (idlwave-shell-help-statement help expr))
2948 ;;(idlwave-shell-recenter-shell-window) 2948 ;;(idlwave-shell-recenter-shell-window)
2949 (idlwave-shell-send-command 2949 (idlwave-shell-send-command
2950 cmd 2950 cmd
2951 examine-hook 2951 examine-hook
2952 (if idlwave-shell-separate-examine-output 'hide)))))) 2952 (if idlwave-shell-separate-examine-output 'hide))))))
2953 2953
2954(defvar idlwave-shell-examine-window-alist nil 2954(defvar idlwave-shell-examine-window-alist nil
@@ -2975,9 +2975,9 @@ idlw-shell-examine-alist via mini-buffer shortcut key."
2975 (let* ((end (or 2975 (let* ((end (or
2976 (re-search-backward idlwave-shell-prompt-pattern nil t) 2976 (re-search-backward idlwave-shell-prompt-pattern nil t)
2977 (point-max))) 2977 (point-max)))
2978 (beg (progn 2978 (beg (progn
2979 (goto-char 2979 (goto-char
2980 (or (progn (if (re-search-backward 2980 (or (progn (if (re-search-backward
2981 idlwave-shell-prompt-pattern nil t) 2981 idlwave-shell-prompt-pattern nil t)
2982 (match-end 0))) 2982 (match-end 0)))
2983 (point-min))) 2983 (point-min)))
@@ -2994,21 +2994,21 @@ idlw-shell-examine-alist via mini-buffer shortcut key."
2994 (setq buffer-read-only t) 2994 (setq buffer-read-only t)
2995 (move-overlay idlwave-shell-output-overlay cur-beg cur-end 2995 (move-overlay idlwave-shell-output-overlay cur-beg cur-end
2996 (current-buffer)) 2996 (current-buffer))
2997 2997
2998 ;; Look for the examine buffer in all windows. If one is 2998 ;; Look for the examine buffer in all windows. If one is
2999 ;; found in a frame all by itself, use that, otherwise, switch 2999 ;; found in a frame all by itself, use that, otherwise, switch
3000 ;; to or create an examine window in this frame, and resize if 3000 ;; to or create an examine window in this frame, and resize if
3001 ;; it's a newly created window 3001 ;; it's a newly created window
3002 (let* ((winlist (get-buffer-window-list "*Examine*" nil 'visible))) 3002 (let* ((winlist (get-buffer-window-list "*Examine*" nil 'visible)))
3003 (setq win (idlwave-display-buffer 3003 (setq win (idlwave-display-buffer
3004 "*Examine*" 3004 "*Examine*"
3005 nil 3005 nil
3006 (let ((list winlist) thiswin) 3006 (let ((list winlist) thiswin)
3007 (catch 'exit 3007 (catch 'exit
3008 (save-selected-window 3008 (save-selected-window
3009 (while (setq thiswin (pop list)) 3009 (while (setq thiswin (pop list))
3010 (select-window thiswin) 3010 (select-window thiswin)
3011 (if (one-window-p) 3011 (if (one-window-p)
3012 (throw 'exit (window-frame thiswin))))))))) 3012 (throw 'exit (window-frame thiswin)))))))))
3013 (set-window-start win (point-min)) ; Ensure the point is visible. 3013 (set-window-start win (point-min)) ; Ensure the point is visible.
3014 (save-selected-window 3014 (save-selected-window
@@ -3029,7 +3029,7 @@ idlw-shell-examine-alist via mini-buffer shortcut key."
3029 ;; And add the new value. 3029 ;; And add the new value.
3030 (if (setq elt (assoc win idlwave-shell-examine-window-alist)) 3030 (if (setq elt (assoc win idlwave-shell-examine-window-alist))
3031 (setcdr elt (window-height)) 3031 (setcdr elt (window-height))
3032 (add-to-list 'idlwave-shell-examine-window-alist 3032 (add-to-list 'idlwave-shell-examine-window-alist
3033 (cons win (window-height))))))))) 3033 (cons win (window-height)))))))))
3034 ;; Recenter for maximum output, after widened 3034 ;; Recenter for maximum output, after widened
3035 (save-selected-window 3035 (save-selected-window
@@ -3047,7 +3047,7 @@ idlw-shell-examine-alist via mini-buffer shortcut key."
3047 3047
3048(defun idlwave-shell-examine-display-clear () 3048(defun idlwave-shell-examine-display-clear ()
3049 (interactive) 3049 (interactive)
3050 (save-excursion 3050 (save-excursion
3051 (let ((buf (get-buffer "*Examine*"))) 3051 (let ((buf (get-buffer "*Examine*")))
3052 (when (bufferp buf) 3052 (when (bufferp buf)
3053 (set-buffer buf) 3053 (set-buffer buf)
@@ -3075,7 +3075,7 @@ versions of IDL."
3075 ;; break. We will look for identifiers and exclude cases where we 3075 ;; break. We will look for identifiers and exclude cases where we
3076 ;; know it is not a variable. To distinguish array references from 3076 ;; know it is not a variable. To distinguish array references from
3077 ;; function calls, we require that arrays use [] instead of () 3077 ;; function calls, we require that arrays use [] instead of ()
3078 3078
3079 (while (string-match 3079 (while (string-match
3080 "\\(\\`\\|[^a-zA-Z0-9$_][ \t]*\\)\\([a-zA-Z][a-zA-Z0-9$_]*\\)\\([ \t]*[^a-zA-Z0-9$_]\\|\\'\\)" expr start) 3080 "\\(\\`\\|[^a-zA-Z0-9$_][ \t]*\\)\\([a-zA-Z][a-zA-Z0-9$_]*\\)\\([ \t]*[^a-zA-Z0-9$_]\\|\\'\\)" expr start)
3081 (setq var (match-string 2 expr) 3081 (setq var (match-string 2 expr)
@@ -3091,7 +3091,7 @@ versions of IDL."
3091 ((string-match "->[ \t]*\\'" pre)) ;; a method 3091 ((string-match "->[ \t]*\\'" pre)) ;; a method
3092 ((string-match "\\.\\'" pre)) ;; structure member 3092 ((string-match "\\.\\'" pre)) ;; structure member
3093 ((and (string-match "\\([\"\']\\)[^\1]*$" pre) 3093 ((and (string-match "\\([\"\']\\)[^\1]*$" pre)
3094 (string-match (concat "^[^" (match-string 1 pre) "]*" 3094 (string-match (concat "^[^" (match-string 1 pre) "]*"
3095 (match-string 1 pre)) post))) 3095 (match-string 1 pre)) post)))
3096 (t ;; seems to be a variable - replace its name in the 3096 (t ;; seems to be a variable - replace its name in the
3097 ;; expression with the fetch. 3097 ;; expression with the fetch.
@@ -3109,13 +3109,13 @@ to insert expression in place of the marker ___, e.g.: print,
3109size(___,/DIMENSIONS)" 3109size(___,/DIMENSIONS)"
3110 (cond 3110 (cond
3111 ((null help) (concat "print, " expr)) 3111 ((null help) (concat "print, " expr))
3112 ((stringp help) 3112 ((stringp help)
3113 (if (string-match "\\(^\\|[^_]\\)\\(___\\)\\([^_]\\|$\\)" help) 3113 (if (string-match "\\(^\\|[^_]\\)\\(___\\)\\([^_]\\|$\\)" help)
3114 (concat (substring help 0 (match-beginning 2)) 3114 (concat (substring help 0 (match-beginning 2))
3115 expr 3115 expr
3116 (substring help (match-end 2))))) 3116 (substring help (match-end 2)))))
3117 (t (concat "help, " expr)))) 3117 (t (concat "help, " expr))))
3118 3118
3119 3119
3120(defun idlwave-shell-examine-highlight () 3120(defun idlwave-shell-examine-highlight ()
3121 "Highlight the most recent IDL output." 3121 "Highlight the most recent IDL output."
@@ -3123,7 +3123,7 @@ size(___,/DIMENSIONS)"
3123 (process (get-buffer-process buffer)) 3123 (process (get-buffer-process buffer))
3124 (process-mark (if process (process-mark process))) 3124 (process-mark (if process (process-mark process)))
3125 output-begin output-end) 3125 output-begin output-end)
3126 (save-excursion 3126 (save-excursion
3127 (set-buffer buffer) 3127 (set-buffer buffer)
3128 (goto-char process-mark) 3128 (goto-char process-mark)
3129 (beginning-of-line) 3129 (beginning-of-line)
@@ -3131,12 +3131,12 @@ size(___,/DIMENSIONS)"
3131 (re-search-backward idlwave-shell-prompt-pattern nil t) 3131 (re-search-backward idlwave-shell-prompt-pattern nil t)
3132 (beginning-of-line 2) 3132 (beginning-of-line 2)
3133 (setq output-begin (point))) 3133 (setq output-begin (point)))
3134 3134
3135 ;; First make sure the shell window is visible 3135 ;; First make sure the shell window is visible
3136 (idlwave-display-buffer (idlwave-shell-buffer) 3136 (idlwave-display-buffer (idlwave-shell-buffer)
3137 nil (idlwave-shell-shell-frame)) 3137 nil (idlwave-shell-shell-frame))
3138 (if (and idlwave-shell-output-overlay process-mark) 3138 (if (and idlwave-shell-output-overlay process-mark)
3139 (move-overlay idlwave-shell-output-overlay 3139 (move-overlay idlwave-shell-output-overlay
3140 output-begin output-end buffer)))) 3140 output-begin output-end buffer))))
3141 3141
3142(defun idlwave-shell-delete-output-overlay () 3142(defun idlwave-shell-delete-output-overlay ()
@@ -3147,7 +3147,7 @@ size(___,/DIMENSIONS)"
3147 (delete-overlay idlwave-shell-output-overlay)) 3147 (delete-overlay idlwave-shell-output-overlay))
3148 (error nil)) 3148 (error nil))
3149 (remove-hook 'pre-command-hook 'idlwave-shell-delete-output-overlay))) 3149 (remove-hook 'pre-command-hook 'idlwave-shell-delete-output-overlay)))
3150 3150
3151(defun idlwave-shell-delete-expression-overlay () 3151(defun idlwave-shell-delete-expression-overlay ()
3152 (unless (or (eq this-command 'idlwave-shell-mouse-nop) 3152 (unless (or (eq this-command 'idlwave-shell-mouse-nop)
3153 (eq this-command 'handle-switch-frame)) 3153 (eq this-command 'handle-switch-frame))
@@ -3176,7 +3176,7 @@ contains four items:
3176count - number of times to execute breakpoint. When count reaches 0 3176count - number of times to execute breakpoint. When count reaches 0
3177 the breakpoint is cleared and removed from the alist. 3177 the breakpoint is cleared and removed from the alist.
3178 3178
3179command - command to execute when breakpoint is reached, either a 3179command - command to execute when breakpoint is reached, either a
3180 lisp function to be called with `funcall' with no arguments or a 3180 lisp function to be called with `funcall' with no arguments or a
3181 list to be evaluated with `eval'. 3181 list to be evaluated with `eval'.
3182 3182
@@ -3209,11 +3209,11 @@ If there is a prefix argument, display IDL process."
3209 (insert "\nend\n")) 3209 (insert "\nend\n"))
3210 (save-buffer 0))) 3210 (save-buffer 0)))
3211 (idlwave-shell-send-command (concat ".run " idlwave-shell-temp-pro-file) 3211 (idlwave-shell-send-command (concat ".run " idlwave-shell-temp-pro-file)
3212 nil 3212 nil
3213 (if (idlwave-shell-hide-p 'run) 'mostly) 3213 (if (idlwave-shell-hide-p 'run) 'mostly)
3214 nil t) 3214 nil t)
3215 (if n 3215 (if n
3216 (idlwave-display-buffer (idlwave-shell-buffer) 3216 (idlwave-display-buffer (idlwave-shell-buffer)
3217 nil (idlwave-shell-shell-frame)))) 3217 nil (idlwave-shell-shell-frame))))
3218 3218
3219(defun idlwave-shell-evaluate-region (beg end &optional n) 3219(defun idlwave-shell-evaluate-region (beg end &optional n)
@@ -3224,7 +3224,7 @@ Does not work for a region with multiline blocks - use
3224 (interactive "r\nP") 3224 (interactive "r\nP")
3225 (idlwave-shell-send-command (buffer-substring beg end)) 3225 (idlwave-shell-send-command (buffer-substring beg end))
3226 (if n 3226 (if n
3227 (idlwave-display-buffer (idlwave-shell-buffer) 3227 (idlwave-display-buffer (idlwave-shell-buffer)
3228 nil (idlwave-shell-shell-frame)))) 3228 nil (idlwave-shell-shell-frame))))
3229 3229
3230(defun idlwave-shell-delete-temp-files () 3230(defun idlwave-shell-delete-temp-files ()
@@ -3279,7 +3279,7 @@ Queries IDL using the string in `idlwave-shell-bp-query'."
3279 'hide)) 3279 'hide))
3280 3280
3281(defun idlwave-shell-bp-get (bp &optional item) 3281(defun idlwave-shell-bp-get (bp &optional item)
3282 "Get a value for a breakpoint. 3282 "Get a value for a breakpoint.
3283BP has the form of elements in idlwave-shell-bp-alist. Optional 3283BP has the form of elements in idlwave-shell-bp-alist. Optional
3284second arg ITEM is the particular value to retrieve. ITEM can be 3284second arg ITEM is the particular value to retrieve. ITEM can be
3285'file, 'line, 'index, 'module, 'count, 'cmd, 'condition, 'disabled or 3285'file, 'line, 'index, 'module, 'count, 'cmd, 'condition, 'disabled or
@@ -3314,8 +3314,8 @@ breakpoint overlays."
3314 ;; Searching the breakpoints 3314 ;; Searching the breakpoints
3315 ;; In IDL 5.5, the breakpoint reporting format changed. 3315 ;; In IDL 5.5, the breakpoint reporting format changed.
3316 (bp-re54 "^[ \t]*\\([0-9]+\\)[ \t]+\\(\\S-+\\)?[ \t]+\\([0-9]+\\)[ \t]+\\(\\S-+\\)") 3316 (bp-re54 "^[ \t]*\\([0-9]+\\)[ \t]+\\(\\S-+\\)?[ \t]+\\([0-9]+\\)[ \t]+\\(\\S-+\\)")
3317 (bp-re55 3317 (bp-re55
3318 (concat 3318 (concat
3319 "^\\s-*\\([0-9]+\\)" ; 1 index 3319 "^\\s-*\\([0-9]+\\)" ; 1 index
3320 "\\s-+\\([0-9]+\\)" ; 2 line number 3320 "\\s-+\\([0-9]+\\)" ; 2 line number
3321 "\\s-+\\(Uncompiled\\|" ; 3-6 either uncompiled or routine name 3321 "\\s-+\\(Uncompiled\\|" ; 3-6 either uncompiled or routine name
@@ -3330,27 +3330,27 @@ breakpoint overlays."
3330 bp-re indmap) 3330 bp-re indmap)
3331 (setq idlwave-shell-bp-alist (list nil)) 3331 (setq idlwave-shell-bp-alist (list nil))
3332 ;; Search for either header type, and set the correct regexp 3332 ;; Search for either header type, and set the correct regexp
3333 (when (or 3333 (when (or
3334 (if (re-search-forward "^\\s-*Index.*\n\\s-*-" nil t) 3334 (if (re-search-forward "^\\s-*Index.*\n\\s-*-" nil t)
3335 (setq bp-re bp-re54 ; versions <= 5.4 3335 (setq bp-re bp-re54 ; versions <= 5.4
3336 indmap '(1 2 3 4))) ;index module line file 3336 indmap '(1 2 3 4))) ;index module line file
3337 (if (re-search-forward 3337 (if (re-search-forward
3338 "^\\s-*Index\\s-*Line\\s-*Attributes\\s-*File" nil t) 3338 "^\\s-*Index\\s-*Line\\s-*Attributes\\s-*File" nil t)
3339 (setq bp-re bp-re55 ; versions >= 5.5 3339 (setq bp-re bp-re55 ; versions >= 5.5
3340 indmap '(1 6 2 16)))) ; index module line file 3340 indmap '(1 6 2 16)))) ; index module line file
3341 ;; There seems to be a breakpoint listing here, parse breakpoint lines. 3341 ;; There seems to be a breakpoint listing here, parse breakpoint lines.
3342 (while (re-search-forward bp-re nil t) 3342 (while (re-search-forward bp-re nil t)
3343 (setq index (string-to-int (match-string (nth 0 indmap))) 3343 (setq index (string-to-number (match-string (nth 0 indmap)))
3344 module (match-string (nth 1 indmap)) 3344 module (match-string (nth 1 indmap))
3345 line (string-to-int (match-string (nth 2 indmap))) 3345 line (string-to-number (match-string (nth 2 indmap)))
3346 file (idlwave-shell-file-name (match-string (nth 3 indmap)))) 3346 file (idlwave-shell-file-name (match-string (nth 3 indmap))))
3347 (if (eq bp-re bp-re55) 3347 (if (eq bp-re bp-re55)
3348 (setq count (if (match-string 10) 1 3348 (setq count (if (match-string 10) 1
3349 (if (match-string 8) 3349 (if (match-string 8)
3350 (string-to-int (match-string 8)))) 3350 (string-to-number (match-string 8))))
3351 condition (match-string 13) 3351 condition (match-string 13)
3352 disabled (not (null (match-string 15))))) 3352 disabled (not (null (match-string 15)))))
3353 3353
3354 ;; Add the breakpoint info to the list 3354 ;; Add the breakpoint info to the list
3355 (nconc idlwave-shell-bp-alist 3355 (nconc idlwave-shell-bp-alist
3356 (list (cons (list file line) 3356 (list (cons (list file line)
@@ -3360,7 +3360,7 @@ breakpoint overlays."
3360 count nil condition disabled)))))) 3360 count nil condition disabled))))))
3361 (setq idlwave-shell-bp-alist (cdr idlwave-shell-bp-alist)) 3361 (setq idlwave-shell-bp-alist (cdr idlwave-shell-bp-alist))
3362 ;; Update breakpoint data 3362 ;; Update breakpoint data
3363 (if (eq bp-re bp-re54) 3363 (if (eq bp-re bp-re54)
3364 (mapcar 'idlwave-shell-update-bp old-bp-alist) 3364 (mapcar 'idlwave-shell-update-bp old-bp-alist)
3365 (mapcar 'idlwave-shell-update-bp-command-only old-bp-alist)))) 3365 (mapcar 'idlwave-shell-update-bp-command-only old-bp-alist))))
3366 ;; Update the breakpoint overlays 3366 ;; Update the breakpoint overlays
@@ -3375,8 +3375,8 @@ breakpoint overlays."
3375 "Update BP data in breakpoint list. 3375 "Update BP data in breakpoint list.
3376If BP frame is in `idlwave-shell-bp-alist' updates the breakpoint data." 3376If BP frame is in `idlwave-shell-bp-alist' updates the breakpoint data."
3377 (let ((match (assoc (car bp) idlwave-shell-bp-alist))) 3377 (let ((match (assoc (car bp) idlwave-shell-bp-alist)))
3378 (if match 3378 (if match
3379 (if command-only 3379 (if command-only
3380 (setf (nth 1 (cdr (cdr match))) (nth 1 (cdr (cdr match)))) 3380 (setf (nth 1 (cdr (cdr match))) (nth 1 (cdr (cdr match))))
3381 (setcdr (cdr match) (cdr (cdr bp))))))) 3381 (setcdr (cdr match) (cdr (cdr bp)))))))
3382 3382
@@ -3401,7 +3401,7 @@ Otherwise return the filename in bp."
3401 (let* 3401 (let*
3402 ((bp-file (idlwave-shell-bp-get bp 'file)) 3402 ((bp-file (idlwave-shell-bp-get bp 'file))
3403 (bp-module (idlwave-shell-bp-get bp 'module)) 3403 (bp-module (idlwave-shell-bp-get bp 'module))
3404 (internal-file-list 3404 (internal-file-list
3405 (cdr (assoc bp-module idlwave-shell-sources-alist)))) 3405 (cdr (assoc bp-module idlwave-shell-sources-alist))))
3406 (if (and internal-file-list 3406 (if (and internal-file-list
3407 (equal bp-file (nth 0 internal-file-list))) 3407 (equal bp-file (nth 0 internal-file-list)))
@@ -3409,14 +3409,14 @@ Otherwise return the filename in bp."
3409 bp-file))) 3409 bp-file)))
3410 3410
3411(defun idlwave-shell-set-bp (bp &optional no-show) 3411(defun idlwave-shell-set-bp (bp &optional no-show)
3412 "Try to set a breakpoint BP. 3412 "Try to set a breakpoint BP.
3413The breakpoint will be placed at the beginning of the statement on the 3413The breakpoint will be placed at the beginning of the statement on the
3414line specified by BP or at the next IDL statement if that line is not 3414line specified by BP or at the next IDL statement if that line is not
3415a statement. Determines IDL's internal representation for the 3415a statement. Determines IDL's internal representation for the
3416breakpoint, which may have occurred at a different line than 3416breakpoint, which may have occurred at a different line than
3417specified. If NO-SHOW is non-nil, don't do any updating." 3417specified. If NO-SHOW is non-nil, don't do any updating."
3418 ;; Get and save the old breakpoints 3418 ;; Get and save the old breakpoints
3419 (idlwave-shell-send-command 3419 (idlwave-shell-send-command
3420 idlwave-shell-bp-query 3420 idlwave-shell-bp-query
3421 `(progn 3421 `(progn
3422 (idlwave-shell-filter-bp (quote ,no-show)) 3422 (idlwave-shell-filter-bp (quote ,no-show))
@@ -3434,7 +3434,7 @@ specified. If NO-SHOW is non-nil, don't do any updating."
3434(defun idlwave-shell-set-bp2 (bp &optional no-show) 3434(defun idlwave-shell-set-bp2 (bp &optional no-show)
3435 "Use results of breakpoint and sources query to set bp. 3435 "Use results of breakpoint and sources query to set bp.
3436Use the count argument with IDLs breakpoint command. 3436Use the count argument with IDLs breakpoint command.
3437We treat a count of 1 as a temporary breakpoint. 3437We treat a count of 1 as a temporary breakpoint.
3438Counts greater than 1 use the IDL AFTER=count keyword to break 3438Counts greater than 1 use the IDL AFTER=count keyword to break
3439only after reaching the statement count times." 3439only after reaching the statement count times."
3440 (let* 3440 (let*
@@ -3446,11 +3446,11 @@ only after reaching the statement count times."
3446 ((> arg 1) 3446 ((> arg 1)
3447 (format ",after=%d" arg)))) 3447 (format ",after=%d" arg))))
3448 (condition (idlwave-shell-bp-get bp 'condition)) 3448 (condition (idlwave-shell-bp-get bp 'condition))
3449 (key (concat key 3449 (key (concat key
3450 (if condition (concat ",CONDITION=\"" condition "\"")))) 3450 (if condition (concat ",CONDITION=\"" condition "\""))))
3451 (line (idlwave-shell-bp-get bp 'line))) 3451 (line (idlwave-shell-bp-get bp 'line)))
3452 (idlwave-shell-send-command 3452 (idlwave-shell-send-command
3453 (concat "breakpoint,'" 3453 (concat "breakpoint,'"
3454 (idlwave-shell-sources-bp bp) "'," 3454 (idlwave-shell-sources-bp bp) "',"
3455 (if (integerp line) (setq line (int-to-string line))) 3455 (if (integerp line) (setq line (int-to-string line)))
3456 key) 3456 key)
@@ -3534,14 +3534,14 @@ Existing overlays are recycled, in order to minimize consumption."
3534 ov ov-list bp buf old-buffers win) 3534 ov ov-list bp buf old-buffers win)
3535 3535
3536 ;; Delete the old overlays from their buffers 3536 ;; Delete the old overlays from their buffers
3537 (if ov-alist 3537 (if ov-alist
3538 (while (setq ov-list (pop ov-alist)) 3538 (while (setq ov-list (pop ov-alist))
3539 (while (setq ov (pop (cdr ov-list))) 3539 (while (setq ov (pop (cdr ov-list)))
3540 (add-to-list 'old-buffers (overlay-buffer ov)) 3540 (add-to-list 'old-buffers (overlay-buffer ov))
3541 (delete-overlay ov)))) 3541 (delete-overlay ov))))
3542 3542
3543 (setq ov-alist idlwave-shell-bp-overlays 3543 (setq ov-alist idlwave-shell-bp-overlays
3544 idlwave-shell-bp-overlays 3544 idlwave-shell-bp-overlays
3545 (if idlwave-shell-bp-glyph 3545 (if idlwave-shell-bp-glyph
3546 (mapcar 'list (mapcar 'car idlwave-shell-bp-glyph)) 3546 (mapcar 'list (mapcar 'car idlwave-shell-bp-glyph))
3547 (list (list 'bp)))) 3547 (list (list 'bp))))
@@ -3565,7 +3565,7 @@ Existing overlays are recycled, in order to minimize consumption."
3565 (t 'bp-n))) 3565 (t 'bp-n)))
3566 (t 'bp)) 3566 (t 'bp))
3567 'bp)) 3567 'bp))
3568 (help-list 3568 (help-list
3569 (delq nil 3569 (delq nil
3570 (list 3570 (list
3571 (if count 3571 (if count
@@ -3573,7 +3573,7 @@ Existing overlays are recycled, in order to minimize consumption."
3573 (if condition 3573 (if condition
3574 (concat "condition: " condition)) 3574 (concat "condition: " condition))
3575 (if disabled "disabled")))) 3575 (if disabled "disabled"))))
3576 (help-text (if help-list 3576 (help-text (if help-list
3577 (mapconcat 'identity help-list ","))) 3577 (mapconcat 'identity help-list ",")))
3578 (full-type (if disabled 3578 (full-type (if disabled
3579 (intern (concat (symbol-name type) 3579 (intern (concat (symbol-name type)
@@ -3582,7 +3582,7 @@ Existing overlays are recycled, in order to minimize consumption."
3582 (ov-existing (assq full-type ov-alist)) 3582 (ov-existing (assq full-type ov-alist))
3583 (ov (or (and (cdr ov-existing) 3583 (ov (or (and (cdr ov-existing)
3584 (pop (cdr ov-existing))) 3584 (pop (cdr ov-existing)))
3585 (idlwave-shell-make-new-bp-overlay 3585 (idlwave-shell-make-new-bp-overlay
3586 type disabled help-text))) 3586 type disabled help-text)))
3587 match) 3587 match)
3588 (move-overlay ov beg end) 3588 (move-overlay ov beg end)
@@ -3592,7 +3592,7 @@ Existing overlays are recycled, in order to minimize consumption."
3592 (list (list full-type ov))))) 3592 (list (list full-type ov)))))
3593 ;; Take care of margins if using a glyph 3593 ;; Take care of margins if using a glyph
3594 (when use-glyph 3594 (when use-glyph
3595 (if old-buffers 3595 (if old-buffers
3596 (setq old-buffers (delq (current-buffer) old-buffers))) 3596 (setq old-buffers (delq (current-buffer) old-buffers)))
3597 (if (fboundp 'set-specifier) ;; XEmacs 3597 (if (fboundp 'set-specifier) ;; XEmacs
3598 (set-specifier left-margin-width (cons (current-buffer) 2)) 3598 (set-specifier left-margin-width (cons (current-buffer) 2))
@@ -3610,7 +3610,7 @@ Existing overlays are recycled, in order to minimize consumption."
3610 3610
3611 3611
3612(defun idlwave-shell-make-new-bp-overlay (&optional type disabled help) 3612(defun idlwave-shell-make-new-bp-overlay (&optional type disabled help)
3613 "Make a new overlay for highlighting breakpoints. 3613 "Make a new overlay for highlighting breakpoints.
3614 3614
3615This stuff is strongly dependant upon the version of Emacs. If TYPE 3615This stuff is strongly dependant upon the version of Emacs. If TYPE
3616is passed, make an overlay of that type ('bp or 'bp-cond, currently 3616is passed, make an overlay of that type ('bp or 'bp-cond, currently
@@ -3620,17 +3620,17 @@ text popup."
3620 (use-glyph (and (memq idlwave-shell-mark-breakpoints '(t glyph)) 3620 (use-glyph (and (memq idlwave-shell-mark-breakpoints '(t glyph))
3621 idlwave-shell-bp-glyph)) 3621 idlwave-shell-bp-glyph))
3622 (type (or type 'bp)) 3622 (type (or type 'bp))
3623 (face (if disabled 3623 (face (if disabled
3624 idlwave-shell-disabled-breakpoint-face 3624 idlwave-shell-disabled-breakpoint-face
3625 idlwave-shell-breakpoint-face))) 3625 idlwave-shell-breakpoint-face)))
3626 (if (featurep 'xemacs) 3626 (if (featurep 'xemacs)
3627 ;; This is XEmacs 3627 ;; This is XEmacs
3628 (progn 3628 (progn
3629 (cond 3629 (cond
3630 ;; tty's cannot display glyphs 3630 ;; tty's cannot display glyphs
3631 ((eq (console-type) 'tty) 3631 ((eq (console-type) 'tty)
3632 (set-extent-property ov 'face face)) 3632 (set-extent-property ov 'face face))
3633 3633
3634 ;; use the glyph 3634 ;; use the glyph
3635 (use-glyph 3635 (use-glyph
3636 (let ((glyph (cdr (assq type idlwave-shell-bp-glyph)))) 3636 (let ((glyph (cdr (assq type idlwave-shell-bp-glyph))))
@@ -3651,13 +3651,13 @@ text popup."
3651 (if use-glyph 3651 (if use-glyph
3652 (let ((image-props (cdr (assq type idlwave-shell-bp-glyph))) 3652 (let ((image-props (cdr (assq type idlwave-shell-bp-glyph)))
3653 string) 3653 string)
3654 3654
3655 (if disabled (setq image-props 3655 (if disabled (setq image-props
3656 (append image-props 3656 (append image-props
3657 (list :conversion 'disabled)))) 3657 (list :conversion 'disabled))))
3658 (setq string 3658 (setq string
3659 (propertize "@" 3659 (propertize "@"
3660 'display 3660 'display
3661 (list (list 'margin 'left-margin) 3661 (list (list 'margin 'left-margin)
3662 image-props) 3662 image-props)
3663 'mouse-face 'highlight 3663 'mouse-face 'highlight
@@ -3685,14 +3685,14 @@ text popup."
3685Also with prefix arg, ask for the command. You can also use the command 3685Also with prefix arg, ask for the command. You can also use the command
3686`idlwave-shell-edit-default-command-line' to edit the line." 3686`idlwave-shell-edit-default-command-line' to edit the line."
3687 (interactive "P") 3687 (interactive "P")
3688 (cond 3688 (cond
3689 ((equal arg '(16)) 3689 ((equal arg '(16))
3690 (setq idlwave-shell-command-line-to-execute nil)) 3690 (setq idlwave-shell-command-line-to-execute nil))
3691 ((equal arg '(4)) 3691 ((equal arg '(4))
3692 (setq idlwave-shell-command-line-to-execute 3692 (setq idlwave-shell-command-line-to-execute
3693 (read-string "IDL> " idlwave-shell-command-line-to-execute)))) 3693 (read-string "IDL> " idlwave-shell-command-line-to-execute))))
3694 (idlwave-shell-reset 'hidden) 3694 (idlwave-shell-reset 'hidden)
3695 (idlwave-shell-send-command 3695 (idlwave-shell-send-command
3696 (or idlwave-shell-command-line-to-execute 3696 (or idlwave-shell-command-line-to-execute
3697 (with-current-buffer (idlwave-shell-buffer) 3697 (with-current-buffer (idlwave-shell-buffer)
3698 (ring-ref comint-input-ring 0))) 3698 (ring-ref comint-input-ring 0)))
@@ -3702,7 +3702,7 @@ Also with prefix arg, ask for the command. You can also use the command
3702 "Save file and run it in IDL. 3702 "Save file and run it in IDL.
3703Runs `save-buffer' and sends a '.RUN' command for the associated file to IDL. 3703Runs `save-buffer' and sends a '.RUN' command for the associated file to IDL.
3704When called from the shell buffer, re-run the file which was last handled by 3704When called from the shell buffer, re-run the file which was last handled by
3705one of the save-and-.. commands." 3705one of the save-and-.. commands."
3706 (interactive) 3706 (interactive)
3707 (idlwave-shell-save-and-action 'run)) 3707 (idlwave-shell-save-and-action 'run))
3708 3708
@@ -3718,7 +3718,7 @@ one of the save-and-.. commands."
3718 "Save file and batch it in IDL. 3718 "Save file and batch it in IDL.
3719Runs `save-buffer' and sends a '@file' command for the associated file to IDL. 3719Runs `save-buffer' and sends a '@file' command for the associated file to IDL.
3720When called from the shell buffer, re-batch the file which was last handled by 3720When called from the shell buffer, re-batch the file which was last handled by
3721one of the save-and-.. commands." 3721one of the save-and-.. commands."
3722 (interactive) 3722 (interactive)
3723 (idlwave-shell-save-and-action 'batch)) 3723 (idlwave-shell-save-and-action 'batch))
3724 3724
@@ -3758,7 +3758,7 @@ handled by this command."
3758 'idlwave-shell-maybe-update-routine-info 3758 'idlwave-shell-maybe-update-routine-info
3759 (if (idlwave-shell-hide-p 'run) 'mostly) nil t) 3759 (if (idlwave-shell-hide-p 'run) 'mostly) nil t)
3760 (idlwave-shell-bp-query)) 3760 (idlwave-shell-bp-query))
3761 (let ((msg (format "No such file %s" 3761 (let ((msg (format "No such file %s"
3762 idlwave-shell-last-save-and-action-file))) 3762 idlwave-shell-last-save-and-action-file)))
3763 (setq idlwave-shell-last-save-and-action-file nil) 3763 (setq idlwave-shell-last-save-and-action-file nil)
3764 (error msg)))) 3764 (error msg))))
@@ -3791,7 +3791,7 @@ Queries IDL using the string in `idlwave-shell-sources-query'."
3791 3791
3792(defun idlwave-shell-sources-filter () 3792(defun idlwave-shell-sources-filter ()
3793 "Get source files from `idlwave-shell-sources-query' output. 3793 "Get source files from `idlwave-shell-sources-query' output.
3794Create `idlwave-shell-sources-alist' consisting of 3794Create `idlwave-shell-sources-alist' consisting of
3795list elements of the form: 3795list elements of the form:
3796 (module name . (source-file-truename idlwave-internal-filename))." 3796 (module name . (source-file-truename idlwave-internal-filename))."
3797 (save-excursion 3797 (save-excursion
@@ -3876,9 +3876,9 @@ list elements of the form:
3876 (list 3876 (list
3877 (save-match-data 3877 (save-match-data
3878 (idlwave-shell-file-name 3878 (idlwave-shell-file-name
3879 (buffer-substring (match-beginning 1 ) 3879 (buffer-substring (match-beginning 1 )
3880 (match-end 1)))) 3880 (match-end 1))))
3881 (string-to-int 3881 (string-to-number
3882 (buffer-substring (match-beginning 2) 3882 (buffer-substring (match-beginning 2)
3883 (match-end 2))))) 3883 (match-end 2)))))
3884 ;; Try to find the column of the error 3884 ;; Try to find the column of the error
@@ -3943,13 +3943,13 @@ Otherwise, just expand the file name."
3943 3943
3944;; The mouse bindings for PRINT and HELP 3944;; The mouse bindings for PRINT and HELP
3945(idlwave-shell-define-key-both 3945(idlwave-shell-define-key-both
3946 (if (featurep 'xemacs) 3946 (if (featurep 'xemacs)
3947 [(shift button2)] 3947 [(shift button2)]
3948 [(shift down-mouse-2)]) 3948 [(shift down-mouse-2)])
3949 'idlwave-shell-mouse-print) 3949 'idlwave-shell-mouse-print)
3950(idlwave-shell-define-key-both 3950(idlwave-shell-define-key-both
3951 (if (featurep 'xemacs) 3951 (if (featurep 'xemacs)
3952 [(control meta button2)] 3952 [(control meta button2)]
3953 [(control meta down-mouse-2)]) 3953 [(control meta down-mouse-2)])
3954 'idlwave-shell-mouse-help) 3954 'idlwave-shell-mouse-help)
3955(idlwave-shell-define-key-both 3955(idlwave-shell-define-key-both
@@ -3958,14 +3958,14 @@ Otherwise, just expand the file name."
3958 [(control shift down-mouse-2)]) 3958 [(control shift down-mouse-2)])
3959 'idlwave-shell-examine-select) 3959 'idlwave-shell-examine-select)
3960;; Add this one from the idlwave-mode-map 3960;; Add this one from the idlwave-mode-map
3961(define-key idlwave-shell-mode-map 3961(define-key idlwave-shell-mode-map
3962 (if (featurep 'xemacs) 3962 (if (featurep 'xemacs)
3963 [(shift button3)] 3963 [(shift button3)]
3964 [(shift mouse-3)]) 3964 [(shift mouse-3)])
3965 'idlwave-mouse-context-help) 3965 'idlwave-mouse-context-help)
3966 3966
3967;; For Emacs, we need to turn off the button release events. 3967;; For Emacs, we need to turn off the button release events.
3968(defun idlwave-shell-mouse-nop (event) 3968(defun idlwave-shell-mouse-nop (event)
3969 (interactive "e")) 3969 (interactive "e"))
3970(unless (featurep 'xemacs) 3970(unless (featurep 'xemacs)
3971 (idlwave-shell-define-key-both 3971 (idlwave-shell-define-key-both
@@ -3975,7 +3975,7 @@ Otherwise, just expand the file name."
3975 (idlwave-shell-define-key-both 3975 (idlwave-shell-define-key-both
3976 [(control meta mouse-2)] 'idlwave-shell-mouse-nop)) 3976 [(control meta mouse-2)] 'idlwave-shell-mouse-nop))
3977 3977
3978 3978
3979;; The following set of bindings is used to bind the debugging keys. 3979;; The following set of bindings is used to bind the debugging keys.
3980;; If `idlwave-shell-activate-prefix-keybindings' is non-nil, the 3980;; If `idlwave-shell-activate-prefix-keybindings' is non-nil, the
3981;; first key in the list gets bound the C-c C-d prefix map. If 3981;; first key in the list gets bound the C-c C-d prefix map. If
@@ -3984,10 +3984,10 @@ Otherwise, just expand the file name."
3984;; `idlwave-mode-map' and `idlwave-shell-mode-map'. The next list 3984;; `idlwave-mode-map' and `idlwave-shell-mode-map'. The next list
3985;; item, if non-nil, means to bind this as a single key in the 3985;; item, if non-nil, means to bind this as a single key in the
3986;; electric-debug-mode-map. 3986;; electric-debug-mode-map.
3987;; 3987;;
3988;; [C-c C-d]-binding debug-modifier-key command bind-electric-debug buf-only 3988;; [C-c C-d]-binding debug-modifier-key command bind-electric-debug buf-only
3989;; Used keys: abcdef hijklmnopqrstuvwxyz 3989;; Used keys: abcdef hijklmnopqrstuvwxyz
3990;; Unused keys: g 3990;; Unused keys: g
3991(let* ((specs 3991(let* ((specs
3992 '(([(control ?b)] ?b idlwave-shell-break-here t t) 3992 '(([(control ?b)] ?b idlwave-shell-break-here t t)
3993 ([(control ?i)] ?i idlwave-shell-break-in t t) 3993 ([(control ?i)] ?i idlwave-shell-break-in t t)
@@ -4037,10 +4037,10 @@ Otherwise, just expand the file name."
4037 electric (nth 3 s) 4037 electric (nth 3 s)
4038 only-buffer (nth 4 s) 4038 only-buffer (nth 4 s)
4039 cannotshift (and shift (char-valid-p c2) (eq c2 (upcase c2)))) 4039 cannotshift (and shift (char-valid-p c2) (eq c2 (upcase c2))))
4040 4040
4041 ;; The regular prefix keymap. 4041 ;; The regular prefix keymap.
4042 (when (and idlwave-shell-activate-prefix-keybindings k1) 4042 (when (and idlwave-shell-activate-prefix-keybindings k1)
4043 (unless only-buffer 4043 (unless only-buffer
4044 (define-key idlwave-shell-mode-prefix-map k1 cmd)) 4044 (define-key idlwave-shell-mode-prefix-map k1 cmd))
4045 (define-key idlwave-mode-prefix-map k1 cmd)) 4045 (define-key idlwave-mode-prefix-map k1 cmd))
4046 ;; The debug modifier map 4046 ;; The debug modifier map
@@ -4054,24 +4054,24 @@ Otherwise, just expand the file name."
4054 (unless only-buffer (define-key idlwave-shell-mode-map k2 cmd)))) 4054 (unless only-buffer (define-key idlwave-shell-mode-map k2 cmd))))
4055 ;; The electric debug single-keystroke map 4055 ;; The electric debug single-keystroke map
4056 (if (and electric (char-or-string-p c2)) 4056 (if (and electric (char-or-string-p c2))
4057 (define-key idlwave-shell-electric-debug-mode-map (char-to-string c2) 4057 (define-key idlwave-shell-electric-debug-mode-map (char-to-string c2)
4058 cmd)))) 4058 cmd))))
4059 4059
4060;; A few extras in the electric debug map 4060;; A few extras in the electric debug map
4061(define-key idlwave-shell-electric-debug-mode-map " " 'idlwave-shell-step) 4061(define-key idlwave-shell-electric-debug-mode-map " " 'idlwave-shell-step)
4062(define-key idlwave-shell-electric-debug-mode-map "+" 'idlwave-shell-stack-up) 4062(define-key idlwave-shell-electric-debug-mode-map "+" 'idlwave-shell-stack-up)
4063(define-key idlwave-shell-electric-debug-mode-map "=" 'idlwave-shell-stack-up) 4063(define-key idlwave-shell-electric-debug-mode-map "=" 'idlwave-shell-stack-up)
4064(define-key idlwave-shell-electric-debug-mode-map "-" 4064(define-key idlwave-shell-electric-debug-mode-map "-"
4065 'idlwave-shell-stack-down) 4065 'idlwave-shell-stack-down)
4066(define-key idlwave-shell-electric-debug-mode-map "_" 4066(define-key idlwave-shell-electric-debug-mode-map "_"
4067 'idlwave-shell-stack-down) 4067 'idlwave-shell-stack-down)
4068(define-key idlwave-shell-electric-debug-mode-map "q" 'idlwave-shell-retall) 4068(define-key idlwave-shell-electric-debug-mode-map "q" 'idlwave-shell-retall)
4069(define-key idlwave-shell-electric-debug-mode-map "t" 4069(define-key idlwave-shell-electric-debug-mode-map "t"
4070 '(lambda () (interactive) (idlwave-shell-send-command "help,/TRACE"))) 4070 '(lambda () (interactive) (idlwave-shell-send-command "help,/TRACE")))
4071(define-key idlwave-shell-electric-debug-mode-map [(control ??)] 4071(define-key idlwave-shell-electric-debug-mode-map [(control ??)]
4072 'idlwave-shell-electric-debug-help) 4072 'idlwave-shell-electric-debug-help)
4073(define-key idlwave-shell-electric-debug-mode-map "x" 4073(define-key idlwave-shell-electric-debug-mode-map "x"
4074 '(lambda (arg) (interactive "P") 4074 '(lambda (arg) (interactive "P")
4075 (idlwave-shell-print arg nil nil t))) 4075 (idlwave-shell-print arg nil nil t)))
4076 4076
4077 4077
@@ -4092,12 +4092,12 @@ Otherwise, just expand the file name."
4092 (setq idlwave-shell-suppress-electric-debug nil)) 4092 (setq idlwave-shell-suppress-electric-debug nil))
4093 (idlwave-shell-electric-debug-mode)) 4093 (idlwave-shell-electric-debug-mode))
4094 4094
4095(defvar idlwave-shell-electric-debug-read-only) 4095(defvar idlwave-shell-electric-debug-read-only)
4096(defvar idlwave-shell-electric-debug-buffers nil) 4096(defvar idlwave-shell-electric-debug-buffers nil)
4097 4097
4098(easy-mmode-define-minor-mode idlwave-shell-electric-debug-mode 4098(easy-mmode-define-minor-mode idlwave-shell-electric-debug-mode
4099 "Toggle Electric Debug mode. 4099 "Toggle Electric Debug mode.
4100With no argument, this command toggles the mode. 4100With no argument, this command toggles the mode.
4101Non-null prefix argument turns on the mode. 4101Non-null prefix argument turns on the mode.
4102Null prefix argument turns off the mode. 4102Null prefix argument turns off the mode.
4103 4103
@@ -4107,7 +4107,7 @@ nil
4107" *Debugging*" 4107" *Debugging*"
4108idlwave-shell-electric-debug-mode-map) 4108idlwave-shell-electric-debug-mode-map)
4109 4109
4110(add-hook 4110(add-hook
4111 'idlwave-shell-electric-debug-mode-on-hook 4111 'idlwave-shell-electric-debug-mode-on-hook
4112 (lambda () 4112 (lambda ()
4113 (set (make-local-variable 'idlwave-shell-electric-debug-read-only) 4113 (set (make-local-variable 'idlwave-shell-electric-debug-read-only)
@@ -4115,13 +4115,13 @@ idlwave-shell-electric-debug-mode-map)
4115 (setq buffer-read-only t) 4115 (setq buffer-read-only t)
4116 (add-to-list 'idlwave-shell-electric-debug-buffers (current-buffer)) 4116 (add-to-list 'idlwave-shell-electric-debug-buffers (current-buffer))
4117 (if idlwave-shell-stop-line-overlay 4117 (if idlwave-shell-stop-line-overlay
4118 (overlay-put idlwave-shell-stop-line-overlay 'face 4118 (overlay-put idlwave-shell-stop-line-overlay 'face
4119 idlwave-shell-electric-stop-line-face)) 4119 idlwave-shell-electric-stop-line-face))
4120 (if (facep 'fringe) 4120 (if (facep 'fringe)
4121 (set-face-foreground 'fringe idlwave-shell-electric-stop-color 4121 (set-face-foreground 'fringe idlwave-shell-electric-stop-color
4122 (selected-frame))))) 4122 (selected-frame)))))
4123 4123
4124(add-hook 4124(add-hook
4125 'idlwave-shell-electric-debug-mode-off-hook 4125 'idlwave-shell-electric-debug-mode-off-hook
4126 (lambda () 4126 (lambda ()
4127 ;; Return to previous read-only state 4127 ;; Return to previous read-only state
@@ -4130,7 +4130,7 @@ idlwave-shell-electric-debug-mode-map)
4130 (setq idlwave-shell-electric-debug-buffers 4130 (setq idlwave-shell-electric-debug-buffers
4131 (delq (current-buffer) idlwave-shell-electric-debug-buffers)) 4131 (delq (current-buffer) idlwave-shell-electric-debug-buffers))
4132 (if idlwave-shell-stop-line-overlay 4132 (if idlwave-shell-stop-line-overlay
4133 (overlay-put idlwave-shell-stop-line-overlay 'face 4133 (overlay-put idlwave-shell-stop-line-overlay 'face
4134 idlwave-shell-stop-line-face) 4134 idlwave-shell-stop-line-face)
4135 (if (facep 'fringe) 4135 (if (facep 'fringe)
4136 (set-face-foreground 'fringe (face-foreground 'default)))))) 4136 (set-face-foreground 'fringe (face-foreground 'default))))))
@@ -4161,7 +4161,7 @@ idlwave-shell-electric-debug-mode-map)
4161;; Show the help text 4161;; Show the help text
4162(defun idlwave-shell-electric-debug-help () 4162(defun idlwave-shell-electric-debug-help ()
4163 (interactive) 4163 (interactive)
4164 (with-output-to-temp-buffer "*IDLWAVE Electric Debug Help*" 4164 (with-output-to-temp-buffer "*IDLWAVE Electric Debug Help*"
4165 (princ idlwave-shell-electric-debug-help)) 4165 (princ idlwave-shell-electric-debug-help))
4166 (let* ((current-window (selected-window)) 4166 (let* ((current-window (selected-window))
4167 (window (get-buffer-window "*IDLWAVE Electric Debug Help*")) 4167 (window (get-buffer-window "*IDLWAVE Electric Debug Help*"))
@@ -4176,7 +4176,7 @@ idlwave-shell-electric-debug-mode-map)
4176 `("Debug" 4176 `("Debug"
4177 ["Electric Debug Mode" 4177 ["Electric Debug Mode"
4178 idlwave-shell-electric-debug-mode 4178 idlwave-shell-electric-debug-mode
4179 :style toggle :selected idlwave-shell-electric-debug-mode 4179 :style toggle :selected idlwave-shell-electric-debug-mode
4180 :included (eq major-mode 'idlwave-mode) :keys "C-c C-d C-v"] 4180 :included (eq major-mode 'idlwave-mode) :keys "C-c C-d C-v"]
4181 "--" 4181 "--"
4182 ("Compile & Run" 4182 ("Compile & Run"
@@ -4192,35 +4192,35 @@ idlwave-shell-electric-debug-mode-map)
4192 "--" 4192 "--"
4193 ["Goto Next Error" idlwave-shell-goto-next-error t] 4193 ["Goto Next Error" idlwave-shell-goto-next-error t]
4194 "--" 4194 "--"
4195 ["Compile and Run Region" idlwave-shell-run-region 4195 ["Compile and Run Region" idlwave-shell-run-region
4196 (eq major-mode 'idlwave-mode)] 4196 (eq major-mode 'idlwave-mode)]
4197 ["Evaluate Region" idlwave-shell-evaluate-region 4197 ["Evaluate Region" idlwave-shell-evaluate-region
4198 (eq major-mode 'idlwave-mode)] 4198 (eq major-mode 'idlwave-mode)]
4199 "--" 4199 "--"
4200 ["Execute Default Cmd" idlwave-shell-execute-default-command-line t] 4200 ["Execute Default Cmd" idlwave-shell-execute-default-command-line t]
4201 ["Edit Default Cmd" idlwave-shell-edit-default-command-line t]) 4201 ["Edit Default Cmd" idlwave-shell-edit-default-command-line t])
4202 ("Breakpoints" 4202 ("Breakpoints"
4203 ["Set Breakpoint" idlwave-shell-break-here 4203 ["Set Breakpoint" idlwave-shell-break-here
4204 :keys "C-c C-d C-c" :active (eq major-mode 'idlwave-mode)] 4204 :keys "C-c C-d C-c" :active (eq major-mode 'idlwave-mode)]
4205 ("Set Special Breakpoint" 4205 ("Set Special Breakpoint"
4206 ["Set After Count Breakpoint" 4206 ["Set After Count Breakpoint"
4207 (progn 4207 (progn
4208 (let ((count (string-to-int (read-string "Break after count: ")))) 4208 (let ((count (string-to-number (read-string "Break after count: "))))
4209 (if (integerp count) (idlwave-shell-break-here count)))) 4209 (if (integerp count) (idlwave-shell-break-here count))))
4210 :active (eq major-mode 'idlwave-mode)] 4210 :active (eq major-mode 'idlwave-mode)]
4211 ["Set Condition Breakpoint" 4211 ["Set Condition Breakpoint"
4212 (idlwave-shell-break-here '(4)) 4212 (idlwave-shell-break-here '(4))
4213 :active (eq major-mode 'idlwave-mode)]) 4213 :active (eq major-mode 'idlwave-mode)])
4214 ["Break in Module" idlwave-shell-break-in 4214 ["Break in Module" idlwave-shell-break-in
4215 :keys "C-c C-d C-i" :active (eq major-mode 'idlwave-mode)] 4215 :keys "C-c C-d C-i" :active (eq major-mode 'idlwave-mode)]
4216 ["Break in this Module" idlwave-shell-break-this-module 4216 ["Break in this Module" idlwave-shell-break-this-module
4217 :keys "C-c C-d C-j" :active (eq major-mode 'idlwave-mode)] 4217 :keys "C-c C-d C-j" :active (eq major-mode 'idlwave-mode)]
4218 ["Clear Breakpoint" idlwave-shell-clear-current-bp t] 4218 ["Clear Breakpoint" idlwave-shell-clear-current-bp t]
4219 ["Clear All Breakpoints" idlwave-shell-clear-all-bp t] 4219 ["Clear All Breakpoints" idlwave-shell-clear-all-bp t]
4220 ["Disable/Enable Breakpoint" idlwave-shell-toggle-enable-current-bp t] 4220 ["Disable/Enable Breakpoint" idlwave-shell-toggle-enable-current-bp t]
4221 ["Goto Previous Breakpoint" idlwave-shell-goto-previous-bp 4221 ["Goto Previous Breakpoint" idlwave-shell-goto-previous-bp
4222 :keys "C-c C-d [" :active (eq major-mode 'idlwave-mode)] 4222 :keys "C-c C-d [" :active (eq major-mode 'idlwave-mode)]
4223 ["Goto Next Breakpoint" idlwave-shell-goto-next-bp 4223 ["Goto Next Breakpoint" idlwave-shell-goto-next-bp
4224 :keys "C-c C-d ]" :active (eq major-mode 'idlwave-mode)] 4224 :keys "C-c C-d ]" :active (eq major-mode 'idlwave-mode)]
4225 ["List All Breakpoints" idlwave-shell-list-all-bp t] 4225 ["List All Breakpoints" idlwave-shell-list-all-bp t]
4226 ["Resync Breakpoints" idlwave-shell-bp-query t]) 4226 ["Resync Breakpoints" idlwave-shell-bp-query t])
@@ -4252,38 +4252,38 @@ idlwave-shell-electric-debug-mode-map)
4252 ["Redisplay and Sync" idlwave-shell-redisplay t]) 4252 ["Redisplay and Sync" idlwave-shell-redisplay t])
4253 ("Show Commands" 4253 ("Show Commands"
4254 ["Everything" (if (eq idlwave-shell-show-commands 'everything) 4254 ["Everything" (if (eq idlwave-shell-show-commands 'everything)
4255 (progn 4255 (progn
4256 (setq idlwave-shell-show-commands 4256 (setq idlwave-shell-show-commands
4257 (get 'idlwave-shell-show-commands 'last-val)) 4257 (get 'idlwave-shell-show-commands 'last-val))
4258 (put 'idlwave-shell-show-commands 'last-val nil)) 4258 (put 'idlwave-shell-show-commands 'last-val nil))
4259 (put 'idlwave-shell-show-commands 'last-val 4259 (put 'idlwave-shell-show-commands 'last-val
4260 idlwave-shell-show-commands) 4260 idlwave-shell-show-commands)
4261 (setq idlwave-shell-show-commands 'everything)) 4261 (setq idlwave-shell-show-commands 'everything))
4262 :style toggle :selected (and (not (listp idlwave-shell-show-commands)) 4262 :style toggle :selected (and (not (listp idlwave-shell-show-commands))
4263 (eq idlwave-shell-show-commands 4263 (eq idlwave-shell-show-commands
4264 'everything))] 4264 'everything))]
4265 "--" 4265 "--"
4266 ["Compiling Commands" (idlwave-shell-add-or-remove-show 'run) 4266 ["Compiling Commands" (idlwave-shell-add-or-remove-show 'run)
4267 :style toggle 4267 :style toggle
4268 :selected (not (idlwave-shell-hide-p 4268 :selected (not (idlwave-shell-hide-p
4269 'run 4269 'run
4270 (get 'idlwave-shell-show-commands 'last-val))) 4270 (get 'idlwave-shell-show-commands 'last-val)))
4271 :active (not (eq idlwave-shell-show-commands 'everything))] 4271 :active (not (eq idlwave-shell-show-commands 'everything))]
4272 ["Breakpoint Commands" (idlwave-shell-add-or-remove-show 'breakpoint) 4272 ["Breakpoint Commands" (idlwave-shell-add-or-remove-show 'breakpoint)
4273 :style toggle 4273 :style toggle
4274 :selected (not (idlwave-shell-hide-p 4274 :selected (not (idlwave-shell-hide-p
4275 'breakpoint 4275 'breakpoint
4276 (get 'idlwave-shell-show-commands 'last-val))) 4276 (get 'idlwave-shell-show-commands 'last-val)))
4277 :active (not (eq idlwave-shell-show-commands 'everything))] 4277 :active (not (eq idlwave-shell-show-commands 'everything))]
4278 ["Debug Commands" (idlwave-shell-add-or-remove-show 'debug) 4278 ["Debug Commands" (idlwave-shell-add-or-remove-show 'debug)
4279 :style toggle 4279 :style toggle
4280 :selected (not (idlwave-shell-hide-p 4280 :selected (not (idlwave-shell-hide-p
4281 'debug 4281 'debug
4282 (get 'idlwave-shell-show-commands 'last-val))) 4282 (get 'idlwave-shell-show-commands 'last-val)))
4283 :active (not (eq idlwave-shell-show-commands 'everything))] 4283 :active (not (eq idlwave-shell-show-commands 'everything))]
4284 ["Miscellaneous Commands" (idlwave-shell-add-or-remove-show 'misc) 4284 ["Miscellaneous Commands" (idlwave-shell-add-or-remove-show 'misc)
4285 :style toggle 4285 :style toggle
4286 :selected (not (idlwave-shell-hide-p 4286 :selected (not (idlwave-shell-hide-p
4287 'misc 4287 'misc
4288 (get 'idlwave-shell-show-commands 'last-val))) 4288 (get 'idlwave-shell-show-commands 'last-val)))
4289 :active (not (eq idlwave-shell-show-commands 'everything))]) 4289 :active (not (eq idlwave-shell-show-commands 'everything))])
@@ -4297,7 +4297,7 @@ idlwave-shell-electric-debug-mode-map)
4297 :style toggle :selected idlwave-shell-use-input-mode-magic]) 4297 :style toggle :selected idlwave-shell-use-input-mode-magic])
4298 "--" 4298 "--"
4299 ["Update Working Dir" idlwave-shell-resync-dirs t] 4299 ["Update Working Dir" idlwave-shell-resync-dirs t]
4300 ["Save Path Info" 4300 ["Save Path Info"
4301 (idlwave-shell-send-command idlwave-shell-path-query 4301 (idlwave-shell-send-command idlwave-shell-path-query
4302 'idlwave-shell-get-path-info 4302 'idlwave-shell-get-path-info
4303 'hide) 4303 'hide)
@@ -4309,7 +4309,7 @@ idlwave-shell-electric-debug-mode-map)
4309 4309
4310(if (or (featurep 'easymenu) (load "easymenu" t)) 4310(if (or (featurep 'easymenu) (load "easymenu" t))
4311 (progn 4311 (progn
4312 (easy-menu-define 4312 (easy-menu-define
4313 idlwave-mode-debug-menu idlwave-mode-map "IDL debugging menus" 4313 idlwave-mode-debug-menu idlwave-mode-map "IDL debugging menus"
4314 idlwave-shell-menu-def) 4314 idlwave-shell-menu-def)
4315 (easy-menu-define 4315 (easy-menu-define
@@ -4329,7 +4329,7 @@ idlwave-shell-electric-debug-mode-map)
4329(defvar idlwave-shell-bp-glyph nil 4329(defvar idlwave-shell-bp-glyph nil
4330 "The glyphs to mark breakpoint lines in the source code.") 4330 "The glyphs to mark breakpoint lines in the source code.")
4331 4331
4332(let ((image-alist 4332(let ((image-alist
4333 '((bp . "/* XPM */ 4333 '((bp . "/* XPM */
4334static char * file[] = { 4334static char * file[] = {
4335\"14 12 3 1\", 4335\"14 12 3 1\",
@@ -4462,7 +4462,7 @@ static char * file[] = {
4462\" .XXXX. \", 4462\" .XXXX. \",
4463\" .... \", 4463\" .... \",
4464\" \"};"))) im-cons im) 4464\" \"};"))) im-cons im)
4465 4465
4466 (while (setq im-cons (pop image-alist)) 4466 (while (setq im-cons (pop image-alist))
4467 (setq im (cond ((and (featurep 'xemacs) 4467 (setq im (cond ((and (featurep 'xemacs)
4468 (featurep 'xpm)) 4468 (featurep 'xpm))
@@ -4475,7 +4475,7 @@ static char * file[] = {
4475 ((and (not (featurep 'xemacs)) 4475 ((and (not (featurep 'xemacs))
4476 (fboundp 'image-type-available-p) 4476 (fboundp 'image-type-available-p)
4477 (image-type-available-p 'xpm)) 4477 (image-type-available-p 'xpm))
4478 (list 'image :type 'xpm :data (cdr im-cons) 4478 (list 'image :type 'xpm :data (cdr im-cons)
4479 :ascent 'center)) 4479 :ascent 'center))
4480 (t nil))) 4480 (t nil)))
4481 (if im (push (cons (car im-cons) im) idlwave-shell-bp-glyph)))) 4481 (if im (push (cons (car im-cons) im) idlwave-shell-bp-glyph))))
@@ -4485,7 +4485,7 @@ static char * file[] = {
4485 4485
4486;;; Load the toolbar when wanted by the user. 4486;;; Load the toolbar when wanted by the user.
4487 4487
4488(autoload 'idlwave-toolbar-toggle "idlw-toolbar" 4488(autoload 'idlwave-toolbar-toggle "idlw-toolbar"
4489 "Toggle the IDLWAVE toolbar") 4489 "Toggle the IDLWAVE toolbar")
4490(autoload 'idlwave-toolbar-add-everywhere "idlw-toolbar" 4490(autoload 'idlwave-toolbar-add-everywhere "idlw-toolbar"
4491 "Add IDLWAVE toolbar") 4491 "Add IDLWAVE toolbar")
diff --git a/lisp/progmodes/ps-mode.el b/lisp/progmodes/ps-mode.el
index b3495c74491..2d8f1d80aae 100644
--- a/lisp/progmodes/ps-mode.el
+++ b/lisp/progmodes/ps-mode.el
@@ -1173,7 +1173,7 @@ Use line numbers if `ps-run-error-line-numbers' is not nil"
1173 (let (i) 1173 (let (i)
1174 (setq 1174 (setq
1175 i 1175 i
1176 (string-to-int 1176 (string-to-number
1177 (buffer-substring (match-beginning 0) (match-end 0)))) 1177 (buffer-substring (match-beginning 0) (match-end 0))))
1178 (goto-char p) 1178 (goto-char p)
1179 (pop-to-buffer ps-run-parent) 1179 (pop-to-buffer ps-run-parent)
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index 9f0e63e80a6..12f04895f98 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -5082,7 +5082,7 @@ Return a valid value only."
5082 ((string-equal "++" input) '++) 5082 ((string-equal "++" input) '++)
5083 ((string-equal "--" input) '--) 5083 ((string-equal "--" input) '--)
5084 ((string-match "^-?[0-9]+$" input) 5084 ((string-match "^-?[0-9]+$" input)
5085 (string-to-int input)) 5085 (string-to-number input))
5086 ((fboundp (setq interned (intern input))) 5086 ((fboundp (setq interned (intern input)))
5087 interned) 5087 interned)
5088 ((boundp interned) interned) 5088 ((boundp interned) interned)
@@ -13701,10 +13701,10 @@ entity ENT-KEY."
13701 (condition-case () 13701 (condition-case ()
13702 (progn (load-file file-dir-name) 13702 (progn (load-file file-dir-name)
13703 (string< (mapconcat 13703 (string< (mapconcat
13704 (lambda (a) (format "%3d" (string-to-int a))) 13704 (lambda (a) (format "%3d" (string-to-number a)))
13705 (split-string "3.31.14" "\\.") "") 13705 (split-string "3.31.14" "\\.") "")
13706 (mapconcat 13706 (mapconcat
13707 (lambda (a) (format "%3d" (string-to-int a))) 13707 (lambda (a) (format "%3d" (string-to-number a)))
13708 (split-string vhdl-cache-version "\\.") ""))) 13708 (split-string vhdl-cache-version "\\.") "")))
13709 (error (progn (vhdl-warning (format "ERROR: Corrupted cache file: \"%s\"" file-dir-name)) 13709 (error (progn (vhdl-warning (format "ERROR: Corrupted cache file: \"%s\"" file-dir-name))
13710 nil)))))) 13710 nil))))))
@@ -14075,7 +14075,7 @@ otherwise use cached data."
14075 (beginning-of-line) (looking-at "^\\([0-9]+\\):")) 14075 (beginning-of-line) (looking-at "^\\([0-9]+\\):"))
14076 (re-search-backward 14076 (re-search-backward
14077 (format "^[0-%d]:\\s-*[[{<]-" 14077 (format "^[0-%d]:\\s-*[[{<]-"
14078 (max (1- (string-to-int (match-string 1))) 0)) nil t))) 14078 (max (1- (string-to-number (match-string 1))) 0)) nil t)))
14079 (goto-char (match-end 0)) 14079 (goto-char (match-end 0))
14080 (speedbar-do-function-pointer) 14080 (speedbar-do-function-pointer)
14081 (speedbar-center-buffer-smartly))) 14081 (speedbar-center-buffer-smartly)))
diff --git a/lisp/server.el b/lisp/server.el
index a0f41e59ff8..0a5fc942206 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -325,11 +325,11 @@ PROC is the server process. Format of STRING is \"PATH PATH PATH... \\n\"."
325 (setq request ""))))) 325 (setq request "")))))
326 ;; ARG is a line number option. 326 ;; ARG is a line number option.
327 ((string-match "\\`\\+[0-9]+\\'" arg) 327 ((string-match "\\`\\+[0-9]+\\'" arg)
328 (setq lineno (string-to-int (substring arg 1)))) 328 (setq lineno (string-to-number (substring arg 1))))
329 ;; ARG is line number:column option. 329 ;; ARG is line number:column option.
330 ((string-match "\\`+\\([0-9]+\\):\\([0-9]+\\)\\'" arg) 330 ((string-match "\\`+\\([0-9]+\\):\\([0-9]+\\)\\'" arg)
331 (setq lineno (string-to-int (match-string 1 arg)) 331 (setq lineno (string-to-number (match-string 1 arg))
332 columnno (string-to-int (match-string 2 arg)))) 332 columnno (string-to-number (match-string 2 arg))))
333 (t 333 (t
334 ;; Undo the quoting that emacsclient does 334 ;; Undo the quoting that emacsclient does
335 ;; for certain special characters. 335 ;; for certain special characters.
diff --git a/lisp/shell.el b/lisp/shell.el
index 354ed88f80f..fd5e6c25032 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -759,7 +759,7 @@ Environment variables are expanded, see function `substitute-in-file-name'."
759;; If STR is of the form +n, for n>0, return n. Otherwise, nil. 759;; If STR is of the form +n, for n>0, return n. Otherwise, nil.
760(defun shell-extract-num (str) 760(defun shell-extract-num (str)
761 (and (string-match "^\\+[1-9][0-9]*$" str) 761 (and (string-match "^\\+[1-9][0-9]*$" str)
762 (string-to-int str))) 762 (string-to-number str)))
763 763
764 764
765(defun shell-dirtrack-mode () 765(defun shell-dirtrack-mode ()
diff --git a/lisp/startup.el b/lisp/startup.el
index c9f8d5e26e7..b7d1a1d34df 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -1631,11 +1631,11 @@ normal otherwise."
1631 (kill-emacs t)) 1631 (kill-emacs t))
1632 1632
1633 ((string-match "^\\+[0-9]+\\'" argi) 1633 ((string-match "^\\+[0-9]+\\'" argi)
1634 (setq line (string-to-int argi))) 1634 (setq line (string-to-number argi)))
1635 1635
1636 ((string-match "^\\+\\([0-9]+\\):\\([0-9]+\\)\\'" argi) 1636 ((string-match "^\\+\\([0-9]+\\):\\([0-9]+\\)\\'" argi)
1637 (setq line (string-to-int (match-string 1 argi)) 1637 (setq line (string-to-number (match-string 1 argi))
1638 column (string-to-int (match-string 2 argi)))) 1638 column (string-to-number (match-string 2 argi))))
1639 1639
1640 ((setq tem (assoc argi command-line-x-option-alist)) 1640 ((setq tem (assoc argi command-line-x-option-alist))
1641 ;; Ignore X-windows options and their args if not using X. 1641 ;; Ignore X-windows options and their args if not using X.
diff --git a/lisp/term.el b/lisp/term.el
index 473fafd558a..2b89b83fb04 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -3339,7 +3339,7 @@ The top-most line is line 0."
3339 (second-colon 3339 (second-colon
3340 (string-match ":" string (1+ first-colon))) 3340 (string-match ":" string (1+ first-colon)))
3341 (filename (substring string 1 first-colon)) 3341 (filename (substring string 1 first-colon))
3342 (fileline (string-to-int 3342 (fileline (string-to-number
3343 (substring string (1+ first-colon) second-colon)))) 3343 (substring string (1+ first-colon) second-colon))))
3344 (setq term-pending-frame (cons filename fileline)))) 3344 (setq term-pending-frame (cons filename fileline))))
3345 ((= (aref string 0) ?/) 3345 ((= (aref string 0) ?/)
diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el
index 366668c66f3..a27a4c6395c 100644
--- a/lisp/term/mac-win.el
+++ b/lisp/term/mac-win.el
@@ -106,7 +106,7 @@
106 (let ((param (nth 3 aelt))) 106 (let ((param (nth 3 aelt)))
107 (setq default-frame-alist 107 (setq default-frame-alist
108 (cons (cons param 108 (cons (cons param
109 (string-to-int (car x-invocation-args))) 109 (string-to-number (car x-invocation-args)))
110 default-frame-alist) 110 default-frame-alist)
111 x-invocation-args 111 x-invocation-args
112 (cdr x-invocation-args)))))) 112 (cdr x-invocation-args))))))
diff --git a/lisp/term/sun-mouse.el b/lisp/term/sun-mouse.el
index 8d9bfb67cf7..cee02919a66 100644
--- a/lisp/term/sun-mouse.el
+++ b/lisp/term/sun-mouse.el
@@ -615,7 +615,7 @@ CODE values: 13 = Tool-Position, 14 = Size-in-Pixels, 18 = Size-in-Chars."
615 (setq str (substring str (match-end 0))) 615 (setq str (substring str (match-end 0)))
616 (string-match ";[0-9]*" str) 616 (string-match ";[0-9]*" str)
617 (setq x (substring str (1+ (match-beginning 0)) (match-end 0))) 617 (setq x (substring str (1+ (match-beginning 0)) (match-end 0)))
618 (cons (string-to-int y) (string-to-int x)))) 618 (cons (string-to-number y) (string-to-number x))))
619 619
620(defun sm::font-size () 620(defun sm::font-size ()
621 "Returns font size in pixels: (cons Ysize Xsize)" 621 "Returns font size in pixels: (cons Ysize Xsize)"
diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el
index f99eff9ef1a..76644fc2d63 100644
--- a/lisp/term/w32-win.el
+++ b/lisp/term/w32-win.el
@@ -146,7 +146,7 @@ the last file dropped is selected."
146 "Handle SWITCH of the form \"-switch n\"." 146 "Handle SWITCH of the form \"-switch n\"."
147 (let ((aelt (assoc switch command-line-x-option-alist))) 147 (let ((aelt (assoc switch command-line-x-option-alist)))
148 (if aelt 148 (if aelt
149 (push (cons (nth 3 aelt) (string-to-int (pop x-invocation-args))) 149 (push (cons (nth 3 aelt) (string-to-number (pop x-invocation-args)))
150 default-frame-alist)))) 150 default-frame-alist))))
151 151
152;; Handle options that apply to initial frame only 152;; Handle options that apply to initial frame only
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index c37c98f6781..5b4ff6d2f7c 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -105,7 +105,7 @@
105 (let ((param (nth 3 aelt))) 105 (let ((param (nth 3 aelt)))
106 (setq default-frame-alist 106 (setq default-frame-alist
107 (cons (cons param 107 (cons (cons param
108 (string-to-int (car x-invocation-args))) 108 (string-to-number (car x-invocation-args)))
109 default-frame-alist) 109 default-frame-alist)
110 x-invocation-args 110 x-invocation-args
111 (cdr x-invocation-args)))))) 111 (cdr x-invocation-args))))))
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index c8926776400..1de27265b08 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -2296,9 +2296,9 @@ Optional third arg SHIFT is an offset to apply based on previous corrections."
2296 (setq output (substring output (match-end 0))) ; skip over misspelling 2296 (setq output (substring output (match-end 0))) ; skip over misspelling
2297 (if (eq type ?#) 2297 (if (eq type ?#)
2298 (setq count 0) ; no misses for type # 2298 (setq count 0) ; no misses for type #
2299 (setq count (string-to-int output) ; get number of misses. 2299 (setq count (string-to-number output) ; get number of misses.
2300 output (substring output (1+ (string-match " " output 1))))) 2300 output (substring output (1+ (string-match " " output 1)))))
2301 (setq offset (string-to-int output)) 2301 (setq offset (string-to-number output))
2302 (if (eq type ?#) ; No miss or guess list. 2302 (if (eq type ?#) ; No miss or guess list.
2303 (setq output nil) 2303 (setq output nil)
2304 (setq output (substring output (1+ (string-match " " output 1))))) 2304 (setq output (substring output (1+ (string-match " " output 1)))))
diff --git a/lisp/textmodes/nroff-mode.el b/lisp/textmodes/nroff-mode.el
index c0638804ffa..9c5addb85fa 100644
--- a/lisp/textmodes/nroff-mode.el
+++ b/lisp/textmodes/nroff-mode.el
@@ -134,7 +134,7 @@ closing requests for requests that are used in matched pairs."
134 (save-excursion 134 (save-excursion
135 (looking-at outline-regexp) 135 (looking-at outline-regexp)
136 (skip-chars-forward ".H ") 136 (skip-chars-forward ".H ")
137 (string-to-int (buffer-substring (point) (+ 1 (point)))))) 137 (string-to-number (buffer-substring (point) (+ 1 (point))))))
138 138
139;;; Compute how much to indent a comment in nroff/troff source. 139;;; Compute how much to indent a comment in nroff/troff source.
140;;; By mit-erl!gildea April 86 140;;; By mit-erl!gildea April 86
diff --git a/lisp/textmodes/reftex-cite.el b/lisp/textmodes/reftex-cite.el
index f12d01716fe..3f61e9c94ec 100644
--- a/lisp/textmodes/reftex-cite.el
+++ b/lisp/textmodes/reftex-cite.el
@@ -312,12 +312,12 @@
312 (not (stringp (car al1)))))) 312 (not (stringp (car al1))))))
313 313
314(defun reftex-bib-sort-year (e1 e2) 314(defun reftex-bib-sort-year (e1 e2)
315 (< (string-to-int (or (cdr (assoc "year" e1)) "0")) 315 (< (string-to-number (or (cdr (assoc "year" e1)) "0"))
316 (string-to-int (or (cdr (assoc "year" e2)) "0")))) 316 (string-to-number (or (cdr (assoc "year" e2)) "0"))))
317 317
318(defun reftex-bib-sort-year-reverse (e1 e2) 318(defun reftex-bib-sort-year-reverse (e1 e2)
319 (> (string-to-int (or (cdr (assoc "year" e1)) "0")) 319 (> (string-to-number (or (cdr (assoc "year" e1)) "0"))
320 (string-to-int (or (cdr (assoc "year" e2)) "0")))) 320 (string-to-number (or (cdr (assoc "year" e2)) "0"))))
321 321
322(defun reftex-get-crossref-alist (entry) 322(defun reftex-get-crossref-alist (entry)
323 ;; return the alist from a crossref entry 323 ;; return the alist from a crossref entry
@@ -988,7 +988,7 @@ While entering the regexp, completion on knows citation keys is possible.
988 (while (string-match 988 (while (string-match
989 "\\(\\`\\|[^%]\\)\\(\\(%\\([0-9]*\\)\\([a-zA-Z]\\)\\)[.,;: ]*\\)" 989 "\\(\\`\\|[^%]\\)\\(\\(%\\([0-9]*\\)\\([a-zA-Z]\\)\\)[.,;: ]*\\)"
990 format) 990 format)
991 (let ((n (string-to-int (match-string 4 format))) 991 (let ((n (string-to-number (match-string 4 format)))
992 (l (string-to-char (match-string 5 format))) 992 (l (string-to-char (match-string 5 format)))
993 rpl b e) 993 rpl b e)
994 (save-match-data 994 (save-match-data
diff --git a/lisp/textmodes/reftex-parse.el b/lisp/textmodes/reftex-parse.el
index ce1e3d77d72..3f1ff00494f 100644
--- a/lisp/textmodes/reftex-parse.el
+++ b/lisp/textmodes/reftex-parse.el
@@ -999,7 +999,7 @@ of master file."
999 (if (string-match "\\`[A-Z]\\'" number-string) 999 (if (string-match "\\`[A-Z]\\'" number-string)
1000 (aset reftex-section-numbers i 1000 (aset reftex-section-numbers i
1001 (- (string-to-char number-string) ?A -1)) 1001 (- (string-to-char number-string) ?A -1))
1002 (aset reftex-section-numbers i (string-to-int number-string))) 1002 (aset reftex-section-numbers i (string-to-number number-string)))
1003 (pop numbers)) 1003 (pop numbers))
1004 (decf i))) 1004 (decf i)))
1005 (put 'reftex-section-numbers 'appendix appendix)) 1005 (put 'reftex-section-numbers 'appendix appendix))
@@ -1045,7 +1045,7 @@ of master file."
1045 (setq string 1045 (setq string
1046 (concat 1046 (concat
1047 (char-to-string 1047 (char-to-string
1048 (1- (+ ?A (string-to-int (match-string 0 string))))) 1048 (1- (+ ?A (string-to-number (match-string 0 string)))))
1049 (substring string (match-end 0)))))) 1049 (substring string (match-end 0))))))
1050 (if star 1050 (if star
1051 (concat (make-string (1- (length string)) ?\ ) "*") 1051 (concat (make-string (1- (length string)) ?\ ) "*")
diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el
index e478169c250..ad029266f3b 100644
--- a/lisp/textmodes/texinfmt.el
+++ b/lisp/textmodes/texinfmt.el
@@ -2807,7 +2807,7 @@ Default is to leave the number of spaces as is."
2807 (let ((arg (texinfo-parse-arg-discard))) 2807 (let ((arg (texinfo-parse-arg-discard)))
2808 (if (string= "asis" arg) 2808 (if (string= "asis" arg)
2809 (setq texinfo-paragraph-indent "asis") 2809 (setq texinfo-paragraph-indent "asis")
2810 (setq texinfo-paragraph-indent (string-to-int arg))))) 2810 (setq texinfo-paragraph-indent (string-to-number arg)))))
2811 2811
2812(put 'refill 'texinfo-format 'texinfo-format-refill) 2812(put 'refill 'texinfo-format 'texinfo-format-refill)
2813(defun texinfo-format-refill () 2813(defun texinfo-format-refill ()
diff --git a/lisp/time-stamp.el b/lisp/time-stamp.el
index f574144f4b0..4cba3b5f456 100644
--- a/lisp/time-stamp.el
+++ b/lisp/time-stamp.el
@@ -270,7 +270,7 @@ template."
270 (string-match "\\`\\(\\(-?[0-9]+\\)/\\)?\\([^%]+\\)?\\(\\(%[-.,:@+_ #^()0-9]*[A-Za-z%][^%]*\\)*%[-.,:@+_ #^()0-9]*[A-Za-z%]\\)?\\([^%]+\\)?\\'" time-stamp-pattern) 270 (string-match "\\`\\(\\(-?[0-9]+\\)/\\)?\\([^%]+\\)?\\(\\(%[-.,:@+_ #^()0-9]*[A-Za-z%][^%]*\\)*%[-.,:@+_ #^()0-9]*[A-Za-z%]\\)?\\([^%]+\\)?\\'" time-stamp-pattern)
271 (and (match-beginning 2) 271 (and (match-beginning 2)
272 (setq line-limit 272 (setq line-limit
273 (string-to-int (match-string 2 time-stamp-pattern)))) 273 (string-to-number (match-string 2 time-stamp-pattern))))
274 (and (match-beginning 3) 274 (and (match-beginning 3)
275 (setq ts-start (match-string 3 time-stamp-pattern))) 275 (setq ts-start (match-string 3 time-stamp-pattern)))
276 (and (match-beginning 4) 276 (and (match-beginning 4)
@@ -558,9 +558,9 @@ and all `time-stamp-format' compatibility."
558 ((eq cur-char ?y) ;year 558 ((eq cur-char ?y) ;year
559 (or alt-form (not (string-equal field-width "")) 559 (or alt-form (not (string-equal field-width ""))
560 (time-stamp-conv-warn "%y" "%:y")) 560 (time-stamp-conv-warn "%y" "%:y"))
561 (string-to-int (format-time-string "%Y" time))) 561 (string-to-number (format-time-string "%Y" time)))
562 ((eq cur-char ?Y) ;4-digit year, new style 562 ((eq cur-char ?Y) ;4-digit year, new style
563 (string-to-int (format-time-string "%Y" time))) 563 (string-to-number (format-time-string "%Y" time)))
564 ((eq cur-char ?z) ;time zone lower case 564 ((eq cur-char ?z) ;time zone lower case
565 (if change-case 565 (if change-case
566 "" ;discourage %z variations 566 "" ;discourage %z variations
@@ -597,7 +597,7 @@ and all `time-stamp-format' compatibility."
597 (let* ((initial-length (length padded-result)) 597 (let* ((initial-length (length padded-result))
598 (desired-length (if (string-equal field-width "") 598 (desired-length (if (string-equal field-width "")
599 initial-length 599 initial-length
600 (string-to-int field-width)))) 600 (string-to-number field-width))))
601 (if (> initial-length desired-length) 601 (if (> initial-length desired-length)
602 ;; truncate strings on right, years on left 602 ;; truncate strings on right, years on left
603 (if (stringp field-result) 603 (if (stringp field-result)
@@ -621,7 +621,7 @@ width specification or \"\". TIME is the time to convert."
621 (format "%%:%c" format-char))) 621 (format "%%:%c" format-char)))
622 (if (and alt-form (not (string-equal field-width ""))) 622 (if (and alt-form (not (string-equal field-width "")))
623 "" ;discourage "%:2d" and the like 623 "" ;discourage "%:2d" and the like
624 (string-to-int (format-time-string format-string time))))) 624 (string-to-number (format-time-string format-string time)))))
625 625
626(defvar time-stamp-conversion-warn t 626(defvar time-stamp-conversion-warn t
627 "Warn about soon-to-be-unsupported forms in `time-stamp-format'. 627 "Warn about soon-to-be-unsupported forms in `time-stamp-format'.
diff --git a/lisp/time.el b/lisp/time.el
index 850843402ca..ddf0d932733 100644
--- a/lisp/time.el
+++ b/lisp/time.el
@@ -331,7 +331,7 @@ update which can wait for the next redisplay."
331 ;; Record that mail file is accessible. 331 ;; Record that mail file is accessible.
332 (setq display-time-server-down-time nil))))))) 332 (setq display-time-server-down-time nil)))))))
333 (24-hours (substring time 11 13)) 333 (24-hours (substring time 11 13))
334 (hour (string-to-int 24-hours)) 334 (hour (string-to-number 24-hours))
335 (12-hours (int-to-string (1+ (% (+ hour 11) 12)))) 335 (12-hours (int-to-string (1+ (% (+ hour 11) 12))))
336 (am-pm (if (>= hour 12) "pm" "am")) 336 (am-pm (if (>= hour 12) "pm" "am"))
337 (minutes (substring time 14 16)) 337 (minutes (substring time 14 16))
diff --git a/lisp/timezone.el b/lisp/timezone.el
index bad269d9cbc..62c8f86f79b 100644
--- a/lisp/timezone.el
+++ b/lisp/timezone.el
@@ -205,7 +205,7 @@ Understands the following styles:
205 ;; Unix Epoch, so are 2000+. Three-digit years are assumed to 205 ;; Unix Epoch, so are 2000+. Three-digit years are assumed to
206 ;; be relative to 1900. 206 ;; be relative to 1900.
207 (if (< (length year) 4) 207 (if (< (length year) 4)
208 (let ((y (string-to-int year))) 208 (let ((y (string-to-number year)))
209 (if (< y 69) 209 (if (< y 69)
210 (setq y (+ y 100))) 210 (setq y (+ y 100)))
211 (setq year (int-to-string (+ 1900 y))))) 211 (setq year (int-to-string (+ 1900 y)))))
@@ -271,7 +271,7 @@ or an integer of the form +-HHMM, or a time zone name."
271 ;; +900 271 ;; +900
272 timezone)) 272 timezone))
273 (if (stringp timezone) 273 (if (stringp timezone)
274 (setq timezone (string-to-int timezone))) 274 (setq timezone (string-to-number timezone)))
275 ;; Taking account of minute in timezone. 275 ;; Taking account of minute in timezone.
276 ;; HHMM -> MM 276 ;; HHMM -> MM
277 (let* ((abszone (abs timezone)) 277 (let* ((abszone (abs timezone))
@@ -314,7 +314,7 @@ Gregorian date Sunday, December 31, 1 BC."
314If LOCAL is nil, it is assumed to be GMT. 314If LOCAL is nil, it is assumed to be GMT.
315If TIMEZONE is nil, use the local time zone." 315If TIMEZONE is nil, use the local time zone."
316 (let* ((date (timezone-parse-date date)) 316 (let* ((date (timezone-parse-date date))
317 (year (string-to-int (aref date 0))) 317 (year (string-to-number (aref date 0)))
318 (year (cond ((< year 69) 318 (year (cond ((< year 69)
319 (+ year 2000)) 319 (+ year 2000))
320 ((< year 100) 320 ((< year 100)
@@ -322,12 +322,12 @@ If TIMEZONE is nil, use the local time zone."
322 ((< year 1000) ; possible 3-digit years. 322 ((< year 1000) ; possible 3-digit years.
323 (+ year 1900)) 323 (+ year 1900))
324 (t year))) 324 (t year)))
325 (month (string-to-int (aref date 1))) 325 (month (string-to-number (aref date 1)))
326 (day (string-to-int (aref date 2))) 326 (day (string-to-number (aref date 2)))
327 (time (timezone-parse-time (aref date 3))) 327 (time (timezone-parse-time (aref date 3)))
328 (hour (string-to-int (aref time 0))) 328 (hour (string-to-number (aref time 0)))
329 (minute (string-to-int (aref time 1))) 329 (minute (string-to-number (aref time 1)))
330 (second (string-to-int (aref time 2))) 330 (second (string-to-number (aref time 2)))
331 (local (or (aref date 4) local)) ;Use original if defined 331 (local (or (aref date 4) local)) ;Use original if defined
332 (timezone 332 (timezone
333 (or timezone 333 (or timezone
diff --git a/lisp/vms-patch.el b/lisp/vms-patch.el
index 48174f41237..60033dc7f20 100644
--- a/lisp/vms-patch.el
+++ b/lisp/vms-patch.el
@@ -93,7 +93,7 @@ If the logical name `EMACS_FILE_NAME' is defined, `find-file' that file."
93 (if (not args) 93 (if (not args)
94 (if file 94 (if file
95 (progn (find-file file) 95 (progn (find-file file)
96 (if line (goto-line (string-to-int line))))) 96 (if line (goto-line (string-to-number line)))))
97 (cd (file-name-directory file)) 97 (cd (file-name-directory file))
98 (vms-command-line-again)))) 98 (vms-command-line-again))))
99 99