diff options
| author | J.D. Smith | 2006-11-20 21:38:06 +0000 |
|---|---|---|
| committer | J.D. Smith | 2006-11-20 21:38:06 +0000 |
| commit | e08734e296664bbe11f4dd5a151d7f9f17da4615 (patch) | |
| tree | 6c5e2b2adfb4cd07bb8dec0d5fdb186015a93f3e | |
| parent | dd5baa1aae3d6efafbb1099088a88f2c60fca987 (diff) | |
| download | emacs-e08734e296664bbe11f4dd5a151d7f9f17da4615.tar.gz emacs-e08734e296664bbe11f4dd5a151d7f9f17da4615.zip | |
(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.
| -rw-r--r-- | lisp/progmodes/idlwave.el | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index 86b4bea321c..3a7d39c5db7 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Carsten Dominik <dominik@science.uva.nl> | 6 | ;; Carsten Dominik <dominik@science.uva.nl> |
| 7 | ;; Chris Chase <chase@att.com> | 7 | ;; Chris Chase <chase@att.com> |
| 8 | ;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu> | 8 | ;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu> |
| 9 | ;; Version: 6.0_em22 | 9 | ;; Version: 6.1_em22 |
| 10 | ;; Keywords: languages | 10 | ;; Keywords: languages |
| 11 | 11 | ||
| 12 | ;; This file is part of GNU Emacs. | 12 | ;; This file is part of GNU Emacs. |
| @@ -1393,7 +1393,7 @@ Normally a space.") | |||
| 1393 | "Character which is inserted as a last character on previous line by | 1393 | "Character which is inserted as a last character on previous line by |
| 1394 | \\[idlwave-split-line] to begin a continuation line. Normally $.") | 1394 | \\[idlwave-split-line] to begin a continuation line. Normally $.") |
| 1395 | 1395 | ||
| 1396 | (defconst idlwave-mode-version "6.0_em22") | 1396 | (defconst idlwave-mode-version "6.1_em22") |
| 1397 | 1397 | ||
| 1398 | (defmacro idlwave-keyword-abbrev (&rest args) | 1398 | (defmacro idlwave-keyword-abbrev (&rest args) |
| 1399 | "Creates a function for abbrev hooks to call `idlwave-check-abbrev' with args." | 1399 | "Creates a function for abbrev hooks to call `idlwave-check-abbrev' with args." |
| @@ -1595,7 +1595,8 @@ Capitalize system variables - action only | |||
| 1595 | (define-key idlwave-mode-map "\C-c\C-t" 'idlwave-find-module-this-file) | 1595 | (define-key idlwave-mode-map "\C-c\C-t" 'idlwave-find-module-this-file) |
| 1596 | (define-key idlwave-mode-map "\C-c?" 'idlwave-routine-info) | 1596 | (define-key idlwave-mode-map "\C-c?" 'idlwave-routine-info) |
| 1597 | (define-key idlwave-mode-map "\M-?" 'idlwave-context-help) | 1597 | (define-key idlwave-mode-map "\M-?" 'idlwave-context-help) |
| 1598 | (define-key idlwave-mode-map [(control meta ?\?)] 'idlwave-online-help) | 1598 | (define-key idlwave-mode-map [(control meta ?\?)] |
| 1599 | 'idlwave-help-assistant-help-with-topic) | ||
| 1599 | ;; Pickup both forms of Esc/Meta binding | 1600 | ;; Pickup both forms of Esc/Meta binding |
| 1600 | (define-key idlwave-mode-map [(meta tab)] 'idlwave-complete) | 1601 | (define-key idlwave-mode-map [(meta tab)] 'idlwave-complete) |
| 1601 | (define-key idlwave-mode-map [?\e?\t] 'idlwave-complete) | 1602 | (define-key idlwave-mode-map [?\e?\t] 'idlwave-complete) |
| @@ -1779,7 +1780,7 @@ idlwave-mode-abbrev-table unless TABLE is non-nil." | |||
| 1779 | 1780 | ||
| 1780 | ;;;###autoload | 1781 | ;;;###autoload |
| 1781 | (defun idlwave-mode () | 1782 | (defun idlwave-mode () |
| 1782 | "Major mode for editing IDL source files (version 6.0_em22). | 1783 | "Major mode for editing IDL source files (version 6.1_em22). |
| 1783 | 1784 | ||
| 1784 | The main features of this mode are | 1785 | The main features of this mode are |
| 1785 | 1786 | ||
| @@ -1940,11 +1941,15 @@ The main features of this mode are | |||
| 1940 | (set (make-local-variable 'paragraph-ignore-fill-prefix) nil) | 1941 | (set (make-local-variable 'paragraph-ignore-fill-prefix) nil) |
| 1941 | (set (make-local-variable 'parse-sexp-ignore-comments) t) | 1942 | (set (make-local-variable 'parse-sexp-ignore-comments) t) |
| 1942 | 1943 | ||
| 1944 | ;; ChangeLog | ||
| 1945 | (set (make-local-variable 'add-log-current-defun-function) | ||
| 1946 | 'idlwave-current-routine-fullname) | ||
| 1947 | |||
| 1943 | ;; Set tag table list to use IDLTAGS as file name. | 1948 | ;; Set tag table list to use IDLTAGS as file name. |
| 1944 | (if (boundp 'tag-table-alist) | 1949 | (if (boundp 'tag-table-alist) |
| 1945 | (add-to-list 'tag-table-alist '("\\.pro$" . "IDLTAGS"))) | 1950 | (add-to-list 'tag-table-alist '("\\.pro$" . "IDLTAGS"))) |
| 1946 | 1951 | ||
| 1947 | ;; Font-lock additions - originally Phil Williams, then Ulrik Dickow | 1952 | ;; Font-lock additions |
| 1948 | ;; Following line is for Emacs - XEmacs uses the corresponding property | 1953 | ;; Following line is for Emacs - XEmacs uses the corresponding property |
| 1949 | ;; on the `idlwave-mode' symbol. | 1954 | ;; on the `idlwave-mode' symbol. |
| 1950 | (set (make-local-variable 'font-lock-defaults) idlwave-font-lock-defaults) | 1955 | (set (make-local-variable 'font-lock-defaults) idlwave-font-lock-defaults) |
| @@ -1969,7 +1974,6 @@ The main features of this mode are | |||
| 1969 | ";" | 1974 | ";" |
| 1970 | 'idlwave-forward-block nil)) | 1975 | 'idlwave-forward-block nil)) |
| 1971 | 1976 | ||
| 1972 | |||
| 1973 | ;; Make a local post-command-hook and add our hook to it | 1977 | ;; Make a local post-command-hook and add our hook to it |
| 1974 | ;; NB: `make-local-hook' needed for older/alternative Emacs compatibility | 1978 | ;; NB: `make-local-hook' needed for older/alternative Emacs compatibility |
| 1975 | ;; (make-local-hook 'post-command-hook) | 1979 | ;; (make-local-hook 'post-command-hook) |
| @@ -1980,7 +1984,7 @@ The main features of this mode are | |||
| 1980 | ;; (make-local-hook 'kill-buffer-hook) | 1984 | ;; (make-local-hook 'kill-buffer-hook) |
| 1981 | (add-hook 'kill-buffer-hook 'idlwave-kill-buffer-update nil 'local) | 1985 | (add-hook 'kill-buffer-hook 'idlwave-kill-buffer-update nil 'local) |
| 1982 | ;; (make-local-hook 'after-save-hook) | 1986 | ;; (make-local-hook 'after-save-hook) |
| 1983 | ;; (add-hook 'after-save-hook 'idlwave-save-buffer-update nil 'local) | 1987 | (add-hook 'after-save-hook 'idlwave-save-buffer-update nil 'local) |
| 1984 | (add-hook 'after-save-hook 'idlwave-revoke-license-to-kill nil 'local) | 1988 | (add-hook 'after-save-hook 'idlwave-revoke-license-to-kill nil 'local) |
| 1985 | 1989 | ||
| 1986 | ;; Setup directories and file, if necessary | 1990 | ;; Setup directories and file, if necessary |
| @@ -2522,6 +2526,10 @@ The marks are pushed." | |||
| 2522 | (message "Could not find doc library header start.") | 2526 | (message "Could not find doc library header start.") |
| 2523 | (goto-char here))))) | 2527 | (goto-char here))))) |
| 2524 | 2528 | ||
| 2529 | (defun idlwave-current-routine-fullname () | ||
| 2530 | (let ((name (idlwave-current-routine))) | ||
| 2531 | (idlwave-make-full-name (nth 2 name) (car name)))) | ||
| 2532 | |||
| 2525 | (defun idlwave-current-routine () | 2533 | (defun idlwave-current-routine () |
| 2526 | "Return (NAME TYPE CLASS) of current routine." | 2534 | "Return (NAME TYPE CLASS) of current routine." |
| 2527 | (idlwave-routines) | 2535 | (idlwave-routines) |
| @@ -3651,6 +3659,7 @@ location on mark ring so that the user can return to previous point." | |||
| 3651 | (run-hooks 'idlwave-timestamp-hook)) | 3659 | (run-hooks 'idlwave-timestamp-hook)) |
| 3652 | (error "No valid DOCLIB header")))) | 3660 | (error "No valid DOCLIB header")))) |
| 3653 | 3661 | ||
| 3662 | |||
| 3654 | ;;; CJC 3/16/93 | 3663 | ;;; CJC 3/16/93 |
| 3655 | ;;; Interface to expand-region-abbrevs which did not work when the | 3664 | ;;; Interface to expand-region-abbrevs which did not work when the |
| 3656 | ;;; abbrev hook associated with an abbrev moves point backwards | 3665 | ;;; abbrev hook associated with an abbrev moves point backwards |
| @@ -4892,19 +4901,14 @@ Cache to disk for quick recovery." | |||
| 4892 | (elem-cnt 0) | 4901 | (elem-cnt 0) |
| 4893 | props rinfo msg-cnt elem type nelem class-result alias | 4902 | props rinfo msg-cnt elem type nelem class-result alias |
| 4894 | routines routine-aliases statement-aliases sysvar-aliases | 4903 | routines routine-aliases statement-aliases sysvar-aliases |
| 4895 | buf version-string) | 4904 | version-string) |
| 4896 | (if (not (file-exists-p catalog-file)) | 4905 | (if (not (file-exists-p catalog-file)) |
| 4897 | (error "No such XML routine info file: %s" catalog-file) | 4906 | (error "No such XML routine info file: %s" catalog-file) |
| 4898 | (if (not (file-readable-p catalog-file)) | 4907 | (if (not (file-readable-p catalog-file)) |
| 4899 | (error "Cannot read XML routine info file: %s" catalog-file))) | 4908 | (error "Cannot read XML routine info file: %s" catalog-file))) |
| 4900 | (require 'xml) | 4909 | (require 'xml) |
| 4901 | (message "Reading XML routine info...") | 4910 | (message "Reading XML routine info...") |
| 4902 | (unwind-protect | 4911 | (setq rinfo (xml-parse-file catalog-file)) |
| 4903 | (progn | ||
| 4904 | ;; avoid warnings about read-only files | ||
| 4905 | (setq buf (find-file-noselect catalog-file 'nowarn)) | ||
| 4906 | (setq rinfo (xml-parse-file catalog-file))) | ||
| 4907 | (if (bufferp buf) (kill-buffer buf))) | ||
| 4908 | (message "Reading XML routine info...done") | 4912 | (message "Reading XML routine info...done") |
| 4909 | (setq rinfo (assq 'CATALOG rinfo)) | 4913 | (setq rinfo (assq 'CATALOG rinfo)) |
| 4910 | (unless rinfo (error "Failed to parse XML routine info")) | 4914 | (unless rinfo (error "Failed to parse XML routine info")) |
| @@ -7713,7 +7717,7 @@ property indicating the link is added." | |||
| 7713 | ((eq mode 'set) | 7717 | ((eq mode 'set) |
| 7714 | (if entry | 7718 | (if entry |
| 7715 | (setq link | 7719 | (setq link |
| 7716 | (if (setq target (cdr (assoc word tags))) | 7720 | (if (setq target (cdr (assoc-string word tags t))) |
| 7717 | (idlwave-substitute-link-target main target) | 7721 | (idlwave-substitute-link-target main target) |
| 7718 | main)))) ;; setting dynamic!!! | 7722 | main)))) ;; setting dynamic!!! |
| 7719 | (t (error "This should not happen"))))) | 7723 | (t (error "This should not happen"))))) |
| @@ -7762,8 +7766,7 @@ property indicating the link is added." | |||
| 7762 | (defun idlwave-class-or-superclass-with-tag (class tag) | 7766 | (defun idlwave-class-or-superclass-with-tag (class tag) |
| 7763 | "Find and return the CLASS or one of its superclass with the | 7767 | "Find and return the CLASS or one of its superclass with the |
| 7764 | associated TAG, if any." | 7768 | associated TAG, if any." |
| 7765 | (let ((sclasses (cons class (cdr (assq 'all-inherits | 7769 | (let ((sclasses (cons class (idlwave-all-class-inherits class))) |
| 7766 | (idlwave-class-info class))))) | ||
| 7767 | cl) | 7770 | cl) |
| 7768 | (catch 'exit | 7771 | (catch 'exit |
| 7769 | (while sclasses | 7772 | (while sclasses |
| @@ -9231,6 +9234,8 @@ Assumes that point is at the beginning of the unit as found by | |||
| 9231 | "--" | 9234 | "--" |
| 9232 | ["Info" idlwave-info t] | 9235 | ["Info" idlwave-info t] |
| 9233 | "--" | 9236 | "--" |
| 9237 | ["Help with Topic" idlwave-help-assistant-help-with-topic | ||
| 9238 | idlwave-help-use-assistant] | ||
| 9234 | ["Launch IDL Help" idlwave-launch-idlhelp t]))) | 9239 | ["Launch IDL Help" idlwave-launch-idlhelp t]))) |
| 9235 | 9240 | ||
| 9236 | (defvar idlwave-mode-debug-menu-def | 9241 | (defvar idlwave-mode-debug-menu-def |