Mercurial > emacs
changeset 74104:a15c9975c15b
(idlwave-mode): Set add-log-current-defun-function.
(idlwave-current-routine-fullname): Added, to support add-log.
(idlwave-convert-xml-system-routine-info): Simplify XML parsing
to reflect improvements to xml-parse-file.
(idlwave-mode-menu-def): New binding for help-with-topic.
author | J.D. Smith <jdsmith@as.arizona.edu> |
---|---|
date | Mon, 20 Nov 2006 21:38:06 +0000 |
parents | b21beb03e5c4 |
children | 280766a0721d |
files | lisp/progmodes/idlwave.el |
diffstat | 1 files changed, 22 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/idlwave.el Mon Nov 20 21:35:28 2006 +0000 +++ b/lisp/progmodes/idlwave.el Mon Nov 20 21:38:06 2006 +0000 @@ -6,7 +6,7 @@ ;; Carsten Dominik <dominik@science.uva.nl> ;; Chris Chase <chase@att.com> ;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu> -;; Version: 6.0_em22 +;; Version: 6.1_em22 ;; Keywords: languages ;; This file is part of GNU Emacs. @@ -1393,7 +1393,7 @@ "Character which is inserted as a last character on previous line by \\[idlwave-split-line] to begin a continuation line. Normally $.") -(defconst idlwave-mode-version "6.0_em22") +(defconst idlwave-mode-version "6.1_em22") (defmacro idlwave-keyword-abbrev (&rest args) "Creates a function for abbrev hooks to call `idlwave-check-abbrev' with args." @@ -1595,7 +1595,8 @@ (define-key idlwave-mode-map "\C-c\C-t" 'idlwave-find-module-this-file) (define-key idlwave-mode-map "\C-c?" 'idlwave-routine-info) (define-key idlwave-mode-map "\M-?" 'idlwave-context-help) -(define-key idlwave-mode-map [(control meta ?\?)] 'idlwave-online-help) +(define-key idlwave-mode-map [(control meta ?\?)] + 'idlwave-help-assistant-help-with-topic) ;; Pickup both forms of Esc/Meta binding (define-key idlwave-mode-map [(meta tab)] 'idlwave-complete) (define-key idlwave-mode-map [?\e?\t] 'idlwave-complete) @@ -1779,7 +1780,7 @@ ;;;###autoload (defun idlwave-mode () - "Major mode for editing IDL source files (version 6.0_em22). + "Major mode for editing IDL source files (version 6.1_em22). The main features of this mode are @@ -1940,11 +1941,15 @@ (set (make-local-variable 'paragraph-ignore-fill-prefix) nil) (set (make-local-variable 'parse-sexp-ignore-comments) t) + ;; ChangeLog + (set (make-local-variable 'add-log-current-defun-function) + 'idlwave-current-routine-fullname) + ;; Set tag table list to use IDLTAGS as file name. (if (boundp 'tag-table-alist) (add-to-list 'tag-table-alist '("\\.pro$" . "IDLTAGS"))) - ;; Font-lock additions - originally Phil Williams, then Ulrik Dickow + ;; Font-lock additions ;; Following line is for Emacs - XEmacs uses the corresponding property ;; on the `idlwave-mode' symbol. (set (make-local-variable 'font-lock-defaults) idlwave-font-lock-defaults) @@ -1969,7 +1974,6 @@ ";" 'idlwave-forward-block nil)) - ;; Make a local post-command-hook and add our hook to it ;; NB: `make-local-hook' needed for older/alternative Emacs compatibility ;; (make-local-hook 'post-command-hook) @@ -1980,7 +1984,7 @@ ;; (make-local-hook 'kill-buffer-hook) (add-hook 'kill-buffer-hook 'idlwave-kill-buffer-update nil 'local) ;; (make-local-hook 'after-save-hook) - ;; (add-hook 'after-save-hook 'idlwave-save-buffer-update nil 'local) + (add-hook 'after-save-hook 'idlwave-save-buffer-update nil 'local) (add-hook 'after-save-hook 'idlwave-revoke-license-to-kill nil 'local) ;; Setup directories and file, if necessary @@ -2522,6 +2526,10 @@ (message "Could not find doc library header start.") (goto-char here))))) +(defun idlwave-current-routine-fullname () + (let ((name (idlwave-current-routine))) + (idlwave-make-full-name (nth 2 name) (car name)))) + (defun idlwave-current-routine () "Return (NAME TYPE CLASS) of current routine." (idlwave-routines) @@ -3651,6 +3659,7 @@ (run-hooks 'idlwave-timestamp-hook)) (error "No valid DOCLIB header")))) + ;;; CJC 3/16/93 ;;; Interface to expand-region-abbrevs which did not work when the ;;; abbrev hook associated with an abbrev moves point backwards @@ -4892,19 +4901,14 @@ (elem-cnt 0) props rinfo msg-cnt elem type nelem class-result alias routines routine-aliases statement-aliases sysvar-aliases - buf version-string) + version-string) (if (not (file-exists-p catalog-file)) (error "No such XML routine info file: %s" catalog-file) (if (not (file-readable-p catalog-file)) (error "Cannot read XML routine info file: %s" catalog-file))) (require 'xml) (message "Reading XML routine info...") - (unwind-protect - (progn - ;; avoid warnings about read-only files - (setq buf (find-file-noselect catalog-file 'nowarn)) - (setq rinfo (xml-parse-file catalog-file))) - (if (bufferp buf) (kill-buffer buf))) + (setq rinfo (xml-parse-file catalog-file)) (message "Reading XML routine info...done") (setq rinfo (assq 'CATALOG rinfo)) (unless rinfo (error "Failed to parse XML routine info")) @@ -7713,7 +7717,7 @@ ((eq mode 'set) (if entry (setq link - (if (setq target (cdr (assoc word tags))) + (if (setq target (cdr (assoc-string word tags t))) (idlwave-substitute-link-target main target) main)))) ;; setting dynamic!!! (t (error "This should not happen"))))) @@ -7762,8 +7766,7 @@ (defun idlwave-class-or-superclass-with-tag (class tag) "Find and return the CLASS or one of its superclass with the associated TAG, if any." - (let ((sclasses (cons class (cdr (assq 'all-inherits - (idlwave-class-info class))))) + (let ((sclasses (cons class (idlwave-all-class-inherits class))) cl) (catch 'exit (while sclasses @@ -9231,6 +9234,8 @@ "--" ["Info" idlwave-info t] "--" + ["Help with Topic" idlwave-help-assistant-help-with-topic + idlwave-help-use-assistant] ["Launch IDL Help" idlwave-launch-idlhelp t]))) (defvar idlwave-mode-debug-menu-def