diff options
| author | Stefan Monnier | 2021-01-28 18:10:29 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2021-01-28 18:10:29 -0500 |
| commit | 887b03386fd5925ef5d74404ee6cc18e2257cff6 (patch) | |
| tree | 89a76efcf675e6debc5231953d8f40b0bdd7ea22 | |
| parent | 991c8946b6e9c87403dc2691100566cb98577de1 (diff) | |
| parent | cb97581870cb1e3c211e4cead5f14f6cb67e4c8f (diff) | |
| download | emacs-887b03386fd5925ef5d74404ee6cc18e2257cff6.tar.gz emacs-887b03386fd5925ef5d74404ee6cc18e2257cff6.zip | |
Merge branch 'master' of git+ssh://git.sv.gnu.org/srv/git/emacs into trunk
| -rw-r--r-- | lisp/generic-x.el | 37 | ||||
| -rw-r--r-- | lisp/progmodes/bat-mode.el | 2 | ||||
| -rw-r--r-- | lisp/textmodes/nroff-mode.el | 9 |
3 files changed, 18 insertions, 30 deletions
diff --git a/lisp/generic-x.el b/lisp/generic-x.el index bd03f287fc7..4c6e1189003 100644 --- a/lisp/generic-x.el +++ b/lisp/generic-x.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; generic-x.el --- A collection of generic modes | 1 | ;;; generic-x.el --- A collection of generic modes -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1997-1998, 2001-2021 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1997-1998, 2001-2021 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -121,14 +121,12 @@ | |||
| 121 | "If non-nil, add a hook to enter `default-generic-mode' automatically. | 121 | "If non-nil, add a hook to enter `default-generic-mode' automatically. |
| 122 | This is done if the first few lines of a file in fundamental mode | 122 | This is done if the first few lines of a file in fundamental mode |
| 123 | start with a hash comment character." | 123 | start with a hash comment character." |
| 124 | :group 'generic-x | ||
| 125 | :type 'boolean) | 124 | :type 'boolean) |
| 126 | 125 | ||
| 127 | (defcustom generic-lines-to-scan 3 | 126 | (defcustom generic-lines-to-scan 3 |
| 128 | "Number of lines that `generic-mode-find-file-hook' looks at. | 127 | "Number of lines that `generic-mode-find-file-hook' looks at. |
| 129 | Relevant when deciding whether to enter Default-Generic mode automatically. | 128 | Relevant when deciding whether to enter Default-Generic mode automatically. |
| 130 | This variable should be set to a small positive number." | 129 | This variable should be set to a small positive number." |
| 131 | :group 'generic-x | ||
| 132 | :type 'integer) | 130 | :type 'integer) |
| 133 | 131 | ||
| 134 | (defcustom generic-find-file-regexp "^#" | 132 | (defcustom generic-find-file-regexp "^#" |
| @@ -137,7 +135,6 @@ Files in fundamental mode whose first few lines contain a match | |||
| 137 | for this regexp, should be put into Default-Generic mode instead. | 135 | for this regexp, should be put into Default-Generic mode instead. |
| 138 | The number of lines tested for the matches is specified by the | 136 | The number of lines tested for the matches is specified by the |
| 139 | value of the variable `generic-lines-to-scan', which see." | 137 | value of the variable `generic-lines-to-scan', which see." |
| 140 | :group 'generic-x | ||
| 141 | :type 'regexp) | 138 | :type 'regexp) |
| 142 | 139 | ||
| 143 | (defcustom generic-ignore-files-regexp "[Tt][Aa][Gg][Ss]\\'" | 140 | (defcustom generic-ignore-files-regexp "[Tt][Aa][Gg][Ss]\\'" |
| @@ -146,7 +143,6 @@ Files whose names match this regular expression should not be put | |||
| 146 | into Default-Generic mode, even if they have lines which match | 143 | into Default-Generic mode, even if they have lines which match |
| 147 | the regexp in `generic-find-file-regexp'. If the value is nil, | 144 | the regexp in `generic-find-file-regexp'. If the value is nil, |
| 148 | `generic-mode-find-file-hook' does not check the file names." | 145 | `generic-mode-find-file-hook' does not check the file names." |
| 149 | :group 'generic-x | ||
| 150 | :type '(choice (const :tag "Don't check file names" nil) regexp)) | 146 | :type '(choice (const :tag "Don't check file names" nil) regexp)) |
| 151 | 147 | ||
| 152 | ;; This generic mode is always defined | 148 | ;; This generic mode is always defined |
| @@ -249,7 +245,6 @@ This hook will be installed if the variable | |||
| 249 | Each entry in the list should be a symbol. If you set this variable | 245 | Each entry in the list should be a symbol. If you set this variable |
| 250 | directly, without using customize, you must reload generic-x to put | 246 | directly, without using customize, you must reload generic-x to put |
| 251 | your changes into effect." | 247 | your changes into effect." |
| 252 | :group 'generic-x | ||
| 253 | :type (let (list) | 248 | :type (let (list) |
| 254 | (dolist (mode | 249 | (dolist (mode |
| 255 | (sort (append generic-default-modes | 250 | (sort (append generic-default-modes |
| @@ -416,7 +411,8 @@ like an INI file. You can add this hook to `find-file-hook'." | |||
| 416 | (goto-char (point-min)) | 411 | (goto-char (point-min)) |
| 417 | (and (looking-at "^\\s-*\\[.*\\]") | 412 | (and (looking-at "^\\s-*\\[.*\\]") |
| 418 | (ini-generic-mode))))) | 413 | (ini-generic-mode))))) |
| 419 | (defalias 'generic-mode-ini-file-find-file-hook 'ini-generic-mode-find-file-hook)) | 414 | (define-obsolete-function-alias 'generic-mode-ini-file-find-file-hook |
| 415 | 'ini-generic-mode-find-file-hook "28.1")) | ||
| 420 | 416 | ||
| 421 | ;;; Windows REG files | 417 | ;;; Windows REG files |
| 422 | ;;; Unfortunately, Windows 95 and Windows NT have different REG file syntax! | 418 | ;;; Unfortunately, Windows 95 and Windows NT have different REG file syntax! |
| @@ -1297,19 +1293,16 @@ like an INI file. You can add this hook to `find-file-hook'." | |||
| 1297 | 1293 | ||
| 1298 | ;; here manually instead | 1294 | ;; here manually instead |
| 1299 | (defun generic-rul-mode-setup-function () | 1295 | (defun generic-rul-mode-setup-function () |
| 1300 | (make-local-variable 'parse-sexp-ignore-comments) | ||
| 1301 | (make-local-variable 'comment-start) | ||
| 1302 | (make-local-variable 'comment-start-skip) | 1296 | (make-local-variable 'comment-start-skip) |
| 1303 | (make-local-variable 'comment-end) | ||
| 1304 | (setq imenu-generic-expression | 1297 | (setq imenu-generic-expression |
| 1305 | '((nil "^function\\s-+\\([A-Za-z0-9_]+\\)" 1)) | 1298 | '((nil "^function\\s-+\\([A-Za-z0-9_]+\\)" 1))) |
| 1306 | parse-sexp-ignore-comments t | 1299 | (setq-local parse-sexp-ignore-comments t |
| 1307 | comment-end "*/" | 1300 | comment-end "*/" |
| 1308 | comment-start "/*" | 1301 | comment-start "/*" |
| 1309 | ;;; comment-end "" | 1302 | ;;; comment-end "" |
| 1310 | ;;; comment-start "//" | 1303 | ;;; comment-start "//" |
| 1311 | ;;; comment-start-skip "" | 1304 | ;;; comment-start-skip "" |
| 1312 | ) | 1305 | ) |
| 1313 | ;; (set-syntax-table rul-generic-mode-syntax-table) | 1306 | ;; (set-syntax-table rul-generic-mode-syntax-table) |
| 1314 | (setq-local font-lock-syntax-table rul-generic-mode-syntax-table)) | 1307 | (setq-local font-lock-syntax-table rul-generic-mode-syntax-table)) |
| 1315 | 1308 | ||
| @@ -1459,7 +1452,7 @@ like an INI file. You can add this hook to `find-file-hook'." | |||
| 1459 | ":" | 1452 | ":" |
| 1460 | ;; Password, UID and GID | 1453 | ;; Password, UID and GID |
| 1461 | (mapconcat | 1454 | (mapconcat |
| 1462 | 'identity | 1455 | #'identity |
| 1463 | (make-list 3 "\\([^:]+\\)") | 1456 | (make-list 3 "\\([^:]+\\)") |
| 1464 | ":") | 1457 | ":") |
| 1465 | ":" | 1458 | ":" |
| @@ -1639,8 +1632,7 @@ like an INI file. You can add this hook to `find-file-hook'." | |||
| 1639 | (((class color) (min-colors 88)) (:background "red1")) | 1632 | (((class color) (min-colors 88)) (:background "red1")) |
| 1640 | (((class color)) (:background "red")) | 1633 | (((class color)) (:background "red")) |
| 1641 | (t (:weight bold))) | 1634 | (t (:weight bold))) |
| 1642 | "Font Lock mode face used to highlight TABs." | 1635 | "Font Lock mode face used to highlight TABs.") |
| 1643 | :group 'generic-x) | ||
| 1644 | 1636 | ||
| 1645 | (defface show-tabs-space | 1637 | (defface show-tabs-space |
| 1646 | '((((class grayscale) (background light)) (:background "DimGray" :weight bold)) | 1638 | '((((class grayscale) (background light)) (:background "DimGray" :weight bold)) |
| @@ -1648,8 +1640,7 @@ like an INI file. You can add this hook to `find-file-hook'." | |||
| 1648 | (((class color) (min-colors 88)) (:background "yellow1")) | 1640 | (((class color) (min-colors 88)) (:background "yellow1")) |
| 1649 | (((class color)) (:background "yellow")) | 1641 | (((class color)) (:background "yellow")) |
| 1650 | (t (:weight bold))) | 1642 | (t (:weight bold))) |
| 1651 | "Font Lock mode face used to highlight spaces." | 1643 | "Font Lock mode face used to highlight spaces.") |
| 1652 | :group 'generic-x) | ||
| 1653 | 1644 | ||
| 1654 | (define-generic-mode show-tabs-generic-mode | 1645 | (define-generic-mode show-tabs-generic-mode |
| 1655 | nil ;; no comment char | 1646 | nil ;; no comment char |
diff --git a/lisp/progmodes/bat-mode.el b/lisp/progmodes/bat-mode.el index 44295c3f679..7ba8a69775e 100644 --- a/lisp/progmodes/bat-mode.el +++ b/lisp/progmodes/bat-mode.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; bat-mode.el --- Major mode for editing DOS/Windows scripts | 1 | ;;; bat-mode.el --- Major mode for editing DOS/Windows scripts -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2003, 2008-2021 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2003, 2008-2021 Free Software Foundation, Inc. |
| 4 | 4 | ||
diff --git a/lisp/textmodes/nroff-mode.el b/lisp/textmodes/nroff-mode.el index 896578513cf..fe70e925b05 100644 --- a/lisp/textmodes/nroff-mode.el +++ b/lisp/textmodes/nroff-mode.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; nroff-mode.el --- GNU Emacs major mode for editing nroff source | 1 | ;;; nroff-mode.el --- GNU Emacs major mode for editing nroff source -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985-1986, 1994-1995, 1997, 2001-2021 Free Software | 3 | ;; Copyright (C) 1985-1986, 1994-1995, 1997, 2001-2021 Free Software |
| 4 | ;; Foundation, Inc. | 4 | ;; Foundation, Inc. |
| @@ -43,7 +43,6 @@ | |||
| 43 | 43 | ||
| 44 | (defcustom nroff-electric-mode nil | 44 | (defcustom nroff-electric-mode nil |
| 45 | "Non-nil means automatically closing requests when you insert an open." | 45 | "Non-nil means automatically closing requests when you insert an open." |
| 46 | :group 'nroff | ||
| 47 | :type 'boolean) | 46 | :type 'boolean) |
| 48 | 47 | ||
| 49 | (defvar nroff-mode-map | 48 | (defvar nroff-mode-map |
| @@ -111,7 +110,7 @@ | |||
| 111 | ;; arguments in common cases, like \f. | 110 | ;; arguments in common cases, like \f. |
| 112 | (concat "\\\\" ; backslash | 111 | (concat "\\\\" ; backslash |
| 113 | "\\(" ; followed by various possibilities | 112 | "\\(" ; followed by various possibilities |
| 114 | (mapconcat 'identity | 113 | (mapconcat #'identity |
| 115 | '("[f*n]*\\[.+?]" ; some groff extensions | 114 | '("[f*n]*\\[.+?]" ; some groff extensions |
| 116 | "(.." ; two chars after ( | 115 | "(.." ; two chars after ( |
| 117 | "[^(\"#]" ; single char escape | 116 | "[^(\"#]" ; single char escape |
| @@ -119,13 +118,11 @@ | |||
| 119 | "\\)") | 118 | "\\)") |
| 120 | ) | 119 | ) |
| 121 | "Font-lock highlighting control in `nroff-mode'." | 120 | "Font-lock highlighting control in `nroff-mode'." |
| 122 | :group 'nroff | ||
| 123 | :type '(repeat regexp)) | 121 | :type '(repeat regexp)) |
| 124 | 122 | ||
| 125 | (defcustom nroff-mode-hook nil | 123 | (defcustom nroff-mode-hook nil |
| 126 | "Hook run by function `nroff-mode'." | 124 | "Hook run by function `nroff-mode'." |
| 127 | :type 'hook | 125 | :type 'hook) |
| 128 | :group 'nroff) | ||
| 129 | 126 | ||
| 130 | ;;;###autoload | 127 | ;;;###autoload |
| 131 | (define-derived-mode nroff-mode text-mode "Nroff" | 128 | (define-derived-mode nroff-mode text-mode "Nroff" |