aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorKaroly Lorentey2005-06-15 12:57:51 +0000
committerKaroly Lorentey2005-06-15 12:57:51 +0000
commitef85512e51f043d73788f00a2aed13cccde0682c (patch)
treefc1fa1378533250f260ef8eaa9a84ae882d9df84 /lisp/progmodes
parent8736257554f49445f7b4402ac7a9436b38ce6452 (diff)
parentef88a9999004e6c26148c8d280d6a41f623d7249 (diff)
downloademacs-ef85512e51f043d73788f00a2aed13cccde0682c.tar.gz
emacs-ef85512e51f043d73788f00a2aed13cccde0682c.zip
Merged from miles@gnu.org--gnu-2005 (patch 80-82, 350-422)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-350 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-351 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-352 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-353 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-354 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-355 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-356 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-357 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-358 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-359 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-360 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-361 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-362 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-363 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-364 Remove "-face" suffix from widget faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-365 Remove "-face" suffix from custom faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-366 Remove "-face" suffix from change-log faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-367 Remove "-face" suffix from compilation faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-368 Remove "-face" suffix from diff-mode faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-369 lisp/longlines.el (longlines-visible-face): Face removed * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-370 Remove "-face" suffix from woman faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-371 Remove "-face" suffix from whitespace-highlight face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-372 Remove "-face" suffix from ruler-mode faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-373 Remove "-face" suffix from show-paren faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-374 Remove "-face" suffix from log-view faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-375 Remove "-face" suffix from smerge faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-376 Remove "-face" suffix from show-tabs faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-377 Remove "-face" suffix from highlight-changes faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-378 Remove "-face" suffix from and downcase info faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-379 Remove "-face" suffix from pcvs faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-380 Update uses of renamed pcvs faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-381 Tweak ChangeLog * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-382 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-383 Remove "-face" suffix from strokes-char face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-384 Remove "-face" suffix from compare-windows face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-385 Remove "-face" suffix from calendar faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-386 Remove "-face" suffix from diary-button face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-387 Remove "-face" suffix from testcover faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-388 Remove "-face" suffix from viper faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-389 Remove "-face" suffix from org faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-390 Remove "-face" suffix from sgml-namespace face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-391 Remove "-face" suffix from table-cell face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-392 Remove "-face" suffix from tex-mode faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-393 Remove "-face" suffix from texinfo-heading face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-394 Remove "-face" suffix from flyspell faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-395 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-396 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-397 Remove "-face" suffix from gomoku faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-398 Remove "-face" suffix from mpuz faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-399 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-400 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-401 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-402 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-403 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-404 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-405 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-406 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-407 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-408 Remove "-face" suffix from Buffer-menu-buffer face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-409 Remove "-face" suffix from antlr-mode faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-410 Remove "-face" suffix from ebrowse faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-411 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-412 Remove "-face" suffix from flymake faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-413 Remove "-face" suffix from idlwave faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-414 Remove "-face" suffix from sh-script faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-415 Remove "-face" suffix from vhdl-mode faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-416 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-417 Remove "-face" suffix from which-func face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-418 Remove "-face" suffix from cperl-mode faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-419 Remove "-face" suffix from ld-script faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-420 Fix cperl-mode font-lock problem * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-421 Tweak which-func face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-422 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-80 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-81 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-82 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-350
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/ada-mode.el6
-rw-r--r--lisp/progmodes/antlr-mode.el94
-rw-r--r--lisp/progmodes/compile.el25
-rw-r--r--lisp/progmodes/cperl-mode.el113
-rw-r--r--lisp/progmodes/cpp.el4
-rw-r--r--lisp/progmodes/delphi.el4
-rw-r--r--lisp/progmodes/ebrowse.el46
-rw-r--r--lisp/progmodes/flymake.el18
-rw-r--r--lisp/progmodes/gdb-ui.el66
-rw-r--r--lisp/progmodes/gud.el28
-rw-r--r--lisp/progmodes/idlw-help.el8
-rw-r--r--lisp/progmodes/idlw-shell.el46
-rw-r--r--lisp/progmodes/idlwave.el826
-rw-r--r--lisp/progmodes/ld-script.el8
-rw-r--r--lisp/progmodes/make-mode.el118
-rw-r--r--lisp/progmodes/octave-inf.el2
-rw-r--r--lisp/progmodes/sh-script.el6
-rw-r--r--lisp/progmodes/sql.el2
-rw-r--r--lisp/progmodes/vhdl-mode.el240
-rw-r--r--lisp/progmodes/which-func.el33
20 files changed, 917 insertions, 776 deletions
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el
index bc0edb1f047..ba4702d90a4 100644
--- a/lisp/progmodes/ada-mode.el
+++ b/lisp/progmodes/ada-mode.el
@@ -1462,7 +1462,7 @@ The standard casing rules will no longer apply to this word."
1462 (setq file-name (car ada-case-exception-file))) 1462 (setq file-name (car ada-case-exception-file)))
1463 (t 1463 (t
1464 (error (concat "No exception file specified. " 1464 (error (concat "No exception file specified. "
1465 "See variable ada-case-exception-file.")))) 1465 "See variable ada-case-exception-file"))))
1466 1466
1467 (set-syntax-table ada-mode-symbol-syntax-table) 1467 (set-syntax-table ada-mode-symbol-syntax-table)
1468 (unless word 1468 (unless word
@@ -1501,7 +1501,7 @@ word itself has a special casing."
1501 (car ada-case-exception-file)) 1501 (car ada-case-exception-file))
1502 (t 1502 (t
1503 (error (concat "No exception file specified. " 1503 (error (concat "No exception file specified. "
1504 "See variable ada-case-exception-file.")))))) 1504 "See variable ada-case-exception-file"))))))
1505 1505
1506 ;; Find the substring to define as an exception. Order is: the parameter, 1506 ;; Find the substring to define as an exception. Order is: the parameter,
1507 ;; if any, or the selected region, or the word under the cursor 1507 ;; if any, or the selected region, or the word under the cursor
@@ -5398,7 +5398,7 @@ This function typically is to be hooked into `ff-file-created-hooks'."
5398 (setq body-file (ada-get-body-name)) 5398 (setq body-file (ada-get-body-name))
5399 (if body-file 5399 (if body-file
5400 (find-file body-file) 5400 (find-file body-file)
5401 (error "No body found for the package. Create it first.")) 5401 (error "No body found for the package. Create it first"))
5402 5402
5403 (save-restriction 5403 (save-restriction
5404 (widen) 5404 (widen)
diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el
index bdf376bfab7..89d167de25d 100644
--- a/lisp/progmodes/antlr-mode.el
+++ b/lisp/progmodes/antlr-mode.el
@@ -1,6 +1,6 @@
1;;; antlr-mode.el --- major mode for ANTLR grammar files 1;;; antlr-mode.el --- major mode for ANTLR grammar files
2 2
3;; Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. 3;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
4;; 4;;
5;; Author: Christoph.Wedler@sap.com 5;; Author: Christoph.Wedler@sap.com
6;; Keywords: languages, ANTLR, code generator 6;; Keywords: languages, ANTLR, code generator
@@ -827,58 +827,72 @@ font-lock keywords according to `font-lock-defaults' used for the code
827in the grammar's actions and semantic predicates, see 827in the grammar's actions and semantic predicates, see
828`antlr-font-lock-maximum-decoration'.") 828`antlr-font-lock-maximum-decoration'.")
829 829
830(defvar antlr-font-lock-default-face 'antlr-font-lock-default-face) 830(defvar antlr-default-face 'antlr-default)
831(defface antlr-font-lock-default-face nil 831(defface antlr-default
832 "Face to prevent strings from language dependent highlighting. 832 "Face to prevent strings from language dependent highlighting.
833Do not change." 833Do not change."
834 :group 'antlr) 834 :group 'antlr)
835;; backward-compatibility alias
836(put 'antlr-font-lock-default-face 'face-alias 'antlr-default)
835 837
836(defvar antlr-font-lock-keyword-face 'antlr-font-lock-keyword-face) 838(defvar antlr-keyword-face 'antlr-keyword)
837(defface antlr-font-lock-keyword-face 839(defface antlr-keyword
838 (cond-emacs-xemacs 840 (cond-emacs-xemacs
839 '((((class color) (background light)) 841 '((((class color) (background light))
840 (:foreground "black" :EMACS :weight bold :XEMACS :bold t)))) 842 (:foreground "black" :EMACS :weight bold :XEMACS :bold t))))
841 "ANTLR keywords." 843 "ANTLR keywords."
842 :group 'antlr) 844 :group 'antlr)
845;; backward-compatibility alias
846(put 'antlr-font-lock-keyword-face 'face-alias 'antlr-keyword)
843 847
844(defvar antlr-font-lock-syntax-face 'antlr-font-lock-keyword-face) 848(defvar antlr-syntax-face 'antlr-keyword)
845(defface antlr-font-lock-syntax-face 849(defface antlr-syntax
846 (cond-emacs-xemacs 850 (cond-emacs-xemacs
847 '((((class color) (background light)) 851 '((((class color) (background light))
848 (:foreground "black" :EMACS :weight bold :XEMACS :bold t)))) 852 (:foreground "black" :EMACS :weight bold :XEMACS :bold t))))
849 "ANTLR syntax symbols like :, |, (, ), ...." 853 "ANTLR syntax symbols like :, |, (, ), ...."
850 :group 'antlr) 854 :group 'antlr)
855;; backward-compatibility alias
856(put 'antlr-font-lock-syntax-face 'face-alias 'antlr-syntax)
851 857
852(defvar antlr-font-lock-ruledef-face 'antlr-font-lock-ruledef-face) 858(defvar antlr-ruledef-face 'antlr-ruledef)
853(defface antlr-font-lock-ruledef-face 859(defface antlr-ruledef
854 (cond-emacs-xemacs 860 (cond-emacs-xemacs
855 '((((class color) (background light)) 861 '((((class color) (background light))
856 (:foreground "blue" :EMACS :weight bold :XEMACS :bold t)))) 862 (:foreground "blue" :EMACS :weight bold :XEMACS :bold t))))
857 "ANTLR rule references (definition)." 863 "ANTLR rule references (definition)."
858 :group 'antlr) 864 :group 'antlr)
865;; backward-compatibility alias
866(put 'antlr-font-lock-ruledef-face 'face-alias 'antlr-ruledef)
859 867
860(defvar antlr-font-lock-tokendef-face 'antlr-font-lock-tokendef-face) 868(defvar antlr-tokendef-face 'antlr-tokendef)
861(defface antlr-font-lock-tokendef-face 869(defface antlr-tokendef
862 (cond-emacs-xemacs 870 (cond-emacs-xemacs
863 '((((class color) (background light)) 871 '((((class color) (background light))
864 (:foreground "blue" :EMACS :weight bold :XEMACS :bold t)))) 872 (:foreground "blue" :EMACS :weight bold :XEMACS :bold t))))
865 "ANTLR token references (definition)." 873 "ANTLR token references (definition)."
866 :group 'antlr) 874 :group 'antlr)
875;; backward-compatibility alias
876(put 'antlr-font-lock-tokendef-face 'face-alias 'antlr-tokendef)
867 877
868(defvar antlr-font-lock-ruleref-face 'antlr-font-lock-ruleref-face) 878(defvar antlr-ruleref-face 'antlr-ruleref)
869(defface antlr-font-lock-ruleref-face 879(defface antlr-ruleref
870 '((((class color) (background light)) (:foreground "blue4"))) 880 '((((class color) (background light)) (:foreground "blue4")))
871 "ANTLR rule references (usage)." 881 "ANTLR rule references (usage)."
872 :group 'antlr) 882 :group 'antlr)
883;; backward-compatibility alias
884(put 'antlr-font-lock-ruleref-face 'face-alias 'antlr-ruleref)
873 885
874(defvar antlr-font-lock-tokenref-face 'antlr-font-lock-tokenref-face) 886(defvar antlr-tokenref-face 'antlr-tokenref)
875(defface antlr-font-lock-tokenref-face 887(defface antlr-tokenref
876 '((((class color) (background light)) (:foreground "orange4"))) 888 '((((class color) (background light)) (:foreground "orange4")))
877 "ANTLR token references (usage)." 889 "ANTLR token references (usage)."
878 :group 'antlr) 890 :group 'antlr)
891;; backward-compatibility alias
892(put 'antlr-font-lock-tokenref-face 'face-alias 'antlr-tokenref)
879 893
880(defvar antlr-font-lock-literal-face 'antlr-font-lock-literal-face) 894(defvar antlr-literal-face 'antlr-literal)
881(defface antlr-font-lock-literal-face 895(defface antlr-literal
882 (cond-emacs-xemacs 896 (cond-emacs-xemacs
883 '((((class color) (background light)) 897 '((((class color) (background light))
884 (:foreground "brown4" :EMACS :weight bold :XEMACS :bold t)))) 898 (:foreground "brown4" :EMACS :weight bold :XEMACS :bold t))))
@@ -886,6 +900,8 @@ Do not change."
886It is used to highlight strings matched by the first regexp group of 900It is used to highlight strings matched by the first regexp group of
887`antlr-font-lock-literal-regexp'." 901`antlr-font-lock-literal-regexp'."
888 :group 'antlr) 902 :group 'antlr)
903;; backward-compatibility alias
904(put 'antlr-font-lock-literal-face 'face-alias 'antlr-literal)
889 905
890(defcustom antlr-font-lock-literal-regexp "\"\\(\\sw\\(\\sw\\|-\\)*\\)\"" 906(defcustom antlr-font-lock-literal-regexp "\"\\(\\sw\\(\\sw\\|-\\)*\\)\""
891 "Regexp matching literals with special syntax highlighting, or nil. 907 "Regexp matching literals with special syntax highlighting, or nil.
@@ -904,56 +920,56 @@ group. The string matched by the first group is highlighted with
904 (cond-emacs-xemacs 920 (cond-emacs-xemacs
905 `((antlr-invalidate-context-cache) 921 `((antlr-invalidate-context-cache)
906 ("\\$setType[ \t]*(\\([A-Za-z\300-\326\330-\337]\\sw*\\))" 922 ("\\$setType[ \t]*(\\([A-Za-z\300-\326\330-\337]\\sw*\\))"
907 (1 antlr-font-lock-tokendef-face)) 923 (1 antlr-tokendef-face))
908 ("\\$\\sw+" (0 font-lock-keyword-face)) 924 ("\\$\\sw+" (0 keyword-face))
909 ;; the tokens are already fontified as string/docstrings: 925 ;; the tokens are already fontified as string/docstrings:
910 (,(lambda (limit) 926 (,(lambda (limit)
911 (if antlr-font-lock-literal-regexp 927 (if antlr-literal-regexp
912 (antlr-re-search-forward antlr-font-lock-literal-regexp limit))) 928 (antlr-re-search-forward antlr-font-lock-literal-regexp limit)))
913 (1 antlr-font-lock-literal-face t) 929 (1 antlr-literal-face t)
914 :XEMACS (0 nil)) ; XEmacs bug workaround 930 :XEMACS (0 nil)) ; XEmacs bug workaround
915 (,(lambda (limit) 931 (,(lambda (limit)
916 (antlr-re-search-forward antlr-class-header-regexp limit)) 932 (antlr-re-search-forward antlr-class-header-regexp limit))
917 (1 antlr-font-lock-keyword-face) 933 (1 antlr-keyword-face)
918 (2 antlr-font-lock-ruledef-face) 934 (2 antlr-ruledef-face)
919 (3 antlr-font-lock-keyword-face) 935 (3 antlr-keyword-face)
920 (4 (if (member (match-string 4) '("Lexer" "Parser" "TreeParser")) 936 (4 (if (member (match-string 4) '("Lexer" "Parser" "TreeParser"))
921 'antlr-font-lock-keyword-face 937 antlr-keyword-face
922 'font-lock-type-face))) 938 type-face)))
923 (,(lambda (limit) 939 (,(lambda (limit)
924 (antlr-re-search-forward 940 (antlr-re-search-forward
925 "\\<\\(header\\|options\\|tokens\\|exception\\|catch\\|returns\\)\\>" 941 "\\<\\(header\\|options\\|tokens\\|exception\\|catch\\|returns\\)\\>"
926 limit)) 942 limit))
927 (1 antlr-font-lock-keyword-face)) 943 (1 antlr-keyword-face))
928 (,(lambda (limit) 944 (,(lambda (limit)
929 (antlr-re-search-forward 945 (antlr-re-search-forward
930 "^\\(private\\|public\\|protected\\)\\>[ \t]*\\(\\(\\sw+[ \t]*\\(:\\)?\\)\\)?" 946 "^\\(private\\|public\\|protected\\)\\>[ \t]*\\(\\(\\sw+[ \t]*\\(:\\)?\\)\\)?"
931 limit)) 947 limit))
932 (1 font-lock-type-face) ; not XEmacs' java level-3 fruit salad 948 (1 font-lock-type-face) ; not XEmacs' java level-3 fruit salad
933 (3 (if (antlr-upcase-p (char-after (match-beginning 3))) 949 (3 (if (antlr-upcase-p (char-after (match-beginning 3)))
934 'antlr-font-lock-tokendef-face 950 antlr-tokendef-face
935 'antlr-font-lock-ruledef-face) nil t) 951 antlr-ruledef-face) nil t)
936 (4 antlr-font-lock-syntax-face nil t)) 952 (4 antlr-syntax-face nil t))
937 (,(lambda (limit) 953 (,(lambda (limit)
938 (antlr-re-search-forward "^\\(\\sw+\\)[ \t]*\\(:\\)?" limit)) 954 (antlr-re-search-forward "^\\(\\sw+\\)[ \t]*\\(:\\)?" limit))
939 (1 (if (antlr-upcase-p (char-after (match-beginning 0))) 955 (1 (if (antlr-upcase-p (char-after (match-beginning 0)))
940 'antlr-font-lock-tokendef-face 956 antlr-tokendef-face
941 'antlr-font-lock-ruledef-face) nil t) 957 antlr-ruledef-face) nil t)
942 (2 antlr-font-lock-syntax-face nil t)) 958 (2 antlr-syntax-face nil t))
943 (,(lambda (limit) 959 (,(lambda (limit)
944 ;; v:ruleref and v:"literal" is allowed... 960 ;; v:ruleref and v:"literal" is allowed...
945 (antlr-re-search-forward "\\(\\sw+\\)[ \t]*\\([=:]\\)?" limit)) 961 (antlr-re-search-forward "\\(\\sw+\\)[ \t]*\\([=:]\\)?" limit))
946 (1 (if (match-beginning 2) 962 (1 (if (match-beginning 2)
947 (if (eq (char-after (match-beginning 2)) ?=) 963 (if (eq (char-after (match-beginning 2)) ?=)
948 'antlr-font-lock-default-face 964 antlr-default-face
949 'font-lock-variable-name-face) 965 font-lock-variable-name-face)
950 (if (antlr-upcase-p (char-after (match-beginning 1))) 966 (if (antlr-upcase-p (char-after (match-beginning 1)))
951 'antlr-font-lock-tokenref-face 967 antlr-tokenref-face
952 'antlr-font-lock-ruleref-face))) 968 antlr-ruleref-face)))
953 (2 antlr-font-lock-default-face nil t)) 969 (2 antlr-default-face nil t))
954 (,(lambda (limit) 970 (,(lambda (limit)
955 (antlr-re-search-forward "[|&:;(~]\\|)\\([*+?]\\|=>\\)?" limit)) 971 (antlr-re-search-forward "[|&:;(~]\\|)\\([*+?]\\|=>\\)?" limit))
956 (0 'antlr-font-lock-syntax-face)))) 972 (0 antlr-syntax-face))))
957 "Font-lock keywords for ANTLR's normal grammar code. 973 "Font-lock keywords for ANTLR's normal grammar code.
958See `antlr-font-lock-keywords-alist' for the keywords of actions.") 974See `antlr-font-lock-keywords-alist' for the keywords of actions.")
959 975
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 0cb87a5b17a..3f3b385c5ed 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -231,9 +231,9 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
231 231
232 (makepp 232 (makepp
233 "^makepp: \\(?:\\(?:warning\\(:\\).*?\\|\\(Scanning\\|[LR]e?l?oading makefile\\) \\|.*?\\)\ 233 "^makepp: \\(?:\\(?:warning\\(:\\).*?\\|\\(Scanning\\|[LR]e?l?oading makefile\\) \\|.*?\\)\
234`\\(\\(\\S +?\\)\\(?::\\([0-9]+\\)\\)?\\)'\\)" 234`\\(\\(\\S +?\\)\\(?::\\([0-9]+\\)\\)?\\)['(]\\)"
235 4 5 nil (1 . 2) 3 235 4 5 nil (1 . 2) 3
236 ("`\\(\\(\\S +?\\)\\(?::\\([0-9]+\\)\\)?\\)'" nil nil 236 ("`\\(\\(\\S +?\\)\\(?::\\([0-9]+\\)\\)?\\)['(]" nil nil
237 (2 compilation-info-face) 237 (2 compilation-info-face)
238 (3 compilation-line-face nil t) 238 (3 compilation-line-face nil t)
239 (1 (compilation-error-properties 2 3 nil nil nil 0 nil) 239 (1 (compilation-error-properties 2 3 nil nil nil 0 nil)
@@ -246,8 +246,8 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
246 " in \\([^()\n ]+\\)(\\([0-9]+\\))$" 1 2) 246 " in \\([^()\n ]+\\)(\\([0-9]+\\))$" 1 2)
247 247
248 (msft 248 (msft
249 "^\\(\\(?:[a-zA-Z]:\\)?[^:(\t\n]+\\)(\\([0-9]+\\)) \ 249 "^\\([0-9]+>\\)?\\(\\(?:[a-zA-Z]:\\)?[^:(\t\n]+\\)(\\([0-9]+\\)) \
250: \\(?:error\\|warnin\\(g\\)\\) C[0-9]+:" 1 2 nil (3)) 250: \\(?:error\\|warnin\\(g\\)\\) C[0-9]+:" 2 3 nil (4))
251 251
252 (oracle 252 (oracle
253 "^\\(?:Semantic error\\|Error\\|PCC-[0-9]+:\\).* line \\([0-9]+\\)\ 253 "^\\(?:Semantic error\\|Error\\|PCC-[0-9]+:\\).* line \\([0-9]+\\)\
@@ -468,15 +468,17 @@ starting the compilation process.")
468;; History of compile commands. 468;; History of compile commands.
469(defvar compile-history nil) 469(defvar compile-history nil)
470 470
471(defface compilation-warning-face 471(defface compilation-warning
472 '((((class color) (min-colors 16)) (:foreground "Orange" :weight bold)) 472 '((((class color) (min-colors 16)) (:foreground "Orange" :weight bold))
473 (((class color)) (:foreground "cyan" :weight bold)) 473 (((class color)) (:foreground "cyan" :weight bold))
474 (t (:weight bold))) 474 (t (:weight bold)))
475 "Face used to highlight compiler warnings." 475 "Face used to highlight compiler warnings."
476 :group 'font-lock-highlighting-faces 476 :group 'font-lock-highlighting-faces
477 :version "22.1") 477 :version "22.1")
478;; backward-compatibility alias
479(put 'compilation-warning-face 'face-alias 'compilation-warning)
478 480
479(defface compilation-info-face 481(defface compilation-info
480 '((((class color) (min-colors 16) (background light)) 482 '((((class color) (min-colors 16) (background light))
481 (:foreground "Green3" :weight bold)) 483 (:foreground "Green3" :weight bold))
482 (((class color) (min-colors 88) (background dark)) 484 (((class color) (min-colors 88) (background dark))
@@ -488,6 +490,8 @@ starting the compilation process.")
488 "Face used to highlight compiler warnings." 490 "Face used to highlight compiler warnings."
489 :group 'font-lock-highlighting-faces 491 :group 'font-lock-highlighting-faces
490 :version "22.1") 492 :version "22.1")
493;; backward-compatibility alias
494(put 'compilation-info-face 'face-alias 'compilation-info)
491 495
492(defvar compilation-message-face nil 496(defvar compilation-message-face nil
493 "Face name to use for whole messages. 497 "Face name to use for whole messages.
@@ -498,10 +502,10 @@ Faces `compilation-error-face', `compilation-warning-face',
498(defvar compilation-error-face 'font-lock-warning-face 502(defvar compilation-error-face 'font-lock-warning-face
499 "Face name to use for file name in error messages.") 503 "Face name to use for file name in error messages.")
500 504
501(defvar compilation-warning-face 'compilation-warning-face 505(defvar compilation-warning-face 'compilation-warning
502 "Face name to use for file name in warning messages.") 506 "Face name to use for file name in warning messages.")
503 507
504(defvar compilation-info-face 'compilation-info-face 508(defvar compilation-info-face 'compilation-info
505 "Face name to use for file name in informational messages.") 509 "Face name to use for file name in informational messages.")
506 510
507(defvar compilation-line-face 'font-lock-variable-name-face 511(defvar compilation-line-face 'font-lock-variable-name-face
@@ -935,6 +939,7 @@ Returns the compilation buffer created."
935 (substitute-env-vars (match-string 1 command)) 939 (substitute-env-vars (match-string 1 command))
936 "~") 940 "~")
937 default-directory)) 941 default-directory))
942 (erase-buffer)
938 ;; Select the desired mode. 943 ;; Select the desired mode.
939 (if (not (eq mode t)) 944 (if (not (eq mode t))
940 (funcall mode) 945 (funcall mode)
@@ -944,11 +949,11 @@ Returns the compilation buffer created."
944 (if highlight-regexp 949 (if highlight-regexp
945 (set (make-local-variable 'compilation-highlight-regexp) 950 (set (make-local-variable 'compilation-highlight-regexp)
946 highlight-regexp)) 951 highlight-regexp))
947 (erase-buffer)
948 ;; Output a mode setter, for saving and later reloading this buffer. 952 ;; Output a mode setter, for saving and later reloading this buffer.
949 (insert "-*- mode: " name-of-mode 953 (insert "-*- mode: " name-of-mode
950 "; default-directory: " (prin1-to-string default-directory) 954 "; default-directory: " (prin1-to-string default-directory)
951 " -*-\n" command "\n") (setq thisdir default-directory)) 955 " -*-\n" command "\n")
956 (setq thisdir default-directory))
952 (set-buffer-modified-p nil)) 957 (set-buffer-modified-p nil))
953 ;; If we're already in the compilation buffer, go to the end 958 ;; If we're already in the compilation buffer, go to the end
954 ;; of the buffer, so point will track the compilation output. 959 ;; of the buffer, so point will track the compilation output.
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index 4abd8123e6a..9826c995b97 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -343,7 +343,7 @@ Affects: `cperl-font-lock', `cperl-electric-lbrace-space',
343 :group 'cperl-indentation-details) 343 :group 'cperl-indentation-details)
344 344
345(defvar cperl-vc-header-alist nil) 345(defvar cperl-vc-header-alist nil)
346(make-obsolete-variable 346(make-obsolete-variable
347 'cperl-vc-header-alist 347 'cperl-vc-header-alist
348 "use cperl-vc-rcs-header or cperl-vc-sccs-header instead.") 348 "use cperl-vc-rcs-header or cperl-vc-sccs-header instead.")
349 349
@@ -369,7 +369,7 @@ Affects: `cperl-font-lock', `cperl-electric-lbrace-space',
369 369
370(defcustom cperl-info-on-command-no-prompt nil 370(defcustom cperl-info-on-command-no-prompt nil
371 "*Not-nil (and non-null) means not to prompt on C-h f. 371 "*Not-nil (and non-null) means not to prompt on C-h f.
372The opposite behaviour is always available if prefixed with C-c. 372The opposite behavior is always available if prefixed with C-c.
373Can be overwritten by `cperl-hairy' if nil." 373Can be overwritten by `cperl-hairy' if nil."
374 :type '(choice (const null) boolean) 374 :type '(choice (const null) boolean)
375 :group 'cperl-affected-by-hairy) 375 :group 'cperl-affected-by-hairy)
@@ -564,11 +564,11 @@ when syntaxifying a chunk of buffer."
564 (font-lock-variable-name-face nil nil bold) 564 (font-lock-variable-name-face nil nil bold)
565 (font-lock-function-name-face nil nil bold italic box) 565 (font-lock-function-name-face nil nil bold italic box)
566 (font-lock-constant-face nil "LightGray" bold) 566 (font-lock-constant-face nil "LightGray" bold)
567 (cperl-array-face nil "LightGray" bold underline) 567 (cperl-array nil "LightGray" bold underline)
568 (cperl-hash-face nil "LightGray" bold italic underline) 568 (cperl-hash nil "LightGray" bold italic underline)
569 (font-lock-comment-face nil "LightGray" italic) 569 (font-lock-comment-face nil "LightGray" italic)
570 (font-lock-string-face nil nil italic underline) 570 (font-lock-string-face nil nil italic underline)
571 (cperl-nonoverridable-face nil nil italic underline) 571 (cperl-nonoverridable nil nil italic underline)
572 (font-lock-type-face nil nil underline) 572 (font-lock-type-face nil nil underline)
573 (underline nil "LightGray" strikeout)) 573 (underline nil "LightGray" strikeout))
574 "List given as an argument to `ps-extend-face-list' in `cperl-ps-print'." 574 "List given as an argument to `ps-extend-face-list' in `cperl-ps-print'."
@@ -583,7 +583,7 @@ when syntaxifying a chunk of buffer."
583(defvar cperl-dark-foreground 583(defvar cperl-dark-foreground
584 (cperl-choose-color "orchid1" "orange")) 584 (cperl-choose-color "orchid1" "orange"))
585 585
586(defface cperl-nonoverridable-face 586(defface cperl-nonoverridable
587 `((((class grayscale) (background light)) 587 `((((class grayscale) (background light))
588 (:background "Gray90" :slant italic :underline t)) 588 (:background "Gray90" :slant italic :underline t))
589 (((class grayscale) (background dark)) 589 (((class grayscale) (background dark))
@@ -595,8 +595,10 @@ when syntaxifying a chunk of buffer."
595 (t (:weight bold :underline t))) 595 (t (:weight bold :underline t)))
596 "Font Lock mode face used non-overridable keywords and modifiers of regexps." 596 "Font Lock mode face used non-overridable keywords and modifiers of regexps."
597 :group 'cperl-faces) 597 :group 'cperl-faces)
598;; backward-compatibility alias
599(put 'cperl-nonoverridable-face 'face-alias 'cperl-nonoverridable)
598 600
599(defface cperl-array-face 601(defface cperl-array
600 `((((class grayscale) (background light)) 602 `((((class grayscale) (background light))
601 (:background "Gray90" :weight bold)) 603 (:background "Gray90" :weight bold))
602 (((class grayscale) (background dark)) 604 (((class grayscale) (background dark))
@@ -608,8 +610,10 @@ when syntaxifying a chunk of buffer."
608 (t (:weight bold))) 610 (t (:weight bold)))
609 "Font Lock mode face used to highlight array names." 611 "Font Lock mode face used to highlight array names."
610 :group 'cperl-faces) 612 :group 'cperl-faces)
613;; backward-compatibility alias
614(put 'cperl-array-face 'face-alias 'cperl-array)
611 615
612(defface cperl-hash-face 616(defface cperl-hash
613 `((((class grayscale) (background light)) 617 `((((class grayscale) (background light))
614 (:background "Gray90" :weight bold :slant italic)) 618 (:background "Gray90" :weight bold :slant italic))
615 (((class grayscale) (background dark)) 619 (((class grayscale) (background dark))
@@ -621,6 +625,8 @@ when syntaxifying a chunk of buffer."
621 (t (:weight bold :slant italic))) 625 (t (:weight bold :slant italic)))
622 "Font Lock mode face used to highlight hash names." 626 "Font Lock mode face used to highlight hash names."
623 :group 'cperl-faces) 627 :group 'cperl-faces)
628;; backward-compatibility alias
629(put 'cperl-hash-face 'face-alias 'cperl-hash)
624 630
625 631
626 632
@@ -867,8 +873,8 @@ B) Speed of editing operations.
867(defvar cperl-tips-faces 'please-ignore-this-line 873(defvar cperl-tips-faces 'please-ignore-this-line
868 "CPerl mode uses following faces for highlighting: 874 "CPerl mode uses following faces for highlighting:
869 875
870 `cperl-array-face' Array names 876 `cperl-array' Array names
871 `cperl-hash-face' Hash names 877 `cperl-hash' Hash names
872 `font-lock-comment-face' Comments, PODs and whatever is considered 878 `font-lock-comment-face' Comments, PODs and whatever is considered
873 syntaxically to be not code 879 syntaxically to be not code
874 `font-lock-constant-face' HERE-doc delimiters, labels, delimiters of 880 `font-lock-constant-face' HERE-doc delimiters, labels, delimiters of
@@ -879,7 +885,7 @@ B) Speed of editing operations.
879 (except those conflicting with Perl operators), 885 (except those conflicting with Perl operators),
880 package names (when recognized), format names 886 package names (when recognized), format names
881 `font-lock-keyword-face' Control flow switch constructs, declarators 887 `font-lock-keyword-face' Control flow switch constructs, declarators
882 `cperl-nonoverridable-face' Non-overridable keywords, modifiers of RExen 888 `cperl-nonoverridable' Non-overridable keywords, modifiers of RExen
883 `font-lock-string-face' Strings, qw() constructs, RExen, POD sections, 889 `font-lock-string-face' Strings, qw() constructs, RExen, POD sections,
884 literal parts and the terminator of formats 890 literal parts and the terminator of formats
885 and whatever is syntaxically considered 891 and whatever is syntaxically considered
@@ -887,7 +893,7 @@ B) Speed of editing operations.
887 `font-lock-type-face' Overridable keywords 893 `font-lock-type-face' Overridable keywords
888 `font-lock-variable-name-face' Variable declarations, indirect array and 894 `font-lock-variable-name-face' Variable declarations, indirect array and
889 hash names, POD headers/item names 895 hash names, POD headers/item names
890 `cperl-invalid-face' Trailing whitespace 896 `cperl-invalid' Trailing whitespace
891 897
892Note that in several situations the highlighting tries to inform about 898Note that in several situations the highlighting tries to inform about
893possible confusion, such as different colors for function names in 899possible confusion, such as different colors for function names in
@@ -1303,7 +1309,7 @@ you type it inside the inline block of control construct, like
1303and you are on a boundary of a statement inside braces, it will 1309and you are on a boundary of a statement inside braces, it will
1304transform the construct into a multiline and will place you into an 1310transform the construct into a multiline and will place you into an
1305appropriately indented blank line. If you need a usual 1311appropriately indented blank line. If you need a usual
1306`newline-and-indent' behaviour, it is on \\[newline-and-indent], 1312`newline-and-indent' behavior, it is on \\[newline-and-indent],
1307see documentation on `cperl-electric-linefeed'. 1313see documentation on `cperl-electric-linefeed'.
1308 1314
1309Use \\[cperl-invert-if-unless] to change a construction of the form 1315Use \\[cperl-invert-if-unless] to change a construction of the form
@@ -1481,7 +1487,7 @@ or as help on variables `cperl-tips', `cperl-problems',
1481 (make-local-variable 'comment-start-skip) 1487 (make-local-variable 'comment-start-skip)
1482 (setq comment-start-skip "#+ *") 1488 (setq comment-start-skip "#+ *")
1483 (make-local-variable 'defun-prompt-regexp) 1489 (make-local-variable 'defun-prompt-regexp)
1484 (setq defun-prompt-regexp "^[ \t]*sub[ \t\n]+\\([^ \t\n{(;]+\\)\\([ \t\n]*([^()]*)[ \t\n]*\\)?[ \t\n]*)") 1490 (setq defun-prompt-regexp "^[ \t]*sub[ \t\n]+\\([^ \t\n{(;]+\\)\\([ \t\n]*([^()]*)[ \t\n]*\\)?[ \t\n]*")
1485 (make-local-variable 'comment-indent-function) 1491 (make-local-variable 'comment-indent-function)
1486 (setq comment-indent-function 'cperl-comment-indent) 1492 (setq comment-indent-function 'cperl-comment-indent)
1487 (make-local-variable 'parse-sexp-ignore-comments) 1493 (make-local-variable 'parse-sexp-ignore-comments)
@@ -3167,7 +3173,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face',
3167 (cperl-nonoverridable-face 3173 (cperl-nonoverridable-face
3168 (if (boundp 'cperl-nonoverridable-face) 3174 (if (boundp 'cperl-nonoverridable-face)
3169 cperl-nonoverridable-face 3175 cperl-nonoverridable-face
3170 'cperl-nonoverridable-face)) 3176 'cperl-nonoverridable))
3171 (stop-point (if ignore-max 3177 (stop-point (if ignore-max
3172 (point-max) 3178 (point-max)
3173 max)) 3179 max))
@@ -3661,7 +3667,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face',
3661 (forward-word 1) ; skip modifiers s///s 3667 (forward-word 1) ; skip modifiers s///s
3662 (if tail (cperl-commentify tail (point) t)) 3668 (if tail (cperl-commentify tail (point) t))
3663 (cperl-postpone-fontification 3669 (cperl-postpone-fontification
3664 e1 (point) 'face 'cperl-nonoverridable-face))) 3670 e1 (point) 'face 'cperl-nonoverridable)))
3665 ;; Check whether it is m// which means "previous match" 3671 ;; Check whether it is m// which means "previous match"
3666 ;; and highlight differently 3672 ;; and highlight differently
3667 (setq is-REx 3673 (setq is-REx
@@ -4710,7 +4716,7 @@ indentation and initial hashes. Behaves usually outside of comment."
4710 "u\\(se\\|n\\(shift\\|ti\\(l\\|e\\)\\|def\\|less\\)\\)\\|" 4716 "u\\(se\\|n\\(shift\\|ti\\(l\\|e\\)\\|def\\|less\\)\\)\\|"
4711 "while\\|y\\|__\\(END\\|DATA\\)__" ;__DATA__ added manually 4717 "while\\|y\\|__\\(END\\|DATA\\)__" ;__DATA__ added manually
4712 "\\|[sm]" ; Added manually 4718 "\\|[sm]" ; Added manually
4713 "\\)\\>") 2 'cperl-nonoverridable-face) 4719 "\\)\\>") 2 'cperl-nonoverridable)
4714 ;; (mapconcat 'identity 4720 ;; (mapconcat 'identity
4715 ;; '("#endif" "#else" "#ifdef" "#ifndef" "#if" 4721 ;; '("#endif" "#else" "#ifdef" "#ifndef" "#if"
4716 ;; "#include" "#define" "#undef") 4722 ;; "#include" "#define" "#undef")
@@ -4773,15 +4779,15 @@ indentation and initial hashes. Behaves usually outside of comment."
4773 '( 4779 '(
4774 ("\\(\\([@%]\\|\$#\\)[a-zA-Z_:][a-zA-Z0-9_:]*\\)" 1 4780 ("\\(\\([@%]\\|\$#\\)[a-zA-Z_:][a-zA-Z0-9_:]*\\)" 1
4775 (if (eq (char-after (match-beginning 2)) ?%) 4781 (if (eq (char-after (match-beginning 2)) ?%)
4776 cperl-hash-face 4782 'cperl-hash
4777 cperl-array-face) 4783 'cperl-array)
4778 t) ; arrays and hashes 4784 t) ; arrays and hashes
4779 ("\\(\\([$@]+\\)[a-zA-Z_:][a-zA-Z0-9_:]*\\)[ \t]*\\([[{]\\)" 4785 ("\\(\\([$@]+\\)[a-zA-Z_:][a-zA-Z0-9_:]*\\)[ \t]*\\([[{]\\)"
4780 1 4786 1
4781 (if (= (- (match-end 2) (match-beginning 2)) 1) 4787 (if (= (- (match-end 2) (match-beginning 2)) 1)
4782 (if (eq (char-after (match-beginning 3)) ?{) 4788 (if (eq (char-after (match-beginning 3)) ?{)
4783 cperl-hash-face 4789 'cperl-hash
4784 cperl-array-face) ; arrays and hashes 4790 'cperl-array) ; arrays and hashes
4785 font-lock-variable-name-face) ; Just to put something 4791 font-lock-variable-name-face) ; Just to put something
4786 t) 4792 t)
4787 ;;("\\([smy]\\|tr\\)\\([^a-z_A-Z0-9]\\)\\(\\([^\n\\]*||\\)\\)\\2") 4793 ;;("\\([smy]\\|tr\\)\\([^a-z_A-Z0-9]\\)\\(\\([^\n\\]*||\\)\\)\\2")
@@ -4854,21 +4860,21 @@ indentation and initial hashes. Behaves usually outside of comment."
4854 [nil nil t t t] 4860 [nil nil t t t]
4855 nil 4861 nil
4856 [nil nil t t t]) 4862 [nil nil t t t])
4857 (list 'cperl-nonoverridable-face 4863 (list 'cperl-nonoverridable
4858 ["chartreuse3" ("orchid1" "orange") 4864 ["chartreuse3" ("orchid1" "orange")
4859 nil "Gray80"] 4865 nil "Gray80"]
4860 [nil nil "gray90"] 4866 [nil nil "gray90"]
4861 [nil nil nil t t] 4867 [nil nil nil t t]
4862 [nil nil t t] 4868 [nil nil t t]
4863 [nil nil t t t]) 4869 [nil nil t t t])
4864 (list 'cperl-array-face 4870 (list 'cperl-array
4865 ["blue" "yellow" nil "Gray80"] 4871 ["blue" "yellow" nil "Gray80"]
4866 ["lightyellow2" ("navy" "os2blue" "darkgreen") 4872 ["lightyellow2" ("navy" "os2blue" "darkgreen")
4867 "gray90"] 4873 "gray90"]
4868 t 4874 t
4869 nil 4875 nil
4870 nil) 4876 nil)
4871 (list 'cperl-hash-face 4877 (list 'cperl-hash
4872 ["red" "red" nil "Gray80"] 4878 ["red" "red" nil "Gray80"]
4873 ["lightyellow2" ("navy" "os2blue" "darkgreen") 4879 ["lightyellow2" ("navy" "os2blue" "darkgreen")
4874 "gray90"] 4880 "gray90"]
@@ -4891,15 +4897,15 @@ indentation and initial hashes. Behaves usually outside of comment."
4891 "Face for variable names") 4897 "Face for variable names")
4892 (cperl-force-face font-lock-type-face 4898 (cperl-force-face font-lock-type-face
4893 "Face for data types") 4899 "Face for data types")
4894 (cperl-force-face cperl-nonoverridable-face 4900 (cperl-force-face cperl-nonoverridable
4895 "Face for data types from another group") 4901 "Face for data types from another group")
4896 (cperl-force-face font-lock-comment-face 4902 (cperl-force-face font-lock-comment-face
4897 "Face for comments") 4903 "Face for comments")
4898 (cperl-force-face font-lock-function-name-face 4904 (cperl-force-face font-lock-function-name-face
4899 "Face for function names") 4905 "Face for function names")
4900 (cperl-force-face cperl-hash-face 4906 (cperl-force-face cperl-hash
4901 "Face for hashes") 4907 "Face for hashes")
4902 (cperl-force-face cperl-array-face 4908 (cperl-force-face cperl-array
4903 "Face for arrays") 4909 "Face for arrays")
4904 ;;(defvar font-lock-constant-face 'font-lock-constant-face) 4910 ;;(defvar font-lock-constant-face 'font-lock-constant-face)
4905 ;;(defvar font-lock-variable-name-face 'font-lock-variable-name-face) 4911 ;;(defvar font-lock-variable-name-face 'font-lock-variable-name-face)
@@ -4909,7 +4915,7 @@ indentation and initial hashes. Behaves usually outside of comment."
4909 ;; "Face to use for data types.")) 4915 ;; "Face to use for data types."))
4910 ;;(or (boundp 'cperl-nonoverridable-face) 4916 ;;(or (boundp 'cperl-nonoverridable-face)
4911 ;; (defconst cperl-nonoverridable-face 4917 ;; (defconst cperl-nonoverridable-face
4912 ;; 'cperl-nonoverridable-face 4918 ;; 'cperl-nonoverridable
4913 ;; "Face to use for data types from another group.")) 4919 ;; "Face to use for data types from another group."))
4914 ;;(if (not cperl-xemacs-p) nil 4920 ;;(if (not cperl-xemacs-p) nil
4915 ;; (or (boundp 'font-lock-comment-face) 4921 ;; (or (boundp 'font-lock-comment-face)
@@ -4925,26 +4931,24 @@ indentation and initial hashes. Behaves usually outside of comment."
4925 ;; 'font-lock-function-name-face 4931 ;; 'font-lock-function-name-face
4926 ;; "Face to use for function names."))) 4932 ;; "Face to use for function names.")))
4927 (if (and 4933 (if (and
4928 (not (cperl-is-face 'cperl-array-face)) 4934 (not (cperl-is-face 'cperl-array))
4929 (cperl-is-face 'font-lock-emphasized-face)) 4935 (cperl-is-face 'font-lock-emphasized-face))
4930 (copy-face 'font-lock-emphasized-face 'cperl-array-face)) 4936 (copy-face 'font-lock-emphasized-face 'cperl-array))
4931 (if (and 4937 (if (and
4932 (not (cperl-is-face 'cperl-hash-face)) 4938 (not (cperl-is-face 'cperl-hash))
4933 (cperl-is-face 'font-lock-other-emphasized-face)) 4939 (cperl-is-face 'font-lock-other-emphasized-face))
4934 (copy-face 'font-lock-other-emphasized-face 4940 (copy-face 'font-lock-other-emphasized-face 'cperl-hash))
4935 'cperl-hash-face))
4936 (if (and 4941 (if (and
4937 (not (cperl-is-face 'cperl-nonoverridable-face)) 4942 (not (cperl-is-face 'cperl-nonoverridable))
4938 (cperl-is-face 'font-lock-other-type-face)) 4943 (cperl-is-face 'font-lock-other-type-face))
4939 (copy-face 'font-lock-other-type-face 4944 (copy-face 'font-lock-other-type-face 'cperl-nonoverridable))
4940 'cperl-nonoverridable-face))
4941 ;;(or (boundp 'cperl-hash-face) 4945 ;;(or (boundp 'cperl-hash-face)
4942 ;; (defconst cperl-hash-face 4946 ;; (defconst cperl-hash-face
4943 ;; 'cperl-hash-face 4947 ;; 'cperl-hash
4944 ;; "Face to use for hashes.")) 4948 ;; "Face to use for hashes."))
4945 ;;(or (boundp 'cperl-array-face) 4949 ;;(or (boundp 'cperl-array-face)
4946 ;; (defconst cperl-array-face 4950 ;; (defconst cperl-array-face
4947 ;; 'cperl-array-face 4951 ;; 'cperl-array
4948 ;; "Face to use for arrays.")) 4952 ;; "Face to use for arrays."))
4949 ;; Here we try to guess background 4953 ;; Here we try to guess background
4950 (let ((background 4954 (let ((background
@@ -4983,17 +4987,17 @@ indentation and initial hashes. Behaves usually outside of comment."
4983 "pink"))) 4987 "pink")))
4984 (t 4988 (t
4985 (set-face-background 'font-lock-type-face "gray90")))) 4989 (set-face-background 'font-lock-type-face "gray90"))))
4986 (if (cperl-is-face 'cperl-nonoverridable-face) 4990 (if (cperl-is-face 'cperl-nonoverridable)
4987 nil 4991 nil
4988 (copy-face 'font-lock-type-face 'cperl-nonoverridable-face) 4992 (copy-face 'font-lock-type-face 'cperl-nonoverridable)
4989 (cond 4993 (cond
4990 ((eq background 'light) 4994 ((eq background 'light)
4991 (set-face-foreground 'cperl-nonoverridable-face 4995 (set-face-foreground 'cperl-nonoverridable
4992 (if (x-color-defined-p "chartreuse3") 4996 (if (x-color-defined-p "chartreuse3")
4993 "chartreuse3" 4997 "chartreuse3"
4994 "chartreuse"))) 4998 "chartreuse")))
4995 ((eq background 'dark) 4999 ((eq background 'dark)
4996 (set-face-foreground 'cperl-nonoverridable-face 5000 (set-face-foreground 'cperl-nonoverridable
4997 (if (x-color-defined-p "orchid1") 5001 (if (x-color-defined-p "orchid1")
4998 "orchid1" 5002 "orchid1"
4999 "orange"))))) 5003 "orange")))))
@@ -5045,20 +5049,15 @@ indentation and initial hashes. Behaves usually outside of comment."
5045 '(setq ps-bold-faces 5049 '(setq ps-bold-faces
5046 ;; font-lock-variable-name-face 5050 ;; font-lock-variable-name-face
5047 ;; font-lock-constant-face 5051 ;; font-lock-constant-face
5048 (append '(cperl-array-face 5052 (append '(cperl-array cperl-hash)
5049 cperl-hash-face)
5050 ps-bold-faces) 5053 ps-bold-faces)
5051 ps-italic-faces 5054 ps-italic-faces
5052 ;; font-lock-constant-face 5055 ;; font-lock-constant-face
5053 (append '(cperl-nonoverridable-face 5056 (append '(cperl-nonoverridable cperl-hash)
5054 cperl-hash-face)
5055 ps-italic-faces) 5057 ps-italic-faces)
5056 ps-underlined-faces 5058 ps-underlined-faces
5057 ;; font-lock-type-face 5059 ;; font-lock-type-face
5058 (append '(cperl-array-face 5060 (append '(cperl-array cperl-hash underline cperl-nonoverridable)
5059 cperl-hash-face
5060 underline
5061 cperl-nonoverridable-face)
5062 ps-underlined-faces)))) 5061 ps-underlined-faces))))
5063 5062
5064(defvar ps-print-face-extension-alist) 5063(defvar ps-print-face-extension-alist)
@@ -5091,27 +5090,27 @@ Style of printout regulated by the variable `cperl-ps-print-face-properties'."
5091;;; (defvar ps-italic-faces nil) 5090;;; (defvar ps-italic-faces nil)
5092;;; (setq ps-bold-faces 5091;;; (setq ps-bold-faces
5093;;; (append '(font-lock-emphasized-face 5092;;; (append '(font-lock-emphasized-face
5094;;; cperl-array-face 5093;;; cperl-array
5095;;; font-lock-keyword-face 5094;;; font-lock-keyword-face
5096;;; font-lock-variable-name-face 5095;;; font-lock-variable-name-face
5097;;; font-lock-constant-face 5096;;; font-lock-constant-face
5098;;; font-lock-reference-face 5097;;; font-lock-reference-face
5099;;; font-lock-other-emphasized-face 5098;;; font-lock-other-emphasized-face
5100;;; cperl-hash-face) 5099;;; cperl-hash)
5101;;; ps-bold-faces)) 5100;;; ps-bold-faces))
5102;;; (setq ps-italic-faces 5101;;; (setq ps-italic-faces
5103;;; (append '(cperl-nonoverridable-face 5102;;; (append '(cperl-nonoverridable
5104;;; font-lock-constant-face 5103;;; font-lock-constant-face
5105;;; font-lock-reference-face 5104;;; font-lock-reference-face
5106;;; font-lock-other-emphasized-face 5105;;; font-lock-other-emphasized-face
5107;;; cperl-hash-face) 5106;;; cperl-hash)
5108;;; ps-italic-faces)) 5107;;; ps-italic-faces))
5109;;; (setq ps-underlined-faces 5108;;; (setq ps-underlined-faces
5110;;; (append '(font-lock-emphasized-face 5109;;; (append '(font-lock-emphasized-face
5111;;; cperl-array-face 5110;;; cperl-array
5112;;; font-lock-other-emphasized-face 5111;;; font-lock-other-emphasized-face
5113;;; cperl-hash-face 5112;;; cperl-hash
5114;;; cperl-nonoverridable-face font-lock-type-face) 5113;;; cperl-nonoverridable font-lock-type-face)
5115;;; ps-underlined-faces)) 5114;;; ps-underlined-faces))
5116;;; (cons 'font-lock-type-face ps-underlined-faces)) 5115;;; (cons 'font-lock-type-face ps-underlined-faces))
5117 5116
diff --git a/lisp/progmodes/cpp.el b/lisp/progmodes/cpp.el
index 0d9a9f62a60..9910f1f548f 100644
--- a/lisp/progmodes/cpp.el
+++ b/lisp/progmodes/cpp.el
@@ -144,7 +144,7 @@ or a cons cell (background-color . COLOR)."
144 '("light gray" "light blue" "light cyan" "light yellow" "light pink" 144 '("light gray" "light blue" "light cyan" "light yellow" "light pink"
145 "pale green" "beige" "orange" "magenta" "violet" "medium purple" 145 "pale green" "beige" "orange" "magenta" "violet" "medium purple"
146 "turquoise") 146 "turquoise")
147 "Background colours useful with dark foreground colors." 147 "Background colors useful with dark foreground colors."
148 :type '(repeat string) 148 :type '(repeat string)
149 :group 'cpp) 149 :group 'cpp)
150 150
@@ -152,7 +152,7 @@ or a cons cell (background-color . COLOR)."
152 '("dim gray" "blue" "cyan" "yellow" "red" 152 '("dim gray" "blue" "cyan" "yellow" "red"
153 "dark green" "brown" "dark orange" "dark khaki" "dark violet" "purple" 153 "dark green" "brown" "dark orange" "dark khaki" "dark violet" "purple"
154 "dark turquoise") 154 "dark turquoise")
155 "Background colours useful with light foreground colors." 155 "Background colors useful with light foreground colors."
156 :type '(repeat string) 156 :type '(repeat string)
157 :group 'cpp) 157 :group 'cpp)
158 158
diff --git a/lisp/progmodes/delphi.el b/lisp/progmodes/delphi.el
index 3d86f15c175..166e5b8984e 100644
--- a/lisp/progmodes/delphi.el
+++ b/lisp/progmodes/delphi.el
@@ -152,8 +152,8 @@ regardless of where in the line point is when the TAB command is used."
152(defcustom delphi-newline-always-indents t 152(defcustom delphi-newline-always-indents t
153 "*Non-nil means NEWLINE in Delphi mode should always reindent the current 153 "*Non-nil means NEWLINE in Delphi mode should always reindent the current
154line, insert a blank line and move to the default indent column of the blank 154line, insert a blank line and move to the default indent column of the blank
155line. If nil, then no indentation occurs, and NEWLINE does the usual 155line. If nil, then no indentation occurs, and NEWLINE does the usual
156behaviour. This is useful when one needs to do customized indentation that 156behavior. This is useful when one needs to do customized indentation that
157differs from the default." 157differs from the default."
158 :type 'boolean 158 :type 'boolean
159 :group 'delphi) 159 :group 'delphi)
diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el
index 953ecd79f7f..5f8ea5ae70a 100644
--- a/lisp/progmodes/ebrowse.el
+++ b/lisp/progmodes/ebrowse.el
@@ -157,50 +157,64 @@ This space is used to display markers."
157 :group 'ebrowse) 157 :group 'ebrowse)
158 158
159 159
160(defface ebrowse-tree-mark-face 160(defface ebrowse-tree-mark
161 '((((min-colors 88)) (:foreground "red1")) 161 '((((min-colors 88)) (:foreground "red1"))
162 (t (:foreground "red"))) 162 (t (:foreground "red")))
163 "*The face used for the mark character in the tree." 163 "*The face used for the mark character in the tree."
164 :group 'ebrowse-faces) 164 :group 'ebrowse-faces)
165;; backward-compatibility alias
166(put 'ebrowse-tree-mark-face 'face-alias 'ebrowse-tree-mark)
165 167
166 168
167(defface ebrowse-root-class-face 169(defface ebrowse-root-class
168 '((((min-colors 88)) (:weight bold :foreground "blue1")) 170 '((((min-colors 88)) (:weight bold :foreground "blue1"))
169 (t (:weight bold :foreground "blue"))) 171 (t (:weight bold :foreground "blue")))
170 "*The face used for root classes in the tree." 172 "*The face used for root classes in the tree."
171 :group 'ebrowse-faces) 173 :group 'ebrowse-faces)
174;; backward-compatibility alias
175(put 'ebrowse-root-class-face 'face-alias 'ebrowse-root-class)
172 176
173 177
174(defface ebrowse-file-name-face 178(defface ebrowse-file-name
175 '((t (:italic t))) 179 '((t (:italic t)))
176 "*The face for filenames displayed in the tree." 180 "*The face for filenames displayed in the tree."
177 :group 'ebrowse-faces) 181 :group 'ebrowse-faces)
182;; backward-compatibility alias
183(put 'ebrowse-file-name-face 'face-alias 'ebrowse-file-name)
178 184
179 185
180(defface ebrowse-default-face 186(defface ebrowse-default
181 '((t nil)) 187 '((t nil))
182 "*Face for everything else in the tree not having other faces." 188 "*Face for everything else in the tree not having other faces."
183 :group 'ebrowse-faces) 189 :group 'ebrowse-faces)
190;; backward-compatibility alias
191(put 'ebrowse-default-face 'face-alias 'ebrowse-default)
184 192
185 193
186(defface ebrowse-member-attribute-face 194(defface ebrowse-member-attribute
187 '((((min-colors 88)) (:foreground "red1")) 195 '((((min-colors 88)) (:foreground "red1"))
188 (t (:foreground "red"))) 196 (t (:foreground "red")))
189 "*Face used to display member attributes." 197 "*Face used to display member attributes."
190 :group 'ebrowse-faces) 198 :group 'ebrowse-faces)
199;; backward-compatibility alias
200(put 'ebrowse-member-attribute-face 'face-alias 'ebrowse-member-attribute)
191 201
192 202
193(defface ebrowse-member-class-face 203(defface ebrowse-member-class
194 '((t (:foreground "purple"))) 204 '((t (:foreground "purple")))
195 "*Face used to display the class title in member buffers." 205 "*Face used to display the class title in member buffers."
196 :group 'ebrowse-faces) 206 :group 'ebrowse-faces)
207;; backward-compatibility alias
208(put 'ebrowse-member-class-face 'face-alias 'ebrowse-member-class)
197 209
198 210
199(defface ebrowse-progress-face 211(defface ebrowse-progress
200 '((((min-colors 88)) (:background "blue1")) 212 '((((min-colors 88)) (:background "blue1"))
201 (t (:background "blue"))) 213 (t (:background "blue")))
202 "*Face for progress indicator." 214 "*Face for progress indicator."
203 :group 'ebrowse-faces) 215 :group 'ebrowse-faces)
216;; backward-compatibility alias
217(put 'ebrowse-progress-face 'face-alias 'ebrowse-progress)
204 218
205 219
206 220
@@ -883,7 +897,7 @@ this is the first progress message displayed."
883 (message (concat title ": " 897 (message (concat title ": "
884 (propertize (make-string ebrowse-n-boxes 898 (propertize (make-string ebrowse-n-boxes
885 (if (display-color-p) ?\ ?+)) 899 (if (display-color-p) ?\ ?+))
886 'face 'ebrowse-progress-face))))) 900 'face 'ebrowse-progress)))))
887 901
888 902
889;;; Reading a tree from disk 903;;; Reading a tree from disk
@@ -1310,7 +1324,7 @@ With PREFIX, insert that many filenames."
1310 (ebrowse-ts-class tree)) 1324 (ebrowse-ts-class tree))
1311 "unknown") 1325 "unknown")
1312 ")")) 1326 ")"))
1313 (ebrowse-set-face start (point) 'ebrowse-file-name-face) 1327 (ebrowse-set-face start (point) 'ebrowse-file-name)
1314 (beginning-of-line) 1328 (beginning-of-line)
1315 (forward-line 1)))))) 1329 (forward-line 1))))))
1316 1330
@@ -1828,7 +1842,7 @@ TREE denotes the class shown."
1828 start end 1842 start end
1829 `(mouse-face highlight ebrowse-what mark ebrowse-tree ,tree 1843 `(mouse-face highlight ebrowse-what mark ebrowse-tree ,tree
1830 help-echo "double-mouse-1: mark/unmark")) 1844 help-echo "double-mouse-1: mark/unmark"))
1831 (ebrowse-set-face start end 'ebrowse-tree-mark-face)) 1845 (ebrowse-set-face start end 'ebrowse-tree-mark))
1832 1846
1833 1847
1834(defun* ebrowse-draw-tree-fn (&aux stack1 stack2 start) 1848(defun* ebrowse-draw-tree-fn (&aux stack1 stack2 start)
@@ -1855,8 +1869,8 @@ This function may look weird, but this is faster than recursion."
1855 (when (ebrowse-template-p class) 1869 (when (ebrowse-template-p class)
1856 (insert "<>")) 1870 (insert "<>"))
1857 (ebrowse-set-face start (point) (if (zerop level) 1871 (ebrowse-set-face start (point) (if (zerop level)
1858 'ebrowse-root-class-face 1872 'ebrowse-root-class
1859 'ebrowse-default-face)) 1873 'ebrowse-default))
1860 (setf start-of-class-name start 1874 (setf start-of-class-name start
1861 end-of-class-name (point)) 1875 end-of-class-name (point))
1862 ;; If filenames are to be displayed... 1876 ;; If filenames are to be displayed...
@@ -1867,7 +1881,7 @@ This function may look weird, but this is faster than recursion."
1867 (or (ebrowse-cs-file class) 1881 (or (ebrowse-cs-file class)
1868 "unknown") 1882 "unknown")
1869 ")") 1883 ")")
1870 (ebrowse-set-face start (point) 'ebrowse-file-name-face)) 1884 (ebrowse-set-face start (point) 'ebrowse-file-name))
1871 (ebrowse-set-mark-props start-of-line (1+ start-of-line) tree) 1885 (ebrowse-set-mark-props start-of-line (1+ start-of-line) tree)
1872 (add-text-properties 1886 (add-text-properties
1873 start-of-class-name end-of-class-name 1887 start-of-class-name end-of-class-name
@@ -2694,7 +2708,7 @@ the class cursor is on."
2694 (insert "<>")) 2708 (insert "<>"))
2695 (setq class-name-end (point)) 2709 (setq class-name-end (point))
2696 (insert ":\n\n") 2710 (insert ":\n\n")
2697 (ebrowse-set-face start (point) 'ebrowse-member-class-face) 2711 (ebrowse-set-face start (point) 'ebrowse-member-class)
2698 (add-text-properties 2712 (add-text-properties
2699 class-name-start class-name-end 2713 class-name-start class-name-end
2700 '(ebrowse-what class-name 2714 '(ebrowse-what class-name
@@ -2810,7 +2824,7 @@ TREE is the class tree of MEMBER-LIST."
2810 (ebrowse-draw-member-attributes member-struc) 2824 (ebrowse-draw-member-attributes member-struc)
2811 (insert ">") 2825 (insert ">")
2812 (ebrowse-set-face start (point) 2826 (ebrowse-set-face start (point)
2813 'ebrowse-member-attribute-face))) 2827 'ebrowse-member-attribute)))
2814 (insert " ") 2828 (insert " ")
2815 (ebrowse-draw-member-regexp member-struc)))) 2829 (ebrowse-draw-member-regexp member-struc))))
2816 (insert "\n") 2830 (insert "\n")
@@ -2841,7 +2855,7 @@ TREE is the class tree in which the members are found."
2841 (ebrowse-draw-member-attributes member) 2855 (ebrowse-draw-member-attributes member)
2842 (insert "> ") 2856 (insert "> ")
2843 (ebrowse-set-face start-of-entry (point) 2857 (ebrowse-set-face start-of-entry (point)
2844 'ebrowse-member-attribute-face)) 2858 'ebrowse-member-attribute))
2845 ;; insert member name truncated to column width 2859 ;; insert member name truncated to column width
2846 (setq start-of-name (point)) 2860 (setq start-of-name (point))
2847 (insert (substring name 0 2861 (insert (substring name 0
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 28a6aae2435..c47f2e34cd2 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -704,7 +704,7 @@ It's flymake process filter."
704 (nth 1 err-info)) 704 (nth 1 err-info))
705 705
706(defvar flymake-new-err-info nil 706(defvar flymake-new-err-info nil
707 "Same as 'flymake-err-info', effective when a syntax check is in progress.") 707 "Same as `flymake-err-info', effective when a syntax check is in progress.")
708 708
709(make-variable-buffer-local 'flymake-new-err-info) 709(make-variable-buffer-local 'flymake-new-err-info)
710 710
@@ -839,19 +839,23 @@ Return t if it has at least one flymake overlay, nil if no overlay."
839 (setq ov (cdr ov))) 839 (setq ov (cdr ov)))
840 has-flymake-overlays)) 840 has-flymake-overlays))
841 841
842(defface flymake-errline-face 842(defface flymake-errline
843 ;;+ '((((class color)) (:foreground "OrangeRed" :bold t :underline t)) 843 ;;+ '((((class color)) (:foreground "OrangeRed" :bold t :underline t))
844 ;;+ '((((class color)) (:underline "OrangeRed")) 844 ;;+ '((((class color)) (:underline "OrangeRed"))
845 '((((class color)) (:background "LightPink")) 845 '((((class color)) (:background "LightPink"))
846 (t (:bold t))) 846 (t (:bold t)))
847 "Face used for marking error lines." 847 "Face used for marking error lines."
848 :group 'flymake) 848 :group 'flymake)
849;; backward-compatibility alias
850(put 'flymake-errline-face 'face-alias 'flymake-errline)
849 851
850(defface flymake-warnline-face 852(defface flymake-warnline
851 '((((class color)) (:background "LightBlue2")) 853 '((((class color)) (:background "LightBlue2"))
852 (t (:bold t))) 854 (t (:bold t)))
853 "Face used for marking warning lines." 855 "Face used for marking warning lines."
854 :group 'flymake) 856 :group 'flymake)
857;; backward-compatibility alias
858(put 'flymake-warnline-face 'face-alias 'flymake-warnline)
855 859
856(defun flymake-highlight-line (line-no line-err-info-list) 860(defun flymake-highlight-line (line-no line-err-info-list)
857 "Highlight line LINE-NO in current buffer. 861 "Highlight line LINE-NO in current buffer.
@@ -886,8 +890,8 @@ Perhaps use text from LINE-ERR-INFO-ILST to enhance highlighting."
886 (setq end (point))) 890 (setq end (point)))
887 891
888 (if (> (flymake-get-line-err-count line-err-info-list "e") 0) 892 (if (> (flymake-get-line-err-count line-err-info-list "e") 0)
889 (setq face 'flymake-errline-face) 893 (setq face 'flymake-errline)
890 (setq face 'flymake-warnline-face)) 894 (setq face 'flymake-warnline))
891 895
892 (flymake-make-overlay beg end tooltip-text face nil))) 896 (flymake-make-overlay beg end tooltip-text face nil)))
893 897
@@ -1312,7 +1316,7 @@ Return first 'INCLUDE-DIRS/REL-FILE-NAME' that exists, or just REL-FILE-NAME if
1312 (flymake-start-syntax-check buffer))))) 1316 (flymake-start-syntax-check buffer)))))
1313 1317
1314(defun flymake-start-syntax-check-for-current-buffer () 1318(defun flymake-start-syntax-check-for-current-buffer ()
1315 "Run 'flymake-start-syntax-check' for current buffer if it isn't already running." 1319 "Run `flymake-start-syntax-check' for current buffer if it isn't already running."
1316 (interactive) 1320 (interactive)
1317 (flymake-start-syntax-check (current-buffer))) 1321 (flymake-start-syntax-check (current-buffer)))
1318 1322
@@ -1655,7 +1659,7 @@ With arg, turn Flymake mode on if and only if arg is positive."
1655 temp-source-file-name)) 1659 temp-source-file-name))
1656 1660
1657(defun flymake-simple-cleanup (buffer) 1661(defun flymake-simple-cleanup (buffer)
1658 "Do cleanup after 'flymake-init-create-temp-buffer-copy'. 1662 "Do cleanup after `flymake-init-create-temp-buffer-copy'.
1659Delete temp file." 1663Delete temp file."
1660 (let* ((temp-source-file-name (flymake-get-buffer-value buffer "temp-source-file-name"))) 1664 (let* ((temp-source-file-name (flymake-get-buffer-value buffer "temp-source-file-name")))
1661 (flymake-safe-delete-file temp-source-file-name) 1665 (flymake-safe-delete-file temp-source-file-name)
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index a9274cfcae7..3a34a621fc6 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -250,7 +250,7 @@ Also display the main routine in the disassembly buffer if present."
250 (let ((string (buffer-string))) 250 (let ((string (buffer-string)))
251 ;; remove newline for gud-tooltip-echo-area 251 ;; remove newline for gud-tooltip-echo-area
252 (substring string 0 (- (length string) 1)))) 252 (substring string 0 (- (length string) 1))))
253 gud-tooltip-echo-area)) 253 (or gud-tooltip-echo-area tooltip-use-echo-area)))
254 254
255;; If expr is a macro for a function don't print because of possible dangerous 255;; If expr is a macro for a function don't print because of possible dangerous
256;; side-effects. Also printing a function within a tooltip generates an 256;; side-effects. Also printing a function within a tooltip generates an
@@ -994,24 +994,24 @@ sink to `user' in `gdb-stopping', that is fine."
994This begins the collection of output from the current command if that 994This begins the collection of output from the current command if that
995happens to be appropriate." 995happens to be appropriate."
996 (unless gdb-pending-triggers 996 (unless gdb-pending-triggers
997 (gdb-get-selected-frame) 997 (gdb-get-selected-frame)
998 (gdb-invalidate-frames) 998 (gdb-invalidate-frames)
999 (gdb-invalidate-breakpoints) 999 (gdb-invalidate-breakpoints)
1000 ;; Do this through gdb-get-selected-frame -> gdb-frame-handler 1000 ;; Do this through gdb-get-selected-frame -> gdb-frame-handler
1001 ;; so gdb-frame-address is updated. 1001 ;; so gdb-frame-address is updated.
1002 ;; (gdb-invalidate-assembler) 1002 ;; (gdb-invalidate-assembler)
1003 (gdb-invalidate-registers) 1003 (gdb-invalidate-registers)
1004 (gdb-invalidate-memory) 1004 (gdb-invalidate-memory)
1005 (gdb-invalidate-locals) 1005 (gdb-invalidate-locals)
1006 (gdb-invalidate-threads) 1006 (gdb-invalidate-threads)
1007 (unless (eq system-type 'darwin) ;Breaks on Darwin's GDB-5.3. 1007 (unless (eq system-type 'darwin) ;Breaks on Darwin's GDB-5.3.
1008 ;; FIXME: with GDB-6 on Darwin, this might very well work. 1008 ;; FIXME: with GDB-6 on Darwin, this might very well work.
1009 ;; only needed/used with speedbar/watch expressions 1009 ;; only needed/used with speedbar/watch expressions
1010 (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) 1010 (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))
1011 (setq gdb-var-changed t) ; force update 1011 (setq gdb-var-changed t) ; force update
1012 (dolist (var gdb-var-list) 1012 (dolist (var gdb-var-list)
1013 (setcar (nthcdr 5 var) nil)) 1013 (setcar (nthcdr 5 var) nil))
1014 (gdb-var-update)))) 1014 (gdb-var-update))))
1015 (let ((sink gdb-output-sink)) 1015 (let ((sink gdb-output-sink))
1016 (cond 1016 (cond
1017 ((eq sink 'user) t) 1017 ((eq sink 'user) t)
@@ -1695,7 +1695,9 @@ static char *magick[] = {
1695 (setq buffer-read-only t) 1695 (setq buffer-read-only t)
1696 (use-local-map gdb-registers-mode-map) 1696 (use-local-map gdb-registers-mode-map)
1697 (run-mode-hooks 'gdb-registers-mode-hook) 1697 (run-mode-hooks 'gdb-registers-mode-hook)
1698 'gdb-invalidate-registers) 1698 (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
1699 'gdb-invalidate-registers
1700 'gdbmi-invalidate-registers))
1699 1701
1700(defun gdb-registers-buffer-name () 1702(defun gdb-registers-buffer-name ()
1701 (with-current-buffer gud-comint-buffer 1703 (with-current-buffer gud-comint-buffer
@@ -2058,12 +2060,12 @@ corresponding to the mode line clicked."
2058 (replace-match " (array);\n" nil nil)))) 2060 (replace-match " (array);\n" nil nil))))
2059 (let ((buf (gdb-get-buffer 'gdb-locals-buffer))) 2061 (let ((buf (gdb-get-buffer 'gdb-locals-buffer)))
2060 (and buf (with-current-buffer buf 2062 (and buf (with-current-buffer buf
2061 (let ((p (point)) 2063 (let ((p (window-point (get-buffer-window buf 0)))
2062 (buffer-read-only nil)) 2064 (buffer-read-only nil))
2063 (delete-region (point-min) (point-max)) 2065 (erase-buffer)
2064 (insert-buffer-substring (gdb-get-create-buffer 2066 (insert-buffer-substring (gdb-get-create-buffer
2065 'gdb-partial-output-buffer)) 2067 'gdb-partial-output-buffer))
2066 (goto-char p))))) 2068 (set-window-point (get-buffer-window buf 0) p)))))
2067 (run-hooks 'gdb-info-locals-hook)) 2069 (run-hooks 'gdb-info-locals-hook))
2068 2070
2069(defun gdb-info-locals-custom () 2071(defun gdb-info-locals-custom ()
@@ -2172,18 +2174,18 @@ corresponding to the mode line clicked."
2172(let ((menu (make-sparse-keymap "GDB-UI"))) 2174(let ((menu (make-sparse-keymap "GDB-UI")))
2173 (define-key gud-menu-map [ui] 2175 (define-key gud-menu-map [ui]
2174 `(menu-item "GDB-UI" ,menu :visible (eq gud-minor-mode 'gdba))) 2176 `(menu-item "GDB-UI" ,menu :visible (eq gud-minor-mode 'gdba)))
2175 (define-key menu [gdb-restore-windows]
2176 '(menu-item "Restore Window Layout" gdb-restore-windows
2177 :help "Restore standard layout for debug session."))
2178 (define-key menu [gdb-many-windows]
2179 '(menu-item "Display Other Windows" gdb-many-windows
2180 :help "Toggle display of locals, stack and breakpoint information"
2181 :button (:toggle . gdb-many-windows)))
2182 (define-key menu [gdb-use-inferior-io] 2177 (define-key menu [gdb-use-inferior-io]
2183 (menu-bar-make-toggle toggle-gdb-use-inferior-io-buffer 2178 (menu-bar-make-toggle toggle-gdb-use-inferior-io-buffer
2184 gdb-use-inferior-io-buffer 2179 gdb-use-inferior-io-buffer
2185 "Separate inferior IO" "Use separate IO %s" 2180 "Separate inferior IO" "Use separate IO %s"
2186 "Toggle separate IO for inferior."))) 2181 "Toggle separate IO for inferior."))
2182 (define-key menu [gdb-many-windows]
2183 '(menu-item "Display Other Windows" gdb-many-windows
2184 :help "Toggle display of locals, stack and breakpoint information"
2185 :button (:toggle . gdb-many-windows)))
2186 (define-key menu [gdb-restore-windows]
2187 '(menu-item "Restore Window Layout" gdb-restore-windows
2188 :help "Restore standard layout for debug session.")))
2187 2189
2188(defadvice toggle-gdb-use-inferior-io-buffer (after gdb-kill-io-buffer activate) 2190(defadvice toggle-gdb-use-inferior-io-buffer (after gdb-kill-io-buffer activate)
2189 (unless gdb-use-inferior-io-buffer 2191 (unless gdb-use-inferior-io-buffer
@@ -2341,6 +2343,8 @@ Add directory to search path for source files using the GDB command, dir."))
2341(add-hook 'find-file-hook 'gdb-find-file-hook) 2343(add-hook 'find-file-hook 'gdb-find-file-hook)
2342 2344
2343(defun gdb-find-file-hook () 2345(defun gdb-find-file-hook ()
2346"Set up buffer for debugging if file is part of the source code
2347of the current session."
2344 (if (and (not gdb-find-file-unhook) 2348 (if (and (not gdb-find-file-unhook)
2345 ;; in case gud or gdb-ui is just loaded 2349 ;; in case gud or gdb-ui is just loaded
2346 gud-comint-buffer 2350 gud-comint-buffer
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 31b9e7d7204..7d4fc00cd56 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -140,6 +140,9 @@ Used to grey out relevant togolbar icons.")
140 :enable (and (not gud-running) 140 :enable (and (not gud-running)
141 (memq gud-minor-mode 141 (memq gud-minor-mode
142 '(gdbmi gdba gdb dbx xdb jdb pdb bashdb)))) 142 '(gdbmi gdba gdb dbx xdb jdb pdb bashdb))))
143 ([print*] menu-item "Print Dereference" gud-pstar
144 :enable (and (not gud-running)
145 (memq gud-minor-mode '(gdbmi gdba gdb))))
143 ([print] menu-item "Print Expression" gud-print 146 ([print] menu-item "Print Expression" gud-print
144 :enable (not gud-running)) 147 :enable (not gud-running))
145 ([watch] menu-item "Watch Expression" gud-watch 148 ([watch] menu-item "Watch Expression" gud-watch
@@ -183,18 +186,19 @@ Used to grey out relevant togolbar icons.")
183 (dolist (x '((gud-break . "gud-break") 186 (dolist (x '((gud-break . "gud-break")
184 (gud-remove . "gud-remove") 187 (gud-remove . "gud-remove")
185 (gud-print . "gud-print") 188 (gud-print . "gud-print")
189 (gud-pstar . "gud-pstar")
186 (gud-watch . "gud-watch") 190 (gud-watch . "gud-watch")
187 (gud-run . "gud-run")
188 (gud-until . "gud-until")
189 (gud-cont . "gud-cont") 191 (gud-cont . "gud-cont")
192 (gud-until . "gud-until")
193 (gud-finish . "gud-finish")
194 (gud-run . "gud-run")
190 ;; gud-s, gud-si etc. instead of gud-step, 195 ;; gud-s, gud-si etc. instead of gud-step,
191 ;; gud-stepi, to avoid file-name clashes on DOS 196 ;; gud-stepi, to avoid file-name clashes on DOS
192 ;; 8+3 filesystems. 197 ;; 8+3 filesystems.
193 (gud-step . "gud-s")
194 (gud-next . "gud-n") 198 (gud-next . "gud-n")
195 (gud-finish . "gud-finish") 199 (gud-step . "gud-s")
196 (gud-stepi . "gud-si")
197 (gud-nexti . "gud-ni") 200 (gud-nexti . "gud-ni")
201 (gud-stepi . "gud-si")
198 (gud-up . "gud-up") 202 (gud-up . "gud-up")
199 (gud-down . "gud-down") 203 (gud-down . "gud-down")
200 (gud-goto-info . "info")) 204 (gud-goto-info . "info"))
@@ -580,6 +584,8 @@ and source-file directory for your debugger."
580 (gud-def gud-up "up %p" "<" "Up N stack frames (numeric arg).") 584 (gud-def gud-up "up %p" "<" "Up N stack frames (numeric arg).")
581 (gud-def gud-down "down %p" ">" "Down N stack frames (numeric arg).") 585 (gud-def gud-down "down %p" ">" "Down N stack frames (numeric arg).")
582 (gud-def gud-print "print %e" "\C-p" "Evaluate C expression at point.") 586 (gud-def gud-print "print %e" "\C-p" "Evaluate C expression at point.")
587 (gud-def gud-pstar "print* %e" nil
588 "Evaluate C dereferenced pointer expression at point.")
583 (gud-def gud-until "until %l" "\C-u" "Continue to current line.") 589 (gud-def gud-until "until %l" "\C-u" "Continue to current line.")
584 (gud-def gud-run "run" nil "Run the program.") 590 (gud-def gud-run "run" nil "Run the program.")
585 591
@@ -1214,7 +1220,7 @@ containing the executable being debugged."
1214The directory containing FILE becomes the initial working directory 1220The directory containing FILE becomes the initial working directory
1215and source-file directory for your debugger. 1221and source-file directory for your debugger.
1216 1222
1217You can set the variable 'gud-xdb-directories' to a list of program source 1223You can set the variable `gud-xdb-directories' to a list of program source
1218directories if your program contains sources from more than one directory." 1224directories if your program contains sources from more than one directory."
1219 (interactive (list (gud-query-cmdline 'xdb))) 1225 (interactive (list (gud-query-cmdline 'xdb)))
1220 1226
@@ -3133,8 +3139,6 @@ only tooltips in the buffer containing the overlay arrow."
3133 'gud-tooltip-modes "22.1") 3139 'gud-tooltip-modes "22.1")
3134(define-obsolete-variable-alias 'tooltip-gud-display 3140(define-obsolete-variable-alias 'tooltip-gud-display
3135 'gud-tooltip-display "22.1") 3141 'gud-tooltip-display "22.1")
3136(define-obsolete-variable-alias 'tooltip-use-echo-area
3137 'gud-tooltip-echo-area "22.1")
3138 3142
3139;;; Reacting on mouse movements 3143;;; Reacting on mouse movements
3140 3144
@@ -3236,7 +3240,7 @@ This event can be examined by forms in GUD-TOOLTIP-DISPLAY.")
3236 3240
3237; This will only display data that comes in one chunk. 3241; This will only display data that comes in one chunk.
3238; Larger arrays (say 400 elements) are displayed in 3242; Larger arrays (say 400 elements) are displayed in
3239; the tootip incompletely and spill over into the gud buffer. 3243; the tooltip incompletely and spill over into the gud buffer.
3240; Switching the process-filter creates timing problems and 3244; Switching the process-filter creates timing problems and
3241; it may be difficult to do better. Using annotations as in 3245; it may be difficult to do better. Using annotations as in
3242; gdb-ui.el gets round this problem. 3246; gdb-ui.el gets round this problem.
@@ -3244,7 +3248,7 @@ This event can be examined by forms in GUD-TOOLTIP-DISPLAY.")
3244 "Process debugger output and show it in a tooltip window." 3248 "Process debugger output and show it in a tooltip window."
3245 (set-process-filter process gud-tooltip-original-filter) 3249 (set-process-filter process gud-tooltip-original-filter)
3246 (tooltip-show (tooltip-strip-prompt process output) 3250 (tooltip-show (tooltip-strip-prompt process output)
3247 gud-tooltip-echo-area)) 3251 (or gud-tooltip-echo-area tooltip-use-echo-area)))
3248 3252
3249(defun gud-tooltip-print-command (expr) 3253(defun gud-tooltip-print-command (expr)
3250 "Return a suitable command to print the expression EXPR. 3254 "Return a suitable command to print the expression EXPR.
@@ -3289,7 +3293,9 @@ This function must return nil if it doesn't handle EVENT."
3289 (cddr mouse)))) 3293 (cddr mouse))))
3290 (let ((define-elt (assoc expr gdb-define-alist))) 3294 (let ((define-elt (assoc expr gdb-define-alist)))
3291 (unless (null define-elt) 3295 (unless (null define-elt)
3292 (tooltip-show (cdr define-elt)) 3296 (tooltip-show
3297 (cdr define-elt)
3298 (or gud-tooltip-echo-area tooltip-use-echo-area))
3293 expr)))) 3299 expr))))
3294 (let ((cmd (gud-tooltip-print-command expr))) 3300 (let ((cmd (gud-tooltip-print-command expr)))
3295 (when (and gud-tooltip-mode (eq gud-minor-mode 'gdb)) 3301 (when (and gud-tooltip-mode (eq gud-minor-mode 'gdb))
diff --git a/lisp/progmodes/idlw-help.el b/lisp/progmodes/idlw-help.el
index 6c2cb00bbde..ba31e6e0ef8 100644
--- a/lisp/progmodes/idlw-help.el
+++ b/lisp/progmodes/idlw-help.el
@@ -182,12 +182,14 @@ support."
182 :group 'idlwave-online-help 182 :group 'idlwave-online-help
183 :type 'string) 183 :type 'string)
184 184
185(defface idlwave-help-link-face 185(defface idlwave-help-link
186 '((((min-colors 88) (class color)) (:foreground "Blue1")) 186 '((((min-colors 88) (class color)) (:foreground "Blue1"))
187 (((class color)) (:foreground "Blue")) 187 (((class color)) (:foreground "Blue"))
188 (t (:weight bold))) 188 (t (:weight bold)))
189 "Face for highlighting links into IDLWAVE online help." 189 "Face for highlighting links into IDLWAVE online help."
190 :group 'idlwave-online-help) 190 :group 'idlwave-online-help)
191;; backward-compatibility alias
192(put 'idlwave-help-link-face 'face-alias 'idlwave-help-link)
191 193
192(defvar idlwave-help-activate-links-aggressively nil 194(defvar idlwave-help-activate-links-aggressively nil
193 "Obsolete variable.") 195 "Obsolete variable.")
@@ -586,12 +588,12 @@ Needs additional info stored in global `idlwave-completion-help-info'."
586(defun idlwave-highlight-linked-completions () 588(defun idlwave-highlight-linked-completions ()
587 "Highlight all completions for which help is available and attach link. 589 "Highlight all completions for which help is available and attach link.
588Those words in `idlwave-completion-help-links' have links. The 590Those words in `idlwave-completion-help-links' have links. The
589`idlwave-help-link-face' face is used for this." 591`idlwave-help-link' face is used for this."
590 (if idlwave-highlight-help-links-in-completion 592 (if idlwave-highlight-help-links-in-completion
591 (with-current-buffer (get-buffer "*Completions*") 593 (with-current-buffer (get-buffer "*Completions*")
592 (save-excursion 594 (save-excursion
593 (let* ((case-fold-search t) 595 (let* ((case-fold-search t)
594 (props (list 'face 'idlwave-help-link-face)) 596 (props (list 'face 'idlwave-help-link))
595 (info idlwave-completion-help-info) ; global passed in 597 (info idlwave-completion-help-info) ; global passed in
596 (what (nth 0 info)) ; what was completed, or a func 598 (what (nth 0 info)) ; what was completed, or a func
597 (class (nth 3 info)) ; any class 599 (class (nth 3 info)) ; any class
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el
index e804b9f8d50..04e6a28ee40 100644
--- a/lisp/progmodes/idlw-shell.el
+++ b/lisp/progmodes/idlw-shell.el
@@ -510,40 +510,44 @@ t Glyph when possible, otherwise face (same effect as 'glyph)."
510(defvar idlwave-shell-use-breakpoint-glyph t 510(defvar idlwave-shell-use-breakpoint-glyph t
511 "Obsolete variable. See `idlwave-shell-mark-breakpoints.") 511 "Obsolete variable. See `idlwave-shell-mark-breakpoints.")
512 512
513(defcustom idlwave-shell-breakpoint-face 'idlwave-shell-bp-face 513(defcustom idlwave-shell-breakpoint-face 'idlwave-shell-bp
514 "*The face for breakpoint lines in the source code. 514 "*The face for breakpoint lines in the source code.
515Allows you to choose the font, color and other properties for 515Allows you to choose the font, color and other properties for
516lines which have a breakpoint. See also `idlwave-shell-mark-breakpoints'." 516lines which have a breakpoint. See also `idlwave-shell-mark-breakpoints'."
517 :group 'idlwave-shell-highlighting-and-faces 517 :group 'idlwave-shell-highlighting-and-faces
518 :type 'symbol) 518 :type 'symbol)
519 519
520(if idlwave-shell-have-new-custom 520(if (not idlwave-shell-have-new-custom)
521 ;; We have the new customize - use it to define a customizable face 521 ;; Just copy the underline face to be on the safe side.
522 (defface idlwave-shell-bp-face 522 (copy-face 'underline 'idlwave-shell-bp)
523 '((((class color)) (:foreground "Black" :background "Pink")) 523 ;; We have the new customize - use it to define a customizable face
524 (t (:underline t))) 524 (defface idlwave-shell-bp
525 "Face for highlighting lines with breakpoints." 525 '((((class color)) (:foreground "Black" :background "Pink"))
526 :group 'idlwave-shell-highlighting-and-faces) 526 (t (:underline t)))
527 ;; Just copy the underline face to be on the safe side. 527 "Face for highlighting lines with breakpoints."
528 (copy-face 'underline 'idlwave-shell-bp-face)) 528 :group 'idlwave-shell-highlighting-and-faces)
529 ;; backward-compatibility alias
530 (put 'idlwave-shell-bp-face 'face-alias 'idlwave-shell-bp))
529 531
530(defcustom idlwave-shell-disabled-breakpoint-face 532(defcustom idlwave-shell-disabled-breakpoint-face
531 'idlwave-shell-disabled-bp-face 533 'idlwave-shell-disabled-bp
532 "*The face for disabled breakpoint lines in the source code. 534 "*The face for disabled breakpoint lines in the source code.
533Allows you to choose the font, color and other properties for 535Allows you to choose the font, color and other properties for
534lines which have a breakpoint. See also `idlwave-shell-mark-breakpoints'." 536lines which have a breakpoint. See also `idlwave-shell-mark-breakpoints'."
535 :group 'idlwave-shell-highlighting-and-faces 537 :group 'idlwave-shell-highlighting-and-faces
536 :type 'symbol) 538 :type 'symbol)
537 539
538(if idlwave-shell-have-new-custom 540(if (not idlwave-shell-have-new-custom)
539 ;; We have the new customize - use it to define a customizable face 541 ;; Just copy the underline face to be on the safe side.
540 (defface idlwave-shell-disabled-bp-face 542 (copy-face 'underline 'idlwave-shell-disabled-bp)
541 '((((class color)) (:foreground "Black" :background "gray")) 543 ;; We have the new customize - use it to define a customizable face
542 (t (:underline t))) 544 (defface idlwave-shell-disabled-bp
543 "Face for highlighting lines with breakpoints." 545 '((((class color)) (:foreground "Black" :background "gray"))
544 :group 'idlwave-shell-highlighting-and-faces) 546 (t (:underline t)))
545 ;; Just copy the underline face to be on the safe side. 547 "Face for highlighting lines with breakpoints."
546 (copy-face 'underline 'idlwave-shell-disabled-bp-face)) 548 :group 'idlwave-shell-highlighting-and-faces)
549 ;; backward-compatibility alias
550 (put 'idlwave-shell-disabled-bp-face 'face-alias 'idlwave-shell-disabled-bp))
547 551
548 552
549(defcustom idlwave-shell-expression-face 'secondary-selection 553(defcustom idlwave-shell-expression-face 'secondary-selection
@@ -2734,7 +2738,7 @@ Runs to the last statement and then steps 1 statement. Use the .out command."
2734 (funcall orig-func cur-line orig-bp-line) 2738 (funcall orig-func cur-line orig-bp-line)
2735 (or (not bp-line) (funcall closer-func cur-line bp-line))) 2739 (or (not bp-line) (funcall closer-func cur-line bp-line)))
2736 (setq bp-line cur-line)))) 2740 (setq bp-line cur-line))))
2737 (unless bp-line (error "No further breakpoints.")) 2741 (unless bp-line (error "No further breakpoints"))
2738 (goto-line bp-line))) 2742 (goto-line bp-line)))
2739 2743
2740;; Examine Commands ------------------------------------------------------ 2744;; Examine Commands ------------------------------------------------------
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index 6bd7e0eaced..820e619f331 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -70,7 +70,7 @@
70;; of the documentation is available from the maintainers webpage (see 70;; of the documentation is available from the maintainers webpage (see
71;; SOURCE). 71;; SOURCE).
72;; 72;;
73;; 73;;
74;; ACKNOWLEDGMENTS 74;; ACKNOWLEDGMENTS
75;; =============== 75;; ===============
76;; 76;;
@@ -120,7 +120,7 @@
120;; up inserting the character that expanded the abbrev after moving 120;; up inserting the character that expanded the abbrev after moving
121;; point backward, e.g., "\cl" expanded with a space becomes 121;; point backward, e.g., "\cl" expanded with a space becomes
122;; "LONG( )" with point before the close paren. This is solved by 122;; "LONG( )" with point before the close paren. This is solved by
123;; using a temporary function in `post-command-hook' - not pretty, 123;; using a temporary function in `post-command-hook' - not pretty,
124;; but it works. 124;; but it works.
125;; 125;;
126;; Tabs and spaces are treated equally as whitespace when filling a 126;; Tabs and spaces are treated equally as whitespace when filling a
@@ -166,13 +166,13 @@
166 nil ;; We've got what we needed 166 nil ;; We've got what we needed
167 ;; We have the old or no custom-library, hack around it! 167 ;; We have the old or no custom-library, hack around it!
168 (defmacro defgroup (&rest args) nil) 168 (defmacro defgroup (&rest args) nil)
169 (defmacro defcustom (var value doc &rest args) 169 (defmacro defcustom (var value doc &rest args)
170 `(defvar ,var ,value ,doc)))) 170 `(defvar ,var ,value ,doc))))
171 171
172(defgroup idlwave nil 172(defgroup idlwave nil
173 "Major mode for editing IDL .pro files" 173 "Major mode for editing IDL .pro files"
174 :tag "IDLWAVE" 174 :tag "IDLWAVE"
175 :link '(url-link :tag "Home Page" 175 :link '(url-link :tag "Home Page"
176 "http://idlwave.org") 176 "http://idlwave.org")
177 :link '(emacs-commentary-link :tag "Commentary in idlw-shell.el" 177 :link '(emacs-commentary-link :tag "Commentary in idlw-shell.el"
178 "idlw-shell.el") 178 "idlw-shell.el")
@@ -286,8 +286,8 @@ extends to the end of the match for the regular expression."
286 286
287(defcustom idlwave-auto-fill-split-string t 287(defcustom idlwave-auto-fill-split-string t
288 "*If non-nil then auto fill will split strings with the IDL `+' operator. 288 "*If non-nil then auto fill will split strings with the IDL `+' operator.
289When the line end falls within a string, string concatenation with the 289When the line end falls within a string, string concatenation with the
290'+' operator will be used to distribute a long string over lines. 290'+' operator will be used to distribute a long string over lines.
291If nil and a string is split then a terminal beep and warning are issued. 291If nil and a string is split then a terminal beep and warning are issued.
292 292
293This variable is ignored when `idlwave-fill-comment-line-only' is 293This variable is ignored when `idlwave-fill-comment-line-only' is
@@ -351,7 +351,7 @@ usually a good idea.."
351Initializing the routine info can take long, in particular if a large 351Initializing the routine info can take long, in particular if a large
352library catalog is involved. When Emacs is idle for more than the number 352library catalog is involved. When Emacs is idle for more than the number
353of seconds specified by this variable, it starts the initialization. 353of seconds specified by this variable, it starts the initialization.
354The process is split into five steps, in order to keep possible work 354The process is split into five steps, in order to keep possible work
355interruption as short as possible. If one of the steps finishes, and no 355interruption as short as possible. If one of the steps finishes, and no
356user input has arrived in the mean time, initialization proceeds immediately 356user input has arrived in the mean time, initialization proceeds immediately
357to the next step. 357to the next step.
@@ -403,7 +403,7 @@ t All available
403 (const :tag "When saving a buffer" save-buffer) 403 (const :tag "When saving a buffer" save-buffer)
404 (const :tag "After a buffer was killed" kill-buffer) 404 (const :tag "After a buffer was killed" kill-buffer)
405 (const :tag "After a buffer was compiled successfully, update shell info" compile-buffer)))) 405 (const :tag "After a buffer was compiled successfully, update shell info" compile-buffer))))
406 406
407(defcustom idlwave-rinfo-max-source-lines 5 407(defcustom idlwave-rinfo-max-source-lines 5
408 "*Maximum number of source files displayed in the Routine Info window. 408 "*Maximum number of source files displayed in the Routine Info window.
409When an integer, it is the maximum number of source files displayed. 409When an integer, it is the maximum number of source files displayed.
@@ -436,7 +436,7 @@ value of `!DIR'. See also `idlwave-library-path'."
436 :group 'idlwave-routine-info 436 :group 'idlwave-routine-info
437 :type 'directory) 437 :type 'directory)
438 438
439(defcustom idlwave-config-directory 439(defcustom idlwave-config-directory
440 (convert-standard-filename "~/.idlwave") 440 (convert-standard-filename "~/.idlwave")
441 "*Directory for configuration files and user-library catalog." 441 "*Directory for configuration files and user-library catalog."
442 :group 'idlwave-routine-info 442 :group 'idlwave-routine-info
@@ -451,7 +451,7 @@ value of `!DIR'. See also `idlwave-library-path'."
451(defcustom idlwave-special-lib-alist nil 451(defcustom idlwave-special-lib-alist nil
452 "Alist of regular expressions matching special library directories. 452 "Alist of regular expressions matching special library directories.
453When listing routine source locations, IDLWAVE gives a short hint where 453When listing routine source locations, IDLWAVE gives a short hint where
454the file defining the routine is located. By default it lists `SystemLib' 454the file defining the routine is located. By default it lists `SystemLib'
455for routines in the system library `!DIR/lib' and `Library' for anything 455for routines in the system library `!DIR/lib' and `Library' for anything
456else. This variable can define additional types. The car of each entry 456else. This variable can define additional types. The car of each entry
457is a regular expression matching the file name (they normally will match 457is a regular expression matching the file name (they normally will match
@@ -462,7 +462,7 @@ chars are allowed."
462 (cons regexp string))) 462 (cons regexp string)))
463 463
464(defcustom idlwave-auto-write-paths t 464(defcustom idlwave-auto-write-paths t
465 "Write out path (!PATH) and system directory (!DIR) info automatically. 465 "Write out path (!PATH) and system directory (!DIR) info automatically.
466Path info is needed to locate library catalog files. If non-nil, 466Path info is needed to locate library catalog files. If non-nil,
467whenever the path-list changes as a result of shell-query, etc., it is 467whenever the path-list changes as a result of shell-query, etc., it is
468written to file. Otherwise, the menu option \"Write Paths\" can be 468written to file. Otherwise, the menu option \"Write Paths\" can be
@@ -493,7 +493,7 @@ used to force a write."
493This variable determines the case (UPPER/lower/Capitalized...) of 493This variable determines the case (UPPER/lower/Capitalized...) of
494words inserted into the buffer by completion. The preferred case can 494words inserted into the buffer by completion. The preferred case can
495be specified separately for routine names, keywords, classes and 495be specified separately for routine names, keywords, classes and
496methods. 496methods.
497This alist should therefore have entries for `routine' (normal 497This alist should therefore have entries for `routine' (normal
498functions and procedures, i.e. non-methods), `keyword', `class', and 498functions and procedures, i.e. non-methods), `keyword', `class', and
499`method'. Plausible values are 499`method'. Plausible values are
@@ -580,7 +580,7 @@ certain methods this assumption is almost always true. The methods
580for which to assume this can be set here." 580for which to assume this can be set here."
581 :group 'idlwave-routine-info 581 :group 'idlwave-routine-info
582 :type '(repeat (regexp :tag "Match method:"))) 582 :type '(repeat (regexp :tag "Match method:")))
583 583
584 584
585(defcustom idlwave-completion-show-classes 1 585(defcustom idlwave-completion-show-classes 1
586 "*Number of classes to show when completing object methods and keywords. 586 "*Number of classes to show when completing object methods and keywords.
@@ -645,7 +645,7 @@ should contain at least two elements: (method-default . VALUE) and
645specify if the class should be found during method and keyword 645specify if the class should be found during method and keyword
646completion, respectively. 646completion, respectively.
647 647
648The alist may have additional entries specifying exceptions from the 648The alist may have additional entries specifying exceptions from the
649keyword completion rule for specific methods, like INIT or 649keyword completion rule for specific methods, like INIT or
650GETPROPERTY. In order to turn on class specification for the INIT 650GETPROPERTY. In order to turn on class specification for the INIT
651method, add an entry (\"INIT\" . t). The method name must be ALL-CAPS." 651method, add an entry (\"INIT\" . t). The method name must be ALL-CAPS."
@@ -669,7 +669,7 @@ particular object method call. This happens during the commands
669value of the variable `idlwave-query-class'. 669value of the variable `idlwave-query-class'.
670 670
671When you specify a class, this information can be stored as a text 671When you specify a class, this information can be stored as a text
672property on the `->' arrow in the source code, so that during the same 672property on the `->' arrow in the source code, so that during the same
673editing session, IDLWAVE will not have to ask again. When this 673editing session, IDLWAVE will not have to ask again. When this
674variable is non-nil, IDLWAVE will store and reuse the class information. 674variable is non-nil, IDLWAVE will store and reuse the class information.
675The class stored can be checked and removed with `\\[idlwave-routine-info]' 675The class stored can be checked and removed with `\\[idlwave-routine-info]'
@@ -1049,7 +1049,7 @@ IDL process is made."
1049 :group 'idlwave-misc 1049 :group 'idlwave-misc
1050 :type 'boolean) 1050 :type 'boolean)
1051 1051
1052(defcustom idlwave-default-font-lock-items 1052(defcustom idlwave-default-font-lock-items
1053 '(pros-and-functions batch-files idlwave-idl-keywords label goto 1053 '(pros-and-functions batch-files idlwave-idl-keywords label goto
1054 common-blocks class-arrows) 1054 common-blocks class-arrows)
1055 "Items which should be fontified on the default fontification level 2. 1055 "Items which should be fontified on the default fontification level 2.
@@ -1111,25 +1111,25 @@ As a user, you should not set this to t.")
1111;;; and Carsten Dominik... 1111;;; and Carsten Dominik...
1112 1112
1113;; The following are the reserved words in IDL. Maybe we should 1113;; The following are the reserved words in IDL. Maybe we should
1114;; highlight some more stuff as well? 1114;; highlight some more stuff as well?
1115;; Procedure declarations. Fontify keyword plus procedure name. 1115;; Procedure declarations. Fontify keyword plus procedure name.
1116(defvar idlwave-idl-keywords 1116(defvar idlwave-idl-keywords
1117 ;; To update this regexp, update the list of keywords and 1117 ;; To update this regexp, update the list of keywords and
1118 ;; evaluate the form. 1118 ;; evaluate the form.
1119 ;; (insert 1119 ;; (insert
1120 ;; (prin1-to-string 1120 ;; (prin1-to-string
1121 ;; (concat 1121 ;; (concat
1122 ;; "\\<\\(" 1122 ;; "\\<\\("
1123 ;; (regexp-opt 1123 ;; (regexp-opt
1124 ;; '("||" "&&" "and" "or" "xor" "not" 1124 ;; '("||" "&&" "and" "or" "xor" "not"
1125 ;; "eq" "ge" "gt" "le" "lt" "ne" 1125 ;; "eq" "ge" "gt" "le" "lt" "ne"
1126 ;; "for" "do" "endfor" 1126 ;; "for" "do" "endfor"
1127 ;; "if" "then" "endif" "else" "endelse" 1127 ;; "if" "then" "endif" "else" "endelse"
1128 ;; "case" "of" "endcase" 1128 ;; "case" "of" "endcase"
1129 ;; "switch" "break" "continue" "endswitch" 1129 ;; "switch" "break" "continue" "endswitch"
1130 ;; "begin" "end" 1130 ;; "begin" "end"
1131 ;; "repeat" "until" "endrep" 1131 ;; "repeat" "until" "endrep"
1132 ;; "while" "endwhile" 1132 ;; "while" "endwhile"
1133 ;; "goto" "return" 1133 ;; "goto" "return"
1134 ;; "inherits" "mod" 1134 ;; "inherits" "mod"
1135 ;; "compile_opt" "forward_function" 1135 ;; "compile_opt" "forward_function"
@@ -1152,7 +1152,7 @@ As a user, you should not set this to t.")
1152 (2 font-lock-reference-face nil t) ; block name 1152 (2 font-lock-reference-face nil t) ; block name
1153 (font-lock-match-c++-style-declaration-item-and-skip-to-next 1153 (font-lock-match-c++-style-declaration-item-and-skip-to-next
1154 ;; Start with point after block name and comma 1154 ;; Start with point after block name and comma
1155 (goto-char (match-end 0)) ; needed for XEmacs, could be nil 1155 (goto-char (match-end 0)) ; needed for XEmacs, could be nil
1156 nil 1156 nil
1157 (1 font-lock-variable-name-face) ; variable names 1157 (1 font-lock-variable-name-face) ; variable names
1158 ))) 1158 )))
@@ -1207,7 +1207,7 @@ As a user, you should not set this to t.")
1207 ;; All operators (not used because too noisy) 1207 ;; All operators (not used because too noisy)
1208 (all-operators 1208 (all-operators
1209 '("[-*^#+<>/]" (0 font-lock-keyword-face))) 1209 '("[-*^#+<>/]" (0 font-lock-keyword-face)))
1210 1210
1211 ;; Arrows with text property `idlwave-class' 1211 ;; Arrows with text property `idlwave-class'
1212 (class-arrows 1212 (class-arrows
1213 '(idlwave-match-class-arrows (0 idlwave-class-arrow-face)))) 1213 '(idlwave-match-class-arrows (0 idlwave-class-arrow-face))))
@@ -1244,14 +1244,14 @@ As a user, you should not set this to t.")
1244 1244
1245(defvar idlwave-font-lock-defaults 1245(defvar idlwave-font-lock-defaults
1246 '((idlwave-font-lock-keywords 1246 '((idlwave-font-lock-keywords
1247 idlwave-font-lock-keywords-1 1247 idlwave-font-lock-keywords-1
1248 idlwave-font-lock-keywords-2 1248 idlwave-font-lock-keywords-2
1249 idlwave-font-lock-keywords-3) 1249 idlwave-font-lock-keywords-3)
1250 nil t 1250 nil t
1251 ((?$ . "w") (?_ . "w") (?. . "w") (?| . "w") (?& . "w")) 1251 ((?$ . "w") (?_ . "w") (?. . "w") (?| . "w") (?& . "w"))
1252 beginning-of-line)) 1252 beginning-of-line))
1253 1253
1254(put 'idlwave-mode 'font-lock-defaults 1254(put 'idlwave-mode 'font-lock-defaults
1255 idlwave-font-lock-defaults) ; XEmacs 1255 idlwave-font-lock-defaults) ; XEmacs
1256 1256
1257(defconst idlwave-comment-line-start-skip "^[ \t]*;" 1257(defconst idlwave-comment-line-start-skip "^[ \t]*;"
@@ -1259,7 +1259,7 @@ As a user, you should not set this to t.")
1259That is the _beginning_ of a line containing a comment delimiter `;' preceded 1259That is the _beginning_ of a line containing a comment delimiter `;' preceded
1260only by whitespace.") 1260only by whitespace.")
1261 1261
1262(defconst idlwave-begin-block-reg 1262(defconst idlwave-begin-block-reg
1263 "\\<\\(pro\\|function\\|begin\\|case\\|switch\\)\\>" 1263 "\\<\\(pro\\|function\\|begin\\|case\\|switch\\)\\>"
1264 "Regular expression to find the beginning of a block. The case does 1264 "Regular expression to find the beginning of a block. The case does
1265not matter. The search skips matches in comments.") 1265not matter. The search skips matches in comments.")
@@ -1336,17 +1336,17 @@ blocks starting with a BEGIN statement. The matches must have associations
1336 '(goto . ("goto\\>" nil)) 1336 '(goto . ("goto\\>" nil))
1337 '(case . ("case\\>" nil)) 1337 '(case . ("case\\>" nil))
1338 '(switch . ("switch\\>" nil)) 1338 '(switch . ("switch\\>" nil))
1339 (cons 'call (list (concat "\\(" idlwave-variable "\\) *= *" 1339 (cons 'call (list (concat "\\(" idlwave-variable "\\) *= *"
1340 "\\(" idlwave-method-call "\\s *\\)?" 1340 "\\(" idlwave-method-call "\\s *\\)?"
1341 idlwave-identifier 1341 idlwave-identifier
1342 "\\s *(") nil)) 1342 "\\s *(") nil))
1343 (cons 'call (list (concat 1343 (cons 'call (list (concat
1344 "\\(" idlwave-method-call "\\s *\\)?" 1344 "\\(" idlwave-method-call "\\s *\\)?"
1345 idlwave-identifier 1345 idlwave-identifier
1346 "\\( *\\($\\|\\$\\)\\|\\s *,\\)") nil)) 1346 "\\( *\\($\\|\\$\\)\\|\\s *,\\)") nil))
1347 (cons 'assign (list (concat 1347 (cons 'assign (list (concat
1348 "\\(" idlwave-variable "\\) *=") nil))) 1348 "\\(" idlwave-variable "\\) *=") nil)))
1349 1349
1350 "Associated list of statement matching regular expressions. 1350 "Associated list of statement matching regular expressions.
1351Each regular expression matches the start of an IDL statement. The 1351Each regular expression matches the start of an IDL statement. The
1352first element of each association is a symbol giving the statement 1352first element of each association is a symbol giving the statement
@@ -1540,15 +1540,15 @@ Capitalize system variables - action only
1540 (not (equal idlwave-shell-debug-modifiers '()))) 1540 (not (equal idlwave-shell-debug-modifiers '())))
1541 ;; Bind the debug commands also with the special modifiers. 1541 ;; Bind the debug commands also with the special modifiers.
1542 (let ((shift (memq 'shift idlwave-shell-debug-modifiers)) 1542 (let ((shift (memq 'shift idlwave-shell-debug-modifiers))
1543 (mods-noshift (delq 'shift 1543 (mods-noshift (delq 'shift
1544 (copy-sequence idlwave-shell-debug-modifiers)))) 1544 (copy-sequence idlwave-shell-debug-modifiers))))
1545 (define-key idlwave-mode-map 1545 (define-key idlwave-mode-map
1546 (vector (append mods-noshift (list (if shift ?C ?c)))) 1546 (vector (append mods-noshift (list (if shift ?C ?c))))
1547 'idlwave-shell-save-and-run) 1547 'idlwave-shell-save-and-run)
1548 (define-key idlwave-mode-map 1548 (define-key idlwave-mode-map
1549 (vector (append mods-noshift (list (if shift ?B ?b)))) 1549 (vector (append mods-noshift (list (if shift ?B ?b))))
1550 'idlwave-shell-break-here) 1550 'idlwave-shell-break-here)
1551 (define-key idlwave-mode-map 1551 (define-key idlwave-mode-map
1552 (vector (append mods-noshift (list (if shift ?E ?e)))) 1552 (vector (append mods-noshift (list (if shift ?E ?e))))
1553 'idlwave-shell-run-region))) 1553 'idlwave-shell-run-region)))
1554(define-key idlwave-mode-map "\C-c\C-d\C-c" 'idlwave-shell-save-and-run) 1554(define-key idlwave-mode-map "\C-c\C-d\C-c" 'idlwave-shell-save-and-run)
@@ -1584,7 +1584,7 @@ Capitalize system variables - action only
1584(define-key idlwave-mode-map "\M-\C-i" 'idlwave-complete) 1584(define-key idlwave-mode-map "\M-\C-i" 'idlwave-complete)
1585(define-key idlwave-mode-map "\C-c\C-i" 'idlwave-update-routine-info) 1585(define-key idlwave-mode-map "\C-c\C-i" 'idlwave-update-routine-info)
1586(define-key idlwave-mode-map "\C-c=" 'idlwave-resolve) 1586(define-key idlwave-mode-map "\C-c=" 'idlwave-resolve)
1587(define-key idlwave-mode-map 1587(define-key idlwave-mode-map
1588 (if (featurep 'xemacs) [(shift button3)] [(shift mouse-3)]) 1588 (if (featurep 'xemacs) [(shift button3)] [(shift mouse-3)])
1589 'idlwave-mouse-context-help) 1589 'idlwave-mouse-context-help)
1590 1590
@@ -1595,7 +1595,7 @@ Capitalize system variables - action only
1595; (lambda (char) 0))) 1595; (lambda (char) 0)))
1596(idlwave-action-and-binding "<" '(idlwave-surround -1 -1)) 1596(idlwave-action-and-binding "<" '(idlwave-surround -1 -1))
1597;; Binding works for both > and ->, by changing the length of the token. 1597;; Binding works for both > and ->, by changing the length of the token.
1598(idlwave-action-and-binding ">" '(idlwave-surround -1 -1 '(?-) 1 1598(idlwave-action-and-binding ">" '(idlwave-surround -1 -1 '(?-) 1
1599 'idlwave-gtr-pad-hook)) 1599 'idlwave-gtr-pad-hook))
1600(idlwave-action-and-binding "->" '(idlwave-surround -1 -1 nil 2) t) 1600(idlwave-action-and-binding "->" '(idlwave-surround -1 -1 nil 2) t)
1601(idlwave-action-and-binding "," '(idlwave-surround 0 -1)) 1601(idlwave-action-and-binding "," '(idlwave-surround 0 -1))
@@ -1629,7 +1629,7 @@ idlwave-mode-abbrev-table unless TABLE is non-nil."
1629 (error (apply 'define-abbrev args))))) 1629 (error (apply 'define-abbrev args)))))
1630 1630
1631(condition-case nil 1631(condition-case nil
1632 (modify-syntax-entry (string-to-char idlwave-abbrev-start-char) 1632 (modify-syntax-entry (string-to-char idlwave-abbrev-start-char)
1633 "w" idlwave-mode-syntax-table) 1633 "w" idlwave-mode-syntax-table)
1634 (error nil)) 1634 (error nil))
1635 1635
@@ -1702,7 +1702,7 @@ idlwave-mode-abbrev-table unless TABLE is non-nil."
1702(idlwave-define-abbrev "s" "size()" (idlwave-keyword-abbrev 1)) 1702(idlwave-define-abbrev "s" "size()" (idlwave-keyword-abbrev 1))
1703(idlwave-define-abbrev "wi" "widget_info()" (idlwave-keyword-abbrev 1)) 1703(idlwave-define-abbrev "wi" "widget_info()" (idlwave-keyword-abbrev 1))
1704(idlwave-define-abbrev "wc" "widget_control," (idlwave-keyword-abbrev 0)) 1704(idlwave-define-abbrev "wc" "widget_control," (idlwave-keyword-abbrev 0))
1705 1705
1706;; This section is reserved words only. (From IDL user manual) 1706;; This section is reserved words only. (From IDL user manual)
1707;; 1707;;
1708(idlwave-define-abbrev "and" "and" (idlwave-keyword-abbrev 0 t) t) 1708(idlwave-define-abbrev "and" "and" (idlwave-keyword-abbrev 0 t) t)
@@ -1751,7 +1751,7 @@ idlwave-mode-abbrev-table unless TABLE is non-nil."
1751(defvar imenu-extract-index-name-function) 1751(defvar imenu-extract-index-name-function)
1752(defvar imenu-prev-index-position-function) 1752(defvar imenu-prev-index-position-function)
1753;; defined later - so just make the compiler hush 1753;; defined later - so just make the compiler hush
1754(defvar idlwave-mode-menu) 1754(defvar idlwave-mode-menu)
1755(defvar idlwave-mode-debug-menu) 1755(defvar idlwave-mode-debug-menu)
1756 1756
1757;;;###autoload 1757;;;###autoload
@@ -1836,7 +1836,7 @@ The main features of this mode are
1836 \\i IF statement template 1836 \\i IF statement template
1837 \\elif IF-ELSE statement template 1837 \\elif IF-ELSE statement template
1838 \\b BEGIN 1838 \\b BEGIN
1839 1839
1840 For a full list, use \\[idlwave-list-abbrevs]. Some templates also 1840 For a full list, use \\[idlwave-list-abbrevs]. Some templates also
1841 have direct keybindings - see the list of keybindings below. 1841 have direct keybindings - see the list of keybindings below.
1842 1842
@@ -1878,26 +1878,26 @@ The main features of this mode are
1878 1878
1879 (interactive) 1879 (interactive)
1880 (kill-all-local-variables) 1880 (kill-all-local-variables)
1881 1881
1882 (if idlwave-startup-message 1882 (if idlwave-startup-message
1883 (message "Emacs IDLWAVE mode version %s." idlwave-mode-version)) 1883 (message "Emacs IDLWAVE mode version %s." idlwave-mode-version))
1884 (setq idlwave-startup-message nil) 1884 (setq idlwave-startup-message nil)
1885 1885
1886 (setq local-abbrev-table idlwave-mode-abbrev-table) 1886 (setq local-abbrev-table idlwave-mode-abbrev-table)
1887 (set-syntax-table idlwave-mode-syntax-table) 1887 (set-syntax-table idlwave-mode-syntax-table)
1888 1888
1889 (set (make-local-variable 'indent-line-function) 'idlwave-indent-and-action) 1889 (set (make-local-variable 'indent-line-function) 'idlwave-indent-and-action)
1890 1890
1891 (make-local-variable idlwave-comment-indent-function) 1891 (make-local-variable idlwave-comment-indent-function)
1892 (set idlwave-comment-indent-function 'idlwave-comment-hook) 1892 (set idlwave-comment-indent-function 'idlwave-comment-hook)
1893 1893
1894 (set (make-local-variable 'comment-start-skip) ";+[ \t]*") 1894 (set (make-local-variable 'comment-start-skip) ";+[ \t]*")
1895 (set (make-local-variable 'comment-start) ";") 1895 (set (make-local-variable 'comment-start) ";")
1896 (set (make-local-variable 'require-final-newline) mode-require-final-newline) 1896 (set (make-local-variable 'require-final-newline) mode-require-final-newline)
1897 (set (make-local-variable 'abbrev-all-caps) t) 1897 (set (make-local-variable 'abbrev-all-caps) t)
1898 (set (make-local-variable 'indent-tabs-mode) nil) 1898 (set (make-local-variable 'indent-tabs-mode) nil)
1899 (set (make-local-variable 'completion-ignore-case) t) 1899 (set (make-local-variable 'completion-ignore-case) t)
1900 1900
1901 (use-local-map idlwave-mode-map) 1901 (use-local-map idlwave-mode-map)
1902 1902
1903 (when (featurep 'easymenu) 1903 (when (featurep 'easymenu)
@@ -1907,11 +1907,11 @@ The main features of this mode are
1907 (setq mode-name "IDLWAVE") 1907 (setq mode-name "IDLWAVE")
1908 (setq major-mode 'idlwave-mode) 1908 (setq major-mode 'idlwave-mode)
1909 (setq abbrev-mode t) 1909 (setq abbrev-mode t)
1910 1910
1911 (set (make-local-variable idlwave-fill-function) 'idlwave-auto-fill) 1911 (set (make-local-variable idlwave-fill-function) 'idlwave-auto-fill)
1912 (setq comment-end "") 1912 (setq comment-end "")
1913 (set (make-local-variable 'comment-multi-line) nil) 1913 (set (make-local-variable 'comment-multi-line) nil)
1914 (set (make-local-variable 'paragraph-separate) 1914 (set (make-local-variable 'paragraph-separate)
1915 "[ \t\f]*$\\|[ \t]*;+[ \t]*$\\|;+[+=-_*]+$") 1915 "[ \t\f]*$\\|[ \t]*;+[ \t]*$\\|;+[+=-_*]+$")
1916 (set (make-local-variable 'paragraph-start) "[ \t\f]\\|[ \t]*;+[ \t]") 1916 (set (make-local-variable 'paragraph-start) "[ \t\f]\\|[ \t]*;+[ \t]")
1917 (set (make-local-variable 'paragraph-ignore-fill-prefix) nil) 1917 (set (make-local-variable 'paragraph-ignore-fill-prefix) nil)
@@ -1920,7 +1920,7 @@ The main features of this mode are
1920 ;; Set tag table list to use IDLTAGS as file name. 1920 ;; Set tag table list to use IDLTAGS as file name.
1921 (if (boundp 'tag-table-alist) 1921 (if (boundp 'tag-table-alist)
1922 (add-to-list 'tag-table-alist '("\\.pro$" . "IDLTAGS"))) 1922 (add-to-list 'tag-table-alist '("\\.pro$" . "IDLTAGS")))
1923 1923
1924 ;; Font-lock additions - originally Phil Williams, then Ulrik Dickow 1924 ;; Font-lock additions - originally Phil Williams, then Ulrik Dickow
1925 ;; Following line is for Emacs - XEmacs uses the corresponding property 1925 ;; Following line is for Emacs - XEmacs uses the corresponding property
1926 ;; on the `idlwave-mode' symbol. 1926 ;; on the `idlwave-mode' symbol.
@@ -1961,18 +1961,18 @@ The main features of this mode are
1961 (unless idlwave-setup-done 1961 (unless idlwave-setup-done
1962 (if (not (file-directory-p idlwave-config-directory)) 1962 (if (not (file-directory-p idlwave-config-directory))
1963 (make-directory idlwave-config-directory)) 1963 (make-directory idlwave-config-directory))
1964 (setq idlwave-user-catalog-file (expand-file-name 1964 (setq idlwave-user-catalog-file (expand-file-name
1965 idlwave-user-catalog-file 1965 idlwave-user-catalog-file
1966 idlwave-config-directory) 1966 idlwave-config-directory)
1967 idlwave-path-file (expand-file-name 1967 idlwave-path-file (expand-file-name
1968 idlwave-path-file 1968 idlwave-path-file
1969 idlwave-config-directory)) 1969 idlwave-config-directory))
1970 (idlwave-read-paths) ; we may need these early 1970 (idlwave-read-paths) ; we may need these early
1971 (setq idlwave-setup-done t))) 1971 (setq idlwave-setup-done t)))
1972 1972
1973;; 1973;;
1974;; Code Formatting ---------------------------------------------------- 1974;; Code Formatting ----------------------------------------------------
1975;; 1975;;
1976 1976
1977(defun idlwave-push-mark (&rest rest) 1977(defun idlwave-push-mark (&rest rest)
1978 "Push mark for compatibility with Emacs 18/19." 1978 "Push mark for compatibility with Emacs 18/19."
@@ -2121,7 +2121,7 @@ Also checks if the correct end statement has been used."
2121 (if (> end-pos eol-pos) 2121 (if (> end-pos eol-pos)
2122 (setq end-pos pos)) 2122 (setq end-pos pos))
2123 (goto-char end-pos) 2123 (goto-char end-pos)
2124 (setq end (buffer-substring 2124 (setq end (buffer-substring
2125 (progn 2125 (progn
2126 (skip-chars-backward "a-zA-Z") 2126 (skip-chars-backward "a-zA-Z")
2127 (point)) 2127 (point))
@@ -2143,7 +2143,7 @@ Also checks if the correct end statement has been used."
2143 (sit-for 1)) 2143 (sit-for 1))
2144 (t 2144 (t
2145 (beep) 2145 (beep)
2146 (message "Warning: Shouldn't this be \"%s\" instead of \"%s\"?" 2146 (message "Warning: Shouldn't this be \"%s\" instead of \"%s\"?"
2147 end1 end) 2147 end1 end)
2148 (sit-for 1)))))))) 2148 (sit-for 1))))))))
2149 ;;(delete-char 1)) 2149 ;;(delete-char 1))
@@ -2155,8 +2155,8 @@ Also checks if the correct end statement has been used."
2155 ((looking-at "pro\\|case\\|switch\\|function\\>") 2155 ((looking-at "pro\\|case\\|switch\\|function\\>")
2156 (assoc (downcase (match-string 0)) idlwave-block-matches)) 2156 (assoc (downcase (match-string 0)) idlwave-block-matches))
2157 ((looking-at "begin\\>") 2157 ((looking-at "begin\\>")
2158 (let ((limit (save-excursion 2158 (let ((limit (save-excursion
2159 (idlwave-beginning-of-statement) 2159 (idlwave-beginning-of-statement)
2160 (point)))) 2160 (point))))
2161 (cond 2161 (cond
2162 ((re-search-backward ":[ \t]*\\=" limit t) 2162 ((re-search-backward ":[ \t]*\\=" limit t)
@@ -2184,9 +2184,9 @@ Also checks if the correct end statement has been used."
2184 (insert "end") 2184 (insert "end")
2185 (idlwave-show-begin))) 2185 (idlwave-show-begin)))
2186 2186
2187(defun idlwave-gtr-pad-hook (char) 2187(defun idlwave-gtr-pad-hook (char)
2188 "Let the > symbol expand around -> if present. The new token length 2188 "Let the > symbol expand around -> if present. The new token length
2189is returned." 2189is returned."
2190 2) 2190 2)
2191 2191
2192(defun idlwave-surround (&optional before after escape-chars length ec-hook) 2192(defun idlwave-surround (&optional before after escape-chars length ec-hook)
@@ -2216,8 +2216,8 @@ return value."
2216 (let* ((length (or length 1)) ; establish a default for LENGTH 2216 (let* ((length (or length 1)) ; establish a default for LENGTH
2217 (prev-char (char-after (- (point) (1+ length))))) 2217 (prev-char (char-after (- (point) (1+ length)))))
2218 (when (or (not (memq prev-char escape-chars)) 2218 (when (or (not (memq prev-char escape-chars))
2219 (and (fboundp ec-hook) 2219 (and (fboundp ec-hook)
2220 (setq length 2220 (setq length
2221 (save-excursion (funcall ec-hook prev-char))))) 2221 (save-excursion (funcall ec-hook prev-char)))))
2222 (backward-char length) 2222 (backward-char length)
2223 (save-restriction 2223 (save-restriction
@@ -2439,7 +2439,7 @@ Returns non-nil if successfull."
2439 (let ((eos (save-excursion 2439 (let ((eos (save-excursion
2440 (idlwave-block-jump-out -1 'nomark) 2440 (idlwave-block-jump-out -1 'nomark)
2441 (point)))) 2441 (point))))
2442 (if (setq status (idlwave-find-key 2442 (if (setq status (idlwave-find-key
2443 idlwave-end-block-reg -1 'nomark eos)) 2443 idlwave-end-block-reg -1 'nomark eos))
2444 (idlwave-beginning-of-statement) 2444 (idlwave-beginning-of-statement)
2445 (message "No nested block before beginning of containing block."))) 2445 (message "No nested block before beginning of containing block.")))
@@ -2447,7 +2447,7 @@ Returns non-nil if successfull."
2447 (let ((eos (save-excursion 2447 (let ((eos (save-excursion
2448 (idlwave-block-jump-out 1 'nomark) 2448 (idlwave-block-jump-out 1 'nomark)
2449 (point)))) 2449 (point))))
2450 (if (setq status (idlwave-find-key 2450 (if (setq status (idlwave-find-key
2451 idlwave-begin-block-reg 1 'nomark eos)) 2451 idlwave-begin-block-reg 1 'nomark eos))
2452 (idlwave-end-of-statement) 2452 (idlwave-end-of-statement)
2453 (message "No nested block before end of containing block.")))) 2453 (message "No nested block before end of containing block."))))
@@ -2461,7 +2461,7 @@ The marks are pushed."
2461 (here (point))) 2461 (here (point)))
2462 (goto-char (point-max)) 2462 (goto-char (point-max))
2463 (if (re-search-backward idlwave-doclib-start nil t) 2463 (if (re-search-backward idlwave-doclib-start nil t)
2464 (progn 2464 (progn
2465 (setq beg (progn (beginning-of-line) (point))) 2465 (setq beg (progn (beginning-of-line) (point)))
2466 (if (re-search-forward idlwave-doclib-end nil t) 2466 (if (re-search-forward idlwave-doclib-end nil t)
2467 (progn 2467 (progn
@@ -2495,7 +2495,7 @@ actual statement."
2495 ((eq major-mode 'idlwave-shell-mode) 2495 ((eq major-mode 'idlwave-shell-mode)
2496 (if (re-search-backward idlwave-shell-prompt-pattern nil t) 2496 (if (re-search-backward idlwave-shell-prompt-pattern nil t)
2497 (goto-char (match-end 0)))) 2497 (goto-char (match-end 0))))
2498 (t 2498 (t
2499 (if (save-excursion (forward-line -1) (idlwave-is-continuation-line)) 2499 (if (save-excursion (forward-line -1) (idlwave-is-continuation-line))
2500 (idlwave-previous-statement) 2500 (idlwave-previous-statement)
2501 (beginning-of-line))))) 2501 (beginning-of-line)))))
@@ -2572,7 +2572,7 @@ If not in a statement just moves to end of line. Returns position."
2572 (let ((save-point (point))) 2572 (let ((save-point (point)))
2573 (when (re-search-forward ".*&" lim t) 2573 (when (re-search-forward ".*&" lim t)
2574 (goto-char (match-end 0)) 2574 (goto-char (match-end 0))
2575 (if (idlwave-quoted) 2575 (if (idlwave-quoted)
2576 (goto-char save-point) 2576 (goto-char save-point)
2577 (if (eq (char-after (- (point) 2)) ?&) (goto-char save-point)))) 2577 (if (eq (char-after (- (point) 2)) ?&) (goto-char save-point))))
2578 (point))) 2578 (point)))
@@ -2589,7 +2589,7 @@ If there is no label point is not moved and nil is returned."
2589 ;; - not in parenthesis (like a[0:3]) 2589 ;; - not in parenthesis (like a[0:3])
2590 ;; - not followed by another ":" in explicit class, ala a->b::c 2590 ;; - not followed by another ":" in explicit class, ala a->b::c
2591 ;; As many in this mode, this function is heuristic and not an exact 2591 ;; As many in this mode, this function is heuristic and not an exact
2592 ;; parser. 2592 ;; parser.
2593 (let* ((start (point)) 2593 (let* ((start (point))
2594 (eos (save-excursion (idlwave-end-of-statement) (point))) 2594 (eos (save-excursion (idlwave-end-of-statement) (point)))
2595 (end (idlwave-find-key ":" 1 'nomark eos))) 2595 (end (idlwave-find-key ":" 1 'nomark eos)))
@@ -2666,7 +2666,7 @@ equal sign will be surrounded by BEFORE and AFTER blanks. If
2666`idlwave-pad-keyword' is t then keyword assignment is treated just 2666`idlwave-pad-keyword' is t then keyword assignment is treated just
2667like assignment statements. When nil, spaces are removed for keyword 2667like assignment statements. When nil, spaces are removed for keyword
2668assignment. Any other value keeps the current space around the `='. 2668assignment. Any other value keeps the current space around the `='.
2669Limits in for loops are treated as keyword assignment. 2669Limits in for loops are treated as keyword assignment.
2670 2670
2671Starting with IDL 6.0, a number of op= assignments are available. 2671Starting with IDL 6.0, a number of op= assignments are available.
2672Since ambiguities of the form: 2672Since ambiguities of the form:
@@ -2681,25 +2681,25 @@ operators, such as ##=, ^=, etc., will be pre-padded.
2681 2681
2682See `idlwave-surround'." 2682See `idlwave-surround'."
2683 (if idlwave-surround-by-blank 2683 (if idlwave-surround-by-blank
2684 (let 2684 (let
2685 ((non-an-ops "\\(##\\|\\*\\|\\+\\|-\\|/\\|<\\|>\\|\\^\\)\\=") 2685 ((non-an-ops "\\(##\\|\\*\\|\\+\\|-\\|/\\|<\\|>\\|\\^\\)\\=")
2686 (an-ops 2686 (an-ops
2687 "\\s-\\(AND\\|EQ\\|GE\\|GT\\|LE\\|LT\\|MOD\\|NE\\|OR\\|XOR\\)\\=") 2687 "\\s-\\(AND\\|EQ\\|GE\\|GT\\|LE\\|LT\\|MOD\\|NE\\|OR\\|XOR\\)\\=")
2688 (len 1)) 2688 (len 1))
2689 2689
2690 (save-excursion 2690 (save-excursion
2691 (let ((case-fold-search t)) 2691 (let ((case-fold-search t))
2692 (backward-char) 2692 (backward-char)
2693 (if (or 2693 (if (or
2694 (re-search-backward non-an-ops nil t) 2694 (re-search-backward non-an-ops nil t)
2695 ;; Why doesn't ##? work for both? 2695 ;; Why doesn't ##? work for both?
2696 (re-search-backward "\\(#\\)\\=" nil t)) 2696 (re-search-backward "\\(#\\)\\=" nil t))
2697 (setq len (1+ (length (match-string 1)))) 2697 (setq len (1+ (length (match-string 1))))
2698 (when (re-search-backward an-ops nil t) 2698 (when (re-search-backward an-ops nil t)
2699 (setq begin nil) ; won't modify begin 2699 (setq begin nil) ; won't modify begin
2700 (setq len (1+ (length (match-string 1)))))))) 2700 (setq len (1+ (length (match-string 1))))))))
2701 2701
2702 (if (eq t idlwave-pad-keyword) 2702 (if (eq t idlwave-pad-keyword)
2703 ;; Everything gets padded equally 2703 ;; Everything gets padded equally
2704 (idlwave-surround before after nil len) 2704 (idlwave-surround before after nil len)
2705 ;; Treating keywords/for variables specially... 2705 ;; Treating keywords/for variables specially...
@@ -2710,22 +2710,22 @@ See `idlwave-surround'."
2710 (skip-chars-backward "= \t") 2710 (skip-chars-backward "= \t")
2711 (nth 2 (idlwave-where))))) 2711 (nth 2 (idlwave-where)))))
2712 (cond ((or (memq what '(function-keyword procedure-keyword)) 2712 (cond ((or (memq what '(function-keyword procedure-keyword))
2713 (memq (caar st) '(for pdef))) 2713 (memq (caar st) '(for pdef)))
2714 (cond 2714 (cond
2715 ((null idlwave-pad-keyword) 2715 ((null idlwave-pad-keyword)
2716 (idlwave-surround 0 0) 2716 (idlwave-surround 0 0)
2717 ) ; remove space 2717 ) ; remove space
2718 (t))) ; leave any spaces alone 2718 (t))) ; leave any spaces alone
2719 (t (idlwave-surround before after nil len)))))))) 2719 (t (idlwave-surround before after nil len))))))))
2720 2720
2721 2721
2722(defun idlwave-indent-and-action (&optional arg) 2722(defun idlwave-indent-and-action (&optional arg)
2723 "Call `idlwave-indent-line' and do expand actions. 2723 "Call `idlwave-indent-line' and do expand actions.
2724With prefix ARG non-nil, indent the entire sub-statement." 2724With prefix ARG non-nil, indent the entire sub-statement."
2725 (interactive "p") 2725 (interactive "p")
2726 (save-excursion 2726 (save-excursion
2727 (if (and idlwave-expand-generic-end 2727 (if (and idlwave-expand-generic-end
2728 (re-search-backward "\\<\\(end\\)\\s-*\\=" 2728 (re-search-backward "\\<\\(end\\)\\s-*\\="
2729 (max 0 (- (point) 10)) t) 2729 (max 0 (- (point) 10)) t)
2730 (looking-at "\\(end\\)\\([ \n\t]\\|\\'\\)")) 2730 (looking-at "\\(end\\)\\([ \n\t]\\|\\'\\)"))
2731 (progn (goto-char (match-end 1)) 2731 (progn (goto-char (match-end 1))
@@ -2735,7 +2735,7 @@ With prefix ARG non-nil, indent the entire sub-statement."
2735 (when (and (not arg) current-prefix-arg) 2735 (when (and (not arg) current-prefix-arg)
2736 (setq arg current-prefix-arg) 2736 (setq arg current-prefix-arg)
2737 (setq current-prefix-arg nil)) 2737 (setq current-prefix-arg nil))
2738 (if arg 2738 (if arg
2739 (idlwave-indent-statement) 2739 (idlwave-indent-statement)
2740 (idlwave-indent-line t))) 2740 (idlwave-indent-line t)))
2741 2741
@@ -2868,7 +2868,7 @@ Inserts spaces before markers at point."
2868 (save-excursion 2868 (save-excursion
2869 (cond 2869 (cond
2870 ;; Beginning of file 2870 ;; Beginning of file
2871 ((prog1 2871 ((prog1
2872 (idlwave-previous-statement) 2872 (idlwave-previous-statement)
2873 (setq beg-prev-pos (point))) 2873 (setq beg-prev-pos (point)))
2874 0) 2874 0)
@@ -2878,7 +2878,7 @@ Inserts spaces before markers at point."
2878 idlwave-main-block-indent)) 2878 idlwave-main-block-indent))
2879 ;; Begin block 2879 ;; Begin block
2880 ((idlwave-look-at idlwave-begin-block-reg t) 2880 ((idlwave-look-at idlwave-begin-block-reg t)
2881 (+ (idlwave-min-current-statement-indent) 2881 (+ (idlwave-min-current-statement-indent)
2882 idlwave-block-indent)) 2882 idlwave-block-indent))
2883 ;; End Block 2883 ;; End Block
2884 ((idlwave-look-at idlwave-end-block-reg t) 2884 ((idlwave-look-at idlwave-end-block-reg t)
@@ -2889,7 +2889,7 @@ Inserts spaces before markers at point."
2889 (idlwave-min-current-statement-indent))) 2889 (idlwave-min-current-statement-indent)))
2890 ;; idlwave-end-offset 2890 ;; idlwave-end-offset
2891 ;; idlwave-block-indent)) 2891 ;; idlwave-block-indent))
2892 2892
2893 ;; Default to current indent 2893 ;; Default to current indent
2894 ((idlwave-current-statement-indent)))))) 2894 ((idlwave-current-statement-indent))))))
2895 ;; adjust the indentation based on the current statement 2895 ;; adjust the indentation based on the current statement
@@ -2905,7 +2905,7 @@ Inserts spaces before markers at point."
2905 2905
2906(defun idlwave-calculate-paren-indent (beg-reg end-reg close-exp) 2906(defun idlwave-calculate-paren-indent (beg-reg end-reg close-exp)
2907 "Calculate the continuation indent inside a paren group. 2907 "Calculate the continuation indent inside a paren group.
2908Returns a cons-cell with (open . indent), where open is the 2908Returns a cons-cell with (open . indent), where open is the
2909location of the open paren" 2909location of the open paren"
2910 (let ((open (nth 1 (parse-partial-sexp beg-reg end-reg)))) 2910 (let ((open (nth 1 (parse-partial-sexp beg-reg end-reg))))
2911 ;; Found an innermost open paren. 2911 ;; Found an innermost open paren.
@@ -2946,24 +2946,24 @@ groupings, are treated separately."
2946 (end-reg (progn (beginning-of-line) (point))) 2946 (end-reg (progn (beginning-of-line) (point)))
2947 (beg-last-statement (save-excursion (idlwave-previous-statement) 2947 (beg-last-statement (save-excursion (idlwave-previous-statement)
2948 (point))) 2948 (point)))
2949 (beg-reg (progn (idlwave-start-of-substatement 'pre) 2949 (beg-reg (progn (idlwave-start-of-substatement 'pre)
2950 (if (eq (line-beginning-position) end-reg) 2950 (if (eq (line-beginning-position) end-reg)
2951 (goto-char beg-last-statement) 2951 (goto-char beg-last-statement)
2952 (point)))) 2952 (point))))
2953 (basic-indent (+ (idlwave-min-current-statement-indent end-reg) 2953 (basic-indent (+ (idlwave-min-current-statement-indent end-reg)
2954 idlwave-continuation-indent)) 2954 idlwave-continuation-indent))
2955 fancy-nonparen-indent fancy-paren-indent) 2955 fancy-nonparen-indent fancy-paren-indent)
2956 (cond 2956 (cond
2957 ;; Align then with its matching if, etc. 2957 ;; Align then with its matching if, etc.
2958 ((let ((matchers '(("\\<if\\>" . "[ \t]*then") 2958 ((let ((matchers '(("\\<if\\>" . "[ \t]*then")
2959 ("\\<\\(if\\|end\\(if\\)?\\)\\>" . "[ \t]*else") 2959 ("\\<\\(if\\|end\\(if\\)?\\)\\>" . "[ \t]*else")
2960 ("\\<\\(for\\|while\\)\\>" . "[ \t]*do") 2960 ("\\<\\(for\\|while\\)\\>" . "[ \t]*do")
2961 ("\\<\\(repeat\\|end\\(rep\\)?\\)\\>" . 2961 ("\\<\\(repeat\\|end\\(rep\\)?\\)\\>" .
2962 "[ \t]*until") 2962 "[ \t]*until")
2963 ("\\<case\\>" . "[ \t]*of"))) 2963 ("\\<case\\>" . "[ \t]*of")))
2964 match cont-re) 2964 match cont-re)
2965 (goto-char end-reg) 2965 (goto-char end-reg)
2966 (and 2966 (and
2967 (setq cont-re 2967 (setq cont-re
2968 (catch 'exit 2968 (catch 'exit
2969 (while (setq match (car matchers)) 2969 (while (setq match (car matchers))
@@ -2972,7 +2972,7 @@ groupings, are treated separately."
2972 (setq matchers (cdr matchers))))) 2972 (setq matchers (cdr matchers)))))
2973 (idlwave-find-key cont-re -1 'nomark beg-last-statement))) 2973 (idlwave-find-key cont-re -1 'nomark beg-last-statement)))
2974 (if (looking-at "end") ;; that one's special 2974 (if (looking-at "end") ;; that one's special
2975 (- (idlwave-current-indent) 2975 (- (idlwave-current-indent)
2976 (+ idlwave-block-indent idlwave-end-offset)) 2976 (+ idlwave-block-indent idlwave-end-offset))
2977 (idlwave-current-indent))) 2977 (idlwave-current-indent)))
2978 2978
@@ -2998,7 +2998,7 @@ groupings, are treated separately."
2998 (let* ((end-reg end-reg) 2998 (let* ((end-reg end-reg)
2999 (close-exp (progn 2999 (close-exp (progn
3000 (goto-char end-reg) 3000 (goto-char end-reg)
3001 (skip-chars-forward " \t") 3001 (skip-chars-forward " \t")
3002 (looking-at "\\s)"))) 3002 (looking-at "\\s)")))
3003 indent-cons) 3003 indent-cons)
3004 (catch 'loop 3004 (catch 'loop
@@ -3032,12 +3032,12 @@ groupings, are treated separately."
3032 (if (save-match-data (looking-at "[ \t$]*\\(;.*\\)?$")) 3032 (if (save-match-data (looking-at "[ \t$]*\\(;.*\\)?$"))
3033 nil 3033 nil
3034 (current-column))) 3034 (current-column)))
3035 3035
3036 ;; Continued assignment (with =): 3036 ;; Continued assignment (with =):
3037 ((catch 'assign ; 3037 ((catch 'assign ;
3038 (while (looking-at "[^=\n\r]*\\(=\\)[ \t]*") 3038 (while (looking-at "[^=\n\r]*\\(=\\)[ \t]*")
3039 (goto-char (match-end 0)) 3039 (goto-char (match-end 0))
3040 (if (null (idlwave-what-function beg-reg)) 3040 (if (null (idlwave-what-function beg-reg))
3041 (throw 'assign t)))) 3041 (throw 'assign t))))
3042 (unless (or 3042 (unless (or
3043 (idlwave-in-quote) 3043 (idlwave-in-quote)
@@ -3099,7 +3099,7 @@ possibility of unbalanced blocks."
3099 (let* ((here (point)) 3099 (let* ((here (point))
3100 (case-fold-search t) 3100 (case-fold-search t)
3101 (limit (if (>= dir 0) (point-max) (point-min))) 3101 (limit (if (>= dir 0) (point-max) (point-min)))
3102 (block-limit (if (>= dir 0) 3102 (block-limit (if (>= dir 0)
3103 idlwave-begin-block-reg 3103 idlwave-begin-block-reg
3104 idlwave-end-block-reg)) 3104 idlwave-end-block-reg))
3105 found 3105 found
@@ -3110,7 +3110,7 @@ possibility of unbalanced blocks."
3110 (idlwave-find-key 3110 (idlwave-find-key
3111 idlwave-begin-unit-reg dir t limit) 3111 idlwave-begin-unit-reg dir t limit)
3112 (end-of-line) 3112 (end-of-line)
3113 (idlwave-find-key 3113 (idlwave-find-key
3114 idlwave-end-unit-reg dir t limit))) 3114 idlwave-end-unit-reg dir t limit)))
3115 limit))) 3115 limit)))
3116 (if (>= dir 0) (end-of-line)) ;Make sure we are in current block 3116 (if (>= dir 0) (end-of-line)) ;Make sure we are in current block
@@ -3135,7 +3135,7 @@ possibility of unbalanced blocks."
3135 (or (null end-reg) (< (point) end-reg))) 3135 (or (null end-reg) (< (point) end-reg)))
3136 (unless comm-or-empty (setq min (min min (idlwave-current-indent))))) 3136 (unless comm-or-empty (setq min (min min (idlwave-current-indent)))))
3137 (if (or comm-or-empty (and end-reg (>= (point) end-reg))) 3137 (if (or comm-or-empty (and end-reg (>= (point) end-reg)))
3138 min 3138 min
3139 (min min (idlwave-current-indent)))))) 3139 (min min (idlwave-current-indent))))))
3140 3140
3141(defun idlwave-current-statement-indent (&optional last-line) 3141(defun idlwave-current-statement-indent (&optional last-line)
@@ -3161,10 +3161,10 @@ Skips any whitespace. Returns 0 if the end-of-line follows the whitespace."
3161Blank or comment-only lines following regular continuation lines (with 3161Blank or comment-only lines following regular continuation lines (with
3162`$') count as continuations too." 3162`$') count as continuations too."
3163 (save-excursion 3163 (save-excursion
3164 (or 3164 (or
3165 (idlwave-look-at "\\<\\$") 3165 (idlwave-look-at "\\<\\$")
3166 (catch 'loop 3166 (catch 'loop
3167 (while (and (looking-at "^[ \t]*\\(;.*\\)?$") 3167 (while (and (looking-at "^[ \t]*\\(;.*\\)?$")
3168 (eq (forward-line -1) 0)) 3168 (eq (forward-line -1) 0))
3169 (if (idlwave-look-at "\\<\\$") (throw 'loop t))))))) 3169 (if (idlwave-look-at "\\<\\$") (throw 'loop t)))))))
3170 3170
@@ -3262,7 +3262,7 @@ ignored."
3262 (beginning-of-line) (point)) 3262 (beginning-of-line) (point))
3263 (point)))) 3263 (point))))
3264 "[^;]")) 3264 "[^;]"))
3265 3265
3266 ;; Mark the beginning and end of the paragraph 3266 ;; Mark the beginning and end of the paragraph
3267 (goto-char bcl) 3267 (goto-char bcl)
3268 (while (and (looking-at fill-prefix-reg) 3268 (while (and (looking-at fill-prefix-reg)
@@ -3326,7 +3326,7 @@ ignored."
3326 (insert (make-string diff ?\ )))) 3326 (insert (make-string diff ?\ ))))
3327 (forward-line -1)) 3327 (forward-line -1))
3328 ) 3328 )
3329 3329
3330 ;; No hang. Instead find minimum indentation of paragraph 3330 ;; No hang. Instead find minimum indentation of paragraph
3331 ;; after first line. 3331 ;; after first line.
3332 ;; For the following while statement, since START is at the 3332 ;; For the following while statement, since START is at the
@@ -3358,7 +3358,7 @@ ignored."
3358 t) 3358 t)
3359 (current-column)) 3359 (current-column))
3360 indent)) 3360 indent))
3361 3361
3362 ;; try to keep point at its original place 3362 ;; try to keep point at its original place
3363 (goto-char here) 3363 (goto-char here)
3364 3364
@@ -3407,7 +3407,7 @@ If not found returns nil."
3407 (current-column))))) 3407 (current-column)))))
3408 3408
3409(defun idlwave-auto-fill () 3409(defun idlwave-auto-fill ()
3410 "Called to break lines in auto fill mode. 3410 "Called to break lines in auto fill mode.
3411Only fills non-comment lines if `idlwave-fill-comment-line-only' is 3411Only fills non-comment lines if `idlwave-fill-comment-line-only' is
3412non-nil. Places a continuation character at the end of the line if 3412non-nil. Places a continuation character at the end of the line if
3413not in a comment. Splits strings with IDL concatenation operator `+' 3413not in a comment. Splits strings with IDL concatenation operator `+'
@@ -3558,7 +3558,7 @@ is non-nil."
3558 (insert (current-time-string)) 3558 (insert (current-time-string))
3559 (insert ", " (user-full-name)) 3559 (insert ", " (user-full-name))
3560 (if (boundp 'user-mail-address) 3560 (if (boundp 'user-mail-address)
3561 (insert " <" user-mail-address ">") 3561 (insert " <" user-mail-address ">")
3562 (insert " <" (user-login-name) "@" (system-name) ">")) 3562 (insert " <" (user-login-name) "@" (system-name) ">"))
3563 ;; Remove extra spaces from line 3563 ;; Remove extra spaces from line
3564 (idlwave-fill-paragraph) 3564 (idlwave-fill-paragraph)
@@ -3584,7 +3584,7 @@ location on mark ring so that the user can return to previous point."
3584 (setq end (match-end 0))) 3584 (setq end (match-end 0)))
3585 (progn 3585 (progn
3586 (goto-char beg) 3586 (goto-char beg)
3587 (if (re-search-forward 3587 (if (re-search-forward
3588 (concat idlwave-doc-modifications-keyword ":") 3588 (concat idlwave-doc-modifications-keyword ":")
3589 end t) 3589 end t)
3590 (end-of-line) 3590 (end-of-line)
@@ -3682,7 +3682,7 @@ constants - a double quote followed by an octal digit."
3682 (not (idlwave-in-quote)) 3682 (not (idlwave-in-quote))
3683 (save-excursion 3683 (save-excursion
3684 (forward-char) 3684 (forward-char)
3685 (re-search-backward (concat "\\(" idlwave-idl-keywords 3685 (re-search-backward (concat "\\(" idlwave-idl-keywords
3686 "\\|[[(*+-/=,^><]\\)\\s-*\\*") limit t))))) 3686 "\\|[[(*+-/=,^><]\\)\\s-*\\*") limit t)))))
3687 3687
3688 3688
@@ -3728,7 +3728,7 @@ unless the optional second argument NOINDENT is non-nil."
3728 (indent-region beg end nil)) 3728 (indent-region beg end nil))
3729 (if (stringp prompt) 3729 (if (stringp prompt)
3730 (message prompt))))) 3730 (message prompt)))))
3731 3731
3732(defun idlwave-rw-case (string) 3732(defun idlwave-rw-case (string)
3733 "Make STRING have the case required by `idlwave-reserved-word-upcase'." 3733 "Make STRING have the case required by `idlwave-reserved-word-upcase'."
3734 (if idlwave-reserved-word-upcase 3734 (if idlwave-reserved-word-upcase
@@ -3746,7 +3746,7 @@ unless the optional second argument NOINDENT is non-nil."
3746(defun idlwave-case () 3746(defun idlwave-case ()
3747 "Build skeleton IDL case statement." 3747 "Build skeleton IDL case statement."
3748 (interactive) 3748 (interactive)
3749 (idlwave-template 3749 (idlwave-template
3750 (idlwave-rw-case "case") 3750 (idlwave-rw-case "case")
3751 (idlwave-rw-case " of\n\nendcase") 3751 (idlwave-rw-case " of\n\nendcase")
3752 "Selector expression")) 3752 "Selector expression"))
@@ -3754,7 +3754,7 @@ unless the optional second argument NOINDENT is non-nil."
3754(defun idlwave-switch () 3754(defun idlwave-switch ()
3755 "Build skeleton IDL switch statement." 3755 "Build skeleton IDL switch statement."
3756 (interactive) 3756 (interactive)
3757 (idlwave-template 3757 (idlwave-template
3758 (idlwave-rw-case "switch") 3758 (idlwave-rw-case "switch")
3759 (idlwave-rw-case " of\n\nendswitch") 3759 (idlwave-rw-case " of\n\nendswitch")
3760 "Selector expression")) 3760 "Selector expression"))
@@ -3762,7 +3762,7 @@ unless the optional second argument NOINDENT is non-nil."
3762(defun idlwave-for () 3762(defun idlwave-for ()
3763 "Build skeleton for loop statment." 3763 "Build skeleton for loop statment."
3764 (interactive) 3764 (interactive)
3765 (idlwave-template 3765 (idlwave-template
3766 (idlwave-rw-case "for") 3766 (idlwave-rw-case "for")
3767 (idlwave-rw-case " do begin\n\nendfor") 3767 (idlwave-rw-case " do begin\n\nendfor")
3768 "Loop expression")) 3768 "Loop expression"))
@@ -3777,14 +3777,14 @@ unless the optional second argument NOINDENT is non-nil."
3777 3777
3778(defun idlwave-procedure () 3778(defun idlwave-procedure ()
3779 (interactive) 3779 (interactive)
3780 (idlwave-template 3780 (idlwave-template
3781 (idlwave-rw-case "pro") 3781 (idlwave-rw-case "pro")
3782 (idlwave-rw-case "\n\nreturn\nend") 3782 (idlwave-rw-case "\n\nreturn\nend")
3783 "Procedure name")) 3783 "Procedure name"))
3784 3784
3785(defun idlwave-function () 3785(defun idlwave-function ()
3786 (interactive) 3786 (interactive)
3787 (idlwave-template 3787 (idlwave-template
3788 (idlwave-rw-case "function") 3788 (idlwave-rw-case "function")
3789 (idlwave-rw-case "\n\nreturn\nend") 3789 (idlwave-rw-case "\n\nreturn\nend")
3790 "Function name")) 3790 "Function name"))
@@ -3798,7 +3798,7 @@ unless the optional second argument NOINDENT is non-nil."
3798 3798
3799(defun idlwave-while () 3799(defun idlwave-while ()
3800 (interactive) 3800 (interactive)
3801 (idlwave-template 3801 (idlwave-template
3802 (idlwave-rw-case "while") 3802 (idlwave-rw-case "while")
3803 (idlwave-rw-case " do begin\n\nendwhile") 3803 (idlwave-rw-case " do begin\n\nendwhile")
3804 "Entry condition")) 3804 "Entry condition"))
@@ -3877,8 +3877,8 @@ Buffer containing unsaved changes require confirmation before they are killed."
3877(defun idlwave-count-outlawed-buffers (tag) 3877(defun idlwave-count-outlawed-buffers (tag)
3878 "How many outlawed buffers have tag TAG?" 3878 "How many outlawed buffers have tag TAG?"
3879 (length (delq nil 3879 (length (delq nil
3880 (mapcar 3880 (mapcar
3881 (lambda (x) (eq (cdr x) tag)) 3881 (lambda (x) (eq (cdr x) tag))
3882 idlwave-outlawed-buffers)))) 3882 idlwave-outlawed-buffers))))
3883 3883
3884(defun idlwave-do-kill-autoloaded-buffers (&rest reasons) 3884(defun idlwave-do-kill-autoloaded-buffers (&rest reasons)
@@ -3892,9 +3892,9 @@ Buffer containing unsaved changes require confirmation before they are killed."
3892 (memq (cdr entry) reasons)) 3892 (memq (cdr entry) reasons))
3893 (kill-buffer (car entry)) 3893 (kill-buffer (car entry))
3894 (incf cnt) 3894 (incf cnt)
3895 (setq idlwave-outlawed-buffers 3895 (setq idlwave-outlawed-buffers
3896 (delq entry idlwave-outlawed-buffers))) 3896 (delq entry idlwave-outlawed-buffers)))
3897 (setq idlwave-outlawed-buffers 3897 (setq idlwave-outlawed-buffers
3898 (delq entry idlwave-outlawed-buffers)))) 3898 (delq entry idlwave-outlawed-buffers))))
3899 (message "%d buffer%s killed" cnt (if (= cnt 1) "" "s")))) 3899 (message "%d buffer%s killed" cnt (if (= cnt 1) "" "s"))))
3900 3900
@@ -3906,7 +3906,7 @@ Intended for `after-save-hook'."
3906 (entry (assq buf idlwave-outlawed-buffers))) 3906 (entry (assq buf idlwave-outlawed-buffers)))
3907 ;; Revoke license 3907 ;; Revoke license
3908 (if entry 3908 (if entry
3909 (setq idlwave-outlawed-buffers 3909 (setq idlwave-outlawed-buffers
3910 (delq entry idlwave-outlawed-buffers))) 3910 (delq entry idlwave-outlawed-buffers)))
3911 ;; Remove this function from the hook. 3911 ;; Remove this function from the hook.
3912 (remove-hook 'after-save-hook 'idlwave-revoke-license-to-kill 'local))) 3912 (remove-hook 'after-save-hook 'idlwave-revoke-license-to-kill 'local)))
@@ -3925,7 +3925,7 @@ Intended for `after-save-hook'."
3925(defun idlwave-expand-lib-file-name (file) 3925(defun idlwave-expand-lib-file-name (file)
3926 ;; Find FILE on the scanned lib path and return a buffer visiting it 3926 ;; Find FILE on the scanned lib path and return a buffer visiting it
3927 ;; This is for, e.g., finding source with no user catalog 3927 ;; This is for, e.g., finding source with no user catalog
3928 (cond 3928 (cond
3929 ((null file) nil) 3929 ((null file) nil)
3930 ((file-name-absolute-p file) file) 3930 ((file-name-absolute-p file) file)
3931 (t (idlwave-locate-lib-file file)))) 3931 (t (idlwave-locate-lib-file file))))
@@ -3940,7 +3940,7 @@ you specify /."
3940 (interactive) 3940 (interactive)
3941 (let (directory directories cmd append status numdirs dir getsubdirs 3941 (let (directory directories cmd append status numdirs dir getsubdirs
3942 buffer save_buffer files numfiles item errbuf) 3942 buffer save_buffer files numfiles item errbuf)
3943 3943
3944 ;; 3944 ;;
3945 ;; Read list of directories 3945 ;; Read list of directories
3946 (setq directory (read-string "Tag Directories: " ".")) 3946 (setq directory (read-string "Tag Directories: " "."))
@@ -3992,7 +3992,7 @@ you specify /."
3992 (message (concat "Tagging " item "...")) 3992 (message (concat "Tagging " item "..."))
3993 (setq errbuf (get-buffer-create "*idltags-error*")) 3993 (setq errbuf (get-buffer-create "*idltags-error*"))
3994 (setq status (+ status 3994 (setq status (+ status
3995 (if (eq 0 (call-process 3995 (if (eq 0 (call-process
3996 "sh" nil errbuf nil "-c" 3996 "sh" nil errbuf nil "-c"
3997 (concat cmd append item))) 3997 (concat cmd append item)))
3998 0 3998 0
@@ -4006,13 +4006,13 @@ you specify /."
4006 (setq numfiles (1+ numfiles)) 4006 (setq numfiles (1+ numfiles))
4007 (setq item (nth numfiles files)) 4007 (setq item (nth numfiles files))
4008 ))) 4008 )))
4009 4009
4010 (setq numdirs (1+ numdirs)) 4010 (setq numdirs (1+ numdirs))
4011 (setq dir (nth numdirs directories))) 4011 (setq dir (nth numdirs directories)))
4012 (progn 4012 (progn
4013 (setq numdirs (1+ numdirs)) 4013 (setq numdirs (1+ numdirs))
4014 (setq dir (nth numdirs directories))))) 4014 (setq dir (nth numdirs directories)))))
4015 4015
4016 (setq errbuf (get-buffer-create "*idltags-error*")) 4016 (setq errbuf (get-buffer-create "*idltags-error*"))
4017 (if (= status 0) 4017 (if (= status 0)
4018 (kill-buffer errbuf)) 4018 (kill-buffer errbuf))
@@ -4088,7 +4088,7 @@ blank lines."
4088 ;; Make sure the hash functions are accessible. 4088 ;; Make sure the hash functions are accessible.
4089 (if (or (not (fboundp 'gethash)) 4089 (if (or (not (fboundp 'gethash))
4090 (not (fboundp 'puthash))) 4090 (not (fboundp 'puthash)))
4091 (progn 4091 (progn
4092 (require 'cl) 4092 (require 'cl)
4093 (or (fboundp 'puthash) 4093 (or (fboundp 'puthash)
4094 (defalias 'puthash 'cl-puthash)))) 4094 (defalias 'puthash 'cl-puthash))))
@@ -4107,7 +4107,7 @@ blank lines."
4107 ;; Reset the system & library hash 4107 ;; Reset the system & library hash
4108 (loop for entry in entries 4108 (loop for entry in entries
4109 for var = (car entry) for size = (nth 1 entry) 4109 for var = (car entry) for size = (nth 1 entry)
4110 do (setcdr (symbol-value var) 4110 do (setcdr (symbol-value var)
4111 (make-hash-table ':size size ':test 'equal))) 4111 (make-hash-table ':size size ':test 'equal)))
4112 (setq idlwave-sint-dirs nil 4112 (setq idlwave-sint-dirs nil
4113 idlwave-sint-libnames nil)) 4113 idlwave-sint-libnames nil))
@@ -4117,7 +4117,7 @@ blank lines."
4117 ;; Reset the buffer & shell hash 4117 ;; Reset the buffer & shell hash
4118 (loop for entry in entries 4118 (loop for entry in entries
4119 for var = (car entry) for size = (nth 1 entry) 4119 for var = (car entry) for size = (nth 1 entry)
4120 do (setcar (symbol-value var) 4120 do (setcar (symbol-value var)
4121 (make-hash-table ':size size ':test 'equal)))))) 4121 (make-hash-table ':size size ':test 'equal))))))
4122 4122
4123(defun idlwave-sintern-routine-or-method (name &optional class set) 4123(defun idlwave-sintern-routine-or-method (name &optional class set)
@@ -4204,11 +4204,11 @@ If DEFAULT-DIR is passed, it is used as the base of the directory"
4204 (setq class (idlwave-sintern-class class set)) 4204 (setq class (idlwave-sintern-class class set))
4205 (setq name (idlwave-sintern-method name set))) 4205 (setq name (idlwave-sintern-method name set)))
4206 (setq name (idlwave-sintern-routine name set))) 4206 (setq name (idlwave-sintern-routine name set)))
4207 4207
4208 ;; The source 4208 ;; The source
4209 (let ((source-type (car source)) 4209 (let ((source-type (car source))
4210 (source-file (nth 1 source)) 4210 (source-file (nth 1 source))
4211 (source-dir (if default-dir 4211 (source-dir (if default-dir
4212 (file-name-as-directory default-dir) 4212 (file-name-as-directory default-dir)
4213 (nth 2 source))) 4213 (nth 2 source)))
4214 (source-lib (nth 3 source))) 4214 (source-lib (nth 3 source)))
@@ -4217,7 +4217,7 @@ If DEFAULT-DIR is passed, it is used as the base of the directory"
4217 (if (stringp source-lib) 4217 (if (stringp source-lib)
4218 (setq source-lib (idlwave-sintern-libname source-lib set))) 4218 (setq source-lib (idlwave-sintern-libname source-lib set)))
4219 (setq source (list source-type source-file source-dir source-lib))) 4219 (setq source (list source-type source-file source-dir source-lib)))
4220 4220
4221 ;; The keywords 4221 ;; The keywords
4222 (setq kwds (mapcar (lambda (x) 4222 (setq kwds (mapcar (lambda (x)
4223 (idlwave-sintern-keyword-list x set)) 4223 (idlwave-sintern-keyword-list x set))
@@ -4355,10 +4355,10 @@ will re-read the catalog."
4355 "-l" (expand-file-name "~/.emacs") 4355 "-l" (expand-file-name "~/.emacs")
4356 "-l" "idlwave" 4356 "-l" "idlwave"
4357 "-f" "idlwave-rescan-catalog-directories")) 4357 "-f" "idlwave-rescan-catalog-directories"))
4358 (process (apply 'start-process "idlcat" 4358 (process (apply 'start-process "idlcat"
4359 nil emacs args))) 4359 nil emacs args)))
4360 (setq idlwave-catalog-process process) 4360 (setq idlwave-catalog-process process)
4361 (set-process-sentinel 4361 (set-process-sentinel
4362 process 4362 process
4363 (lambda (pro why) 4363 (lambda (pro why)
4364 (when (string-match "finished" why) 4364 (when (string-match "finished" why)
@@ -4431,7 +4431,7 @@ information updated immediately, leave NO-CONCATENATE nil."
4431 ;; The override-idle means, even if the idle timer has done some 4431 ;; The override-idle means, even if the idle timer has done some
4432 ;; preparing work, load and renormalize everything anyway. 4432 ;; preparing work, load and renormalize everything anyway.
4433 (override-idle (or arg idlwave-buffer-case-takes-precedence))) 4433 (override-idle (or arg idlwave-buffer-case-takes-precedence)))
4434 4434
4435 (setq idlwave-buffer-routines nil 4435 (setq idlwave-buffer-routines nil
4436 idlwave-compiled-routines nil 4436 idlwave-compiled-routines nil
4437 idlwave-unresolved-routines nil) 4437 idlwave-unresolved-routines nil)
@@ -4442,7 +4442,7 @@ information updated immediately, leave NO-CONCATENATE nil."
4442 (idlwave-reset-sintern (cond (load t) 4442 (idlwave-reset-sintern (cond (load t)
4443 ((null idlwave-system-routines) t) 4443 ((null idlwave-system-routines) t)
4444 (t 'bufsh)))) 4444 (t 'bufsh))))
4445 4445
4446 (if idlwave-buffer-case-takes-precedence 4446 (if idlwave-buffer-case-takes-precedence
4447 ;; We can safely scan the buffer stuff first 4447 ;; We can safely scan the buffer stuff first
4448 (progn 4448 (progn
@@ -4457,9 +4457,9 @@ information updated immediately, leave NO-CONCATENATE nil."
4457 (idlwave-shell-is-running))) 4457 (idlwave-shell-is-running)))
4458 (ask-shell (and shell-is-running 4458 (ask-shell (and shell-is-running
4459 idlwave-query-shell-for-routine-info))) 4459 idlwave-query-shell-for-routine-info)))
4460 4460
4461 ;; Load the library catalogs again, first re-scanning the path 4461 ;; Load the library catalogs again, first re-scanning the path
4462 (when arg 4462 (when arg
4463 (if shell-is-running 4463 (if shell-is-running
4464 (idlwave-shell-send-command idlwave-shell-path-query 4464 (idlwave-shell-send-command idlwave-shell-path-query
4465 '(progn 4465 '(progn
@@ -4479,7 +4479,7 @@ information updated immediately, leave NO-CONCATENATE nil."
4479 ;; Therefore, we do a concatenation now, even though 4479 ;; Therefore, we do a concatenation now, even though
4480 ;; the shell might do it again. 4480 ;; the shell might do it again.
4481 (idlwave-concatenate-rinfo-lists nil 'run-hooks)) 4481 (idlwave-concatenate-rinfo-lists nil 'run-hooks))
4482 4482
4483 (when ask-shell 4483 (when ask-shell
4484 ;; Ask the shell about the routines it knows of. 4484 ;; Ask the shell about the routines it knows of.
4485 (message "Querying the shell") 4485 (message "Querying the shell")
@@ -4541,7 +4541,7 @@ information updated immediately, leave NO-CONCATENATE nil."
4541 (progn 4541 (progn
4542 (setq idlwave-library-routines nil) 4542 (setq idlwave-library-routines nil)
4543 (ding) 4543 (ding)
4544 (message "Outdated user catalog: %s... recreate" 4544 (message "Outdated user catalog: %s... recreate"
4545 idlwave-user-catalog-file)) 4545 idlwave-user-catalog-file))
4546 (message "Loading user catalog in idle time...done")) 4546 (message "Loading user catalog in idle time...done"))
4547 (aset arr 2 t) 4547 (aset arr 2 t)
@@ -4549,15 +4549,15 @@ information updated immediately, leave NO-CONCATENATE nil."
4549 (when (not (aref arr 3)) 4549 (when (not (aref arr 3))
4550 (when idlwave-user-catalog-routines 4550 (when idlwave-user-catalog-routines
4551 (message "Normalizing user catalog routines in idle time...") 4551 (message "Normalizing user catalog routines in idle time...")
4552 (setq idlwave-user-catalog-routines 4552 (setq idlwave-user-catalog-routines
4553 (idlwave-sintern-rinfo-list 4553 (idlwave-sintern-rinfo-list
4554 idlwave-user-catalog-routines 'sys)) 4554 idlwave-user-catalog-routines 'sys))
4555 (message 4555 (message
4556 "Normalizing user catalog routines in idle time...done")) 4556 "Normalizing user catalog routines in idle time...done"))
4557 (aset arr 3 t) 4557 (aset arr 3 t)
4558 (throw 'exit t)) 4558 (throw 'exit t))
4559 (when (not (aref arr 4)) 4559 (when (not (aref arr 4))
4560 (idlwave-scan-library-catalogs 4560 (idlwave-scan-library-catalogs
4561 "Loading and normalizing library catalogs in idle time...") 4561 "Loading and normalizing library catalogs in idle time...")
4562 (aset arr 4 t) 4562 (aset arr 4 t)
4563 (throw 'exit t)) 4563 (throw 'exit t))
@@ -4598,8 +4598,8 @@ information updated immediately, leave NO-CONCATENATE nil."
4598 (setq idlwave-true-path-alist nil) 4598 (setq idlwave-true-path-alist nil)
4599 (when (or force (not (aref idlwave-load-rinfo-steps-done 3))) 4599 (when (or force (not (aref idlwave-load-rinfo-steps-done 3)))
4600 (message "Normalizing user catalog routines...") 4600 (message "Normalizing user catalog routines...")
4601 (setq idlwave-user-catalog-routines 4601 (setq idlwave-user-catalog-routines
4602 (idlwave-sintern-rinfo-list 4602 (idlwave-sintern-rinfo-list
4603 idlwave-user-catalog-routines 'sys)) 4603 idlwave-user-catalog-routines 'sys))
4604 (message "Normalizing user catalog routines...done"))) 4604 (message "Normalizing user catalog routines...done")))
4605 (when (or force (not (aref idlwave-load-rinfo-steps-done 4))) 4605 (when (or force (not (aref idlwave-load-rinfo-steps-done 4)))
@@ -4610,11 +4610,11 @@ information updated immediately, leave NO-CONCATENATE nil."
4610 4610
4611(defun idlwave-update-buffer-routine-info () 4611(defun idlwave-update-buffer-routine-info ()
4612 (let (res) 4612 (let (res)
4613 (cond 4613 (cond
4614 ((eq idlwave-scan-all-buffers-for-routine-info t) 4614 ((eq idlwave-scan-all-buffers-for-routine-info t)
4615 ;; Scan all buffers, current buffer last 4615 ;; Scan all buffers, current buffer last
4616 (message "Scanning all buffers...") 4616 (message "Scanning all buffers...")
4617 (setq res (idlwave-get-routine-info-from-buffers 4617 (setq res (idlwave-get-routine-info-from-buffers
4618 (reverse (buffer-list))))) 4618 (reverse (buffer-list)))))
4619 ((null idlwave-scan-all-buffers-for-routine-info) 4619 ((null idlwave-scan-all-buffers-for-routine-info)
4620 ;; Don't scan any buffers 4620 ;; Don't scan any buffers
@@ -4627,12 +4627,12 @@ information updated immediately, leave NO-CONCATENATE nil."
4627 (setq res (idlwave-get-routine-info-from-buffers 4627 (setq res (idlwave-get-routine-info-from-buffers
4628 (list (current-buffer)))))))) 4628 (list (current-buffer))))))))
4629 ;; Put the result into the correct variable 4629 ;; Put the result into the correct variable
4630 (setq idlwave-buffer-routines 4630 (setq idlwave-buffer-routines
4631 (idlwave-sintern-rinfo-list res 'set)))) 4631 (idlwave-sintern-rinfo-list res 'set))))
4632 4632
4633(defun idlwave-concatenate-rinfo-lists (&optional quiet run-hook) 4633(defun idlwave-concatenate-rinfo-lists (&optional quiet run-hook)
4634 "Put the different sources for routine information together." 4634 "Put the different sources for routine information together."
4635 ;; The sequence here is important because earlier definitions shadow 4635 ;; The sequence here is important because earlier definitions shadow
4636 ;; later ones. We assume that if things in the buffers are newer 4636 ;; later ones. We assume that if things in the buffers are newer
4637 ;; then in the shell of the system, they are meant to be different. 4637 ;; then in the shell of the system, they are meant to be different.
4638 (setcdr idlwave-last-system-routine-info-cons-cell 4638 (setcdr idlwave-last-system-routine-info-cons-cell
@@ -4644,7 +4644,7 @@ information updated immediately, leave NO-CONCATENATE nil."
4644 4644
4645 ;; Give a message with information about the number of routines we have. 4645 ;; Give a message with information about the number of routines we have.
4646 (unless quiet 4646 (unless quiet
4647 (message 4647 (message
4648 "Routines Found: buffer(%d) compiled(%d) library(%d) user(%d) system(%d)" 4648 "Routines Found: buffer(%d) compiled(%d) library(%d) user(%d) system(%d)"
4649 (length idlwave-buffer-routines) 4649 (length idlwave-buffer-routines)
4650 (length idlwave-compiled-routines) 4650 (length idlwave-compiled-routines)
@@ -4662,7 +4662,7 @@ information updated immediately, leave NO-CONCATENATE nil."
4662 (when (and (setq class (nth 2 x)) 4662 (when (and (setq class (nth 2 x))
4663 (not (assq class idlwave-class-alist))) 4663 (not (assq class idlwave-class-alist)))
4664 (push (list class) idlwave-class-alist))) 4664 (push (list class) idlwave-class-alist)))
4665 idlwave-class-alist))) 4665 idlwave-class-alist)))
4666 4666
4667;; Three functions for the hooks 4667;; Three functions for the hooks
4668(defun idlwave-save-buffer-update () 4668(defun idlwave-save-buffer-update ()
@@ -4695,7 +4695,7 @@ information updated immediately, leave NO-CONCATENATE nil."
4695 4695
4696(defun idlwave-replace-buffer-routine-info (file new) 4696(defun idlwave-replace-buffer-routine-info (file new)
4697 "Cut the part from FILE out of `idlwave-buffer-routines' and add NEW." 4697 "Cut the part from FILE out of `idlwave-buffer-routines' and add NEW."
4698 (let ((list idlwave-buffer-routines) 4698 (let ((list idlwave-buffer-routines)
4699 found) 4699 found)
4700 (while list 4700 (while list
4701 ;; The following test uses eq to make sure it works correctly 4701 ;; The following test uses eq to make sure it works correctly
@@ -4706,7 +4706,7 @@ information updated immediately, leave NO-CONCATENATE nil."
4706 (setcar list nil) 4706 (setcar list nil)
4707 (setq found t)) 4707 (setq found t))
4708 (if found 4708 (if found
4709 ;; End of that section reached. Jump. 4709 ;; End of that section reached. Jump.
4710 (setq list nil))) 4710 (setq list nil)))
4711 (setq list (cdr list))) 4711 (setq list (cdr list)))
4712 (setq idlwave-buffer-routines 4712 (setq idlwave-buffer-routines
@@ -4738,11 +4738,11 @@ information updated immediately, leave NO-CONCATENATE nil."
4738 (save-restriction 4738 (save-restriction
4739 (widen) 4739 (widen)
4740 (goto-char (point-min)) 4740 (goto-char (point-min))
4741 (while (re-search-forward 4741 (while (re-search-forward
4742 "^[ \t]*\\(pro\\|function\\)[ \t]" nil t) 4742 "^[ \t]*\\(pro\\|function\\)[ \t]" nil t)
4743 (setq string (buffer-substring-no-properties 4743 (setq string (buffer-substring-no-properties
4744 (match-beginning 0) 4744 (match-beginning 0)
4745 (progn 4745 (progn
4746 (idlwave-end-of-statement) 4746 (idlwave-end-of-statement)
4747 (point)))) 4747 (point))))
4748 (setq entry (idlwave-parse-definition string)) 4748 (setq entry (idlwave-parse-definition string))
@@ -4780,7 +4780,7 @@ information updated immediately, leave NO-CONCATENATE nil."
4780 (push (match-string 1 string) args))) 4780 (push (match-string 1 string) args)))
4781 ;; Normalize and sort. 4781 ;; Normalize and sort.
4782 (setq args (nreverse args)) 4782 (setq args (nreverse args))
4783 (setq keywords (sort keywords (lambda (a b) 4783 (setq keywords (sort keywords (lambda (a b)
4784 (string< (downcase a) (downcase b))))) 4784 (string< (downcase a) (downcase b)))))
4785 ;; Make and return the entry 4785 ;; Make and return the entry
4786 ;; We don't know which argument are optional, so this information 4786 ;; We don't know which argument are optional, so this information
@@ -4790,7 +4790,7 @@ information updated immediately, leave NO-CONCATENATE nil."
4790 class 4790 class
4791 (cond ((not (boundp 'idlwave-scanning-lib)) 4791 (cond ((not (boundp 'idlwave-scanning-lib))
4792 (list 'buffer (buffer-file-name))) 4792 (list 'buffer (buffer-file-name)))
4793; ((string= (downcase 4793; ((string= (downcase
4794; (file-name-sans-extension 4794; (file-name-sans-extension
4795; (file-name-nondirectory (buffer-file-name)))) 4795; (file-name-nondirectory (buffer-file-name))))
4796; (downcase name)) 4796; (downcase name))
@@ -4798,7 +4798,7 @@ information updated immediately, leave NO-CONCATENATE nil."
4798; (t (cons 'lib (file-name-nondirectory (buffer-file-name)))) 4798; (t (cons 'lib (file-name-nondirectory (buffer-file-name))))
4799 (t (list 'user (file-name-nondirectory (buffer-file-name)) 4799 (t (list 'user (file-name-nondirectory (buffer-file-name))
4800 idlwave-scanning-lib-dir "UserLib"))) 4800 idlwave-scanning-lib-dir "UserLib")))
4801 (concat 4801 (concat
4802 (if (string= type "function") "Result = " "") 4802 (if (string= type "function") "Result = " "")
4803 (if class "Obj ->[%s::]" "") 4803 (if class "Obj ->[%s::]" "")
4804 "%s" 4804 "%s"
@@ -4842,10 +4842,10 @@ time - so no widget will pop up."
4842 (> (length idlwave-user-catalog-file) 0) 4842 (> (length idlwave-user-catalog-file) 0)
4843 (file-accessible-directory-p 4843 (file-accessible-directory-p
4844 (file-name-directory idlwave-user-catalog-file)) 4844 (file-name-directory idlwave-user-catalog-file))
4845 (not (string= "" (file-name-nondirectory 4845 (not (string= "" (file-name-nondirectory
4846 idlwave-user-catalog-file)))) 4846 idlwave-user-catalog-file))))
4847 (error "`idlwave-user-catalog-file' does not point to a file in an accessible directory")) 4847 (error "`idlwave-user-catalog-file' does not point to a file in an accessible directory"))
4848 4848
4849 (cond 4849 (cond
4850 ;; Rescan the known directories 4850 ;; Rescan the known directories
4851 ((and arg idlwave-path-alist 4851 ((and arg idlwave-path-alist
@@ -4855,13 +4855,13 @@ time - so no widget will pop up."
4855 ;; Expand the directories from library-path and run the widget 4855 ;; Expand the directories from library-path and run the widget
4856 (idlwave-library-path 4856 (idlwave-library-path
4857 (idlwave-display-user-catalog-widget 4857 (idlwave-display-user-catalog-widget
4858 (if idlwave-true-path-alist 4858 (if idlwave-true-path-alist
4859 ;; Propagate any flags on the existing path-alist 4859 ;; Propagate any flags on the existing path-alist
4860 (mapcar (lambda (x) 4860 (mapcar (lambda (x)
4861 (let ((path-entry (assoc (file-truename x) 4861 (let ((path-entry (assoc (file-truename x)
4862 idlwave-true-path-alist))) 4862 idlwave-true-path-alist)))
4863 (if path-entry 4863 (if path-entry
4864 (cons x (cdr path-entry)) 4864 (cons x (cdr path-entry))
4865 (list x)))) 4865 (list x))))
4866 (idlwave-expand-path idlwave-library-path)) 4866 (idlwave-expand-path idlwave-library-path))
4867 (mapcar 'list (idlwave-expand-path idlwave-library-path))))) 4867 (mapcar 'list (idlwave-expand-path idlwave-library-path)))))
@@ -4886,7 +4886,7 @@ time - so no widget will pop up."
4886 (idlwave-scan-library-catalogs "Locating library catalogs..." 'no-load) 4886 (idlwave-scan-library-catalogs "Locating library catalogs..." 'no-load)
4887 (idlwave-display-user-catalog-widget idlwave-path-alist))) 4887 (idlwave-display-user-catalog-widget idlwave-path-alist)))
4888 4888
4889(defconst idlwave-user-catalog-widget-help-string 4889(defconst idlwave-user-catalog-widget-help-string
4890 "This is the front-end to the creation of the IDLWAVE user catalog. 4890 "This is the front-end to the creation of the IDLWAVE user catalog.
4891Please select the directories on IDL's search path from which you 4891Please select the directories on IDL's search path from which you
4892would like to extract routine information, to be stored in the file: 4892would like to extract routine information, to be stored in the file:
@@ -4921,7 +4921,7 @@ directories and save the routine info.
4921 (make-local-variable 'idlwave-widget) 4921 (make-local-variable 'idlwave-widget)
4922 (widget-insert (format idlwave-user-catalog-widget-help-string 4922 (widget-insert (format idlwave-user-catalog-widget-help-string
4923 idlwave-user-catalog-file)) 4923 idlwave-user-catalog-file))
4924 4924
4925 (widget-create 'push-button 4925 (widget-create 'push-button
4926 :notify 'idlwave-widget-scan-user-lib-files 4926 :notify 'idlwave-widget-scan-user-lib-files
4927 "Scan & Save") 4927 "Scan & Save")
@@ -4931,7 +4931,7 @@ directories and save the routine info.
4931 "Delete File") 4931 "Delete File")
4932 (widget-insert " ") 4932 (widget-insert " ")
4933 (widget-create 'push-button 4933 (widget-create 'push-button
4934 :notify 4934 :notify
4935 '(lambda (&rest ignore) 4935 '(lambda (&rest ignore)
4936 (let ((path-list (widget-get idlwave-widget :path-dirs))) 4936 (let ((path-list (widget-get idlwave-widget :path-dirs)))
4937 (mapcar (lambda (x) 4937 (mapcar (lambda (x)
@@ -4942,7 +4942,7 @@ directories and save the routine info.
4942 "Select All Non-Lib") 4942 "Select All Non-Lib")
4943 (widget-insert " ") 4943 (widget-insert " ")
4944 (widget-create 'push-button 4944 (widget-create 'push-button
4945 :notify 4945 :notify
4946 '(lambda (&rest ignore) 4946 '(lambda (&rest ignore)
4947 (let ((path-list (widget-get idlwave-widget :path-dirs))) 4947 (let ((path-list (widget-get idlwave-widget :path-dirs)))
4948 (mapcar (lambda (x) 4948 (mapcar (lambda (x)
@@ -4958,18 +4958,18 @@ directories and save the routine info.
4958 (widget-insert "\n\n") 4958 (widget-insert "\n\n")
4959 4959
4960 (widget-insert "Select Directories: \n") 4960 (widget-insert "Select Directories: \n")
4961 4961
4962 (setq idlwave-widget 4962 (setq idlwave-widget
4963 (apply 'widget-create 4963 (apply 'widget-create
4964 'checklist 4964 'checklist
4965 :value (delq nil (mapcar (lambda (x) 4965 :value (delq nil (mapcar (lambda (x)
4966 (if (memq 'user (cdr x)) 4966 (if (memq 'user (cdr x))
4967 (car x))) 4967 (car x)))
4968 dirs-list)) 4968 dirs-list))
4969 :greedy t 4969 :greedy t
4970 :tag "List of directories" 4970 :tag "List of directories"
4971 (mapcar (lambda (x) 4971 (mapcar (lambda (x)
4972 (list 'item 4972 (list 'item
4973 (if (memq 'lib (cdr x)) 4973 (if (memq 'lib (cdr x))
4974 (concat "[LIB] " (car x) ) 4974 (concat "[LIB] " (car x) )
4975 (car x)))) dirs-list))) 4975 (car x)))) dirs-list)))
@@ -4979,7 +4979,7 @@ directories and save the routine info.
4979 (widget-setup) 4979 (widget-setup)
4980 (goto-char (point-min)) 4980 (goto-char (point-min))
4981 (delete-other-windows)) 4981 (delete-other-windows))
4982 4982
4983(defun idlwave-delete-user-catalog-file (&rest ignore) 4983(defun idlwave-delete-user-catalog-file (&rest ignore)
4984 (if (yes-or-no-p 4984 (if (yes-or-no-p
4985 (format "Delete file %s " idlwave-user-catalog-file)) 4985 (format "Delete file %s " idlwave-user-catalog-file))
@@ -4995,7 +4995,7 @@ directories and save the routine info.
4995 (this-path-alist path-alist) 4995 (this-path-alist path-alist)
4996 dir-entry) 4996 dir-entry)
4997 (while (setq dir-entry (pop this-path-alist)) 4997 (while (setq dir-entry (pop this-path-alist))
4998 (if (member 4998 (if (member
4999 (if (memq 'lib (cdr dir-entry)) 4999 (if (memq 'lib (cdr dir-entry))
5000 (concat "[LIB] " (car dir-entry)) 5000 (concat "[LIB] " (car dir-entry))
5001 (car dir-entry)) 5001 (car dir-entry))
@@ -5092,7 +5092,7 @@ directories and save the routine info.
5092 ;; Define the variable which knows the value of "!DIR" 5092 ;; Define the variable which knows the value of "!DIR"
5093 (insert (format "\n(setq idlwave-system-directory \"%s\")\n" 5093 (insert (format "\n(setq idlwave-system-directory \"%s\")\n"
5094 idlwave-system-directory)) 5094 idlwave-system-directory))
5095 5095
5096 ;; Define the variable which contains a list of all scanned directories 5096 ;; Define the variable which contains a list of all scanned directories
5097 (insert "\n(setq idlwave-path-alist\n '(") 5097 (insert "\n(setq idlwave-path-alist\n '(")
5098 (let ((standard-output (current-buffer))) 5098 (let ((standard-output (current-buffer)))
@@ -5132,7 +5132,7 @@ directories and save the routine info.
5132 (when (file-directory-p dir) 5132 (when (file-directory-p dir)
5133 (setq files (nreverse (directory-files dir t "[^.]"))) 5133 (setq files (nreverse (directory-files dir t "[^.]")))
5134 (while (setq file (pop files)) 5134 (while (setq file (pop files))
5135 (if (file-directory-p file) 5135 (if (file-directory-p file)
5136 (push (file-name-as-directory file) path))) 5136 (push (file-name-as-directory file) path)))
5137 (push dir path1))) 5137 (push dir path1)))
5138 path1)) 5138 path1))
@@ -5141,7 +5141,7 @@ directories and save the routine info.
5141;;----- Scanning the library catalogs ------------------ 5141;;----- Scanning the library catalogs ------------------
5142 5142
5143(defun idlwave-scan-library-catalogs (&optional message-base no-load) 5143(defun idlwave-scan-library-catalogs (&optional message-base no-load)
5144 "Scan for library catalog files (.idlwave_catalog) and ingest. 5144 "Scan for library catalog files (.idlwave_catalog) and ingest.
5145 5145
5146All directories on `idlwave-path-alist' (or `idlwave-library-path' 5146All directories on `idlwave-path-alist' (or `idlwave-library-path'
5147instead, if present) are searched. Print MESSAGE-BASE along with the 5147instead, if present) are searched. Print MESSAGE-BASE along with the
@@ -5149,7 +5149,7 @@ libraries being loaded, if passed, and skip loading/normalizing if
5149NO-LOAD is non-nil. The variable `idlwave-use-library-catalogs' can 5149NO-LOAD is non-nil. The variable `idlwave-use-library-catalogs' can
5150be set to nil to disable library catalog scanning." 5150be set to nil to disable library catalog scanning."
5151 (when idlwave-use-library-catalogs 5151 (when idlwave-use-library-catalogs
5152 (let ((dirs 5152 (let ((dirs
5153 (if idlwave-library-path 5153 (if idlwave-library-path
5154 (idlwave-expand-path idlwave-library-path) 5154 (idlwave-expand-path idlwave-library-path)
5155 (mapcar 'car idlwave-path-alist))) 5155 (mapcar 'car idlwave-path-alist)))
@@ -5158,7 +5158,7 @@ be set to nil to disable library catalog scanning."
5158 (if message-base (message message-base)) 5158 (if message-base (message message-base))
5159 (while (setq dir (pop dirs)) 5159 (while (setq dir (pop dirs))
5160 (catch 'continue 5160 (catch 'continue
5161 (when (file-readable-p 5161 (when (file-readable-p
5162 (setq catalog (expand-file-name ".idlwave_catalog" dir))) 5162 (setq catalog (expand-file-name ".idlwave_catalog" dir)))
5163 (unless no-load 5163 (unless no-load
5164 (setq idlwave-library-catalog-routines nil) 5164 (setq idlwave-library-catalog-routines nil)
@@ -5166,20 +5166,20 @@ be set to nil to disable library catalog scanning."
5166 (condition-case nil 5166 (condition-case nil
5167 (load catalog t t t) 5167 (load catalog t t t)
5168 (error (throw 'continue t))) 5168 (error (throw 'continue t)))
5169 (when (and 5169 (when (and
5170 message-base 5170 message-base
5171 (not (string= idlwave-library-catalog-libname 5171 (not (string= idlwave-library-catalog-libname
5172 old-libname))) 5172 old-libname)))
5173 (message (concat message-base 5173 (message (concat message-base
5174 idlwave-library-catalog-libname)) 5174 idlwave-library-catalog-libname))
5175 (setq old-libname idlwave-library-catalog-libname)) 5175 (setq old-libname idlwave-library-catalog-libname))
5176 (when idlwave-library-catalog-routines 5176 (when idlwave-library-catalog-routines
5177 (setq all-routines 5177 (setq all-routines
5178 (append 5178 (append
5179 (idlwave-sintern-rinfo-list 5179 (idlwave-sintern-rinfo-list
5180 idlwave-library-catalog-routines 'sys dir) 5180 idlwave-library-catalog-routines 'sys dir)
5181 all-routines)))) 5181 all-routines))))
5182 5182
5183 ;; Add a 'lib flag if on path-alist 5183 ;; Add a 'lib flag if on path-alist
5184 (when (and idlwave-path-alist 5184 (when (and idlwave-path-alist
5185 (setq dir-entry (assoc dir idlwave-path-alist))) 5185 (setq dir-entry (assoc dir idlwave-path-alist)))
@@ -5190,17 +5190,17 @@ be set to nil to disable library catalog scanning."
5190;;----- Communicating with the Shell ------------------- 5190;;----- Communicating with the Shell -------------------
5191 5191
5192;; First, here is the idl program which can be used to query IDL for 5192;; First, here is the idl program which can be used to query IDL for
5193;; defined routines. 5193;; defined routines.
5194(defconst idlwave-routine-info.pro 5194(defconst idlwave-routine-info.pro
5195 " 5195 "
5196;; START OF IDLWAVE SUPPORT ROUTINES 5196;; START OF IDLWAVE SUPPORT ROUTINES
5197pro idlwave_print_info_entry,name,func=func,separator=sep 5197pro idlwave_print_info_entry,name,func=func,separator=sep
5198 ;; See if it's an object method 5198 ;; See if it's an object method
5199 if name eq '' then return 5199 if name eq '' then return
5200 func = keyword_set(func) 5200 func = keyword_set(func)
5201 methsep = strpos(name,'::') 5201 methsep = strpos(name,'::')
5202 meth = methsep ne -1 5202 meth = methsep ne -1
5203 5203
5204 ;; Get routine info 5204 ;; Get routine info
5205 pars = routine_info(name,/parameters,functions=func) 5205 pars = routine_info(name,/parameters,functions=func)
5206 source = routine_info(name,/source,functions=func) 5206 source = routine_info(name,/source,functions=func)
@@ -5208,12 +5208,12 @@ pro idlwave_print_info_entry,name,func=func,separator=sep
5208 nkw = pars.num_kw_args 5208 nkw = pars.num_kw_args
5209 if nargs gt 0 then args = pars.args 5209 if nargs gt 0 then args = pars.args
5210 if nkw gt 0 then kwargs = pars.kw_args 5210 if nkw gt 0 then kwargs = pars.kw_args
5211 5211
5212 ;; Trim the class, and make the name 5212 ;; Trim the class, and make the name
5213 if meth then begin 5213 if meth then begin
5214 class = strmid(name,0,methsep) 5214 class = strmid(name,0,methsep)
5215 name = strmid(name,methsep+2,strlen(name)-1) 5215 name = strmid(name,methsep+2,strlen(name)-1)
5216 if nargs gt 0 then begin 5216 if nargs gt 0 then begin
5217 ;; remove the self argument 5217 ;; remove the self argument
5218 wh = where(args ne 'SELF',nargs) 5218 wh = where(args ne 'SELF',nargs)
5219 if nargs gt 0 then args = args[wh] 5219 if nargs gt 0 then args = args[wh]
@@ -5222,7 +5222,7 @@ pro idlwave_print_info_entry,name,func=func,separator=sep
5222 ;; No class, just a normal routine. 5222 ;; No class, just a normal routine.
5223 class = \"\" 5223 class = \"\"
5224 endelse 5224 endelse
5225 5225
5226 ;; Calling sequence 5226 ;; Calling sequence
5227 cs = \"\" 5227 cs = \"\"
5228 if func then cs = 'Result = ' 5228 if func then cs = 'Result = '
@@ -5243,9 +5243,9 @@ pro idlwave_print_info_entry,name,func=func,separator=sep
5243 kwstring = kwstring + ' ' + kwargs[j] 5243 kwstring = kwstring + ' ' + kwargs[j]
5244 endfor 5244 endfor
5245 endif 5245 endif
5246 5246
5247 ret=(['IDLWAVE-PRO','IDLWAVE-FUN'])[func] 5247 ret=(['IDLWAVE-PRO','IDLWAVE-FUN'])[func]
5248 5248
5249 print,ret + ': ' + name + sep + class + sep + source[0].path $ 5249 print,ret + ': ' + name + sep + class + sep + source[0].path $
5250 + sep + cs + sep + kwstring 5250 + sep + cs + sep + kwstring
5251end 5251end
@@ -5285,7 +5285,7 @@ pro idlwave_get_class_tags, class
5285 if res then print,'IDLWAVE-CLASS-TAGS: '+class+' '+strjoin(tags,' ',/single) 5285 if res then print,'IDLWAVE-CLASS-TAGS: '+class+' '+strjoin(tags,' ',/single)
5286end 5286end
5287;; END OF IDLWAVE SUPPORT ROUTINES 5287;; END OF IDLWAVE SUPPORT ROUTINES
5288" 5288"
5289 "The idl programs to get info from the shell.") 5289 "The idl programs to get info from the shell.")
5290 5290
5291(defvar idlwave-idlwave_routine_info-compiled nil 5291(defvar idlwave-idlwave_routine_info-compiled nil
@@ -5308,12 +5308,12 @@ end
5308 (erase-buffer) 5308 (erase-buffer)
5309 (insert idlwave-routine-info.pro) 5309 (insert idlwave-routine-info.pro)
5310 (save-buffer 0)) 5310 (save-buffer 0))
5311 (idlwave-shell-send-command 5311 (idlwave-shell-send-command
5312 (concat ".run " idlwave-shell-temp-pro-file) 5312 (concat ".run " idlwave-shell-temp-pro-file)
5313 nil 'hide wait) 5313 nil 'hide wait)
5314; (message "SENDING SAVE") ; ???????????????????????? 5314; (message "SENDING SAVE") ; ????????????????????????
5315 (idlwave-shell-send-command 5315 (idlwave-shell-send-command
5316 (format "save,'idlwave_routine_info','idlwave_print_info_entry','idlwave_get_class_tags','idlwave_get_sysvars',FILE='%s',/ROUTINES" 5316 (format "save,'idlwave_routine_info','idlwave_print_info_entry','idlwave_get_class_tags','idlwave_get_sysvars',FILE='%s',/ROUTINES"
5317 (idlwave-shell-temp-file 'rinfo)) 5317 (idlwave-shell-temp-file 'rinfo))
5318 nil 'hide wait)) 5318 nil 'hide wait))
5319 5319
@@ -5396,7 +5396,7 @@ When we force a method or a method keyword, CLASS can specify the class."
5396 (completion-regexp-list 5396 (completion-regexp-list
5397 (if (equal arg '(16)) 5397 (if (equal arg '(16))
5398 (list (read-string (concat "Completion Regexp: ")))))) 5398 (list (read-string (concat "Completion Regexp: "))))))
5399 5399
5400 (if (and module (string-match "::" module)) 5400 (if (and module (string-match "::" module))
5401 (setq class (substring module 0 (match-beginning 0)) 5401 (setq class (substring module 0 (match-beginning 0))
5402 module (substring module (match-end 0)))) 5402 module (substring module (match-end 0))))
@@ -5417,7 +5417,7 @@ When we force a method or a method keyword, CLASS can specify the class."
5417 ;; Check for any special completion functions 5417 ;; Check for any special completion functions
5418 ((and idlwave-complete-special 5418 ((and idlwave-complete-special
5419 (idlwave-call-special idlwave-complete-special))) 5419 (idlwave-call-special idlwave-complete-special)))
5420 5420
5421 ((null what) 5421 ((null what)
5422 (error "Nothing to complete here")) 5422 (error "Nothing to complete here"))
5423 5423
@@ -5434,7 +5434,7 @@ When we force a method or a method keyword, CLASS can specify the class."
5434 (idlwave-all-class-inherits class-selector))) 5434 (idlwave-all-class-inherits class-selector)))
5435 (isa (concat "procedure" (if class-selector "-method" ""))) 5435 (isa (concat "procedure" (if class-selector "-method" "")))
5436 (type-selector 'pro)) 5436 (type-selector 'pro))
5437 (setq idlwave-completion-help-info 5437 (setq idlwave-completion-help-info
5438 (list 'routine nil type-selector class-selector nil super-classes)) 5438 (list 'routine nil type-selector class-selector nil super-classes))
5439 (idlwave-complete-in-buffer 5439 (idlwave-complete-in-buffer
5440 'procedure (if class-selector 'method 'routine) 5440 'procedure (if class-selector 'method 'routine)
@@ -5442,8 +5442,8 @@ When we force a method or a method keyword, CLASS can specify the class."
5442 (format "Select a %s name%s" 5442 (format "Select a %s name%s"
5443 isa 5443 isa
5444 (if class-selector 5444 (if class-selector
5445 (format " (class is %s)" 5445 (format " (class is %s)"
5446 (if (eq class-selector t) 5446 (if (eq class-selector t)
5447 "unknown" class-selector)) 5447 "unknown" class-selector))
5448 "")) 5448 ""))
5449 isa 5449 isa
@@ -5457,7 +5457,7 @@ When we force a method or a method keyword, CLASS can specify the class."
5457 (idlwave-all-class-inherits class-selector))) 5457 (idlwave-all-class-inherits class-selector)))
5458 (isa (concat "function" (if class-selector "-method" ""))) 5458 (isa (concat "function" (if class-selector "-method" "")))
5459 (type-selector 'fun)) 5459 (type-selector 'fun))
5460 (setq idlwave-completion-help-info 5460 (setq idlwave-completion-help-info
5461 (list 'routine nil type-selector class-selector nil super-classes)) 5461 (list 'routine nil type-selector class-selector nil super-classes))
5462 (idlwave-complete-in-buffer 5462 (idlwave-complete-in-buffer
5463 'function (if class-selector 'method 'routine) 5463 'function (if class-selector 'method 'routine)
@@ -5465,7 +5465,7 @@ When we force a method or a method keyword, CLASS can specify the class."
5465 (format "Select a %s name%s" 5465 (format "Select a %s name%s"
5466 isa 5466 isa
5467 (if class-selector 5467 (if class-selector
5468 (format " (class is %s)" 5468 (format " (class is %s)"
5469 (if (eq class-selector t) 5469 (if (eq class-selector t)
5470 "unknown" class-selector)) 5470 "unknown" class-selector))
5471 "")) 5471 ""))
@@ -5495,14 +5495,14 @@ When we force a method or a method keyword, CLASS can specify the class."
5495 (setq list (idlwave-fix-keywords name 'pro class list super-classes)) 5495 (setq list (idlwave-fix-keywords name 'pro class list super-classes))
5496 (unless list (error (format "No keywords available for procedure %s" 5496 (unless list (error (format "No keywords available for procedure %s"
5497 (idlwave-make-full-name class name)))) 5497 (idlwave-make-full-name class name))))
5498 (setq idlwave-completion-help-info 5498 (setq idlwave-completion-help-info
5499 (list 'keyword name type-selector class-selector entry super-classes)) 5499 (list 'keyword name type-selector class-selector entry super-classes))
5500 (idlwave-complete-in-buffer 5500 (idlwave-complete-in-buffer
5501 'keyword 'keyword list nil 5501 'keyword 'keyword list nil
5502 (format "Select keyword for procedure %s%s" 5502 (format "Select keyword for procedure %s%s"
5503 (idlwave-make-full-name class name) 5503 (idlwave-make-full-name class name)
5504 (if (or (member '("_EXTRA") list) 5504 (if (or (member '("_EXTRA") list)
5505 (member '("_REF_EXTRA") list)) 5505 (member '("_REF_EXTRA") list))
5506 " (note _EXTRA)" "")) 5506 " (note _EXTRA)" ""))
5507 isa 5507 isa
5508 'idlwave-attach-keyword-classes))) 5508 'idlwave-attach-keyword-classes)))
@@ -5533,13 +5533,13 @@ When we force a method or a method keyword, CLASS can specify the class."
5533 (idlwave-make-full-name class name))) 5533 (idlwave-make-full-name class name)))
5534 (unless list (error (format "No keywords available for function %s" 5534 (unless list (error (format "No keywords available for function %s"
5535 msg-name))) 5535 msg-name)))
5536 (setq idlwave-completion-help-info 5536 (setq idlwave-completion-help-info
5537 (list 'keyword name type-selector class-selector nil super-classes)) 5537 (list 'keyword name type-selector class-selector nil super-classes))
5538 (idlwave-complete-in-buffer 5538 (idlwave-complete-in-buffer
5539 'keyword 'keyword list nil 5539 'keyword 'keyword list nil
5540 (format "Select keyword for function %s%s" msg-name 5540 (format "Select keyword for function %s%s" msg-name
5541 (if (or (member '("_EXTRA") list) 5541 (if (or (member '("_EXTRA") list)
5542 (member '("_REF_EXTRA") list)) 5542 (member '("_REF_EXTRA") list))
5543 " (note _EXTRA)" "")) 5543 " (note _EXTRA)" ""))
5544 isa 5544 isa
5545 'idlwave-attach-keyword-classes))) 5545 'idlwave-attach-keyword-classes)))
@@ -5577,10 +5577,10 @@ other completions will be tried.")
5577 ("class"))) 5577 ("class")))
5578 (module (idlwave-sintern-routine-or-method module class)) 5578 (module (idlwave-sintern-routine-or-method module class))
5579 (class (idlwave-sintern-class class)) 5579 (class (idlwave-sintern-class class))
5580 (what (cond 5580 (what (cond
5581 ((equal what 0) 5581 ((equal what 0)
5582 (setq what 5582 (setq what
5583 (intern (completing-read 5583 (intern (completing-read
5584 "Complete what? " what-list nil t)))) 5584 "Complete what? " what-list nil t))))
5585 ((integerp what) 5585 ((integerp what)
5586 (setq what (intern (car (nth (1- what) what-list))))) 5586 (setq what (intern (car (nth (1- what) what-list)))))
@@ -5602,7 +5602,7 @@ other completions will be tried.")
5602 (super-classes nil) 5602 (super-classes nil)
5603 (type-selector 'pro) 5603 (type-selector 'pro)
5604 (pro (or module 5604 (pro (or module
5605 (idlwave-completing-read 5605 (idlwave-completing-read
5606 "Procedure: " (idlwave-routines) 'idlwave-selector)))) 5606 "Procedure: " (idlwave-routines) 'idlwave-selector))))
5607 (setq pro (idlwave-sintern-routine pro)) 5607 (setq pro (idlwave-sintern-routine pro))
5608 (list nil-list nil-list 'procedure-keyword 5608 (list nil-list nil-list 'procedure-keyword
@@ -5616,7 +5616,7 @@ other completions will be tried.")
5616 (super-classes nil) 5616 (super-classes nil)
5617 (type-selector 'fun) 5617 (type-selector 'fun)
5618 (func (or module 5618 (func (or module
5619 (idlwave-completing-read 5619 (idlwave-completing-read
5620 "Function: " (idlwave-routines) 'idlwave-selector)))) 5620 "Function: " (idlwave-routines) 'idlwave-selector))))
5621 (setq func (idlwave-sintern-routine func)) 5621 (setq func (idlwave-sintern-routine func))
5622 (list nil-list nil-list 'function-keyword 5622 (list nil-list nil-list 'function-keyword
@@ -5656,7 +5656,7 @@ other completions will be tried.")
5656 5656
5657 ((eq what 'class) 5657 ((eq what 'class)
5658 (list nil-list nil-list 'class nil-list nil)) 5658 (list nil-list nil-list 'class nil-list nil))
5659 5659
5660 (t (error "Invalid value for WHAT"))))) 5660 (t (error "Invalid value for WHAT")))))
5661 5661
5662(defun idlwave-completing-read (&rest args) 5662(defun idlwave-completing-read (&rest args)
@@ -5679,7 +5679,7 @@ other completions will be tried.")
5679 (stringp idlwave-shell-default-directory) 5679 (stringp idlwave-shell-default-directory)
5680 (file-directory-p idlwave-shell-default-directory)) 5680 (file-directory-p idlwave-shell-default-directory))
5681 idlwave-shell-default-directory 5681 idlwave-shell-default-directory
5682 default-directory))) 5682 default-directory)))
5683 (comint-dynamic-complete-filename))) 5683 (comint-dynamic-complete-filename)))
5684 5684
5685(defun idlwave-make-full-name (class name) 5685(defun idlwave-make-full-name (class name)
@@ -5688,7 +5688,7 @@ other completions will be tried.")
5688 5688
5689(defun idlwave-rinfo-assoc (name type class list) 5689(defun idlwave-rinfo-assoc (name type class list)
5690 "Like `idlwave-rinfo-assq', but sintern strings first." 5690 "Like `idlwave-rinfo-assq', but sintern strings first."
5691 (idlwave-rinfo-assq 5691 (idlwave-rinfo-assq
5692 (idlwave-sintern-routine-or-method name class) 5692 (idlwave-sintern-routine-or-method name class)
5693 type (idlwave-sintern-class class) list)) 5693 type (idlwave-sintern-class class) list))
5694 5694
@@ -5712,7 +5712,7 @@ other completions will be tried.")
5712 (setq classes nil))) 5712 (setq classes nil)))
5713 rtn)) 5713 rtn))
5714 5714
5715(defun idlwave-best-rinfo-assq (name type class list &optional with-file 5715(defun idlwave-best-rinfo-assq (name type class list &optional with-file
5716 keep-system) 5716 keep-system)
5717 "Like `idlwave-rinfo-assq', but get all twins and sort, then return first. 5717 "Like `idlwave-rinfo-assq', but get all twins and sort, then return first.
5718If WITH-FILE is passed, find the best rinfo entry with a file 5718If WITH-FILE is passed, find the best rinfo entry with a file
@@ -5737,7 +5737,7 @@ syslib files."
5737 twins))))) 5737 twins)))))
5738 (car twins))) 5738 (car twins)))
5739 5739
5740(defun idlwave-best-rinfo-assoc (name type class list &optional with-file 5740(defun idlwave-best-rinfo-assoc (name type class list &optional with-file
5741 keep-system) 5741 keep-system)
5742 "Like `idlwave-best-rinfo-assq', but sintern strings first." 5742 "Like `idlwave-best-rinfo-assq', but sintern strings first."
5743 (idlwave-best-rinfo-assq 5743 (idlwave-best-rinfo-assq
@@ -5828,7 +5828,7 @@ INFO is as returned by idlwave-what-function or -procedure."
5828Must accept two arguments: `apos' and `info'") 5828Must accept two arguments: `apos' and `info'")
5829 5829
5830(defun idlwave-determine-class (info type) 5830(defun idlwave-determine-class (info type)
5831 ;; Determine the class of a routine call. 5831 ;; Determine the class of a routine call.
5832 ;; INFO is the `cw-list' structure as returned by idlwave-where. 5832 ;; INFO is the `cw-list' structure as returned by idlwave-where.
5833 ;; The second element in this structure is the class. When nil, we 5833 ;; The second element in this structure is the class. When nil, we
5834 ;; return nil. When t, try to get the class from text properties at 5834 ;; return nil. When t, try to get the class from text properties at
@@ -5848,7 +5848,7 @@ Must accept two arguments: `apos' and `info'")
5848 (dassoc (cdr dassoc)) 5848 (dassoc (cdr dassoc))
5849 (t t))) 5849 (t t)))
5850 (arrow (and apos (string= (buffer-substring apos (+ 2 apos)) "->"))) 5850 (arrow (and apos (string= (buffer-substring apos (+ 2 apos)) "->")))
5851 (is-self 5851 (is-self
5852 (and arrow 5852 (and arrow
5853 (save-excursion (goto-char apos) 5853 (save-excursion (goto-char apos)
5854 (forward-word -1) 5854 (forward-word -1)
@@ -5869,19 +5869,19 @@ Must accept two arguments: `apos' and `info'")
5869 (setq class (or (nth 2 (idlwave-current-routine)) class))) 5869 (setq class (or (nth 2 (idlwave-current-routine)) class)))
5870 5870
5871 ;; Before prompting, try any special class determination routines 5871 ;; Before prompting, try any special class determination routines
5872 (when (and (eq t class) 5872 (when (and (eq t class)
5873 idlwave-determine-class-special 5873 idlwave-determine-class-special
5874 (not force-query)) 5874 (not force-query))
5875 (setq special-class 5875 (setq special-class
5876 (idlwave-call-special idlwave-determine-class-special apos)) 5876 (idlwave-call-special idlwave-determine-class-special apos))
5877 (if special-class 5877 (if special-class
5878 (setq class (idlwave-sintern-class special-class) 5878 (setq class (idlwave-sintern-class special-class)
5879 store idlwave-store-inquired-class))) 5879 store idlwave-store-inquired-class)))
5880 5880
5881 ;; Prompt for a class, if we need to 5881 ;; Prompt for a class, if we need to
5882 (when (and (eq class t) 5882 (when (and (eq class t)
5883 (or force-query query)) 5883 (or force-query query))
5884 (setq class-alist 5884 (setq class-alist
5885 (mapcar 'list (idlwave-all-method-classes (car info) type))) 5885 (mapcar 'list (idlwave-all-method-classes (car info) type)))
5886 (setq class 5886 (setq class
5887 (idlwave-sintern-class 5887 (idlwave-sintern-class
@@ -5890,9 +5890,9 @@ Must accept two arguments: `apos' and `info'")
5890 (error "No classes available with method %s" (car info))) 5890 (error "No classes available with method %s" (car info)))
5891 ((and (= (length class-alist) 1) (not force-query)) 5891 ((and (= (length class-alist) 1) (not force-query))
5892 (car (car class-alist))) 5892 (car (car class-alist)))
5893 (t 5893 (t
5894 (setq store idlwave-store-inquired-class) 5894 (setq store idlwave-store-inquired-class)
5895 (idlwave-completing-read 5895 (idlwave-completing-read
5896 (format "Class%s: " (if (stringp (car info)) 5896 (format "Class%s: " (if (stringp (car info))
5897 (format " for %s method %s" 5897 (format " for %s method %s"
5898 type (car info)) 5898 type (car info))
@@ -5904,9 +5904,9 @@ Must accept two arguments: `apos' and `info'")
5904 ;; We have a real class here 5904 ;; We have a real class here
5905 (when (and store arrow) 5905 (when (and store arrow)
5906 (condition-case () 5906 (condition-case ()
5907 (add-text-properties 5907 (add-text-properties
5908 apos (+ apos 2) 5908 apos (+ apos 2)
5909 `(idlwave-class ,class face ,idlwave-class-arrow-face 5909 `(idlwave-class ,class face ,idlwave-class-arrow-face
5910 rear-nonsticky t)) 5910 rear-nonsticky t))
5911 (error nil))) 5911 (error nil)))
5912 (setf (nth 2 info) class)) 5912 (setf (nth 2 info) class))
@@ -5934,14 +5934,14 @@ Must accept two arguments: `apos' and `info'")
5934 5934
5935 5935
5936(defun idlwave-where () 5936(defun idlwave-where ()
5937 "Find out where we are. 5937 "Find out where we are.
5938The return value is a list with the following stuff: 5938The return value is a list with the following stuff:
5939\(PRO-LIST FUNC-LIST COMPLETE-WHAT CW-LIST LAST-CHAR) 5939\(PRO-LIST FUNC-LIST COMPLETE-WHAT CW-LIST LAST-CHAR)
5940 5940
5941PRO-LIST (PRO POINT CLASS ARROW) 5941PRO-LIST (PRO POINT CLASS ARROW)
5942FUNC-LIST (FUNC POINT CLASS ARROW) 5942FUNC-LIST (FUNC POINT CLASS ARROW)
5943COMPLETE-WHAT a symbol indicating what kind of completion makes sense here 5943COMPLETE-WHAT a symbol indicating what kind of completion makes sense here
5944CW-LIST (PRO-OR-FUNC POINT CLASS ARROW) Like PRO-LIST, for what can 5944CW-LIST (PRO-OR-FUNC POINT CLASS ARROW) Like PRO-LIST, for what can
5945 be completed here. 5945 be completed here.
5946LAST-CHAR last relevant character before point (non-white non-comment, 5946LAST-CHAR last relevant character before point (non-white non-comment,
5947 not part of current identifier or leading slash). 5947 not part of current identifier or leading slash).
@@ -5953,7 +5953,7 @@ POINT: Where is this
5953CLASS: What class has the routine (nil=no, t=is method, but class unknown) 5953CLASS: What class has the routine (nil=no, t=is method, but class unknown)
5954ARROW: Location of the arrow" 5954ARROW: Location of the arrow"
5955 (idlwave-routines) 5955 (idlwave-routines)
5956 (let* (;(bos (save-excursion (idlwave-beginning-of-statement) (point))) 5956 (let* (;(bos (save-excursion (idlwave-beginning-of-statement) (point)))
5957 (bos (save-excursion (idlwave-start-of-substatement 'pre) (point))) 5957 (bos (save-excursion (idlwave-start-of-substatement 'pre) (point)))
5958 (func-entry (idlwave-what-function bos)) 5958 (func-entry (idlwave-what-function bos))
5959 (func (car func-entry)) 5959 (func (car func-entry))
@@ -5975,8 +5975,8 @@ ARROW: Location of the arrow"
5975 ((string-match "\\`[ \t]*\\(pro\\|function\\)[ \t]+[a-zA-Z0-9_]*\\'" 5975 ((string-match "\\`[ \t]*\\(pro\\|function\\)[ \t]+[a-zA-Z0-9_]*\\'"
5976 match-string) 5976 match-string)
5977 (setq cw 'class)) 5977 (setq cw 'class))
5978 ((string-match 5978 ((string-match
5979 "\\`[ \t]*\\([a-zA-Z][a-zA-Z0-9$_]*\\)?\\'" 5979 "\\`[ \t]*\\([a-zA-Z][a-zA-Z0-9$_]*\\)?\\'"
5980 (if (> pro-point 0) 5980 (if (> pro-point 0)
5981 (buffer-substring pro-point (point)) 5981 (buffer-substring pro-point (point))
5982 match-string)) 5982 match-string))
@@ -5987,11 +5987,11 @@ ARROW: Location of the arrow"
5987 nil) 5987 nil)
5988 ((string-match "OBJ_NEW([ \t]*['\"]\\([a-zA-Z0-9$_]*\\)?\\'" 5988 ((string-match "OBJ_NEW([ \t]*['\"]\\([a-zA-Z0-9$_]*\\)?\\'"
5989 match-string) 5989 match-string)
5990 (setq cw 'class)) 5990 (setq cw 'class))
5991 ((string-match "\\<inherits\\s-+\\([a-zA-Z0-9$_]*\\)?\\'" 5991 ((string-match "\\<inherits\\s-+\\([a-zA-Z0-9$_]*\\)?\\'"
5992 match-string) 5992 match-string)
5993 (setq cw 'class)) 5993 (setq cw 'class))
5994 ((and func 5994 ((and func
5995 (> func-point pro-point) 5995 (> func-point pro-point)
5996 (= func-level 1) 5996 (= func-level 1)
5997 (memq last-char '(?\( ?,))) 5997 (memq last-char '(?\( ?,)))
@@ -6037,7 +6037,7 @@ ARROW: Location of the arrow"
6037 ;; searches to this point. 6037 ;; searches to this point.
6038 6038
6039 (catch 'exit 6039 (catch 'exit
6040 (let (pos 6040 (let (pos
6041 func-point 6041 func-point
6042 (cnt 0) 6042 (cnt 0)
6043 func arrow-start class) 6043 func arrow-start class)
@@ -6052,18 +6052,18 @@ ARROW: Location of the arrow"
6052 (setq pos (point)) 6052 (setq pos (point))
6053 (incf cnt) 6053 (incf cnt)
6054 (when (and (= (following-char) ?\() 6054 (when (and (= (following-char) ?\()
6055 (re-search-backward 6055 (re-search-backward
6056 "\\(::\\|\\<\\)\\([a-zA-Z][a-zA-Z0-9$_]*\\)[ \t]*\\=" 6056 "\\(::\\|\\<\\)\\([a-zA-Z][a-zA-Z0-9$_]*\\)[ \t]*\\="
6057 bound t)) 6057 bound t))
6058 (setq func (match-string 2) 6058 (setq func (match-string 2)
6059 func-point (goto-char (match-beginning 2)) 6059 func-point (goto-char (match-beginning 2))
6060 pos func-point) 6060 pos func-point)
6061 (if (re-search-backward 6061 (if (re-search-backward
6062 "->[ \t]*\\(\\([a-zA-Z][a-zA-Z0-9$_]*\\)::\\)?\\=" bound t) 6062 "->[ \t]*\\(\\([a-zA-Z][a-zA-Z0-9$_]*\\)::\\)?\\=" bound t)
6063 (setq arrow-start (copy-marker (match-beginning 0)) 6063 (setq arrow-start (copy-marker (match-beginning 0))
6064 class (or (match-string 2) t))) 6064 class (or (match-string 2) t)))
6065 (throw 6065 (throw
6066 'exit 6066 'exit
6067 (list 6067 (list
6068 (idlwave-sintern-routine-or-method func class) 6068 (idlwave-sintern-routine-or-method func class)
6069 (idlwave-sintern-class class) 6069 (idlwave-sintern-class class)
@@ -6079,18 +6079,18 @@ ARROW: Location of the arrow"
6079 ;; searches to this point. 6079 ;; searches to this point.
6080 (let ((pos (point)) pro-point 6080 (let ((pos (point)) pro-point
6081 pro class arrow-start string) 6081 pro class arrow-start string)
6082 (save-excursion 6082 (save-excursion
6083 ;;(idlwave-beginning-of-statement) 6083 ;;(idlwave-beginning-of-statement)
6084 (idlwave-start-of-substatement 'pre) 6084 (idlwave-start-of-substatement 'pre)
6085 (setq string (buffer-substring (point) pos)) 6085 (setq string (buffer-substring (point) pos))
6086 (if (string-match 6086 (if (string-match
6087 "\\`[ \t]*\\([a-zA-Z][a-zA-Z0-9$_]*\\)[ \t]*\\(,\\|\\'\\)" string) 6087 "\\`[ \t]*\\([a-zA-Z][a-zA-Z0-9$_]*\\)[ \t]*\\(,\\|\\'\\)" string)
6088 (setq pro (match-string 1 string) 6088 (setq pro (match-string 1 string)
6089 pro-point (+ (point) (match-beginning 1))) 6089 pro-point (+ (point) (match-beginning 1)))
6090 (if (and (idlwave-skip-object) 6090 (if (and (idlwave-skip-object)
6091 (setq string (buffer-substring (point) pos)) 6091 (setq string (buffer-substring (point) pos))
6092 (string-match 6092 (string-match
6093 "\\`[ \t]*\\(->\\)[ \t]*\\(\\([a-zA-Z][a-zA-Z0-9$_]*\\)::\\)?\\([a-zA-Z][a-zA-Z0-9$_]*\\)?[ \t]*\\(,\\|\\(\\$\\s *\\(;.*\\)?\\)?$\\)" 6093 "\\`[ \t]*\\(->\\)[ \t]*\\(\\([a-zA-Z][a-zA-Z0-9$_]*\\)::\\)?\\([a-zA-Z][a-zA-Z0-9$_]*\\)?[ \t]*\\(,\\|\\(\\$\\s *\\(;.*\\)?\\)?$\\)"
6094 string)) 6094 string))
6095 (setq pro (if (match-beginning 4) 6095 (setq pro (if (match-beginning 4)
6096 (match-string 4 string)) 6096 (match-string 4 string))
@@ -6134,7 +6134,7 @@ ARROW: Location of the arrow"
6134 (throw 'exit nil)))) 6134 (throw 'exit nil))))
6135 (goto-char pos) 6135 (goto-char pos)
6136 nil))) 6136 nil)))
6137 6137
6138(defun idlwave-last-valid-char () 6138(defun idlwave-last-valid-char ()
6139 "Return the last character before point which is not white or a comment 6139 "Return the last character before point which is not white or a comment
6140and also not part of the current identifier. Since we do this in 6140and also not part of the current identifier. Since we do this in
@@ -6224,23 +6224,23 @@ accumulate information on matching completions."
6224 ((or (eq completion t) 6224 ((or (eq completion t)
6225 (and (= 1 (length (setq all-completions 6225 (and (= 1 (length (setq all-completions
6226 (idlwave-uniquify 6226 (idlwave-uniquify
6227 (all-completions part list 6227 (all-completions part list
6228 (or special-selector 6228 (or special-selector
6229 selector)))))) 6229 selector))))))
6230 (equal dpart dcompletion))) 6230 (equal dpart dcompletion)))
6231 ;; This is already complete 6231 ;; This is already complete
6232 (idlwave-after-successful-completion type slash beg) 6232 (idlwave-after-successful-completion type slash beg)
6233 (message "%s is already the complete %s" part isa) 6233 (message "%s is already the complete %s" part isa)
6234 nil) 6234 nil)
6235 (t 6235 (t
6236 ;; We cannot add something - offer a list. 6236 ;; We cannot add something - offer a list.
6237 (message "Making completion list...") 6237 (message "Making completion list...")
6238 6238
6239 (unless idlwave-completion-help-links ; already set somewhere? 6239 (unless idlwave-completion-help-links ; already set somewhere?
6240 (mapcar (lambda (x) ; Pass link prop through to highlight-linked 6240 (mapcar (lambda (x) ; Pass link prop through to highlight-linked
6241 (let ((link (get-text-property 0 'link (car x)))) 6241 (let ((link (get-text-property 0 'link (car x))))
6242 (if link 6242 (if link
6243 (push (cons (car x) link) 6243 (push (cons (car x) link)
6244 idlwave-completion-help-links)))) 6244 idlwave-completion-help-links))))
6245 list)) 6245 list))
6246 (let* ((list all-completions) 6246 (let* ((list all-completions)
@@ -6250,7 +6250,7 @@ accumulate information on matching completions."
6250; (completion-fixup-function ; Emacs 6250; (completion-fixup-function ; Emacs
6251; (lambda () (and (eq (preceding-char) ?>) 6251; (lambda () (and (eq (preceding-char) ?>)
6252; (re-search-backward " <" beg t))))) 6252; (re-search-backward " <" beg t)))))
6253 6253
6254 (setq list (sort list (lambda (a b) 6254 (setq list (sort list (lambda (a b)
6255 (string< (downcase a) (downcase b))))) 6255 (string< (downcase a) (downcase b)))))
6256 (if prepare-display-function 6256 (if prepare-display-function
@@ -6260,7 +6260,7 @@ accumulate information on matching completions."
6260 idlwave-complete-empty-string-as-lower-case) 6260 idlwave-complete-empty-string-as-lower-case)
6261 (not idlwave-completion-force-default-case)) 6261 (not idlwave-completion-force-default-case))
6262 (setq list (mapcar (lambda (x) 6262 (setq list (mapcar (lambda (x)
6263 (if (listp x) 6263 (if (listp x)
6264 (setcar x (downcase (car x))) 6264 (setcar x (downcase (car x)))
6265 (setq x (downcase x))) 6265 (setq x (downcase x)))
6266 x) 6266 x)
@@ -6280,19 +6280,19 @@ accumulate information on matching completions."
6280 (re-search-backward "\\<\\(pro\\|function\\)[ \t]+\\=" 6280 (re-search-backward "\\<\\(pro\\|function\\)[ \t]+\\="
6281 (- (point) 15) t) 6281 (- (point) 15) t)
6282 (goto-char (point-min)) 6282 (goto-char (point-min))
6283 (re-search-forward 6283 (re-search-forward
6284 "^[ \t]*\\(pro\\|function\\)[ \t]+\\([a-zA-Z0-9_]+::\\)" nil t)))) 6284 "^[ \t]*\\(pro\\|function\\)[ \t]+\\([a-zA-Z0-9_]+::\\)" nil t))))
6285 ;; Yank the full class specification 6285 ;; Yank the full class specification
6286 (insert (match-string 2)) 6286 (insert (match-string 2))
6287 ;; Do the completion, using list gathered from `idlwave-routines' 6287 ;; Do the completion, using list gathered from `idlwave-routines'
6288 (idlwave-complete-in-buffer 6288 (idlwave-complete-in-buffer
6289 'class 'class (idlwave-class-alist) nil 6289 'class 'class (idlwave-class-alist) nil
6290 "Select a class" "class" 6290 "Select a class" "class"
6291 '(lambda (list) ;; Push it to help-links if system help available 6291 '(lambda (list) ;; Push it to help-links if system help available
6292 (mapcar (lambda (x) 6292 (mapcar (lambda (x)
6293 (let* ((entry (idlwave-class-info x)) 6293 (let* ((entry (idlwave-class-info x))
6294 (link (nth 1 (assq 'link entry)))) 6294 (link (nth 1 (assq 'link entry))))
6295 (if link (push (cons x link) 6295 (if link (push (cons x link)
6296 idlwave-completion-help-links)) 6296 idlwave-completion-help-links))
6297 x)) 6297 x))
6298 list))))) 6298 list)))))
@@ -6304,7 +6304,7 @@ accumulate information on matching completions."
6304 ;; SHOW-CLASSES is the value of `idlwave-completion-show-classes'. 6304 ;; SHOW-CLASSES is the value of `idlwave-completion-show-classes'.
6305 (if (or (null show-classes) ; don't want to see classes 6305 (if (or (null show-classes) ; don't want to see classes
6306 (null class-selector) ; not a method call 6306 (null class-selector) ; not a method call
6307 (and 6307 (and
6308 (stringp class-selector) ; the class is already known 6308 (stringp class-selector) ; the class is already known
6309 (not super-classes))) ; no possibilities for inheritance 6309 (not super-classes))) ; no possibilities for inheritance
6310 ;; In these cases, we do not have to do anything 6310 ;; In these cases, we do not have to do anything
@@ -6319,13 +6319,13 @@ accumulate information on matching completions."
6319 (max (abs show-classes)) 6319 (max (abs show-classes))
6320 (lmax (if do-dots (apply 'max (mapcar 'length list)))) 6320 (lmax (if do-dots (apply 'max (mapcar 'length list))))
6321 classes nclasses class-info space) 6321 classes nclasses class-info space)
6322 (mapcar 6322 (mapcar
6323 (lambda (x) 6323 (lambda (x)
6324 ;; get the classes 6324 ;; get the classes
6325 (if (eq type 'class-tag) 6325 (if (eq type 'class-tag)
6326 ;; Just one class for tags 6326 ;; Just one class for tags
6327 (setq classes 6327 (setq classes
6328 (list 6328 (list
6329 (idlwave-class-or-superclass-with-tag class-selector x))) 6329 (idlwave-class-or-superclass-with-tag class-selector x)))
6330 ;; Multiple classes for method or method-keyword 6330 ;; Multiple classes for method or method-keyword
6331 (setq classes 6331 (setq classes
@@ -6334,7 +6334,7 @@ accumulate information on matching completions."
6334 method-selector x type-selector) 6334 method-selector x type-selector)
6335 (idlwave-all-method-classes x type-selector))) 6335 (idlwave-all-method-classes x type-selector)))
6336 (if inherit 6336 (if inherit
6337 (setq classes 6337 (setq classes
6338 (delq nil 6338 (delq nil
6339 (mapcar (lambda (x) (if (memq x inherit) x nil)) 6339 (mapcar (lambda (x) (if (memq x inherit) x nil))
6340 classes))))) 6340 classes)))))
@@ -6371,7 +6371,7 @@ accumulate information on matching completions."
6371(defun idlwave-attach-class-tag-classes (list) 6371(defun idlwave-attach-class-tag-classes (list)
6372 ;; Call idlwave-attach-classes with class structure tags 6372 ;; Call idlwave-attach-classes with class structure tags
6373 (idlwave-attach-classes list 'class-tag idlwave-completion-show-classes)) 6373 (idlwave-attach-classes list 'class-tag idlwave-completion-show-classes))
6374 6374
6375 6375
6376;;---------------------------------------------------------------------- 6376;;----------------------------------------------------------------------
6377;;---------------------------------------------------------------------- 6377;;----------------------------------------------------------------------
@@ -6392,7 +6392,7 @@ sort the list before displaying"
6392 ((= 1 (length list)) 6392 ((= 1 (length list))
6393 (setq rtn (car list))) 6393 (setq rtn (car list)))
6394 ((featurep 'xemacs) 6394 ((featurep 'xemacs)
6395 (if sort (setq list (sort list (lambda (a b) 6395 (if sort (setq list (sort list (lambda (a b)
6396 (string< (upcase a) (upcase b)))))) 6396 (string< (upcase a) (upcase b))))))
6397 (setq menu 6397 (setq menu
6398 (append (list title) 6398 (append (list title)
@@ -6403,7 +6403,7 @@ sort the list before displaying"
6403 (setq resp (get-popup-menu-response menu)) 6403 (setq resp (get-popup-menu-response menu))
6404 (funcall (event-function resp) (event-object resp))) 6404 (funcall (event-function resp) (event-object resp)))
6405 (t 6405 (t
6406 (if sort (setq list (sort list (lambda (a b) 6406 (if sort (setq list (sort list (lambda (a b)
6407 (string< (upcase a) (upcase b)))))) 6407 (string< (upcase a) (upcase b))))))
6408 (setq menu (cons title 6408 (setq menu (cons title
6409 (list 6409 (list
@@ -6494,7 +6494,7 @@ sort the list before displaying"
6494 (setq idlwave-before-completion-wconf (current-window-configuration))) 6494 (setq idlwave-before-completion-wconf (current-window-configuration)))
6495 6495
6496 (if (featurep 'xemacs) 6496 (if (featurep 'xemacs)
6497 (idlwave-display-completion-list-xemacs 6497 (idlwave-display-completion-list-xemacs
6498 list) 6498 list)
6499 (idlwave-display-completion-list-emacs list)) 6499 (idlwave-display-completion-list-emacs list))
6500 6500
@@ -6575,7 +6575,7 @@ If these don't exist, a letter in the string is automatically selected."
6575 (mapcar (lambda(x) 6575 (mapcar (lambda(x)
6576 (princ (nth 1 x)) 6576 (princ (nth 1 x))
6577 (princ "\n")) 6577 (princ "\n"))
6578 keys-alist)) 6578 keys-alist))
6579 (setq char (read-char))) 6579 (setq char (read-char)))
6580 (setq char (read-char))) 6580 (setq char (read-char)))
6581 (message nil) 6581 (message nil)
@@ -6695,7 +6695,7 @@ If these don't exist, a letter in the string is automatically selected."
6695(defun idlwave-make-modified-completion-map-emacs (old-map) 6695(defun idlwave-make-modified-completion-map-emacs (old-map)
6696 "Replace `choose-completion' and `mouse-choose-completion' in OLD-MAP." 6696 "Replace `choose-completion' and `mouse-choose-completion' in OLD-MAP."
6697 (let ((new-map (copy-keymap old-map))) 6697 (let ((new-map (copy-keymap old-map)))
6698 (substitute-key-definition 6698 (substitute-key-definition
6699 'choose-completion 'idlwave-choose-completion new-map) 6699 'choose-completion 'idlwave-choose-completion new-map)
6700 (substitute-key-definition 6700 (substitute-key-definition
6701 'mouse-choose-completion 'idlwave-mouse-choose-completion new-map) 6701 'mouse-choose-completion 'idlwave-mouse-choose-completion new-map)
@@ -6721,8 +6721,8 @@ If these don't exist, a letter in the string is automatically selected."
6721;; 6721;;
6722;; - Go again over the documentation how to write a completion 6722;; - Go again over the documentation how to write a completion
6723;; plugin. It is in self.el, but currently still very bad. 6723;; plugin. It is in self.el, but currently still very bad.
6724;; This could be in a separate file in the distribution, or 6724;; This could be in a separate file in the distribution, or
6725;; in an appendix for the manual. 6725;; in an appendix for the manual.
6726 6726
6727(defvar idlwave-struct-skip 6727(defvar idlwave-struct-skip
6728 "[ \t]*\\(\\$.*\n\\(^[ \t]*\\(\\$[ \t]*\\)?\\(;.*\\)?\n\\)*\\)?[ \t]*" 6728 "[ \t]*\\(\\$.*\n\\(^[ \t]*\\(\\$[ \t]*\\)?\\(;.*\\)?\n\\)*\\)?[ \t]*"
@@ -6761,7 +6761,7 @@ Point is expected just before the opening `{' of the struct definition."
6761 (beg (car borders)) 6761 (beg (car borders))
6762 (end (cdr borders)) 6762 (end (cdr borders))
6763 (case-fold-search t)) 6763 (case-fold-search t))
6764 (re-search-forward (concat "\\(^[ \t]*\\|[,{][ \t]*\\)" tag "[ \t]*:") 6764 (re-search-forward (concat "\\(^[ \t]*\\|[,{][ \t]*\\)" tag "[ \t]*:")
6765 end t))) 6765 end t)))
6766 6766
6767(defun idlwave-struct-inherits () 6767(defun idlwave-struct-inherits ()
@@ -6776,7 +6776,7 @@ Point is expected just before the opening `{' of the struct definition."
6776 (goto-char beg) 6776 (goto-char beg)
6777 (save-restriction 6777 (save-restriction
6778 (narrow-to-region beg end) 6778 (narrow-to-region beg end)
6779 (while (re-search-forward 6779 (while (re-search-forward
6780 (concat "[{,]" ;leading comma/brace 6780 (concat "[{,]" ;leading comma/brace
6781 idlwave-struct-skip ; 4 groups 6781 idlwave-struct-skip ; 4 groups
6782 "inherits" ; The INHERITS tag 6782 "inherits" ; The INHERITS tag
@@ -6826,9 +6826,9 @@ backward."
6826 (concat "\\<" (regexp-quote (downcase var)) "\\>" ws) 6826 (concat "\\<" (regexp-quote (downcase var)) "\\>" ws)
6827 "\\(\\)") 6827 "\\(\\)")
6828 "=" ws "\\({\\)" 6828 "=" ws "\\({\\)"
6829 (if name 6829 (if name
6830 (if (stringp name) 6830 (if (stringp name)
6831 (concat ws "\\(\\<" (downcase name) "\\)[^a-zA-Z0-9_$]") 6831 (concat ws "\\(\\<" (downcase name) "\\)[^a-zA-Z0-9_$]")
6832 ;; Just a generic name 6832 ;; Just a generic name
6833 (concat ws "\\<\\([a-zA-Z_0-9$]+\\)" ws ",")) 6833 (concat ws "\\<\\([a-zA-Z_0-9$]+\\)" ws ","))
6834 "")))) 6834 ""))))
@@ -6839,7 +6839,7 @@ backward."
6839 (goto-char (match-beginning 3)) 6839 (goto-char (match-beginning 3))
6840 (match-string-no-properties 5))))) 6840 (match-string-no-properties 5)))))
6841 6841
6842(defvar idlwave-class-info nil) 6842(defvar idlwave-class-info nil)
6843(defvar idlwave-system-class-info nil) ; Gathered from idlw-rinfo 6843(defvar idlwave-system-class-info nil) ; Gathered from idlw-rinfo
6844(defvar idlwave-class-reset nil) ; to reset buffer-local classes 6844(defvar idlwave-class-reset nil) ; to reset buffer-local classes
6845 6845
@@ -6852,13 +6852,13 @@ backward."
6852 (let (list entry) 6852 (let (list entry)
6853 (if idlwave-class-info 6853 (if idlwave-class-info
6854 (if idlwave-class-reset 6854 (if idlwave-class-reset
6855 (setq 6855 (setq
6856 idlwave-class-reset nil 6856 idlwave-class-reset nil
6857 idlwave-class-info ; Remove any visited in a buffer 6857 idlwave-class-info ; Remove any visited in a buffer
6858 (delq nil (mapcar 6858 (delq nil (mapcar
6859 (lambda (x) 6859 (lambda (x)
6860 (let ((filebuf 6860 (let ((filebuf
6861 (idlwave-class-file-or-buffer 6861 (idlwave-class-file-or-buffer
6862 (or (cdr (assq 'found-in x)) (car x))))) 6862 (or (cdr (assq 'found-in x)) (car x)))))
6863 (if (cdr filebuf) 6863 (if (cdr filebuf)
6864 nil 6864 nil
@@ -6896,7 +6896,7 @@ class/struct definition"
6896 (progn 6896 (progn
6897 ;; For everything there 6897 ;; For everything there
6898 (setq end-lim (save-excursion (idlwave-end-of-subprogram) (point))) 6898 (setq end-lim (save-excursion (idlwave-end-of-subprogram) (point)))
6899 (while (setq name 6899 (while (setq name
6900 (idlwave-find-structure-definition nil t end-lim)) 6900 (idlwave-find-structure-definition nil t end-lim))
6901 (funcall all-hook name))) 6901 (funcall all-hook name)))
6902 (idlwave-find-structure-definition nil (or alt-class class)))))) 6902 (idlwave-find-structure-definition nil (or alt-class class))))))
@@ -6934,11 +6934,11 @@ class/struct definition"
6934 (insert-file-contents file)) 6934 (insert-file-contents file))
6935 (save-excursion 6935 (save-excursion
6936 (goto-char 1) 6936 (goto-char 1)
6937 (idlwave-find-class-definition class 6937 (idlwave-find-class-definition class
6938 ;; Scan all of the structures found there 6938 ;; Scan all of the structures found there
6939 (lambda (name) 6939 (lambda (name)
6940 (let* ((this-class (idlwave-sintern-class name)) 6940 (let* ((this-class (idlwave-sintern-class name))
6941 (entry 6941 (entry
6942 (list this-class 6942 (list this-class
6943 (cons 'tags (idlwave-struct-tags)) 6943 (cons 'tags (idlwave-struct-tags))
6944 (cons 'inherits (idlwave-struct-inherits))))) 6944 (cons 'inherits (idlwave-struct-inherits)))))
@@ -6963,7 +6963,7 @@ class/struct definition"
6963 (condition-case err 6963 (condition-case err
6964 (apply 'append (mapcar 'idlwave-class-tags 6964 (apply 'append (mapcar 'idlwave-class-tags
6965 (cons class (idlwave-all-class-inherits class)))) 6965 (cons class (idlwave-all-class-inherits class))))
6966 (error 6966 (error
6967 (idlwave-class-tag-reset) 6967 (idlwave-class-tag-reset)
6968 (error "%s" (error-message-string err))))) 6968 (error "%s" (error-message-string err)))))
6969 6969
@@ -7000,24 +7000,24 @@ The list is cached in `idlwave-class-info' for faster access."
7000 all-inherits)))))) 7000 all-inherits))))))
7001 7001
7002(defun idlwave-entry-keywords (entry &optional record-link) 7002(defun idlwave-entry-keywords (entry &optional record-link)
7003 "Return the flat entry keywords alist from routine-info entry. 7003 "Return the flat entry keywords alist from routine-info entry.
7004If RECORD-LINK is non-nil, the keyword text is copied and a text 7004If RECORD-LINK is non-nil, the keyword text is copied and a text
7005property indicating the link is added." 7005property indicating the link is added."
7006 (let (kwds) 7006 (let (kwds)
7007 (mapcar 7007 (mapcar
7008 (lambda (key-list) 7008 (lambda (key-list)
7009 (let ((file (car key-list))) 7009 (let ((file (car key-list)))
7010 (mapcar (lambda (key-cons) 7010 (mapcar (lambda (key-cons)
7011 (let ((key (car key-cons)) 7011 (let ((key (car key-cons))
7012 (link (cdr key-cons))) 7012 (link (cdr key-cons)))
7013 (when (and record-link file) 7013 (when (and record-link file)
7014 (setq key (copy-sequence key)) 7014 (setq key (copy-sequence key))
7015 (put-text-property 7015 (put-text-property
7016 0 (length key) 7016 0 (length key)
7017 'link 7017 'link
7018 (concat 7018 (concat
7019 file 7019 file
7020 (if link 7020 (if link
7021 (concat idlwave-html-link-sep 7021 (concat idlwave-html-link-sep
7022 (number-to-string link)))) 7022 (number-to-string link))))
7023 key)) 7023 key))
@@ -7030,13 +7030,13 @@ property indicating the link is added."
7030 "Find keyword KEYWORD in entry ENTRY, and return (with link) if set" 7030 "Find keyword KEYWORD in entry ENTRY, and return (with link) if set"
7031 (catch 'exit 7031 (catch 'exit
7032 (mapc 7032 (mapc
7033 (lambda (key-list) 7033 (lambda (key-list)
7034 (let ((file (car key-list)) 7034 (let ((file (car key-list))
7035 (kwd (assoc keyword (cdr key-list)))) 7035 (kwd (assoc keyword (cdr key-list))))
7036 (when kwd 7036 (when kwd
7037 (setq kwd (cons (car kwd) 7037 (setq kwd (cons (car kwd)
7038 (if (and file (cdr kwd)) 7038 (if (and file (cdr kwd))
7039 (concat file 7039 (concat file
7040 idlwave-html-link-sep 7040 idlwave-html-link-sep
7041 (number-to-string (cdr kwd))) 7041 (number-to-string (cdr kwd)))
7042 (cdr kwd)))) 7042 (cdr kwd))))
@@ -7074,14 +7074,14 @@ property indicating the link is added."
7074 ;; Check if we need to update the "current" class 7074 ;; Check if we need to update the "current" class
7075 (if (not (equal class-selector idlwave-current-tags-class)) 7075 (if (not (equal class-selector idlwave-current-tags-class))
7076 (idlwave-prepare-class-tag-completion class-selector)) 7076 (idlwave-prepare-class-tag-completion class-selector))
7077 (setq idlwave-completion-help-info 7077 (setq idlwave-completion-help-info
7078 (list 'idlwave-complete-class-structure-tag-help 7078 (list 'idlwave-complete-class-structure-tag-help
7079 (idlwave-sintern-routine 7079 (idlwave-sintern-routine
7080 (concat class-selector "__define")) 7080 (concat class-selector "__define"))
7081 nil)) 7081 nil))
7082 (let ((idlwave-cpl-bold idlwave-current-native-class-tags)) 7082 (let ((idlwave-cpl-bold idlwave-current-native-class-tags))
7083 (idlwave-complete-in-buffer 7083 (idlwave-complete-in-buffer
7084 'class-tag 'class-tag 7084 'class-tag 'class-tag
7085 idlwave-current-class-tags nil 7085 idlwave-current-class-tags nil
7086 (format "Select a tag of class %s" class-selector) 7086 (format "Select a tag of class %s" class-selector)
7087 "class tag" 7087 "class tag"
@@ -7133,7 +7133,7 @@ Gets set in `idlw-rinfo.el'.")
7133 (skip-chars-backward "[a-zA-Z0-9_$]") 7133 (skip-chars-backward "[a-zA-Z0-9_$]")
7134 (equal (char-before) ?!)) 7134 (equal (char-before) ?!))
7135 (setq idlwave-completion-help-info '(idlwave-complete-sysvar-help)) 7135 (setq idlwave-completion-help-info '(idlwave-complete-sysvar-help))
7136 (idlwave-complete-in-buffer 'sysvar 'sysvar 7136 (idlwave-complete-in-buffer 'sysvar 'sysvar
7137 idlwave-system-variables-alist nil 7137 idlwave-system-variables-alist nil
7138 "Select a system variable" 7138 "Select a system variable"
7139 "system variable") 7139 "system variable")
@@ -7152,7 +7152,7 @@ Gets set in `idlw-rinfo.el'.")
7152 (or tags (error "System variable !%s is not a structure" var)) 7152 (or tags (error "System variable !%s is not a structure" var))
7153 (setq idlwave-completion-help-info 7153 (setq idlwave-completion-help-info
7154 (list 'idlwave-complete-sysvar-tag-help var)) 7154 (list 'idlwave-complete-sysvar-tag-help var))
7155 (idlwave-complete-in-buffer 'sysvartag 'sysvartag 7155 (idlwave-complete-in-buffer 'sysvartag 'sysvartag
7156 tags nil 7156 tags nil
7157 "Select a system variable tag" 7157 "Select a system variable tag"
7158 "system variable tag") 7158 "system variable tag")
@@ -7179,8 +7179,8 @@ Gets set in `idlw-rinfo.el'.")
7179 ((eq mode 'test) ; we can at least link the main 7179 ((eq mode 'test) ; we can at least link the main
7180 (and (stringp word) entry main)) 7180 (and (stringp word) entry main))
7181 ((eq mode 'set) 7181 ((eq mode 'set)
7182 (if entry 7182 (if entry
7183 (setq link 7183 (setq link
7184 (if (setq target (cdr (assoc word tags))) 7184 (if (setq target (cdr (assoc word tags)))
7185 (idlwave-substitute-link-target main target) 7185 (idlwave-substitute-link-target main target)
7186 main)))) ;; setting dynamic!!! 7186 main)))) ;; setting dynamic!!!
@@ -7198,7 +7198,7 @@ Gets set in `idlw-rinfo.el'.")
7198 7198
7199;; Fake help in the source buffer for class structure tags. 7199;; Fake help in the source buffer for class structure tags.
7200;; KWD AND NAME ARE GLOBAL-VARIABLES HERE. 7200;; KWD AND NAME ARE GLOBAL-VARIABLES HERE.
7201(defvar name) 7201(defvar name)
7202(defvar kwd) 7202(defvar kwd)
7203(defvar idlwave-help-do-class-struct-tag nil) 7203(defvar idlwave-help-do-class-struct-tag nil)
7204(defun idlwave-complete-class-structure-tag-help (mode word) 7204(defun idlwave-complete-class-structure-tag-help (mode word)
@@ -7207,13 +7207,13 @@ Gets set in `idlw-rinfo.el'.")
7207 nil) 7207 nil)
7208 ((eq mode 'set) 7208 ((eq mode 'set)
7209 (let (class-with found-in) 7209 (let (class-with found-in)
7210 (when (setq class-with 7210 (when (setq class-with
7211 (idlwave-class-or-superclass-with-tag 7211 (idlwave-class-or-superclass-with-tag
7212 idlwave-current-tags-class 7212 idlwave-current-tags-class
7213 word)) 7213 word))
7214 (if (assq (idlwave-sintern-class class-with) 7214 (if (assq (idlwave-sintern-class class-with)
7215 idlwave-system-class-info) 7215 idlwave-system-class-info)
7216 (error "No help available for system class tags.")) 7216 (error "No help available for system class tags"))
7217 (if (setq found-in (idlwave-class-found-in class-with)) 7217 (if (setq found-in (idlwave-class-found-in class-with))
7218 (setq name (cons (concat found-in "__define") class-with)) 7218 (setq name (cons (concat found-in "__define") class-with))
7219 (setq name (concat class-with "__define"))))) 7219 (setq name (concat class-with "__define")))))
@@ -7224,7 +7224,7 @@ Gets set in `idlw-rinfo.el'.")
7224(defun idlwave-class-or-superclass-with-tag (class tag) 7224(defun idlwave-class-or-superclass-with-tag (class tag)
7225 "Find and return the CLASS or one of its superclass with the 7225 "Find and return the CLASS or one of its superclass with the
7226associated TAG, if any." 7226associated TAG, if any."
7227 (let ((sclasses (cons class (cdr (assq 'all-inherits 7227 (let ((sclasses (cons class (cdr (assq 'all-inherits
7228 (idlwave-class-info class))))) 7228 (idlwave-class-info class)))))
7229 cl) 7229 cl)
7230 (catch 'exit 7230 (catch 'exit
@@ -7233,7 +7233,7 @@ associated TAG, if any."
7233 (let ((tags (idlwave-class-tags cl))) 7233 (let ((tags (idlwave-class-tags cl)))
7234 (while tags 7234 (while tags
7235 (if (eq t (compare-strings tag 0 nil (car tags) 0 nil t)) 7235 (if (eq t (compare-strings tag 0 nil (car tags) 0 nil t))
7236 (throw 'exit cl)) 7236 (throw 'exit cl))
7237 (setq tags (cdr tags)))))))) 7237 (setq tags (cdr tags))))))))
7238 7238
7239 7239
@@ -7256,8 +7256,8 @@ associated TAG, if any."
7256 (setcar entry (idlwave-sintern-sysvar (car entry) 'set)) 7256 (setcar entry (idlwave-sintern-sysvar (car entry) 'set))
7257 (setq tags (assq 'tags entry)) 7257 (setq tags (assq 'tags entry))
7258 (if tags 7258 (if tags
7259 (setcdr tags 7259 (setcdr tags
7260 (mapcar (lambda (x) 7260 (mapcar (lambda (x)
7261 (cons (idlwave-sintern-sysvartag (car x) 'set) 7261 (cons (idlwave-sintern-sysvartag (car x) 'set)
7262 (cdr x))) 7262 (cdr x)))
7263 (cdr tags))))))) 7263 (cdr tags)))))))
@@ -7274,19 +7274,19 @@ associated TAG, if any."
7274 text start) 7274 text start)
7275 (setq start (match-end 0) 7275 (setq start (match-end 0)
7276 var (match-string 1 text) 7276 var (match-string 1 text)
7277 tags (if (match-end 3) 7277 tags (if (match-end 3)
7278 (idlwave-split-string (match-string 3 text)))) 7278 (idlwave-split-string (match-string 3 text))))
7279 ;; Maintain old links, if present 7279 ;; Maintain old links, if present
7280 (setq old-entry (assq (idlwave-sintern-sysvar var) old)) 7280 (setq old-entry (assq (idlwave-sintern-sysvar var) old))
7281 (setq link (assq 'link old-entry)) 7281 (setq link (assq 'link old-entry))
7282 (setq idlwave-system-variables-alist 7282 (setq idlwave-system-variables-alist
7283 (cons (list var 7283 (cons (list var
7284 (cons 7284 (cons
7285 'tags 7285 'tags
7286 (mapcar (lambda (x) 7286 (mapcar (lambda (x)
7287 (cons x 7287 (cons x
7288 (cdr (assq 7288 (cdr (assq
7289 (idlwave-sintern-sysvartag x) 7289 (idlwave-sintern-sysvartag x)
7290 (cdr (assq 'tags old-entry)))))) 7290 (cdr (assq 'tags old-entry))))))
7291 tags)) link) 7291 tags)) link)
7292 idlwave-system-variables-alist))) 7292 idlwave-system-variables-alist)))
@@ -7308,9 +7308,9 @@ associated TAG, if any."
7308 7308
7309(defun idlwave-uniquify (list) 7309(defun idlwave-uniquify (list)
7310 (let ((ht (make-hash-table :size (length list) :test 'equal))) 7310 (let ((ht (make-hash-table :size (length list) :test 'equal)))
7311 (delq nil 7311 (delq nil
7312 (mapcar (lambda (x) 7312 (mapcar (lambda (x)
7313 (unless (gethash x ht) 7313 (unless (gethash x ht)
7314 (puthash x t ht) 7314 (puthash x t ht)
7315 x)) 7315 x))
7316 list)))) 7316 list))))
@@ -7338,11 +7338,11 @@ Restore the pre-completion window configuration if possible."
7338 nil))) 7338 nil)))
7339 7339
7340 ;; Restore the pre-completion window configuration if this is safe. 7340 ;; Restore the pre-completion window configuration if this is safe.
7341 7341
7342 (if (or (eq verify 'force) ; force 7342 (if (or (eq verify 'force) ; force
7343 (and 7343 (and
7344 (get-buffer-window "*Completions*") ; visible 7344 (get-buffer-window "*Completions*") ; visible
7345 (idlwave-local-value 'idlwave-completion-p 7345 (idlwave-local-value 'idlwave-completion-p
7346 "*Completions*") ; cib-buffer 7346 "*Completions*") ; cib-buffer
7347 (eq (marker-buffer idlwave-completion-mark) 7347 (eq (marker-buffer idlwave-completion-mark)
7348 (current-buffer)) ; buffer OK 7348 (current-buffer)) ; buffer OK
@@ -7440,7 +7440,7 @@ With ARG, enforce query for the class of object methods."
7440 (if (string-match "\\(pro\\|function\\)[ \t]+\\(\\(.*\\)::\\)?\\(.*\\)" 7440 (if (string-match "\\(pro\\|function\\)[ \t]+\\(\\(.*\\)::\\)?\\(.*\\)"
7441 resolve) 7441 resolve)
7442 (setq type (match-string 1 resolve) 7442 (setq type (match-string 1 resolve)
7443 class (if (match-beginning 2) 7443 class (if (match-beginning 2)
7444 (match-string 3 resolve) 7444 (match-string 3 resolve)
7445 nil) 7445 nil)
7446 name (match-string 4 resolve))) 7446 name (match-string 4 resolve)))
@@ -7449,15 +7449,15 @@ With ARG, enforce query for the class of object methods."
7449 7449
7450 (cond 7450 (cond
7451 ((null class) 7451 ((null class)
7452 (idlwave-shell-send-command 7452 (idlwave-shell-send-command
7453 (format "resolve_routine,'%s'%s" (downcase name) kwd) 7453 (format "resolve_routine,'%s'%s" (downcase name) kwd)
7454 'idlwave-update-routine-info 7454 'idlwave-update-routine-info
7455 nil t)) 7455 nil t))
7456 (t 7456 (t
7457 (idlwave-shell-send-command 7457 (idlwave-shell-send-command
7458 (format "resolve_routine,'%s__define'%s" (downcase class) kwd) 7458 (format "resolve_routine,'%s__define'%s" (downcase class) kwd)
7459 (list 'idlwave-shell-send-command 7459 (list 'idlwave-shell-send-command
7460 (format "resolve_routine,'%s__%s'%s" 7460 (format "resolve_routine,'%s__%s'%s"
7461 (downcase class) (downcase name) kwd) 7461 (downcase class) (downcase name) kwd)
7462 '(idlwave-update-routine-info) 7462 '(idlwave-update-routine-info)
7463 nil t)))))) 7463 nil t))))))
@@ -7474,19 +7474,19 @@ force class query for object methods."
7474 (this-buffer (equal arg '(4))) 7474 (this-buffer (equal arg '(4)))
7475 (module (idlwave-fix-module-if-obj_new (idlwave-what-module))) 7475 (module (idlwave-fix-module-if-obj_new (idlwave-what-module)))
7476 (default (if module 7476 (default (if module
7477 (concat (idlwave-make-full-name 7477 (concat (idlwave-make-full-name
7478 (nth 2 module) (car module)) 7478 (nth 2 module) (car module))
7479 (if (eq (nth 1 module) 'pro) "<p>" "<f>")) 7479 (if (eq (nth 1 module) 'pro) "<p>" "<f>"))
7480 "none")) 7480 "none"))
7481 (list 7481 (list
7482 (idlwave-uniquify 7482 (idlwave-uniquify
7483 (delq nil 7483 (delq nil
7484 (mapcar (lambda (x) 7484 (mapcar (lambda (x)
7485 (if (eq 'system (car-safe (nth 3 x))) 7485 (if (eq 'system (car-safe (nth 3 x)))
7486 ;; Take out system routines with no source. 7486 ;; Take out system routines with no source.
7487 nil 7487 nil
7488 (list 7488 (list
7489 (concat (idlwave-make-full-name 7489 (concat (idlwave-make-full-name
7490 (nth 2 x) (car x)) 7490 (nth 2 x) (car x))
7491 (if (eq (nth 1 x) 'pro) "<p>" "<f>"))))) 7491 (if (eq (nth 1 x) 'pro) "<p>" "<f>")))))
7492 (if this-buffer 7492 (if this-buffer
@@ -7515,10 +7515,10 @@ force class query for object methods."
7515 (t t))) 7515 (t t)))
7516 (idlwave-do-find-module name type class nil this-buffer))) 7516 (idlwave-do-find-module name type class nil this-buffer)))
7517 7517
7518(defun idlwave-do-find-module (name type class 7518(defun idlwave-do-find-module (name type class
7519 &optional force-source this-buffer) 7519 &optional force-source this-buffer)
7520 (let ((name1 (idlwave-make-full-name class name)) 7520 (let ((name1 (idlwave-make-full-name class name))
7521 source buf1 entry 7521 source buf1 entry
7522 (buf (current-buffer)) 7522 (buf (current-buffer))
7523 (pos (point)) 7523 (pos (point))
7524 file name2) 7524 file name2)
@@ -7528,11 +7528,11 @@ force class query for object methods."
7528 name2 (if (nth 2 entry) 7528 name2 (if (nth 2 entry)
7529 (idlwave-make-full-name (nth 2 entry) name) 7529 (idlwave-make-full-name (nth 2 entry) name)
7530 name1)) 7530 name1))
7531 (if source 7531 (if source
7532 (setq file (idlwave-routine-source-file source))) 7532 (setq file (idlwave-routine-source-file source)))
7533 (unless file ; Try to find it on the path. 7533 (unless file ; Try to find it on the path.
7534 (setq file 7534 (setq file
7535 (idlwave-expand-lib-file-name 7535 (idlwave-expand-lib-file-name
7536 (if class 7536 (if class
7537 (format "%s__define.pro" (downcase class)) 7537 (format "%s__define.pro" (downcase class))
7538 (format "%s.pro" (downcase name)))))) 7538 (format "%s.pro" (downcase name))))))
@@ -7540,14 +7540,14 @@ force class query for object methods."
7540 ((or (null name) (equal name "")) 7540 ((or (null name) (equal name ""))
7541 (error "Abort")) 7541 (error "Abort"))
7542 ((eq (car source) 'system) 7542 ((eq (car source) 'system)
7543 (error "Source code for system routine %s is not available" 7543 (error "Source code for system routine %s is not available"
7544 name2)) 7544 name2))
7545 ((or (not file) (not (file-regular-p file))) 7545 ((or (not file) (not (file-regular-p file)))
7546 (error "Source code for routine %s is not available" 7546 (error "Source code for routine %s is not available"
7547 name2)) 7547 name2))
7548 (t 7548 (t
7549 (when (not this-buffer) 7549 (when (not this-buffer)
7550 (setq buf1 7550 (setq buf1
7551 (idlwave-find-file-noselect file 'find)) 7551 (idlwave-find-file-noselect file 'find))
7552 (pop-to-buffer buf1 t)) 7552 (pop-to-buffer buf1 t))
7553 (goto-char (point-max)) 7553 (goto-char (point-max))
@@ -7557,7 +7557,7 @@ force class query for object methods."
7557 (cond ((eq type 'fun) "function") 7557 (cond ((eq type 'fun) "function")
7558 ((eq type 'pro) "pro") 7558 ((eq type 'pro) "pro")
7559 (t "\\(pro\\|function\\)")) 7559 (t "\\(pro\\|function\\)"))
7560 "\\>[ \t]+" 7560 "\\>[ \t]+"
7561 (regexp-quote (downcase name2)) 7561 (regexp-quote (downcase name2))
7562 "[^a-zA-Z0-9_$]") 7562 "[^a-zA-Z0-9_$]")
7563 nil t) 7563 nil t)
@@ -7594,17 +7594,17 @@ Used by `idlwave-routine-info' and `idlwave-find-module'."
7594 (cond 7594 (cond
7595 ((and (eq cw 'procedure) 7595 ((and (eq cw 'procedure)
7596 (not (equal this-word ""))) 7596 (not (equal this-word "")))
7597 (setq this-word (idlwave-sintern-routine-or-method 7597 (setq this-word (idlwave-sintern-routine-or-method
7598 this-word (nth 2 (nth 3 where)))) 7598 this-word (nth 2 (nth 3 where))))
7599 (list this-word 'pro 7599 (list this-word 'pro
7600 (idlwave-determine-class 7600 (idlwave-determine-class
7601 (cons this-word (cdr (nth 3 where))) 7601 (cons this-word (cdr (nth 3 where)))
7602 'pro))) 7602 'pro)))
7603 ((and (eq cw 'function) 7603 ((and (eq cw 'function)
7604 (not (equal this-word "")) 7604 (not (equal this-word ""))
7605 (or (eq next-char ?\() ; exclude arrays, vars. 7605 (or (eq next-char ?\() ; exclude arrays, vars.
7606 (looking-at "[a-zA-Z0-9_]*[ \t]*("))) 7606 (looking-at "[a-zA-Z0-9_]*[ \t]*(")))
7607 (setq this-word (idlwave-sintern-routine-or-method 7607 (setq this-word (idlwave-sintern-routine-or-method
7608 this-word (nth 2 (nth 3 where)))) 7608 this-word (nth 2 (nth 3 where))))
7609 (list this-word 'fun 7609 (list this-word 'fun
7610 (idlwave-determine-class 7610 (idlwave-determine-class
@@ -7641,7 +7641,7 @@ Used by `idlwave-routine-info' and `idlwave-find-module'."
7641 class))) 7641 class)))
7642 7642
7643(defun idlwave-fix-module-if-obj_new (module) 7643(defun idlwave-fix-module-if-obj_new (module)
7644 "Check if MODULE points to obj_new. 7644 "Check if MODULE points to obj_new.
7645If yes, and if the cursor is in the keyword region, change to the 7645If yes, and if the cursor is in the keyword region, change to the
7646appropriate Init method." 7646appropriate Init method."
7647 (let* ((name (car module)) 7647 (let* ((name (car module))
@@ -7681,30 +7681,30 @@ from all classes if class equals t."
7681 string) 7681 string)
7682 (setq class (idlwave-sintern-class (match-string 1 string))) 7682 (setq class (idlwave-sintern-class (match-string 1 string)))
7683 (setq idlwave-current-obj_new-class class) 7683 (setq idlwave-current-obj_new-class class)
7684 (setq keywords 7684 (setq keywords
7685 (append keywords 7685 (append keywords
7686 (idlwave-entry-keywords 7686 (idlwave-entry-keywords
7687 (idlwave-rinfo-assq 7687 (idlwave-rinfo-assq
7688 (idlwave-sintern-method "INIT") 7688 (idlwave-sintern-method "INIT")
7689 'fun 7689 'fun
7690 class 7690 class
7691 (idlwave-routines)) 'do-link)))))) 7691 (idlwave-routines)) 'do-link))))))
7692 7692
7693 ;; If the class is `t', combine all keywords of all methods NAME 7693 ;; If the class is `t', combine all keywords of all methods NAME
7694 (when (eq class t) 7694 (when (eq class t)
7695 (mapc (lambda (entry) 7695 (mapc (lambda (entry)
7696 (and 7696 (and
7697 (nth 2 entry) ; non-nil class 7697 (nth 2 entry) ; non-nil class
7698 (eq (nth 1 entry) type) ; correct type 7698 (eq (nth 1 entry) type) ; correct type
7699 (setq keywords 7699 (setq keywords
7700 (append keywords 7700 (append keywords
7701 (idlwave-entry-keywords entry 'do-link))))) 7701 (idlwave-entry-keywords entry 'do-link)))))
7702 (idlwave-all-assq name (idlwave-routines))) 7702 (idlwave-all-assq name (idlwave-routines)))
7703 (setq keywords (idlwave-uniquify keywords))) 7703 (setq keywords (idlwave-uniquify keywords)))
7704 7704
7705 ;; If we have inheritance, add all keywords from superclasses, if 7705 ;; If we have inheritance, add all keywords from superclasses, if
7706 ;; the user indicated that method in `idlwave-keyword-class-inheritance' 7706 ;; the user indicated that method in `idlwave-keyword-class-inheritance'
7707 (when (and 7707 (when (and
7708 super-classes 7708 super-classes
7709 idlwave-keyword-class-inheritance 7709 idlwave-keyword-class-inheritance
7710 (stringp class) 7710 (stringp class)
@@ -7724,7 +7724,7 @@ from all classes if class equals t."
7724 (mapcar (lambda (k) (add-to-list 'keywords k)) 7724 (mapcar (lambda (k) (add-to-list 'keywords k))
7725 (idlwave-entry-keywords entry 'do-link)))) 7725 (idlwave-entry-keywords entry 'do-link))))
7726 (setq keywords (idlwave-uniquify keywords))) 7726 (setq keywords (idlwave-uniquify keywords)))
7727 7727
7728 ;; Return the final list 7728 ;; Return the final list
7729 keywords)) 7729 keywords))
7730 7730
@@ -7749,14 +7749,14 @@ If we do not know about MODULE, just return KEYWORD literally."
7749 (assq (idlwave-sintern-keyword "_REF_EXTRA") kwd-alist))) 7749 (assq (idlwave-sintern-keyword "_REF_EXTRA") kwd-alist)))
7750 (completion-ignore-case t) 7750 (completion-ignore-case t)
7751 candidates) 7751 candidates)
7752 (cond ((assq kwd kwd-alist) 7752 (cond ((assq kwd kwd-alist)
7753 kwd) 7753 kwd)
7754 ((setq candidates (all-completions kwd kwd-alist)) 7754 ((setq candidates (all-completions kwd kwd-alist))
7755 (if (= (length candidates) 1) 7755 (if (= (length candidates) 1)
7756 (car candidates) 7756 (car candidates)
7757 candidates)) 7757 candidates))
7758 ((and entry extra) 7758 ((and entry extra)
7759 ;; Inheritance may cause this keyword to be correct 7759 ;; Inheritance may cause this keyword to be correct
7760 keyword) 7760 keyword)
7761 (entry 7761 (entry
7762 ;; We do know the function, which does not have the keyword. 7762 ;; We do know the function, which does not have the keyword.
@@ -7768,13 +7768,13 @@ If we do not know about MODULE, just return KEYWORD literally."
7768 7768
7769(defvar idlwave-rinfo-mouse-map (make-sparse-keymap)) 7769(defvar idlwave-rinfo-mouse-map (make-sparse-keymap))
7770(defvar idlwave-rinfo-map (make-sparse-keymap)) 7770(defvar idlwave-rinfo-map (make-sparse-keymap))
7771(define-key idlwave-rinfo-mouse-map 7771(define-key idlwave-rinfo-mouse-map
7772 (if (featurep 'xemacs) [button2] [mouse-2]) 7772 (if (featurep 'xemacs) [button2] [mouse-2])
7773 'idlwave-mouse-active-rinfo) 7773 'idlwave-mouse-active-rinfo)
7774(define-key idlwave-rinfo-mouse-map 7774(define-key idlwave-rinfo-mouse-map
7775 (if (featurep 'xemacs) [(shift button2)] [(shift mouse-2)]) 7775 (if (featurep 'xemacs) [(shift button2)] [(shift mouse-2)])
7776 'idlwave-mouse-active-rinfo-shift) 7776 'idlwave-mouse-active-rinfo-shift)
7777(define-key idlwave-rinfo-mouse-map 7777(define-key idlwave-rinfo-mouse-map
7778 (if (featurep 'xemacs) [button3] [mouse-3]) 7778 (if (featurep 'xemacs) [button3] [mouse-3])
7779 'idlwave-mouse-active-rinfo-right) 7779 'idlwave-mouse-active-rinfo-right)
7780(define-key idlwave-rinfo-mouse-map " " 'idlwave-active-rinfo-space) 7780(define-key idlwave-rinfo-mouse-map " " 'idlwave-active-rinfo-space)
@@ -7800,7 +7800,7 @@ If we do not know about MODULE, just return KEYWORD literally."
7800 (let* ((initial-class (or initial-class class)) 7800 (let* ((initial-class (or initial-class class))
7801 (entry (or (idlwave-best-rinfo-assq name type class 7801 (entry (or (idlwave-best-rinfo-assq name type class
7802 (idlwave-routines)) 7802 (idlwave-routines))
7803 (idlwave-rinfo-assq name type class 7803 (idlwave-rinfo-assq name type class
7804 idlwave-unresolved-routines))) 7804 idlwave-unresolved-routines)))
7805 (name (or (car entry) name)) 7805 (name (or (car entry) name))
7806 (class (or (nth 2 entry) class)) 7806 (class (or (nth 2 entry) class))
@@ -7825,7 +7825,7 @@ If we do not know about MODULE, just return KEYWORD literally."
7825 (km-prop (if (featurep 'xemacs) 'keymap 'local-map)) 7825 (km-prop (if (featurep 'xemacs) 'keymap 'local-map))
7826 (face 'idlwave-help-link-face) 7826 (face 'idlwave-help-link-face)
7827 beg props win cnt total) 7827 beg props win cnt total)
7828 ;; Fix keywords, but don't add chained super-classes, since these 7828 ;; Fix keywords, but don't add chained super-classes, since these
7829 ;; are shown separately for that super-class 7829 ;; are shown separately for that super-class
7830 (setq keywords (idlwave-fix-keywords name type class keywords)) 7830 (setq keywords (idlwave-fix-keywords name type class keywords))
7831 (cond 7831 (cond
@@ -7867,7 +7867,7 @@ If we do not know about MODULE, just return KEYWORD literally."
7867 km-prop idlwave-rinfo-mouse-map 7867 km-prop idlwave-rinfo-mouse-map
7868 'help-echo help-echo-use 7868 'help-echo help-echo-use
7869 'data (cons 'usage data))) 7869 'data (cons 'usage data)))
7870 (if html-file (setq props (append (list 'face face 'link html-file) 7870 (if html-file (setq props (append (list 'face face 'link html-file)
7871 props))) 7871 props)))
7872 (insert "Usage: ") 7872 (insert "Usage: ")
7873 (setq beg (point)) 7873 (setq beg (point))
@@ -7876,14 +7876,14 @@ If we do not know about MODULE, just return KEYWORD literally."
7876 (format calling-seq name name name name)) 7876 (format calling-seq name name name name))
7877 "\n") 7877 "\n")
7878 (add-text-properties beg (point) props) 7878 (add-text-properties beg (point) props)
7879 7879
7880 (insert "Keywords:") 7880 (insert "Keywords:")
7881 (if (null keywords) 7881 (if (null keywords)
7882 (insert " No keywords accepted.") 7882 (insert " No keywords accepted.")
7883 (setq col 9) 7883 (setq col 9)
7884 (mapcar 7884 (mapcar
7885 (lambda (x) 7885 (lambda (x)
7886 (if (>= (+ col 1 (length (car x))) 7886 (if (>= (+ col 1 (length (car x)))
7887 (window-width)) 7887 (window-width))
7888 (progn 7888 (progn
7889 (insert "\n ") 7889 (insert "\n ")
@@ -7901,7 +7901,7 @@ If we do not know about MODULE, just return KEYWORD literally."
7901 (add-text-properties beg (point) props) 7901 (add-text-properties beg (point) props)
7902 (setq col (+ col 1 (length (car x))))) 7902 (setq col (+ col 1 (length (car x)))))
7903 keywords)) 7903 keywords))
7904 7904
7905 (setq cnt 1 total (length all)) 7905 (setq cnt 1 total (length all))
7906 ;; Here entry is (key file (list of type-conses)) 7906 ;; Here entry is (key file (list of type-conses))
7907 (while (setq entry (pop all)) 7907 (while (setq entry (pop all))
@@ -7914,7 +7914,7 @@ If we do not know about MODULE, just return KEYWORD literally."
7914 (cdr (car (nth 2 entry)))) 7914 (cdr (car (nth 2 entry))))
7915 'data (cons 'source data))) 7915 'data (cons 'source data)))
7916 (idlwave-insert-source-location 7916 (idlwave-insert-source-location
7917 (format "\n%-8s %s" 7917 (format "\n%-8s %s"
7918 (if (equal cnt 1) 7918 (if (equal cnt 1)
7919 (if (> total 1) "Sources:" "Source:") 7919 (if (> total 1) "Sources:" "Source:")
7920 "") 7920 "")
@@ -7923,7 +7923,7 @@ If we do not know about MODULE, just return KEYWORD literally."
7923 (incf cnt) 7923 (incf cnt)
7924 (when (and all (> cnt idlwave-rinfo-max-source-lines)) 7924 (when (and all (> cnt idlwave-rinfo-max-source-lines))
7925 ;; No more source lines, please 7925 ;; No more source lines, please
7926 (insert (format 7926 (insert (format
7927 "\n Source information truncated to %d entries." 7927 "\n Source information truncated to %d entries."
7928 idlwave-rinfo-max-source-lines)) 7928 idlwave-rinfo-max-source-lines))
7929 (setq all nil))) 7929 (setq all nil)))
@@ -7937,7 +7937,7 @@ If we do not know about MODULE, just return KEYWORD literally."
7937 (unwind-protect 7937 (unwind-protect
7938 (progn 7938 (progn
7939 (select-window win) 7939 (select-window win)
7940 (enlarge-window (- (/ (frame-height) 2) 7940 (enlarge-window (- (/ (frame-height) 2)
7941 (window-height))) 7941 (window-height)))
7942 (shrink-window-if-larger-than-buffer)) 7942 (shrink-window-if-larger-than-buffer))
7943 (select-window ww))))))))) 7943 (select-window ww)))))))))
@@ -7974,9 +7974,9 @@ it."
7974 ((and (not file) shell-flag) 7974 ((and (not file) shell-flag)
7975 (insert "Unresolved")) 7975 (insert "Unresolved"))
7976 7976
7977 ((null file) 7977 ((null file)
7978 (insert "ERROR")) 7978 (insert "ERROR"))
7979 7979
7980 ((idlwave-syslib-p file) 7980 ((idlwave-syslib-p file)
7981 (if (string-match "obsolete" (file-name-directory file)) 7981 (if (string-match "obsolete" (file-name-directory file))
7982 (insert "Obsolete ") 7982 (insert "Obsolete ")
@@ -7990,7 +7990,7 @@ it."
7990 ;; Old special syntax: a matching regexp 7990 ;; Old special syntax: a matching regexp
7991 ((setq special (idlwave-special-lib-test file)) 7991 ((setq special (idlwave-special-lib-test file))
7992 (insert (format "%-10s" special))) 7992 (insert (format "%-10s" special)))
7993 7993
7994 ;; Catch-all with file 7994 ;; Catch-all with file
7995 ((idlwave-lib-p file) (insert "Library ")) 7995 ((idlwave-lib-p file) (insert "Library "))
7996 7996
@@ -8005,7 +8005,7 @@ it."
8005 (if shell-flag "S" "-") 8005 (if shell-flag "S" "-")
8006 (if buffer-flag "B" "-") 8006 (if buffer-flag "B" "-")
8007 "] "))) 8007 "] ")))
8008 (when (> ndupl 1) 8008 (when (> ndupl 1)
8009 (setq beg (point)) 8009 (setq beg (point))
8010 (insert (format "(%dx) " ndupl)) 8010 (insert (format "(%dx) " ndupl))
8011 (add-text-properties beg (point) (list 'face 'bold))) 8011 (add-text-properties beg (point) (list 'face 'bold)))
@@ -8029,7 +8029,7 @@ Return the name of the special lib if there is a match."
8029 alist nil))) 8029 alist nil)))
8030 rtn) 8030 rtn)
8031 (t nil)))) 8031 (t nil))))
8032 8032
8033(defun idlwave-mouse-active-rinfo-right (ev) 8033(defun idlwave-mouse-active-rinfo-right (ev)
8034 (interactive "e") 8034 (interactive "e")
8035 (idlwave-mouse-active-rinfo ev 'right)) 8035 (idlwave-mouse-active-rinfo ev 'right))
@@ -8062,9 +8062,9 @@ was pressed."
8062 8062
8063 (cond ((eq id 'class) ; Switch class being displayed 8063 (cond ((eq id 'class) ; Switch class being displayed
8064 (if (window-live-p bufwin) (select-window bufwin)) 8064 (if (window-live-p bufwin) (select-window bufwin))
8065 (idlwave-display-calling-sequence 8065 (idlwave-display-calling-sequence
8066 (idlwave-sintern-method name) 8066 (idlwave-sintern-method name)
8067 type (idlwave-sintern-class word) 8067 type (idlwave-sintern-class word)
8068 initial-class)) 8068 initial-class))
8069 ((eq id 'usage) ; Online help on this routine 8069 ((eq id 'usage) ; Online help on this routine
8070 (idlwave-online-help link name type class)) 8070 (idlwave-online-help link name type class))
@@ -8105,9 +8105,9 @@ was pressed."
8105 (setq bwin (get-buffer-window buffer))) 8105 (setq bwin (get-buffer-window buffer)))
8106 (if (eq (preceding-char) ?/) 8106 (if (eq (preceding-char) ?/)
8107 (insert keyword) 8107 (insert keyword)
8108 (unless (save-excursion 8108 (unless (save-excursion
8109 (re-search-backward 8109 (re-search-backward
8110 "[(,][ \t]*\\(\\$[ \t]*\\(;.*\\)?\n\\)?[ \t]*\\=" 8110 "[(,][ \t]*\\(\\$[ \t]*\\(;.*\\)?\n\\)?[ \t]*\\="
8111 (min (- (point) 100) (point-min)) t)) 8111 (min (- (point) 100) (point-min)) t))
8112 (insert ", ")) 8112 (insert ", "))
8113 (if shift (insert "/")) 8113 (if shift (insert "/"))
@@ -8159,7 +8159,7 @@ the load path in order to find a definition. The output of this
8159command can be used to detect possible name clashes during this process." 8159command can be used to detect possible name clashes during this process."
8160 (idlwave-routines) ; Make sure everything is loaded. 8160 (idlwave-routines) ; Make sure everything is loaded.
8161 (unless (or idlwave-user-catalog-routines idlwave-library-catalog-routines) 8161 (unless (or idlwave-user-catalog-routines idlwave-library-catalog-routines)
8162 (or (y-or-n-p 8162 (or (y-or-n-p
8163 "You don't have any user or library catalogs. Continue anyway? ") 8163 "You don't have any user or library catalogs. Continue anyway? ")
8164 (error "Abort"))) 8164 (error "Abort")))
8165 (let* ((routines (append idlwave-system-routines 8165 (let* ((routines (append idlwave-system-routines
@@ -8172,7 +8172,7 @@ command can be used to detect possible name clashes during this process."
8172 (keymap (make-sparse-keymap)) 8172 (keymap (make-sparse-keymap))
8173 (props (list 'mouse-face 'highlight 8173 (props (list 'mouse-face 'highlight
8174 km-prop keymap 8174 km-prop keymap
8175 'help-echo "Mouse2: Find source")) 8175 'help-echo "Mouse2: Find source"))
8176 (nroutines (length (or special-routines routines))) 8176 (nroutines (length (or special-routines routines)))
8177 (step (/ nroutines 99)) 8177 (step (/ nroutines 99))
8178 (n 0) 8178 (n 0)
@@ -8196,13 +8196,13 @@ command can be used to detect possible name clashes during this process."
8196 (message "Sorting routines...done") 8196 (message "Sorting routines...done")
8197 8197
8198 (define-key keymap (if (featurep 'xemacs) [(button2)] [(mouse-2)]) 8198 (define-key keymap (if (featurep 'xemacs) [(button2)] [(mouse-2)])
8199 (lambda (ev) 8199 (lambda (ev)
8200 (interactive "e") 8200 (interactive "e")
8201 (mouse-set-point ev) 8201 (mouse-set-point ev)
8202 (apply 'idlwave-do-find-module 8202 (apply 'idlwave-do-find-module
8203 (get-text-property (point) 'find-args)))) 8203 (get-text-property (point) 'find-args))))
8204 (define-key keymap [(return)] 8204 (define-key keymap [(return)]
8205 (lambda () 8205 (lambda ()
8206 (interactive) 8206 (interactive)
8207 (apply 'idlwave-do-find-module 8207 (apply 'idlwave-do-find-module
8208 (get-text-property (point) 'find-args)))) 8208 (get-text-property (point) 'find-args))))
@@ -8230,13 +8230,13 @@ command can be used to detect possible name clashes during this process."
8230 (> (idlwave-count-memq 'buffer (nth 2 (car dtwins))) 1)) 8230 (> (idlwave-count-memq 'buffer (nth 2 (car dtwins))) 1))
8231 (incf cnt) 8231 (incf cnt)
8232 (insert (format "\n%s%s" 8232 (insert (format "\n%s%s"
8233 (idlwave-make-full-name (nth 2 routine) 8233 (idlwave-make-full-name (nth 2 routine)
8234 (car routine)) 8234 (car routine))
8235 (if (eq (nth 1 routine) 'fun) "()" ""))) 8235 (if (eq (nth 1 routine) 'fun) "()" "")))
8236 (while (setq twin (pop dtwins)) 8236 (while (setq twin (pop dtwins))
8237 (setq props1 (append (list 'find-args 8237 (setq props1 (append (list 'find-args
8238 (list (nth 0 routine) 8238 (list (nth 0 routine)
8239 (nth 1 routine) 8239 (nth 1 routine)
8240 (nth 2 routine))) 8240 (nth 2 routine)))
8241 props)) 8241 props))
8242 (idlwave-insert-source-location "\n - " twin props1)))) 8242 (idlwave-insert-source-location "\n - " twin props1))))
@@ -8259,7 +8259,7 @@ command can be used to detect possible name clashes during this process."
8259 (or (not (stringp sfile)) 8259 (or (not (stringp sfile))
8260 (not (string-match "\\S-" sfile)))) 8260 (not (string-match "\\S-" sfile))))
8261 (setq stype 'unresolved)) 8261 (setq stype 'unresolved))
8262 (princ (format " %-10s %s\n" 8262 (princ (format " %-10s %s\n"
8263 stype 8263 stype
8264 (if sfile sfile "No source code available"))))) 8264 (if sfile sfile "No source code available")))))
8265 8265
@@ -8278,20 +8278,20 @@ ENTRY will also be returned, as the first item of this list."
8278 (eq type (nth 1 candidate)) 8278 (eq type (nth 1 candidate))
8279 (eq class (nth 2 candidate))) 8279 (eq class (nth 2 candidate)))
8280 (push candidate twins))) 8280 (push candidate twins)))
8281 (if (setq candidate (idlwave-rinfo-assq name type class 8281 (if (setq candidate (idlwave-rinfo-assq name type class
8282 idlwave-unresolved-routines)) 8282 idlwave-unresolved-routines))
8283 (push candidate twins)) 8283 (push candidate twins))
8284 (cons entry (nreverse twins)))) 8284 (cons entry (nreverse twins))))
8285 8285
8286(defun idlwave-study-twins (entries) 8286(defun idlwave-study-twins (entries)
8287 "Return dangerous twins of first entry in ENTRIES. 8287 "Return dangerous twins of first entry in ENTRIES.
8288Dangerous twins are routines with same name, but in different files on 8288Dangerous twins are routines with same name, but in different files on
8289the load path. If a file is in the system library and has an entry in 8289the load path. If a file is in the system library and has an entry in
8290the `idlwave-system-routines' list, we omit the latter as 8290the `idlwave-system-routines' list, we omit the latter as
8291non-dangerous because many IDL routines are implemented as library 8291non-dangerous because many IDL routines are implemented as library
8292routines, and may have been scanned." 8292routines, and may have been scanned."
8293 (let* ((entry (car entries)) 8293 (let* ((entry (car entries))
8294 (name (car entry)) ; 8294 (name (car entry)) ;
8295 (type (nth 1 entry)) ; Must be bound for 8295 (type (nth 1 entry)) ; Must be bound for
8296 (class (nth 2 entry)) ; idlwave-routine-twin-compare 8296 (class (nth 2 entry)) ; idlwave-routine-twin-compare
8297 (cnt 0) 8297 (cnt 0)
@@ -8309,23 +8309,23 @@ routines, and may have been scanned."
8309 (t 'unresolved))) 8309 (t 'unresolved)))
8310 8310
8311 ;; Check for an entry in the system library 8311 ;; Check for an entry in the system library
8312 (if (and file 8312 (if (and file
8313 (not syslibp) 8313 (not syslibp)
8314 (idlwave-syslib-p file)) 8314 (idlwave-syslib-p file))
8315 (setq syslibp t)) 8315 (setq syslibp t))
8316 8316
8317 ;; If there's more than one matching entry for the same file, just 8317 ;; If there's more than one matching entry for the same file, just
8318 ;; append the type-cons to the type list. 8318 ;; append the type-cons to the type list.
8319 (if (setq entry (assoc key alist)) 8319 (if (setq entry (assoc key alist))
8320 (push type-cons (nth 2 entry)) 8320 (push type-cons (nth 2 entry))
8321 (push (list key file (list type-cons)) alist))) 8321 (push (list key file (list type-cons)) alist)))
8322 8322
8323 (setq alist (nreverse alist)) 8323 (setq alist (nreverse alist))
8324 8324
8325 (when syslibp 8325 (when syslibp
8326 ;; File is in system *library* - remove any 'system entry 8326 ;; File is in system *library* - remove any 'system entry
8327 (setq alist (delq (assq 'system alist) alist))) 8327 (setq alist (delq (assq 'system alist) alist)))
8328 8328
8329 ;; If 'system remains and we've scanned the syslib, it's a builtin 8329 ;; If 'system remains and we've scanned the syslib, it's a builtin
8330 ;; (rather than a !DIR/lib/.pro file bundled as source). 8330 ;; (rather than a !DIR/lib/.pro file bundled as source).
8331 (when (and (idlwave-syslib-scanned-p) 8331 (when (and (idlwave-syslib-scanned-p)
@@ -8362,7 +8362,7 @@ compares twins on the basis of their file names and path locations."
8362 ((not (eq type (nth 1 b))) 8362 ((not (eq type (nth 1 b)))
8363 ;; Type decides 8363 ;; Type decides
8364 (< (if (eq type 'fun) 1 0) (if (eq (nth 1 b) 'fun) 1 0))) 8364 (< (if (eq type 'fun) 1 0) (if (eq (nth 1 b) 'fun) 1 0)))
8365 (t 8365 (t
8366 ;; A and B are twins - so the decision is more complicated. 8366 ;; A and B are twins - so the decision is more complicated.
8367 ;; Call twin-compare with the proper arguments. 8367 ;; Call twin-compare with the proper arguments.
8368 (idlwave-routine-entry-compare-twins a b))))) 8368 (idlwave-routine-entry-compare-twins a b)))))
@@ -8414,7 +8414,7 @@ This expects NAME TYPE CLASS to be bound to the right values."
8414 (tpath-alist (idlwave-true-path-alist)) 8414 (tpath-alist (idlwave-true-path-alist))
8415 (apathp (and (stringp akey) 8415 (apathp (and (stringp akey)
8416 (assoc (file-name-directory akey) tpath-alist))) 8416 (assoc (file-name-directory akey) tpath-alist)))
8417 (bpathp (and (stringp bkey) 8417 (bpathp (and (stringp bkey)
8418 (assoc (file-name-directory bkey) tpath-alist))) 8418 (assoc (file-name-directory bkey) tpath-alist)))
8419 ;; How early on search path? High number means early since we 8419 ;; How early on search path? High number means early since we
8420 ;; measure the tail of the path list 8420 ;; measure the tail of the path list
@@ -8450,7 +8450,7 @@ This expects NAME TYPE CLASS to be bound to the right values."
8450 (t nil)))) ; Default 8450 (t nil)))) ; Default
8451 8451
8452(defun idlwave-routine-source-file (source) 8452(defun idlwave-routine-source-file (source)
8453 (if (nth 2 source) 8453 (if (nth 2 source)
8454 (expand-file-name (nth 1 source) (nth 2 source)) 8454 (expand-file-name (nth 1 source) (nth 2 source))
8455 (nth 1 source))) 8455 (nth 1 source)))
8456 8456
@@ -8540,7 +8540,7 @@ Assumes that point is at the beginning of the unit as found by
8540 (forward-sexp 2) 8540 (forward-sexp 2)
8541 (forward-sexp -1) 8541 (forward-sexp -1)
8542 (let ((begin (point))) 8542 (let ((begin (point)))
8543 (re-search-forward 8543 (re-search-forward
8544 "[a-zA-Z_][a-zA-Z0-9$_]+\\(::[a-zA-Z_][a-zA-Z0-9$_]+\\)?") 8544 "[a-zA-Z_][a-zA-Z0-9$_]+\\(::[a-zA-Z_][a-zA-Z0-9$_]+\\)?")
8545 (if (fboundp 'buffer-substring-no-properties) 8545 (if (fboundp 'buffer-substring-no-properties)
8546 (buffer-substring-no-properties begin (point)) 8546 (buffer-substring-no-properties begin (point))
@@ -8580,12 +8580,12 @@ Assumes that point is at the beginning of the unit as found by
8580 (start-process "idldeclient" nil 8580 (start-process "idldeclient" nil
8581 idlwave-shell-explicit-file-name "-c" "-e" 8581 idlwave-shell-explicit-file-name "-c" "-e"
8582 (buffer-file-name) "&")) 8582 (buffer-file-name) "&"))
8583 8583
8584(defun idlwave-launch-idlhelp () 8584(defun idlwave-launch-idlhelp ()
8585 "Start the IDLhelp application." 8585 "Start the IDLhelp application."
8586 (interactive) 8586 (interactive)
8587 (start-process "idlhelp" nil idlwave-help-application)) 8587 (start-process "idlhelp" nil idlwave-help-application))
8588 8588
8589;; Menus - using easymenu.el 8589;; Menus - using easymenu.el
8590(defvar idlwave-mode-menu-def 8590(defvar idlwave-mode-menu-def
8591 `("IDLWAVE" 8591 `("IDLWAVE"
@@ -8672,7 +8672,7 @@ Assumes that point is at the beginning of the unit as found by
8672 ("Customize" 8672 ("Customize"
8673 ["Browse IDLWAVE Group" idlwave-customize t] 8673 ["Browse IDLWAVE Group" idlwave-customize t]
8674 "--" 8674 "--"
8675 ["Build Full Customize Menu" idlwave-create-customize-menu 8675 ["Build Full Customize Menu" idlwave-create-customize-menu
8676 (fboundp 'customize-menu-create)]) 8676 (fboundp 'customize-menu-create)])
8677 ("Documentation" 8677 ("Documentation"
8678 ["Describe Mode" describe-mode t] 8678 ["Describe Mode" describe-mode t]
@@ -8689,22 +8689,22 @@ Assumes that point is at the beginning of the unit as found by
8689 '("Debug" 8689 '("Debug"
8690 ["Start IDL shell" idlwave-shell t] 8690 ["Start IDL shell" idlwave-shell t]
8691 ["Save and .RUN buffer" idlwave-shell-save-and-run 8691 ["Save and .RUN buffer" idlwave-shell-save-and-run
8692 (and (boundp 'idlwave-shell-automatic-start) 8692 (and (boundp 'idlwave-shell-automatic-start)
8693 idlwave-shell-automatic-start)])) 8693 idlwave-shell-automatic-start)]))
8694 8694
8695(if (or (featurep 'easymenu) (load "easymenu" t)) 8695(if (or (featurep 'easymenu) (load "easymenu" t))
8696 (progn 8696 (progn
8697 (easy-menu-define idlwave-mode-menu idlwave-mode-map 8697 (easy-menu-define idlwave-mode-menu idlwave-mode-map
8698 "IDL and WAVE CL editing menu" 8698 "IDL and WAVE CL editing menu"
8699 idlwave-mode-menu-def) 8699 idlwave-mode-menu-def)
8700 (easy-menu-define idlwave-mode-debug-menu idlwave-mode-map 8700 (easy-menu-define idlwave-mode-debug-menu idlwave-mode-map
8701 "IDL and WAVE CL editing menu" 8701 "IDL and WAVE CL editing menu"
8702 idlwave-mode-debug-menu-def))) 8702 idlwave-mode-debug-menu-def)))
8703 8703
8704(defun idlwave-customize () 8704(defun idlwave-customize ()
8705 "Call the customize function with idlwave as argument." 8705 "Call the customize function with idlwave as argument."
8706 (interactive) 8706 (interactive)
8707 ;; Try to load the code for the shell, so that we can customize it 8707 ;; Try to load the code for the shell, so that we can customize it
8708 ;; as well. 8708 ;; as well.
8709 (or (featurep 'idlw-shell) 8709 (or (featurep 'idlw-shell)
8710 (load "idlw-shell" t)) 8710 (load "idlw-shell" t))
@@ -8715,11 +8715,11 @@ Assumes that point is at the beginning of the unit as found by
8715 (interactive) 8715 (interactive)
8716 (if (fboundp 'customize-menu-create) 8716 (if (fboundp 'customize-menu-create)
8717 (progn 8717 (progn
8718 ;; Try to load the code for the shell, so that we can customize it 8718 ;; Try to load the code for the shell, so that we can customize it
8719 ;; as well. 8719 ;; as well.
8720 (or (featurep 'idlw-shell) 8720 (or (featurep 'idlw-shell)
8721 (load "idlw-shell" t)) 8721 (load "idlw-shell" t))
8722 (easy-menu-change 8722 (easy-menu-change
8723 '("IDLWAVE") "Customize" 8723 '("IDLWAVE") "Customize"
8724 `(["Browse IDLWAVE group" idlwave-customize t] 8724 `(["Browse IDLWAVE group" idlwave-customize t]
8725 "--" 8725 "--"
@@ -8767,7 +8767,7 @@ This function was written since `list-abbrevs' looks terrible for IDLWAVE mode."
8767 (let ((table (symbol-value 'idlwave-mode-abbrev-table)) 8767 (let ((table (symbol-value 'idlwave-mode-abbrev-table))
8768 abbrevs 8768 abbrevs
8769 str rpl func fmt (len-str 0) (len-rpl 0)) 8769 str rpl func fmt (len-str 0) (len-rpl 0))
8770 (mapatoms 8770 (mapatoms
8771 (lambda (sym) 8771 (lambda (sym)
8772 (if (symbol-value sym) 8772 (if (symbol-value sym)
8773 (progn 8773 (progn
@@ -8793,7 +8793,7 @@ This function was written since `list-abbrevs' looks terrible for IDLWAVE mode."
8793 (with-output-to-temp-buffer "*Help*" 8793 (with-output-to-temp-buffer "*Help*"
8794 (if arg 8794 (if arg
8795 (progn 8795 (progn
8796 (princ "Abbreviations and Actions in IDLWAVE-Mode\n") 8796 (princ "Abbreviations and Actions in IDLWAVE-Mode\n")
8797 (princ "=========================================\n\n") 8797 (princ "=========================================\n\n")
8798 (princ (format fmt "KEY" "REPLACE" "HOOK")) 8798 (princ (format fmt "KEY" "REPLACE" "HOOK"))
8799 (princ (format fmt "---" "-------" "----"))) 8799 (princ (format fmt "---" "-------" "----")))
diff --git a/lisp/progmodes/ld-script.el b/lisp/progmodes/ld-script.el
index 120cae538d5..ef24604ba7b 100644
--- a/lisp/progmodes/ld-script.el
+++ b/lisp/progmodes/ld-script.el
@@ -1,6 +1,6 @@
1;;; ld-script.el --- GNU linker script editing mode for Emacs 1;;; ld-script.el --- GNU linker script editing mode for Emacs
2 2
3;; Copyright (C) 2003 Free Software Foundation, Inc. 3;; Copyright (C) 2003, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Masatake YAMATO<jet@gyve.org> 5;; Author: Masatake YAMATO<jet@gyve.org>
6;; Keywords: languages, faces 6;; Keywords: languages, faces
@@ -34,11 +34,13 @@
34 :prefix "ld-script-" 34 :prefix "ld-script-"
35 :group 'languages) 35 :group 'languages)
36 36
37(defvar ld-script-location-counter-face 'ld-script-location-counter-face) 37(defvar ld-script-location-counter-face 'ld-script-location-counter)
38(defface ld-script-location-counter-face 38(defface ld-script-location-counter
39 '((t (:weight bold :inherit font-lock-builtin-face))) 39 '((t (:weight bold :inherit font-lock-builtin-face)))
40 "Face for location counter in GNU ld script." 40 "Face for location counter in GNU ld script."
41 :group 'ld-script) 41 :group 'ld-script)
42;; backward-compatibility alias
43(put 'ld-script-location-counter-face 'face-alias 'ld-script-location-counter)
42 44
43;; Syntax rules 45;; Syntax rules
44(defvar ld-script-mode-syntax-table 46(defvar ld-script-mode-syntax-table
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el
index 055cdf7fc7d..d9c38349b49 100644
--- a/lisp/progmodes/make-mode.el
+++ b/lisp/progmodes/make-mode.el
@@ -99,35 +99,38 @@
99 :group 'tools 99 :group 'tools
100 :prefix "makefile-") 100 :prefix "makefile-")
101 101
102(defface makefile-space-face 102(defface makefile-space
103 '((((class color)) (:background "hotpink")) 103 '((((class color)) (:background "hotpink"))
104 (t (:reverse-video t))) 104 (t (:reverse-video t)))
105 "Face to use for highlighting leading spaces in Font-Lock mode." 105 "Face to use for highlighting leading spaces in Font-Lock mode."
106 :group 'faces 106 :group 'faces
107 :group 'makefile) 107 :group 'makefile)
108 108
109(defface makefile-targets-face 109(defface makefile-targets
110 ;; This needs to go along both with foreground and background colors (i.e. shell) 110 ;; This needs to go along both with foreground and background colors (i.e. shell)
111 '((t (:underline t))) 111 '((t (:inherit font-lock-function-name-face)))
112 "Face to use for additionally highlighting rule targets in Font-Lock mode." 112 "Face to use for additionally highlighting rule targets in Font-Lock mode."
113 :group 'faces 113 :group 'faces
114 :group 'makefile) 114 :group 'makefile
115 :version "22.1")
115 116
116(defface makefile-shell-face 117(defface makefile-shell
117 '((((class color) (background light)) (:background "seashell1")) 118 ()
118 (((class color) (background dark)) (:background "seashell4")) 119 ;;'((((class color) (min-colors 88) (background light)) (:background "seashell1"))
119 (t (:reverse-video t))) 120 ;; (((class color) (min-colors 88) (background dark)) (:background "seashell4")))
120 "Face to use for additionally highlighting Shell commands in Font-Lock mode." 121 "Face to use for additionally highlighting Shell commands in Font-Lock mode."
121 :group 'faces 122 :group 'faces
122 :group 'makefile) 123 :group 'makefile
124 :version "22.1")
123 125
124(defface makefile-makepp-perl-face 126(defface makefile-makepp-perl
125 '((((class color) (background light)) (:background "LightBlue1")) ; Camel Book 127 '((((class color) (background light)) (:background "LightBlue1")) ; Camel Book
126 (((class color) (background dark)) (:background "DarkBlue")) 128 (((class color) (background dark)) (:background "DarkBlue"))
127 (t (:reverse-video t))) 129 (t (:reverse-video t)))
128 "Face to use for additionally highlighting Perl code in Font-Lock mode." 130 "Face to use for additionally highlighting Perl code in Font-Lock mode."
129 :group 'faces 131 :group 'faces
130 :group 'makefile) 132 :group 'makefile
133 :version "22.1")
131 134
132(defcustom makefile-browser-buffer-name "*Macros and Targets*" 135(defcustom makefile-browser-buffer-name "*Macros and Targets*"
133 "*Name of the macro- and target browser buffer." 136 "*Name of the macro- and target browser buffer."
@@ -259,9 +262,14 @@ not be enclosed in { } or ( )."
259;; index in makefile-imenu-generic-expression. 262;; index in makefile-imenu-generic-expression.
260(defvar makefile-dependency-regex 263(defvar makefile-dependency-regex
261 ;; Allow for two nested levels $(v1:$(v2:$(v3:a=b)=c)=d) 264 ;; Allow for two nested levels $(v1:$(v2:$(v3:a=b)=c)=d)
262 "^ *\\(\\(?: *\\$\\(?:[({]\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[^({]\\|.[^\n$#})]+?[})]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\| *[^ \n$#:=]+\\)+?\\)[ \t]*\\(:\\)\\(?:[ \t]*$\\|[^=\n]\\(?:[^#\n]*?;[ \t]*\\(.+\\)\\)?\\)" 265 "^\\(\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[^({]\\|.[^\n$#})]+?[})]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#:=]\\)+?\\)\\(:\\)\\(?:[ \t]*$\\|[^=\n]\\(?:[^#\n]*?;[ \t]*\\(.+\\)\\)?\\)"
263 "Regex used to find dependency lines in a makefile.") 266 "Regex used to find dependency lines in a makefile.")
264 267
268(defconst makefile-bsdmake-dependency-regex
269 (progn (string-match (regexp-quote "\\(:\\)") makefile-dependency-regex)
270 (replace-match "\\([:!]\\)" t t makefile-dependency-regex))
271 "Regex used to find dependency lines in a BSD makefile.")
272
265(defvar makefile-dependency-skip "^:" 273(defvar makefile-dependency-skip "^:"
266 "Characters to skip to find a line that might be a dependency.") 274 "Characters to skip to find a line that might be a dependency.")
267 275
@@ -269,11 +277,21 @@ not be enclosed in { } or ( )."
269 "^\t[ \t]*\\([-@]*\\)[ \t]*\\(\\(?:.*\\\\\n\\)*.*\\)" 277 "^\t[ \t]*\\([-@]*\\)[ \t]*\\(\\(?:.*\\\\\n\\)*.*\\)"
270 "Regex used to highlight rule action lines in font lock mode.") 278 "Regex used to highlight rule action lines in font lock mode.")
271 279
280(defconst makefile-makepp-rule-action-regex
281 ;; Don't care about initial tab, but I don't know how to font-lock correctly without.
282 "^\t[ \t]*\\(\\(?:\\(?:noecho\\|ignore[-_]error\\|[-@]+\\)[ \t]*\\)*\\)\\(\\(&\\S +\\)?\\(?:.*\\\\\n\\)*.*\\)"
283 "Regex used to highlight makepp rule action lines in font lock mode.")
284
285(defconst makefile-bsdmake-rule-action-regex
286 (progn (string-match "-@" makefile-rule-action-regex)
287 (replace-match "-+@" t t makefile-rule-action-regex))
288 "Regex used to highlight BSD rule action lines in font lock mode.")
289
272;; Note that the first and second subexpression is used by font lock. Note 290;; Note that the first and second subexpression is used by font lock. Note
273;; that if you change this regexp you might have to fix the imenu index in 291;; that if you change this regexp you might have to fix the imenu index in
274;; makefile-imenu-generic-expression. 292;; makefile-imenu-generic-expression.
275(defconst makefile-macroassign-regex 293(defconst makefile-macroassign-regex
276 "^ *\\([^ \n\t][^:#= \t\n]*\\)[ \t]*\\(?:!=[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)\\|[*:+]?[:?]?=[ \t]*\\(\\(?:.*\\\\\n\\)*.*\\)\\)" 294 "^ *\\([^ \n\t][^:#= \t\n]*\\)[ \t]*\\(?:!=\\|[*:+]?[:?]?=\\)"
277 "Regex used to find macro assignment lines in a makefile.") 295 "Regex used to find macro assignment lines in a makefile.")
278 296
279(defconst makefile-var-use-regex 297(defconst makefile-var-use-regex
@@ -285,8 +303,8 @@ not be enclosed in { } or ( )."
285 "Regex for filenames that will NOT be included in the target list.") 303 "Regex for filenames that will NOT be included in the target list.")
286 304
287(if (fboundp 'facemenu-unlisted-faces) 305(if (fboundp 'facemenu-unlisted-faces)
288 (add-to-list 'facemenu-unlisted-faces 'makefile-space-face)) 306 (add-to-list 'facemenu-unlisted-faces 'makefile-space))
289(defvar makefile-space-face 'makefile-space-face 307(defvar makefile-space 'makefile-space
290 "Face to use for highlighting leading spaces in Font-Lock mode.") 308 "Face to use for highlighting leading spaces in Font-Lock mode.")
291 309
292;; These lists were inspired by the old solution. But they are silly, because 310;; These lists were inspired by the old solution. But they are silly, because
@@ -331,14 +349,14 @@ not be enclosed in { } or ( )."
331 (,makefile-macroassign-regex 349 (,makefile-macroassign-regex
332 (1 font-lock-variable-name-face) 350 (1 font-lock-variable-name-face)
333 ;; This is for after != 351 ;; This is for after !=
334 (2 'makefile-shell-face prepend t) 352 (2 'makefile-shell prepend t)
335 ;; This is for after normal assignment 353 ;; This is for after normal assignment
336 (3 'font-lock-string-face prepend t)) 354 (3 'font-lock-string-face prepend t))
337 355
338 ;; Rule actions. 356 ;; Rule actions.
339 (makefile-match-action 357 (makefile-match-action
340 (1 font-lock-type-face) 358 (1 font-lock-type-face)
341 (2 'makefile-shell-face prepend) 359 (2 'makefile-shell prepend)
342 ;; Only makepp has builtin commands. 360 ;; Only makepp has builtin commands.
343 (3 font-lock-builtin-face prepend t)) 361 (3 font-lock-builtin-face prepend t))
344 362
@@ -350,7 +368,7 @@ not be enclosed in { } or ( )."
350 ("[^$]\\$\\([@%<?^+*_]\\|[a-zA-Z0-9]\\>\\)" 368 ("[^$]\\$\\([@%<?^+*_]\\|[a-zA-Z0-9]\\>\\)"
351 1 font-lock-constant-face prepend) 369 1 font-lock-constant-face prepend)
352 ("[^$]\\(\\$[@%*]\\)" 370 ("[^$]\\(\\$[@%*]\\)"
353 1 'makefile-targets-face prepend) 371 1 'makefile-targets append)
354 372
355 ;; Fontify conditionals and includes. 373 ;; Fontify conditionals and includes.
356 (,(concat "^\\(?: [ \t]*\\)?" 374 (,(concat "^\\(?: [ \t]*\\)?"
@@ -365,22 +383,22 @@ not be enclosed in { } or ( )."
365 ,@(if space 383 ,@(if space
366 '(;; Highlight lines that contain just whitespace. 384 '(;; Highlight lines that contain just whitespace.
367 ;; They can cause trouble, especially if they start with a tab. 385 ;; They can cause trouble, especially if they start with a tab.
368 ("^[ \t]+$" . makefile-space-face) 386 ("^[ \t]+$" . makefile-space)
369 387
370 ;; Highlight shell comments that Make treats as commands, 388 ;; Highlight shell comments that Make treats as commands,
371 ;; since these can fool people. 389 ;; since these can fool people.
372 ("^\t+#" 0 makefile-space-face t) 390 ("^\t+#" 0 makefile-space t)
373 391
374 ;; Highlight spaces that precede tabs. 392 ;; Highlight spaces that precede tabs.
375 ;; They can make a tab fail to be effective. 393 ;; They can make a tab fail to be effective.
376 ("^\\( +\\)\t" 1 makefile-space-face))) 394 ("^\\( +\\)\t" 1 makefile-space)))
377 395
378 ,@font-lock-keywords 396 ,@font-lock-keywords
379 397
380 ;; Do dependencies. 398 ;; Do dependencies.
381 (makefile-match-dependency 399 (makefile-match-dependency
382 (1 'makefile-targets-face prepend) 400 (1 'makefile-targets prepend)
383 (3 'makefile-shell-face prepend t)))) 401 (3 'makefile-shell prepend t))))
384 402
385(defconst makefile-font-lock-keywords 403(defconst makefile-font-lock-keywords
386 (makefile-make-font-lock-keywords 404 (makefile-make-font-lock-keywords
@@ -402,7 +420,7 @@ not be enclosed in { } or ( )."
402 "^\\(?: [ \t]*\\)?if\\(n\\)\\(?:def\\|eq\\)\\>" 420 "^\\(?: [ \t]*\\)?if\\(n\\)\\(?:def\\|eq\\)\\>"
403 421
404 '("[^$]\\(\\$[({][@%*][DF][})]\\)" 422 '("[^$]\\(\\$[({][@%*][DF][})]\\)"
405 1 'makefile-targets-face prepend) 423 1 'makefile-targets append)
406 424
407 ;; $(function ...) ${function ...} 425 ;; $(function ...) ${function ...}
408 '("[^$]\\$[({]\\([-a-zA-Z0-9_.]+\\s \\)" 426 '("[^$]\\$[({]\\([-a-zA-Z0-9_.]+\\s \\)"
@@ -411,7 +429,7 @@ not be enclosed in { } or ( )."
411 ;; $(shell ...) ${shell ...} 429 ;; $(shell ...) ${shell ...}
412 '("[^$]\\$\\([({]\\)shell[ \t]+" 430 '("[^$]\\$\\([({]\\)shell[ \t]+"
413 makefile-match-function-end nil nil 431 makefile-match-function-end nil nil
414 (1 'makefile-shell-face prepend t)))) 432 (1 'makefile-shell prepend t))))
415 433
416(defconst makefile-makepp-font-lock-keywords 434(defconst makefile-makepp-font-lock-keywords
417 (makefile-make-font-lock-keywords 435 (makefile-make-font-lock-keywords
@@ -421,7 +439,7 @@ not be enclosed in { } or ( )."
421 "^\\(?: [ \t]*\\)?\\(?:and[ \t]+\\|else[ \t]+\\|or[ \t]+\\)?if\\(n\\)\\(?:def\\|eq\\|sys\\)\\>" 439 "^\\(?: [ \t]*\\)?\\(?:and[ \t]+\\|else[ \t]+\\|or[ \t]+\\)?if\\(n\\)\\(?:def\\|eq\\|sys\\)\\>"
422 440
423 '("[^$]\\(\\$[({]\\(?:output\\|stem\\|target\\)s?\\_>.*?[})]\\)" 441 '("[^$]\\(\\$[({]\\(?:output\\|stem\\|target\\)s?\\_>.*?[})]\\)"
424 1 'makefile-targets-face prepend) 442 1 'makefile-targets append)
425 443
426 ;; Colon modifier keywords. 444 ;; Colon modifier keywords.
427 '("\\(:\\s *\\)\\(build_c\\(?:ache\\|heck\\)\\|env\\(?:ironment\\)?\\|foreach\\|signature\\|scanner\\|quickscan\\|smartscan\\)\\>\\([^:\n]*\\)" 445 '("\\(:\\s *\\)\\(build_c\\(?:ache\\|heck\\)\\|env\\(?:ironment\\)?\\|foreach\\|signature\\|scanner\\|quickscan\\|smartscan\\)\\>\\([^:\n]*\\)"
@@ -436,32 +454,32 @@ not be enclosed in { } or ( )."
436 ;; $(shell ...) $((shell ...)) ${shell ...} ${{shell ...}} 454 ;; $(shell ...) $((shell ...)) ${shell ...} ${{shell ...}}
437 '("[^$]\\$\\(((?\\|{{?\\)shell\\(?:[-_]\\(?:global[-_]\\)?once\\)?[ \t]+" 455 '("[^$]\\$\\(((?\\|{{?\\)shell\\(?:[-_]\\(?:global[-_]\\)?once\\)?[ \t]+"
438 makefile-match-function-end nil nil 456 makefile-match-function-end nil nil
439 (1 'makefile-shell-face prepend t)) 457 (1 'makefile-shell prepend t))
440 458
441 ;; $(perl ...) $((perl ...)) ${perl ...} ${{perl ...}} 459 ;; $(perl ...) $((perl ...)) ${perl ...} ${{perl ...}}
442 '("[^$]\\$\\(((?\\|{{?\\)makeperl[ \t]+" 460 '("[^$]\\$\\(((?\\|{{?\\)makeperl[ \t]+"
443 makefile-match-function-end nil nil 461 makefile-match-function-end nil nil
444 (1 'makefile-makepp-perl-face prepend t)) 462 (1 'makefile-makepp-perl prepend t))
445 '("[^$]\\$\\(((?\\|{{?\\)perl[ \t]+" 463 '("[^$]\\$\\(((?\\|{{?\\)perl[ \t]+"
446 makefile-match-function-end nil nil 464 makefile-match-function-end nil nil
447 (1 'makefile-makepp-perl-face t t)) 465 (1 'makefile-makepp-perl t t))
448 466
449 ;; Can we unify these with (if (match-end 1) 'prepend t)? 467 ;; Can we unify these with (if (match-end 1) 'prepend t)?
450 '("ifmakeperl\\s +\\(.*\\)" 1 'makefile-makepp-perl-face prepend) 468 '("ifmakeperl\\s +\\(.*\\)" 1 'makefile-makepp-perl prepend)
451 '("ifperl\\s +\\(.*\\)" 1 'makefile-makepp-perl-face t) 469 '("ifperl\\s +\\(.*\\)" 1 'makefile-makepp-perl t)
452 470
453 ;; Perl block single- or multiline, as statement or rule action. 471 ;; Perl block single- or multiline, as statement or rule action.
454 ;; Don't know why the initial newline in 2nd variant of group 2 doesn't get skipped. 472 ;; Don't know why the initial newline in 2nd variant of group 2 doesn't get skipped.
455 '("\\<make\\(?:perl\\|sub\\s +\\S +\\)\\s *\n?\\s *{\\(?:{\\s *\n?\\(\\(?:.*\n\\)+?\\)\\s *}\\|\\s *\\(\\(?:.*?\\|\n?\\(?:.*\n\\)+?\\)\\)\\)}" 473 '("\\<make\\(?:perl\\|sub\\s +\\S +\\)\\s *\n?\\s *{\\(?:{\\s *\n?\\(\\(?:.*\n\\)+?\\)\\s *}\\|\\s *\\(\\(?:.*?\\|\n?\\(?:.*\n\\)+?\\)\\)\\)}"
456 (1 'makefile-makepp-perl-face prepend t) 474 (1 'makefile-makepp-perl prepend t)
457 (2 'makefile-makepp-perl-face prepend t)) 475 (2 'makefile-makepp-perl prepend t))
458 '("\\<\\(?:perl\\|sub\\s +\\S +\\)\\s *\n?\\s *{\\(?:{\\s *\n?\\(\\(?:.*\n\\)+?\\)\\s *}\\|\\s *\\(\\(?:.*?\\|\n?\\(?:.*\n\\)+?\\)\\)\\)}" 476 '("\\<\\(?:perl\\|sub\\s +\\S +\\)\\s *\n?\\s *{\\(?:{\\s *\n?\\(\\(?:.*\n\\)+?\\)\\s *}\\|\\s *\\(\\(?:.*?\\|\n?\\(?:.*\n\\)+?\\)\\)\\)}"
459 (1 'makefile-makepp-perl-face t t) 477 (1 'makefile-makepp-perl t t)
460 (2 'makefile-makepp-perl-face t t)) 478 (2 'makefile-makepp-perl t t))
461 479
462 ;; Statement style perl block. 480 ;; Statement style perl block.
463 '("perl[-_]begin\\s *\\(?:\\s #.*\\)?\n\\(\\(?:.*\n\\)+?\\)\\s *perl[-_]end\\>" 481 '("perl[-_]begin\\s *\\(?:\\s #.*\\)?\n\\(\\(?:.*\n\\)+?\\)\\s *perl[-_]end\\>"
464 1 'makefile-makepp-perl-face t))) 482 1 'makefile-makepp-perl t)))
465 483
466(defconst makefile-bsdmake-font-lock-keywords 484(defconst makefile-bsdmake-font-lock-keywords
467 (makefile-make-font-lock-keywords 485 (makefile-make-font-lock-keywords
@@ -849,10 +867,8 @@ Makefile mode can be configured by modifying the following variables:
849;;;###autoload 867;;;###autoload
850(define-derived-mode makefile-makepp-mode makefile-mode "Makeppfile" 868(define-derived-mode makefile-makepp-mode makefile-mode "Makeppfile"
851 "An adapted `makefile-mode' that knows about makepp." 869 "An adapted `makefile-mode' that knows about makepp."
852 (set (make-local-variable 'makefile-rule-action-regex) 870 (set (make-local-variable 'makefile-rule-action-regex)
853 ;; Don't care about initial tab, but I don't know how to font-lock correctly without. 871 makefile-makepp-rule-action-regex)
854 "^\t[ \t]*\\(\\(?:\\(?:noecho\\|ignore[-_]error\\|[-@]+\\)[ \t]*\\)*\\)\\(\\(&\\S +\\)?\\(?:.*\\\\\n\\)*.*\\)")
855
856 (setq font-lock-defaults 872 (setq font-lock-defaults
857 `(makefile-makepp-font-lock-keywords ,@(cdr font-lock-defaults)) 873 `(makefile-makepp-font-lock-keywords ,@(cdr font-lock-defaults))
858 imenu-generic-expression 874 imenu-generic-expression
@@ -863,11 +879,10 @@ Makefile mode can be configured by modifying the following variables:
863(define-derived-mode makefile-bsdmake-mode makefile-mode "BSDmakefile" 879(define-derived-mode makefile-bsdmake-mode makefile-mode "BSDmakefile"
864 "An adapted `makefile-mode' that knows about BSD make." 880 "An adapted `makefile-mode' that knows about BSD make."
865 (set (make-local-variable 'makefile-dependency-regex) 881 (set (make-local-variable 'makefile-dependency-regex)
866 ;; Identical to default, except allows `!' instead of `:'. 882 makefile-bsdmake-dependency-regex)
867 "^ *\\(\\(?: *\\$\\(?:[({]\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[^({]\\|.[^\n$#})]+?[})]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\| *[^ \n$#:=]+\\)+?\\)[ \t]*\\([:!]\\)\\(?:[ \t]*$\\|[^=\n]\\(?:[^#\n]*?;[ \t]*\\(.+\\)\\)?\\)")
868 (set (make-local-variable 'makefile-dependency-skip) "^:!") 883 (set (make-local-variable 'makefile-dependency-skip) "^:!")
869 (set (make-local-variable 'makefile-rule-action-regex) 884 (set (make-local-variable 'makefile-rule-action-regex)
870 "^\t[ \t]*\\([-+@]*\\)[ \t]*\\(\\(?:.*\\\\\n\\)*.*\\)") 885 makefile-bsdmake-rule-action-regex)
871 (setq font-lock-defaults 886 (setq font-lock-defaults
872 `(makefile-bsdmake-font-lock-keywords ,@(cdr font-lock-defaults)))) 887 `(makefile-bsdmake-font-lock-keywords ,@(cdr font-lock-defaults))))
873 888
@@ -897,6 +912,8 @@ Makefile mode can be configured by modifying the following variables:
897 (backward-char)) 912 (backward-char))
898 (get-text-property (point) 'face) 913 (get-text-property (point) 'face)
899 (beginning-of-line) 914 (beginning-of-line)
915 (if (> (point) (+ (point-min) 2))
916 (eq (char-before (1- (point))) ?\\))
900 (if (looking-at makefile-dependency-regex) 917 (if (looking-at makefile-dependency-regex)
901 (throw 'found t)))) 918 (throw 'found t))))
902 (goto-char pt) 919 (goto-char pt)
@@ -1686,9 +1703,24 @@ matched in a rule action."
1686 (forward-char) 1703 (forward-char)
1687 (or (eq (char-after) ?=) 1704 (or (eq (char-after) ?=)
1688 (get-text-property (1- (point)) 'face) 1705 (get-text-property (1- (point)) 'face)
1706 (if (> (line-beginning-position) (+ (point-min) 2))
1707 (eq (char-before (line-end-position 0)) ?\\))
1689 (when (save-excursion 1708 (when (save-excursion
1690 (beginning-of-line) 1709 (beginning-of-line)
1691 (looking-at makefile-dependency-regex)) 1710 (looking-at makefile-dependency-regex))
1711 (save-excursion
1712 (let ((deps-end (match-end 1))
1713 (match-data (match-data)))
1714 (goto-char deps-end)
1715 (skip-chars-backward " \t")
1716 (setq deps-end (point))
1717 (beginning-of-line)
1718 (skip-chars-forward " \t")
1719 ;; Alter the bounds recorded for subexp 1,
1720 ;; which is what is supposed to match the targets.
1721 (setcar (nthcdr 2 match-data) (point))
1722 (setcar (nthcdr 3 match-data) deps-end)
1723 (store-match-data match-data)))
1692 (end-of-line) 1724 (end-of-line)
1693 (throw 'found (point))))) 1725 (throw 'found (point)))))
1694 (goto-char pt)) 1726 (goto-char pt))
diff --git a/lisp/progmodes/octave-inf.el b/lisp/progmodes/octave-inf.el
index 250d00171f2..a45976eef32 100644
--- a/lisp/progmodes/octave-inf.el
+++ b/lisp/progmodes/octave-inf.el
@@ -129,7 +129,7 @@ buffer.
129Entry to this mode successively runs the hooks `comint-mode-hook' and 129Entry to this mode successively runs the hooks `comint-mode-hook' and
130`inferior-octave-mode-hook'." 130`inferior-octave-mode-hook'."
131 (interactive) 131 (interactive)
132 (comint-mode) 132 (delay-mode-hooks (comint-mode))
133 (setq comint-prompt-regexp inferior-octave-prompt 133 (setq comint-prompt-regexp inferior-octave-prompt
134 major-mode 'inferior-octave-mode 134 major-mode 'inferior-octave-mode
135 mode-name "Inferior Octave" 135 mode-name "Inferior Octave"
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 604ff8c1e78..23d8374818e 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -792,7 +792,7 @@ See `sh-feature'.")
792 792
793;; Font-Lock support 793;; Font-Lock support
794 794
795(defface sh-heredoc-face 795(defface sh-heredoc
796 '((((min-colors 88) (class color) 796 '((((min-colors 88) (class color)
797 (background dark)) 797 (background dark))
798 (:foreground "yellow1" :weight bold)) 798 (:foreground "yellow1" :weight bold))
@@ -806,7 +806,9 @@ See `sh-feature'.")
806 (:weight bold))) 806 (:weight bold)))
807 "Face to show a here-document" 807 "Face to show a here-document"
808 :group 'sh-indentation) 808 :group 'sh-indentation)
809(defvar sh-heredoc-face 'sh-heredoc-face) 809;; backward-compatibility alias
810(put 'sh-heredoc-face 'face-alias 'sh-heredoc)
811(defvar sh-heredoc-face 'sh-heredoc)
810 812
811(defface sh-escaped-newline '((t :inherit font-lock-string-face)) 813(defface sh-escaped-newline '((t :inherit font-lock-string-face))
812 "Face used for (non-escaped) backslash at end of a line in Shell-script mode." 814 "Face used for (non-escaped) backslash at end of a line in Shell-script mode."
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el
index add4493e5f8..9b819ceae00 100644
--- a/lisp/progmodes/sql.el
+++ b/lisp/progmodes/sql.el
@@ -2328,7 +2328,7 @@ you entered, right above the output it created.
2328 2328
2329\(setq comint-output-filter-functions 2329\(setq comint-output-filter-functions
2330 \(function (lambda (STR) (comint-show-output))))" 2330 \(function (lambda (STR) (comint-show-output))))"
2331 (comint-mode) 2331 (delay-mode-hooks (comint-mode))
2332 ;; Get the `sql-product' for this interactive session. 2332 ;; Get the `sql-product' for this interactive session.
2333 (set (make-local-variable 'sql-product) 2333 (set (make-local-variable 'sql-product)
2334 (or sql-interactive-product 2334 (or sql-interactive-product
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index ebccb1bf5bf..9885e9ae039 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -1379,11 +1379,11 @@ Option `vhdl-align-groups' still applies within these blocks."
1379(defcustom vhdl-highlight-keywords t 1379(defcustom vhdl-highlight-keywords t
1380 "*Non-nil means highlight VHDL keywords and other standardized words. 1380 "*Non-nil means highlight VHDL keywords and other standardized words.
1381The following faces are used: 1381The following faces are used:
1382 `font-lock-keyword-face' : keywords 1382 `font-lock-keyword-face' : keywords
1383 `font-lock-type-face' : standardized types 1383 `font-lock-type' : standardized types
1384 `vhdl-font-lock-attribute-face': standardized attributes 1384 `vhdl-attribute' : standardized attributes
1385 `vhdl-font-lock-enumvalue-face': standardized enumeration values 1385 `vhdl-enumvalue' : standardized enumeration values
1386 `vhdl-font-lock-function-face' : standardized function and package names 1386 `vhdl-function' : standardized function and package names
1387 1387
1388NOTE: Activate the new setting in a VHDL buffer by re-fontifying it (menu 1388NOTE: Activate the new setting in a VHDL buffer by re-fontifying it (menu
1389 entry \"Fontify Buffer\")." 1389 entry \"Fontify Buffer\")."
@@ -1398,7 +1398,7 @@ The following faces are used:
1398 `font-lock-function-name-face' : names in declarations of units, 1398 `font-lock-function-name-face' : names in declarations of units,
1399 subprograms, components, as well as labels of VHDL constructs 1399 subprograms, components, as well as labels of VHDL constructs
1400 `font-lock-type-face' : names in type/nature declarations 1400 `font-lock-type-face' : names in type/nature declarations
1401 `vhdl-font-lock-attribute-face': names in attribute declarations 1401 `vhdl-attribute' : names in attribute declarations
1402 `font-lock-variable-name-face' : names in declarations of signals, 1402 `font-lock-variable-name-face' : names in declarations of signals,
1403 variables, constants, subprogram parameters, generics, and ports 1403 variables, constants, subprogram parameters, generics, and ports
1404 1404
@@ -1426,7 +1426,7 @@ NOTE: Activate the new setting in a VHDL buffer by re-fontifying it (menu
1426 "*Non-nil means highlight forbidden words. 1426 "*Non-nil means highlight forbidden words.
1427The reserved words specified in option `vhdl-forbidden-words' or having the 1427The reserved words specified in option `vhdl-forbidden-words' or having the
1428syntax specified in option `vhdl-forbidden-syntax' are highlighted in a 1428syntax specified in option `vhdl-forbidden-syntax' are highlighted in a
1429warning color (face `vhdl-font-lock-reserved-words-face') to indicate not to 1429warning color (face `vhdl-reserved-word') to indicate not to
1430use them. 1430use them.
1431 1431
1432NOTE: Activate the new setting in a VHDL buffer by re-fontifying it (menu 1432NOTE: Activate the new setting in a VHDL buffer by re-fontifying it (menu
@@ -1440,7 +1440,7 @@ NOTE: Activate the new setting in a VHDL buffer by re-fontifying it (menu
1440(defcustom vhdl-highlight-verilog-keywords nil 1440(defcustom vhdl-highlight-verilog-keywords nil
1441 "*Non-nil means highlight Verilog keywords as reserved words. 1441 "*Non-nil means highlight Verilog keywords as reserved words.
1442Verilog keywords are highlighted in a warning color (face 1442Verilog keywords are highlighted in a warning color (face
1443`vhdl-font-lock-reserved-words-face') to indicate not to use them. 1443`vhdl-reserved-word') to indicate not to use them.
1444 1444
1445NOTE: Activate the new setting in a VHDL buffer by re-fontifying it (menu 1445NOTE: Activate the new setting in a VHDL buffer by re-fontifying it (menu
1446 entry \"Fontify Buffer\")." 1446 entry \"Fontify Buffer\")."
@@ -1454,7 +1454,7 @@ NOTE: Activate the new setting in a VHDL buffer by re-fontifying it (menu
1454 "*Non-nil means background-highlight code excluded from translation. 1454 "*Non-nil means background-highlight code excluded from translation.
1455That is, all code between \"-- pragma translate_off\" and 1455That is, all code between \"-- pragma translate_off\" and
1456\"-- pragma translate_on\" is highlighted using a different background color 1456\"-- pragma translate_on\" is highlighted using a different background color
1457\(face `vhdl-font-lock-translate-off-face'). 1457\(face `vhdl-translate-off').
1458Note: this might slow down on-the-fly fontification (and thus editing). 1458Note: this might slow down on-the-fly fontification (and thus editing).
1459 1459
1460NOTE: Activate the new setting in a VHDL buffer by re-fontifying it (menu 1460NOTE: Activate the new setting in a VHDL buffer by re-fontifying it (menu
@@ -1501,7 +1501,7 @@ different kinds of signals (e.g. \"Clk50\", \"Rst_n\") or objects (e.g.
1501\"Signal_s\", \"Variable_v\", \"Constant_c\") by distinguishing them using 1501\"Signal_s\", \"Variable_v\", \"Constant_c\") by distinguishing them using
1502common substrings or name suffices. 1502common substrings or name suffices.
1503For each entry, a new face is generated with the specified colors and name 1503For each entry, a new face is generated with the specified colors and name
1504\"vhdl-font-lock-\" + name + \"-face\". 1504\"vhdl-\" + name.
1505 1505
1506NOTE: Activate a changed regexp in a VHDL buffer by re-fontifying it (menu 1506NOTE: Activate a changed regexp in a VHDL buffer by re-fontifying it (menu
1507 entry \"Fontify Buffer\"). All other changes require restarting Emacs." 1507 entry \"Fontify Buffer\"). All other changes require restarting Emacs."
@@ -12484,7 +12484,7 @@ This does highlighting of keywords and standard identifiers.")
12484 (list 12484 (list
12485 (concat 12485 (concat
12486 "^\\s-*attribute\\s-+\\(\\w+\\)") 12486 "^\\s-*attribute\\s-+\\(\\w+\\)")
12487 1 'vhdl-font-lock-attribute-face) 12487 1 'vhdl-attribute)
12488 12488
12489 ;; highlight type/nature name in (sub)type/(sub)nature declarations 12489 ;; highlight type/nature name in (sub)type/(sub)nature declarations
12490 (list 12490 (list
@@ -12542,40 +12542,39 @@ This does highlighting of additional reserved words.")
12542 12542
12543(defconst vhdl-font-lock-keywords-5 12543(defconst vhdl-font-lock-keywords-5
12544 ;; background highlight translate-off regions 12544 ;; background highlight translate-off regions
12545 '((vhdl-match-translate-off (0 vhdl-font-lock-translate-off-face append))) 12545 '((vhdl-match-translate-off (0 vhdl-translate-off-face append)))
12546 "For consideration as a value of `vhdl-font-lock-keywords'. 12546 "For consideration as a value of `vhdl-font-lock-keywords'.
12547This does background highlighting of translate-off regions.") 12547This does background highlighting of translate-off regions.")
12548 12548
12549;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 12549;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12550;; Font and color definitions 12550;; Font and color definitions
12551 12551
12552(defvar vhdl-font-lock-prompt-face 'vhdl-font-lock-prompt-face 12552(defvar vhdl-prompt-face 'vhdl-prompt
12553 "Face name to use for prompts.") 12553 "Face name to use for prompts.")
12554 12554
12555(defvar vhdl-font-lock-attribute-face 'vhdl-font-lock-attribute-face 12555(defvar vhdl-attribute-face 'vhdl-attribute
12556 "Face name to use for standardized attributes.") 12556 "Face name to use for standardized attributes.")
12557 12557
12558(defvar vhdl-font-lock-enumvalue-face 'vhdl-font-lock-enumvalue-face 12558(defvar vhdl-enumvalue-face 'vhdl-enumvalue
12559 "Face name to use for standardized enumeration values.") 12559 "Face name to use for standardized enumeration values.")
12560 12560
12561(defvar vhdl-font-lock-function-face 'vhdl-font-lock-function-face 12561(defvar vhdl-function-face 'vhdl-function
12562 "Face name to use for standardized functions and packages.") 12562 "Face name to use for standardized functions and packages.")
12563 12563
12564(defvar vhdl-font-lock-directive-face 'vhdl-font-lock-directive-face 12564(defvar vhdl-directive-face 'vhdl-directive
12565 "Face name to use for directives.") 12565 "Face name to use for directives.")
12566 12566
12567(defvar vhdl-font-lock-reserved-words-face 'vhdl-font-lock-reserved-words-face 12567(defvar vhdl-reserved-words-face 'vhdl-reserved-words
12568 "Face name to use for additional reserved words.") 12568 "Face name to use for additional reserved words.")
12569 12569
12570(defvar vhdl-font-lock-translate-off-face 'vhdl-font-lock-translate-off-face 12570(defvar vhdl-translate-off-face 'vhdl-translate-off
12571 "Face name to use for translate-off regions.") 12571 "Face name to use for translate-off regions.")
12572 12572
12573;; face names to use for words with special syntax. 12573;; face names to use for words with special syntax.
12574(let ((syntax-alist vhdl-special-syntax-alist) 12574(let ((syntax-alist vhdl-special-syntax-alist)
12575 name) 12575 name)
12576 (while syntax-alist 12576 (while syntax-alist
12577 (setq name (vhdl-function-name 12577 (setq name (vhdl-function-name "vhdl" (nth 0 (car syntax-alist))))
12578 "vhdl-font-lock" (nth 0 (car syntax-alist)) "face"))
12579 (eval `(defvar ,name ',name 12578 (eval `(defvar ,name ',name
12580 ,(concat "Face name to use for " 12579 ,(concat "Face name to use for "
12581 (nth 0 (car syntax-alist)) "."))) 12580 (nth 0 (car syntax-alist)) ".")))
@@ -12599,8 +12598,8 @@ This does background highlighting of translate-off regions.")
12599(custom-add-to-group 12598(custom-add-to-group
12600 'vhdl-highlight-faces 'font-lock-variable-name-face 'custom-face) 12599 'vhdl-highlight-faces 'font-lock-variable-name-face 'custom-face)
12601 12600
12602(defface vhdl-font-lock-prompt-face 12601(defface vhdl-prompt
12603 '((((min-colors 88) (class color) (background light)) 12602 '((((min-colors 88) (class color) (background light))
12604 (:foreground "Red1" :bold t)) 12603 (:foreground "Red1" :bold t))
12605 (((class color) (background light)) (:foreground "Red" :bold t)) 12604 (((class color) (background light)) (:foreground "Red" :bold t))
12606 (((class color) (background dark)) (:foreground "Pink" :bold t)) 12605 (((class color) (background dark)) (:foreground "Pink" :bold t))
@@ -12608,62 +12607,75 @@ This does background highlighting of translate-off regions.")
12608 "Font lock mode face used to highlight prompts." 12607 "Font lock mode face used to highlight prompts."
12609 :group 'vhdl-highlight-faces 12608 :group 'vhdl-highlight-faces
12610 :group 'font-lock-highlighting-faces) 12609 :group 'font-lock-highlighting-faces)
12610;; backward-compatibility alias
12611(put 'vhdl-font-lock-prompt-face 'face-alias 'vhdl-prompt)
12611 12612
12612(defface vhdl-font-lock-attribute-face 12613(defface vhdl-attribute
12613 '((((class color) (background light)) (:foreground "Orchid")) 12614 '((((class color) (background light)) (:foreground "Orchid"))
12614 (((class color) (background dark)) (:foreground "LightSteelBlue")) 12615 (((class color) (background dark)) (:foreground "LightSteelBlue"))
12615 (t (:italic t :bold t))) 12616 (t (:italic t :bold t)))
12616 "Font lock mode face used to highlight standardized attributes." 12617 "Font lock mode face used to highlight standardized attributes."
12617 :group 'vhdl-highlight-faces 12618 :group 'vhdl-highlight-faces
12618 :group 'font-lock-highlighting-faces) 12619 :group 'font-lock-highlighting-faces)
12620;; backward-compatibility alias
12621(put 'vhdl-font-lock-attribute-face 'face-alias 'vhdl-attribute)
12619 12622
12620(defface vhdl-font-lock-enumvalue-face 12623(defface vhdl-enumvalue
12621 '((((class color) (background light)) (:foreground "SaddleBrown")) 12624 '((((class color) (background light)) (:foreground "SaddleBrown"))
12622 (((class color) (background dark)) (:foreground "BurlyWood")) 12625 (((class color) (background dark)) (:foreground "BurlyWood"))
12623 (t (:italic t :bold t))) 12626 (t (:italic t :bold t)))
12624 "Font lock mode face used to highlight standardized enumeration values." 12627 "Font lock mode face used to highlight standardized enumeration values."
12625 :group 'vhdl-highlight-faces 12628 :group 'vhdl-highlight-faces
12626 :group 'font-lock-highlighting-faces) 12629 :group 'font-lock-highlighting-faces)
12630;; backward-compatibility alias
12631(put 'vhdl-font-lock-enumvalue-face 'face-alias 'vhdl-enumvalue)
12627 12632
12628(defface vhdl-font-lock-function-face 12633(defface vhdl-function
12629 '((((class color) (background light)) (:foreground "Cyan4")) 12634 '((((class color) (background light)) (:foreground "Cyan4"))
12630 (((class color) (background dark)) (:foreground "Orchid1")) 12635 (((class color) (background dark)) (:foreground "Orchid1"))
12631 (t (:italic t :bold t))) 12636 (t (:italic t :bold t)))
12632 "Font lock mode face used to highlight standardized functions and packages." 12637 "Font lock mode face used to highlight standardized functions and packages."
12633 :group 'vhdl-highlight-faces 12638 :group 'vhdl-highlight-faces
12634 :group 'font-lock-highlighting-faces) 12639 :group 'font-lock-highlighting-faces)
12640;; backward-compatibility alias
12641(put 'vhdl-font-lock-function-face 'face-alias 'vhdl-function)
12635 12642
12636(defface vhdl-font-lock-directive-face 12643(defface vhdl-directive
12637 '((((class color) (background light)) (:foreground "CadetBlue")) 12644 '((((class color) (background light)) (:foreground "CadetBlue"))
12638 (((class color) (background dark)) (:foreground "Aquamarine")) 12645 (((class color) (background dark)) (:foreground "Aquamarine"))
12639 (t (:italic t :bold t))) 12646 (t (:italic t :bold t)))
12640 "Font lock mode face used to highlight directives." 12647 "Font lock mode face used to highlight directives."
12641 :group 'vhdl-highlight-faces 12648 :group 'vhdl-highlight-faces
12642 :group 'font-lock-highlighting-faces) 12649 :group 'font-lock-highlighting-faces)
12650;; backward-compatibility alias
12651(put 'vhdl-font-lock-directive-face 'face-alias 'vhdl-directive)
12643 12652
12644(defface vhdl-font-lock-reserved-words-face 12653(defface vhdl-reserved-word
12645 '((((class color) (background light)) (:foreground "Orange" :bold t)) 12654 '((((class color) (background light)) (:foreground "Orange" :bold t))
12646 (((min-colors 88) (class color) (background dark)) 12655 (((min-colors 88) (class color) (background dark))
12647 (:foreground "Yellow1" :bold t)) 12656 (:foreground "Yellow1" :bold t))
12648 (((class color) (background dark)) (:foreground "Yellow" :bold t)) 12657 (((class color) (background dark)) (:foreground "Yellow" :bold t))
12649 (t ())) 12658 (t ()))
12650 "Font lock mode face used to highlight additional reserved words." 12659 "Font lock mode face used to highlight additional reserved words."
12651 :group 'vhdl-highlight-faces 12660 :group 'vhdl-highlight-faces
12652 :group 'font-lock-highlighting-faces) 12661 :group 'font-lock-highlighting-faces)
12662;; backward-compatibility alias
12663(put 'vhdl-font-lock-reserved-words-face 'face-alias 'vhdl-reserved-word)
12653 12664
12654(defface vhdl-font-lock-translate-off-face 12665(defface vhdl-translate-off
12655 '((((class color) (background light)) (:background "LightGray")) 12666 '((((class color) (background light)) (:background "LightGray"))
12656 (((class color) (background dark)) (:background "DimGray")) 12667 (((class color) (background dark)) (:background "DimGray"))
12657 (t ())) 12668 (t ()))
12658 "Font lock mode face used to background highlight translate-off regions." 12669 "Font lock mode face used to background highlight translate-off regions."
12659 :group 'vhdl-highlight-faces 12670 :group 'vhdl-highlight-faces
12660 :group 'font-lock-highlighting-faces) 12671 :group 'font-lock-highlighting-faces)
12672;; backward-compatibility alias
12673(put 'vhdl-font-lock-translate-off-face 'face-alias 'vhdl-translate-off)
12661 12674
12662;; font lock mode faces used to highlight words with special syntax. 12675;; font lock mode faces used to highlight words with special syntax.
12663(let ((syntax-alist vhdl-special-syntax-alist)) 12676(let ((syntax-alist vhdl-special-syntax-alist))
12664 (while syntax-alist 12677 (while syntax-alist
12665 (eval `(defface ,(vhdl-function-name 12678 (eval `(defface ,(vhdl-function-name "vhdl" (caar syntax-alist))
12666 "vhdl-font-lock" (caar syntax-alist) "face")
12667 '((((class color) (background light)) 12679 '((((class color) (background light))
12668 (:foreground ,(nth 2 (car syntax-alist)))) 12680 (:foreground ,(nth 2 (car syntax-alist))))
12669 (((class color) (background dark)) 12681 (((class color) (background dark))
@@ -12684,20 +12696,19 @@ This does background highlighting of translate-off regions.")
12684 (setq vhdl-font-lock-keywords-0 12696 (setq vhdl-font-lock-keywords-0
12685 (list (list (concat "\\(^\\|[ \t(.']\\)\\(<" 12697 (list (list (concat "\\(^\\|[ \t(.']\\)\\(<"
12686 vhdl-template-prompt-syntax ">\\)") 12698 vhdl-template-prompt-syntax ">\\)")
12687 2 'vhdl-font-lock-prompt-face t) 12699 2 'vhdl-prompt t)
12688 (list (concat "--\\s-*" 12700 (list (concat "--\\s-*"
12689 vhdl-directive-keywords-regexp "\\s-+\\(.*\\)$") 12701 vhdl-directive-keywords-regexp "\\s-+\\(.*\\)$")
12690 2 'vhdl-font-lock-directive-face t))) 12702 2 'vhdl-directive t)))
12691 ;; highlight keywords and standardized types, attributes, enumeration 12703 ;; highlight keywords and standardized types, attributes, enumeration
12692 ;; values, and subprograms 12704 ;; values, and subprograms
12693 (setq vhdl-font-lock-keywords-1 12705 (setq vhdl-font-lock-keywords-1
12694 (list 12706 (list
12695 (list (concat "'" vhdl-attributes-regexp) 12707 (list (concat "'" vhdl-attributes-regexp) 1 'vhdl-attribute)
12696 1 'vhdl-font-lock-attribute-face)
12697 (list vhdl-types-regexp 1 'font-lock-type-face) 12708 (list vhdl-types-regexp 1 'font-lock-type-face)
12698 (list vhdl-functions-regexp 1 'vhdl-font-lock-function-face) 12709 (list vhdl-functions-regexp 1 'vhdl-function)
12699 (list vhdl-packages-regexp 1 'vhdl-font-lock-function-face) 12710 (list vhdl-packages-regexp 1 'vhdl-function)
12700 (list vhdl-enum-values-regexp 1 'vhdl-font-lock-enumvalue-face) 12711 (list vhdl-enum-values-regexp 1 'vhdl-enumvalue)
12701 (list vhdl-keywords-regexp 1 'font-lock-keyword-face))) 12712 (list vhdl-keywords-regexp 1 'font-lock-keyword-face)))
12702 ;; highlight words with special syntax. 12713 ;; highlight words with special syntax.
12703 (setq vhdl-font-lock-keywords-3 12714 (setq vhdl-font-lock-keywords-3
@@ -12708,14 +12719,13 @@ This does background highlighting of translate-off regions.")
12708 (cons 12719 (cons
12709 (cons (concat "\\<\\(" (nth 1 (car syntax-alist)) "\\)\\>") 12720 (cons (concat "\\<\\(" (nth 1 (car syntax-alist)) "\\)\\>")
12710 (vhdl-function-name 12721 (vhdl-function-name
12711 "vhdl-font-lock" (nth 0 (car syntax-alist)) "face")) 12722 "vhdl" (nth 0 (car syntax-alist))))
12712 keywords)) 12723 keywords))
12713 (setq syntax-alist (cdr syntax-alist))) 12724 (setq syntax-alist (cdr syntax-alist)))
12714 keywords)) 12725 keywords))
12715 ;; highlight additional reserved words 12726 ;; highlight additional reserved words
12716 (setq vhdl-font-lock-keywords-4 12727 (setq vhdl-font-lock-keywords-4
12717 (list (list vhdl-reserved-words-regexp 1 12728 (list (list vhdl-reserved-words-regexp 1 'vhdl-reserved-word)))
12718 'vhdl-font-lock-reserved-words-face)))
12719 ;; highlight everything together 12729 ;; highlight everything together
12720 (setq vhdl-font-lock-keywords 12730 (setq vhdl-font-lock-keywords
12721 (append 12731 (append
@@ -12753,18 +12763,12 @@ This does background highlighting of translate-off regions.")
12753 (unless (or (not vhdl-print-customize-faces) 12763 (unless (or (not vhdl-print-customize-faces)
12754 ps-print-color-p) 12764 ps-print-color-p)
12755 (set (make-local-variable 'ps-bold-faces) 12765 (set (make-local-variable 'ps-bold-faces)
12756 '(font-lock-keyword-face 12766 '(font-lock-keyword-face font-lock-type-face
12757 font-lock-type-face 12767 vhdl-attribute vhdl-enumvalue vhdl-directive))
12758 vhdl-font-lock-attribute-face
12759 vhdl-font-lock-enumvalue-face
12760 vhdl-font-lock-directive-face))
12761 (set (make-local-variable 'ps-italic-faces) 12768 (set (make-local-variable 'ps-italic-faces)
12762 '(font-lock-comment-face 12769 '(font-lock-comment-face
12763 font-lock-function-name-face 12770 font-lock-function-name-face font-lock-type-face
12764 font-lock-type-face 12771 vhdl-attribute vhdl-enumvalue vhdl-directive))
12765 vhdl-font-lock-attribute-face
12766 vhdl-font-lock-enumvalue-face
12767 vhdl-font-lock-directive-face))
12768 (set (make-local-variable 'ps-underlined-faces) 12772 (set (make-local-variable 'ps-underlined-faces)
12769 '(font-lock-string-face)) 12773 '(font-lock-string-face))
12770 (setq ps-always-build-face-reference t)) 12774 (setq ps-always-build-face-reference t))
@@ -13973,7 +13977,7 @@ otherwise use cached data."
13973 'bracket ?+ 'vhdl-speedbar-expand-entity (nth 0 ent-entry) 13977 'bracket ?+ 'vhdl-speedbar-expand-entity (nth 0 ent-entry)
13974 (nth 1 ent-entry) 'vhdl-speedbar-find-file 13978 (nth 1 ent-entry) 'vhdl-speedbar-find-file
13975 (cons (nth 2 ent-entry) (nth 3 ent-entry)) 13979 (cons (nth 2 ent-entry) (nth 3 ent-entry))
13976 'vhdl-speedbar-entity-face depth) 13980 'vhdl-speedbar-entity depth)
13977 (unless (nth 2 ent-entry) 13981 (unless (nth 2 ent-entry)
13978 (end-of-line 0) (insert "!") (forward-char 1)) 13982 (end-of-line 0) (insert "!") (forward-char 1))
13979 (unless (member (nth 0 ent-entry) ent-inst-list) 13983 (unless (member (nth 0 ent-entry) ent-inst-list)
@@ -13987,7 +13991,7 @@ otherwise use cached data."
13987 'bracket ?+ 'vhdl-speedbar-expand-config (nth 0 conf-entry) 13991 'bracket ?+ 'vhdl-speedbar-expand-config (nth 0 conf-entry)
13988 (nth 1 conf-entry) 'vhdl-speedbar-find-file 13992 (nth 1 conf-entry) 'vhdl-speedbar-find-file
13989 (cons (nth 2 conf-entry) (nth 3 conf-entry)) 13993 (cons (nth 2 conf-entry) (nth 3 conf-entry))
13990 'vhdl-speedbar-configuration-face depth) 13994 'vhdl-speedbar-configuration depth)
13991 (setq conf-alist (cdr conf-alist))) 13995 (setq conf-alist (cdr conf-alist)))
13992 ;; insert packages 13996 ;; insert packages
13993 (when pack-alist (vhdl-speedbar-make-title-line "Packages:" depth)) 13997 (when pack-alist (vhdl-speedbar-make-title-line "Packages:" depth))
@@ -14178,7 +14182,7 @@ otherwise use cached data."
14178 (cons token (nth 0 arch-entry)) 14182 (cons token (nth 0 arch-entry))
14179 (nth 1 arch-entry) 'vhdl-speedbar-find-file 14183 (nth 1 arch-entry) 'vhdl-speedbar-find-file
14180 (cons (nth 2 arch-entry) (nth 3 arch-entry)) 14184 (cons (nth 2 arch-entry) (nth 3 arch-entry))
14181 'vhdl-speedbar-architecture-face (1+ indent)) 14185 'vhdl-speedbar-architecture (1+ indent))
14182 (setq arch-alist (cdr arch-alist))) 14186 (setq arch-alist (cdr arch-alist)))
14183 ;; insert instantiations 14187 ;; insert instantiations
14184 (when inst-alist 14188 (when inst-alist
@@ -14361,7 +14365,7 @@ otherwise use cached data."
14361 (cons token (nth 0 comp-entry)) 14365 (cons token (nth 0 comp-entry))
14362 (nth 1 comp-entry) 'vhdl-speedbar-find-file 14366 (nth 1 comp-entry) 'vhdl-speedbar-find-file
14363 (cons (nth 2 comp-entry) (nth 3 comp-entry)) 14367 (cons (nth 2 comp-entry) (nth 3 comp-entry))
14364 'vhdl-speedbar-entity-face (1+ indent)) 14368 'vhdl-speedbar-entity (1+ indent))
14365 (setq comp-alist (cdr comp-alist))) 14369 (setq comp-alist (cdr comp-alist)))
14366 ;; insert subprograms 14370 ;; insert subprograms
14367 (when func-alist 14371 (when func-alist
@@ -14477,43 +14481,43 @@ NO-POSITION non-nil means do not re-position cursor."
14477 (let* ((file-entry (aget file-alist speedbar-last-selected-file t))) 14481 (let* ((file-entry (aget file-alist speedbar-last-selected-file t)))
14478 (vhdl-speedbar-update-units 14482 (vhdl-speedbar-update-units
14479 "\\[.\\] " (nth 0 file-entry) 14483 "\\[.\\] " (nth 0 file-entry)
14480 speedbar-last-selected-file 'vhdl-speedbar-entity-face) 14484 speedbar-last-selected-file 'vhdl-speedbar-entity)
14481 (vhdl-speedbar-update-units 14485 (vhdl-speedbar-update-units
14482 "{.} " (nth 1 file-entry) 14486 "{.} " (nth 1 file-entry)
14483 speedbar-last-selected-file 'vhdl-speedbar-architecture-face) 14487 speedbar-last-selected-file 'vhdl-speedbar-architecture)
14484 (vhdl-speedbar-update-units 14488 (vhdl-speedbar-update-units
14485 "\\[.\\] " (nth 3 file-entry) 14489 "\\[.\\] " (nth 3 file-entry)
14486 speedbar-last-selected-file 'vhdl-speedbar-configuration-face) 14490 speedbar-last-selected-file 'vhdl-speedbar-configuration)
14487 (vhdl-speedbar-update-units 14491 (vhdl-speedbar-update-units
14488 "[]>] " (nth 4 file-entry) 14492 "[]>] " (nth 4 file-entry)
14489 speedbar-last-selected-file 'vhdl-speedbar-package-face) 14493 speedbar-last-selected-file 'vhdl-speedbar-package)
14490 (vhdl-speedbar-update-units 14494 (vhdl-speedbar-update-units
14491 "\\[.\\].+(" '("body") 14495 "\\[.\\].+(" '("body")
14492 speedbar-last-selected-file 'vhdl-speedbar-package-face) 14496 speedbar-last-selected-file 'vhdl-speedbar-package)
14493 (vhdl-speedbar-update-units 14497 (vhdl-speedbar-update-units
14494 "> " (nth 6 file-entry) 14498 "> " (nth 6 file-entry)
14495 speedbar-last-selected-file 'vhdl-speedbar-instantiation-face)) 14499 speedbar-last-selected-file 'vhdl-speedbar-instantiation))
14496 ;; highlight current units 14500 ;; highlight current units
14497 (let* ((file-entry (aget file-alist file-name t))) 14501 (let* ((file-entry (aget file-alist file-name t)))
14498 (setq 14502 (setq
14499 pos (vhdl-speedbar-update-units 14503 pos (vhdl-speedbar-update-units
14500 "\\[.\\] " (nth 0 file-entry) 14504 "\\[.\\] " (nth 0 file-entry)
14501 file-name 'vhdl-speedbar-entity-selected-face pos) 14505 file-name 'vhdl-speedbar-entity-selected pos)
14502 pos (vhdl-speedbar-update-units 14506 pos (vhdl-speedbar-update-units
14503 "{.} " (nth 1 file-entry) 14507 "{.} " (nth 1 file-entry)
14504 file-name 'vhdl-speedbar-architecture-selected-face pos) 14508 file-name 'vhdl-speedbar-architecture-selected pos)
14505 pos (vhdl-speedbar-update-units 14509 pos (vhdl-speedbar-update-units
14506 "\\[.\\] " (nth 3 file-entry) 14510 "\\[.\\] " (nth 3 file-entry)
14507 file-name 'vhdl-speedbar-configuration-selected-face pos) 14511 file-name 'vhdl-speedbar-configuration-selected pos)
14508 pos (vhdl-speedbar-update-units 14512 pos (vhdl-speedbar-update-units
14509 "[]>] " (nth 4 file-entry) 14513 "[]>] " (nth 4 file-entry)
14510 file-name 'vhdl-speedbar-package-selected-face pos) 14514 file-name 'vhdl-speedbar-package-selected pos)
14511 pos (vhdl-speedbar-update-units 14515 pos (vhdl-speedbar-update-units
14512 "\\[.\\].+(" '("body") 14516 "\\[.\\].+(" '("body")
14513 file-name 'vhdl-speedbar-package-selected-face pos) 14517 file-name 'vhdl-speedbar-package-selected pos)
14514 pos (vhdl-speedbar-update-units 14518 pos (vhdl-speedbar-update-units
14515 "> " (nth 6 file-entry) 14519 "> " (nth 6 file-entry)
14516 file-name 'vhdl-speedbar-instantiation-selected-face pos)))))) 14520 file-name 'vhdl-speedbar-instantiation-selected pos))))))
14517 ;; move speedbar so the first highlighted unit is visible 14521 ;; move speedbar so the first highlighted unit is visible
14518 (when (and pos (not no-position)) 14522 (when (and pos (not no-position))
14519 (goto-char pos) 14523 (goto-char pos)
@@ -14564,21 +14568,21 @@ NO-POSITION non-nil means do not re-position cursor."
14564 (insert "(top)") 14568 (insert "(top)")
14565 (insert inst-name) 14569 (insert inst-name)
14566 (speedbar-make-button 14570 (speedbar-make-button
14567 start (point) 'vhdl-speedbar-instantiation-face 'speedbar-highlight-face 14571 start (point) 'vhdl-speedbar-instantiation 'speedbar-highlight-face
14568 'vhdl-speedbar-find-file inst-file-marker)) 14572 'vhdl-speedbar-find-file inst-file-marker))
14569 (insert delimiter) 14573 (insert delimiter)
14570 (when ent-name 14574 (when ent-name
14571 (setq start (point)) 14575 (setq start (point))
14572 (insert ent-name) 14576 (insert ent-name)
14573 (speedbar-make-button 14577 (speedbar-make-button
14574 start (point) 'vhdl-speedbar-entity-face 'speedbar-highlight-face 14578 start (point) 'vhdl-speedbar-entity 'speedbar-highlight-face
14575 'vhdl-speedbar-find-file ent-file-marker) 14579 'vhdl-speedbar-find-file ent-file-marker)
14576 (when arch-name 14580 (when arch-name
14577 (insert " (") 14581 (insert " (")
14578 (setq start (point)) 14582 (setq start (point))
14579 (insert arch-name) 14583 (insert arch-name)
14580 (speedbar-make-button 14584 (speedbar-make-button
14581 start (point) 'vhdl-speedbar-architecture-face 'speedbar-highlight-face 14585 start (point) 'vhdl-speedbar-architecture 'speedbar-highlight-face
14582 'vhdl-speedbar-find-file arch-file-marker) 14586 'vhdl-speedbar-find-file arch-file-marker)
14583 (insert ")")) 14587 (insert ")"))
14584 (when conf-name 14588 (when conf-name
@@ -14586,14 +14590,14 @@ NO-POSITION non-nil means do not re-position cursor."
14586 (setq start (point)) 14590 (setq start (point))
14587 (insert conf-name) 14591 (insert conf-name)
14588 (speedbar-make-button 14592 (speedbar-make-button
14589 start (point) 'vhdl-speedbar-configuration-face 'speedbar-highlight-face 14593 start (point) 'vhdl-speedbar-configuration 'speedbar-highlight-face
14590 'vhdl-speedbar-find-file conf-file-marker) 14594 'vhdl-speedbar-find-file conf-file-marker)
14591 (insert ")"))) 14595 (insert ")")))
14592 (when (and lib-name (not (equal lib-name (downcase (vhdl-work-library))))) 14596 (when (and lib-name (not (equal lib-name (downcase (vhdl-work-library)))))
14593 (setq start (point)) 14597 (setq start (point))
14594 (insert " (" lib-name ")") 14598 (insert " (" lib-name ")")
14595 (put-text-property (+ 2 start) (1- (point)) 'face 14599 (put-text-property (+ 2 start) (1- (point)) 'face
14596 'vhdl-speedbar-library-face)) 14600 'vhdl-speedbar-library))
14597 (insert-char ?\n 1) 14601 (insert-char ?\n 1)
14598 (put-text-property visible-start (point) 'invisible nil))) 14602 (put-text-property visible-start (point) 'invisible nil)))
14599 14603
@@ -14617,7 +14621,7 @@ NO-POSITION non-nil means do not re-position cursor."
14617 (setq start (point)) 14621 (setq start (point))
14618 (insert pack-name) 14622 (insert pack-name)
14619 (speedbar-make-button 14623 (speedbar-make-button
14620 start (point) 'vhdl-speedbar-package-face 'speedbar-highlight-face 14624 start (point) 'vhdl-speedbar-package 'speedbar-highlight-face
14621 'vhdl-speedbar-find-file pack-file-marker) 14625 'vhdl-speedbar-find-file pack-file-marker)
14622 (unless (car pack-file-marker) 14626 (unless (car pack-file-marker)
14623 (insert "!")) 14627 (insert "!"))
@@ -14626,7 +14630,7 @@ NO-POSITION non-nil means do not re-position cursor."
14626 (setq start (point)) 14630 (setq start (point))
14627 (insert "body") 14631 (insert "body")
14628 (speedbar-make-button 14632 (speedbar-make-button
14629 start (point) 'vhdl-speedbar-package-face 'speedbar-highlight-face 14633 start (point) 'vhdl-speedbar-package 'speedbar-highlight-face
14630 'vhdl-speedbar-find-file body-file-marker) 14634 'vhdl-speedbar-find-file body-file-marker)
14631 (insert ")")) 14635 (insert ")"))
14632 (insert-char ?\n 1) 14636 (insert-char ?\n 1)
@@ -14650,12 +14654,12 @@ NO-POSITION non-nil means do not re-position cursor."
14650 (setq start (point)) 14654 (setq start (point))
14651 (insert pack-name) 14655 (insert pack-name)
14652 (speedbar-make-button 14656 (speedbar-make-button
14653 start (point) 'vhdl-speedbar-package-face 'speedbar-highlight-face 14657 start (point) 'vhdl-speedbar-package 'speedbar-highlight-face
14654 'vhdl-speedbar-find-file pack-file-marker) 14658 'vhdl-speedbar-find-file pack-file-marker)
14655 (setq start (point)) 14659 (setq start (point))
14656 (insert " (" lib-name ")") 14660 (insert " (" lib-name ")")
14657 (put-text-property (+ 2 start) (1- (point)) 'face 14661 (put-text-property (+ 2 start) (1- (point)) 'face
14658 'vhdl-speedbar-library-face) 14662 'vhdl-speedbar-library)
14659 (insert-char ?\n 1) 14663 (insert-char ?\n 1)
14660 (put-text-property visible-start (point) 'invisible nil))) 14664 (put-text-property visible-start (point) 'invisible nil)))
14661 14665
@@ -14678,14 +14682,14 @@ NO-POSITION non-nil means do not re-position cursor."
14678 (setq start (point)) 14682 (setq start (point))
14679 (insert func-name) 14683 (insert func-name)
14680 (speedbar-make-button 14684 (speedbar-make-button
14681 start (point) 'vhdl-speedbar-subprogram-face 'speedbar-highlight-face 14685 start (point) 'vhdl-speedbar-subprogram 'speedbar-highlight-face
14682 'vhdl-speedbar-find-file func-file-marker) 14686 'vhdl-speedbar-find-file func-file-marker)
14683 (when (car func-body-file-marker) 14687 (when (car func-body-file-marker)
14684 (insert " (") 14688 (insert " (")
14685 (setq start (point)) 14689 (setq start (point))
14686 (insert "body") 14690 (insert "body")
14687 (speedbar-make-button 14691 (speedbar-make-button
14688 start (point) 'vhdl-speedbar-subprogram-face 'speedbar-highlight-face 14692 start (point) 'vhdl-speedbar-subprogram 'speedbar-highlight-face
14689 'vhdl-speedbar-find-file func-body-file-marker) 14693 'vhdl-speedbar-find-file func-body-file-marker)
14690 (insert ")")) 14694 (insert ")"))
14691 (insert-char ?\n 1) 14695 (insert-char ?\n 1)
@@ -14773,22 +14777,22 @@ NO-POSITION non-nil means do not re-position cursor."
14773 (message 14777 (message
14774 "%s \"%s\" in \"%s\"" 14778 "%s \"%s\" in \"%s\""
14775 ;; design unit kind 14779 ;; design unit kind
14776 (cond ((or (eq face 'vhdl-speedbar-entity-face) 14780 (cond ((or (eq face 'vhdl-speedbar-entity)
14777 (eq face 'vhdl-speedbar-entity-selected-face)) 14781 (eq face 'vhdl-speedbar-entity-selected))
14778 (if (equal (match-string 2) ">") "Component" "Entity")) 14782 (if (equal (match-string 2) ">") "Component" "Entity"))
14779 ((or (eq face 'vhdl-speedbar-architecture-face) 14783 ((or (eq face 'vhdl-speedbar-architecture)
14780 (eq face 'vhdl-speedbar-architecture-selected-face)) 14784 (eq face 'vhdl-speedbar-architecture-selected))
14781 "Architecture") 14785 "Architecture")
14782 ((or (eq face 'vhdl-speedbar-configuration-face) 14786 ((or (eq face 'vhdl-speedbar-configuration)
14783 (eq face 'vhdl-speedbar-configuration-selected-face)) 14787 (eq face 'vhdl-speedbar-configuration-selected))
14784 "Configuration") 14788 "Configuration")
14785 ((or (eq face 'vhdl-speedbar-package-face) 14789 ((or (eq face 'vhdl-speedbar-package)
14786 (eq face 'vhdl-speedbar-package-selected-face)) 14790 (eq face 'vhdl-speedbar-package-selected))
14787 "Package") 14791 "Package")
14788 ((or (eq face 'vhdl-speedbar-instantiation-face) 14792 ((or (eq face 'vhdl-speedbar-instantiation)
14789 (eq face 'vhdl-speedbar-instantiation-selected-face)) 14793 (eq face 'vhdl-speedbar-instantiation-selected))
14790 "Instantiation") 14794 "Instantiation")
14791 ((eq face 'vhdl-speedbar-subprogram-face) 14795 ((eq face 'vhdl-speedbar-subprogram)
14792 "Subprogram") 14796 "Subprogram")
14793 (t "")) 14797 (t ""))
14794 ;; design unit name 14798 ;; design unit name
@@ -14924,7 +14928,7 @@ is already shown in a buffer."
14924 "Place the entity/component under the cursor as component." 14928 "Place the entity/component under the cursor as component."
14925 (interactive) 14929 (interactive)
14926 (if (not (vhdl-speedbar-check-unit 'entity)) 14930 (if (not (vhdl-speedbar-check-unit 'entity))
14927 (error "ERROR: No entity/component under cursor.") 14931 (error "ERROR: No entity/component under cursor")
14928 (vhdl-speedbar-port-copy) 14932 (vhdl-speedbar-port-copy)
14929 (if (fboundp 'speedbar-select-attached-frame) 14933 (if (fboundp 'speedbar-select-attached-frame)
14930 (speedbar-select-attached-frame) 14934 (speedbar-select-attached-frame)
@@ -14964,11 +14968,11 @@ expansion function)."
14964 (speedbar-position-cursor-on-line) 14968 (speedbar-position-cursor-on-line)
14965 (cond ((eq design-unit 'entity) 14969 (cond ((eq design-unit 'entity)
14966 (memq (get-text-property (match-end 0) 'face) 14970 (memq (get-text-property (match-end 0) 'face)
14967 '(vhdl-speedbar-entity-face 14971 '(vhdl-speedbar-entity
14968 vhdl-speedbar-entity-selected-face))) 14972 vhdl-speedbar-entity-selected)))
14969 ((eq design-unit 'subprogram) 14973 ((eq design-unit 'subprogram)
14970 (eq (get-text-property (match-end 0) 'face) 14974 (eq (get-text-property (match-end 0) 'face)
14971 'vhdl-speedbar-subprogram-face)) 14975 'vhdl-speedbar-subprogram))
14972 (t nil)))) 14976 (t nil))))
14973 14977
14974(defun vhdl-speedbar-set-depth (depth) 14978(defun vhdl-speedbar-set-depth (depth)
@@ -14979,82 +14983,106 @@ expansion function)."
14979;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 14983;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
14980;; Fontification 14984;; Fontification
14981 14985
14982(defface vhdl-speedbar-entity-face 14986(defface vhdl-speedbar-entity
14983 '((((class color) (background light)) (:foreground "ForestGreen")) 14987 '((((class color) (background light)) (:foreground "ForestGreen"))
14984 (((class color) (background dark)) (:foreground "PaleGreen"))) 14988 (((class color) (background dark)) (:foreground "PaleGreen")))
14985 "Face used for displaying entity names." 14989 "Face used for displaying entity names."
14986 :group 'speedbar-faces) 14990 :group 'speedbar-faces)
14991;; backward-compatibility alias
14992(put 'vhdl-speedbar-entity-face 'face-alias 'vhdl-speedbar-entity)
14987 14993
14988(defface vhdl-speedbar-architecture-face 14994(defface vhdl-speedbar-architecture
14989 '((((min-colors 88) (class color) (background light)) (:foreground "Blue1")) 14995 '((((min-colors 88) (class color) (background light)) (:foreground "Blue1"))
14990 (((class color) (background light)) (:foreground "Blue")) 14996 (((class color) (background light)) (:foreground "Blue"))
14991 (((class color) (background dark)) (:foreground "LightSkyBlue"))) 14997 (((class color) (background dark)) (:foreground "LightSkyBlue")))
14992 "Face used for displaying architecture names." 14998 "Face used for displaying architecture names."
14993 :group 'speedbar-faces) 14999 :group 'speedbar-faces)
15000;; backward-compatibility alias
15001(put 'vhdl-speedbar-architecture-face 'face-alias 'vhdl-speedbar-architecture)
14994 15002
14995(defface vhdl-speedbar-configuration-face 15003(defface vhdl-speedbar-configuration
14996 '((((class color) (background light)) (:foreground "DarkGoldenrod")) 15004 '((((class color) (background light)) (:foreground "DarkGoldenrod"))
14997 (((class color) (background dark)) (:foreground "Salmon"))) 15005 (((class color) (background dark)) (:foreground "Salmon")))
14998 "Face used for displaying configuration names." 15006 "Face used for displaying configuration names."
14999 :group 'speedbar-faces) 15007 :group 'speedbar-faces)
15008;; backward-compatibility alias
15009(put 'vhdl-speedbar-configuration-face 'face-alias 'vhdl-speedbar-configuration)
15000 15010
15001(defface vhdl-speedbar-package-face 15011(defface vhdl-speedbar-package
15002 '((((class color) (background light)) (:foreground "Grey50")) 15012 '((((class color) (background light)) (:foreground "Grey50"))
15003 (((class color) (background dark)) (:foreground "Grey80"))) 15013 (((class color) (background dark)) (:foreground "Grey80")))
15004 "Face used for displaying package names." 15014 "Face used for displaying package names."
15005 :group 'speedbar-faces) 15015 :group 'speedbar-faces)
15016;; backward-compatibility alias
15017(put 'vhdl-speedbar-package-face 'face-alias 'vhdl-speedbar-package)
15006 15018
15007(defface vhdl-speedbar-library-face 15019(defface vhdl-speedbar-library
15008 '((((class color) (background light)) (:foreground "Purple")) 15020 '((((class color) (background light)) (:foreground "Purple"))
15009 (((class color) (background dark)) (:foreground "Orchid1"))) 15021 (((class color) (background dark)) (:foreground "Orchid1")))
15010 "Face used for displaying library names." 15022 "Face used for displaying library names."
15011 :group 'speedbar-faces) 15023 :group 'speedbar-faces)
15024;; backward-compatibility alias
15025(put 'vhdl-speedbar-library-face 'face-alias 'vhdl-speedbar-library)
15012 15026
15013(defface vhdl-speedbar-instantiation-face 15027(defface vhdl-speedbar-instantiation
15014 '((((class color) (background light)) (:foreground "Brown")) 15028 '((((class color) (background light)) (:foreground "Brown"))
15015 (((min-colors 88) (class color) (background dark)) (:foreground "Yellow1")) 15029 (((min-colors 88) (class color) (background dark)) (:foreground "Yellow1"))
15016 (((class color) (background dark)) (:foreground "Yellow"))) 15030 (((class color) (background dark)) (:foreground "Yellow")))
15017 "Face used for displaying instantiation names." 15031 "Face used for displaying instantiation names."
15018 :group 'speedbar-faces) 15032 :group 'speedbar-faces)
15033;; backward-compatibility alias
15034(put 'vhdl-speedbar-instantiation-face 'face-alias 'vhdl-speedbar-instantiation)
15019 15035
15020(defface vhdl-speedbar-subprogram-face 15036(defface vhdl-speedbar-subprogram
15021 '((((class color) (background light)) (:foreground "Orchid4")) 15037 '((((class color) (background light)) (:foreground "Orchid4"))
15022 (((class color) (background dark)) (:foreground "BurlyWood2"))) 15038 (((class color) (background dark)) (:foreground "BurlyWood2")))
15023 "Face used for displaying subprogram names." 15039 "Face used for displaying subprogram names."
15024 :group 'speedbar-faces) 15040 :group 'speedbar-faces)
15041;; backward-compatibility alias
15042(put 'vhdl-speedbar-subprogram-face 'face-alias 'vhdl-speedbar-subprogram)
15025 15043
15026(defface vhdl-speedbar-entity-selected-face 15044(defface vhdl-speedbar-entity-selected
15027 '((((class color) (background light)) (:foreground "ForestGreen" :underline t)) 15045 '((((class color) (background light)) (:foreground "ForestGreen" :underline t))
15028 (((class color) (background dark)) (:foreground "PaleGreen" :underline t))) 15046 (((class color) (background dark)) (:foreground "PaleGreen" :underline t)))
15029 "Face used for displaying entity names." 15047 "Face used for displaying entity names."
15030 :group 'speedbar-faces) 15048 :group 'speedbar-faces)
15049;; backward-compatibility alias
15050(put 'vhdl-speedbar-entity-selected-face 'face-alias 'vhdl-speedbar-entity-selected)
15031 15051
15032(defface vhdl-speedbar-architecture-selected-face 15052(defface vhdl-speedbar-architecture-selected
15033 '((((min-colors 88) (class color) (background light)) (:foreground "Blue1" :underline t)) 15053 '((((min-colors 88) (class color) (background light)) (:foreground "Blue1" :underline t))
15034 (((min-colors 88) (class color) (background light)) (:foreground "Blue1" :underline t)) 15054 (((min-colors 88) (class color) (background light)) (:foreground "Blue1" :underline t))
15035 (((class color) (background light)) (:foreground "Blue" :underline t)) 15055 (((class color) (background light)) (:foreground "Blue" :underline t))
15036 (((class color) (background dark)) (:foreground "LightSkyBlue" :underline t))) 15056 (((class color) (background dark)) (:foreground "LightSkyBlue" :underline t)))
15037 "Face used for displaying architecture names." 15057 "Face used for displaying architecture names."
15038 :group 'speedbar-faces) 15058 :group 'speedbar-faces)
15059;; backward-compatibility alias
15060(put 'vhdl-speedbar-architecture-selected-face 'face-alias 'vhdl-speedbar-architecture-selected)
15039 15061
15040(defface vhdl-speedbar-configuration-selected-face 15062(defface vhdl-speedbar-configuration-selected
15041 '((((class color) (background light)) (:foreground "DarkGoldenrod" :underline t)) 15063 '((((class color) (background light)) (:foreground "DarkGoldenrod" :underline t))
15042 (((class color) (background dark)) (:foreground "Salmon" :underline t))) 15064 (((class color) (background dark)) (:foreground "Salmon" :underline t)))
15043 "Face used for displaying configuration names." 15065 "Face used for displaying configuration names."
15044 :group 'speedbar-faces) 15066 :group 'speedbar-faces)
15067;; backward-compatibility alias
15068(put 'vhdl-speedbar-configuration-selected-face 'face-alias 'vhdl-speedbar-configuration-selected)
15045 15069
15046(defface vhdl-speedbar-package-selected-face 15070(defface vhdl-speedbar-package-selected
15047 '((((class color) (background light)) (:foreground "Grey50" :underline t)) 15071 '((((class color) (background light)) (:foreground "Grey50" :underline t))
15048 (((class color) (background dark)) (:foreground "Grey80" :underline t))) 15072 (((class color) (background dark)) (:foreground "Grey80" :underline t)))
15049 "Face used for displaying package names." 15073 "Face used for displaying package names."
15050 :group 'speedbar-faces) 15074 :group 'speedbar-faces)
15075;; backward-compatibility alias
15076(put 'vhdl-speedbar-package-selected-face 'face-alias 'vhdl-speedbar-package-selected)
15051 15077
15052(defface vhdl-speedbar-instantiation-selected-face 15078(defface vhdl-speedbar-instantiation-selected
15053 '((((class color) (background light)) (:foreground "Brown" :underline t)) 15079 '((((class color) (background light)) (:foreground "Brown" :underline t))
15054 (((min-colors 88) (class color) (background dark)) (:foreground "Yellow1" :underline t)) 15080 (((min-colors 88) (class color) (background dark)) (:foreground "Yellow1" :underline t))
15055 (((class color) (background dark)) (:foreground "Yellow" :underline t))) 15081 (((class color) (background dark)) (:foreground "Yellow" :underline t)))
15056 "Face used for displaying instantiation names." 15082 "Face used for displaying instantiation names."
15057 :group 'speedbar-faces) 15083 :group 'speedbar-faces)
15084;; backward-compatibility alias
15085(put 'vhdl-speedbar-instantiation-selected-face 'face-alias 'vhdl-speedbar-instantiation-selected)
15058 15086
15059;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 15087;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
15060;; Initialization 15088;; Initialization
diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el
index 1fa37532ab0..a96bd076e12 100644
--- a/lisp/progmodes/which-func.el
+++ b/lisp/progmodes/which-func.el
@@ -113,17 +113,40 @@ Zero means compute the Imenu menu regardless of size."
113 map) 113 map)
114 "Keymap to display on mode line which-func.") 114 "Keymap to display on mode line which-func.")
115 115
116(defface which-func-face 116(defface which-func
117 '((t (:inherit font-lock-function-name-face))) 117 ;; Whether `font-lock-function-name-face' is an appropriate face to
118 "Face used to highlight mode line function names. 118 ;; inherit depends on the mode-line face; define several variants based
119Defaults to `font-lock-function-name-face' if font-lock is loaded." 119 ;; on the default mode-line face.
120 '(;; The default mode-line face on a high-color display is a relatively
121 ;; light color ("grey75"), and only the light-background variant of
122 ;; `font-lock-function-name-face' is visible against it.
123 (((class color) (min-colors 88) (background light))
124 :inherit font-lock-function-name-face)
125 ;; The default mode-line face on other display types is inverse-video;
126 ;; it seems that only in the dark-background case is
127 ;; `font-lock-function-name-face' visible against it.
128 (((class grayscale mono) (background dark))
129 :inherit font-lock-function-name-face)
130 (((class color) (background light))
131 :inherit font-lock-function-name-face)
132 ;; If none of the above cases, use an explicit color chosen to contrast
133 ;; well with the default mode-line face.
134 (((class color) (min-colors 88) (background dark))
135 :foreground "Blue1")
136 (((background dark))
137 :foreground "Blue1")
138 (t
139 :foreground "LightSkyBlue"))
140 "Face used to highlight mode line function names."
120 :group 'which-func) 141 :group 'which-func)
142;; backward-compatibility alias
143(put 'which-func-face 'face-alias 'which-func)
121 144
122(defcustom which-func-format 145(defcustom which-func-format
123 `("[" 146 `("["
124 (:propertize which-func-current 147 (:propertize which-func-current
125 local-map ,which-func-keymap 148 local-map ,which-func-keymap
126 face which-func-face 149 face which-func
127 ;;mouse-face highlight ; currently not evaluated :-( 150 ;;mouse-face highlight ; currently not evaluated :-(
128 help-echo "mouse-1: go to beginning, mouse-2: toggle rest visibility, mouse-3: go to end") 151 help-echo "mouse-1: go to beginning, mouse-2: toggle rest visibility, mouse-3: go to end")
129 "]") 152 "]")