--- psgml-1.4.0.orig/Makefile.in +++ psgml-1.4.0/Makefile.in @@ -22,6 +22,16 @@ SHELL = /bin/sh compile: $(EMACS) $(FLAGS) -f psgml-compile-files +clean-junk: + -rm -f core `find . \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ + -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ + -o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -print` TAGS + +clean-elc: + rm -f *.elc + +clean: clean-junk clean-elc + all: rm -f *.elc ; $(EMACS) $(FLAGS) -f psgml-compile-files @@ -37,12 +47,6 @@ install: compile install-info: $(INSTALL_DATA) psgml.info $(infodir) $(INSTALL_DATA) psgml-api.info $(infodir) - if $(SHELL) -c 'install-info --version' \ - >/dev/null 2>&1; then \ - install-info --info-dir=$(infodir) psgml.info; \ - install-info --info-dir=$(infodir) psgml-api.info; \ - else true; fi - xemacs: $(MAKE) EMACS=xemacs all --- psgml-1.4.0.orig/psgml-api.texi +++ psgml-1.4.0/psgml-api.texi @@ -7,6 +7,7 @@ @c $Id: psgml-api.texi,v 1.2 1999/12/03 17:29:39 lenst Exp $ @ifinfo +@dircategory Emacs editing modes @format START-INFO-DIR-ENTRY * PSGML-API: (psgml-api). PSGML, the API documentation. --- psgml-1.4.0.orig/psgml-parse.el +++ psgml-1.4.0/psgml-parse.el @@ -359,7 +359,7 @@ Applicable to XML.") ((and (boundp 'emacs-major-version) (>= emacs-major-version 20)) (set-buffer-multibyte (if (eq flag 'default) - default-enable-multibyte-characters + (default-value 'enable-multibyte-characters) flag))) ((boundp 'MULE) (set 'mc-flag flag)) @@ -2532,7 +2532,7 @@ overrides the entity type in entity look ;; processing a cdtd. ;; FIXME: looks strange, we haven't changed bufferw yet (sgml-set-buffer-multibyte t)) - (setq sgml-scratch-buffer (generate-new-buffer " *entity*"))) + (setq-local sgml-scratch-buffer (generate-new-buffer " *entity*"))) (let ((cb (current-buffer)) (dd default-directory) (syntax-table (syntax-table)) @@ -2545,19 +2545,16 @@ overrides the entity type in entity look (sgml-epos (point))))) (set-buffer sgml-scratch-buffer) (when (eq sgml-scratch-buffer (default-value 'sgml-scratch-buffer)) - (make-local-variable 'sgml-scratch-buffer) - (setq sgml-scratch-buffer nil)) + (setq-local sgml-scratch-buffer nil)) (setq sgml-last-entity-buffer (current-buffer)) (erase-buffer) (sgml-set-buffer-multibyte 'default) (setq default-directory dd) (set-visited-file-name nil t) - (set (make-local-variable 'sgml-current-file) nil) - (make-local-variable 'sgml-current-eref) - (setq sgml-current-eref eref) + (setq-local sgml-current-file nil) + (setq-local sgml-current-eref eref) (set-syntax-table syntax-table) - (make-local-variable 'sgml-previous-buffer) - (setq sgml-previous-buffer cb) + (setq-local sgml-previous-buffer cb) (setq sgml-xml-p xml-p) (setq sgml-rs-ignore-pos ; don't interpret beginning of buffer ; as #RS if internal entity. @@ -2654,18 +2651,11 @@ overrides the entity type in entity look (while (sgml-pop-entity))) (defun sgml-cleanup-entities () - (let ((cb (current-buffer)) - (n 0)) - (while (and sgml-scratch-buffer (buffer-name sgml-scratch-buffer)) - (set-buffer sgml-scratch-buffer) - (assert (not (eq sgml-scratch-buffer - (default-value 'sgml-scratch-buffer)))) - (incf n)) - (while (> n 10) - (set-buffer (prog1 sgml-previous-buffer - (kill-buffer (current-buffer)))) - (decf n)) - (set-buffer cb))) + (let ((cb (current-buffer))) + (while (and sgml-scratch-buffer + (buffer-name sgml-scratch-buffer)) + (set-buffer sgml-scratch-buffer)) + (sgml-pop-all-entities))) (defun sgml-any-open-param/file () "Return true if there currently is a parameter or file open." @@ -2845,7 +2835,7 @@ overrides the entity type in entity look (point-min))) (goto-char (or (next-single-property-change (point) 'invisible) (point-max))))) - (when (and (not executing-macro) + (when (and (not executing-kbd-macro) (or sgml-live-element-indicator sgml-set-face) (not (null sgml-buffer-parse-state)) --- psgml-1.4.0.orig/psgml.el +++ psgml-1.4.0/psgml.el @@ -407,13 +407,17 @@ This variable is automatically local to (defvar sgml-catalog-files (or (delete nil (sgml-parse-colon-path (getenv "SGML_CATALOG_FILES"))) - '("catalog" "/usr/local/lib/sgml/catalog")) + '("catalog" "/etc/sgml/catalog" + "/usr/lib/sgml/catalog" + "/usr/local/share/sgml/catalog" + "/usr/local/lib/sgml/catalog")) "*List of catalog entry files. The files are in the format defined in the SGML Open Draft Technical Resolution on Entity Management.") (put 'sgml-catalog-files 'sgml-type 'file-list) -(defvar sgml-ecat-files '("ECAT" "~/sgml/ECAT" "/usr/local/lib/sgml/ECAT") +(defvar sgml-ecat-files '("ECAT" "~/sgml/ECAT" "/usr/lib/sgml/ECAT" + "/usr/local/share/sgml/ECAT" "/usr/local/lib/sgml/ECAT" ) "*List of catalog files for PSGML.") (put 'sgml-ecat-files 'sgml-type 'file-list) @@ -493,12 +497,11 @@ Example: (put 'sgml-fixed 'face 'underline) ; Face of #FIXED "..." -;;; nsgmls is a free SGML parser in the SP suite available from -;;; ftp.jclark.com:pub/sp +;;; onsgmls is a free SGML parser ;;; Its error messages can be parsed by next-error. ;;; The -s option suppresses output. -(defvar sgml-validate-command "nsgmls -s %s %s" +(defvar sgml-validate-command "onsgmls -s %s %s" "*The shell command to validate an SGML document. This is a `format' control string that by default should contain two @@ -521,7 +524,9 @@ string will be replaced according to the ") (make-variable-buffer-local 'sgml-validate-command) -(defvar sgml-xml-validate-command "nsgmls -wxml -s %s %s" +(defvar sgml-xml-validate-command + (concat "/bin/sh -c \"SP_CHARSET_FIXED=YES SP_ENCODING=XML " + "onsgmls -wxml -mdeclaration/xml.soc -gues %s %s\"") "*The default for `sgml-validate-command' in XML mode.") (defvar sgml-validate-files nil @@ -1260,10 +1265,10 @@ Note that without a DTD, indenting lines (setq sgml-namecase-general nil) (setq sgml-minimize-attributes nil) (setq sgml-always-quote-attributes t) - (setq sgml-validate-command sgml-xml-validate-command) (make-local-variable 'sgml-declaration) - (setq sgml-declaration sgml-xml-declaration)) - + (setq sgml-declaration sgml-xml-declaration) + (setq sgml-validate-command sgml-xml-validate-command) + ) (defun sgml-default-dtd-file () (and (buffer-file-name) @@ -1432,7 +1437,7 @@ start tag, and the second / is the corre (1+ blinkpos)))))))))) (eval-and-compile - (autoload 'compile-internal "compile" "")) + (autoload 'compilation-start "compile" "")) (defun sgml-default-validate-command () (cond @@ -1469,9 +1474,7 @@ and move to the line in the SGML documen nil nil 'sgml-validate-command-history))) (if sgml-offer-save (save-some-buffers nil nil)) - (compile-internal command "No more errors" "SGML validation" - nil - sgml-validate-error-regexps)) + (compilation-start command 'compilation-minor-mode nil sgml-validate-error-regexps)) (defalias 'sgml-restore-buffer-modified-p (if (fboundp 'restore-buffer-modified-p) --- psgml-1.4.0.orig/psgml.texi +++ psgml-1.4.0/psgml.texi @@ -10,7 +10,9 @@ @c $Id: psgml.texi,v 1.8 2005/03/02 19:44:20 lenst Exp $ @ifinfo +@dircategory Emacs editing modes @format +INFO-DIR-SECTION Emacs editing modes START-INFO-DIR-ENTRY * PSGML: (psgml). PSGML, a major mode for SGML documents. END-INFO-DIR-ENTRY @@ -1570,7 +1572,7 @@ Default: @code{t}. Set the variable @code{sgml-display-char-list-filename} to a file that contains mappings between all characters present in the presentation -character set, and their "standard replacement text" names, e.g. "å" +character set, and their "standard replacement text" names, e.g. "@U{00e5}" -> "[aring ]", e.t.c. The default value for this variable is `iso88591.map'.