(global-font-lock-mode 1)
(set-face-foreground font-lock-comment-face "FireBrick")
(set-face-foreground font-lock-string-face "DarkOrchid")
(set-face-foreground font-lock-keyword-face "DarkGreen")
(set-face-foreground font-lock-function-name-face "Navy")
(set-face-foreground font-lock-variable-name-face "Magenta")
(set-face-foreground font-lock-reference-face "DarkSlateGray")
(autoload 'idlwave-mode "idlwave" "IDLWAVE Mode" t)
(autoload 'idlwave-shell "idlw-shell" "IDLWAVE Shell" t)
(setq auto-mode-alist (cons '(".*/idl/smart/.*\\.pro\\'" . smart-mode)
auto-mode-alist))
(setq
idlwave-abbrev-start-char "."
idlwave-shell-debug-modifiers '(super)
idlwave-libinfo-file "~/.idlwave/libinfo.el"
idlwave-init-rinfo-when-idle-after 10
idlwave-shell-use-dedicated-frame t
comint-input-ring-size 1024
my-face (make-face 'my-idlwave-shell-expression-highlight-face)
idlwave-shell-expression-face my-face
idlwave-shell-output-face my-face)
(set-face-background my-face "GoldenRod")
(setq idlwave-help-browser-function 'browse-url-generic
idlwave-help-browser-generic-program "galeonwave")
(defun my-common-idlwave-hook ()
(local-set-key [C-S-mouse-3] 'idlwave-mouse-context-help)
(local-set-key [C-kp-subtract] 'idlwave-shell-stack-up)
(local-set-key [C-kp-add] 'idlwave-shell-stack-down))
(add-hook 'idlwave-mode-hook
(lambda ()
(require 'idlw-complete-structtag)
(set (make-local-variable 'minor-mode-alist)
(copy-sequence minor-mode-alist))
(delq (assq 'auto-fill-function minor-mode-alist) minor-mode-alist)
(delq (assq 'abbrev-mode minor-mode-alist) minor-mode-alist)
(local-set-key [return] 'idlwave-newline)
(local-set-key [f5] 'idlwave-shell-break-here)
(local-set-key [f6] 'idlwave-shell-clear-current-bp)
(local-set-key [f7] 'idlwave-shell-cont)
(local-set-key [f8] 'idlwave-shell-clear-all-bp)
(local-unset-key "\M-s")
(local-set-key [?\e?\t] 'idlwave-complete)
(setq idlwave-max-extra-continuation-indent 100
idlwave-expand-generic-end t
idlwave-completion-show-classes 10
idlwave-store-inquired-class t
idlwave-block-indent 3 idlwave-main-block-indent 2
idlwave-end-offset -3
idlwave-continuation-indent 3
font-lock-maximum-decoration 3
idlwave-completion-case '((routine . preserve)
(keyword . upcase)
(class . preserve)
(method . preserve))
idlwave-shell-automatic-start t
paragraph-separate "[ \t\f]*$\\|[ \t]*;+[ \t]*$\\|;+[+=-_*]+$"
idlwave-query-class '((method-default . nil)
(keyword-default . nil)
("INIT" . t)
("CLEANUP" . t)
("SETPROPERTY" .t)
("GETPROPERTY" .t)))
(idlwave-define-abbrev "wb" "widget_base()"
(idlwave-keyword-abbrev 1))
(idlwave-define-abbrev "on" "obj_new()"
(idlwave-keyword-abbrev 1))
(idlwave-define-abbrev "fn1" "for i=0,n_elements()-1 do"
(idlwave-keyword-abbrev 6))))
(add-hook 'idlwave-shell-mode-hook
(lambda ()
(local-set-key "\M-\t"
'(lambda ()
(interactive)
(idlwave-complete 3)))
(local-set-key [C-kp-begin] 'comint-kill-input)
(local-set-key [f5] 'idlwave-shell-break-here)
(local-set-key [f6] 'idlwave-shell-clear-current-bp)
(local-set-key [f7] 'idlwave-shell-cont)
(local-set-key [f8] 'idlwave-shell-clear-all-bp)
(setq
idlwave-shell-arrows-do-history 'cmdline
idlwave-shell-overlay-arrow "=>")
(define-key (current-local-map) "\C-a" 'comint-bol)
(define-key (current-local-map) [kp-multiply] 'comint-bol)
(idlwave-shell-define-key-both
[s-down-mouse-2]
(idlwave-shell-mouse-examine "print, size(___,/DIMENSIONS)"))
(idlwave-shell-define-key-both
[f9] (idlwave-shell-examine "print, size(___,/DIMENSIONS)"))
(idlwave-shell-define-key-both
[f10] (idlwave-shell-examine "print,size(___,/TNAME)"))
(idlwave-shell-define-key-both
[f11] (idlwave-shell-examine "help,___,/STRUCTURE"))
(idlwave-shell-define-key-both
[f4] 'idlwave-shell-retall)
(idlwave-shell-define-key-both
[f3] (lambda () (interactive)
(idlwave-shell-send-command
"__wa=widget_info(/managed) & for i=0,n_elements(__wa)-1 do widget_control,__wa[i], /clear_events" nil 'hide)
(idlwave-shell-retall)))
(local-set-key
[f5]
'(lambda () (interactive)
(insert "n_elements()") (backward-char)))
(define-key (current-local-map)
[f6]
'(lambda () (interactive)
(insert "size()") (backward-char)))
(define-key (current-local-map)
[f8]
'(lambda () (interactive)
(insert "__define")))))
(add-hook 'idlwave-mode-hook 'my-common-idlwave-hook 'append)
(add-hook 'idlwave-shell-mode-hook 'my-common-idlwave-hook 'append)