diff options
| author | Yuuki Harano | 2021-02-20 18:00:36 +0900 |
|---|---|---|
| committer | Yuuki Harano | 2021-02-20 18:00:36 +0900 |
| commit | be2e47362b0f933dbc8e300e3d168296b7e2aac4 (patch) | |
| tree | 3b14e2e66d33566b81cb1d6e8bb04551d95dd2b9 /lisp/progmodes | |
| parent | 949d3e50ec4ea7723bf14b93b66ad0b72f96f163 (diff) | |
| parent | c85c8e7d42ae2a5fc95fa7b14257389d8383b34d (diff) | |
| download | emacs-be2e47362b0f933dbc8e300e3d168296b7e2aac4.tar.gz emacs-be2e47362b0f933dbc8e300e3d168296b7e2aac4.zip | |
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk
Diffstat (limited to 'lisp/progmodes')
33 files changed, 617 insertions, 805 deletions
diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el index e5b9ac0a537..d92c8c35b1b 100644 --- a/lisp/progmodes/antlr-mode.el +++ b/lisp/progmodes/antlr-mode.el | |||
| @@ -1246,9 +1246,8 @@ IF TOKENREFS-ONLY is non-nil, just return alist with tokenref names." | |||
| 1246 | (let ((items nil) | 1246 | (let ((items nil) |
| 1247 | (classes nil) | 1247 | (classes nil) |
| 1248 | (continue t)) | 1248 | (continue t)) |
| 1249 | ;; Using `imenu-progress-message' would require imenu for compilation, but | 1249 | ;; The generic imenu function searches backward, which is slower |
| 1250 | ;; nobody is missing these messages. The generic imenu function searches | 1250 | ;; and more likely not to work during editing. |
| 1251 | ;; backward, which is slower and more likely not to work during editing. | ||
| 1252 | (antlr-with-syntax-table antlr-action-syntax-table | 1251 | (antlr-with-syntax-table antlr-action-syntax-table |
| 1253 | (antlr-invalidate-context-cache) | 1252 | (antlr-invalidate-context-cache) |
| 1254 | (goto-char (point-min)) | 1253 | (goto-char (point-min)) |
diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el index a759394abeb..4d4becf780a 100644 --- a/lisp/progmodes/bug-reference.el +++ b/lisp/progmodes/bug-reference.el | |||
| @@ -73,8 +73,7 @@ so that it is considered safe, see `enable-local-variables'.") | |||
| 73 | "Regular expression matching bug references. | 73 | "Regular expression matching bug references. |
| 74 | The second subexpression should match the bug reference (usually a number)." | 74 | The second subexpression should match the bug reference (usually a number)." |
| 75 | :type 'regexp | 75 | :type 'regexp |
| 76 | :version "24.3" ; previously defconst | 76 | :version "24.3") ; previously defconst |
| 77 | :group 'bug-reference) | ||
| 78 | 77 | ||
| 79 | ;;;###autoload | 78 | ;;;###autoload |
| 80 | (put 'bug-reference-bug-regexp 'safe-local-variable 'stringp) | 79 | (put 'bug-reference-bug-regexp 'safe-local-variable 'stringp) |
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 484624b8664..9038c7bd95a 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el | |||
| @@ -2665,7 +2665,7 @@ comment at the start of cc-engine.el for more info." | |||
| 2665 | ;; One of the above "near" caches is associated with each of these functions. | 2665 | ;; One of the above "near" caches is associated with each of these functions. |
| 2666 | ;; | 2666 | ;; |
| 2667 | ;; When searching this cache, these functions first seek an exact match, then | 2667 | ;; When searching this cache, these functions first seek an exact match, then |
| 2668 | ;; a "close" match from the assiciated near cache. If neither of these | 2668 | ;; a "close" match from the associated near cache. If neither of these |
| 2669 | ;; succeed, the nearest preceding entry in the far cache is used. | 2669 | ;; succeed, the nearest preceding entry in the far cache is used. |
| 2670 | ;; | 2670 | ;; |
| 2671 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 2671 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
diff --git a/lisp/progmodes/cfengine.el b/lisp/progmodes/cfengine.el index f516664f7f4..bef99f2484b 100644 --- a/lisp/progmodes/cfengine.el +++ b/lisp/progmodes/cfengine.el | |||
| @@ -69,7 +69,6 @@ | |||
| 69 | 69 | ||
| 70 | (defcustom cfengine-indent 2 | 70 | (defcustom cfengine-indent 2 |
| 71 | "Size of a CFEngine indentation step in columns." | 71 | "Size of a CFEngine indentation step in columns." |
| 72 | :group 'cfengine | ||
| 73 | :type 'integer) | 72 | :type 'integer) |
| 74 | 73 | ||
| 75 | (defcustom cfengine-cf-promises | 74 | (defcustom cfengine-cf-promises |
| @@ -86,7 +85,6 @@ Used for syntax discovery and checking. Set to nil to disable | |||
| 86 | the `compile-command' override. In that case, the ElDoc support | 85 | the `compile-command' override. In that case, the ElDoc support |
| 87 | will use a fallback syntax definition." | 86 | will use a fallback syntax definition." |
| 88 | :version "24.4" | 87 | :version "24.4" |
| 89 | :group 'cfengine | ||
| 90 | :type '(choice file (const nil))) | 88 | :type '(choice file (const nil))) |
| 91 | 89 | ||
| 92 | (defcustom cfengine-parameters-indent '(promise pname 2) | 90 | (defcustom cfengine-parameters-indent '(promise pname 2) |
| @@ -145,7 +143,6 @@ bundle agent rcfiles | |||
| 145 | } | 143 | } |
| 146 | " | 144 | " |
| 147 | :version "24.4" | 145 | :version "24.4" |
| 148 | :group 'cfengine | ||
| 149 | :type '(list | 146 | :type '(list |
| 150 | (choice (const :tag "Anchor at beginning of promise" promise) | 147 | (choice (const :tag "Anchor at beginning of promise" promise) |
| 151 | (const :tag "Anchor at beginning of line" bol)) | 148 | (const :tag "Anchor at beginning of line" bol)) |
| @@ -799,7 +796,6 @@ bundle agent rcfiles | |||
| 799 | 796 | ||
| 800 | (defcustom cfengine-mode-abbrevs nil | 797 | (defcustom cfengine-mode-abbrevs nil |
| 801 | "Abbrevs for CFEngine2 mode." | 798 | "Abbrevs for CFEngine2 mode." |
| 802 | :group 'cfengine | ||
| 803 | :type '(repeat (list (string :tag "Name") | 799 | :type '(repeat (list (string :tag "Name") |
| 804 | (string :tag "Expansion") | 800 | (string :tag "Expansion") |
| 805 | (choice :tag "Hook" (const nil) function)))) | 801 | (choice :tag "Hook" (const nil) function)))) |
diff --git a/lisp/progmodes/cmacexp.el b/lisp/progmodes/cmacexp.el index 1a45b1cb838..820867ab41f 100644 --- a/lisp/progmodes/cmacexp.el +++ b/lisp/progmodes/cmacexp.el | |||
| @@ -99,13 +99,11 @@ | |||
| 99 | 99 | ||
| 100 | (defcustom c-macro-shrink-window-flag nil | 100 | (defcustom c-macro-shrink-window-flag nil |
| 101 | "Non-nil means shrink the *Macroexpansion* window to fit its contents." | 101 | "Non-nil means shrink the *Macroexpansion* window to fit its contents." |
| 102 | :type 'boolean | 102 | :type 'boolean) |
| 103 | :group 'c-macro) | ||
| 104 | 103 | ||
| 105 | (defcustom c-macro-prompt-flag nil | 104 | (defcustom c-macro-prompt-flag nil |
| 106 | "Non-nil makes `c-macro-expand' prompt for preprocessor arguments." | 105 | "Non-nil makes `c-macro-expand' prompt for preprocessor arguments." |
| 107 | :type 'boolean | 106 | :type 'boolean) |
| 108 | :group 'c-macro) | ||
| 109 | 107 | ||
| 110 | (defcustom c-macro-preprocessor | 108 | (defcustom c-macro-preprocessor |
| 111 | (cond ;; Solaris has it in an unusual place. | 109 | (cond ;; Solaris has it in an unusual place. |
| @@ -129,13 +127,11 @@ | |||
| 129 | 127 | ||
| 130 | If you change this, be sure to preserve the `-C' (don't strip comments) | 128 | If you change this, be sure to preserve the `-C' (don't strip comments) |
| 131 | option, or to set an equivalent one." | 129 | option, or to set an equivalent one." |
| 132 | :type 'string | 130 | :type 'string) |
| 133 | :group 'c-macro) | ||
| 134 | 131 | ||
| 135 | (defcustom c-macro-cppflags "" | 132 | (defcustom c-macro-cppflags "" |
| 136 | "Preprocessor flags used by `c-macro-expand'." | 133 | "Preprocessor flags used by `c-macro-expand'." |
| 137 | :type 'string | 134 | :type 'string) |
| 138 | :group 'c-macro) | ||
| 139 | 135 | ||
| 140 | (defconst c-macro-buffer-name "*Macroexpansion*") | 136 | (defconst c-macro-buffer-name "*Macroexpansion*") |
| 141 | 137 | ||
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 614ed7d835d..48b5ee99736 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -2069,6 +2069,10 @@ Returns the compilation buffer created." | |||
| 2069 | (define-key map "\M-p" 'compilation-previous-error) | 2069 | (define-key map "\M-p" 'compilation-previous-error) |
| 2070 | (define-key map "\M-{" 'compilation-previous-file) | 2070 | (define-key map "\M-{" 'compilation-previous-file) |
| 2071 | (define-key map "\M-}" 'compilation-next-file) | 2071 | (define-key map "\M-}" 'compilation-next-file) |
| 2072 | (define-key map "n" 'next-error-no-select) | ||
| 2073 | (define-key map "p" 'previous-error-no-select) | ||
| 2074 | (define-key map "l" 'recenter-current-error) | ||
| 2075 | |||
| 2072 | (define-key map "g" 'recompile) ; revert | 2076 | (define-key map "g" 'recompile) ; revert |
| 2073 | ;; Set up the menu-bar | 2077 | ;; Set up the menu-bar |
| 2074 | (define-key map [menu-bar compilation] | 2078 | (define-key map [menu-bar compilation] |
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index a70e8e36c0b..db142c0dc3e 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el | |||
| @@ -440,12 +440,6 @@ after reload." | |||
| 440 | :type 'boolean | 440 | :type 'boolean |
| 441 | :group 'cperl-speed) | 441 | :group 'cperl-speed) |
| 442 | 442 | ||
| 443 | (defcustom cperl-imenu-addback nil | ||
| 444 | "Not-nil means add backreferences to generated `imenu's. | ||
| 445 | May require patched `imenu' and `imenu-go'. Obsolete." | ||
| 446 | :type 'boolean | ||
| 447 | :group 'cperl-help-system) | ||
| 448 | |||
| 449 | (defcustom cperl-max-help-size 66 | 443 | (defcustom cperl-max-help-size 66 |
| 450 | "Non-nil means shrink-wrapping of info-buffer allowed up to these percents." | 444 | "Non-nil means shrink-wrapping of info-buffer allowed up to these percents." |
| 451 | :type '(choice integer (const nil)) | 445 | :type '(choice integer (const nil)) |
| @@ -659,8 +653,8 @@ Run Perl/Tools/Insert-spaces-if-needed to fix your lazy typing. | |||
| 659 | 653 | ||
| 660 | Switch auto-help on/off with Perl/Tools/Auto-help. | 654 | Switch auto-help on/off with Perl/Tools/Auto-help. |
| 661 | 655 | ||
| 662 | Though with contemporary Emaxen CPerl mode should maintain the correct | 656 | Though CPerl mode should maintain the correct parsing of Perl even when |
| 663 | parsing of Perl even when editing, sometimes it may be lost. Fix this by | 657 | editing, sometimes it may be lost. Fix this by |
| 664 | 658 | ||
| 665 | \\[normal-mode] | 659 | \\[normal-mode] |
| 666 | 660 | ||
| @@ -676,63 +670,20 @@ micro-docs on what I know about CPerl problems.") | |||
| 676 | "Description of problems in CPerl mode. | 670 | "Description of problems in CPerl mode. |
| 677 | `fill-paragraph' on a comment may leave the point behind the | 671 | `fill-paragraph' on a comment may leave the point behind the |
| 678 | paragraph. It also triggers a bug in some versions of Emacs (CPerl tries | 672 | paragraph. It also triggers a bug in some versions of Emacs (CPerl tries |
| 679 | to detect it and bulk out). | 673 | to detect it and bulk out).") |
| 680 | |||
| 681 | See documentation of a variable `cperl-problems-old-emaxen' for the | ||
| 682 | problems which disappear if you upgrade Emacs to a reasonably new | ||
| 683 | version (20.3 for Emacs).") | ||
| 684 | 674 | ||
| 685 | (defvar cperl-problems-old-emaxen 'please-ignore-this-line | 675 | (defvar cperl-problems-old-emaxen 'please-ignore-this-line |
| 686 | "Description of problems in CPerl mode specific for older Emacs versions. | 676 | "This used to contain a description of problems in CPerl mode |
| 687 | 677 | specific for very old Emacs versions. This is no longer relevant | |
| 688 | Emacs had a _very_ restricted syntax parsing engine until version | 678 | and has been removed.") |
| 689 | 20.1. Most problems below are corrected starting from this version of | 679 | (make-obsolete-variable 'cperl-problems-old-emaxen nil "28.1") |
| 690 | Emacs, and all of them should be fixed in version 20.3. (Or apply | ||
| 691 | patches to Emacs 19.33/34 - see tips.) | ||
| 692 | |||
| 693 | Note that even with newer Emacsen in some very rare cases the details | ||
| 694 | of interaction of `font-lock' and syntaxification may be not cleaned | ||
| 695 | up yet. You may get slightly different colors basing on the order of | ||
| 696 | fontification and syntaxification. Say, the initial faces is correct, | ||
| 697 | but editing the buffer breaks this. | ||
| 698 | |||
| 699 | Even with older Emacsen CPerl mode tries to corrects some Emacs | ||
| 700 | misunderstandings, however, for efficiency reasons the degree of | ||
| 701 | correction is different for different operations. The partially | ||
| 702 | corrected problems are: POD sections, here-documents, regexps. The | ||
| 703 | operations are: highlighting, indentation, electric keywords, electric | ||
| 704 | braces. | ||
| 705 | |||
| 706 | This may be confusing, since the regexp s#//#/#; may be highlighted | ||
| 707 | as a comment, but it will be recognized as a regexp by the indentation | ||
| 708 | code. Or the opposite case, when a POD section is highlighted, but | ||
| 709 | may break the indentation of the following code (though indentation | ||
| 710 | should work if the balance of delimiters is not broken by POD). | ||
| 711 | |||
| 712 | The main trick (to make $ a \"backslash\") makes constructions like | ||
| 713 | ${aaa} look like unbalanced braces. The only trick I can think of is | ||
| 714 | to insert it as $ {aaa} (valid in perl5, not in perl4). | ||
| 715 | |||
| 716 | Similar problems arise in regexps, when /(\\s|$)/ should be rewritten | ||
| 717 | as /($|\\s)/. Note that such a transposition is not always possible. | ||
| 718 | |||
| 719 | The solution is to upgrade your Emacs or patch an older one. Note | ||
| 720 | that Emacs 20.2 has some bugs related to `syntax-table' text | ||
| 721 | properties. Patches are available on the main CPerl download site, | ||
| 722 | and on CPAN. | ||
| 723 | |||
| 724 | If these bugs cannot be fixed on your machine (say, you have an inferior | ||
| 725 | environment and cannot recompile), you may still disable all the fancy stuff | ||
| 726 | via `cperl-use-syntax-table-text-property'.") | ||
| 727 | 680 | ||
| 728 | (defvar cperl-praise 'please-ignore-this-line | 681 | (defvar cperl-praise 'please-ignore-this-line |
| 729 | "Advantages of CPerl mode. | 682 | "Advantages of CPerl mode. |
| 730 | 683 | ||
| 731 | 0) It uses the newest `syntax-table' property ;-); | 684 | 0) It uses the newest `syntax-table' property ;-); |
| 732 | 685 | ||
| 733 | 1) It does 99% of Perl syntax correct (as opposed to 80-90% in Perl | 686 | 1) It does 99% of Perl syntax correct. |
| 734 | mode - but the latter number may have improved too in last years) even | ||
| 735 | with old Emaxen which do not support `syntax-table' property. | ||
| 736 | 687 | ||
| 737 | When using `syntax-table' property for syntax assist hints, it should | 688 | When using `syntax-table' property for syntax assist hints, it should |
| 738 | handle 99.995% of lines correct - or somesuch. It automatically | 689 | handle 99.995% of lines correct - or somesuch. It automatically |
| @@ -813,8 +764,7 @@ the settings present before the switch. | |||
| 813 | 9) When doing indentation of control constructs, may correct | 764 | 9) When doing indentation of control constructs, may correct |
| 814 | line-breaks/spacing between elements of the construct. | 765 | line-breaks/spacing between elements of the construct. |
| 815 | 766 | ||
| 816 | 10) Uses a linear-time algorithm for indentation of regions (on Emaxen with | 767 | 10) Uses a linear-time algorithm for indentation of regions. |
| 817 | capable syntax engines). | ||
| 818 | 768 | ||
| 819 | 11) Syntax-highlight, indentation, sexp-recognition inside regular expressions. | 769 | 11) Syntax-highlight, indentation, sexp-recognition inside regular expressions. |
| 820 | ") | 770 | ") |
| @@ -838,8 +788,8 @@ syntax-parsing routines, and marks them up so that either | |||
| 838 | 788 | ||
| 839 | A1) CPerl may work around these deficiencies (for big chunks, mostly | 789 | A1) CPerl may work around these deficiencies (for big chunks, mostly |
| 840 | PODs and HERE-documents), or | 790 | PODs and HERE-documents), or |
| 841 | A2) On capable Emaxen CPerl will use improved syntax-handling | 791 | A2) CPerl will use improved syntax-handling which reads mark-up |
| 842 | which reads mark-up hints directly. | 792 | hints directly. |
| 843 | 793 | ||
| 844 | The scan in case A2 is much more comprehensive, thus may be slower. | 794 | The scan in case A2 is much more comprehensive, thus may be slower. |
| 845 | 795 | ||
| @@ -1019,9 +969,12 @@ versions of Emacs." | |||
| 1019 | "Abbrev table in use in CPerl mode buffers." | 969 | "Abbrev table in use in CPerl mode buffers." |
| 1020 | :parents (list cperl-mode-electric-keywords-abbrev-table)) | 970 | :parents (list cperl-mode-electric-keywords-abbrev-table)) |
| 1021 | 971 | ||
| 1022 | (when (boundp 'edit-var-mode-alist) | 972 | ;; ;; TODO: Commented out as we don't know what it is used for. If |
| 1023 | ;; FIXME: What package uses this? | 973 | ;; ;; there are no bug reports about this for Emacs 28.1, this |
| 1024 | (add-to-list 'edit-var-mode-alist '(perl-mode (regexp . "^cperl-")))) | 974 | ;; ;; can probably be removed. (Code search online reveals nothing.) |
| 975 | ;; (when (boundp 'edit-var-mode-alist) | ||
| 976 | ;; ;; FIXME: What package uses this? | ||
| 977 | ;; (add-to-list 'edit-var-mode-alist '(perl-mode (regexp . "^cperl-")))) | ||
| 1025 | 978 | ||
| 1026 | (defvar cperl-mode-map | 979 | (defvar cperl-mode-map |
| 1027 | (let ((map (make-sparse-keymap))) | 980 | (let ((map (make-sparse-keymap))) |
| @@ -1257,6 +1210,153 @@ versions of Emacs." | |||
| 1257 | The expansion is entirely correct because it uses the C preprocessor." | 1210 | The expansion is entirely correct because it uses the C preprocessor." |
| 1258 | t) | 1211 | t) |
| 1259 | 1212 | ||
| 1213 | |||
| 1214 | ;;; Perl Grammar Components | ||
| 1215 | ;; | ||
| 1216 | ;; The following regular expressions are building blocks for a | ||
| 1217 | ;; minimalistic Perl grammar, to be used instead of individual (and | ||
| 1218 | ;; not always consistent) literal regular expressions. | ||
| 1219 | |||
| 1220 | (defconst cperl--basic-identifier-regexp | ||
| 1221 | (rx (sequence (or alpha "_") (* (or word "_")))) | ||
| 1222 | "A regular expression for the name of a \"basic\" Perl variable. | ||
| 1223 | Neither namespace separators nor sigils are included. As is, | ||
| 1224 | this regular expression applies to labels,subroutine calls where | ||
| 1225 | the ampersand sigil is not required, and names of subroutine | ||
| 1226 | attributes.") | ||
| 1227 | |||
| 1228 | (defconst cperl--label-regexp | ||
| 1229 | (rx-to-string | ||
| 1230 | `(sequence | ||
| 1231 | symbol-start | ||
| 1232 | (regexp ,cperl--basic-identifier-regexp) | ||
| 1233 | (0+ space) | ||
| 1234 | ":")) | ||
| 1235 | "A regular expression for a Perl label. | ||
| 1236 | By convention, labels are uppercase alphabetics, but this isn't | ||
| 1237 | enforced.") | ||
| 1238 | |||
| 1239 | (defconst cperl--normal-identifier-regexp | ||
| 1240 | (rx-to-string | ||
| 1241 | `(or | ||
| 1242 | (sequence | ||
| 1243 | (1+ (sequence | ||
| 1244 | (opt (regexp ,cperl--basic-identifier-regexp)) | ||
| 1245 | "::")) | ||
| 1246 | (opt (regexp ,cperl--basic-identifier-regexp))) | ||
| 1247 | (regexp ,cperl--basic-identifier-regexp))) | ||
| 1248 | "A regular expression for a Perl variable name with optional namespace. | ||
| 1249 | Examples are `foo`, `Some::Module::VERSION`, and `::` (yes, that | ||
| 1250 | is a legal variable name).") | ||
| 1251 | |||
| 1252 | (defconst cperl--special-identifier-regexp | ||
| 1253 | (rx-to-string | ||
| 1254 | `(or | ||
| 1255 | (1+ digit) ; $0, $1, $2, ... | ||
| 1256 | (sequence "^" (any "A-Z" "]^_?\\")) ; $^V | ||
| 1257 | (sequence "{" (0+ space) ; ${^MATCH} | ||
| 1258 | "^" (any "A-Z" "]^_?\\") | ||
| 1259 | (0+ (any "A-Z" "_" digit)) | ||
| 1260 | (0+ space) "}") | ||
| 1261 | (in "!\"$%&'()+,-./:;<=>?@\\]^_`|~"))) ; $., $|, $", ... but not $^ or ${ | ||
| 1262 | "The list of Perl \"punctuation\" variables, as listed in perlvar.") | ||
| 1263 | |||
| 1264 | (defconst cperl--ws-regexp | ||
| 1265 | (rx-to-string | ||
| 1266 | '(or space "\n")) | ||
| 1267 | "Regular expression for a single whitespace in Perl.") | ||
| 1268 | |||
| 1269 | (defconst cperl--eol-comment-regexp | ||
| 1270 | (rx-to-string | ||
| 1271 | '(sequence "#" (0+ (not (in "\n"))) "\n")) | ||
| 1272 | "Regular expression for a single end-of-line comment in Perl") | ||
| 1273 | |||
| 1274 | (defconst cperl--ws-or-comment-regexp | ||
| 1275 | (rx-to-string | ||
| 1276 | `(1+ | ||
| 1277 | (or | ||
| 1278 | (regexp ,cperl--ws-regexp) | ||
| 1279 | (regexp ,cperl--eol-comment-regexp)))) | ||
| 1280 | "Regular expression for a sequence of whitespace and comments in Perl.") | ||
| 1281 | |||
| 1282 | (defconst cperl--ows-regexp | ||
| 1283 | (rx-to-string | ||
| 1284 | `(opt (regexp ,cperl--ws-or-comment-regexp))) | ||
| 1285 | "Regular expression for optional whitespaces or comments in Perl") | ||
| 1286 | |||
| 1287 | (defconst cperl--version-regexp | ||
| 1288 | (rx-to-string | ||
| 1289 | `(or | ||
| 1290 | (sequence (opt "v") | ||
| 1291 | (>= 2 (sequence (1+ digit) ".")) | ||
| 1292 | (1+ digit) | ||
| 1293 | (opt (sequence "_" (1+ word)))) | ||
| 1294 | (sequence (1+ digit) | ||
| 1295 | (opt (sequence "." (1+ digit))) | ||
| 1296 | (opt (sequence "_" (1+ word)))))) | ||
| 1297 | "A sequence for recommended version number schemes in Perl.") | ||
| 1298 | |||
| 1299 | (defconst cperl--package-regexp | ||
| 1300 | (rx-to-string | ||
| 1301 | `(sequence | ||
| 1302 | "package" ; FIXME: the "class" and "role" keywords need to be | ||
| 1303 | ; recognized soon...ish. | ||
| 1304 | (regexp ,cperl--ws-or-comment-regexp) | ||
| 1305 | (group (regexp ,cperl--normal-identifier-regexp)) | ||
| 1306 | (opt | ||
| 1307 | (sequence | ||
| 1308 | (regexp ,cperl--ws-or-comment-regexp) | ||
| 1309 | (group (regexp ,cperl--version-regexp)))))) | ||
| 1310 | "A regular expression for package NAME VERSION in Perl. | ||
| 1311 | Contains two groups for the package name and version.") | ||
| 1312 | |||
| 1313 | (defconst cperl--package-for-imenu-regexp | ||
| 1314 | (rx-to-string | ||
| 1315 | `(sequence | ||
| 1316 | (regexp ,cperl--package-regexp) | ||
| 1317 | (regexp ,cperl--ows-regexp) | ||
| 1318 | (group (or ";" "{")))) | ||
| 1319 | "A regular expression to collect package names for `imenu`. | ||
| 1320 | Catches \"package NAME;\", \"package NAME VERSION;\", \"package | ||
| 1321 | NAME BLOCK\" and \"package NAME VERSION BLOCK.\" Contains three | ||
| 1322 | groups: Two from `cperl--package-regexp` for the package name and | ||
| 1323 | version, and a third to detect \"package BLOCK\" syntax.") | ||
| 1324 | |||
| 1325 | (defconst cperl--sub-name-regexp | ||
| 1326 | (rx-to-string | ||
| 1327 | `(sequence | ||
| 1328 | (optional (sequence (group (or "my" "state" "our")) | ||
| 1329 | (regexp ,cperl--ws-or-comment-regexp))) | ||
| 1330 | "sub" ; FIXME: the "method" and maybe "fun" keywords need to be | ||
| 1331 | ; recognized soon...ish. | ||
| 1332 | (regexp ,cperl--ws-or-comment-regexp) | ||
| 1333 | (group (regexp ,cperl--normal-identifier-regexp)))) | ||
| 1334 | "A regular expression to detect a subroutine start. | ||
| 1335 | Contains two groups: One for to distinguish lexical from | ||
| 1336 | \"normal\" subroutines and one for the subroutine name.") | ||
| 1337 | |||
| 1338 | (defconst cperl--pod-heading-regexp | ||
| 1339 | (rx-to-string | ||
| 1340 | `(sequence | ||
| 1341 | line-start "=head" | ||
| 1342 | (group (in "1-4")) | ||
| 1343 | (1+ (in " \t")) | ||
| 1344 | (group (1+ (not (in "\n")))) | ||
| 1345 | line-end)) ; that line-end seems to be redundant? | ||
| 1346 | "A regular expression to detect a POD heading. | ||
| 1347 | Contains two groups: One for the heading level, and one for the | ||
| 1348 | heading text.") | ||
| 1349 | |||
| 1350 | (defconst cperl--imenu-entries-regexp | ||
| 1351 | (rx-to-string | ||
| 1352 | `(or | ||
| 1353 | (regexp ,cperl--package-for-imenu-regexp) ; 1..3 | ||
| 1354 | (regexp ,cperl--sub-name-regexp) ; 4..5 | ||
| 1355 | (regexp ,cperl--pod-heading-regexp))) ; 6..7 | ||
| 1356 | "A regular expression to collect stuff that goes into the `imenu` index. | ||
| 1357 | Covers packages, subroutines, and POD headings.") | ||
| 1358 | |||
| 1359 | |||
| 1260 | ;; These two must be unwound, otherwise take exponential time | 1360 | ;; These two must be unwound, otherwise take exponential time |
| 1261 | (defconst cperl-maybe-white-and-comment-rex "[ \t\n]*\\(#[^\n]*\n[ \t\n]*\\)*" | 1361 | (defconst cperl-maybe-white-and-comment-rex "[ \t\n]*\\(#[^\n]*\n[ \t\n]*\\)*" |
| 1262 | "Regular expression to match optional whitespace with interspersed comments. | 1362 | "Regular expression to match optional whitespace with interspersed comments. |
| @@ -1268,8 +1368,7 @@ Should contain exactly one group.") | |||
| 1268 | Should contain exactly one group.") | 1368 | Should contain exactly one group.") |
| 1269 | 1369 | ||
| 1270 | 1370 | ||
| 1271 | ;; Is incorporated in `cperl-imenu--function-name-regexp-perl' | 1371 | ;; Is incorporated in `cperl-outline-regexp', `defun-prompt-regexp'. |
| 1272 | ;; `cperl-outline-regexp', `defun-prompt-regexp'. | ||
| 1273 | ;; Details of groups in this may be used in several functions; see comments | 1372 | ;; Details of groups in this may be used in several functions; see comments |
| 1274 | ;; near mentioned above variable(s)... | 1373 | ;; near mentioned above variable(s)... |
| 1275 | ;; sub($$):lvalue{} sub:lvalue{} Both allowed... | 1374 | ;; sub($$):lvalue{} sub:lvalue{} Both allowed... |
| @@ -1396,13 +1495,15 @@ the last)." | |||
| 1396 | (defvar cperl-font-lock-multiline nil) | 1495 | (defvar cperl-font-lock-multiline nil) |
| 1397 | (defvar cperl-font-locking nil) | 1496 | (defvar cperl-font-locking nil) |
| 1398 | 1497 | ||
| 1399 | ;; NB as it stands the code in cperl-mode assumes this only has one | 1498 | (defvar cperl-compilation-error-regexp-list |
| 1400 | ;; element. Since XEmacs 19 support has been dropped, this could all be simplified. | ||
| 1401 | (defvar cperl-compilation-error-regexp-alist | ||
| 1402 | ;; This look like a paranoiac regexp: could anybody find a better one? (which WORKS). | 1499 | ;; This look like a paranoiac regexp: could anybody find a better one? (which WORKS). |
| 1403 | '(("^[^\n]* \\(file\\|at\\) \\([^ \t\n]+\\) [^\n]*line \\([0-9]+\\)[\\., \n]" | 1500 | '("^[^\n]* \\(file\\|at\\) \\([^ \t\n]+\\) [^\n]*line \\([0-9]+\\)[\\., \n]" |
| 1404 | 2 3)) | 1501 | 2 3) |
| 1405 | "Alist that specifies how to match errors in perl output.") | 1502 | "List that specifies how to match errors in Perl output.") |
| 1503 | |||
| 1504 | (defvar cperl-compilation-error-regexp-alist) | ||
| 1505 | (make-obsolete-variable 'cperl-compilation-error-regexp-alist | ||
| 1506 | 'cperl-compilation-error-regexp-list "28.1") | ||
| 1406 | 1507 | ||
| 1407 | (defvar compilation-error-regexp-alist) | 1508 | (defvar compilation-error-regexp-alist) |
| 1408 | 1509 | ||
| @@ -1512,8 +1613,7 @@ span the needed amount of lines. | |||
| 1512 | 1613 | ||
| 1513 | Variables `cperl-pod-here-scan', `cperl-pod-here-fontify', | 1614 | Variables `cperl-pod-here-scan', `cperl-pod-here-fontify', |
| 1514 | `cperl-pod-face', `cperl-pod-head-face' control processing of POD and | 1615 | `cperl-pod-face', `cperl-pod-head-face' control processing of POD and |
| 1515 | here-docs sections. With capable Emaxen results of scan are used | 1616 | here-docs sections. Results of scan are used for indentation too. |
| 1516 | for indentation too, otherwise they are used for highlighting only. | ||
| 1517 | 1617 | ||
| 1518 | Variables controlling indentation style: | 1618 | Variables controlling indentation style: |
| 1519 | `cperl-tab-always-indent' | 1619 | `cperl-tab-always-indent' |
| @@ -1639,19 +1739,18 @@ or as help on variables `cperl-tips', `cperl-problems', | |||
| 1639 | (setq-local imenu-sort-function nil) | 1739 | (setq-local imenu-sort-function nil) |
| 1640 | (setq-local vc-rcs-header cperl-vc-rcs-header) | 1740 | (setq-local vc-rcs-header cperl-vc-rcs-header) |
| 1641 | (setq-local vc-sccs-header cperl-vc-sccs-header) | 1741 | (setq-local vc-sccs-header cperl-vc-sccs-header) |
| 1642 | (cond ((boundp 'compilation-error-regexp-alist-alist);; xemacs 20.x | 1742 | (when (boundp 'compilation-error-regexp-alist-alist) |
| 1643 | (setq-local compilation-error-regexp-alist-alist | 1743 | ;; The let here is just a compatibility kludge for the obsolete |
| 1644 | (cons (cons 'cperl (car cperl-compilation-error-regexp-alist)) | 1744 | ;; variable `cperl-compilation-error-regexp-alist'. It can be removed |
| 1645 | compilation-error-regexp-alist-alist)) | 1745 | ;; when that variable is removed. |
| 1646 | (if (fboundp 'compilation-build-compilation-error-regexp-alist) | 1746 | (let ((regexp (if (boundp 'cperl-compilation-error-regexp-alist) |
| 1647 | (let ((f 'compilation-build-compilation-error-regexp-alist)) | 1747 | (car cperl-compilation-error-regexp-alist) |
| 1648 | (funcall f)) | 1748 | cperl-compilation-error-regexp-list))) |
| 1649 | (make-local-variable 'compilation-error-regexp-alist) | 1749 | (setq-local compilation-error-regexp-alist-alist |
| 1650 | (push 'cperl compilation-error-regexp-alist))) | 1750 | (cons (cons 'cperl regexp) |
| 1651 | ((boundp 'compilation-error-regexp-alist);; xemacs 19.x | 1751 | compilation-error-regexp-alist-alist))) |
| 1652 | (setq-local compilation-error-regexp-alist | 1752 | (make-local-variable 'compilation-error-regexp-alist) |
| 1653 | (append cperl-compilation-error-regexp-alist | 1753 | (push 'cperl compilation-error-regexp-alist)) |
| 1654 | compilation-error-regexp-alist)))) | ||
| 1655 | (setq-local font-lock-defaults | 1754 | (setq-local font-lock-defaults |
| 1656 | '((cperl-load-font-lock-keywords | 1755 | '((cperl-load-font-lock-keywords |
| 1657 | cperl-load-font-lock-keywords-1 | 1756 | cperl-load-font-lock-keywords-1 |
| @@ -1665,12 +1764,12 @@ or as help on variables `cperl-tips', `cperl-problems', | |||
| 1665 | (setq-local syntax-propertize-function | 1764 | (setq-local syntax-propertize-function |
| 1666 | (lambda (start end) | 1765 | (lambda (start end) |
| 1667 | (goto-char start) | 1766 | (goto-char start) |
| 1668 | ;; Even if cperl-fontify-syntaxically has already gone | 1767 | ;; Even if cperl-fontify-syntactically has already gone |
| 1669 | ;; beyond `start', syntax-propertize has just removed | 1768 | ;; beyond `start', syntax-propertize has just removed |
| 1670 | ;; syntax-table properties between start and end, so we have | 1769 | ;; syntax-table properties between start and end, so we have |
| 1671 | ;; to re-apply them. | 1770 | ;; to re-apply them. |
| 1672 | (setq cperl-syntax-done-to start) | 1771 | (setq cperl-syntax-done-to start) |
| 1673 | (cperl-fontify-syntaxically end)))) | 1772 | (cperl-fontify-syntactically end)))) |
| 1674 | (setq cperl-font-lock-multiline t) ; Not localized... | 1773 | (setq cperl-font-lock-multiline t) ; Not localized... |
| 1675 | (setq-local font-lock-multiline t) | 1774 | (setq-local font-lock-multiline t) |
| 1676 | (setq-local font-lock-fontify-region-function | 1775 | (setq-local font-lock-fontify-region-function |
| @@ -5188,117 +5287,80 @@ indentation and initial hashes. Behaves usually outside of comment." | |||
| 5188 | ;; Previous space could have gone: | 5287 | ;; Previous space could have gone: |
| 5189 | (or (memq (preceding-char) '(?\s ?\t)) (insert " ")))))) | 5288 | (or (memq (preceding-char) '(?\s ?\t)) (insert " ")))))) |
| 5190 | 5289 | ||
| 5191 | (defun cperl-imenu-addback (lst &optional isback name) | 5290 | (defun cperl-imenu--create-perl-index () |
| 5192 | ;; We suppose that the lst is a DAG, unless the first element only | 5291 | "Implement `imenu-create-index-function` for CPerl mode. |
| 5193 | ;; loops back, and ISBACK is set. Thus this function cannot be | 5292 | This function relies on syntaxification to exclude lines which |
| 5194 | ;; applied twice without ISBACK set. | 5293 | look like declarations but actually are part of a string, a |
| 5195 | (cond ((not cperl-imenu-addback) lst) | 5294 | comment, or POD." |
| 5196 | (t | 5295 | (interactive) ; We'll remove that at some point |
| 5197 | (or name | 5296 | (goto-char (point-min)) |
| 5198 | (setq name "+++BACK+++")) | 5297 | (cperl-update-syntaxification (point-max)) |
| 5199 | (mapc (lambda (elt) | 5298 | (let ((case-fold-search nil) |
| 5200 | (if (and (listp elt) (listp (cdr elt))) | 5299 | (index-alist '()) |
| 5201 | (progn | 5300 | (index-package-alist '()) |
| 5202 | ;; In the other order it goes up | 5301 | (index-pod-alist '()) |
| 5203 | ;; one level only ;-( | 5302 | (index-sub-alist '()) |
| 5204 | (setcdr elt (cons (cons name lst) | ||
| 5205 | (cdr elt))) | ||
| 5206 | (cperl-imenu-addback (cdr elt) t name)))) | ||
| 5207 | (if isback (cdr lst) lst)) | ||
| 5208 | lst))) | ||
| 5209 | |||
| 5210 | (defun cperl-imenu--create-perl-index (&optional regexp) | ||
| 5211 | (require 'imenu) ; May be called from TAGS creator | ||
| 5212 | (let ((index-alist '()) (index-pack-alist '()) (index-pod-alist '()) | ||
| 5213 | (index-unsorted-alist '()) | 5303 | (index-unsorted-alist '()) |
| 5214 | (index-meth-alist '()) meth | 5304 | (package-stack '()) ; for package NAME BLOCK |
| 5215 | packages ends-ranges p marker is-proto | 5305 | (current-package "(main)") |
| 5216 | is-pack index index1 name (end-range 0) package) | 5306 | (current-package-end (point-max))) ; end of package scope |
| 5217 | (goto-char (point-min)) | 5307 | ;; collect index entries |
| 5218 | (cperl-update-syntaxification (point-max)) | 5308 | (while (re-search-forward cperl--imenu-entries-regexp nil t) |
| 5219 | ;; Search for the function | 5309 | ;; First, check whether we have left the scope of previously |
| 5220 | (progn ;;save-match-data | 5310 | ;; recorded packages, and if so, eliminate them from the stack. |
| 5221 | (while (re-search-forward | 5311 | (while (< current-package-end (point)) |
| 5222 | (or regexp cperl-imenu--function-name-regexp-perl) | 5312 | (setq current-package (pop package-stack)) |
| 5223 | nil t) | 5313 | (setq current-package-end (pop package-stack))) |
| 5224 | ;; 2=package-group, 5=package-name 8=sub-name | 5314 | (let ((state (syntax-ppss)) |
| 5315 | name marker) ; for the "current" entry | ||
| 5225 | (cond | 5316 | (cond |
| 5226 | ((and ; Skip some noise if building tags | 5317 | ((nth 3 state) nil) ; matched in a string, so skip |
| 5227 | (match-beginning 5) ; package name | 5318 | ((match-string 1) ; found a package name! |
| 5228 | ;;(eq (char-after (match-beginning 2)) ?p) ; package | 5319 | (unless (nth 4 state) ; skip if in a comment |
| 5229 | (not (save-match-data | 5320 | (setq name (match-string-no-properties 1) |
| 5230 | (looking-at "[ \t\n]*;")))) ; Plain text word 'package' | 5321 | marker (copy-marker (match-end 1))) |
| 5231 | nil) | 5322 | (if (string= (match-string 3) ";") |
| 5232 | ((and | 5323 | (setq current-package name) ; package NAME; |
| 5233 | (or (match-beginning 2) | 5324 | ;; No semicolon, therefore we have: package NAME BLOCK. |
| 5234 | (match-beginning 8)) ; package or sub | 5325 | ;; Stash the current package, because we need to restore |
| 5235 | ;; Skip if quoted (will not skip multi-line ''-strings :-(): | 5326 | ;; it after the end of BLOCK. |
| 5236 | (null (get-text-property (match-beginning 1) 'syntax-table)) | 5327 | (push current-package-end package-stack) |
| 5237 | (null (get-text-property (match-beginning 1) 'syntax-type)) | 5328 | (push current-package package-stack) |
| 5238 | (null (get-text-property (match-beginning 1) 'in-pod))) | 5329 | ;; record the current name and its scope |
| 5239 | (setq is-pack (match-beginning 2)) | 5330 | (setq current-package name) |
| 5240 | ;; (if (looking-at "([^()]*)[ \t\n\f]*") | 5331 | (setq current-package-end (save-excursion |
| 5241 | ;; (goto-char (match-end 0))) ; Messes what follows | 5332 | (goto-char (match-beginning 3)) |
| 5242 | (setq meth nil | 5333 | (forward-sexp) |
| 5243 | p (point)) | 5334 | (point))) |
| 5244 | (while (and ends-ranges (>= p (car ends-ranges))) | 5335 | (push (cons name marker) index-package-alist) |
| 5245 | ;; delete obsolete entries | 5336 | (push (cons (concat "package " name) marker) index-unsorted-alist)))) |
| 5246 | (setq ends-ranges (cdr ends-ranges) packages (cdr packages))) | 5337 | ((match-string 5) ; found a sub name! |
| 5247 | (setq package (or (car packages) "") | 5338 | (unless (nth 4 state) ; skip if in a comment |
| 5248 | end-range (or (car ends-ranges) 0)) | 5339 | (setq name (match-string-no-properties 5) |
| 5249 | (if is-pack ; doing "package" | 5340 | marker (copy-marker (match-end 5))) |
| 5250 | (progn | 5341 | ;; Qualify the sub name with the package if it doesn't |
| 5251 | (if (match-beginning 5) ; named package | 5342 | ;; already have one, and if it isn't lexically scoped. |
| 5252 | (setq name (buffer-substring (match-beginning 5) | 5343 | ;; "my" and "state" subs are lexically scoped, but "our" |
| 5253 | (match-end 5)) | 5344 | ;; are just lexical aliases to package subs. |
| 5254 | name (progn | 5345 | (if (and (null (string-match "::" name)) |
| 5255 | (set-text-properties 0 (length name) nil name) | 5346 | (or (null (match-string 4)) |
| 5256 | name) | 5347 | (string-equal (match-string 4) "our"))) |
| 5257 | package (concat name "::") | 5348 | (setq name (concat current-package "::" name))) |
| 5258 | name (concat "package " name)) | 5349 | (let ((index (cons name marker))) |
| 5259 | ;; Support nameless packages | 5350 | (push index index-alist) |
| 5260 | (setq name "package;" package "")) | 5351 | (push index index-sub-alist) |
| 5261 | (setq end-range | 5352 | (push index index-unsorted-alist)))) |
| 5262 | (save-excursion | 5353 | ((match-string 6) ; found a POD heading! |
| 5263 | (parse-partial-sexp (point) (point-max) -1) (point)) | 5354 | (when (get-text-property (match-beginning 6) 'in-pod) |
| 5264 | ends-ranges (cons end-range ends-ranges) | 5355 | (setq name (concat (make-string |
| 5265 | packages (cons package packages))) | 5356 | (* 3 (- (char-after (match-beginning 6)) ?1)) |
| 5266 | (setq is-proto | 5357 | ?\ ) |
| 5267 | (or (eq (following-char) ?\;) | 5358 | (match-string-no-properties 7)) |
| 5268 | (eq 0 (get-text-property (point) 'attrib-group))))) | 5359 | marker (copy-marker (match-beginning 7))) |
| 5269 | ;; Skip this function name if it is a prototype declaration. | 5360 | (push (cons name marker) index-pod-alist) |
| 5270 | (if (and is-proto (not is-pack)) nil | 5361 | (push (cons (concat "=" name) marker) index-unsorted-alist))) |
| 5271 | (or is-pack | 5362 | (t (error "Unidentified match: %s" (match-string 0)))))) |
| 5272 | (setq name | 5363 | ;; Now format the collected stuff |
| 5273 | (buffer-substring (match-beginning 8) (match-end 8))) | ||
| 5274 | (set-text-properties 0 (length name) nil name)) | ||
| 5275 | (setq marker (make-marker)) | ||
| 5276 | (set-marker marker (match-end (if is-pack 2 8))) | ||
| 5277 | (cond (is-pack nil) | ||
| 5278 | ((string-match "[:']" name) | ||
| 5279 | (setq meth t)) | ||
| 5280 | ((> p end-range) nil) | ||
| 5281 | (t | ||
| 5282 | (setq name (concat package name) meth t))) | ||
| 5283 | (setq index (cons name marker)) | ||
| 5284 | (if is-pack | ||
| 5285 | (push index index-pack-alist) | ||
| 5286 | (push index index-alist)) | ||
| 5287 | (if meth (push index index-meth-alist)) | ||
| 5288 | (push index index-unsorted-alist))) | ||
| 5289 | ((match-beginning 16) ; POD section | ||
| 5290 | (setq name (buffer-substring (match-beginning 17) (match-end 17)) | ||
| 5291 | marker (make-marker)) | ||
| 5292 | (set-marker marker (match-beginning 17)) | ||
| 5293 | (set-text-properties 0 (length name) nil name) | ||
| 5294 | (setq name (concat (make-string | ||
| 5295 | (* 3 (- (char-after (match-beginning 16)) ?1)) | ||
| 5296 | ?\ ) | ||
| 5297 | name) | ||
| 5298 | index (cons name marker)) | ||
| 5299 | (setq index1 (cons (concat "=" name) (cdr index))) | ||
| 5300 | (push index index-pod-alist) | ||
| 5301 | (push index1 index-unsorted-alist))))) | ||
| 5302 | (setq index-alist | 5364 | (setq index-alist |
| 5303 | (if (default-value 'imenu-sort-function) | 5365 | (if (default-value 'imenu-sort-function) |
| 5304 | (sort index-alist (default-value 'imenu-sort-function)) | 5366 | (sort index-alist (default-value 'imenu-sort-function)) |
| @@ -5307,14 +5369,14 @@ indentation and initial hashes. Behaves usually outside of comment." | |||
| 5307 | (push (cons "+POD headers+..." | 5369 | (push (cons "+POD headers+..." |
| 5308 | (nreverse index-pod-alist)) | 5370 | (nreverse index-pod-alist)) |
| 5309 | index-alist)) | 5371 | index-alist)) |
| 5310 | (and (or index-pack-alist index-meth-alist) | 5372 | (and (or index-package-alist index-sub-alist) |
| 5311 | (let ((lst index-pack-alist) hier-list pack elt group name) | 5373 | (let ((lst index-package-alist) hier-list pack elt group name) |
| 5312 | ;; Remove "package ", reverse and uniquify. | 5374 | ;; reverse and uniquify. |
| 5313 | (while lst | 5375 | (while lst |
| 5314 | (setq elt (car lst) lst (cdr lst) name (substring (car elt) 8)) | 5376 | (setq elt (car lst) lst (cdr lst) name (car elt)) |
| 5315 | (if (assoc name hier-list) nil | 5377 | (if (assoc name hier-list) nil |
| 5316 | (setq hier-list (cons (cons name (cdr elt)) hier-list)))) | 5378 | (setq hier-list (cons (cons name (cdr elt)) hier-list)))) |
| 5317 | (setq lst index-meth-alist) | 5379 | (setq lst index-sub-alist) |
| 5318 | (while lst | 5380 | (while lst |
| 5319 | (setq elt (car lst) lst (cdr lst)) | 5381 | (setq elt (car lst) lst (cdr lst)) |
| 5320 | (cond ((string-match "\\(::\\|'\\)[_a-zA-Z0-9]+$" (car elt)) | 5382 | (cond ((string-match "\\(::\\|'\\)[_a-zA-Z0-9]+$" (car elt)) |
| @@ -5342,17 +5404,18 @@ indentation and initial hashes. Behaves usually outside of comment." | |||
| 5342 | (push (cons "+Hierarchy+..." | 5404 | (push (cons "+Hierarchy+..." |
| 5343 | hier-list) | 5405 | hier-list) |
| 5344 | index-alist))) | 5406 | index-alist))) |
| 5345 | (and index-pack-alist | 5407 | (and index-package-alist |
| 5346 | (push (cons "+Packages+..." | 5408 | (push (cons "+Packages+..." |
| 5347 | (nreverse index-pack-alist)) | 5409 | (nreverse index-package-alist)) |
| 5348 | index-alist)) | 5410 | index-alist)) |
| 5349 | (and (or index-pack-alist index-pod-alist | 5411 | (and (or index-package-alist index-pod-alist |
| 5350 | (default-value 'imenu-sort-function)) | 5412 | (default-value 'imenu-sort-function)) |
| 5351 | index-unsorted-alist | 5413 | index-unsorted-alist |
| 5352 | (push (cons "+Unsorted List+..." | 5414 | (push (cons "+Unsorted List+..." |
| 5353 | (nreverse index-unsorted-alist)) | 5415 | (nreverse index-unsorted-alist)) |
| 5354 | index-alist)) | 5416 | index-alist)) |
| 5355 | (cperl-imenu-addback index-alist))) | 5417 | ;; Finally, return the whole collection |
| 5418 | index-alist)) | ||
| 5356 | 5419 | ||
| 5357 | 5420 | ||
| 5358 | ;; Suggested by Mark A. Hershberger | 5421 | ;; Suggested by Mark A. Hershberger |
| @@ -5415,120 +5478,79 @@ indentation and initial hashes. Behaves usually outside of comment." | |||
| 5415 | (cons | 5478 | (cons |
| 5416 | (concat | 5479 | (concat |
| 5417 | "\\(^\\|[^$@%&\\]\\)\\<\\(" | 5480 | "\\(^\\|[^$@%&\\]\\)\\<\\(" |
| 5418 | ;; FIXME: Use regexp-opt. | 5481 | (regexp-opt |
| 5419 | (mapconcat | ||
| 5420 | #'identity | ||
| 5421 | (append | 5482 | (append |
| 5422 | cperl-sub-keywords | 5483 | cperl-sub-keywords |
| 5423 | '("if" "until" "while" "elsif" "else" | 5484 | '("if" "until" "while" "elsif" "else" |
| 5424 | "given" "when" "default" "break" | 5485 | "given" "when" "default" "break" |
| 5425 | "unless" "for" | 5486 | "unless" "for" |
| 5426 | "try" "catch" "finally" | 5487 | "try" "catch" "finally" |
| 5427 | "foreach" "continue" "exit" "die" "last" "goto" "next" | 5488 | "foreach" "continue" "exit" "die" "last" "goto" "next" |
| 5428 | "redo" "return" "local" "exec" | 5489 | "redo" "return" "local" "exec" |
| 5429 | "do" "dump" | 5490 | "do" "dump" |
| 5430 | "use" "our" | 5491 | "use" "our" |
| 5431 | "require" "package" "eval" "evalbytes" "my" "state" | 5492 | "require" "package" "eval" "evalbytes" "my" "state" |
| 5432 | "BEGIN" "END" "CHECK" "INIT" "UNITCHECK")) | 5493 | "BEGIN" "END" "CHECK" "INIT" "UNITCHECK"))) ; Flow control |
| 5433 | "\\|") ; Flow control | ||
| 5434 | "\\)\\>") 2) ; was "\\)[ \n\t;():,|&]" | 5494 | "\\)\\>") 2) ; was "\\)[ \n\t;():,|&]" |
| 5435 | ; In what follows we use `type' style | 5495 | ; In what follows we use `type' style |
| 5436 | ; for overwritable builtins | 5496 | ; for overwritable builtins |
| 5437 | (list | 5497 | (list |
| 5438 | (concat | 5498 | (concat |
| 5439 | "\\(^\\|[^$@%&\\]\\)\\<\\(" | 5499 | "\\(^\\|[^$@%&\\]\\)\\<\\(" |
| 5440 | ;; FIXME: Use regexp-opt. | 5500 | (regexp-opt |
| 5441 | ;; "CORE" "__FILE__" "__LINE__" "__SUB__" "abs" "accept" "alarm" | 5501 | '("CORE" "__FILE__" "__LINE__" "__SUB__" "__PACKAGE__" |
| 5442 | ;; "and" "atan2" "bind" "binmode" "bless" "caller" | 5502 | "abs" "accept" "alarm" "and" "atan2" |
| 5443 | ;; "chdir" "chmod" "chown" "chr" "chroot" "close" | 5503 | "bind" "binmode" "bless" "caller" |
| 5444 | ;; "closedir" "cmp" "connect" "continue" "cos" "crypt" | 5504 | "chdir" "chmod" "chown" "chr" "chroot" "close" |
| 5445 | ;; "dbmclose" "dbmopen" "die" "dump" "endgrent" | 5505 | "closedir" "cmp" "connect" "continue" "cos" "crypt" |
| 5446 | ;; "endhostent" "endnetent" "endprotoent" "endpwent" | 5506 | "dbmclose" "dbmopen" "die" "dump" "endgrent" |
| 5447 | ;; "endservent" "eof" "eq" "exec" "exit" "exp" "fc" "fcntl" | 5507 | "endhostent" "endnetent" "endprotoent" "endpwent" |
| 5448 | ;; "fileno" "flock" "fork" "formline" "ge" "getc" | 5508 | "endservent" "eof" "eq" "exec" "exit" "exp" "fc" "fcntl" |
| 5449 | ;; "getgrent" "getgrgid" "getgrnam" "gethostbyaddr" | 5509 | "fileno" "flock" "fork" "formline" "ge" "getc" |
| 5450 | ;; "gethostbyname" "gethostent" "getlogin" | 5510 | "getgrent" "getgrgid" "getgrnam" "gethostbyaddr" |
| 5451 | ;; "getnetbyaddr" "getnetbyname" "getnetent" | 5511 | "gethostbyname" "gethostent" "getlogin" |
| 5452 | ;; "getpeername" "getpgrp" "getppid" "getpriority" | 5512 | "getnetbyaddr" "getnetbyname" "getnetent" |
| 5453 | ;; "getprotobyname" "getprotobynumber" "getprotoent" | 5513 | "getpeername" "getpgrp" "getppid" "getpriority" |
| 5454 | ;; "getpwent" "getpwnam" "getpwuid" "getservbyname" | 5514 | "getprotobyname" "getprotobynumber" "getprotoent" |
| 5455 | ;; "getservbyport" "getservent" "getsockname" | 5515 | "getpwent" "getpwnam" "getpwuid" "getservbyname" |
| 5456 | ;; "getsockopt" "glob" "gmtime" "gt" "hex" "index" "int" | 5516 | "getservbyport" "getservent" "getsockname" |
| 5457 | ;; "ioctl" "join" "kill" "lc" "lcfirst" "le" "length" | 5517 | "getsockopt" "glob" "gmtime" "gt" "hex" "index" "int" |
| 5458 | ;; "link" "listen" "localtime" "lock" "log" "lstat" "lt" | 5518 | "ioctl" "join" "kill" "lc" "lcfirst" "le" "length" |
| 5459 | ;; "mkdir" "msgctl" "msgget" "msgrcv" "msgsnd" "ne" | 5519 | "link" "listen" "localtime" "lock" "log" "lstat" "lt" |
| 5460 | ;; "not" "oct" "open" "opendir" "or" "ord" "pack" "pipe" | 5520 | "mkdir" "msgctl" "msgget" "msgrcv" "msgsnd" "ne" |
| 5461 | ;; "quotemeta" "rand" "read" "readdir" "readline" | 5521 | "not" "oct" "open" "opendir" "or" "ord" "pack" "pipe" |
| 5462 | ;; "readlink" "readpipe" "recv" "ref" "rename" "require" | 5522 | "quotemeta" "rand" "read" "readdir" "readline" |
| 5463 | ;; "reset" "reverse" "rewinddir" "rindex" "rmdir" "seek" | 5523 | "readlink" "readpipe" "recv" "ref" "rename" "require" |
| 5464 | ;; "seekdir" "select" "semctl" "semget" "semop" "send" | 5524 | "reset" "reverse" "rewinddir" "rindex" "rmdir" "seek" |
| 5465 | ;; "setgrent" "sethostent" "setnetent" "setpgrp" | 5525 | "seekdir" "select" "semctl" "semget" "semop" "send" |
| 5466 | ;; "setpriority" "setprotoent" "setpwent" "setservent" | 5526 | "setgrent" "sethostent" "setnetent" "setpgrp" |
| 5467 | ;; "setsockopt" "shmctl" "shmget" "shmread" "shmwrite" | 5527 | "setpriority" "setprotoent" "setpwent" "setservent" |
| 5468 | ;; "shutdown" "sin" "sleep" "socket" "socketpair" | 5528 | "setsockopt" "shmctl" "shmget" "shmread" "shmwrite" |
| 5469 | ;; "sprintf" "sqrt" "srand" "stat" "substr" "symlink" | 5529 | "shutdown" "sin" "sleep" "socket" "socketpair" |
| 5470 | ;; "syscall" "sysopen" "sysread" "sysseek" "system" "syswrite" "tell" | 5530 | "sprintf" "sqrt" "srand" "stat" "substr" "symlink" |
| 5471 | ;; "telldir" "time" "times" "truncate" "uc" "ucfirst" | 5531 | "syscall" "sysopen" "sysread" "sysseek" "system" "syswrite" "tell" |
| 5472 | ;; "umask" "unlink" "unpack" "utime" "values" "vec" | 5532 | "telldir" "time" "times" "truncate" "uc" "ucfirst" |
| 5473 | ;; "wait" "waitpid" "wantarray" "warn" "write" "x" "xor" | 5533 | "umask" "unlink" "unpack" "utime" "values" "vec" |
| 5474 | "a\\(bs\\|ccept\\|tan2\\|larm\\|nd\\)\\|" | 5534 | "wait" "waitpid" "wantarray" "warn" "write" "x" "xor")) |
| 5475 | "b\\(in\\(d\\|mode\\)\\|less\\)\\|" | 5535 | "\\)\\>") |
| 5476 | "c\\(h\\(r\\(\\|oot\\)\\|dir\\|mod\\|own\\)\\|aller\\|rypt\\|" | 5536 | 2 'font-lock-type-face) |
| 5477 | "lose\\(\\|dir\\)\\|mp\\|o\\(s\\|n\\(tinue\\|nect\\)\\)\\)\\|" | ||
| 5478 | "CORE\\|d\\(ie\\|bm\\(close\\|open\\)\\|ump\\)\\|" | ||
| 5479 | "e\\(x\\(p\\|it\\|ec\\)\\|q\\|nd\\(p\\(rotoent\\|went\\)\\|" | ||
| 5480 | "hostent\\|servent\\|netent\\|grent\\)\\|of\\)\\|" | ||
| 5481 | "f\\(ileno\\|c\\(ntl\\)?\\|lock\\|or\\(k\\|mline\\)\\)\\|" | ||
| 5482 | "g\\(t\\|lob\\|mtime\\|e\\(\\|t\\(p\\(pid\\|r\\(iority\\|" | ||
| 5483 | "oto\\(byn\\(ame\\|umber\\)\\|ent\\)\\)\\|eername\\|w" | ||
| 5484 | "\\(uid\\|ent\\|nam\\)\\|grp\\)\\|host\\(by\\(addr\\|name\\)\\|" | ||
| 5485 | "ent\\)\\|s\\(erv\\(by\\(port\\|name\\)\\|ent\\)\\|" | ||
| 5486 | "ock\\(name\\|opt\\)\\)\\|c\\|login\\|net\\(by\\(addr\\|name\\)\\|" | ||
| 5487 | "ent\\)\\|gr\\(ent\\|nam\\|gid\\)\\)\\)\\)\\|" | ||
| 5488 | "hex\\|i\\(n\\(t\\|dex\\)\\|octl\\)\\|join\\|kill\\|" | ||
| 5489 | "l\\(i\\(sten\\|nk\\)\\|stat\\|c\\(\\|first\\)\\|t\\|e" | ||
| 5490 | "\\(\\|ngth\\)\\|o\\(c\\(altime\\|k\\)\\|g\\)\\)\\|m\\(sg\\(rcv\\|snd\\|" | ||
| 5491 | "ctl\\|get\\)\\|kdir\\)\\|n\\(e\\|ot\\)\\|o\\(pen\\(\\|dir\\)\\|" | ||
| 5492 | "r\\(\\|d\\)\\|ct\\)\\|p\\(ipe\\|ack\\)\\|quotemeta\\|" | ||
| 5493 | "r\\(index\\|and\\|mdir\\|e\\(quire\\|ad\\(pipe\\|\\|lin" | ||
| 5494 | "\\(k\\|e\\)\\|dir\\)\\|set\\|cv\\|verse\\|f\\|winddir\\|name" | ||
| 5495 | "\\)\\)\\|s\\(printf\\|qrt\\|rand\\|tat\\|ubstr\\|e\\(t\\(p\\(r" | ||
| 5496 | "\\(iority\\|otoent\\)\\|went\\|grp\\)\\|hostent\\|s\\(ervent\\|" | ||
| 5497 | "ockopt\\)\\|netent\\|grent\\)\\|ek\\(\\|dir\\)\\|lect\\|" | ||
| 5498 | "m\\(ctl\\|op\\|get\\)\\|nd\\)\\|h\\(utdown\\|m\\(read\\|ctl\\|" | ||
| 5499 | "write\\|get\\)\\)\\|y\\(s\\(read\\|call\\|open\\|tem\\|write\\|seek\\)\\|" | ||
| 5500 | "mlink\\)\\|in\\|leep\\|ocket\\(pair\\|\\)\\)\\|t\\(runcate\\|" | ||
| 5501 | "ell\\(\\|dir\\)\\|ime\\(\\|s\\)\\)\\|u\\(c\\(\\|first\\)\\|" | ||
| 5502 | "time\\|mask\\|n\\(pack\\|link\\)\\)\\|v\\(alues\\|ec\\)\\|" | ||
| 5503 | "w\\(a\\(rn\\|it\\(pid\\|\\)\\|ntarray\\)\\|rite\\)\\|" | ||
| 5504 | "x\\(\\|or\\)\\|__\\(FILE\\|LINE\\|PACKAGE\\|SUB\\)__" | ||
| 5505 | "\\)\\>") 2 'font-lock-type-face) | ||
| 5506 | ;; In what follows we use `other' style | 5537 | ;; In what follows we use `other' style |
| 5507 | ;; for nonoverwritable builtins | 5538 | ;; for nonoverwritable builtins |
| 5508 | ;; Somehow 's', 'm' are not auto-generated??? | ||
| 5509 | (list | 5539 | (list |
| 5510 | (concat | 5540 | (concat |
| 5511 | "\\(^\\|[^$@%&\\]\\)\\<\\(" | 5541 | "\\(^\\|[^$@%&\\]\\)\\<\\(" |
| 5512 | ;; "AUTOLOAD" "BEGIN" "CHECK" "DESTROY" "END" "INIT" "UNITCHECK" "__END__" "chomp" | 5542 | (regexp-opt |
| 5513 | ;; "break" "chop" "default" "defined" "delete" "do" "each" "else" "elsif" | 5543 | '("AUTOLOAD" "BEGIN" "CHECK" "DESTROY" "END" "INIT" "UNITCHECK" |
| 5514 | ;; "eval" "evalbytes" "exists" "for" "foreach" "format" "given" "goto" | 5544 | "__END__" "__DATA__" "break" "catch" "chomp" "chop" "default" |
| 5515 | ;; "grep" "if" "keys" "last" "local" "map" "my" "next" | 5545 | "defined" "delete" "do" "each" "else" "elsif" "eval" |
| 5516 | ;; "no" "our" "package" "pop" "pos" "print" "printf" "prototype" "push" | 5546 | "evalbytes" "exists" "finally" "for" "foreach" "format" "given" |
| 5517 | ;; "q" "qq" "qw" "qx" "redo" "return" "say" "scalar" "shift" | 5547 | "goto" "grep" "if" "keys" "last" "local" "m" "map" "my" "next" |
| 5518 | ;; "sort" "splice" "split" "state" "study" "sub" "tie" "tr" | 5548 | "no" "our" "package" "pop" "pos" "print" "printf" "prototype" |
| 5519 | ;; "undef" "unless" "unshift" "untie" "until" "use" | 5549 | "push" "q" "qq" "qr" "qw" "qx" "redo" "return" "s" "say" "scalar" |
| 5520 | ;; "when" "while" "y" | 5550 | "shift" "sort" "splice" "split" "state" "study" "sub" "tie" |
| 5521 | "AUTOLOAD\\|BEGIN\\|\\(UNIT\\)?CHECK\\|break\\|c\\(atch\\|ho\\(p\\|mp\\)\\)\\|d\\(e\\(f\\(inally\\|ault\\|ined\\)\\|lete\\)\\|" | 5551 | "tied" "tr" "try" "undef" "unless" "unshift" "untie" "until" |
| 5522 | "o\\)\\|DESTROY\\|e\\(ach\\|val\\(bytes\\)?\\|xists\\|ls\\(e\\|if\\)\\)\\|" | 5552 | "use" "when" "while" "y")) |
| 5523 | "END\\|for\\(\\|each\\|mat\\)\\|g\\(iven\\|rep\\|oto\\)\\|INIT\\|if\\|keys\\|" | 5553 | "\\)\\>") |
| 5524 | "l\\(ast\\|ocal\\)\\|m\\(ap\\|y\\)\\|n\\(ext\\|o\\)\\|our\\|" | ||
| 5525 | "p\\(ackage\\|rototype\\|rint\\(\\|f\\)\\|ush\\|o\\(p\\|s\\)\\)\\|" | ||
| 5526 | "q\\(\\|q\\|w\\|x\\|r\\)\\|re\\(turn\\|do\\)\\|s\\(ay\\|pli\\(ce\\|t\\)\\|" | ||
| 5527 | "calar\\|t\\(ate\\|udy\\)\\|ub\\|hift\\|ort\\)\\|t\\(ry?\\|ied?\\)\\|" | ||
| 5528 | "u\\(se\\|n\\(shift\\|ti\\(l\\|e\\)\\|def\\|less\\)\\)\\|" | ||
| 5529 | "wh\\(en\\|ile\\)\\|y\\|__\\(END\\|DATA\\)__" ;__DATA__ added manually | ||
| 5530 | "\\|[sm]" ; Added manually | ||
| 5531 | "\\)\\>") | ||
| 5532 | 2 ''cperl-nonoverridable-face) ; unbound as var, so: doubly quoted | 5554 | 2 ''cperl-nonoverridable-face) ; unbound as var, so: doubly quoted |
| 5533 | ;; (mapconcat #'identity | 5555 | ;; (mapconcat #'identity |
| 5534 | ;; '("#endif" "#else" "#ifdef" "#ifndef" "#if" | 5556 | ;; '("#endif" "#else" "#ifdef" "#ifndef" "#if" |
| @@ -6713,9 +6735,7 @@ One may build such TAGS files from CPerl mode menu." | |||
| 6713 | (cperl-tags-treeify to 1) | 6735 | (cperl-tags-treeify to 1) |
| 6714 | (setcar (nthcdr 2 cperl-hierarchy) | 6736 | (setcar (nthcdr 2 cperl-hierarchy) |
| 6715 | (cperl-menu-to-keymap (cons '("+++UPDATE+++" . -999) (cdr to)))) | 6737 | (cperl-menu-to-keymap (cons '("+++UPDATE+++" . -999) (cdr to)))) |
| 6716 | (message "Updating list of classes: done, requesting display...") | 6738 | (message "Updating list of classes: done, requesting display..."))) |
| 6717 | ;;(cperl-imenu-addback (nth 2 cperl-hierarchy)) | ||
| 6718 | )) | ||
| 6719 | (or (nth 2 cperl-hierarchy) | 6739 | (or (nth 2 cperl-hierarchy) |
| 6720 | (error "No items found")) | 6740 | (error "No items found")) |
| 6721 | (setq update | 6741 | (setq update |
| @@ -8387,7 +8407,7 @@ do extra unwind via `cperl-unwind-to-safe'." | |||
| 8387 | (setq end (point))) | 8407 | (setq end (point))) |
| 8388 | (font-lock-default-fontify-region beg end loudly)) | 8408 | (font-lock-default-fontify-region beg end loudly)) |
| 8389 | 8409 | ||
| 8390 | (defun cperl-fontify-syntaxically (end) | 8410 | (defun cperl-fontify-syntactically (end) |
| 8391 | ;; Some vars for debugging only | 8411 | ;; Some vars for debugging only |
| 8392 | ;; (message "Syntaxifying...") | 8412 | ;; (message "Syntaxifying...") |
| 8393 | (let ((dbg (point)) (iend end) (idone cperl-syntax-done-to) | 8413 | (let ((dbg (point)) (iend end) (idone cperl-syntax-done-to) |
diff --git a/lisp/progmodes/cpp.el b/lisp/progmodes/cpp.el index b2c2e8dab57..6602a79b2a4 100644 --- a/lisp/progmodes/cpp.el +++ b/lisp/progmodes/cpp.el | |||
| @@ -53,8 +53,7 @@ | |||
| 53 | 53 | ||
| 54 | (defcustom cpp-config-file (convert-standard-filename ".cpp.el") | 54 | (defcustom cpp-config-file (convert-standard-filename ".cpp.el") |
| 55 | "File name to save cpp configuration." | 55 | "File name to save cpp configuration." |
| 56 | :type 'file | 56 | :type 'file) |
| 57 | :group 'cpp) | ||
| 58 | 57 | ||
| 59 | (define-widget 'cpp-face 'lazy | 58 | (define-widget 'cpp-face 'lazy |
| 60 | "Either a face or the special symbol `invisible'." | 59 | "Either a face or the special symbol `invisible'." |
| @@ -62,13 +61,11 @@ | |||
| 62 | 61 | ||
| 63 | (defcustom cpp-known-face 'invisible | 62 | (defcustom cpp-known-face 'invisible |
| 64 | "Face used for known cpp symbols." | 63 | "Face used for known cpp symbols." |
| 65 | :type 'cpp-face | 64 | :type 'cpp-face) |
| 66 | :group 'cpp) | ||
| 67 | 65 | ||
| 68 | (defcustom cpp-unknown-face 'highlight | 66 | (defcustom cpp-unknown-face 'highlight |
| 69 | "Face used for unknown cpp symbols." | 67 | "Face used for unknown cpp symbols." |
| 70 | :type 'cpp-face | 68 | :type 'cpp-face) |
| 71 | :group 'cpp) | ||
| 72 | 69 | ||
| 73 | (defcustom cpp-face-type 'light | 70 | (defcustom cpp-face-type 'light |
| 74 | "Indicate what background face type you prefer. | 71 | "Indicate what background face type you prefer. |
| @@ -76,18 +73,15 @@ Can be either light or dark for color screens, mono for monochrome | |||
| 76 | screens, and none if you don't use a window system and don't have | 73 | screens, and none if you don't use a window system and don't have |
| 77 | a color-capable display." | 74 | a color-capable display." |
| 78 | :options '(light dark mono nil) | 75 | :options '(light dark mono nil) |
| 79 | :type 'symbol | 76 | :type 'symbol) |
| 80 | :group 'cpp) | ||
| 81 | 77 | ||
| 82 | (defcustom cpp-known-writable t | 78 | (defcustom cpp-known-writable t |
| 83 | "Non-nil means you are allowed to modify the known conditionals." | 79 | "Non-nil means you are allowed to modify the known conditionals." |
| 84 | :type 'boolean | 80 | :type 'boolean) |
| 85 | :group 'cpp) | ||
| 86 | 81 | ||
| 87 | (defcustom cpp-unknown-writable t | 82 | (defcustom cpp-unknown-writable t |
| 88 | "Non-nil means you are allowed to modify the unknown conditionals." | 83 | "Non-nil means you are allowed to modify the unknown conditionals." |
| 89 | :type 'boolean | 84 | :type 'boolean) |
| 90 | :group 'cpp) | ||
| 91 | 85 | ||
| 92 | (defcustom cpp-edit-list nil | 86 | (defcustom cpp-edit-list nil |
| 93 | "Alist of cpp macros and information about how they should be displayed. | 87 | "Alist of cpp macros and information about how they should be displayed. |
| @@ -101,15 +95,13 @@ Each entry is a list with the following elements: | |||
| 101 | (cpp-face :tag "False") | 95 | (cpp-face :tag "False") |
| 102 | (choice (const :tag "True branch writable" t) | 96 | (choice (const :tag "True branch writable" t) |
| 103 | (const :tag "False branch writable" nil) | 97 | (const :tag "False branch writable" nil) |
| 104 | (const :tag "Both branches writable" both)))) | 98 | (const :tag "Both branches writable" both))))) |
| 105 | :group 'cpp) | ||
| 106 | 99 | ||
| 107 | (defcustom cpp-message-min-time-interval 1.0 | 100 | (defcustom cpp-message-min-time-interval 1.0 |
| 108 | "Minimum time interval in seconds for `cpp-progress-message' messages. | 101 | "Minimum time interval in seconds for `cpp-progress-message' messages. |
| 109 | If nil, `cpp-progress-message' prints no progress messages." | 102 | If nil, `cpp-progress-message' prints no progress messages." |
| 110 | :type '(choice (const :tag "Disable progress messages" nil) | 103 | :type '(choice (const :tag "Disable progress messages" nil) |
| 111 | float) | 104 | float) |
| 112 | :group 'cpp | ||
| 113 | :version "26.1") | 105 | :version "26.1") |
| 114 | 106 | ||
| 115 | (defvar-local cpp-overlay-list nil | 107 | (defvar-local cpp-overlay-list nil |
| @@ -153,36 +145,31 @@ or a cons cell (background-color . COLOR)." | |||
| 153 | :value-type (choice face | 145 | :value-type (choice face |
| 154 | (const invisible) | 146 | (const invisible) |
| 155 | (cons (const background-color) | 147 | (cons (const background-color) |
| 156 | (string :tag "Color")))) | 148 | (string :tag "Color"))))) |
| 157 | :group 'cpp) | ||
| 158 | 149 | ||
| 159 | (defcustom cpp-face-light-name-list | 150 | (defcustom cpp-face-light-name-list |
| 160 | '("light gray" "light blue" "light cyan" "light yellow" "light pink" | 151 | '("light gray" "light blue" "light cyan" "light yellow" "light pink" |
| 161 | "pale green" "beige" "orange" "magenta" "violet" "medium purple" | 152 | "pale green" "beige" "orange" "magenta" "violet" "medium purple" |
| 162 | "turquoise") | 153 | "turquoise") |
| 163 | "Background colors useful with dark foreground colors." | 154 | "Background colors useful with dark foreground colors." |
| 164 | :type '(repeat string) | 155 | :type '(repeat string)) |
| 165 | :group 'cpp) | ||
| 166 | 156 | ||
| 167 | (defcustom cpp-face-dark-name-list | 157 | (defcustom cpp-face-dark-name-list |
| 168 | '("dim gray" "blue" "cyan" "yellow" "red" | 158 | '("dim gray" "blue" "cyan" "yellow" "red" |
| 169 | "dark green" "brown" "dark orange" "dark khaki" "dark violet" "purple" | 159 | "dark green" "brown" "dark orange" "dark khaki" "dark violet" "purple" |
| 170 | "dark turquoise") | 160 | "dark turquoise") |
| 171 | "Background colors useful with light foreground colors." | 161 | "Background colors useful with light foreground colors." |
| 172 | :type '(repeat string) | 162 | :type '(repeat string)) |
| 173 | :group 'cpp) | ||
| 174 | 163 | ||
| 175 | (defcustom cpp-face-light-list nil | 164 | (defcustom cpp-face-light-list nil |
| 176 | "Alist of names and faces to be used for light backgrounds." | 165 | "Alist of names and faces to be used for light backgrounds." |
| 177 | :type '(repeat (cons string (choice face | 166 | :type '(repeat (cons string (choice face |
| 178 | (cons (const background-color) string)))) | 167 | (cons (const background-color) string))))) |
| 179 | :group 'cpp) | ||
| 180 | 168 | ||
| 181 | (defcustom cpp-face-dark-list nil | 169 | (defcustom cpp-face-dark-list nil |
| 182 | "Alist of names and faces to be used for dark backgrounds." | 170 | "Alist of names and faces to be used for dark backgrounds." |
| 183 | :type '(repeat (cons string (choice face | 171 | :type '(repeat (cons string (choice face |
| 184 | (cons (const background-color) string)))) | 172 | (cons (const background-color) string))))) |
| 185 | :group 'cpp) | ||
| 186 | 173 | ||
| 187 | (defcustom cpp-face-mono-list | 174 | (defcustom cpp-face-mono-list |
| 188 | '(("bold" . bold) | 175 | '(("bold" . bold) |
| @@ -190,15 +177,13 @@ or a cons cell (background-color . COLOR)." | |||
| 190 | ("italic" . italic) | 177 | ("italic" . italic) |
| 191 | ("underline" . underline)) | 178 | ("underline" . underline)) |
| 192 | "Alist of names and faces to be used for monochrome screens." | 179 | "Alist of names and faces to be used for monochrome screens." |
| 193 | :type '(repeat (cons string face)) | 180 | :type '(repeat (cons string face))) |
| 194 | :group 'cpp) | ||
| 195 | 181 | ||
| 196 | (defcustom cpp-face-none-list | 182 | (defcustom cpp-face-none-list |
| 197 | '(("default" . default) | 183 | '(("default" . default) |
| 198 | ("invisible" . invisible)) | 184 | ("invisible" . invisible)) |
| 199 | "Alist of names and faces available even if you don't use a window system." | 185 | "Alist of names and faces available even if you don't use a window system." |
| 200 | :type '(repeat (cons string cpp-face)) | 186 | :type '(repeat (cons string cpp-face))) |
| 201 | :group 'cpp) | ||
| 202 | 187 | ||
| 203 | (defvar cpp-face-all-list | 188 | (defvar cpp-face-all-list |
| 204 | (append cpp-face-light-list | 189 | (append cpp-face-light-list |
diff --git a/lisp/progmodes/cwarn.el b/lisp/progmodes/cwarn.el index 042030da396..63b344bea16 100644 --- a/lisp/progmodes/cwarn.el +++ b/lisp/progmodes/cwarn.el | |||
| @@ -128,8 +128,7 @@ on one of three forms: | |||
| 128 | 128 | ||
| 129 | See variable `cwarn-font-lock-feature-keywords-alist' for available | 129 | See variable `cwarn-font-lock-feature-keywords-alist' for available |
| 130 | features." | 130 | features." |
| 131 | :type '(repeat sexp) | 131 | :type '(repeat sexp)) |
| 132 | :group 'cwarn) | ||
| 133 | 132 | ||
| 134 | (defcustom cwarn-font-lock-feature-keywords-alist | 133 | (defcustom cwarn-font-lock-feature-keywords-alist |
| 135 | '((assign . cwarn-font-lock-assignment-keywords) | 134 | '((assign . cwarn-font-lock-assignment-keywords) |
| @@ -142,15 +141,13 @@ keyword list." | |||
| 142 | :type '(alist :key-type (choice (const assign) | 141 | :type '(alist :key-type (choice (const assign) |
| 143 | (const semicolon) | 142 | (const semicolon) |
| 144 | (const reference)) | 143 | (const reference)) |
| 145 | :value-type (sexp :tag "Value")) | 144 | :value-type (sexp :tag "Value"))) |
| 146 | :group 'cwarn) | ||
| 147 | 145 | ||
| 148 | (defcustom cwarn-verbose t | 146 | (defcustom cwarn-verbose t |
| 149 | "When nil, CWarn mode will not generate any messages. | 147 | "When nil, CWarn mode will not generate any messages. |
| 150 | 148 | ||
| 151 | Currently, messages are generated when the mode is activated and | 149 | Currently, messages are generated when the mode is activated and |
| 152 | deactivated." | 150 | deactivated." |
| 153 | :group 'cwarn | ||
| 154 | :type 'boolean) | 151 | :type 'boolean) |
| 155 | 152 | ||
| 156 | (defcustom cwarn-mode-text " CWarn" | 153 | (defcustom cwarn-mode-text " CWarn" |
| @@ -158,13 +155,11 @@ deactivated." | |||
| 158 | 155 | ||
| 159 | \(When the string is not empty, make sure that it has a leading space.)" | 156 | \(When the string is not empty, make sure that it has a leading space.)" |
| 160 | :tag "CWarn mode text" ; To separate it from `global-...' | 157 | :tag "CWarn mode text" ; To separate it from `global-...' |
| 161 | :group 'cwarn | ||
| 162 | :type 'string) | 158 | :type 'string) |
| 163 | 159 | ||
| 164 | (defcustom cwarn-load-hook nil | 160 | (defcustom cwarn-load-hook nil |
| 165 | "Functions to run when CWarn mode is first loaded." | 161 | "Functions to run when CWarn mode is first loaded." |
| 166 | :tag "Load Hook" | 162 | :tag "Load Hook" |
| 167 | :group 'cwarn | ||
| 168 | :type 'hook) | 163 | :type 'hook) |
| 169 | (make-obsolete-variable 'cwarn-load-hook | 164 | (make-obsolete-variable 'cwarn-load-hook |
| 170 | "use `with-eval-after-load' instead." "28.1") | 165 | "use `with-eval-after-load' instead." "28.1") |
diff --git a/lisp/progmodes/dcl-mode.el b/lisp/progmodes/dcl-mode.el index 8943d8b6d01..4a8a20a2969 100644 --- a/lisp/progmodes/dcl-mode.el +++ b/lisp/progmodes/dcl-mode.el | |||
| @@ -97,8 +97,7 @@ dcl-block-begin-regexp and dcl-block-end-regexp. | |||
| 97 | 97 | ||
| 98 | The meaning of this variable may be changed if | 98 | The meaning of this variable may be changed if |
| 99 | dcl-calc-command-indent-function is set to a function." | 99 | dcl-calc-command-indent-function is set to a function." |
| 100 | :type 'integer | 100 | :type 'integer) |
| 101 | :group 'dcl) | ||
| 102 | 101 | ||
| 103 | 102 | ||
| 104 | (defcustom dcl-continuation-offset 6 | 103 | (defcustom dcl-continuation-offset 6 |
| @@ -107,8 +106,7 @@ A continuation line is a line that follows a line ending with `-'. | |||
| 107 | 106 | ||
| 108 | The meaning of this variable may be changed if | 107 | The meaning of this variable may be changed if |
| 109 | dcl-calc-cont-indent-function is set to a function." | 108 | dcl-calc-cont-indent-function is set to a function." |
| 110 | :type 'integer | 109 | :type 'integer) |
| 111 | :group 'dcl) | ||
| 112 | 110 | ||
| 113 | 111 | ||
| 114 | (defcustom dcl-margin-offset 8 | 112 | (defcustom dcl-margin-offset 8 |
| @@ -117,37 +115,32 @@ The first command line in a file or after a SUBROUTINE statement is indented | |||
| 117 | this much. Other command lines are indented the same number of columns as | 115 | this much. Other command lines are indented the same number of columns as |
| 118 | the preceding command line. | 116 | the preceding command line. |
| 119 | A command line is a line that starts with `$'." | 117 | A command line is a line that starts with `$'." |
| 120 | :type 'integer | 118 | :type 'integer) |
| 121 | :group 'dcl) | ||
| 122 | 119 | ||
| 123 | 120 | ||
| 124 | (defcustom dcl-margin-label-offset 2 | 121 | (defcustom dcl-margin-label-offset 2 |
| 125 | "Number of columns to indent a margin label in DCL. | 122 | "Number of columns to indent a margin label in DCL. |
| 126 | A margin label is a label that doesn't begin or end a block, i.e. it | 123 | A margin label is a label that doesn't begin or end a block, i.e. it |
| 127 | doesn't match dcl-block-begin-regexp or dcl-block-end-regexp." | 124 | doesn't match dcl-block-begin-regexp or dcl-block-end-regexp." |
| 128 | :type 'integer | 125 | :type 'integer) |
| 129 | :group 'dcl) | ||
| 130 | 126 | ||
| 131 | 127 | ||
| 132 | (defcustom dcl-comment-line-regexp "^\\$!" | 128 | (defcustom dcl-comment-line-regexp "^\\$!" |
| 133 | "Regexp describing the start of a comment line in DCL. | 129 | "Regexp describing the start of a comment line in DCL. |
| 134 | Comment lines are not indented." | 130 | Comment lines are not indented." |
| 135 | :type 'regexp | 131 | :type 'regexp) |
| 136 | :group 'dcl) | ||
| 137 | 132 | ||
| 138 | 133 | ||
| 139 | (defcustom dcl-block-begin-regexp "loop[0-9]*:" | 134 | (defcustom dcl-block-begin-regexp "loop[0-9]*:" |
| 140 | "Regexp describing a command that begins an indented block in DCL. | 135 | "Regexp describing a command that begins an indented block in DCL. |
| 141 | Set to nil to only indent at THEN-ELSE-ENDIF." | 136 | Set to nil to only indent at THEN-ELSE-ENDIF." |
| 142 | :type 'regexp | 137 | :type 'regexp) |
| 143 | :group 'dcl) | ||
| 144 | 138 | ||
| 145 | 139 | ||
| 146 | (defcustom dcl-block-end-regexp "endloop[0-9]*:" | 140 | (defcustom dcl-block-end-regexp "endloop[0-9]*:" |
| 147 | "Regexp describing a command that ends an indented block in DCL. | 141 | "Regexp describing a command that ends an indented block in DCL. |
| 148 | Set to nil to only indent at THEN-ELSE-ENDIF." | 142 | Set to nil to only indent at THEN-ELSE-ENDIF." |
| 149 | :type 'regexp | 143 | :type 'regexp) |
| 150 | :group 'dcl) | ||
| 151 | 144 | ||
| 152 | 145 | ||
| 153 | (defcustom dcl-calc-command-indent-function nil | 146 | (defcustom dcl-calc-command-indent-function nil |
| @@ -178,8 +171,7 @@ CUR-INDENT + EXTRA-INDENT. | |||
| 178 | This package includes two functions suitable for this: | 171 | This package includes two functions suitable for this: |
| 179 | dcl-calc-command-indent-multiple | 172 | dcl-calc-command-indent-multiple |
| 180 | dcl-calc-command-indent-hang" | 173 | dcl-calc-command-indent-hang" |
| 181 | :type '(choice (const nil) function) | 174 | :type '(choice (const nil) function)) |
| 182 | :group 'dcl) | ||
| 183 | 175 | ||
| 184 | 176 | ||
| 185 | (defcustom dcl-calc-cont-indent-function 'dcl-calc-cont-indent-relative | 177 | (defcustom dcl-calc-cont-indent-function 'dcl-calc-cont-indent-relative |
| @@ -196,8 +188,7 @@ CUR-INDENT + EXTRA-INDENT. | |||
| 196 | 188 | ||
| 197 | This package includes one function suitable for this: | 189 | This package includes one function suitable for this: |
| 198 | dcl-calc-cont-indent-relative" | 190 | dcl-calc-cont-indent-relative" |
| 199 | :type 'function | 191 | :type 'function) |
| 200 | :group 'dcl) | ||
| 201 | 192 | ||
| 202 | 193 | ||
| 203 | (defcustom dcl-tab-always-indent t | 194 | (defcustom dcl-tab-always-indent t |
| @@ -206,50 +197,41 @@ If t, pressing TAB always indents the current line. | |||
| 206 | If nil, pressing TAB indents the current line if point is at the left margin. | 197 | If nil, pressing TAB indents the current line if point is at the left margin. |
| 207 | Data lines (i.e. lines not part of a command line or continuation line) are | 198 | Data lines (i.e. lines not part of a command line or continuation line) are |
| 208 | never indented." | 199 | never indented." |
| 209 | :type 'boolean | 200 | :type 'boolean) |
| 210 | :group 'dcl) | ||
| 211 | 201 | ||
| 212 | 202 | ||
| 213 | (defcustom dcl-electric-characters t | 203 | (defcustom dcl-electric-characters t |
| 214 | "Non-nil means reindent immediately when a label, ELSE or ENDIF is inserted." | 204 | "Non-nil means reindent immediately when a label, ELSE or ENDIF is inserted." |
| 215 | :type 'boolean | 205 | :type 'boolean) |
| 216 | :group 'dcl) | ||
| 217 | 206 | ||
| 218 | 207 | ||
| 219 | (defcustom dcl-tempo-comma ", " | 208 | (defcustom dcl-tempo-comma ", " |
| 220 | "Text to insert when a comma is needed in a template, in DCL mode." | 209 | "Text to insert when a comma is needed in a template, in DCL mode." |
| 221 | :type 'string | 210 | :type 'string) |
| 222 | :group 'dcl) | ||
| 223 | 211 | ||
| 224 | (defcustom dcl-tempo-left-paren "(" | 212 | (defcustom dcl-tempo-left-paren "(" |
| 225 | "Text to insert when a left parenthesis is needed in a template in DCL." | 213 | "Text to insert when a left parenthesis is needed in a template in DCL." |
| 226 | :type 'string | 214 | :type 'string) |
| 227 | :group 'dcl) | ||
| 228 | 215 | ||
| 229 | 216 | ||
| 230 | (defcustom dcl-tempo-right-paren ")" | 217 | (defcustom dcl-tempo-right-paren ")" |
| 231 | "Text to insert when a right parenthesis is needed in a template in DCL." | 218 | "Text to insert when a right parenthesis is needed in a template in DCL." |
| 232 | :type 'string | 219 | :type 'string) |
| 233 | :group 'dcl) | ||
| 234 | 220 | ||
| 235 | ; I couldn't decide what looked best, so I'll let you decide... | 221 | ; I couldn't decide what looked best, so I'll let you decide... |
| 236 | ; Remember, you can also customize this with imenu-submenu-name-format. | 222 | ; Remember, you can also customize this with imenu-submenu-name-format. |
| 237 | (defcustom dcl-imenu-label-labels "Labels" | 223 | (defcustom dcl-imenu-label-labels "Labels" |
| 238 | "Imenu menu title for sub-listing with label names." | 224 | "Imenu menu title for sub-listing with label names." |
| 239 | :type 'string | 225 | :type 'string) |
| 240 | :group 'dcl) | ||
| 241 | (defcustom dcl-imenu-label-goto "GOTO" | 226 | (defcustom dcl-imenu-label-goto "GOTO" |
| 242 | "Imenu menu title for sub-listing with GOTO statements." | 227 | "Imenu menu title for sub-listing with GOTO statements." |
| 243 | :type 'string | 228 | :type 'string) |
| 244 | :group 'dcl) | ||
| 245 | (defcustom dcl-imenu-label-gosub "GOSUB" | 229 | (defcustom dcl-imenu-label-gosub "GOSUB" |
| 246 | "Imenu menu title for sub-listing with GOSUB statements." | 230 | "Imenu menu title for sub-listing with GOSUB statements." |
| 247 | :type 'string | 231 | :type 'string) |
| 248 | :group 'dcl) | ||
| 249 | (defcustom dcl-imenu-label-call "CALL" | 232 | (defcustom dcl-imenu-label-call "CALL" |
| 250 | "Imenu menu title for sub-listing with CALL statements." | 233 | "Imenu menu title for sub-listing with CALL statements." |
| 251 | :type 'string | 234 | :type 'string) |
| 252 | :group 'dcl) | ||
| 253 | 235 | ||
| 254 | (defcustom dcl-imenu-generic-expression | 236 | (defcustom dcl-imenu-generic-expression |
| 255 | `((nil "^\\$[ \t]*\\([A-Za-z0-9_$]+\\):[ \t]+SUBROUTINE\\b" 1) | 237 | `((nil "^\\$[ \t]*\\([A-Za-z0-9_$]+\\):[ \t]+SUBROUTINE\\b" 1) |
| @@ -263,14 +245,12 @@ never indented." | |||
| 263 | The default includes SUBROUTINE labels in the main listing and | 245 | The default includes SUBROUTINE labels in the main listing and |
| 264 | sub-listings for other labels, CALL, GOTO and GOSUB statements. | 246 | sub-listings for other labels, CALL, GOTO and GOSUB statements. |
| 265 | See `imenu-generic-expression' for details." | 247 | See `imenu-generic-expression' for details." |
| 266 | :type '(repeat (sexp :tag "Imenu Expression")) | 248 | :type '(repeat (sexp :tag "Imenu Expression"))) |
| 267 | :group 'dcl) | ||
| 268 | 249 | ||
| 269 | 250 | ||
| 270 | (defcustom dcl-mode-hook nil | 251 | (defcustom dcl-mode-hook nil |
| 271 | "Hook called by `dcl-mode'." | 252 | "Hook called by `dcl-mode'." |
| 272 | :type 'hook | 253 | :type 'hook) |
| 273 | :group 'dcl) | ||
| 274 | 254 | ||
| 275 | 255 | ||
| 276 | ;;; *** Global variables **************************************************** | 256 | ;;; *** Global variables **************************************************** |
| @@ -354,16 +334,14 @@ See `imenu-generic-expression' for details." | |||
| 354 | "Regular expression describing white space in a DCL command line. | 334 | "Regular expression describing white space in a DCL command line. |
| 355 | White space is any number of continued lines with only space,tab,endcomment | 335 | White space is any number of continued lines with only space,tab,endcomment |
| 356 | followed by space or tab." | 336 | followed by space or tab." |
| 357 | :type 'regexp | 337 | :type 'regexp) |
| 358 | :group 'dcl) | ||
| 359 | 338 | ||
| 360 | 339 | ||
| 361 | (defcustom dcl-label-r | 340 | (defcustom dcl-label-r |
| 362 | "[a-zA-Z0-9_$]*:\\([ \t!]\\|$\\)" | 341 | "[a-zA-Z0-9_$]*:\\([ \t!]\\|$\\)" |
| 363 | "Regular expression describing a label. | 342 | "Regular expression describing a label. |
| 364 | A label is a name followed by a colon followed by white-space or end-of-line." | 343 | A label is a name followed by a colon followed by white-space or end-of-line." |
| 365 | :type 'regexp | 344 | :type 'regexp) |
| 366 | :group 'dcl) | ||
| 367 | 345 | ||
| 368 | 346 | ||
| 369 | (defcustom dcl-cmd-r | 347 | (defcustom dcl-cmd-r |
| @@ -373,8 +351,7 @@ A line starting with $, optionally followed by continuation lines, | |||
| 373 | followed by the end of the command line. | 351 | followed by the end of the command line. |
| 374 | A continuation line is any characters followed by `-', | 352 | A continuation line is any characters followed by `-', |
| 375 | optionally followed by a comment, followed by a newline." | 353 | optionally followed by a comment, followed by a newline." |
| 376 | :type 'regexp | 354 | :type 'regexp) |
| 377 | :group 'dcl) | ||
| 378 | 355 | ||
| 379 | 356 | ||
| 380 | (defcustom dcl-command-regexp | 357 | (defcustom dcl-command-regexp |
| @@ -384,8 +361,7 @@ A line starting with $, optionally followed by continuation lines, | |||
| 384 | followed by the end of the command line. | 361 | followed by the end of the command line. |
| 385 | A continuation line is any characters followed by `-', | 362 | A continuation line is any characters followed by `-', |
| 386 | optionally followed by a comment, followed by a newline." | 363 | optionally followed by a comment, followed by a newline." |
| 387 | :type 'regexp | 364 | :type 'regexp) |
| 388 | :group 'dcl) | ||
| 389 | 365 | ||
| 390 | 366 | ||
| 391 | (defcustom dcl-electric-reindent-regexps | 367 | (defcustom dcl-electric-reindent-regexps |
| @@ -397,8 +373,7 @@ is defined as dcl-electric-character. | |||
| 397 | E.g.: if this list contains `endif', the key `f' is defined as | 373 | E.g.: if this list contains `endif', the key `f' is defined as |
| 398 | dcl-electric-character and you have just typed the `f' in | 374 | dcl-electric-character and you have just typed the `f' in |
| 399 | `endif', the line will be reindented." | 375 | `endif', the line will be reindented." |
| 400 | :type '(repeat regexp) | 376 | :type '(repeat regexp)) |
| 401 | :group 'dcl) | ||
| 402 | 377 | ||
| 403 | 378 | ||
| 404 | (defvar dcl-option-alist | 379 | (defvar dcl-option-alist |
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 9348a7f0d2f..397eb269a71 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el | |||
| @@ -904,7 +904,13 @@ non-nil result supersedes the xrefs produced by | |||
| 904 | (point-marker))))))) | 904 | (point-marker))))))) |
| 905 | 905 | ||
| 906 | (cl-defmethod xref-location-group ((l xref-elisp-location)) | 906 | (cl-defmethod xref-location-group ((l xref-elisp-location)) |
| 907 | (xref-elisp-location-file l)) | 907 | (let ((file (xref-elisp-location-file l))) |
| 908 | (defvar find-function-C-source-directory) | ||
| 909 | (if (and find-function-C-source-directory | ||
| 910 | (string-match-p "\\`src/" file)) | ||
| 911 | (concat find-function-C-source-directory | ||
| 912 | (substring file 3)) | ||
| 913 | file))) | ||
| 908 | 914 | ||
| 909 | (defun elisp-load-path-roots () | 915 | (defun elisp-load-path-roots () |
| 910 | (if (boundp 'package-user-dir) | 916 | (if (boundp 'package-user-dir) |
| @@ -1268,7 +1274,8 @@ If `eval-expression-debug-on-error' is non-nil, which is the default, | |||
| 1268 | this command arranges for all errors to enter the debugger." | 1274 | this command arranges for all errors to enter the debugger." |
| 1269 | (interactive "P") | 1275 | (interactive "P") |
| 1270 | (if (null eval-expression-debug-on-error) | 1276 | (if (null eval-expression-debug-on-error) |
| 1271 | (elisp--eval-last-sexp eval-last-sexp-arg-internal) | 1277 | (values--store-value |
| 1278 | (elisp--eval-last-sexp eval-last-sexp-arg-internal)) | ||
| 1272 | (let ((value | 1279 | (let ((value |
| 1273 | (let ((debug-on-error elisp--eval-last-sexp-fake-value)) | 1280 | (let ((debug-on-error elisp--eval-last-sexp-fake-value)) |
| 1274 | (cons (elisp--eval-last-sexp eval-last-sexp-arg-internal) | 1281 | (cons (elisp--eval-last-sexp eval-last-sexp-arg-internal) |
| @@ -1335,9 +1342,11 @@ if it already has a value.) | |||
| 1335 | Return the result of evaluation." | 1342 | Return the result of evaluation." |
| 1336 | ;; FIXME: the print-length/level bindings should only be applied while | 1343 | ;; FIXME: the print-length/level bindings should only be applied while |
| 1337 | ;; printing, not while evaluating. | 1344 | ;; printing, not while evaluating. |
| 1345 | (defvar elisp--eval-defun-result) | ||
| 1338 | (let ((debug-on-error eval-expression-debug-on-error) | 1346 | (let ((debug-on-error eval-expression-debug-on-error) |
| 1339 | (print-length eval-expression-print-length) | 1347 | (print-length eval-expression-print-length) |
| 1340 | (print-level eval-expression-print-level)) | 1348 | (print-level eval-expression-print-level) |
| 1349 | elisp--eval-defun-result) | ||
| 1341 | (save-excursion | 1350 | (save-excursion |
| 1342 | ;; Arrange for eval-region to "read" the (possibly) altered form. | 1351 | ;; Arrange for eval-region to "read" the (possibly) altered form. |
| 1343 | ;; eval-region handles recording which file defines a function or | 1352 | ;; eval-region handles recording which file defines a function or |
| @@ -1349,21 +1358,25 @@ Return the result of evaluation." | |||
| 1349 | (end-of-defun) | 1358 | (end-of-defun) |
| 1350 | (beginning-of-defun) | 1359 | (beginning-of-defun) |
| 1351 | (setq beg (point)) | 1360 | (setq beg (point)) |
| 1352 | (setq form (read (current-buffer))) | 1361 | (setq form (funcall load-read-function (current-buffer))) |
| 1353 | (setq end (point))) | 1362 | (setq end (point))) |
| 1354 | ;; Alter the form if necessary. | 1363 | ;; Alter the form if necessary. |
| 1355 | (let ((form (eval-sexp-add-defvars | 1364 | (let ((form (eval-sexp-add-defvars |
| 1356 | (elisp--eval-defun-1 (macroexpand form))))) | 1365 | (elisp--eval-defun-1 |
| 1366 | (macroexpand form))))) | ||
| 1357 | (eval-region beg end standard-output | 1367 | (eval-region beg end standard-output |
| 1358 | (lambda (_ignore) | 1368 | (lambda (_ignore) |
| 1359 | ;; Skipping to the end of the specified region | 1369 | ;; Skipping to the end of the specified region |
| 1360 | ;; will make eval-region return. | 1370 | ;; will make eval-region return. |
| 1361 | (goto-char end) | 1371 | (goto-char end) |
| 1362 | form)))))) | 1372 | ;; This `setq' needs to be added *after* passing |
| 1363 | (let ((str (eval-expression-print-format (car values)))) | 1373 | ;; form through `elisp--eval-defun-1' since it |
| 1364 | (if str (princ str))) | 1374 | ;; would otherwise "hide" forms like `defvar's and |
| 1365 | ;; The result of evaluation has been put onto VALUES. So return it. | 1375 | ;; thus defeat their special treatment. |
| 1366 | (car values)) | 1376 | `(setq elisp--eval-defun-result ,form)))))) |
| 1377 | (let ((str (eval-expression-print-format elisp--eval-defun-result))) | ||
| 1378 | (if str (princ str))) | ||
| 1379 | elisp--eval-defun-result)) | ||
| 1367 | 1380 | ||
| 1368 | (defun eval-defun (edebug-it) | 1381 | (defun eval-defun (edebug-it) |
| 1369 | "Evaluate the top-level form containing point, or after point. | 1382 | "Evaluate the top-level form containing point, or after point. |
diff --git a/lisp/progmodes/executable.el b/lisp/progmodes/executable.el index fa5724a3800..85e9b4bb882 100644 --- a/lisp/progmodes/executable.el +++ b/lisp/progmodes/executable.el | |||
| @@ -54,41 +54,31 @@ | |||
| 54 | "Base functionality for executable interpreter scripts." | 54 | "Base functionality for executable interpreter scripts." |
| 55 | :group 'processes) | 55 | :group 'processes) |
| 56 | 56 | ||
| 57 | ;; This used to default to `other', but that doesn't seem to have any | 57 | (defcustom executable-insert t |
| 58 | ;; significance. fx 2000-02-11. | ||
| 59 | (defcustom executable-insert t ; 'other | ||
| 60 | "Non-nil means offer to add a magic number to a file. | 58 | "Non-nil means offer to add a magic number to a file. |
| 61 | This takes effect when you switch to certain major modes, | 59 | This takes effect when you switch to certain major modes, |
| 62 | including Shell-script mode (`sh-mode'). | 60 | including Shell-script mode (`sh-mode'). |
| 63 | When you type \\[executable-set-magic], it always offers to add or | 61 | When you type \\[executable-set-magic], it always offers to add or |
| 64 | update the magic number." | 62 | update the magic number." |
| 65 | ;;; :type '(choice (const :tag "off" nil) | 63 | :type 'boolean) |
| 66 | ;;; (const :tag "on" t) | ||
| 67 | ;;; symbol) | ||
| 68 | :type 'boolean | ||
| 69 | :group 'executable) | ||
| 70 | |||
| 71 | 64 | ||
| 72 | (defcustom executable-query 'function | 65 | (defcustom executable-query 'function |
| 73 | "If non-nil, ask user before changing an existing magic number. | 66 | "If non-nil, ask user before changing an existing magic number. |
| 74 | When this is `function', only ask when called non-interactively." | 67 | When this is `function', only ask when called non-interactively." |
| 75 | :type '(choice (const :tag "Don't Ask" nil) | 68 | :type '(choice (const :tag "Don't Ask" nil) |
| 76 | (const :tag "Ask when non-interactive" function) | 69 | (const :tag "Ask when non-interactive" function) |
| 77 | (other :tag "Ask" t)) | 70 | (other :tag "Ask" t))) |
| 78 | :group 'executable) | ||
| 79 | 71 | ||
| 80 | 72 | ||
| 81 | (defcustom executable-magicless-file-regexp "/[Mm]akefile$\\|/\\.\\(z?profile\\|bash_profile\\|z?login\\|bash_login\\|z?logout\\|bash_logout\\|.+shrc\\|esrc\\|rcrc\\|[kz]shenv\\)$" | 73 | (defcustom executable-magicless-file-regexp "/[Mm]akefile$\\|/\\.\\(z?profile\\|bash_profile\\|z?login\\|bash_login\\|z?logout\\|bash_logout\\|.+shrc\\|esrc\\|rcrc\\|[kz]shenv\\)$" |
| 82 | "On files with this kind of name no magic is inserted or changed." | 74 | "On files with this kind of name no magic is inserted or changed." |
| 83 | :type 'regexp | 75 | :type 'regexp) |
| 84 | :group 'executable) | ||
| 85 | 76 | ||
| 86 | (defcustom executable-prefix "#!" | 77 | (defcustom executable-prefix "#!" |
| 87 | "Interpreter magic number prefix inserted when there was no magic number. | 78 | "Interpreter magic number prefix inserted when there was no magic number. |
| 88 | Use of `executable-prefix-env' is preferable to this option." | 79 | Use of `executable-prefix-env' is preferable to this option." |
| 89 | :version "26.1" ; deprecated | 80 | :version "26.1" ; deprecated |
| 90 | :type 'string | 81 | :type 'string) |
| 91 | :group 'executable) | ||
| 92 | 82 | ||
| 93 | (defcustom executable-prefix-env nil | 83 | (defcustom executable-prefix-env nil |
| 94 | "If non-nil, use \"/usr/bin/env\" in interpreter magic number. | 84 | "If non-nil, use \"/usr/bin/env\" in interpreter magic number. |
| @@ -96,8 +86,7 @@ If this variable is non-nil, the interpreter magic number inserted | |||
| 96 | by `executable-set-magic' will be \"#!/usr/bin/env INTERPRETER\", | 86 | by `executable-set-magic' will be \"#!/usr/bin/env INTERPRETER\", |
| 97 | otherwise it will be \"#!/path/to/INTERPRETER\"." | 87 | otherwise it will be \"#!/path/to/INTERPRETER\"." |
| 98 | :version "26.1" | 88 | :version "26.1" |
| 99 | :type 'boolean | 89 | :type 'boolean) |
| 100 | :group 'executable) | ||
| 101 | 90 | ||
| 102 | (defcustom executable-chmod 73 | 91 | (defcustom executable-chmod 73 |
| 103 | "After saving, if the file is not executable, set this mode. | 92 | "After saving, if the file is not executable, set this mode. |
| @@ -105,8 +94,7 @@ This mode passed to `set-file-modes' is taken absolutely when negative, or | |||
| 105 | relative to the files existing modes. Do nothing if this is nil. | 94 | relative to the files existing modes. Do nothing if this is nil. |
| 106 | Typical values are 73 (+x) or -493 (rwxr-xr-x)." | 95 | Typical values are 73 (+x) or -493 (rwxr-xr-x)." |
| 107 | :type '(choice integer | 96 | :type '(choice integer |
| 108 | (const nil)) | 97 | (const nil))) |
| 109 | :group 'executable) | ||
| 110 | 98 | ||
| 111 | 99 | ||
| 112 | (defvar executable-command nil) | 100 | (defvar executable-command nil) |
| @@ -114,8 +102,7 @@ Typical values are 73 (+x) or -493 (rwxr-xr-x)." | |||
| 114 | (defcustom executable-self-display "tail" | 102 | (defcustom executable-self-display "tail" |
| 115 | "Command you use with argument `-n+2' to make text files self-display. | 103 | "Command you use with argument `-n+2' to make text files self-display. |
| 116 | Note that the like of `more' doesn't work too well under Emacs \\[shell]." | 104 | Note that the like of `more' doesn't work too well under Emacs \\[shell]." |
| 117 | :type 'string | 105 | :type 'string) |
| 118 | :group 'executable) | ||
| 119 | 106 | ||
| 120 | (make-obsolete-variable 'executable-self-display nil "25.1" 'set) | 107 | (make-obsolete-variable 'executable-self-display nil "25.1" 'set) |
| 121 | 108 | ||
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 5d96c62b418..d01803282aa 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el | |||
| @@ -483,7 +483,7 @@ Currently, Flymake may provide these keyword-value pairs: | |||
| 483 | 483 | ||
| 484 | * `:recent-changes', a list of recent changes since the last time | 484 | * `:recent-changes', a list of recent changes since the last time |
| 485 | the backend function was called for the buffer. An empty list | 485 | the backend function was called for the buffer. An empty list |
| 486 | indicates that no changes have been reocrded. If it is the | 486 | indicates that no changes have been recorded. If it is the |
| 487 | first time that this backend function is called for this | 487 | first time that this backend function is called for this |
| 488 | activation of `flymake-mode', then this argument isn't provided | 488 | activation of `flymake-mode', then this argument isn't provided |
| 489 | at all (i.e. it's not merely nil). | 489 | at all (i.e. it's not merely nil). |
| @@ -1198,7 +1198,6 @@ default) no filter is applied." | |||
| 1198 | '(" " flymake-mode-line-title flymake-mode-line-exception | 1198 | '(" " flymake-mode-line-title flymake-mode-line-exception |
| 1199 | flymake-mode-line-counters) | 1199 | flymake-mode-line-counters) |
| 1200 | "Mode line construct for customizing Flymake information." | 1200 | "Mode line construct for customizing Flymake information." |
| 1201 | :group 'flymake | ||
| 1202 | :type '(repeat (choice string symbol))) | 1201 | :type '(repeat (choice string symbol))) |
| 1203 | 1202 | ||
| 1204 | (defcustom flymake-mode-line-counter-format | 1203 | (defcustom flymake-mode-line-counter-format |
| @@ -1210,7 +1209,6 @@ default) no filter is applied." | |||
| 1210 | This is a suitable place for placing the `flymake-error-counter', | 1209 | This is a suitable place for placing the `flymake-error-counter', |
| 1211 | `flymake-warning-counter' and `flymake-note-counter' constructs. | 1210 | `flymake-warning-counter' and `flymake-note-counter' constructs. |
| 1212 | Separating each of these with space is not necessary." | 1211 | Separating each of these with space is not necessary." |
| 1213 | :group 'flymake | ||
| 1214 | :type '(repeat (choice string symbol))) | 1212 | :type '(repeat (choice string symbol))) |
| 1215 | 1213 | ||
| 1216 | (defvar flymake-mode-line-title '(:eval (flymake--mode-line-title)) | 1214 | (defvar flymake-mode-line-title '(:eval (flymake--mode-line-title)) |
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 1a8435fde33..d6ee8bb4236 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el | |||
| @@ -275,8 +275,6 @@ See `compilation-error-screen-columns'." | |||
| 275 | (define-key map "\C-c\C-f" 'next-error-follow-minor-mode) | 275 | (define-key map "\C-c\C-f" 'next-error-follow-minor-mode) |
| 276 | 276 | ||
| 277 | (define-key map "\r" 'compile-goto-error) ;; ? | 277 | (define-key map "\r" 'compile-goto-error) ;; ? |
| 278 | (define-key map "n" 'next-error-no-select) | ||
| 279 | (define-key map "p" 'previous-error-no-select) | ||
| 280 | (define-key map "{" 'compilation-previous-file) | 278 | (define-key map "{" 'compilation-previous-file) |
| 281 | (define-key map "}" 'compilation-next-file) | 279 | (define-key map "}" 'compilation-next-file) |
| 282 | (define-key map "\t" 'compilation-next-error) | 280 | (define-key map "\t" 'compilation-next-error) |
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index eb114acdabc..b105cbaa0ef 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -64,8 +64,7 @@ pdb (Python), and jdb." | |||
| 64 | 64 | ||
| 65 | (defcustom gud-key-prefix "\C-x\C-a" | 65 | (defcustom gud-key-prefix "\C-x\C-a" |
| 66 | "Prefix of all GUD commands valid in C buffers." | 66 | "Prefix of all GUD commands valid in C buffers." |
| 67 | :type 'key-sequence | 67 | :type 'key-sequence) |
| 68 | :group 'gud) | ||
| 69 | 68 | ||
| 70 | (global-set-key (vconcat gud-key-prefix "\C-l") 'gud-refresh) | 69 | (global-set-key (vconcat gud-key-prefix "\C-l") 'gud-refresh) |
| 71 | ;; (define-key ctl-x-map " " 'gud-break); backward compatibility hack | 70 | ;; (define-key ctl-x-map " " 'gud-break); backward compatibility hack |
| @@ -1074,8 +1073,7 @@ The file names should be absolute, or relative to the directory | |||
| 1074 | containing the executable being debugged." | 1073 | containing the executable being debugged." |
| 1075 | :type '(choice (const :tag "Current Directory" nil) | 1074 | :type '(choice (const :tag "Current Directory" nil) |
| 1076 | (repeat :value ("") | 1075 | (repeat :value ("") |
| 1077 | directory)) | 1076 | directory))) |
| 1078 | :group 'gud) | ||
| 1079 | 1077 | ||
| 1080 | (defun gud-dbx-massage-args (_file args) | 1078 | (defun gud-dbx-massage-args (_file args) |
| 1081 | (nconc (let ((directories gud-dbx-directories) | 1079 | (nconc (let ((directories gud-dbx-directories) |
| @@ -1380,8 +1378,7 @@ The file names should be absolute, or relative to the directory | |||
| 1380 | containing the executable being debugged." | 1378 | containing the executable being debugged." |
| 1381 | :type '(choice (const :tag "Current Directory" nil) | 1379 | :type '(choice (const :tag "Current Directory" nil) |
| 1382 | (repeat :value ("") | 1380 | (repeat :value ("") |
| 1383 | directory)) | 1381 | directory))) |
| 1384 | :group 'gud) | ||
| 1385 | 1382 | ||
| 1386 | (defun gud-xdb-massage-args (_file args) | 1383 | (defun gud-xdb-massage-args (_file args) |
| 1387 | (nconc (let ((directories gud-xdb-directories) | 1384 | (nconc (let ((directories gud-xdb-directories) |
| @@ -1563,8 +1560,7 @@ into one that invokes an Emacs-enabled debugging session. | |||
| 1563 | 1560 | ||
| 1564 | (defcustom gud-perldb-command-name "perl -d" | 1561 | (defcustom gud-perldb-command-name "perl -d" |
| 1565 | "Default command to execute a Perl script under debugger." | 1562 | "Default command to execute a Perl script under debugger." |
| 1566 | :type 'string | 1563 | :type 'string) |
| 1567 | :group 'gud) | ||
| 1568 | 1564 | ||
| 1569 | ;;;###autoload | 1565 | ;;;###autoload |
| 1570 | (defun perldb (command-line) | 1566 | (defun perldb (command-line) |
| @@ -1677,8 +1673,7 @@ and source-file directory for your debugger." | |||
| 1677 | (if (executable-find "pdb") "pdb" "python -m pdb") | 1673 | (if (executable-find "pdb") "pdb" "python -m pdb") |
| 1678 | "Command that executes the Python debugger." | 1674 | "Command that executes the Python debugger." |
| 1679 | :version "27.1" | 1675 | :version "27.1" |
| 1680 | :type 'string | 1676 | :type 'string) |
| 1681 | :group 'gud) | ||
| 1682 | 1677 | ||
| 1683 | ;;;###autoload | 1678 | ;;;###autoload |
| 1684 | (defun pdb (command-line) | 1679 | (defun pdb (command-line) |
| @@ -1759,8 +1754,7 @@ directory and source-file directory for your debugger." | |||
| 1759 | "File name for executing the Guile debugger. | 1754 | "File name for executing the Guile debugger. |
| 1760 | This should be an executable on your path, or an absolute file name." | 1755 | This should be an executable on your path, or an absolute file name." |
| 1761 | :version "25.1" | 1756 | :version "25.1" |
| 1762 | :type 'string | 1757 | :type 'string) |
| 1763 | :group 'gud) | ||
| 1764 | 1758 | ||
| 1765 | ;;;###autoload | 1759 | ;;;###autoload |
| 1766 | (defun guiler (command-line) | 1760 | (defun guiler (command-line) |
| @@ -1883,8 +1877,7 @@ and source-file directory for your debugger." | |||
| 1883 | 1877 | ||
| 1884 | (defcustom gud-jdb-command-name "jdb" | 1878 | (defcustom gud-jdb-command-name "jdb" |
| 1885 | "Command that executes the Java debugger." | 1879 | "Command that executes the Java debugger." |
| 1886 | :type 'string | 1880 | :type 'string) |
| 1887 | :group 'gud) | ||
| 1888 | 1881 | ||
| 1889 | (defcustom gud-jdb-use-classpath t | 1882 | (defcustom gud-jdb-use-classpath t |
| 1890 | "If non-nil, search for Java source files in classpath directories. | 1883 | "If non-nil, search for Java source files in classpath directories. |
| @@ -1899,8 +1892,7 @@ and parsing all Java files for class information. | |||
| 1899 | 1892 | ||
| 1900 | Set to nil to use `gud-jdb-directories' to scan java sources for | 1893 | Set to nil to use `gud-jdb-directories' to scan java sources for |
| 1901 | class information on jdb startup (original method)." | 1894 | class information on jdb startup (original method)." |
| 1902 | :type 'boolean | 1895 | :type 'boolean) |
| 1903 | :group 'gud) | ||
| 1904 | 1896 | ||
| 1905 | (defvar gud-jdb-classpath nil | 1897 | (defvar gud-jdb-classpath nil |
| 1906 | "Java/jdb classpath directories list. | 1898 | "Java/jdb classpath directories list. |
| @@ -2584,7 +2576,6 @@ Commands: | |||
| 2584 | 2576 | ||
| 2585 | (defcustom gud-chdir-before-run t | 2577 | (defcustom gud-chdir-before-run t |
| 2586 | "Non-nil if GUD should `cd' to the debugged executable." | 2578 | "Non-nil if GUD should `cd' to the debugged executable." |
| 2587 | :group 'gud | ||
| 2588 | :type 'boolean) | 2579 | :type 'boolean) |
| 2589 | 2580 | ||
| 2590 | ;; Perform initializations common to all debuggers. | 2581 | ;; Perform initializations common to all debuggers. |
| @@ -3419,7 +3410,6 @@ Treats actions as defuns." | |||
| 3419 | python-mode) | 3410 | python-mode) |
| 3420 | "List of modes for which to enable GUD tooltips." | 3411 | "List of modes for which to enable GUD tooltips." |
| 3421 | :type '(repeat (symbol :tag "Major mode")) | 3412 | :type '(repeat (symbol :tag "Major mode")) |
| 3422 | :group 'gud | ||
| 3423 | :group 'tooltip) | 3413 | :group 'tooltip) |
| 3424 | 3414 | ||
| 3425 | (defcustom gud-tooltip-display | 3415 | (defcustom gud-tooltip-display |
| @@ -3431,13 +3421,11 @@ Forms in the list are combined with AND. The default is to display | |||
| 3431 | only tooltips in the buffer containing the overlay arrow." | 3421 | only tooltips in the buffer containing the overlay arrow." |
| 3432 | :type 'sexp | 3422 | :type 'sexp |
| 3433 | :risky t | 3423 | :risky t |
| 3434 | :group 'gud | ||
| 3435 | :group 'tooltip) | 3424 | :group 'tooltip) |
| 3436 | 3425 | ||
| 3437 | (defcustom gud-tooltip-echo-area nil | 3426 | (defcustom gud-tooltip-echo-area nil |
| 3438 | "Use the echo area instead of frames for GUD tooltips." | 3427 | "Use the echo area instead of frames for GUD tooltips." |
| 3439 | :type 'boolean | 3428 | :type 'boolean |
| 3440 | :group 'gud | ||
| 3441 | :group 'tooltip) | 3429 | :group 'tooltip) |
| 3442 | 3430 | ||
| 3443 | (make-obsolete-variable 'gud-tooltip-echo-area | 3431 | (make-obsolete-variable 'gud-tooltip-echo-area |
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index 73d09e00591..81ba0d86954 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el | |||
| @@ -232,13 +232,11 @@ | |||
| 232 | 232 | ||
| 233 | (defcustom hs-hide-comments-when-hiding-all t | 233 | (defcustom hs-hide-comments-when-hiding-all t |
| 234 | "Hide the comments too when you do an `hs-hide-all'." | 234 | "Hide the comments too when you do an `hs-hide-all'." |
| 235 | :type 'boolean | 235 | :type 'boolean) |
| 236 | :group 'hideshow) | ||
| 237 | 236 | ||
| 238 | (defcustom hs-minor-mode-hook nil | 237 | (defcustom hs-minor-mode-hook nil |
| 239 | "Hook called when hideshow minor mode is activated or deactivated." | 238 | "Hook called when hideshow minor mode is activated or deactivated." |
| 240 | :type 'hook | 239 | :type 'hook |
| 241 | :group 'hideshow | ||
| 242 | :version "21.1") | 240 | :version "21.1") |
| 243 | 241 | ||
| 244 | (defcustom hs-isearch-open 'code | 242 | (defcustom hs-isearch-open 'code |
| @@ -254,8 +252,7 @@ This has effect only if `search-invisible' is set to `open'." | |||
| 254 | :type '(choice (const :tag "open only code blocks" code) | 252 | :type '(choice (const :tag "open only code blocks" code) |
| 255 | (const :tag "open only comment blocks" comment) | 253 | (const :tag "open only comment blocks" comment) |
| 256 | (const :tag "open both code and comment blocks" t) | 254 | (const :tag "open both code and comment blocks" t) |
| 257 | (const :tag "don't open any of them" nil)) | 255 | (const :tag "don't open any of them" nil))) |
| 258 | :group 'hideshow) | ||
| 259 | 256 | ||
| 260 | ;;;###autoload | 257 | ;;;###autoload |
| 261 | (defvar hs-special-modes-alist | 258 | (defvar hs-special-modes-alist |
diff --git a/lisp/progmodes/icon.el b/lisp/progmodes/icon.el index 933cb333dfb..a36f020439d 100644 --- a/lisp/progmodes/icon.el +++ b/lisp/progmodes/icon.el | |||
| @@ -86,42 +86,35 @@ | |||
| 86 | 86 | ||
| 87 | (defcustom icon-indent-level 4 | 87 | (defcustom icon-indent-level 4 |
| 88 | "Indentation of Icon statements with respect to containing block." | 88 | "Indentation of Icon statements with respect to containing block." |
| 89 | :type 'integer | 89 | :type 'integer) |
| 90 | :group 'icon) | ||
| 91 | 90 | ||
| 92 | (defcustom icon-brace-imaginary-offset 0 | 91 | (defcustom icon-brace-imaginary-offset 0 |
| 93 | "Imagined indentation of an Icon open brace that actually follows a statement." | 92 | "Imagined indentation of an Icon open brace that actually follows a statement." |
| 94 | :type 'integer | 93 | :type 'integer) |
| 95 | :group 'icon) | ||
| 96 | 94 | ||
| 97 | (defcustom icon-brace-offset 0 | 95 | (defcustom icon-brace-offset 0 |
| 98 | "Extra indentation for braces, compared with other text in same context." | 96 | "Extra indentation for braces, compared with other text in same context." |
| 99 | :type 'integer | 97 | :type 'integer) |
| 100 | :group 'icon) | ||
| 101 | 98 | ||
| 102 | (defcustom icon-continued-statement-offset 4 | 99 | (defcustom icon-continued-statement-offset 4 |
| 103 | "Extra indent for Icon lines not starting new statements." | 100 | "Extra indent for Icon lines not starting new statements." |
| 104 | :type 'integer | 101 | :type 'integer) |
| 105 | :group 'icon) | ||
| 106 | 102 | ||
| 107 | (defcustom icon-continued-brace-offset 0 | 103 | (defcustom icon-continued-brace-offset 0 |
| 108 | "Extra indent for Icon substatements that start with open-braces. | 104 | "Extra indent for Icon substatements that start with open-braces. |
| 109 | This is in addition to `icon-continued-statement-offset'." | 105 | This is in addition to `icon-continued-statement-offset'." |
| 110 | :type 'integer | 106 | :type 'integer) |
| 111 | :group 'icon) | ||
| 112 | 107 | ||
| 113 | (defcustom icon-auto-newline nil | 108 | (defcustom icon-auto-newline nil |
| 114 | "Non-nil means automatically newline before and after braces Icon code. | 109 | "Non-nil means automatically newline before and after braces Icon code. |
| 115 | This applies when braces are inserted." | 110 | This applies when braces are inserted." |
| 116 | :type 'boolean | 111 | :type 'boolean) |
| 117 | :group 'icon) | ||
| 118 | 112 | ||
| 119 | (defcustom icon-tab-always-indent t | 113 | (defcustom icon-tab-always-indent t |
| 120 | "Non-nil means TAB in Icon mode should always reindent the current line. | 114 | "Non-nil means TAB in Icon mode should always reindent the current line. |
| 121 | It will then reindent, regardless of where in the line point is | 115 | It will then reindent, regardless of where in the line point is |
| 122 | when the TAB command is used." | 116 | when the TAB command is used." |
| 123 | :type 'boolean | 117 | :type 'boolean) |
| 124 | :group 'icon) | ||
| 125 | 118 | ||
| 126 | (defvar icon-imenu-generic-expression | 119 | (defvar icon-imenu-generic-expression |
| 127 | '((nil "^[ \t]*procedure[ \t]+\\(\\sw+\\)[ \t]*(" 1)) | 120 | '((nil "^[ \t]*procedure[ \t]+\\(\\sw+\\)[ \t]*(" 1)) |
diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el index ac230596240..146ed4dca4a 100644 --- a/lisp/progmodes/inf-lisp.el +++ b/lisp/progmodes/inf-lisp.el | |||
| @@ -76,8 +76,7 @@ | |||
| 76 | Input matching this regexp is not saved on the input history in Inferior Lisp | 76 | Input matching this regexp is not saved on the input history in Inferior Lisp |
| 77 | mode. Default is whitespace followed by 0 or 1 single-letter colon-keyword | 77 | mode. Default is whitespace followed by 0 or 1 single-letter colon-keyword |
| 78 | \(as in :a, :c, etc.)" | 78 | \(as in :a, :c, etc.)" |
| 79 | :type 'regexp | 79 | :type 'regexp) |
| 80 | :group 'inferior-lisp) | ||
| 81 | 80 | ||
| 82 | (defvar inferior-lisp-mode-map | 81 | (defvar inferior-lisp-mode-map |
| 83 | (let ((map (copy-keymap comint-mode-map))) | 82 | (let ((map (copy-keymap comint-mode-map))) |
| @@ -155,8 +154,7 @@ mode. Default is whitespace followed by 0 or 1 single-letter colon-keyword | |||
| 155 | 154 | ||
| 156 | (defcustom inferior-lisp-program "lisp" | 155 | (defcustom inferior-lisp-program "lisp" |
| 157 | "Program name for invoking an inferior Lisp in Inferior Lisp mode." | 156 | "Program name for invoking an inferior Lisp in Inferior Lisp mode." |
| 158 | :type 'string | 157 | :type 'string) |
| 159 | :group 'inferior-lisp) | ||
| 160 | 158 | ||
| 161 | (defcustom inferior-lisp-load-command "(load \"%s\")\n" | 159 | (defcustom inferior-lisp-load-command "(load \"%s\")\n" |
| 162 | "Format-string for building a Lisp expression to load a file. | 160 | "Format-string for building a Lisp expression to load a file. |
| @@ -166,8 +164,7 @@ to load that file. The default works acceptably on most Lisps. | |||
| 166 | The string \"(progn (load \\\"%s\\\" :verbose nil :print t) (values))\\n\" | 164 | The string \"(progn (load \\\"%s\\\" :verbose nil :print t) (values))\\n\" |
| 167 | produces cosmetically superior output for this application, | 165 | produces cosmetically superior output for this application, |
| 168 | but it works only in Common Lisp." | 166 | but it works only in Common Lisp." |
| 169 | :type 'string | 167 | :type 'string) |
| 170 | :group 'inferior-lisp) | ||
| 171 | 168 | ||
| 172 | (defcustom inferior-lisp-prompt "^[^> \n]*>+:? *" | 169 | (defcustom inferior-lisp-prompt "^[^> \n]*>+:? *" |
| 173 | "Regexp to recognize prompts in the Inferior Lisp mode. | 170 | "Regexp to recognize prompts in the Inferior Lisp mode. |
| @@ -182,8 +179,7 @@ More precise choices: | |||
| 182 | Lucid Common Lisp: \"^\\\\(>\\\\|\\\\(->\\\\)+\\\\) *\" | 179 | Lucid Common Lisp: \"^\\\\(>\\\\|\\\\(->\\\\)+\\\\) *\" |
| 183 | franz: \"^\\\\(->\\\\|<[0-9]*>:\\\\) *\" | 180 | franz: \"^\\\\(->\\\\|<[0-9]*>:\\\\) *\" |
| 184 | kcl: \"^>+ *\"" | 181 | kcl: \"^>+ *\"" |
| 185 | :type 'regexp | 182 | :type 'regexp) |
| 186 | :group 'inferior-lisp) | ||
| 187 | 183 | ||
| 188 | (defvar inferior-lisp-buffer nil "*The current inferior-lisp process buffer. | 184 | (defvar inferior-lisp-buffer nil "*The current inferior-lisp process buffer. |
| 189 | 185 | ||
| @@ -487,8 +483,7 @@ describing the last `lisp-load-file' or `lisp-compile-file' command.") | |||
| 487 | If it's loaded into a buffer that is in one of these major modes, it's | 483 | If it's loaded into a buffer that is in one of these major modes, it's |
| 488 | considered a Lisp source file by `lisp-load-file' and `lisp-compile-file'. | 484 | considered a Lisp source file by `lisp-load-file' and `lisp-compile-file'. |
| 489 | Used by these commands to determine defaults." | 485 | Used by these commands to determine defaults." |
| 490 | :type '(repeat symbol) | 486 | :type '(repeat symbol)) |
| 491 | :group 'inferior-lisp) | ||
| 492 | 487 | ||
| 493 | (defun lisp-load-file (file-name) | 488 | (defun lisp-load-file (file-name) |
| 494 | "Load a Lisp file into the inferior Lisp process." | 489 | "Load a Lisp file into the inferior Lisp process." |
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index cdf6536fc7e..21bda086801 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el | |||
| @@ -427,22 +427,19 @@ Match group 1 is the name of the macro.") | |||
| 427 | (defcustom js-indent-level 4 | 427 | (defcustom js-indent-level 4 |
| 428 | "Number of spaces for each indentation step in `js-mode'." | 428 | "Number of spaces for each indentation step in `js-mode'." |
| 429 | :type 'integer | 429 | :type 'integer |
| 430 | :safe 'integerp | 430 | :safe 'integerp) |
| 431 | :group 'js) | ||
| 432 | 431 | ||
| 433 | (defcustom js-expr-indent-offset 0 | 432 | (defcustom js-expr-indent-offset 0 |
| 434 | "Number of additional spaces for indenting continued expressions. | 433 | "Number of additional spaces for indenting continued expressions. |
| 435 | The value must be no less than minus `js-indent-level'." | 434 | The value must be no less than minus `js-indent-level'." |
| 436 | :type 'integer | 435 | :type 'integer |
| 437 | :safe 'integerp | 436 | :safe 'integerp) |
| 438 | :group 'js) | ||
| 439 | 437 | ||
| 440 | (defcustom js-paren-indent-offset 0 | 438 | (defcustom js-paren-indent-offset 0 |
| 441 | "Number of additional spaces for indenting expressions in parentheses. | 439 | "Number of additional spaces for indenting expressions in parentheses. |
| 442 | The value must be no less than minus `js-indent-level'." | 440 | The value must be no less than minus `js-indent-level'." |
| 443 | :type 'integer | 441 | :type 'integer |
| 444 | :safe 'integerp | 442 | :safe 'integerp |
| 445 | :group 'js | ||
| 446 | :version "24.1") | 443 | :version "24.1") |
| 447 | 444 | ||
| 448 | (defcustom js-square-indent-offset 0 | 445 | (defcustom js-square-indent-offset 0 |
| @@ -450,7 +447,6 @@ The value must be no less than minus `js-indent-level'." | |||
| 450 | The value must be no less than minus `js-indent-level'." | 447 | The value must be no less than minus `js-indent-level'." |
| 451 | :type 'integer | 448 | :type 'integer |
| 452 | :safe 'integerp | 449 | :safe 'integerp |
| 453 | :group 'js | ||
| 454 | :version "24.1") | 450 | :version "24.1") |
| 455 | 451 | ||
| 456 | (defcustom js-curly-indent-offset 0 | 452 | (defcustom js-curly-indent-offset 0 |
| @@ -458,7 +454,6 @@ The value must be no less than minus `js-indent-level'." | |||
| 458 | The value must be no less than minus `js-indent-level'." | 454 | The value must be no less than minus `js-indent-level'." |
| 459 | :type 'integer | 455 | :type 'integer |
| 460 | :safe 'integerp | 456 | :safe 'integerp |
| 461 | :group 'js | ||
| 462 | :version "24.1") | 457 | :version "24.1") |
| 463 | 458 | ||
| 464 | (defcustom js-switch-indent-offset 0 | 459 | (defcustom js-switch-indent-offset 0 |
| @@ -466,26 +461,22 @@ The value must be no less than minus `js-indent-level'." | |||
| 466 | The value must not be negative." | 461 | The value must not be negative." |
| 467 | :type 'integer | 462 | :type 'integer |
| 468 | :safe 'integerp | 463 | :safe 'integerp |
| 469 | :group 'js | ||
| 470 | :version "24.4") | 464 | :version "24.4") |
| 471 | 465 | ||
| 472 | (defcustom js-flat-functions nil | 466 | (defcustom js-flat-functions nil |
| 473 | "Treat nested functions as top-level functions in `js-mode'. | 467 | "Treat nested functions as top-level functions in `js-mode'. |
| 474 | This applies to function movement, marking, and so on." | 468 | This applies to function movement, marking, and so on." |
| 475 | :type 'boolean | 469 | :type 'boolean) |
| 476 | :group 'js) | ||
| 477 | 470 | ||
| 478 | (defcustom js-indent-align-list-continuation t | 471 | (defcustom js-indent-align-list-continuation t |
| 479 | "Align continuation of non-empty ([{ lines in `js-mode'." | 472 | "Align continuation of non-empty ([{ lines in `js-mode'." |
| 480 | :version "26.1" | 473 | :version "26.1" |
| 481 | :type 'boolean | 474 | :type 'boolean |
| 482 | :safe 'booleanp | 475 | :safe 'booleanp) |
| 483 | :group 'js) | ||
| 484 | 476 | ||
| 485 | (defcustom js-comment-lineup-func #'c-lineup-C-comments | 477 | (defcustom js-comment-lineup-func #'c-lineup-C-comments |
| 486 | "Lineup function for `cc-mode-style', for C comments in `js-mode'." | 478 | "Lineup function for `cc-mode-style', for C comments in `js-mode'." |
| 487 | :type 'function | 479 | :type 'function) |
| 488 | :group 'js) | ||
| 489 | 480 | ||
| 490 | (defcustom js-enabled-frameworks js--available-frameworks | 481 | (defcustom js-enabled-frameworks js--available-frameworks |
| 491 | "Frameworks recognized by `js-mode'. | 482 | "Frameworks recognized by `js-mode'. |
| @@ -493,30 +484,26 @@ To improve performance, you may turn off some frameworks you | |||
| 493 | seldom use, either globally or on a per-buffer basis." | 484 | seldom use, either globally or on a per-buffer basis." |
| 494 | :type (cons 'set (mapcar (lambda (x) | 485 | :type (cons 'set (mapcar (lambda (x) |
| 495 | (list 'const x)) | 486 | (list 'const x)) |
| 496 | js--available-frameworks)) | 487 | js--available-frameworks))) |
| 497 | :group 'js) | ||
| 498 | 488 | ||
| 499 | (defcustom js-js-switch-tabs | 489 | (defcustom js-js-switch-tabs |
| 500 | (and (memq system-type '(darwin)) t) | 490 | (and (memq system-type '(darwin)) t) |
| 501 | "Whether `js-mode' should display tabs while selecting them. | 491 | "Whether `js-mode' should display tabs while selecting them. |
| 502 | This is useful only if the windowing system has a good mechanism | 492 | This is useful only if the windowing system has a good mechanism |
| 503 | for preventing Firefox from stealing the keyboard focus." | 493 | for preventing Firefox from stealing the keyboard focus." |
| 504 | :type 'boolean | 494 | :type 'boolean) |
| 505 | :group 'js) | ||
| 506 | 495 | ||
| 507 | (defcustom js-js-tmpdir | 496 | (defcustom js-js-tmpdir |
| 508 | "~/.emacs.d/js/js" | 497 | "~/.emacs.d/js/js" |
| 509 | "Temporary directory used by `js-mode' to communicate with Mozilla. | 498 | "Temporary directory used by `js-mode' to communicate with Mozilla. |
| 510 | This directory must be readable and writable by both Mozilla and Emacs." | 499 | This directory must be readable and writable by both Mozilla and Emacs." |
| 511 | :type 'directory | 500 | :type 'directory) |
| 512 | :group 'js) | ||
| 513 | 501 | ||
| 514 | (defcustom js-js-timeout 5 | 502 | (defcustom js-js-timeout 5 |
| 515 | "Reply timeout for executing commands in Mozilla via `js-mode'. | 503 | "Reply timeout for executing commands in Mozilla via `js-mode'. |
| 516 | The value is given in seconds. Increase this value if you are | 504 | The value is given in seconds. Increase this value if you are |
| 517 | getting timeout messages." | 505 | getting timeout messages." |
| 518 | :type 'integer | 506 | :type 'integer) |
| 519 | :group 'js) | ||
| 520 | 507 | ||
| 521 | (defcustom js-indent-first-init nil | 508 | (defcustom js-indent-first-init nil |
| 522 | "Non-nil means specially indent the first variable declaration's initializer. | 509 | "Non-nil means specially indent the first variable declaration's initializer. |
| @@ -557,8 +544,7 @@ don't indent the first one's initializer; otherwise, indent it. | |||
| 557 | bar = 2;" | 544 | bar = 2;" |
| 558 | :version "25.1" | 545 | :version "25.1" |
| 559 | :type '(choice (const nil) (const t) (const dynamic)) | 546 | :type '(choice (const nil) (const t) (const dynamic)) |
| 560 | :safe 'symbolp | 547 | :safe 'symbolp) |
| 561 | :group 'js) | ||
| 562 | 548 | ||
| 563 | (defcustom js-chain-indent nil | 549 | (defcustom js-chain-indent nil |
| 564 | "Use \"chained\" indentation. | 550 | "Use \"chained\" indentation. |
| @@ -571,8 +557,7 @@ then the \".\"s will be lined up: | |||
| 571 | " | 557 | " |
| 572 | :version "26.1" | 558 | :version "26.1" |
| 573 | :type 'boolean | 559 | :type 'boolean |
| 574 | :safe 'booleanp | 560 | :safe 'booleanp) |
| 575 | :group 'js) | ||
| 576 | 561 | ||
| 577 | (defcustom js-jsx-detect-syntax t | 562 | (defcustom js-jsx-detect-syntax t |
| 578 | "When non-nil, automatically detect whether JavaScript uses JSX. | 563 | "When non-nil, automatically detect whether JavaScript uses JSX. |
| @@ -581,8 +566,7 @@ t. The detection strategy can be customized by adding elements | |||
| 581 | to `js-jsx-regexps', which see." | 566 | to `js-jsx-regexps', which see." |
| 582 | :version "27.1" | 567 | :version "27.1" |
| 583 | :type 'boolean | 568 | :type 'boolean |
| 584 | :safe 'booleanp | 569 | :safe 'booleanp) |
| 585 | :group 'js) | ||
| 586 | 570 | ||
| 587 | (defcustom js-jsx-syntax nil | 571 | (defcustom js-jsx-syntax nil |
| 588 | "When non-nil, parse JavaScript with consideration for JSX syntax. | 572 | "When non-nil, parse JavaScript with consideration for JSX syntax. |
| @@ -600,8 +584,7 @@ When `js-mode' is already enabled, you should call | |||
| 600 | It is set to be buffer-local (and t) when in `js-jsx-mode'." | 584 | It is set to be buffer-local (and t) when in `js-jsx-mode'." |
| 601 | :version "27.1" | 585 | :version "27.1" |
| 602 | :type 'boolean | 586 | :type 'boolean |
| 603 | :safe 'booleanp | 587 | :safe 'booleanp) |
| 604 | :group 'js) | ||
| 605 | 588 | ||
| 606 | (defcustom js-jsx-align->-with-< t | 589 | (defcustom js-jsx-align->-with-< t |
| 607 | "When non-nil, “>” will be indented to the opening “<” in JSX. | 590 | "When non-nil, “>” will be indented to the opening “<” in JSX. |
| @@ -625,8 +608,7 @@ When this is disabled, JSX indentation looks like this: | |||
| 625 | />" | 608 | />" |
| 626 | :version "27.1" | 609 | :version "27.1" |
| 627 | :type 'boolean | 610 | :type 'boolean |
| 628 | :safe 'booleanp | 611 | :safe 'booleanp) |
| 629 | :group 'js) | ||
| 630 | 612 | ||
| 631 | (defcustom js-jsx-indent-level nil | 613 | (defcustom js-jsx-indent-level nil |
| 632 | "When non-nil, indent JSX by this value, instead of like JS. | 614 | "When non-nil, indent JSX by this value, instead of like JS. |
| @@ -655,8 +637,7 @@ indentation looks like this (different): | |||
| 655 | :version "27.1" | 637 | :version "27.1" |
| 656 | :type '(choice integer | 638 | :type '(choice integer |
| 657 | (const :tag "Not Set" nil)) | 639 | (const :tag "Not Set" nil)) |
| 658 | :safe (lambda (x) (or (null x) (integerp x))) | 640 | :safe (lambda (x) (or (null x) (integerp x)))) |
| 659 | :group 'js) | ||
| 660 | ;; This is how indentation behaved out-of-the-box until Emacs 27. JSX | 641 | ;; This is how indentation behaved out-of-the-box until Emacs 27. JSX |
| 661 | ;; indentation was controlled with `sgml-basic-offset', which defaults | 642 | ;; indentation was controlled with `sgml-basic-offset', which defaults |
| 662 | ;; to 2, whereas `js-indent-level' defaults to 4. Users who had the | 643 | ;; to 2, whereas `js-indent-level' defaults to 4. Users who had the |
| @@ -685,8 +666,7 @@ indentation looks like this: | |||
| 685 | This variable is like `sgml-attribute-offset'." | 666 | This variable is like `sgml-attribute-offset'." |
| 686 | :version "27.1" | 667 | :version "27.1" |
| 687 | :type 'integer | 668 | :type 'integer |
| 688 | :safe 'integerp | 669 | :safe 'integerp) |
| 689 | :group 'js) | ||
| 690 | 670 | ||
| 691 | ;;; KeyMap | 671 | ;;; KeyMap |
| 692 | 672 | ||
diff --git a/lisp/progmodes/ld-script.el b/lisp/progmodes/ld-script.el index c4ea8e158d8..485e64e2492 100644 --- a/lisp/progmodes/ld-script.el +++ b/lisp/progmodes/ld-script.el | |||
| @@ -35,8 +35,7 @@ | |||
| 35 | (defvar ld-script-location-counter-face 'ld-script-location-counter) | 35 | (defvar ld-script-location-counter-face 'ld-script-location-counter) |
| 36 | (defface ld-script-location-counter | 36 | (defface ld-script-location-counter |
| 37 | '((t :weight bold :inherit font-lock-builtin-face)) | 37 | '((t :weight bold :inherit font-lock-builtin-face)) |
| 38 | "Face for location counter in GNU ld script." | 38 | "Face for location counter in GNU ld script.") |
| 39 | :group 'ld-script) | ||
| 40 | 39 | ||
| 41 | ;; Syntax rules | 40 | ;; Syntax rules |
| 42 | (defvar ld-script-mode-syntax-table | 41 | (defvar ld-script-mode-syntax-table |
diff --git a/lisp/progmodes/m4-mode.el b/lisp/progmodes/m4-mode.el index 99f4be38721..7dfaed44282 100644 --- a/lisp/progmodes/m4-mode.el +++ b/lisp/progmodes/m4-mode.el | |||
| @@ -60,12 +60,34 @@ If m4 is not in your PATH, set this to an absolute file name." | |||
| 60 | ;;or | 60 | ;;or |
| 61 | ;;(defconst m4-program-options '("--prefix-builtins")) | 61 | ;;(defconst m4-program-options '("--prefix-builtins")) |
| 62 | 62 | ||
| 63 | ;; Needed at compile-time for `m4-font-lock-keywords' below. | ||
| 64 | (eval-and-compile | ||
| 65 | (defconst m4--macro-list | ||
| 66 | ;; From (info "(m4) Macro index") | ||
| 67 | '("__file__" "__gnu__" "__line__" "__os2__" "__program__" "__unix__" | ||
| 68 | "__windows__" "argn" "array" "array_set" "builtin" "capitalize" | ||
| 69 | "changecom" "changequote" "changeword" "cleardivert" "cond" "copy" | ||
| 70 | "curry" "debugfile" "debugmode" "decr" "define" "define_blind" | ||
| 71 | "defn" "divert" "divnum" "dnl" "downcase" "dquote" "dquote_elt" | ||
| 72 | "dumpdef" "errprint" "esyscmd" "eval" "example" "exch" | ||
| 73 | "fatal_error" "file" "foreach" "foreachq" "forloop" "format" "gnu" | ||
| 74 | "ifdef" "ifelse" "include" "incr" "index" "indir" "join" "joinall" | ||
| 75 | "len" "line" "m4exit" "m4wrap" "maketemp" "mkstemp" "nargs" "os2" | ||
| 76 | "patsubst" "popdef" "pushdef" "quote" "regexp" "rename" "reverse" | ||
| 77 | "shift" "sinclude" "stack_foreach" "stack_foreach_lifo" | ||
| 78 | "stack_foreach_sep" "stack_foreach_sep_lifo" "substr" "syscmd" | ||
| 79 | "sysval" "traceoff" "traceon" "translit" "undefine" "undivert" | ||
| 80 | "unix" "upcase" "windows") | ||
| 81 | "List of valid m4 macros for M4 mode.")) | ||
| 82 | |||
| 63 | (defvar m4-font-lock-keywords | 83 | (defvar m4-font-lock-keywords |
| 64 | '(("\\(\\_<\\(m4_\\)?dnl\\_>\\).*$" (0 font-lock-comment-face t)) | 84 | (eval-when-compile |
| 65 | ("\\$[*#@0-9]" . font-lock-variable-name-face) | 85 | `(("\\(\\_<\\(m4_\\)?dnl\\_>\\).*$" (0 font-lock-comment-face t)) |
| 66 | ("\\$@" . font-lock-variable-name-face) | 86 | ("\\$[*#@0-9]" . font-lock-variable-name-face) |
| 67 | ("\\$\\*" . font-lock-variable-name-face) | 87 | ("\\$@" . font-lock-variable-name-face) |
| 68 | ("\\_<\\(m4_\\)?\\(builtin\\|change\\(com\\|quote\\|word\\)\\|d\\(e\\(bug\\(file\\|mode\\)\\|cr\\|f\\(ine\\|n\\)\\)\\|iv\\(ert\\|num\\)\\|nl\\|umpdef\\)\\|e\\(rrprint\\|syscmd\\|val\\)\\|f\\(ile\\|ormat\\)\\|gnu\\|i\\(f\\(def\\|else\\)\\|n\\(c\\(lude\\|r\\)\\|d\\(ex\\|ir\\)\\)\\)\\|l\\(en\\|ine\\)\\|m\\(4\\(exit\\|wrap\\)\\|aketemp\\)\\|p\\(atsubst\\|opdef\\|ushdef\\)\\|regexp\\|s\\(hift\\|include\\|ubstr\\|ys\\(cmd\\|val\\)\\)\\|tra\\(ceo\\(ff\\|n\\)\\|nslit\\)\\|un\\(d\\(efine\\|ivert\\)\\|ix\\)\\)\\_>" . font-lock-keyword-face)) | 88 | ("\\$\\*" . font-lock-variable-name-face) |
| 89 | (,(concat "\\_<\\(m4_\\)?" (regexp-opt m4--macro-list) "\\_>") | ||
| 90 | . font-lock-keyword-face))) | ||
| 69 | "Default `font-lock-keywords' for M4 mode.") | 91 | "Default `font-lock-keywords' for M4 mode.") |
| 70 | 92 | ||
| 71 | (defcustom m4-mode-hook nil | 93 | (defcustom m4-mode-hook nil |
| @@ -155,22 +177,4 @@ If m4 is not in your PATH, set this to an absolute file name." | |||
| 155 | ;;stuff to play with for debugging | 177 | ;;stuff to play with for debugging |
| 156 | ;(char-to-string (char-syntax ?`)) | 178 | ;(char-to-string (char-syntax ?`)) |
| 157 | 179 | ||
| 158 | ;;;how I generate the nasty looking regexps at the top | ||
| 159 | ;;;(make-regexp '("builtin" "changecom" "changequote" "changeword" "debugfile" | ||
| 160 | ;;; "debugmode" "decr" "define" "defn" "divert" "divnum" "dnl" | ||
| 161 | ;;; "dumpdef" "errprint" "esyscmd" "eval" "file" "format" "gnu" | ||
| 162 | ;;; "ifdef" "ifelse" "include" "incr" "index" "indir" "len" "line" | ||
| 163 | ;;; "m4exit" "m4wrap" "maketemp" "patsubst" "popdef" "pushdef" "regexp" | ||
| 164 | ;;; "shift" "sinclude" "substr" "syscmd" "sysval" "traceoff" "traceon" | ||
| 165 | ;;; "translit" "undefine" "undivert" "unix")) | ||
| 166 | ;;;(make-regexp '("m4_builtin" "m4_changecom" "m4_changequote" "m4_changeword" | ||
| 167 | ;;; "m4_debugfile" "m4_debugmode" "m4_decr" "m4_define" "m4_defn" | ||
| 168 | ;;; "m4_divert" "m4_divnum" "m4_dnl" "m4_dumpdef" "m4_errprint" | ||
| 169 | ;;; "m4_esyscmd" "m4_eval" "m4_file" "m4_format" "m4_ifdef" "m4_ifelse" | ||
| 170 | ;;; "m4_include" "m4_incr" "m4_index" "m4_indir" "m4_len" "m4_line" | ||
| 171 | ;;; "m4_m4exit" "m4_m4wrap" "m4_maketemp" "m4_patsubst" "m4_popdef" | ||
| 172 | ;;; "m4_pushdef" "m4_regexp" "m4_shift" "m4_sinclude" "m4_substr" | ||
| 173 | ;;; "m4_syscmd" "m4_sysval" "m4_traceoff" "m4_traceon" "m4_translit" | ||
| 174 | ;;; "m4_m4_undefine" "m4_undivert")) | ||
| 175 | |||
| 176 | ;;; m4-mode.el ends here | 180 | ;;; m4-mode.el ends here |
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el index e382d6edcd2..3d1e7d634a2 100644 --- a/lisp/progmodes/make-mode.el +++ b/lisp/progmodes/make-mode.el | |||
| @@ -101,14 +101,12 @@ | |||
| 101 | (defface makefile-space | 101 | (defface makefile-space |
| 102 | '((((class color)) (:background "hotpink")) | 102 | '((((class color)) (:background "hotpink")) |
| 103 | (t (:reverse-video t))) | 103 | (t (:reverse-video t))) |
| 104 | "Face to use for highlighting leading spaces in Font-Lock mode." | 104 | "Face to use for highlighting leading spaces in Font-Lock mode.") |
| 105 | :group 'makefile) | ||
| 106 | 105 | ||
| 107 | (defface makefile-targets | 106 | (defface makefile-targets |
| 108 | ;; This needs to go along both with foreground and background colors (i.e. shell) | 107 | ;; This needs to go along both with foreground and background colors (i.e. shell) |
| 109 | '((t (:inherit font-lock-function-name-face))) | 108 | '((t (:inherit font-lock-function-name-face))) |
| 110 | "Face to use for additionally highlighting rule targets in Font-Lock mode." | 109 | "Face to use for additionally highlighting rule targets in Font-Lock mode." |
| 111 | :group 'makefile | ||
| 112 | :version "22.1") | 110 | :version "22.1") |
| 113 | 111 | ||
| 114 | (defface makefile-shell | 112 | (defface makefile-shell |
| @@ -116,7 +114,6 @@ | |||
| 116 | ;;'((((class color) (min-colors 88) (background light)) (:background "seashell1")) | 114 | ;;'((((class color) (min-colors 88) (background light)) (:background "seashell1")) |
| 117 | ;; (((class color) (min-colors 88) (background dark)) (:background "seashell4"))) | 115 | ;; (((class color) (min-colors 88) (background dark)) (:background "seashell4"))) |
| 118 | "Face to use for additionally highlighting Shell commands in Font-Lock mode." | 116 | "Face to use for additionally highlighting Shell commands in Font-Lock mode." |
| 119 | :group 'makefile | ||
| 120 | :version "22.1") | 117 | :version "22.1") |
| 121 | 118 | ||
| 122 | (defface makefile-makepp-perl | 119 | (defface makefile-makepp-perl |
| @@ -124,19 +121,16 @@ | |||
| 124 | (((class color) (background dark)) (:background "DarkBlue")) | 121 | (((class color) (background dark)) (:background "DarkBlue")) |
| 125 | (t (:reverse-video t))) | 122 | (t (:reverse-video t))) |
| 126 | "Face to use for additionally highlighting Perl code in Font-Lock mode." | 123 | "Face to use for additionally highlighting Perl code in Font-Lock mode." |
| 127 | :group 'makefile | ||
| 128 | :version "22.1") | 124 | :version "22.1") |
| 129 | 125 | ||
| 130 | (defcustom makefile-browser-buffer-name "*Macros and Targets*" | 126 | (defcustom makefile-browser-buffer-name "*Macros and Targets*" |
| 131 | "Name of the macro- and target browser buffer." | 127 | "Name of the macro- and target browser buffer." |
| 132 | :type 'string | 128 | :type 'string) |
| 133 | :group 'makefile) | ||
| 134 | 129 | ||
| 135 | (defcustom makefile-target-colon ":" | 130 | (defcustom makefile-target-colon ":" |
| 136 | "String to append to all target names inserted by `makefile-insert-target'. | 131 | "String to append to all target names inserted by `makefile-insert-target'. |
| 137 | \":\" or \"::\" are common values." | 132 | \":\" or \"::\" are common values." |
| 138 | :type 'string | 133 | :type 'string) |
| 139 | :group 'makefile) | ||
| 140 | 134 | ||
| 141 | (defcustom makefile-macro-assign " = " | 135 | (defcustom makefile-macro-assign " = " |
| 142 | "String to append to all macro names inserted by `makefile-insert-macro'. | 136 | "String to append to all macro names inserted by `makefile-insert-macro'. |
| @@ -144,70 +138,58 @@ The normal value should be \" = \", since this is what | |||
| 144 | standard make expects. However, newer makes such as dmake | 138 | standard make expects. However, newer makes such as dmake |
| 145 | allow a larger variety of different macro assignments, so you | 139 | allow a larger variety of different macro assignments, so you |
| 146 | might prefer to use \" += \" or \" := \" ." | 140 | might prefer to use \" += \" or \" := \" ." |
| 147 | :type 'string | 141 | :type 'string) |
| 148 | :group 'makefile) | ||
| 149 | 142 | ||
| 150 | (defcustom makefile-electric-keys nil | 143 | (defcustom makefile-electric-keys nil |
| 151 | "If non-nil, Makefile mode should install electric keybindings. | 144 | "If non-nil, Makefile mode should install electric keybindings. |
| 152 | Default is nil." | 145 | Default is nil." |
| 153 | :type 'boolean | 146 | :type 'boolean) |
| 154 | :group 'makefile) | ||
| 155 | 147 | ||
| 156 | (defcustom makefile-use-curly-braces-for-macros-p nil | 148 | (defcustom makefile-use-curly-braces-for-macros-p nil |
| 157 | "Controls the style of generated macro references. | 149 | "Controls the style of generated macro references. |
| 158 | Non-nil means macro references should use curly braces, like `${this}'. | 150 | Non-nil means macro references should use curly braces, like `${this}'. |
| 159 | nil means use parentheses, like `$(this)'." | 151 | nil means use parentheses, like `$(this)'." |
| 160 | :type 'boolean | 152 | :type 'boolean) |
| 161 | :group 'makefile) | ||
| 162 | 153 | ||
| 163 | (defcustom makefile-tab-after-target-colon t | 154 | (defcustom makefile-tab-after-target-colon t |
| 164 | "If non-nil, insert a TAB after a target colon. | 155 | "If non-nil, insert a TAB after a target colon. |
| 165 | Otherwise, a space is inserted. | 156 | Otherwise, a space is inserted. |
| 166 | The default is t." | 157 | The default is t." |
| 167 | :type 'boolean | 158 | :type 'boolean) |
| 168 | :group 'makefile) | ||
| 169 | 159 | ||
| 170 | (defcustom makefile-browser-leftmost-column 10 | 160 | (defcustom makefile-browser-leftmost-column 10 |
| 171 | "Number of blanks to the left of the browser selection mark." | 161 | "Number of blanks to the left of the browser selection mark." |
| 172 | :type 'integer | 162 | :type 'integer) |
| 173 | :group 'makefile) | ||
| 174 | 163 | ||
| 175 | (defcustom makefile-browser-cursor-column 10 | 164 | (defcustom makefile-browser-cursor-column 10 |
| 176 | "Column the cursor goes to when it moves up or down in the Makefile browser." | 165 | "Column the cursor goes to when it moves up or down in the Makefile browser." |
| 177 | :type 'integer | 166 | :type 'integer) |
| 178 | :group 'makefile) | ||
| 179 | 167 | ||
| 180 | (defcustom makefile-backslash-column 48 | 168 | (defcustom makefile-backslash-column 48 |
| 181 | "Column in which `makefile-backslash-region' inserts backslashes." | 169 | "Column in which `makefile-backslash-region' inserts backslashes." |
| 182 | :type 'integer | 170 | :type 'integer) |
| 183 | :group 'makefile) | ||
| 184 | 171 | ||
| 185 | (defcustom makefile-backslash-align t | 172 | (defcustom makefile-backslash-align t |
| 186 | "If non-nil, `makefile-backslash-region' will align backslashes." | 173 | "If non-nil, `makefile-backslash-region' will align backslashes." |
| 187 | :type 'boolean | 174 | :type 'boolean) |
| 188 | :group 'makefile) | ||
| 189 | 175 | ||
| 190 | (defcustom makefile-browser-selected-mark "+ " | 176 | (defcustom makefile-browser-selected-mark "+ " |
| 191 | "String used to mark selected entries in the Makefile browser." | 177 | "String used to mark selected entries in the Makefile browser." |
| 192 | :type 'string | 178 | :type 'string) |
| 193 | :group 'makefile) | ||
| 194 | 179 | ||
| 195 | (defcustom makefile-browser-unselected-mark " " | 180 | (defcustom makefile-browser-unselected-mark " " |
| 196 | "String used to mark unselected entries in the Makefile browser." | 181 | "String used to mark unselected entries in the Makefile browser." |
| 197 | :type 'string | 182 | :type 'string) |
| 198 | :group 'makefile) | ||
| 199 | 183 | ||
| 200 | (defcustom makefile-browser-auto-advance-after-selection-p t | 184 | (defcustom makefile-browser-auto-advance-after-selection-p t |
| 201 | "If non-nil, cursor will move after item is selected in Makefile browser." | 185 | "If non-nil, cursor will move after item is selected in Makefile browser." |
| 202 | :type 'boolean | 186 | :type 'boolean) |
| 203 | :group 'makefile) | ||
| 204 | 187 | ||
| 205 | (defcustom makefile-pickup-everything-picks-up-filenames-p nil | 188 | (defcustom makefile-pickup-everything-picks-up-filenames-p nil |
| 206 | "If non-nil, `makefile-pickup-everything' picks up filenames as targets. | 189 | "If non-nil, `makefile-pickup-everything' picks up filenames as targets. |
| 207 | This means it calls `makefile-pickup-filenames-as-targets'. | 190 | This means it calls `makefile-pickup-filenames-as-targets'. |
| 208 | Otherwise filenames are omitted." | 191 | Otherwise filenames are omitted." |
| 209 | :type 'boolean | 192 | :type 'boolean) |
| 210 | :group 'makefile) | ||
| 211 | 193 | ||
| 212 | (defcustom makefile-cleanup-continuations nil | 194 | (defcustom makefile-cleanup-continuations nil |
| 213 | "If non-nil, automatically clean up continuation lines when saving. | 195 | "If non-nil, automatically clean up continuation lines when saving. |
| @@ -215,13 +197,11 @@ A line is cleaned up by removing all whitespace following a trailing | |||
| 215 | backslash. This is done silently. | 197 | backslash. This is done silently. |
| 216 | IMPORTANT: Please note that enabling this option causes Makefile mode | 198 | IMPORTANT: Please note that enabling this option causes Makefile mode |
| 217 | to MODIFY A FILE WITHOUT YOUR CONFIRMATION when \"it seems necessary\"." | 199 | to MODIFY A FILE WITHOUT YOUR CONFIRMATION when \"it seems necessary\"." |
| 218 | :type 'boolean | 200 | :type 'boolean) |
| 219 | :group 'makefile) | ||
| 220 | 201 | ||
| 221 | (defcustom makefile-mode-hook nil | 202 | (defcustom makefile-mode-hook nil |
| 222 | "Normal hook run by `makefile-mode'." | 203 | "Normal hook run by `makefile-mode'." |
| 223 | :type 'hook | 204 | :type 'hook) |
| 224 | :group 'makefile) | ||
| 225 | 205 | ||
| 226 | (defvar makefile-browser-hook '()) | 206 | (defvar makefile-browser-hook '()) |
| 227 | 207 | ||
| @@ -240,8 +220,7 @@ to MODIFY A FILE WITHOUT YOUR CONFIRMATION when \"it seems necessary\"." | |||
| 240 | "List of special targets. | 220 | "List of special targets. |
| 241 | You will be offered to complete on one of those in the minibuffer whenever | 221 | You will be offered to complete on one of those in the minibuffer whenever |
| 242 | you enter a \".\" at the beginning of a line in `makefile-mode'." | 222 | you enter a \".\" at the beginning of a line in `makefile-mode'." |
| 243 | :type '(repeat string) | 223 | :type '(repeat string)) |
| 244 | :group 'makefile) | ||
| 245 | (put 'makefile-special-targets-list 'risky-local-variable t) | 224 | (put 'makefile-special-targets-list 'risky-local-variable t) |
| 246 | 225 | ||
| 247 | (defcustom makefile-runtime-macros-list | 226 | (defcustom makefile-runtime-macros-list |
| @@ -250,8 +229,7 @@ you enter a \".\" at the beginning of a line in `makefile-mode'." | |||
| 250 | If you insert a macro reference using `makefile-insert-macro-ref', the name | 229 | If you insert a macro reference using `makefile-insert-macro-ref', the name |
| 251 | of the macro is checked against this list. If it can be found its name will | 230 | of the macro is checked against this list. If it can be found its name will |
| 252 | not be enclosed in { } or ( )." | 231 | not be enclosed in { } or ( )." |
| 253 | :type '(repeat (list string)) | 232 | :type '(repeat (list string))) |
| 254 | :group 'makefile) | ||
| 255 | 233 | ||
| 256 | ;; Note that the first big subexpression is used by font lock. Note | 234 | ;; Note that the first big subexpression is used by font lock. Note |
| 257 | ;; that if you change this regexp you might have to fix the imenu | 235 | ;; that if you change this regexp you might have to fix the imenu |
| @@ -563,8 +541,7 @@ not be enclosed in { } or ( )." | |||
| 563 | (defcustom makefile-brave-make "make" | 541 | (defcustom makefile-brave-make "make" |
| 564 | "How to invoke make, for `makefile-query-targets'. | 542 | "How to invoke make, for `makefile-query-targets'. |
| 565 | This should identify a `make' command that can handle the `-q' option." | 543 | This should identify a `make' command that can handle the `-q' option." |
| 566 | :type 'string | 544 | :type 'string) |
| 567 | :group 'makefile) | ||
| 568 | 545 | ||
| 569 | (defvaralias 'makefile-query-one-target-method | 546 | (defvaralias 'makefile-query-one-target-method |
| 570 | 'makefile-query-one-target-method-function) | 547 | 'makefile-query-one-target-method-function) |
| @@ -584,13 +561,11 @@ The function must satisfy this calling convention: | |||
| 584 | * It must return the integer value 0 (zero) if the given target | 561 | * It must return the integer value 0 (zero) if the given target |
| 585 | should be considered up-to-date in the context of the given | 562 | should be considered up-to-date in the context of the given |
| 586 | makefile, any nonzero integer value otherwise." | 563 | makefile, any nonzero integer value otherwise." |
| 587 | :type 'function | 564 | :type 'function) |
| 588 | :group 'makefile) | ||
| 589 | 565 | ||
| 590 | (defcustom makefile-up-to-date-buffer-name "*Makefile Up-to-date overview*" | 566 | (defcustom makefile-up-to-date-buffer-name "*Makefile Up-to-date overview*" |
| 591 | "Name of the Up-to-date overview buffer." | 567 | "Name of the Up-to-date overview buffer." |
| 592 | :type 'string | 568 | :type 'string) |
| 593 | :group 'makefile) | ||
| 594 | 569 | ||
| 595 | ;;; --- end of up-to-date-overview configuration ------------------ | 570 | ;;; --- end of up-to-date-overview configuration ------------------ |
| 596 | 571 | ||
diff --git a/lisp/progmodes/meta-mode.el b/lisp/progmodes/meta-mode.el index 9da968c8314..46b0949c133 100644 --- a/lisp/progmodes/meta-mode.el +++ b/lisp/progmodes/meta-mode.el | |||
| @@ -109,44 +109,31 @@ | |||
| 109 | "\\(def\\|let\\|mode_def\\|vardef\\)") | 109 | "\\(def\\|let\\|mode_def\\|vardef\\)") |
| 110 | (macro-keywords-2 | 110 | (macro-keywords-2 |
| 111 | "\\(primarydef\\|secondarydef\\|tertiarydef\\)") | 111 | "\\(primarydef\\|secondarydef\\|tertiarydef\\)") |
| 112 | ;(make-regexp | ||
| 113 | ; '("expr" "suffix" "text" "primary" "secondary" "tertiary") t) | ||
| 114 | (args-keywords | 112 | (args-keywords |
| 115 | (concat "\\(expr\\|primary\\|s\\(econdary\\|uffix\\)\\|" | 113 | (eval-when-compile |
| 116 | "te\\(rtiary\\|xt\\)\\)")) | 114 | (regexp-opt |
| 117 | ;(make-regexp | 115 | '("expr" "suffix" "text" "primary" "secondary" "tertiary") |
| 118 | ; '("boolean" "color" "numeric" "pair" "path" "pen" "picture" | 116 | t))) |
| 119 | ; "string" "transform" "newinternal") t) | ||
| 120 | (type-keywords | 117 | (type-keywords |
| 121 | (concat "\\(boolean\\|color\\|n\\(ewinternal\\|umeric\\)\\|" | 118 | (eval-when-compile |
| 122 | "p\\(a\\(ir\\|th\\)\\|en\\|icture\\)\\|string\\|" | 119 | (regexp-opt |
| 123 | "transform\\)")) | 120 | '("boolean" "color" "numeric" "pair" "path" "pen" "picture" |
| 124 | ;(make-regexp | 121 | "string" "transform" "newinternal") |
| 125 | ; '("for" "forever" "forsuffixes" "endfor" | 122 | t))) |
| 126 | ; "step" "until" "upto" "downto" "thru" "within" | ||
| 127 | ; "iff" "if" "elseif" "else" "fi" "exitif" "exitunless" | ||
| 128 | ; "let" "def" "vardef" "enddef" "mode_def" | ||
| 129 | ; "true" "false" "known" "unknown" "and" "or" "not" | ||
| 130 | ; "save" "interim" "inner" "outer" "relax" | ||
| 131 | ; "begingroup" "endgroup" "expandafter" "scantokens" | ||
| 132 | ; "generate" "input" "endinput" "end" "bye" | ||
| 133 | ; "message" "errmessage" "errhelp" "special" "numspecial" | ||
| 134 | ; "readstring" "readfrom" "write") t) | ||
| 135 | (syntactic-keywords | 123 | (syntactic-keywords |
| 136 | (concat "\\(and\\|b\\(egingroup\\|ye\\)\\|" | 124 | (eval-when-compile |
| 137 | "d\\(ef\\|ownto\\)\\|e\\(lse\\(\\|if\\)" | 125 | (regexp-opt |
| 138 | "\\|nd\\(\\|def\\|for\\|group\\|input\\)" | 126 | '("for" "forever" "forsuffixes" "endfor" |
| 139 | "\\|rr\\(help\\|message\\)" | 127 | "step" "until" "upto" "downto" "thru" "within" |
| 140 | "\\|x\\(it\\(if\\|unless\\)\\|pandafter\\)\\)\\|" | 128 | "iff" "if" "elseif" "else" "fi" "exitif" "exitunless" |
| 141 | "f\\(alse\\|i\\|or\\(\\|ever\\|suffixes\\)\\)\\|" | 129 | "let" "def" "vardef" "enddef" "mode_def" |
| 142 | "generate\\|i\\(ff?\\|n\\(ner\\|put\\|terim\\)\\)\\|" | 130 | "true" "false" "known" "unknown" "and" "or" "not" |
| 143 | "known\\|let\\|m\\(essage\\|ode_def\\)\\|" | 131 | "save" "interim" "inner" "outer" "relax" |
| 144 | "n\\(ot\\|umspecial\\)\\|o\\(r\\|uter\\)\\|" | 132 | "begingroup" "endgroup" "expandafter" "scantokens" |
| 145 | "re\\(ad\\(from\\|string\\)\\|lax\\)\\|" | 133 | "generate" "input" "endinput" "end" "bye" |
| 146 | "s\\(ave\\|cantokens\\|pecial\\|tep\\)\\|" | 134 | "message" "errmessage" "errhelp" "special" "numspecial" |
| 147 | "t\\(hru\\|rue\\)\\|" | 135 | "readstring" "readfrom" "write") |
| 148 | "u\\(n\\(known\\|til\\)\\|pto\\)\\|" | 136 | t))) |
| 149 | "vardef\\|w\\(ithin\\|rite\\)\\)")) | ||
| 150 | ) | 137 | ) |
| 151 | (list | 138 | (list |
| 152 | ;; embedded TeX code in btex ... etex | 139 | ;; embedded TeX code in btex ... etex |
| @@ -463,25 +450,21 @@ If the list was changed, sort the list and remove duplicates first." | |||
| 463 | 450 | ||
| 464 | (defcustom meta-indent-level 2 | 451 | (defcustom meta-indent-level 2 |
| 465 | "Indentation of begin-end blocks in Metafont or MetaPost mode." | 452 | "Indentation of begin-end blocks in Metafont or MetaPost mode." |
| 466 | :type 'integer | 453 | :type 'integer) |
| 467 | :group 'meta-font) | ||
| 468 | 454 | ||
| 469 | 455 | ||
| 470 | (defcustom meta-left-comment-regexp "%%+" | 456 | (defcustom meta-left-comment-regexp "%%+" |
| 471 | "Regexp matching comments that should be placed on the left margin." | 457 | "Regexp matching comments that should be placed on the left margin." |
| 472 | :type 'regexp | 458 | :type 'regexp) |
| 473 | :group 'meta-font) | ||
| 474 | 459 | ||
| 475 | (defcustom meta-right-comment-regexp nil | 460 | (defcustom meta-right-comment-regexp nil |
| 476 | "Regexp matching comments that should be placed on the right margin." | 461 | "Regexp matching comments that should be placed on the right margin." |
| 477 | :type '(choice regexp | 462 | :type '(choice regexp |
| 478 | (const :tag "None" nil)) | 463 | (const :tag "None" nil))) |
| 479 | :group 'meta-font) | ||
| 480 | 464 | ||
| 481 | (defcustom meta-ignore-comment-regexp "%[^%]" | 465 | (defcustom meta-ignore-comment-regexp "%[^%]" |
| 482 | "Regexp matching comments whose indentation should not be touched." | 466 | "Regexp matching comments whose indentation should not be touched." |
| 483 | :type 'regexp | 467 | :type 'regexp) |
| 484 | :group 'meta-font) | ||
| 485 | 468 | ||
| 486 | 469 | ||
| 487 | (defcustom meta-begin-environment-regexp | 470 | (defcustom meta-begin-environment-regexp |
| @@ -489,22 +472,19 @@ If the list was changed, sort the list and remove duplicates first." | |||
| 489 | "def\\|for\\(\\|ever\\|suffixes\\)\\|if\\|mode_def\\|" | 472 | "def\\|for\\(\\|ever\\|suffixes\\)\\|if\\|mode_def\\|" |
| 490 | "primarydef\\|secondarydef\\|tertiarydef\\|vardef\\)") | 473 | "primarydef\\|secondarydef\\|tertiarydef\\|vardef\\)") |
| 491 | "Regexp matching the beginning of environments to be indented." | 474 | "Regexp matching the beginning of environments to be indented." |
| 492 | :type 'regexp | 475 | :type 'regexp) |
| 493 | :group 'meta-font) | ||
| 494 | 476 | ||
| 495 | (defcustom meta-end-environment-regexp | 477 | (defcustom meta-end-environment-regexp |
| 496 | (concat "\\(end\\(char\\|def\\|f\\(ig\\|or\\)\\|gr\\(aph\\|oup\\)\\)" | 478 | (concat "\\(end\\(char\\|def\\|f\\(ig\\|or\\)\\|gr\\(aph\\|oup\\)\\)" |
| 497 | "\\|fi\\)") | 479 | "\\|fi\\)") |
| 498 | "Regexp matching the end of environments to be indented." | 480 | "Regexp matching the end of environments to be indented." |
| 499 | :type 'regexp | 481 | :type 'regexp) |
| 500 | :group 'meta-font) | ||
| 501 | 482 | ||
| 502 | (defcustom meta-within-environment-regexp | 483 | (defcustom meta-within-environment-regexp |
| 503 | ; (concat "\\(e\\(lse\\(\\|if\\)\\|xit\\(if\\|unless\\)\\)\\)") | 484 | ; (concat "\\(e\\(lse\\(\\|if\\)\\|xit\\(if\\|unless\\)\\)\\)") |
| 504 | (concat "\\(else\\(\\|if\\)\\)") | 485 | (concat "\\(else\\(\\|if\\)\\)") |
| 505 | "Regexp matching keywords within environments not to be indented." | 486 | "Regexp matching keywords within environments not to be indented." |
| 506 | :type 'regexp | 487 | :type 'regexp) |
| 507 | :group 'meta-font) | ||
| 508 | 488 | ||
| 509 | 489 | ||
| 510 | (defun meta-comment-indent () | 490 | (defun meta-comment-indent () |
| @@ -689,14 +669,12 @@ If the list was changed, sort the list and remove duplicates first." | |||
| 689 | (concat "\\(begin\\(char\\|fig\\|logochar\\)\\|def\\|mode_def\\|" | 669 | (concat "\\(begin\\(char\\|fig\\|logochar\\)\\|def\\|mode_def\\|" |
| 690 | "primarydef\\|secondarydef\\|tertiarydef\\|vardef\\)") | 670 | "primarydef\\|secondarydef\\|tertiarydef\\|vardef\\)") |
| 691 | "Regexp matching beginning of defuns in Metafont or MetaPost mode." | 671 | "Regexp matching beginning of defuns in Metafont or MetaPost mode." |
| 692 | :type 'regexp | 672 | :type 'regexp) |
| 693 | :group 'meta-font) | ||
| 694 | 673 | ||
| 695 | (defcustom meta-end-defun-regexp | 674 | (defcustom meta-end-defun-regexp |
| 696 | (concat "\\(end\\(char\\|def\\|fig\\)\\)") | 675 | (concat "\\(end\\(char\\|def\\|fig\\)\\)") |
| 697 | "Regexp matching the end of defuns in Metafont or MetaPost mode." | 676 | "Regexp matching the end of defuns in Metafont or MetaPost mode." |
| 698 | :type 'regexp | 677 | :type 'regexp) |
| 699 | :group 'meta-font) | ||
| 700 | 678 | ||
| 701 | 679 | ||
| 702 | (defun meta-beginning-of-defun (&optional arg) | 680 | (defun meta-beginning-of-defun (&optional arg) |
| @@ -893,24 +871,21 @@ The environment marked is the one that contains point or follows point." | |||
| 893 | 871 | ||
| 894 | (defcustom meta-mode-load-hook nil | 872 | (defcustom meta-mode-load-hook nil |
| 895 | "Hook evaluated when first loading Metafont or MetaPost mode." | 873 | "Hook evaluated when first loading Metafont or MetaPost mode." |
| 896 | :type 'hook | 874 | :type 'hook) |
| 897 | :group 'meta-font) | ||
| 898 | (make-obsolete-variable 'meta-mode-load-hook | 875 | (make-obsolete-variable 'meta-mode-load-hook |
| 899 | "use `with-eval-after-load' instead." "28.1") | 876 | "use `with-eval-after-load' instead." "28.1") |
| 900 | 877 | ||
| 901 | (defcustom meta-common-mode-hook nil | 878 | (defcustom meta-common-mode-hook nil |
| 902 | "Hook evaluated by both `metafont-mode' and `metapost-mode'." | 879 | "Hook evaluated by both `metafont-mode' and `metapost-mode'." |
| 903 | :type 'hook | 880 | :type 'hook) |
| 904 | :group 'meta-font) | ||
| 905 | 881 | ||
| 906 | (defcustom metafont-mode-hook nil | 882 | (defcustom metafont-mode-hook nil |
| 907 | "Hook evaluated by `metafont-mode' after `meta-common-mode-hook'." | 883 | "Hook evaluated by `metafont-mode' after `meta-common-mode-hook'." |
| 908 | :type 'hook | 884 | :type 'hook) |
| 909 | :group 'meta-font) | 885 | |
| 910 | (defcustom metapost-mode-hook nil | 886 | (defcustom metapost-mode-hook nil |
| 911 | "Hook evaluated by `metapost-mode' after `meta-common-mode-hook'." | 887 | "Hook evaluated by `metapost-mode' after `meta-common-mode-hook'." |
| 912 | :type 'hook | 888 | :type 'hook) |
| 913 | :group 'meta-font) | ||
| 914 | 889 | ||
| 915 | 890 | ||
| 916 | 891 | ||
diff --git a/lisp/progmodes/modula2.el b/lisp/progmodes/modula2.el index a77a4e2b216..536d3be0056 100644 --- a/lisp/progmodes/modula2.el +++ b/lisp/progmodes/modula2.el | |||
| @@ -51,23 +51,19 @@ | |||
| 51 | 51 | ||
| 52 | (defcustom m2-compile-command "m2c" | 52 | (defcustom m2-compile-command "m2c" |
| 53 | "Command to compile Modula-2 programs." | 53 | "Command to compile Modula-2 programs." |
| 54 | :type 'string | 54 | :type 'string) |
| 55 | :group 'modula2) | ||
| 56 | 55 | ||
| 57 | (defcustom m2-link-command "m2l" | 56 | (defcustom m2-link-command "m2l" |
| 58 | "Command to link Modula-2 programs." | 57 | "Command to link Modula-2 programs." |
| 59 | :type 'string | 58 | :type 'string) |
| 60 | :group 'modula2) | ||
| 61 | 59 | ||
| 62 | (defcustom m2-link-name nil | 60 | (defcustom m2-link-name nil |
| 63 | "Name of the Modula-2 executable." | 61 | "Name of the Modula-2 executable." |
| 64 | :type '(choice (const nil) string) | 62 | :type '(choice (const nil) string)) |
| 65 | :group 'modula2) | ||
| 66 | 63 | ||
| 67 | (defcustom m2-end-comment-column 75 | 64 | (defcustom m2-end-comment-column 75 |
| 68 | "Column for aligning the end of a comment, in Modula-2." | 65 | "Column for aligning the end of a comment, in Modula-2." |
| 69 | :type 'integer | 66 | :type 'integer) |
| 70 | :group 'modula2) | ||
| 71 | 67 | ||
| 72 | ;;; Added by TEP | 68 | ;;; Added by TEP |
| 73 | (defvar m2-mode-map | 69 | (defvar m2-mode-map |
| @@ -105,8 +101,7 @@ | |||
| 105 | 101 | ||
| 106 | (defcustom m2-indent 5 | 102 | (defcustom m2-indent 5 |
| 107 | "This variable gives the indentation in Modula-2 mode." | 103 | "This variable gives the indentation in Modula-2 mode." |
| 108 | :type 'integer | 104 | :type 'integer) |
| 109 | :group 'modula2) | ||
| 110 | (put 'm2-indent 'safe-local-variable | 105 | (put 'm2-indent 'safe-local-variable |
| 111 | (lambda (v) (or (null v) (integerp v)))) | 106 | (lambda (v) (or (null v) (integerp v)))) |
| 112 | 107 | ||
diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index cb44b72fb44..a8a86478d8b 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el | |||
| @@ -165,7 +165,7 @@ parenthetical grouping.") | |||
| 165 | (modify-syntax-entry ?| "." table) | 165 | (modify-syntax-entry ?| "." table) |
| 166 | (modify-syntax-entry ?! "." table) | 166 | (modify-syntax-entry ?! "." table) |
| 167 | (modify-syntax-entry ?\\ "." table) | 167 | (modify-syntax-entry ?\\ "." table) |
| 168 | (modify-syntax-entry ?\' "\"" table) | 168 | (modify-syntax-entry ?\' "." table) |
| 169 | (modify-syntax-entry ?\` "." table) | 169 | (modify-syntax-entry ?\` "." table) |
| 170 | (modify-syntax-entry ?. "." table) | 170 | (modify-syntax-entry ?. "." table) |
| 171 | (modify-syntax-entry ?\" "\"" table) | 171 | (modify-syntax-entry ?\" "\"" table) |
| @@ -215,9 +215,15 @@ newline or semicolon after an else or end keyword." | |||
| 215 | (concat "[^#%\n]*\\(" octave-continuation-marker-regexp | 215 | (concat "[^#%\n]*\\(" octave-continuation-marker-regexp |
| 216 | "\\)\\s-*\\(\\s<.*\\)?$")) | 216 | "\\)\\s-*\\(\\s<.*\\)?$")) |
| 217 | 217 | ||
| 218 | ;; Char \ is considered a bad decision for continuing a line. | ||
| 219 | (defconst octave-continuation-string "..." | 218 | (defconst octave-continuation-string "..." |
| 220 | "Character string used for Octave continuation lines.") | 219 | "Character string used for Octave continuation lines. |
| 220 | Joins current line with following line, except within | ||
| 221 | double-quoted strings, where `octave-string-continuation-marker' | ||
| 222 | is used instead.") | ||
| 223 | |||
| 224 | (defconst octave-string-continuation-marker "\\" | ||
| 225 | "Line continuation marker for double-quoted Octave strings. | ||
| 226 | Non-string statements use `octave-continuation-string'.") | ||
| 221 | 227 | ||
| 222 | (defvar octave-mode-imenu-generic-expression | 228 | (defvar octave-mode-imenu-generic-expression |
| 223 | (list | 229 | (list |
| @@ -1032,11 +1038,11 @@ directory and makes this the current buffer's default directory." | |||
| 1032 | (looking-at regexp))) | 1038 | (looking-at regexp))) |
| 1033 | 1039 | ||
| 1034 | (defun octave-maybe-insert-continuation-string () | 1040 | (defun octave-maybe-insert-continuation-string () |
| 1035 | (if (or (octave-in-comment-p) | 1041 | (declare (obsolete nil "28.1")) |
| 1036 | (save-excursion | 1042 | (unless (or (octave-in-comment-p) |
| 1037 | (beginning-of-line) | 1043 | (save-excursion |
| 1038 | (looking-at octave-continuation-regexp))) | 1044 | (beginning-of-line) |
| 1039 | nil | 1045 | (looking-at octave-continuation-regexp))) |
| 1040 | (delete-horizontal-space) | 1046 | (delete-horizontal-space) |
| 1041 | (insert (concat " " octave-continuation-string)))) | 1047 | (insert (concat " " octave-continuation-string)))) |
| 1042 | 1048 | ||
| @@ -1218,23 +1224,22 @@ q: Don't fix\n" func file)) | |||
| 1218 | (defun octave-indent-new-comment-line (&optional soft) | 1224 | (defun octave-indent-new-comment-line (&optional soft) |
| 1219 | "Break Octave line at point, continuing comment if within one. | 1225 | "Break Octave line at point, continuing comment if within one. |
| 1220 | Insert `octave-continuation-string' before breaking the line | 1226 | Insert `octave-continuation-string' before breaking the line |
| 1221 | unless inside a list. Signal an error if within a single-quoted | 1227 | unless inside a list. If within a double-quoted string, insert |
| 1222 | string." | 1228 | `octave-string-continuation-marker' instead. Signal an error if |
| 1229 | within a single-quoted string." | ||
| 1223 | (interactive) | 1230 | (interactive) |
| 1224 | (funcall comment-line-break-function soft)) | 1231 | (funcall comment-line-break-function soft)) |
| 1225 | 1232 | ||
| 1226 | (defun octave--indent-new-comment-line (orig &rest args) | 1233 | (defun octave--indent-new-comment-line (orig &rest args) |
| 1227 | (cond | 1234 | (pcase (syntax-ppss) |
| 1228 | ((octave-in-comment-p) nil) | 1235 | ((app ppss-string-terminator ?\') |
| 1229 | ((eq (octave-in-string-p) ?') | 1236 | (user-error "Cannot split a single-quoted string")) |
| 1230 | (error "Cannot split a single-quoted string")) | 1237 | ((app ppss-string-terminator ?\") |
| 1231 | ((eq (octave-in-string-p) ?\") | 1238 | (insert octave-string-continuation-marker)) |
| 1232 | (insert octave-continuation-string)) | 1239 | ((pred (not ppss-comment-depth)) |
| 1233 | (t | 1240 | (delete-horizontal-space) |
| 1234 | (delete-horizontal-space) | 1241 | (unless (octave-smie--in-parens-p) |
| 1235 | (unless (and (cadr (syntax-ppss)) | 1242 | (insert " " octave-continuation-string)))) |
| 1236 | (eq (char-after (cadr (syntax-ppss))) ?\()) | ||
| 1237 | (insert " " octave-continuation-string)))) | ||
| 1238 | (apply orig args) | 1243 | (apply orig args) |
| 1239 | (indent-according-to-mode)) | 1244 | (indent-according-to-mode)) |
| 1240 | 1245 | ||
| @@ -1663,9 +1668,7 @@ code line." | |||
| 1663 | 1668 | ||
| 1664 | (define-button-type 'octave-help-function | 1669 | (define-button-type 'octave-help-function |
| 1665 | 'follow-link t | 1670 | 'follow-link t |
| 1666 | 'action (lambda (b) | 1671 | 'action (lambda (b) (octave-help (button-label b)))) |
| 1667 | (octave-help | ||
| 1668 | (buffer-substring (button-start b) (button-end b))))) | ||
| 1669 | 1672 | ||
| 1670 | (defvar octave-help-mode-map | 1673 | (defvar octave-help-mode-map |
| 1671 | (let ((map (make-sparse-keymap))) | 1674 | (let ((map (make-sparse-keymap))) |
diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el index 59f90d7293b..e6e6e40aa19 100644 --- a/lisp/progmodes/pascal.el +++ b/lisp/progmodes/pascal.el | |||
| @@ -199,38 +199,32 @@ | |||
| 199 | 199 | ||
| 200 | (defcustom pascal-indent-level 3 | 200 | (defcustom pascal-indent-level 3 |
| 201 | "Indentation of Pascal statements with respect to containing block." | 201 | "Indentation of Pascal statements with respect to containing block." |
| 202 | :type 'integer | 202 | :type 'integer) |
| 203 | :group 'pascal) | ||
| 204 | 203 | ||
| 205 | (defcustom pascal-case-indent 2 | 204 | (defcustom pascal-case-indent 2 |
| 206 | "Indentation for case statements." | 205 | "Indentation for case statements." |
| 207 | :type 'integer | 206 | :type 'integer) |
| 208 | :group 'pascal) | ||
| 209 | 207 | ||
| 210 | (defcustom pascal-auto-newline nil | 208 | (defcustom pascal-auto-newline nil |
| 211 | "Non-nil means automatically insert newlines in certain cases. | 209 | "Non-nil means automatically insert newlines in certain cases. |
| 212 | These include after semicolons and after the punctuation mark after an `end'." | 210 | These include after semicolons and after the punctuation mark after an `end'." |
| 213 | :type 'boolean | 211 | :type 'boolean) |
| 214 | :group 'pascal) | ||
| 215 | 212 | ||
| 216 | (defcustom pascal-indent-nested-functions t | 213 | (defcustom pascal-indent-nested-functions t |
| 217 | "Non-nil means nested functions are indented." | 214 | "Non-nil means nested functions are indented." |
| 218 | :type 'boolean | 215 | :type 'boolean) |
| 219 | :group 'pascal) | ||
| 220 | 216 | ||
| 221 | (defcustom pascal-tab-always-indent t | 217 | (defcustom pascal-tab-always-indent t |
| 222 | "Non-nil means TAB in Pascal mode should always reindent the current line. | 218 | "Non-nil means TAB in Pascal mode should always reindent the current line. |
| 223 | If this is nil, TAB inserts a tab if it is at the end of the line | 219 | If this is nil, TAB inserts a tab if it is at the end of the line |
| 224 | and follows non-whitespace text." | 220 | and follows non-whitespace text." |
| 225 | :type 'boolean | 221 | :type 'boolean) |
| 226 | :group 'pascal) | ||
| 227 | 222 | ||
| 228 | (defcustom pascal-auto-endcomments t | 223 | (defcustom pascal-auto-endcomments t |
| 229 | "Non-nil means automatically insert comments after certain `end's. | 224 | "Non-nil means automatically insert comments after certain `end's. |
| 230 | Specifically, this is done after the ends of case statements and functions. | 225 | Specifically, this is done after the ends of case statements and functions. |
| 231 | The name of the function or case is included between the braces." | 226 | The name of the function or case is included between the braces." |
| 232 | :type 'boolean | 227 | :type 'boolean) |
| 233 | :group 'pascal) | ||
| 234 | 228 | ||
| 235 | (defcustom pascal-auto-lineup '(all) | 229 | (defcustom pascal-auto-lineup '(all) |
| 236 | "List of contexts where auto lineup of :'s or ='s should be done. | 230 | "List of contexts where auto lineup of :'s or ='s should be done. |
| @@ -243,8 +237,7 @@ will do all lineups." | |||
| 243 | (const :tag "Everything" all) | 237 | (const :tag "Everything" all) |
| 244 | (const :tag "Parameter lists" paramlist) | 238 | (const :tag "Parameter lists" paramlist) |
| 245 | (const :tag "Declarations" declaration) | 239 | (const :tag "Declarations" declaration) |
| 246 | (const :tag "Case statements" case)) | 240 | (const :tag "Case statements" case))) |
| 247 | :group 'pascal) | ||
| 248 | 241 | ||
| 249 | (defvar pascal-toggle-completions nil | 242 | (defvar pascal-toggle-completions nil |
| 250 | "If non-nil, `pascal-complete-word' tries all possible completions. | 243 | "If non-nil, `pascal-complete-word' tries all possible completions. |
| @@ -260,8 +253,7 @@ completions.") | |||
| 260 | These include integer, real, char, etc. | 253 | These include integer, real, char, etc. |
| 261 | The types defined within the Pascal program | 254 | The types defined within the Pascal program |
| 262 | are handled in another way, and should not be added to this list." | 255 | are handled in another way, and should not be added to this list." |
| 263 | :type '(repeat (string :tag "Keyword")) | 256 | :type '(repeat (string :tag "Keyword"))) |
| 264 | :group 'pascal) | ||
| 265 | 257 | ||
| 266 | (defcustom pascal-start-keywords | 258 | (defcustom pascal-start-keywords |
| 267 | '("begin" "end" "function" "procedure" "repeat" "until" "while" | 259 | '("begin" "end" "function" "procedure" "repeat" "until" "while" |
| @@ -270,8 +262,7 @@ are handled in another way, and should not be added to this list." | |||
| 270 | These are keywords such as begin, repeat, until, readln. | 262 | These are keywords such as begin, repeat, until, readln. |
| 271 | The procedures and variables defined within the Pascal program | 263 | The procedures and variables defined within the Pascal program |
| 272 | are handled in another way, and should not be added to this list." | 264 | are handled in another way, and should not be added to this list." |
| 273 | :type '(repeat (string :tag "Keyword")) | 265 | :type '(repeat (string :tag "Keyword"))) |
| 274 | :group 'pascal) | ||
| 275 | 266 | ||
| 276 | (defcustom pascal-separator-keywords | 267 | (defcustom pascal-separator-keywords |
| 277 | '("downto" "else" "mod" "div" "then") | 268 | '("downto" "else" "mod" "div" "then") |
| @@ -279,8 +270,7 @@ are handled in another way, and should not be added to this list." | |||
| 279 | These are keywords such as downto, else, mod, then. | 270 | These are keywords such as downto, else, mod, then. |
| 280 | Variables and function names defined within the Pascal program | 271 | Variables and function names defined within the Pascal program |
| 281 | are handled in another way, and should not be added to this list." | 272 | are handled in another way, and should not be added to this list." |
| 282 | :type '(repeat (string :tag "Keyword")) | 273 | :type '(repeat (string :tag "Keyword"))) |
| 283 | :group 'pascal) | ||
| 284 | 274 | ||
| 285 | 275 | ||
| 286 | ;;; | 276 | ;;; |
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index 0120e4a7cd1..c7fa5ab84b0 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el | |||
| @@ -98,8 +98,7 @@ | |||
| 98 | (defface perl-non-scalar-variable | 98 | (defface perl-non-scalar-variable |
| 99 | '((t :inherit font-lock-variable-name-face :underline t)) | 99 | '((t :inherit font-lock-variable-name-face :underline t)) |
| 100 | "Face used for non-scalar variables." | 100 | "Face used for non-scalar variables." |
| 101 | :version "28.1" | 101 | :version "28.1") |
| 102 | :group 'perl) | ||
| 103 | 102 | ||
| 104 | (defvar perl-mode-abbrev-table nil | 103 | (defvar perl-mode-abbrev-table nil |
| 105 | "Abbrev table in use in perl-mode buffers.") | 104 | "Abbrev table in use in perl-mode buffers.") |
| @@ -640,7 +639,6 @@ This is a non empty list of strings, the checker tool possibly | |||
| 640 | followed by required arguments. Once launched it will receive | 639 | followed by required arguments. Once launched it will receive |
| 641 | the Perl source to be checked as its standard input." | 640 | the Perl source to be checked as its standard input." |
| 642 | :version "26.1" | 641 | :version "26.1" |
| 643 | :group 'perl | ||
| 644 | :type '(repeat string)) | 642 | :type '(repeat string)) |
| 645 | 643 | ||
| 646 | (defvar-local perl--flymake-proc nil) | 644 | (defvar-local perl--flymake-proc nil) |
diff --git a/lisp/progmodes/prog-mode.el b/lisp/progmodes/prog-mode.el index d88d3505586..19de7545bf3 100644 --- a/lisp/progmodes/prog-mode.el +++ b/lisp/progmodes/prog-mode.el | |||
| @@ -41,8 +41,7 @@ | |||
| 41 | :type 'hook | 41 | :type 'hook |
| 42 | :options '(flyspell-prog-mode abbrev-mode flymake-mode | 42 | :options '(flyspell-prog-mode abbrev-mode flymake-mode |
| 43 | display-line-numbers-mode | 43 | display-line-numbers-mode |
| 44 | prettify-symbols-mode) | 44 | prettify-symbols-mode)) |
| 45 | :group 'prog-mode) | ||
| 46 | 45 | ||
| 47 | (defvar prog-mode-map | 46 | (defvar prog-mode-map |
| 48 | (let ((map (make-sparse-keymap))) | 47 | (let ((map (make-sparse-keymap))) |
| @@ -166,8 +165,7 @@ on the symbol." | |||
| 166 | :version "25.1" | 165 | :version "25.1" |
| 167 | :type '(choice (const :tag "Never unprettify" nil) | 166 | :type '(choice (const :tag "Never unprettify" nil) |
| 168 | (const :tag "Unprettify when point is inside" t) | 167 | (const :tag "Unprettify when point is inside" t) |
| 169 | (const :tag "Unprettify when point is inside or at right edge" right-edge)) | 168 | (const :tag "Unprettify when point is inside or at right edge" right-edge))) |
| 170 | :group 'prog-mode) | ||
| 171 | 169 | ||
| 172 | (defun prettify-symbols--post-command-hook () | 170 | (defun prettify-symbols--post-command-hook () |
| 173 | (cl-labels ((get-prop-as-list | 171 | (cl-labels ((get-prop-as-list |
diff --git a/lisp/progmodes/scheme.el b/lisp/progmodes/scheme.el index f610efbfca5..a899de7e594 100644 --- a/lisp/progmodes/scheme.el +++ b/lisp/progmodes/scheme.el | |||
| @@ -215,8 +215,7 @@ Blank lines separate paragraphs. Semicolons start comments. | |||
| 215 | (defcustom scheme-mit-dialect t | 215 | (defcustom scheme-mit-dialect t |
| 216 | "If non-nil, scheme mode is specialized for MIT Scheme. | 216 | "If non-nil, scheme mode is specialized for MIT Scheme. |
| 217 | Set this to nil if you normally use another dialect." | 217 | Set this to nil if you normally use another dialect." |
| 218 | :type 'boolean | 218 | :type 'boolean) |
| 219 | :group 'scheme) | ||
| 220 | 219 | ||
| 221 | (defcustom dsssl-sgml-declaration | 220 | (defcustom dsssl-sgml-declaration |
| 222 | "<!DOCTYPE style-sheet PUBLIC \"-//James Clark//DTD DSSSL Style Sheet//EN\"> | 221 | "<!DOCTYPE style-sheet PUBLIC \"-//James Clark//DTD DSSSL Style Sheet//EN\"> |
| @@ -226,26 +225,22 @@ If it is defined as a string this will be inserted into an empty buffer | |||
| 226 | which is in `dsssl-mode'. It is typically James Clark's style-sheet | 225 | which is in `dsssl-mode'. It is typically James Clark's style-sheet |
| 227 | doctype, as required for Jade." | 226 | doctype, as required for Jade." |
| 228 | :type '(choice (string :tag "Specified string") | 227 | :type '(choice (string :tag "Specified string") |
| 229 | (const :tag "None" :value nil)) | 228 | (const :tag "None" :value nil))) |
| 230 | :group 'scheme) | ||
| 231 | 229 | ||
| 232 | (defcustom scheme-mode-hook nil | 230 | (defcustom scheme-mode-hook nil |
| 233 | "Normal hook run when entering `scheme-mode'. | 231 | "Normal hook run when entering `scheme-mode'. |
| 234 | See `run-hooks'." | 232 | See `run-hooks'." |
| 235 | :type 'hook | 233 | :type 'hook) |
| 236 | :group 'scheme) | ||
| 237 | 234 | ||
| 238 | (defcustom dsssl-mode-hook nil | 235 | (defcustom dsssl-mode-hook nil |
| 239 | "Normal hook run when entering `dsssl-mode'. | 236 | "Normal hook run when entering `dsssl-mode'. |
| 240 | See `run-hooks'." | 237 | See `run-hooks'." |
| 241 | :type 'hook | 238 | :type 'hook) |
| 242 | :group 'scheme) | ||
| 243 | 239 | ||
| 244 | ;; This is shared by cmuscheme and xscheme. | 240 | ;; This is shared by cmuscheme and xscheme. |
| 245 | (defcustom scheme-program-name "scheme" | 241 | (defcustom scheme-program-name "scheme" |
| 246 | "Program invoked by the `run-scheme' command." | 242 | "Program invoked by the `run-scheme' command." |
| 247 | :type 'string | 243 | :type 'string) |
| 248 | :group 'scheme) | ||
| 249 | 244 | ||
| 250 | (defvar dsssl-imenu-generic-expression | 245 | (defvar dsssl-imenu-generic-expression |
| 251 | ;; Perhaps this should also look for the style-sheet DTD tags. I'm | 246 | ;; Perhaps this should also look for the style-sheet DTD tags. I'm |
| @@ -429,12 +424,10 @@ that variable's value is a string." | |||
| 429 | '(1 font-lock-keyword-face) | 424 | '(1 font-lock-keyword-face) |
| 430 | '(4 font-lock-function-name-face)) | 425 | '(4 font-lock-function-name-face)) |
| 431 | (cons | 426 | (cons |
| 432 | (concat "(\\(" | 427 | (concat "(" (regexp-opt |
| 433 | ;; (make-regexp '("case" "cond" "else" "if" "lambda" | 428 | '("case" "cond" "else" "if" "lambda" |
| 434 | ;; "let" "let*" "letrec" "and" "or" "map" "with-mode")) | 429 | "let" "let*" "letrec" "and" "or" "map" "with-mode") |
| 435 | "and\\|c\\(ase\\|ond\\)\\|else\\|if\\|" | 430 | 'words)) |
| 436 | "l\\(ambda\\|et\\(\\|\\*\\|rec\\)\\)\\|map\\|or\\|with-mode" | ||
| 437 | "\\)\\>") | ||
| 438 | 1) | 431 | 1) |
| 439 | ;; DSSSL syntax | 432 | ;; DSSSL syntax |
| 440 | '("(\\(element\\|mode\\|declare-\\w+\\)\\>[ \t]*\\(\\sw+\\)" | 433 | '("(\\(element\\|mode\\|declare-\\w+\\)\\>[ \t]*\\(\\sw+\\)" |
diff --git a/lisp/progmodes/simula.el b/lisp/progmodes/simula.el index a863e7eb4b4..fab600f83f4 100644 --- a/lisp/progmodes/simula.el +++ b/lisp/progmodes/simula.el | |||
| @@ -51,16 +51,14 @@ the run of whitespace at the beginning of the line.") | |||
| 51 | "Non-nil means TAB in SIMULA mode should always reindent the current line. | 51 | "Non-nil means TAB in SIMULA mode should always reindent the current line. |
| 52 | Otherwise TAB indents only when point is within | 52 | Otherwise TAB indents only when point is within |
| 53 | the run of whitespace at the beginning of the line." | 53 | the run of whitespace at the beginning of the line." |
| 54 | :type 'boolean | 54 | :type 'boolean) |
| 55 | :group 'simula) | ||
| 56 | 55 | ||
| 57 | (defconst simula-indent-level-default 3 | 56 | (defconst simula-indent-level-default 3 |
| 58 | "Indentation of SIMULA statements with respect to containing block.") | 57 | "Indentation of SIMULA statements with respect to containing block.") |
| 59 | 58 | ||
| 60 | (defcustom simula-indent-level simula-indent-level-default | 59 | (defcustom simula-indent-level simula-indent-level-default |
| 61 | "Indentation of SIMULA statements with respect to containing block." | 60 | "Indentation of SIMULA statements with respect to containing block." |
| 62 | :type 'integer | 61 | :type 'integer) |
| 63 | :group 'simula) | ||
| 64 | 62 | ||
| 65 | 63 | ||
| 66 | (defconst simula-substatement-offset-default 3 | 64 | (defconst simula-substatement-offset-default 3 |
| @@ -68,8 +66,7 @@ the run of whitespace at the beginning of the line." | |||
| 68 | 66 | ||
| 69 | (defcustom simula-substatement-offset simula-substatement-offset-default | 67 | (defcustom simula-substatement-offset simula-substatement-offset-default |
| 70 | "Extra indentation after DO, THEN, ELSE, WHEN and OTHERWISE." | 68 | "Extra indentation after DO, THEN, ELSE, WHEN and OTHERWISE." |
| 71 | :type 'integer | 69 | :type 'integer) |
| 72 | :group 'simula) | ||
| 73 | 70 | ||
| 74 | (defconst simula-continued-statement-offset-default 3 | 71 | (defconst simula-continued-statement-offset-default 3 |
| 75 | "Extra indentation for lines not starting a statement or substatement. | 72 | "Extra indentation for lines not starting a statement or substatement. |
| @@ -83,16 +80,14 @@ the previous line of the statement.") | |||
| 83 | If value is a list, each line in a multipleline continued statement | 80 | If value is a list, each line in a multipleline continued statement |
| 84 | will have the car of the list extra indentation with respect to | 81 | will have the car of the list extra indentation with respect to |
| 85 | the previous line of the statement." | 82 | the previous line of the statement." |
| 86 | :type 'integer | 83 | :type 'integer) |
| 87 | :group 'simula) | ||
| 88 | 84 | ||
| 89 | (defconst simula-label-offset-default -4711 | 85 | (defconst simula-label-offset-default -4711 |
| 90 | "Offset of SIMULA label lines relative to usual indentation.") | 86 | "Offset of SIMULA label lines relative to usual indentation.") |
| 91 | 87 | ||
| 92 | (defcustom simula-label-offset simula-label-offset-default | 88 | (defcustom simula-label-offset simula-label-offset-default |
| 93 | "Offset of SIMULA label lines relative to usual indentation." | 89 | "Offset of SIMULA label lines relative to usual indentation." |
| 94 | :type 'integer | 90 | :type 'integer) |
| 95 | :group 'simula) | ||
| 96 | 91 | ||
| 97 | (defconst simula-if-indent-default '(0 . 0) | 92 | (defconst simula-if-indent-default '(0 . 0) |
| 98 | "Extra indentation of THEN and ELSE with respect to the starting IF. | 93 | "Extra indentation of THEN and ELSE with respect to the starting IF. |
| @@ -103,8 +98,7 @@ extra ELSE indentation. IF after ELSE is indented as the starting IF.") | |||
| 103 | "Extra indentation of THEN and ELSE with respect to the starting IF. | 98 | "Extra indentation of THEN and ELSE with respect to the starting IF. |
| 104 | Value is a cons cell, the car is extra THEN indentation and the cdr | 99 | Value is a cons cell, the car is extra THEN indentation and the cdr |
| 105 | extra ELSE indentation. IF after ELSE is indented as the starting IF." | 100 | extra ELSE indentation. IF after ELSE is indented as the starting IF." |
| 106 | :type '(cons integer integer) | 101 | :type '(cons integer integer)) |
| 107 | :group 'simula) | ||
| 108 | 102 | ||
| 109 | (defconst simula-inspect-indent-default '(0 . 0) | 103 | (defconst simula-inspect-indent-default '(0 . 0) |
| 110 | "Extra indentation of WHEN and OTHERWISE with respect to the INSPECT. | 104 | "Extra indentation of WHEN and OTHERWISE with respect to the INSPECT. |
| @@ -115,16 +109,14 @@ and the cdr extra OTHERWISE indentation.") | |||
| 115 | "Extra indentation of WHEN and OTHERWISE with respect to the INSPECT. | 109 | "Extra indentation of WHEN and OTHERWISE with respect to the INSPECT. |
| 116 | Value is a cons cell, the car is extra WHEN indentation | 110 | Value is a cons cell, the car is extra WHEN indentation |
| 117 | and the cdr extra OTHERWISE indentation." | 111 | and the cdr extra OTHERWISE indentation." |
| 118 | :type '(cons integer integer) | 112 | :type '(cons integer integer)) |
| 119 | :group 'simula) | ||
| 120 | 113 | ||
| 121 | (defconst simula-electric-indent-default nil | 114 | (defconst simula-electric-indent-default nil |
| 122 | "Non-nil means `simula-indent-line' function may reindent previous line.") | 115 | "Non-nil means `simula-indent-line' function may reindent previous line.") |
| 123 | 116 | ||
| 124 | (defcustom simula-electric-indent simula-electric-indent-default | 117 | (defcustom simula-electric-indent simula-electric-indent-default |
| 125 | "Non-nil means `simula-indent-line' function may reindent previous line." | 118 | "Non-nil means `simula-indent-line' function may reindent previous line." |
| 126 | :type 'boolean | 119 | :type 'boolean) |
| 127 | :group 'simula) | ||
| 128 | 120 | ||
| 129 | (defconst simula-abbrev-keyword-default 'upcase | 121 | (defconst simula-abbrev-keyword-default 'upcase |
| 130 | "Specify how to convert case for SIMULA keywords. | 122 | "Specify how to convert case for SIMULA keywords. |
| @@ -135,8 +127,7 @@ Value is one of the symbols `upcase', `downcase', `capitalize', | |||
| 135 | "Specify how to convert case for SIMULA keywords. | 127 | "Specify how to convert case for SIMULA keywords. |
| 136 | Value is one of the symbols `upcase', `downcase', `capitalize', | 128 | Value is one of the symbols `upcase', `downcase', `capitalize', |
| 137 | \(as in) `abbrev-table' or nil if they should not be changed." | 129 | \(as in) `abbrev-table' or nil if they should not be changed." |
| 138 | :type '(choice (const upcase) (const downcase) (const capitalize)(const nil)) | 130 | :type '(choice (const upcase) (const downcase) (const capitalize)(const nil))) |
| 139 | :group 'simula) | ||
| 140 | 131 | ||
| 141 | (defconst simula-abbrev-stdproc-default 'abbrev-table | 132 | (defconst simula-abbrev-stdproc-default 'abbrev-table |
| 142 | "Specify how to convert case for standard SIMULA procedure and class names. | 133 | "Specify how to convert case for standard SIMULA procedure and class names. |
| @@ -148,16 +139,14 @@ Value is one of the symbols `upcase', `downcase', `capitalize', | |||
| 148 | Value is one of the symbols `upcase', `downcase', `capitalize', | 139 | Value is one of the symbols `upcase', `downcase', `capitalize', |
| 149 | \(as in) `abbrev-table', or nil if they should not be changed." | 140 | \(as in) `abbrev-table', or nil if they should not be changed." |
| 150 | :type '(choice (const upcase) (const downcase) (const capitalize) | 141 | :type '(choice (const upcase) (const downcase) (const capitalize) |
| 151 | (const abbrev-table) (const nil)) | 142 | (const abbrev-table) (const nil))) |
| 152 | :group 'simula) | ||
| 153 | 143 | ||
| 154 | (defcustom simula-abbrev-file nil | 144 | (defcustom simula-abbrev-file nil |
| 155 | "File with extra abbrev definitions for use in SIMULA mode. | 145 | "File with extra abbrev definitions for use in SIMULA mode. |
| 156 | These are used together with the standard abbrev definitions for SIMULA. | 146 | These are used together with the standard abbrev definitions for SIMULA. |
| 157 | Please note that the standard definitions are required | 147 | Please note that the standard definitions are required |
| 158 | for SIMULA mode to function correctly." | 148 | for SIMULA mode to function correctly." |
| 159 | :type '(choice file (const nil)) | 149 | :type '(choice file (const nil))) |
| 160 | :group 'simula) | ||
| 161 | 150 | ||
| 162 | (defvar simula-mode-syntax-table nil | 151 | (defvar simula-mode-syntax-table nil |
| 163 | "Syntax table in SIMULA mode buffers.") | 152 | "Syntax table in SIMULA mode buffers.") |
diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el index 0a0118a5eba..82e1343e057 100644 --- a/lisp/progmodes/tcl.el +++ b/lisp/progmodes/tcl.el | |||
| @@ -651,7 +651,6 @@ already exist." | |||
| 651 | (setq-local add-log-current-defun-function | 651 | (setq-local add-log-current-defun-function |
| 652 | #'tcl-add-log-defun) | 652 | #'tcl-add-log-defun) |
| 653 | 653 | ||
| 654 | (setq-local beginning-of-defun-function #'tcl-beginning-of-defun-function) | ||
| 655 | (setq-local end-of-defun-function #'tcl-end-of-defun-function)) | 654 | (setq-local end-of-defun-function #'tcl-end-of-defun-function)) |
| 656 | 655 | ||
| 657 | 656 | ||
| @@ -849,14 +848,12 @@ Returns nil if line starts inside a string, t if in a comment." | |||
| 849 | state | 848 | state |
| 850 | containing-sexp | 849 | containing-sexp |
| 851 | found-next-line) | 850 | found-next-line) |
| 852 | (cond | 851 | |
| 853 | (parse-start | 852 | (if parse-start |
| 854 | (goto-char parse-start)) | 853 | (goto-char parse-start)) |
| 855 | ((not (beginning-of-defun)) | 854 | |
| 856 | ;; If we're not in a function, don't use | 855 | (beginning-of-defun) |
| 857 | ;; `tcl-beginning-of-defun-function'. | 856 | |
| 858 | (let ((beginning-of-defun-function nil)) | ||
| 859 | (beginning-of-defun)))) | ||
| 860 | (while (< (point) indent-point) | 857 | (while (< (point) indent-point) |
| 861 | (setq parse-start (point)) | 858 | (setq parse-start (point)) |
| 862 | (setq state (parse-partial-sexp (point) indent-point 0)) | 859 | (setq state (parse-partial-sexp (point) indent-point 0)) |
| @@ -1035,22 +1032,6 @@ Returns nil if line starts inside a string, t if in a comment." | |||
| 1035 | ;; Interfaces to other packages. | 1032 | ;; Interfaces to other packages. |
| 1036 | ;; | 1033 | ;; |
| 1037 | 1034 | ||
| 1038 | (defun tcl-beginning-of-defun-function (&optional arg) | ||
| 1039 | "`beginning-of-defun-function' for Tcl mode." | ||
| 1040 | (when (or (not arg) (= arg 0)) | ||
| 1041 | (setq arg 1)) | ||
| 1042 | (let* ((search-fn (if (> arg 0) | ||
| 1043 | ;; Positive arg means to search backward. | ||
| 1044 | #'re-search-backward | ||
| 1045 | #'re-search-forward)) | ||
| 1046 | (arg (abs arg)) | ||
| 1047 | (result t)) | ||
| 1048 | (while (and (> arg 0) result) | ||
| 1049 | (unless (funcall search-fn tcl-proc-regexp nil t) | ||
| 1050 | (setq result nil)) | ||
| 1051 | (setq arg (1- arg))) | ||
| 1052 | result)) | ||
| 1053 | |||
| 1054 | (defun tcl-end-of-defun-function () | 1035 | (defun tcl-end-of-defun-function () |
| 1055 | "`end-of-defun-function' for Tcl mode." | 1036 | "`end-of-defun-function' for Tcl mode." |
| 1056 | ;; Because we let users redefine tcl-proc-list, we don't really know | 1037 | ;; Because we let users redefine tcl-proc-list, we don't really know |
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index f934ef7a80e..55c04e13323 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el | |||
| @@ -134,7 +134,7 @@ | |||
| 134 | (interactive) | 134 | (interactive) |
| 135 | (message "Using verilog-mode version %s" verilog-mode-version)) | 135 | (message "Using verilog-mode version %s" verilog-mode-version)) |
| 136 | 136 | ||
| 137 | (defmacro verilog--supressed-warnings (warnings &rest body) | 137 | (defmacro verilog--suppressed-warnings (warnings &rest body) |
| 138 | (declare (indent 1) (debug t)) | 138 | (declare (indent 1) (debug t)) |
| 139 | (cond | 139 | (cond |
| 140 | ((fboundp 'with-suppressed-warnings) | 140 | ((fboundp 'with-suppressed-warnings) |
| @@ -5550,7 +5550,7 @@ FILENAME to find directory to run in, or defaults to `buffer-file-name'." | |||
| 5550 | ;; font-lock-fontify-buffer, but IIUC the problem this is supposed to | 5550 | ;; font-lock-fontify-buffer, but IIUC the problem this is supposed to |
| 5551 | ;; solve only appears in Emacsen older than font-lock-ensure anyway. | 5551 | ;; solve only appears in Emacsen older than font-lock-ensure anyway. |
| 5552 | (when fontlocked | 5552 | (when fontlocked |
| 5553 | (verilog--supressed-warnings | 5553 | (verilog--suppressed-warnings |
| 5554 | ((interactive-only font-lock-fontify-buffer)) | 5554 | ((interactive-only font-lock-fontify-buffer)) |
| 5555 | (font-lock-fontify-buffer)))))))) | 5555 | (font-lock-fontify-buffer)))))))) |
| 5556 | 5556 | ||
diff --git a/lisp/progmodes/xscheme.el b/lisp/progmodes/xscheme.el index e85e3cfdbbd..613863dd613 100644 --- a/lisp/progmodes/xscheme.el +++ b/lisp/progmodes/xscheme.el | |||
| @@ -104,20 +104,17 @@ reading-string reading prompt string") | |||
| 104 | 104 | ||
| 105 | (defcustom scheme-band-name nil | 105 | (defcustom scheme-band-name nil |
| 106 | "Band loaded by the `run-scheme' command." | 106 | "Band loaded by the `run-scheme' command." |
| 107 | :type '(choice (const nil) string) | 107 | :type '(choice (const nil) string)) |
| 108 | :group 'xscheme) | ||
| 109 | 108 | ||
| 110 | (defcustom scheme-program-arguments nil | 109 | (defcustom scheme-program-arguments nil |
| 111 | "Arguments passed to the Scheme program by the `run-scheme' command." | 110 | "Arguments passed to the Scheme program by the `run-scheme' command." |
| 112 | :type '(choice (const nil) string) | 111 | :type '(choice (const nil) string)) |
| 113 | :group 'xscheme) | ||
| 114 | 112 | ||
| 115 | (defcustom xscheme-allow-pipelined-evaluation t | 113 | (defcustom xscheme-allow-pipelined-evaluation t |
| 116 | "If non-nil, an expression may be transmitted while another is evaluating. | 114 | "If non-nil, an expression may be transmitted while another is evaluating. |
| 117 | Otherwise, attempting to evaluate an expression before the previous expression | 115 | Otherwise, attempting to evaluate an expression before the previous expression |
| 118 | has finished evaluating will signal an error." | 116 | has finished evaluating will signal an error." |
| 119 | :type 'boolean | 117 | :type 'boolean) |
| 120 | :group 'xscheme) | ||
| 121 | 118 | ||
| 122 | (defcustom xscheme-startup-message | 119 | (defcustom xscheme-startup-message |
| 123 | "This is the Scheme process buffer. | 120 | "This is the Scheme process buffer. |
| @@ -128,19 +125,16 @@ Type \\[describe-mode] for more information. | |||
| 128 | " | 125 | " |
| 129 | "String to insert into Scheme process buffer first time it is started. | 126 | "String to insert into Scheme process buffer first time it is started. |
| 130 | Is processed with `substitute-command-keys' first." | 127 | Is processed with `substitute-command-keys' first." |
| 131 | :type 'string | 128 | :type 'string) |
| 132 | :group 'xscheme) | ||
| 133 | 129 | ||
| 134 | (defcustom xscheme-signal-death-message nil | 130 | (defcustom xscheme-signal-death-message nil |
| 135 | "If non-nil, causes a message to be generated when the Scheme process dies." | 131 | "If non-nil, causes a message to be generated when the Scheme process dies." |
| 136 | :type 'boolean | 132 | :type 'boolean) |
| 137 | :group 'xscheme) | ||
| 138 | 133 | ||
| 139 | (defcustom xscheme-start-hook nil | 134 | (defcustom xscheme-start-hook nil |
| 140 | "If non-nil, a procedure to call when the Scheme process is started. | 135 | "If non-nil, a procedure to call when the Scheme process is started. |
| 141 | When called, the current buffer will be the Scheme process-buffer." | 136 | When called, the current buffer will be the Scheme process-buffer." |
| 142 | :type 'hook | 137 | :type 'hook |
| 143 | :group 'xscheme | ||
| 144 | :version "20.3") | 138 | :version "20.3") |
| 145 | 139 | ||
| 146 | (defun xscheme-evaluation-commands (keymap) | 140 | (defun xscheme-evaluation-commands (keymap) |