diff options
Diffstat (limited to 'lisp/progmodes')
-rw-r--r-- | lisp/progmodes/ebnf2ps.el | 51 | ||||
-rw-r--r-- | lisp/progmodes/f90.el | 7 | ||||
-rw-r--r-- | lisp/progmodes/gdb-mi.el | 28 | ||||
-rw-r--r-- | lisp/progmodes/gud.el | 13 | ||||
-rw-r--r-- | lisp/progmodes/js.el | 7 | ||||
-rw-r--r-- | lisp/progmodes/ps-mode.el | 8 |
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 @@ ;; Author: Vinicius Jose Latorre <viniciusjl.gnu@gmail.com> ;; Keywords: wp, ebnf, PostScript -;; Version: 4.4 +;; Old-Version: 4.4 ;; URL: https://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre ;; This file is part of GNU Emacs. @@ -22,16 +22,6 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. -(defconst ebnf-version "4.4" - "ebnf2ps.el, v 4.4 <2007/02/12 vinicius> - -Vinicius's last change version. When reporting bugs, please also -report the version of Emacs, if any, that ebnf2ps was running with. - -Please send all bug fixes and enhancements to - Vinicius Jose Latorre <viniciusjl.gnu@gmail.com>.") - - ;;; Commentary: ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -45,20 +35,12 @@ Please send all bug fixes and enhancements to ;; ;; (require 'ebnf2ps) ;; -;; ebnf2ps uses ps-print package (version 5.2.3 or later), so see ps-print to +;; ebnf2ps uses ps-print package (bundled with Emacs), so see ps-print to ;; know how to set options like landscape printing, page headings, margins, ;; etc. ;; -;; NOTE: ps-print zebra stripes and line number options doesn't have effect on -;; ebnf2ps, they behave as it's turned off. -;; -;; For good performance, be sure to byte-compile ebnf2ps.el, e.g. -;; -;; M-x byte-compile-file <give the path to ebnf2ps.el when prompted> -;; -;; This will generate ebnf2ps.elc, which will be loaded instead of ebnf2ps.el. -;; -;; ebnf2ps was tested with GNU Emacs 20.4.1. +;; NOTE: ps-print zebra stripes and line number options don't have an +;; effect on ebnf2ps, they behave as if it's turned off. ;; ;; ;; Using ebnf2ps @@ -1154,9 +1136,6 @@ Please send all bug fixes and enhancements to (require 'ps-print) (eval-when-compile (require 'cl-lib)) -(and (string< ps-print-version "5.2.3") - (error "`ebnf2ps' requires `ps-print' package version 5.2.3 or later")) - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; User Variables: @@ -2455,8 +2434,6 @@ See also `ebnf-syntax-buffer'." "Return the current ebnf2ps setup." (format " -;;; ebnf2ps.el version %s - ;;; Emacs version %S \(setq ebnf-special-show-delimiter %S @@ -2525,7 +2502,6 @@ See also `ebnf-syntax-buffer'." ;;; ebnf2ps.el - end of settings " - ebnf-version emacs-version ebnf-special-show-delimiter (ps-print-quote ebnf-special-font) @@ -2958,7 +2934,7 @@ See section \"Actions in Comments\" in ebnf2ps documentation.") (defvar ebnf-eps-file-alist nil -"Alist associating file name with EPS header and footer. + "Alist associating file name with EPS header and footer. Each element has the following form: @@ -5242,11 +5218,7 @@ killed after process termination." (not (search-forward "& ebnf2ps v" (line-end-position) t)) - (progn - ;; adjust creator comment - (end-of-line) - ;; (backward-char) - (insert " & ebnf2ps v" ebnf-version) + (progn ;; insert ebnf settings & engine (goto-char (point-max)) (search-backward "\n%%EndProlog\n") @@ -5272,7 +5244,7 @@ killed after process termination." (format "%d %d" (1+ ebnf-eps-upper-x) (1+ ebnf-eps-upper-y)) "\n%%Title: " filename "\n%%CreationDate: " (format-time-string "%T %b %d %Y") - "\n%%Creator: " (user-full-name) " (using ebnf2ps v" ebnf-version ")" + "\n%%Creator: " (user-full-name) " (using GNU Emacs " emacs-version ")" "\n%%DocumentNeededResources: font " (or ebnf-fonts-required (setq ebnf-fonts-required @@ -6350,6 +6322,15 @@ killed after process termination." ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(defconst ebnf-version "4.4" + "ebnf2ps.el, v 4.4 <2007/02/12 vinicius> + +Vinicius's last change version. When reporting bugs, please also +report the version of Emacs, if any, that ebnf2ps was running with. + +Please send all bug fixes and enhancements to + bug-gnu-emacs@gnu.org and Vinicius Jose Latorre <viniciusjl.gnu@gmail.com>.") +(make-obsolete-variable 'ebnf-version 'emacs-version "29.1") (provide 'ebnf2ps) 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 @@ ;; non-nil, the line numbers are never touched. ;; 2) Multi-; statements like "do i=1,20 ; j=j+i ; end do" are not handled ;; correctly, but I imagine them to be rare. -;; 3) Regexps for hilit19 are no longer supported. -;; 4) For FIXED FORMAT code, use fortran mode. -;; 5) Preprocessor directives, i.e., lines starting with # are left-justified +;; 3) For FIXED FORMAT code, use fortran mode. +;; 4) Preprocessor directives, i.e., lines starting with # are left-justified ;; and are untouched by all case-changing commands. There is, at present, no ;; mechanism for treating multi-line directives (continued by \ ). -;; 6) f77 do-loops do 10 i=.. ; ; 10 continue are not correctly indented. +;; 5) f77 do-loops do 10 i=.. ; ; 10 continue are not correctly indented. ;; You are urged to use f90-do loops (with labels if you wish). ;; 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 @@ (require 'cl-seq) (require 'bindat) (eval-when-compile (require 'pcase)) +(require 'subr-x) ; `string-pad' (declare-function speedbar-change-initial-expansion-list "speedbar" (new-default)) @@ -2511,9 +2512,8 @@ means to decode using the coding-system set for the GDB process." ;; Record transactions if logging is enabled. (when gdb-enable-debug (push (cons 'recv string) gdb-debug-log) - (if (and gdb-debug-log-max - (> (length gdb-debug-log) gdb-debug-log-max)) - (setcdr (nthcdr (1- gdb-debug-log-max) gdb-debug-log) nil))) + (when gdb-debug-log-max + (setq gdb-debug-log (ntake gdb-debug-log-max gdb-debug-log)))) ;; Recall the left over gud-marker-acc from last time. (setq gud-marker-acc (concat gud-marker-acc string)) @@ -2943,7 +2943,8 @@ Return position where LINE begins." start-posn))) (defun gdb-pad-string (string padding) - (format (concat "%" (number-to-string padding) "s") string)) + (declare (obsolete string-pad "29.1")) + (string-pad string padding nil t)) ;; gdb-table struct is a way to programmatically construct simple ;; tables. It help to reliably align columns of data in GDB buffers @@ -2985,13 +2986,13 @@ calling `gdb-table-string'." "Return TABLE as a string with columns separated with SEP." (let ((column-sizes (gdb-table-column-sizes table))) (mapconcat - 'identity + #'identity (cl-mapcar (lambda (row properties) - (apply 'propertize - (mapconcat 'identity - (cl-mapcar (lambda (s x) (gdb-pad-string s x)) - row column-sizes) + (apply #'propertize + (mapconcat #'identity + (cl-mapcar (lambda (s x) (string-pad s x nil t)) + row column-sizes) sep) properties)) (gdb-table-rows table) @@ -3688,10 +3689,11 @@ in `gdb-memory-format'." (dolist (row memory) (insert (concat (gdb-mi--field row 'addr) ":")) (dolist (column (gdb-mi--field row 'data)) - (insert (gdb-pad-string column - (+ 2 (gdb-memory-column-width - gdb-memory-unit - gdb-memory-format))))) + (insert (string-pad column + (+ 2 (gdb-memory-column-width + gdb-memory-unit + gdb-memory-format)) + nil t))) (newline))) ;; Show last page instead of empty buffer when out of bounds (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. (seen-e nil) (shift (lambda () (push (pop args) new-args)))) - ;; Pass all switches and -e scripts through. + ;; Pass all switches and -E/-e scripts through. (while (and args (string-match "^-" (car args)) (not (equal "-" (car args))) (not (equal "--" (car args)))) - (when (equal "-e" (car args)) + (when (or (equal "-E" (car args)) (equal "-e" (car args))) ;; -e goes with the next arg, so shift one extra. - (or (funcall shift) - ;; -e as the last arg is an error in Perl. - (error "No code specified for -e")) + (funcall shift) + (or args + ;; -E (or -e) as the last arg is an error in Perl. + (error "No code specified for %s" (car new-args))) (setq seen-e t)) (funcall shift)) @@ -1697,7 +1698,7 @@ The directory containing the perl program becomes the initial working directory and source-file directory for your debugger." (interactive (list (gud-query-cmdline 'perldb - (concat (or (buffer-file-name) "-e 0") " ")))) + (concat (or (buffer-file-name) "-E 0") " ")))) (gud-common-init command-line 'gud-perldb-massage-args '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'." ;;;###autoload (define-derived-mode js-json-mode js-mode "JSON" - ;; JSON files can be big. Speed up syntax-ppss. - (setq-local syntax-propertize-function nil) - (setq-local js-enabled-frameworks nil)) + (setq-local js-enabled-frameworks nil) + ;; Speed up `syntax-ppss': JSON files can be big but can't hold + ;; regexp matchers nor #! thingies (and `js-enabled-frameworks' is nil). + (setq-local syntax-propertize-function #'ignore)) ;; Since we made JSX support available and automatically-enabled in ;; 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 @@ ;;; Code: -(defconst ps-mode-version "1.1i, 17 May 2008") (defconst ps-mode-maintainer-address "Peter Kleiweg <p.c.j.kleiweg@rug.nl>, bug-gnu-emacs@gnu.org") @@ -519,7 +518,7 @@ Typing \\<ps-run-mode-map>\\[ps-run-goto-error] when the cursor is at the number (defun ps-mode-show-version () "Show current version of PostScript mode." (interactive) - (message " *** PostScript Mode (ps-mode) Version %s *** " ps-mode-version)) + (message " *** PostScript Mode (ps-mode) in GNU Emacs %s *** " emacs-version)) ;; From reporter.el (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 ps-run-font-lock-keywords-2))) (reporter-submit-bug-report ps-mode-maintainer-address - (format "ps-mode.el %s [%s]" ps-mode-version system-type) + (format "ps-mode.el %s [%s]" emacs-version system-type) '(ps-mode-tab ps-mode-paper-size ps-mode-print-function @@ -1094,6 +1093,9 @@ Use line numbers if `ps-run-error-line-numbers' is not nil." ;; (add-hook 'kill-emacs-hook #'ps-run-cleanup) +(defconst ps-mode-version "1.1i, 17 May 2008") +(make-obsolete-variable 'ps-mode-version 'emacs-version "29.1") + (provide 'ps-mode) ;;; ps-mode.el ends here |