aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorDmitry Gutov2022-08-15 02:22:59 +0300
committerDmitry Gutov2022-08-15 02:22:59 +0300
commitee3a674c7c9e39fe7ff296ce1f9830fc45520de8 (patch)
treee8ba1e7be54314f208454e80e3d31044c913f3eb /lisp/progmodes
parentfe0e53d963899a16e0dd1bbc1ba10a6b59f7989e (diff)
parent0a8e88fd83db5398d36064a7f87cff5b57da7284 (diff)
downloademacs-scratch/font_lock_large_files.tar.gz
emacs-scratch/font_lock_large_files.zip
Merge branch 'master' into scratch/font_lock_large_filesscratch/font_lock_large_files
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/ebnf2ps.el51
-rw-r--r--lisp/progmodes/f90.el7
-rw-r--r--lisp/progmodes/gdb-mi.el28
-rw-r--r--lisp/progmodes/gud.el13
-rw-r--r--lisp/progmodes/js.el7
-rw-r--r--lisp/progmodes/ps-mode.el8
6 files changed, 50 insertions, 64 deletions
diff --git a/lisp/progmodes/ebnf2ps.el b/lisp/progmodes/ebnf2ps.el
index e19726a7eab..6e42da2d54f 100644
--- a/lisp/progmodes/ebnf2ps.el
+++ b/lisp/progmodes/ebnf2ps.el
@@ -4,7 +4,7 @@
4 4
5;; Author: Vinicius Jose Latorre <viniciusjl.gnu@gmail.com> 5;; Author: Vinicius Jose Latorre <viniciusjl.gnu@gmail.com>
6;; Keywords: wp, ebnf, PostScript 6;; Keywords: wp, ebnf, PostScript
7;; Version: 4.4 7;; Old-Version: 4.4
8;; URL: https://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre 8;; URL: https://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
@@ -22,16 +22,6 @@
22;; You should have received a copy of the GNU General Public License 22;; You should have received a copy of the GNU General Public License
23;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. 23;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
24 24
25(defconst ebnf-version "4.4"
26 "ebnf2ps.el, v 4.4 <2007/02/12 vinicius>
27
28Vinicius's last change version. When reporting bugs, please also
29report the version of Emacs, if any, that ebnf2ps was running with.
30
31Please send all bug fixes and enhancements to
32 Vinicius Jose Latorre <viniciusjl.gnu@gmail.com>.")
33
34
35;;; Commentary: 25;;; Commentary:
36 26
37;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 27;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -45,20 +35,12 @@ Please send all bug fixes and enhancements to
45;; 35;;
46;; (require 'ebnf2ps) 36;; (require 'ebnf2ps)
47;; 37;;
48;; ebnf2ps uses ps-print package (version 5.2.3 or later), so see ps-print to 38;; ebnf2ps uses ps-print package (bundled with Emacs), so see ps-print to
49;; know how to set options like landscape printing, page headings, margins, 39;; know how to set options like landscape printing, page headings, margins,
50;; etc. 40;; etc.
51;; 41;;
52;; NOTE: ps-print zebra stripes and line number options doesn't have effect on 42;; NOTE: ps-print zebra stripes and line number options don't have an
53;; ebnf2ps, they behave as it's turned off. 43;; effect on ebnf2ps, they behave as if it's turned off.
54;;
55;; For good performance, be sure to byte-compile ebnf2ps.el, e.g.
56;;
57;; M-x byte-compile-file <give the path to ebnf2ps.el when prompted>
58;;
59;; This will generate ebnf2ps.elc, which will be loaded instead of ebnf2ps.el.
60;;
61;; ebnf2ps was tested with GNU Emacs 20.4.1.
62;; 44;;
63;; 45;;
64;; Using ebnf2ps 46;; Using ebnf2ps
@@ -1154,9 +1136,6 @@ Please send all bug fixes and enhancements to
1154(require 'ps-print) 1136(require 'ps-print)
1155(eval-when-compile (require 'cl-lib)) 1137(eval-when-compile (require 'cl-lib))
1156 1138
1157(and (string< ps-print-version "5.2.3")
1158 (error "`ebnf2ps' requires `ps-print' package version 5.2.3 or later"))
1159
1160 1139
1161;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1140;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1162;; User Variables: 1141;; User Variables:
@@ -2455,8 +2434,6 @@ See also `ebnf-syntax-buffer'."
2455 "Return the current ebnf2ps setup." 2434 "Return the current ebnf2ps setup."
2456 (format 2435 (format
2457 " 2436 "
2458;;; ebnf2ps.el version %s
2459
2460;;; Emacs version %S 2437;;; Emacs version %S
2461 2438
2462\(setq ebnf-special-show-delimiter %S 2439\(setq ebnf-special-show-delimiter %S
@@ -2525,7 +2502,6 @@ See also `ebnf-syntax-buffer'."
2525 2502
2526;;; ebnf2ps.el - end of settings 2503;;; ebnf2ps.el - end of settings
2527" 2504"
2528 ebnf-version
2529 emacs-version 2505 emacs-version
2530 ebnf-special-show-delimiter 2506 ebnf-special-show-delimiter
2531 (ps-print-quote ebnf-special-font) 2507 (ps-print-quote ebnf-special-font)
@@ -2958,7 +2934,7 @@ See section \"Actions in Comments\" in ebnf2ps documentation.")
2958 2934
2959 2935
2960(defvar ebnf-eps-file-alist nil 2936(defvar ebnf-eps-file-alist nil
2961"Alist associating file name with EPS header and footer. 2937 "Alist associating file name with EPS header and footer.
2962 2938
2963Each element has the following form: 2939Each element has the following form:
2964 2940
@@ -5242,11 +5218,7 @@ killed after process termination."
5242 (not (search-forward "& ebnf2ps v" 5218 (not (search-forward "& ebnf2ps v"
5243 (line-end-position) 5219 (line-end-position)
5244 t)) 5220 t))
5245 (progn 5221 (progn
5246 ;; adjust creator comment
5247 (end-of-line)
5248 ;; (backward-char)
5249 (insert " & ebnf2ps v" ebnf-version)
5250 ;; insert ebnf settings & engine 5222 ;; insert ebnf settings & engine
5251 (goto-char (point-max)) 5223 (goto-char (point-max))
5252 (search-backward "\n%%EndProlog\n") 5224 (search-backward "\n%%EndProlog\n")
@@ -5272,7 +5244,7 @@ killed after process termination."
5272 (format "%d %d" (1+ ebnf-eps-upper-x) (1+ ebnf-eps-upper-y)) 5244 (format "%d %d" (1+ ebnf-eps-upper-x) (1+ ebnf-eps-upper-y))
5273 "\n%%Title: " filename 5245 "\n%%Title: " filename
5274 "\n%%CreationDate: " (format-time-string "%T %b %d %Y") 5246 "\n%%CreationDate: " (format-time-string "%T %b %d %Y")
5275 "\n%%Creator: " (user-full-name) " (using ebnf2ps v" ebnf-version ")" 5247 "\n%%Creator: " (user-full-name) " (using GNU Emacs " emacs-version ")"
5276 "\n%%DocumentNeededResources: font " 5248 "\n%%DocumentNeededResources: font "
5277 (or ebnf-fonts-required 5249 (or ebnf-fonts-required
5278 (setq ebnf-fonts-required 5250 (setq ebnf-fonts-required
@@ -6350,6 +6322,15 @@ killed after process termination."
6350 6322
6351;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 6323;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6352 6324
6325(defconst ebnf-version "4.4"
6326 "ebnf2ps.el, v 4.4 <2007/02/12 vinicius>
6327
6328Vinicius's last change version. When reporting bugs, please also
6329report the version of Emacs, if any, that ebnf2ps was running with.
6330
6331Please send all bug fixes and enhancements to
6332 bug-gnu-emacs@gnu.org and Vinicius Jose Latorre <viniciusjl.gnu@gmail.com>.")
6333(make-obsolete-variable 'ebnf-version 'emacs-version "29.1")
6353 6334
6354(provide 'ebnf2ps) 6335(provide 'ebnf2ps)
6355 6336
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el
index dcd74f0369c..443281c4f07 100644
--- a/lisp/progmodes/f90.el
+++ b/lisp/progmodes/f90.el
@@ -116,12 +116,11 @@
116;; non-nil, the line numbers are never touched. 116;; non-nil, the line numbers are never touched.
117;; 2) Multi-; statements like "do i=1,20 ; j=j+i ; end do" are not handled 117;; 2) Multi-; statements like "do i=1,20 ; j=j+i ; end do" are not handled
118;; correctly, but I imagine them to be rare. 118;; correctly, but I imagine them to be rare.
119;; 3) Regexps for hilit19 are no longer supported. 119;; 3) For FIXED FORMAT code, use fortran mode.
120;; 4) For FIXED FORMAT code, use fortran mode. 120;; 4) Preprocessor directives, i.e., lines starting with # are left-justified
121;; 5) Preprocessor directives, i.e., lines starting with # are left-justified
122;; and are untouched by all case-changing commands. There is, at present, no 121;; and are untouched by all case-changing commands. There is, at present, no
123;; mechanism for treating multi-line directives (continued by \ ). 122;; mechanism for treating multi-line directives (continued by \ ).
124;; 6) f77 do-loops do 10 i=.. ; ; 10 continue are not correctly indented. 123;; 5) f77 do-loops do 10 i=.. ; ; 10 continue are not correctly indented.
125;; You are urged to use f90-do loops (with labels if you wish). 124;; You are urged to use f90-do loops (with labels if you wish).
126 125
127;; List of user commands 126;; List of user commands
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index 9c2c6405253..c256198b3c1 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -92,6 +92,7 @@
92(require 'cl-seq) 92(require 'cl-seq)
93(require 'bindat) 93(require 'bindat)
94(eval-when-compile (require 'pcase)) 94(eval-when-compile (require 'pcase))
95(require 'subr-x) ; `string-pad'
95 96
96(declare-function speedbar-change-initial-expansion-list 97(declare-function speedbar-change-initial-expansion-list
97 "speedbar" (new-default)) 98 "speedbar" (new-default))
@@ -2511,9 +2512,8 @@ means to decode using the coding-system set for the GDB process."
2511 ;; Record transactions if logging is enabled. 2512 ;; Record transactions if logging is enabled.
2512 (when gdb-enable-debug 2513 (when gdb-enable-debug
2513 (push (cons 'recv string) gdb-debug-log) 2514 (push (cons 'recv string) gdb-debug-log)
2514 (if (and gdb-debug-log-max 2515 (when gdb-debug-log-max
2515 (> (length gdb-debug-log) gdb-debug-log-max)) 2516 (setq gdb-debug-log (ntake gdb-debug-log-max gdb-debug-log))))
2516 (setcdr (nthcdr (1- gdb-debug-log-max) gdb-debug-log) nil)))
2517 2517
2518 ;; Recall the left over gud-marker-acc from last time. 2518 ;; Recall the left over gud-marker-acc from last time.
2519 (setq gud-marker-acc (concat gud-marker-acc string)) 2519 (setq gud-marker-acc (concat gud-marker-acc string))
@@ -2943,7 +2943,8 @@ Return position where LINE begins."
2943 start-posn))) 2943 start-posn)))
2944 2944
2945(defun gdb-pad-string (string padding) 2945(defun gdb-pad-string (string padding)
2946 (format (concat "%" (number-to-string padding) "s") string)) 2946 (declare (obsolete string-pad "29.1"))
2947 (string-pad string padding nil t))
2947 2948
2948;; gdb-table struct is a way to programmatically construct simple 2949;; gdb-table struct is a way to programmatically construct simple
2949;; tables. It help to reliably align columns of data in GDB buffers 2950;; tables. It help to reliably align columns of data in GDB buffers
@@ -2985,13 +2986,13 @@ calling `gdb-table-string'."
2985 "Return TABLE as a string with columns separated with SEP." 2986 "Return TABLE as a string with columns separated with SEP."
2986 (let ((column-sizes (gdb-table-column-sizes table))) 2987 (let ((column-sizes (gdb-table-column-sizes table)))
2987 (mapconcat 2988 (mapconcat
2988 'identity 2989 #'identity
2989 (cl-mapcar 2990 (cl-mapcar
2990 (lambda (row properties) 2991 (lambda (row properties)
2991 (apply 'propertize 2992 (apply #'propertize
2992 (mapconcat 'identity 2993 (mapconcat #'identity
2993 (cl-mapcar (lambda (s x) (gdb-pad-string s x)) 2994 (cl-mapcar (lambda (s x) (string-pad s x nil t))
2994 row column-sizes) 2995 row column-sizes)
2995 sep) 2996 sep)
2996 properties)) 2997 properties))
2997 (gdb-table-rows table) 2998 (gdb-table-rows table)
@@ -3688,10 +3689,11 @@ in `gdb-memory-format'."
3688 (dolist (row memory) 3689 (dolist (row memory)
3689 (insert (concat (gdb-mi--field row 'addr) ":")) 3690 (insert (concat (gdb-mi--field row 'addr) ":"))
3690 (dolist (column (gdb-mi--field row 'data)) 3691 (dolist (column (gdb-mi--field row 'data))
3691 (insert (gdb-pad-string column 3692 (insert (string-pad column
3692 (+ 2 (gdb-memory-column-width 3693 (+ 2 (gdb-memory-column-width
3693 gdb-memory-unit 3694 gdb-memory-unit
3694 gdb-memory-format))))) 3695 gdb-memory-format))
3696 nil t)))
3695 (newline))) 3697 (newline)))
3696 ;; Show last page instead of empty buffer when out of bounds 3698 ;; Show last page instead of empty buffer when out of bounds
3697 (when gdb-memory-last-address 3699 (when gdb-memory-last-address
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index be43effed7d..ccc57205757 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -1577,16 +1577,17 @@ into one that invokes an Emacs-enabled debugging session.
1577 (seen-e nil) 1577 (seen-e nil)
1578 (shift (lambda () (push (pop args) new-args)))) 1578 (shift (lambda () (push (pop args) new-args))))
1579 1579
1580 ;; Pass all switches and -e scripts through. 1580 ;; Pass all switches and -E/-e scripts through.
1581 (while (and args 1581 (while (and args
1582 (string-match "^-" (car args)) 1582 (string-match "^-" (car args))
1583 (not (equal "-" (car args))) 1583 (not (equal "-" (car args)))
1584 (not (equal "--" (car args)))) 1584 (not (equal "--" (car args))))
1585 (when (equal "-e" (car args)) 1585 (when (or (equal "-E" (car args)) (equal "-e" (car args)))
1586 ;; -e goes with the next arg, so shift one extra. 1586 ;; -e goes with the next arg, so shift one extra.
1587 (or (funcall shift) 1587 (funcall shift)
1588 ;; -e as the last arg is an error in Perl. 1588 (or args
1589 (error "No code specified for -e")) 1589 ;; -E (or -e) as the last arg is an error in Perl.
1590 (error "No code specified for %s" (car new-args)))
1590 (setq seen-e t)) 1591 (setq seen-e t))
1591 (funcall shift)) 1592 (funcall shift))
1592 1593
@@ -1697,7 +1698,7 @@ The directory containing the perl program becomes the initial
1697working directory and source-file directory for your debugger." 1698working directory and source-file directory for your debugger."
1698 (interactive 1699 (interactive
1699 (list (gud-query-cmdline 'perldb 1700 (list (gud-query-cmdline 'perldb
1700 (concat (or (buffer-file-name) "-e 0") " ")))) 1701 (concat (or (buffer-file-name) "-E 0") " "))))
1701 1702
1702 (gud-common-init command-line 'gud-perldb-massage-args 1703 (gud-common-init command-line 'gud-perldb-massage-args
1703 'gud-perldb-marker-filter) 1704 'gud-perldb-marker-filter)
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index d2c24a75810..efad3b52aa9 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -3490,9 +3490,10 @@ This function is intended for use in `after-change-functions'."
3490 3490
3491;;;###autoload 3491;;;###autoload
3492(define-derived-mode js-json-mode js-mode "JSON" 3492(define-derived-mode js-json-mode js-mode "JSON"
3493 ;; JSON files can be big. Speed up syntax-ppss. 3493 (setq-local js-enabled-frameworks nil)
3494 (setq-local syntax-propertize-function nil) 3494 ;; Speed up `syntax-ppss': JSON files can be big but can't hold
3495 (setq-local js-enabled-frameworks nil)) 3495 ;; regexp matchers nor #! thingies (and `js-enabled-frameworks' is nil).
3496 (setq-local syntax-propertize-function #'ignore))
3496 3497
3497;; Since we made JSX support available and automatically-enabled in 3498;; Since we made JSX support available and automatically-enabled in
3498;; the base `js-mode' (for ease of use), now `js-jsx-mode' simply 3499;; the base `js-mode' (for ease of use), now `js-jsx-mode' simply
diff --git a/lisp/progmodes/ps-mode.el b/lisp/progmodes/ps-mode.el
index 7c9aee2b2a8..89482d86ce2 100644
--- a/lisp/progmodes/ps-mode.el
+++ b/lisp/progmodes/ps-mode.el
@@ -34,7 +34,6 @@
34 34
35;;; Code: 35;;; Code:
36 36
37(defconst ps-mode-version "1.1i, 17 May 2008")
38(defconst ps-mode-maintainer-address 37(defconst ps-mode-maintainer-address
39 "Peter Kleiweg <p.c.j.kleiweg@rug.nl>, bug-gnu-emacs@gnu.org") 38 "Peter Kleiweg <p.c.j.kleiweg@rug.nl>, bug-gnu-emacs@gnu.org")
40 39
@@ -519,7 +518,7 @@ Typing \\<ps-run-mode-map>\\[ps-run-goto-error] when the cursor is at the number
519(defun ps-mode-show-version () 518(defun ps-mode-show-version ()
520 "Show current version of PostScript mode." 519 "Show current version of PostScript mode."
521 (interactive) 520 (interactive)
522 (message " *** PostScript Mode (ps-mode) Version %s *** " ps-mode-version)) 521 (message " *** PostScript Mode (ps-mode) in GNU Emacs %s *** " emacs-version))
523 522
524;; From reporter.el 523;; From reporter.el
525(defvar reporter-prompt-for-summary-p) 524(defvar reporter-prompt-for-summary-p)
@@ -534,7 +533,7 @@ Typing \\<ps-run-mode-map>\\[ps-run-goto-error] when the cursor is at the number
534 ps-run-font-lock-keywords-2))) 533 ps-run-font-lock-keywords-2)))
535 (reporter-submit-bug-report 534 (reporter-submit-bug-report
536 ps-mode-maintainer-address 535 ps-mode-maintainer-address
537 (format "ps-mode.el %s [%s]" ps-mode-version system-type) 536 (format "ps-mode.el %s [%s]" emacs-version system-type)
538 '(ps-mode-tab 537 '(ps-mode-tab
539 ps-mode-paper-size 538 ps-mode-paper-size
540 ps-mode-print-function 539 ps-mode-print-function
@@ -1094,6 +1093,9 @@ Use line numbers if `ps-run-error-line-numbers' is not nil."
1094;; 1093;;
1095(add-hook 'kill-emacs-hook #'ps-run-cleanup) 1094(add-hook 'kill-emacs-hook #'ps-run-cleanup)
1096 1095
1096(defconst ps-mode-version "1.1i, 17 May 2008")
1097(make-obsolete-variable 'ps-mode-version 'emacs-version "29.1")
1098
1097(provide 'ps-mode) 1099(provide 'ps-mode)
1098 1100
1099;;; ps-mode.el ends here 1101;;; ps-mode.el ends here