diff options
author | Vinicius Jose Latorre <viniciusjl@ig.com.br> | 2004-02-26 00:44:29 +0000 |
---|---|---|
committer | Vinicius Jose Latorre <viniciusjl@ig.com.br> | 2004-02-26 00:44:29 +0000 |
commit | ea946fccfb3f1e2f6ee8bbb93a67d144f236c183 (patch) | |
tree | 7de95706d32a1a94a234bc8565e9b72617c7849e /lisp/progmodes/ebnf2ps.el | |
parent | dd341dd9c2dfa102585d11d0ad773c0ff074507f (diff) | |
download | emacs-ea946fccfb3f1e2f6ee8bbb93a67d144f236c183.tar.gz |
For compatibility with Emacs 20, define assq-delete-all if it's not defined.
Diffstat (limited to 'lisp/progmodes/ebnf2ps.el')
-rw-r--r-- | lisp/progmodes/ebnf2ps.el | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/lisp/progmodes/ebnf2ps.el b/lisp/progmodes/ebnf2ps.el index 352767e508e..d13ed80fe5c 100644 --- a/lisp/progmodes/ebnf2ps.el +++ b/lisp/progmodes/ebnf2ps.el @@ -5,7 +5,7 @@ ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> -;; Time-stamp: <2004/02/24 20:48:53 vinicius> +;; Time-stamp: <2004/02/25 20:17:43 vinicius> ;; Keywords: wp, ebnf, PostScript ;; Version: 4.0 ;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/ @@ -1041,7 +1041,7 @@ Please send all bug fixes and enhancements to ;; Acknowledgements ;; ---------------- ;; -;; Thanks to Drew Adams <?@?> for suggestions: +;; Thanks to Drew Adams <drew.adams@oracle.com> for suggestions: ;; - `ebnf-production-name-p', `ebnf-stop-on-error', ;; `ebnf-file-suffix-regexp'and `ebnf-special-show-delimiter' variables. ;; - `ebnf-delete-style', `ebnf-eps-file' and `ebnf-eps-directory' @@ -1065,6 +1065,22 @@ Please send all bug fixes and enhancements to (and (string< ps-print-version "5.2.3") (error "`ebnf2ps' requires `ps-print' package version 5.2.3 or later")) + +;; to avoid gripes with Emacs 20 +(eval-and-compile + (or (fboundp 'assq-delete-all) + (defun assq-delete-all (key alist) + "Delete from ALIST all elements whose car is KEY. +Return the modified alist. +Elements of ALIST that are not conses are ignored." + (let ((tail alist)) + (while tail + (if (and (consp (car tail)) + (eq (car (car tail)) key)) + (setq alist (delq (car tail) alist))) + (setq tail (cdr tail))) + alist)))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; User Variables: @@ -4471,12 +4487,12 @@ killed after process termination." (setq the-point (max (1- (point)) (point-min)) error-msg (concat error-msg ": " (error-message-string data) - (if (string= error-msg "SYNTAX") - (format ". At %d in buffer \"%s\"." - the-point - (buffer-name)) - (format ". In buffer \"%s\"." - (buffer-name)))))))))) + ", " + (and (string= error-msg "SYNTAX") + (format "at position %d " + the-point)) + (format "in buffer \"%s\"." + (buffer-name))))))))) (cond ;; error occurred (error-msg |