diff options
Diffstat (limited to 'lisp/progmodes/idlw-shell.el')
-rw-r--r-- | lisp/progmodes/idlw-shell.el | 46 |
1 files changed, 17 insertions, 29 deletions
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el index 426b8380f22..20f52fb13b0 100644 --- a/lisp/progmodes/idlw-shell.el +++ b/lisp/progmodes/idlw-shell.el @@ -98,18 +98,6 @@ (eval-when-compile (require 'cl)) (defvar idlwave-shell-have-new-custom nil) -(eval-and-compile - ;; Kludge to allow `defcustom' for Emacs 19. - (condition-case () (require 'custom) (error nil)) - (if (and (featurep 'custom) - (fboundp 'custom-declare-variable) - (fboundp 'defface)) - ;; We've got what we needed - (setq idlwave-shell-have-new-custom t) - ;; We have the old or no custom-library, hack around it! - (defmacro defgroup (&rest args) nil) - (defmacro defcustom (var value doc &rest args) - `(defvar ,var ,value ,doc)))) ;;; Customizations: idlwave-shell group @@ -1322,7 +1310,7 @@ message, independent of what HIDE is set to." (if (or (not (setq buf (get-buffer (idlwave-shell-buffer)))) (not (setq proc (get-buffer-process buf)))) (if (not idlwave-shell-automatic-start) - (error + (error "%s" (substitute-command-keys "You need to first start an IDL shell with \\[idlwave-shell]")) (idlwave-shell-recenter-shell-window) @@ -1474,7 +1462,7 @@ Otherwise just move the line. Move down unless UP is non-nil." (if (and idlwave-shell-arrows-do-history (>= (1+ (save-excursion (end-of-line) (point))) proc-pos)) (comint-previous-input arg) - (previous-line arg)))) + (forward-line (- arg))))) (defun idlwave-shell-up-or-history (&optional arg) "When in last line of process buffer, move to previous input. @@ -2375,7 +2363,7 @@ matter what the settings of that variable." (if (not (idlwave-shell-valid-frame frame)) ;; fixme: errors are dangerous in shell filters. but i think i ;; have never encountered this one. - (error (concat "invalid frame - unable to access file: " (car frame))) + (error "invalid frame - unable to access file: %s" (car frame)) ;;; ;;; buffer : the buffer to display a line in. ;;; select-shell: current buffer is the shell. @@ -3461,12 +3449,12 @@ breakpoint overlays." line (string-to-number (match-string (nth 2 indmap))) file (idlwave-shell-file-name (match-string (nth 3 indmap)))) (if (eq bp-re bp-re55) - (setq count (if (match-string 10) 1 + (setq count (if (match-string 10) 1 (if (match-string 8) (string-to-number (match-string 8)))) condition (match-string 13) disabled (not (null (match-string 15))))) - + ;; Add the breakpoint info to the list (nconc idlwave-shell-bp-alist (list (cons (list file line) @@ -3476,9 +3464,9 @@ breakpoint overlays." count nil condition disabled)))))) (setq idlwave-shell-bp-alist (cdr idlwave-shell-bp-alist)) ;; Update breakpoint data - (if (eq bp-re bp-re54) - (mapcar 'idlwave-shell-update-bp old-bp-alist) - (mapcar 'idlwave-shell-update-bp-command-only old-bp-alist)))) + (if (eq bp-re bp-re54) + (mapc 'idlwave-shell-update-bp old-bp-alist) + (mapc 'idlwave-shell-update-bp-command-only old-bp-alist)))) ;; Update the breakpoint overlays (unless no-show (idlwave-shell-update-bp-overlays)) ;; Return the new list @@ -4530,27 +4518,27 @@ idlwave-shell-electric-debug-mode-map) (if (or (featurep 'easymenu) (load "easymenu" t)) (progn - (easy-menu-define + (easy-menu-define idlwave-mode-debug-menu idlwave-mode-map "IDL debugging menus" idlwave-shell-menu-def) (easy-menu-define idlwave-shell-mode-menu idlwave-shell-mode-map "IDL shell menus" idlwave-shell-menu-def) (save-excursion - (mapcar (lambda (buf) - (set-buffer buf) - (if (eq major-mode 'idlwave-mode) - (progn - (easy-menu-remove idlwave-mode-debug-menu) - (easy-menu-add idlwave-mode-debug-menu)))) - (buffer-list))))) + (mapc (lambda (buf) + (set-buffer buf) + (if (eq major-mode 'idlwave-mode) + (progn + (easy-menu-remove idlwave-mode-debug-menu) + (easy-menu-add idlwave-mode-debug-menu)))) + (buffer-list))))) ;; The Breakpoint Glyph ------------------------------------------------------- (defvar idlwave-shell-bp-glyph nil "The glyphs to mark breakpoint lines in the source code.") -(let ((image-alist +(let ((image-alist '((bp . "/* XPM */ static char * file[] = { \"14 12 3 1\", |