diff options
Diffstat (limited to 'lisp/progmodes/ebnf2ps.el')
| -rw-r--r-- | lisp/progmodes/ebnf2ps.el | 51 |
1 files changed, 16 insertions, 35 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 | |||
| 28 | Vinicius's last change version. When reporting bugs, please also | ||
| 29 | report the version of Emacs, if any, that ebnf2ps was running with. | ||
| 30 | |||
| 31 | Please 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 | ||
| 2963 | Each element has the following form: | 2939 | Each 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 | |||
| 6328 | Vinicius's last change version. When reporting bugs, please also | ||
| 6329 | report the version of Emacs, if any, that ebnf2ps was running with. | ||
| 6330 | |||
| 6331 | Please 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 | ||