aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/progmodes/ebnf2ps.el37
1 files changed, 23 insertions, 14 deletions
diff --git a/lisp/progmodes/ebnf2ps.el b/lisp/progmodes/ebnf2ps.el
index c19dc332b85..a5e481b6b56 100644
--- a/lisp/progmodes/ebnf2ps.el
+++ b/lisp/progmodes/ebnf2ps.el
@@ -5,8 +5,8 @@
5;; Author: Vinicius Jose Latorre <vinicius@cpqd.com.br> 5;; Author: Vinicius Jose Latorre <vinicius@cpqd.com.br>
6;; Maintainer: Vinicius Jose Latorre <vinicius@cpqd.com.br> 6;; Maintainer: Vinicius Jose Latorre <vinicius@cpqd.com.br>
7;; Keywords: wp, ebnf, PostScript 7;; Keywords: wp, ebnf, PostScript
8;; Time-stamp: <2000/08/27 14:24:32 vinicius> 8;; Time-stamp: <2000/12/19 15:17:15 vinicius>
9;; Version: 3.3 9;; Version: 3.4
10;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/Emacs.html 10;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/Emacs.html
11 11
12;; This file is part of GNU Emacs. 12;; This file is part of GNU Emacs.
@@ -26,8 +26,8 @@
26;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, 26;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
27;; Boston, MA 02111-1307, USA. 27;; Boston, MA 02111-1307, USA.
28 28
29(defconst ebnf-version "3.3" 29(defconst ebnf-version "3.4"
30 "ebnf2ps.el, v 3.2 <2000/08/27 vinicius> 30 "ebnf2ps.el, v 3.4 <2000/12/19 vinicius>
31 31
32Vinicius's last change version. When reporting bugs, please also 32Vinicius's last change version. When reporting bugs, please also
33report the version of Emacs, if any, that ebnf2ps was running with. 33report the version of Emacs, if any, that ebnf2ps was running with.
@@ -1881,6 +1881,8 @@ WARNING: It's *NOT* asked any confirmation to override an existing file."
1881 "Return the current ebnf2ps setup." 1881 "Return the current ebnf2ps setup."
1882 (format 1882 (format
1883 " 1883 "
1884;;; ebnf2ps.el version %s
1885
1884\(setq ebnf-special-font %s 1886\(setq ebnf-special-font %s
1885 ebnf-special-shape %s 1887 ebnf-special-shape %s
1886 ebnf-special-shadow %S 1888 ebnf-special-shadow %S
@@ -1933,7 +1935,10 @@ WARNING: It's *NOT* asked any confirmation to override an existing file."
1933 ebnf-yac-ignore-error-recovery %S 1935 ebnf-yac-ignore-error-recovery %S
1934 ebnf-ignore-empty-rule %S 1936 ebnf-ignore-empty-rule %S
1935 ebnf-optimize %S) 1937 ebnf-optimize %S)
1938
1939;;; ebnf2ps.el - end of settings
1936" 1940"
1941 ebnf-version
1937 (ps-print-quote ebnf-special-font) 1942 (ps-print-quote ebnf-special-font)
1938 (ps-print-quote ebnf-special-shape) 1943 (ps-print-quote ebnf-special-shape)
1939 ebnf-special-shadow 1944 ebnf-special-shadow
@@ -4100,6 +4105,18 @@ end
4100;; Internal functions 4105;; Internal functions
4101 4106
4102 4107
4108;; function `ebnf-range-regexp' is used to avoid a bug of `skip-chars-forward'
4109;; on version 20.4.1, that is, it doesn't accept ranges like "\240-\377" (or
4110;; "\177-\237"), but it accepts the character sequence from \240 to \377 (or
4111;; from \177 to \237). It seems that version 20.7 has the same problem.
4112(defun ebnf-range-regexp (prefix from to)
4113 (let (str)
4114 (while (<= from to)
4115 (setq str (concat str (char-to-string from))
4116 from (1+ from)))
4117 (concat prefix str)))
4118
4119
4103(defvar ebnf-map-name 4120(defvar ebnf-map-name
4104 (let ((map (make-vector 256 ?\_))) 4121 (let ((map (make-vector 256 ?\_)))
4105 (mapcar #'(lambda (char) 4122 (mapcar #'(lambda (char)
@@ -4944,16 +4961,8 @@ end
4944 (point)))) 4961 (point))))
4945 4962
4946 4963
4947;; to avoid a bug of `skip-chars-forward' on version 20.4.1, that is, it 4964;; replace the range "\240-\377" (see `ebnf-range-regexp').
4948;; doesn't accept the range "\240-\377", but it accepts the character sequence 4965(defconst ebnf-8-bit-chars (ebnf-range-regexp "" ?\240 ?\377))
4949;; from \240 to \377. It seems that version 20.7 has the same problem.
4950(defconst ebnf-8-bit-chars
4951 (let ((char ?\240)
4952 str)
4953 (while (<= char ?\377)
4954 (setq str (concat str (char-to-string char))
4955 char (1+ char)))
4956 str))
4957 4966
4958 4967
4959(defun ebnf-string (chars eos-char kind) 4968(defun ebnf-string (chars eos-char kind)