Package: psgml Version: 1.3.2-13 Severity: wishlist Tags: patch Hi,
psgml contains some unconditional calls to (make-local-hook), but this is only needed for XEmacs, where 'local does not automatically make hook buffer-local. emacs-snapshot currently complains about this, and as soon as new Emacs is released and reaches Debian, Debian Emacs will complain too. Please consider attached patch. Regards, -- Agustin
>From 5153dd67073ebdb15d71d1fe644d6a3bde639d3a Mon Sep 17 00:00:00 2001 From: Agustin Martin Domingo <agmar...@debian.org> Date: Wed, 18 Apr 2012 19:46:12 +0200 Subject: [PATCH 1/2] psgml.el, psgml-parse.el: 'local does not automatically make hook buffer-local in XEmacs. --- psgml-parse.el | 6 ++++-- psgml.el | 8 ++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/psgml-parse.el b/psgml-parse.el index 5c14cce..8565558 100644 --- a/psgml-parse.el +++ b/psgml-parse.el @@ -2936,8 +2936,10 @@ overrides the entity type in entity look up." (defun sgml-set-initial-state (dtd) "Set initial state of parsing." - (make-local-hook 'before-change-functions) - (make-local-hook 'after-change-functions) + (when (featurep 'xemacs) + ;; 'local does not automatically make hook buffer-local in XEmacs + (make-local-hook 'before-change-functions) + (make-local-hook 'after-change-functions)) (add-hook 'before-change-functions 'sgml-note-change-at nil 'local) (add-hook 'after-change-functions 'sgml-set-face-after-change nil 'local) (sgml-set-active-dtd-indicator (sgml-dtd-doctype dtd)) diff --git a/psgml.el b/psgml.el index 8cd47e0..7d41ba2 100644 --- a/psgml.el +++ b/psgml.el @@ -1235,12 +1235,16 @@ All bindings: (make-local-variable 'text-property-default-nonsticky) ;; see `sgml-set-face-for': (add-to-list 'text-property-default-nonsticky '(face . t))) - (make-local-hook 'post-command-hook) + (if (featurep 'xemacs) + ;; 'local does not automatically make hook buffer-local in XEmacs. + (make-local-hook 'post-command-hook)) (add-hook 'post-command-hook 'sgml-command-post 'append 'local) (unless sgml-running-lucid ;; XEmacs 20.4 doesn't handle local activate-menubar-hook ;; it tries to call the function `t' when using the menubar - (make-local-hook 'activate-menubar-hook)) + (if (featurep 'xemacs) + ;; 'local does not automatically make hook buffer-local in XEmacs. + (make-local-hook 'activate-menubar-hook))) (add-hook 'activate-menubar-hook 'sgml-update-all-options-menus nil 'local) (run-hooks 'text-mode-hook 'sgml-mode-hook) -- 1.7.10