]> code.delx.au - gnu-emacs/blobdiff - lisp/nxml/xsd-regexp.el
Update copyright year to 2015
[gnu-emacs] / lisp / nxml / xsd-regexp.el
index bfdd3bba28c29faacae863119c981c014c847cf8..7b1e6165583da82686cab51df2d228202c9810aa 100644 (file)
@@ -1,9 +1,9 @@
 ;;; xsd-regexp.el --- translate W3C XML Schema regexps to Emacs regexps
 
-;; Copyright (C) 2003, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2007-2015 Free Software Foundation, Inc.
 
 ;; Author: James Clark
-;; Keywords: XML, regexp
+;; Keywords: wp, hypermedia, languages, XML, regexp
 
 ;; This file is part of GNU Emacs.
 
@@ -49,7 +49,7 @@
 ;; Unicode character means a character in one of the Mule charsets
 ;; ascii, latin-iso8859-1, mule-unicode-0100-24ff,
 ;; mule-unicode-2500-33ff, mule-unicode-e000-ffff, eight-bit-control
-;; or a character translateable to such a character (i.e a character
+;; or a character translatable to such a character (i.e a character
 ;; for which `encode-char' will return non-nil).
 ;;
 ;; Using unify-8859-on-decoding-mode is probably a good idea here
@@ -466,13 +466,8 @@ whose value is a range-list."
                     (- (length str)
                        (length xsdre-current-regexp))))))))
 
-(put 'xsdre-invalid-regexp
-     'error-conditions
-     '(error xsdre-invalid-regexp))
-
-(put 'xsdre-invalid-regexp
-     'error-message
-     "Invalid W3C XML Schema Datatypes regular expression")
+(define-error 'xsdre-invalid-regexp
+  "Invalid W3C XML Schema Datatypes regular expression")
 
 (defun xsdre-parse-regexp ()
   (let ((branches nil))
@@ -686,13 +681,7 @@ whose value is a range-list."
 
 ;; This error condition is used only internally.
 
-(put 'xsdre-parse-error
-     'error-conditions
-     '(error xsdre-parse-error))
-
-(put 'xsdre-parse-error
-     'error-message
-     "Internal error in parsing XSD regexp")
+(define-error 'xsdre-parse-error "Internal error in parsing XSD regexp")
 
 ;;; Character class data
 
@@ -710,8 +699,7 @@ whose value is a range-list."
   "Use a UnicodeData file to generate code to initialize Unicode categories.
 Code is inserted into the current buffer."
   (interactive "fUnicodeData file: ")
-  (save-excursion
-    (set-buffer (find-file-noselect file))
+  (with-current-buffer (find-file-noselect file)
     (goto-char (point-min))
     (mapc (lambda (x) (put x 'xsdre-ranges nil)) xsdre-gen-categories)
     (while (re-search-forward "^\\([0-9A-Fa-f]*\\);[^;]*;\\([A-Z][a-z]\\);"
@@ -2118,5 +2106,4 @@ Code is inserted into the current buffer."
 
 (provide 'xsd-regexp)
 
-;; arch-tag: bf990d61-a26c-4fd3-b578-56a5640729da
 ;;; xsd-regexp.el ends here