summaryrefslogtreecommitdiff
path: root/lisp/progmodes/idlw-shell.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2021-03-24 17:11:05 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2021-03-24 17:11:05 -0400
commit8e9835c673da09b77f478c769a1579104120a901 (patch)
treeec4a403ea9c7952c5efb9a05047fede67a940a71 /lisp/progmodes/idlw-shell.el
parent3bacf74adb4223e3dded46d63d5743554afd7c94 (diff)
downloademacs-8e9835c673da09b77f478c769a1579104120a901.tar.gz
* list/progmodes/idl*.el: Use lexical-binding
* lisp/progmodes/idlw-complete-structtag.el: Use lexical-binding. * lisp/progmodes/idlw-help.el: Use lexical-binding. Delete redundant `:group` arguments. (idlwave-query-class, idlwave-force-class-query, idlw-help-name) (idlw-help-kwd, idlw-help-link): Declare vars. (idlwave-highlight-linked-completions): Remove unused var `class`. (idlwave-help-find-in-doc-header): Remove unused var `header-re`. * lisp/progmodes/idlw-shell.el (idlwave-shell-input-mode-magic): Remove XEmacs-only code. (idlwave-shell-filter, idlwave-shell-scan-for-state): Use `functionp` since a function can also satisfy `listp`. (idlwave-shell--mouse-examine): Rename from `idlwave-shell-mouse-examine`. Make it a function, and simplify for Emacsā‰„22. Simplify calling convention since all callers always immediately `funcall`d the result. Update all callers. (idlwave-default-mouse-track-event-is-with-button): Use `always`. (idlwave-shell-filter-bp): Simplify a tiny bit. * lisp/progmodes/idlw-toolbar.el: Use lexical-binding. (idlwave-toolbar-add, idlwave-toolbar-remove) (idlwave-toolbar-add-everywhere, idlwave-toolbar-remove-everywhere) (idlwave-toolbar-toggle): Remove XEmacs-only code. * lisp/progmodes/idlwave.el: Use lexical-binding. (idlwave--dlet): New macro. (<toplevel>): Use it. (idlwave-keyword-abbrev): Turn it into a function. (idlwave-code-abbrev): Delete macro. (idlwave-mode-abbrev-table): Use `:enable-function` instead. (idlwave-with-special-syntax): Delete macro; use `with-syntax-table` instead in all callers. (idlwave-action-and-binding): Use `alist-get` and replace `(lambda...) with a proper closure. Change all callers to prefer passing a function in the `cmd` argument. (idlwave-fill-function): Delete constant var. Replace its uses with its value (the symbol `auto-fill-function`). (idlwave-mode): Set `normal-auto-fill-function` instead of the cumbersome use of `idlwave-fill-function`. Tighten a regexp. Don't set `imenu-create-index-function` to the value it should already have. (idlwave-auto-fill-mode): Make it an obsolete alias for `auto-fill-mode`. (idlwave-modify-abbrev): Rename from `idlwave-check-abbrev`. Don't check `idlwave-quoted` since `:enable-function` did it for us already. (idlwave--command-function): Rename from `idlwave-command-hook` and make it hold a function rather than an expression. (idlwave-command-hook, idlwave-modify-abbrev): Adjust accordingly. (idlwave-show-begin-check): Don't check `idlwave-quoted` since `:enable-function` did it for us already. (idlwave-do-action): Use `functionp` since a function can also satisfy `listp` (idlwave-new-sintern-type): Make it a macro, so we don't need to `declare-function` for the functions it defines. (idlwave--class-selector, idlwave--type-selector) (idlwave--method-selector, idlwave--super-classes): Rename those vars by adding the `idlwave--` prefix. Adjust all uses. (idlwave-complete-functions): Rename from `idlwave-complete-special`. (idlwave-call-special): Declare obsolete. Change all callers to use `run-hook-with-args-until-success` instead. (idlwave-complete-filename): Use `dlet`. (idlwave-rinfo-assq-any-class): Remove unused var `class`. (idlwave-determine-class-functions): Rename from `idlwave-determine-class-special`; fix docstring since the functions are called with only one argument. (idlwave--complete-after-success-function): Rename from `idlwave-complete-after-success-form` and make it hold a function. Adjust all users. (idlwave--complete-after-success-force-function): Rename from `idlwave-complete-after-success-form-force` and make it hold a function. Adjust all users. (idlwave-attach-classes): Remove always-t variable `do-dots`. (idlwave-local-value): Use `local-variable-p` and `buffer-local-value` to avoid `with-current-buffer`. (idlwave-default-choose-completion): Comment out (unused and calls a function that doesn't exist). (idlwave-shell-filter-sysvars): Remove unused vars `type`, `name`, and `class` (idlwave-fix-module-if-obj_new): Remove unused var `name`. (idlwave-fix-keywords): Bind `idlwave--super-classes` via `let` than via the function's argument. (idlwave-twin-class, idlwave-twin-name): Move before first use. (idlwave-study-twins): Remove stealth/redundant `type` variable. (idlwave-routine-entry-compare-twins): Remove unused var `type`. (idlwave-path-alist-add-flag): Avoid `add-to-list` on a local var. (idlwave-list-abbrevs): Simplify a tiny bit.
Diffstat (limited to 'lisp/progmodes/idlw-shell.el')
-rw-r--r--lisp/progmodes/idlw-shell.el213
1 files changed, 101 insertions, 112 deletions
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el
index 4bc52247d86..134a6c6e497 100644
--- a/lisp/progmodes/idlw-shell.el
+++ b/lisp/progmodes/idlw-shell.el
@@ -729,7 +729,7 @@ IDL is currently stopped.")
(defconst idlwave-shell-halt-messages-re
- (mapconcat 'identity idlwave-shell-halt-messages "\\|")
+ (mapconcat #'identity idlwave-shell-halt-messages "\\|")
"The regular expression computed from `idlwave-shell-halt-messages'.")
(defconst idlwave-shell-trace-message-re
@@ -934,8 +934,8 @@ IDL has currently stepped.")
"[ \t\n]*\\'"))
(when idlwave-shell-query-for-class
- (add-to-list (make-local-variable 'idlwave-determine-class-special)
- 'idlwave-shell-get-object-class)
+ (add-hook 'idlwave-determine-class-functions
+ #'idlwave-shell-get-object-class nil t)
(setq idlwave-store-inquired-class t))
;; Make sure comint-last-input-end does not go to beginning of
@@ -950,10 +950,10 @@ IDL has currently stepped.")
(setq idlwave-shell-default-directory default-directory)
(setq idlwave-shell-hide-output nil)
- (add-hook 'kill-buffer-hook 'idlwave-shell-kill-shell-buffer-confirm
+ (add-hook 'kill-buffer-hook #'idlwave-shell-kill-shell-buffer-confirm
nil 'local)
- (add-hook 'kill-buffer-hook 'idlwave-shell-delete-temp-files nil 'local)
- (add-hook 'kill-emacs-hook 'idlwave-shell-delete-temp-files)
+ (add-hook 'kill-buffer-hook #'idlwave-shell-delete-temp-files nil 'local)
+ (add-hook 'kill-emacs-hook #'idlwave-shell-delete-temp-files)
;; Set the optional comint variables
(when idlwave-shell-comint-settings
@@ -962,7 +962,7 @@ IDL has currently stepped.")
(set (make-local-variable (car entry)) (cdr entry)))))
- (unless (memq 'comint-carriage-motion
+ (unless (memq #'comint-carriage-motion
(default-value 'comint-output-filter-functions))
;; Strip those pesky ctrl-m's.
(add-hook 'comint-output-filter-functions
@@ -976,18 +976,21 @@ IDL has currently stepped.")
(while (search-forward "\r" pmark t)
(delete-region (point) (line-beginning-position)))))))
'append 'local)
- (add-hook 'comint-output-filter-functions 'comint-strip-ctrl-m nil 'local))
+ (add-hook 'comint-output-filter-functions #'comint-strip-ctrl-m nil 'local))
;; Python-mode, bundled with many Emacs installs, quite cavalierly
;; adds this function to the global default hook. It interferes
;; with overlay-arrows.
- (remove-hook 'comint-output-filter-functions 'py-pdbtrack-track-stack-file)
+ ;; FIXME: We should fix this interference rather than globally turn it off.
+ (when (fboundp 'py-pdbtrack-track-stack-file)
+ (remove-hook 'comint-output-filter-functions
+ #'py-pdbtrack-track-stack-file))
;; IDLWAVE syntax, and turn on abbreviations
(set (make-local-variable 'comment-start) ";")
(setq abbrev-mode t)
- (add-hook 'post-command-hook 'idlwave-command-hook nil t)
+ (add-hook 'post-command-hook #'idlwave-command-hook nil t)
;; Read the command history?
(when (and idlwave-shell-save-command-history
@@ -1045,7 +1048,7 @@ IDL has currently stepped.")
(setq idlwave-path-alist old-path-alist))))
(if (not (fboundp 'idl-shell))
- (fset 'idl-shell 'idlwave-shell))
+ (defalias 'idl-shell #'idlwave-shell))
(defvar idlwave-shell-idl-wframe nil
"Frame for displaying the IDL shell window.")
@@ -1120,7 +1123,7 @@ See also the variable `idlwave-shell-prompt-pattern'.
(and idlwave-shell-use-dedicated-frame
(setq idlwave-shell-idl-wframe (selected-frame)))
(add-hook 'idlwave-shell-sentinel-hook
- 'save-buffers-kill-emacs t))
+ #'save-buffers-kill-emacs t))
;; A non-nil arg means, we want a dedicated frame. This will last
;; for the current editing session.
@@ -1130,7 +1133,7 @@ See also the variable `idlwave-shell-prompt-pattern'.
;; Check if the process still exists. If not, create it.
(unless (comint-check-proc (idlwave-shell-buffer))
(let* ((prg (or idlwave-shell-explicit-file-name "idl"))
- (buf (apply 'make-comint
+ (buf (apply #'make-comint
idlwave-shell-process-name prg nil
(if (stringp idlwave-shell-command-line-options)
(idlwave-split-string
@@ -1138,8 +1141,8 @@ See also the variable `idlwave-shell-prompt-pattern'.
idlwave-shell-command-line-options)))
(process (get-buffer-process buf)))
(setq idlwave-idlwave_routine_info-compiled nil)
- (set-process-filter process 'idlwave-shell-filter)
- (set-process-sentinel process 'idlwave-shell-sentinel)
+ (set-process-filter process #'idlwave-shell-filter)
+ (set-process-sentinel process #'idlwave-shell-sentinel)
(set-buffer buf)
(idlwave-shell-mode)))
(let ((window (idlwave-display-buffer (idlwave-shell-buffer) nil
@@ -1315,10 +1318,7 @@ See also the variable `idlwave-shell-input-mode-spells'."
(setq idlwave-shell-char-mode-active 'exit))
((string-match (nth 1 idlwave-shell-input-mode-spells) string)
;; Set a timer which will soon start the character loop
- (if (fboundp 'start-itimer)
- (start-itimer "IDLWAVE Char Mode" 'idlwave-shell-char-mode-loop 0.5
- nil nil t 'no-error)
- (run-at-time 0.5 nil 'idlwave-shell-char-mode-loop 'no-error)))))
+ (run-at-time 0.5 nil #'idlwave-shell-char-mode-loop 'no-error))))
(defvar keyboard-quit)
(defun idlwave-shell-char-mode-loop (&optional no-error)
@@ -1396,7 +1396,7 @@ Otherwise just move the line. Move down unless UP is non-nil."
(idlwave-shell-move-or-history nil arg))
(define-obsolete-function-alias 'idlwave-shell-comint-filter
- 'comint-output-filter "25.1")
+ #'comint-output-filter "25.1")
(defun idlwave-shell-is-running ()
"Return t if the shell process is running."
@@ -1510,13 +1510,12 @@ and then calls `idlwave-shell-send-command' for any pending commands."
proc filtered))))))
;; Call the post-command hook
- (if (listp idlwave-shell-post-command-hook)
- (progn
- ;;(message "Calling list")
- ;;(prin1 idlwave-shell-post-command-hook)
- (eval idlwave-shell-post-command-hook))
- ;;(message "Calling command function")
- (funcall idlwave-shell-post-command-hook))
+ (if (functionp idlwave-shell-post-command-hook)
+ ;;(message "Calling command function")
+ (funcall idlwave-shell-post-command-hook)
+ ;;(message "Calling list")
+ ;;(prin1 idlwave-shell-post-command-hook)
+ (eval idlwave-shell-post-command-hook t))
;; Reset to default state for next command.
;; Also we do not want to find this prompt again.
@@ -1690,7 +1689,7 @@ the above."
(if bp
(let ((cmd (idlwave-shell-bp-get bp 'cmd)))
(if cmd ;; Execute any breakpoint command
- (if (listp cmd) (eval cmd) (funcall cmd))))
+ (if (functionp cmd) (funcall cmd) (eval cmd t))))
;; A breakpoint that we did not know about - perhaps it was
;; set by the user... Let's update our list.
(idlwave-shell-bp-query)))
@@ -1819,7 +1818,7 @@ The size is given by `idlwave-shell-graphics-window-size'."
(interactive "P")
(let ((n (if n (prefix-numeric-value n) 0)))
(idlwave-shell-send-command
- (apply 'format "window,%d,xs=%d,ys=%d"
+ (apply #'format "window,%d,xs=%d,ys=%d"
n idlwave-shell-graphics-window-size)
nil (idlwave-shell-hide-p 'misc) nil t)))
@@ -1891,7 +1890,7 @@ HEAP_GC, /VERBOSE"
(while (string-match "^PATH:[ \t]*<\\(.*\\)>[ \t]*\n" path-string start)
(push (match-string 1 path-string) dirs)
(setq start (match-end 0)))
- (setq dirs (mapcar 'file-name-as-directory dirs))
+ (setq dirs (mapcar #'file-name-as-directory dirs))
(if (string-match "^SYSDIR:[ \t]*<\\(.*\\)>[ \t]*\n" path-string)
(setq sysdir (file-name-as-directory
(match-string 1 path-string))))
@@ -1938,13 +1937,14 @@ HEAP_GC, /VERBOSE"
key (nth 4 specs)
keys (if (and (stringp key)
(not (string-match "\\` *\\'" key)))
- (mapcar 'list
+ (mapcar #'list
(delete "" (idlwave-split-string key " +")))))
(setq name (idlwave-sintern-routine-or-method name class t)
class (idlwave-sintern-class class t)
file (if (equal file "") nil file)
keys (mapcar (lambda (x)
- (list (idlwave-sintern-keyword (car x) t))) keys))
+ (list (idlwave-sintern-keyword (car x) t)))
+ keys))
;; In the following ignore routines already defined in buffers,
;; assuming that if the buffer stuff differs, it is a "new"
@@ -2053,7 +2053,7 @@ Change the default directory for the process buffer to concur."
(match-string 1 idlwave-shell-command-output)))))
(defvar idlwave-sint-sysvars nil)
-(idlwave-new-sintern-type 'execcomm)
+(idlwave-new-sintern-type execcomm)
(defun idlwave-shell-complete (&optional arg)
"Do completion in the idlwave-shell buffer.
@@ -2180,7 +2180,7 @@ overlays."
(defun idlwave-shell-parse-stack-and-display ()
(let* ((lines (delete "" (idlwave-split-string
idlwave-shell-command-output "^%")))
- (stack (delq nil (mapcar 'idlwave-shell-parse-line lines)))
+ (stack (delq nil (mapcar #'idlwave-shell-parse-line lines)))
(nmax (1- (length stack)))
(nmin 0) message)
(cond
@@ -2710,45 +2710,34 @@ Runs to the last statement and then steps 1 statement. Use the .out command."
(interactive "P")
(idlwave-shell-print arg 'help))
-(defmacro idlwave-shell-mouse-examine (help &optional ev)
- "Create a function for generic examination of expressions."
- `(lambda (event)
- "Expansion function for expression examination."
- (interactive "e")
- (let* ((drag-track (fboundp 'mouse-drag-track))
- (transient-mark-mode t)
- (tracker
- ;; Emacs 22 no longer completes the drag with
- ;; mouse-drag-region, without an additional
- ;; event. mouse-drag-track does so.
- (if drag-track 'mouse-drag-track 'mouse-drag-region)))
- (funcall tracker event)
- (idlwave-shell-print (if (region-active-p) '(4) nil)
- ,help ,ev))))
-
-;; Begin terrible hack section -- XEmacs tests for button2 explicitly
-;; on drag events, calling drag-n-drop code if detected. Ughhh...
-(defun idlwave-default-mouse-track-event-is-with-button (_event _n)
- (declare (obsolete nil "28.1"))
- t)
-
-(define-obsolete-function-alias 'idlwave-xemacs-hack-mouse-track 'ignore "27.1")
+(defun idlwave-shell--mouse-examine (event help &optional ev)
+ "Expansion function for expression examination."
+ (let* ((transient-mark-mode t))
+ (mouse-drag-track event)
+ (idlwave-shell-print (if (region-active-p) '(4) nil)
+ help ev)))
+
+(define-obsolete-function-alias
+ 'idlwave-default-mouse-track-event-is-with-button #'always "28.1")
+
+(define-obsolete-function-alias 'idlwave-xemacs-hack-mouse-track
+ #'ignore "27.1")
;;; End terrible hack section
(defun idlwave-shell-mouse-print (event)
"Print value of variable at the mouse position, with `print'."
(interactive "e")
- (funcall (idlwave-shell-mouse-examine nil) event))
+ (idlwave-shell--mouse-examine event nil))
(defun idlwave-shell-mouse-help (event)
"Print value of variable at the mouse position, with `help'."
(interactive "e")
- (funcall (idlwave-shell-mouse-examine 'help) event))
+ (idlwave-shell--mouse-examine event 'help))
(defun idlwave-shell-examine-select (event)
"Pop-up a list to select from for examining the expression."
(interactive "e")
- (funcall (idlwave-shell-mouse-examine nil event) event))
+ (idlwave-shell--mouse-examine event nil event))
(defmacro idlwave-shell-examine (help)
"Create a function for key-driven expression examination."
@@ -2814,7 +2803,7 @@ from `idlwave-shell-examine-alist' via mini-buffer shortcut key."
(setq beg (region-beginning)
end (region-end)))
(t
- (idlwave-with-special-syntax
+ (with-syntax-table idlwave-find-symbol-syntax-table
;; Move to beginning of current or previous expression
(if (looking-at "\\<\\|(")
;; At beginning of expression, don't move backwards unless
@@ -2847,9 +2836,9 @@ from `idlwave-shell-examine-alist' via mini-buffer shortcut key."
(move-overlay idlwave-shell-expression-overlay beg end
(current-buffer))
(add-hook 'pre-command-hook
- 'idlwave-shell-delete-expression-overlay))
+ #'idlwave-shell-delete-expression-overlay))
(add-hook 'pre-command-hook
- 'idlwave-shell-delete-output-overlay)
+ #'idlwave-shell-delete-output-overlay)
;; Remove empty or comment-only lines
(while (string-match "\n[ \t]*\\(;.*\\)?\r*\n" expr)
@@ -2881,7 +2870,7 @@ from `idlwave-shell-examine-alist' via mini-buffer shortcut key."
;; "Print")
(idlwave-popup-select
ev
- (mapcar 'car idlwave-shell-examine-alist)
+ (mapcar #'car idlwave-shell-examine-alist)
"Examine with"))
idlwave-shell-examine-alist))))
(setq help (cdr help-cons))
@@ -2916,9 +2905,8 @@ from `idlwave-shell-examine-alist' via mini-buffer shortcut key."
"Variable to hold the win/height pairs for all *Examine* windows.")
(defvar idlwave-shell-examine-map (make-sparse-keymap))
-(define-key idlwave-shell-examine-map "q" 'idlwave-shell-examine-display-quit)
-(define-key idlwave-shell-examine-map "c" 'idlwave-shell-examine-display-clear)
-
+(define-key idlwave-shell-examine-map "q" #'idlwave-shell-examine-display-quit)
+(define-key idlwave-shell-examine-map "c" #'idlwave-shell-examine-display-clear)
(defun idlwave-shell-check-compiled-and-display ()
"Check examine output for warning about undefined procedure/function."
@@ -3347,9 +3335,10 @@ the 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)
- (mapc 'idlwave-shell-update-bp old-bp-alist)
- (mapc 'idlwave-shell-update-bp-command-only old-bp-alist))))
+ (mapc (if (eq bp-re bp-re54)
+ #'idlwave-shell-update-bp
+ #'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
@@ -3484,7 +3473,7 @@ The actual line number for a breakpoint in IDL may be different from
the line number used with the IDL breakpoint command.
Looks for a new breakpoint index number in the list. This is
considered the new breakpoint if the file name of frame matches."
- (let ((obp-index (mapcar 'idlwave-shell-bp-get idlwave-shell-old-bp))
+ (let ((obp-index (mapcar #'idlwave-shell-bp-get idlwave-shell-old-bp))
(bpl idlwave-shell-bp-alist))
(while (and (member (idlwave-shell-bp-get (car bpl)) obp-index)
(setq bpl (cdr bpl))))
@@ -3510,7 +3499,7 @@ considered the new breakpoint if the file name of frame matches."
(defvar idlwave-shell-debug-line-map (make-sparse-keymap))
(define-key idlwave-shell-debug-line-map [mouse-3]
- 'idlwave-shell-mouse-active-bp)
+ #'idlwave-shell-mouse-active-bp)
(defun idlwave-shell-update-bp-overlays ()
"Update the overlays which mark breakpoints in the source code.
@@ -3532,7 +3521,7 @@ Existing overlays are recycled, in order to minimize consumption."
(setq ov-alist idlwave-shell-bp-overlays
idlwave-shell-bp-overlays
(if idlwave-shell-bp-glyph
- (mapcar 'list (mapcar 'car idlwave-shell-bp-glyph))
+ (mapcar #'list (mapcar #'car idlwave-shell-bp-glyph))
(list (list 'bp))))
(while (setq bp (pop bp-list))
(save-excursion
@@ -3568,7 +3557,7 @@ Existing overlays are recycled, in order to minimize consumption."
(if help-list
(concat
" - "
- (mapconcat 'identity help-list ", ")))
+ (mapconcat #'identity help-list ", ")))
(if (and (not count) (not condition))
" (use mouse-3 for breakpoint actions)")))
(full-type (if disabled
@@ -3962,73 +3951,73 @@ Otherwise, just expand the file name."
;;(define-key map "\M-?" 'comint-dynamic-list-completions)
;;(define-key map "\t" 'comint-dynamic-complete)
- (define-key map "\C-w" 'comint-kill-region)
- (define-key map "\t" 'idlwave-shell-complete)
- (define-key map "\M-\t" 'idlwave-shell-complete)
- (define-key map "\C-c\C-s" 'idlwave-shell)
- (define-key map "\C-c?" 'idlwave-routine-info)
- (define-key map "\C-g" 'idlwave-keyboard-quit)
- (define-key map "\M-?" 'idlwave-context-help)
+ (define-key map "\C-w" #'comint-kill-region)
+ (define-key map "\t" #'idlwave-shell-complete)
+ (define-key map "\M-\t" #'idlwave-shell-complete)
+ (define-key map "\C-c\C-s" #'idlwave-shell)
+ (define-key map "\C-c?" #'idlwave-routine-info)
+ (define-key map "\C-g" #'idlwave-keyboard-quit)
+ (define-key map "\M-?" #'idlwave-context-help)
(define-key map [(control meta ?\?)]
- 'idlwave-help-assistant-help-with-topic)
- (define-key map "\C-c\C-i" 'idlwave-update-routine-info)
- (define-key map "\C-c\C-y" 'idlwave-shell-char-mode-loop)
- (define-key map "\C-c\C-x" 'idlwave-shell-send-char)
- (define-key map "\C-c=" 'idlwave-resolve)
- (define-key map "\C-c\C-v" 'idlwave-find-module)
- (define-key map "\C-c\C-k" 'idlwave-kill-autoloaded-buffers)
+ #'idlwave-help-assistant-help-with-topic)
+ (define-key map "\C-c\C-i" #'idlwave-update-routine-info)
+ (define-key map "\C-c\C-y" #'idlwave-shell-char-mode-loop)
+ (define-key map "\C-c\C-x" #'idlwave-shell-send-char)
+ (define-key map "\C-c=" #'idlwave-resolve)
+ (define-key map "\C-c\C-v" #'idlwave-find-module)
+ (define-key map "\C-c\C-k" #'idlwave-kill-autoloaded-buffers)
(define-key map idlwave-shell-prefix-key
- 'idlwave-shell-debug-map)
- (define-key map [(up)] 'idlwave-shell-up-or-history)
- (define-key map [(down)] 'idlwave-shell-down-or-history)
+ #'idlwave-shell-debug-map)
+ (define-key map [(up)] #'idlwave-shell-up-or-history)
+ (define-key map [(down)] #'idlwave-shell-down-or-history)
(define-key idlwave-shell-mode-map [(shift mouse-3)]
- 'idlwave-mouse-context-help)
+ #'idlwave-mouse-context-help)
map)
"Keymap for `idlwave-mode'.")
(defvar idlwave-shell-electric-debug-mode-map
(let ((map (make-sparse-keymap)))
;; A few extras in the electric debug map
- (define-key map " " 'idlwave-shell-step)
- (define-key map "+" 'idlwave-shell-stack-up)
- (define-key map "=" 'idlwave-shell-stack-up)
- (define-key map "-" 'idlwave-shell-stack-down)
- (define-key map "_" 'idlwave-shell-stack-down)
+ (define-key map " " #'idlwave-shell-step)
+ (define-key map "+" #'idlwave-shell-stack-up)
+ (define-key map "=" #'idlwave-shell-stack-up)
+ (define-key map "-" #'idlwave-shell-stack-down)
+ (define-key map "_" #'idlwave-shell-stack-down)
(define-key map "e" (lambda () (interactive) (idlwave-shell-print '(16))))
- (define-key map "q" 'idlwave-shell-retall)
+ (define-key map "q" #'idlwave-shell-retall)
(define-key map "t"
(lambda () (interactive) (idlwave-shell-send-command "help,/TRACE")))
- (define-key map [(control ??)] 'idlwave-shell-electric-debug-help)
+ (define-key map [(control ??)] #'idlwave-shell-electric-debug-help)
(define-key map "x"
(lambda (arg) (interactive "P")
(idlwave-shell-print arg nil nil t)))
map))
(defvar idlwave-shell-mode-prefix-map (make-sparse-keymap))
-(fset 'idlwave-shell-mode-prefix-map idlwave-shell-mode-prefix-map)
+(defalias 'idlwave-shell-mode-prefix-map idlwave-shell-mode-prefix-map)
(defvar idlwave-mode-prefix-map (make-sparse-keymap))
-(fset 'idlwave-mode-prefix-map idlwave-mode-prefix-map)
+(defalias 'idlwave-mode-prefix-map idlwave-mode-prefix-map)
(defun idlwave-shell-define-key-both (key hook)
"Define a key in both the shell and buffer mode maps."
(define-key idlwave-mode-map key hook)
(define-key idlwave-shell-mode-map key hook))
-(define-key idlwave-mode-map "\C-c\C-y" 'idlwave-shell-char-mode-loop)
-(define-key idlwave-mode-map "\C-c\C-x" 'idlwave-shell-send-char)
+(define-key idlwave-mode-map "\C-c\C-y" #'idlwave-shell-char-mode-loop)
+(define-key idlwave-mode-map "\C-c\C-x" #'idlwave-shell-send-char)
;; The mouse bindings for PRINT and HELP
(idlwave-shell-define-key-both [(shift down-mouse-2)]
- 'idlwave-shell-mouse-print)
+ #'idlwave-shell-mouse-print)
(idlwave-shell-define-key-both [(control meta down-mouse-2)]
- 'idlwave-shell-mouse-help)
+ #'idlwave-shell-mouse-help)
(idlwave-shell-define-key-both [(control shift down-mouse-2)]
- 'idlwave-shell-examine-select)
+ #'idlwave-shell-examine-select)
;; We need to turn off the button release events.
-(idlwave-shell-define-key-both [(shift mouse-2)] 'ignore)
-(idlwave-shell-define-key-both [(shift control mouse-2)] 'ignore)
-(idlwave-shell-define-key-both [(control meta mouse-2)] 'ignore)
+(idlwave-shell-define-key-both [(shift mouse-2)] #'ignore)
+(idlwave-shell-define-key-both [(shift control mouse-2)] #'ignore)
+(idlwave-shell-define-key-both [(control meta mouse-2)] #'ignore)
;; The following set of bindings is used to bind the debugging keys.
@@ -4109,8 +4098,8 @@ Otherwise, just expand the file name."
cmd))))
; Enter the prefix map in two places.
-(fset 'idlwave-debug-map idlwave-mode-prefix-map)
-(fset 'idlwave-shell-debug-map idlwave-shell-mode-prefix-map)
+(defalias 'idlwave-debug-map idlwave-mode-prefix-map)
+(defalias 'idlwave-shell-debug-map idlwave-shell-mode-prefix-map)
;; The Electric Debug Minor Mode --------------------------------------------
@@ -4496,6 +4485,6 @@ static char * file[] = {
(idlwave-toolbar-toggle))
(if idlwave-shell-use-toolbar
- (add-hook 'idlwave-shell-mode-hook 'idlwave-toolbar-add-everywhere))
+ (add-hook 'idlwave-shell-mode-hook #'idlwave-toolbar-add-everywhere))
;;; idlw-shell.el ends here