tag 384977 +patch
tag 446172 +patch
tag 451942 +patch
thanks

On Mon, Nov 19, 2007 at 09:04:55AM -0300, Claudio Saavedra wrote:
> Package: gnuplot-mode
> Version: 1:0.6.0-2.2
> Severity: minor
> 
> When upgrading/installing, you can see the following warning:
> 
> install/gnuplot-mode: Handling install for emacsen flavor emacs-snapshot
> Loading `gnuplot': old-style backquotes detected!
> Wrote /usr/share/emacs-snapshot/site-lisp/gnuplot-mode/gnuplot-gui.elc
> 
> In toplevel form:
> gnuplot.el:331:1:Warning: !! The file uses old-style backquotes !!
> This functionality has been obsolete for more than 10 years already
> and will be removed soon.  See (elisp)Backquote in the manual.
> 
> I suppose it's a good idea to upgrade the code to remove that warning.

That warning seems to have been added in the very last emacs versions from
CVS.

I have prepared a NMU candidate trying to take care of

[#384977]: gnuplot-mode: error seen
[#446172]: Confused by filenames with newlines 
[#451942]: gnuplot-mode: old backquotes still used

Unfortunately I have no idea about how to deal with [#266971: gnuplot-mode:
gnuplot-mode causes shell and sql buffers to hang], so did nothing about
it.

I have put the NMU candidate at

http://people.debian.org/~agmartin/debian-store/misc/

I do not have recent emacsen-common installed here, so testing under
emacs-snapshot is appreciated. I could only test that under emacs22.

Attached patch includes the implementation of dpatch support to properly
deal with gnuplot.el modifications. It will also deal with some lintian
warnings and includes some code cleanup and changes for better
emacsen-common compliance.

Patch attached, changelog follows

  * debian/{compat,rules} use compat file and raise level.
  * debian/rules:
    - Move package build debhelper commands to build-indep
    - Add dpatch support.
    - Remove some unneeded commands.
  * debian/control:
    - Raise debhelper dependency and add dpatch one.
    - Raised Standards value.
  * debian/emacsen-startup:
    - Fix regexp (Closes: #446172).
    - Use debian-pkg-add-load-path-item
  * debian/conffiles: Removed, dh_installemacsen will take care.
  * debian/{postinst,prerm}: Removed. debhelper will take care.
  * debian/copyright: Fixed copyright version.
  * debian/patches/500_gnuplot.el_make-variable-buffer-local.dpatch (new):
    - No need to explicitly set buffer-local font-lock-defaults,
      it will automatically be set (Closes: #384977).
  * debian/patches/850_gnuplot.el_fix-obsolete-backquotes.dpatch (new):
    - Do not use obsolete old-style backquotes and ',' markers
      (Closes: #451942).

Arafune, if you do not object, I will upload this package soon.

-- 
Agustin
diff -u gnuplot-mode-0.6.0/debian/control gnuplot-mode-0.6.0/debian/control
--- gnuplot-mode-0.6.0/debian/control
+++ gnuplot-mode-0.6.0/debian/control
@@ -2,8 +2,8 @@
 Section: math
 Priority: optional
 Maintainer: Ryuichi Arafune <[EMAIL PROTECTED]>
-Build-Depends: debhelper (>> 3.0.5)
-Standards-Version: 3.5.8
+Build-Depends: debhelper (>= 4.1.16), dpatch (>= 2.0.9)
+Standards-Version: 3.7.2
 
 Package: gnuplot-mode
 Architecture: all
reverted:
--- gnuplot-mode-0.6.0/debian/prerm
+++ gnuplot-mode-0.6.0.orig/debian/prerm
@@ -1,37 +0,0 @@
-#! /bin/sh
-# prerm script for gnuplot-mode
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-#        * <prerm> `remove'
-#        * <old-prerm> `upgrade' <new-version>
-#        * <new-prerm> `failed-upgrade' <old-version>
-#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
-#        * <deconfigured's-prerm> `deconfigure' `in-favour'
-#          <package-being-installed> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see /usr/doc/packaging-manual/
-
-case "$1" in
-    remove|upgrade|deconfigure)
-#       install-info --quiet --remove /usr/info/gnuplot-mode.info.gz
-        ;;
-    failed-upgrade)
-        ;;
-    *)
-        echo "prerm called with unknown argument \`$1'" >&2
-        exit 0
-    ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
-
-
diff -u gnuplot-mode-0.6.0/debian/rules gnuplot-mode-0.6.0/debian/rules
--- gnuplot-mode-0.6.0/debian/rules
+++ gnuplot-mode-0.6.0/debian/rules
@@ -5,11 +5,10 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-# This is the debhelper compatability version to use.
-export DH_COMPAT=2
+include /usr/share/dpatch/dpatch.make
 
 build: build-stamp
-build-stamp:
+build-stamp: patch-stamp
 	dh_testdir
 
 	./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
@@ -18,7 +17,8 @@
 
 	touch build-stamp
 
-clean:
+clean: clean-patched unpatch
+clean-patched:
 	dh_testdir
 	dh_testroot
 	rm -f build-stamp
@@ -40,23 +40,17 @@
 	cp gnuplot-gui.el $(CURDIR)/debian/gnuplot-mode/usr/share/emacs/site-lisp/gnuplot-mode
 	cp info-look.20.3.el $(CURDIR)/debian/gnuplot-mode/usr/share/emacs/site-lisp/gnuplot-mode
 
+	touch install-stamp
+
 # Build architecture-independent files here.
 binary-indep: build install
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
 	dh_testdir
 	dh_testroot
 	dh_installdocs
 	dh_installexamples
-	dh_installmenu
 	dh_installemacsen
-	dh_installcron
-	dh_installmanpages
+	dh_installman
 	dh_installchangelogs ChangeLog
-	dh_link
-	dh_strip
 	dh_compress
 	dh_fixperms
 	dh_installdeb
@@ -68,2 +62,6 @@
+# Build architecture-dependent files here.
+binary-arch: build install
+# Nothing to do here. This package is arch all
+
 binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install
+.PHONY: build clean binary-indep binary-arch binary install patch unpatch clean-patched
reverted:
--- gnuplot-mode-0.6.0/debian/conffiles
+++ gnuplot-mode-0.6.0.orig/debian/conffiles
@@ -1 +0,0 @@
-/etc/emacs/site-start.d/50gnuplot-mode.el
diff -u gnuplot-mode-0.6.0/debian/changelog gnuplot-mode-0.6.0/debian/changelog
--- gnuplot-mode-0.6.0/debian/changelog
+++ gnuplot-mode-0.6.0/debian/changelog
@@ -1,3 +1,29 @@
+gnuplot-mode (1:0.6.0-2.3) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * debian/{compat,rules} use compat file and raise level.
+  * debian/rules:
+    - Move package build debhelper commands to build-indep
+    - Add dpatch support.
+    - Remove some unneeded commands.
+  * debian/control:
+    - Raise debhelper dependency and add dpatch one.
+    - Raised Standards value.
+  * debian/emacsen-startup:
+    - Fix regexp (Closes: #446172).
+    - Use debian-pkg-add-load-path-item
+  * debian/conffiles: Removed, dh_installemacsen will take care.
+  * debian/{postinst,prerm}: Removed. debhelper will take care.
+  * debian/copyright: Fixed copyright version.
+  * debian/patches/500_gnuplot.el_make-variable-buffer-local.dpatch (new):
+    - No need to explicitly set buffer-local font-lock-defaults,
+      it will automatically be set (Closes: #384977).
+  * debian/patches/850_gnuplot.el_fix-obsolete-backquotes.dpatch (new):
+    - Do not use obsolete old-style backquotes and ',' markers
+      (Closes: #451942).
+
+ -- Agustin Martin Domingo <[EMAIL PROTECTED]>  Mon, 19 Nov 2007 14:34:42 +0100
+
 gnuplot-mode (1:0.6.0-2.2) unstable; urgency=low
 
   * Non-Maintainer upload.
reverted:
--- gnuplot-mode-0.6.0/debian/postinst
+++ gnuplot-mode-0.6.0.orig/debian/postinst
@@ -1,47 +0,0 @@
-#! /bin/sh
-# postinst script for gnuplot-mode
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-#        * <postinst> `configure' <most-recently-configured-version>
-#        * <old-postinst> `abort-upgrade' <new version>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see /usr/doc/packaging-manual/
-#
-# quoting from the policy:
-#     Any necessary prompting should almost always be confined to the
-#     post-installation script, and should be protected with a conditional
-#     so that unnecessary prompting doesn't happen if a package's
-#     installation fails and the `postinst' is called with `abort-upgrade',
-#     `abort-remove' or `abort-deconfigure'.
-
-case "$1" in
-    configure)
-
-    ;;
-
-    abort-upgrade|abort-remove|abort-deconfigure)
-
-    ;;
-
-    *)
-        echo "postinst called with unknown argument \`$1'" >&2
-        exit 0
-    ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
-
-
diff -u gnuplot-mode-0.6.0/debian/emacsen-startup gnuplot-mode-0.6.0/debian/emacsen-startup
--- gnuplot-mode-0.6.0/debian/emacsen-startup
+++ gnuplot-mode-0.6.0/debian/emacsen-startup
@@ -12,17 +12,20 @@
 ;; installed in a subdirectory of the respective site-lisp directory.
 ;; We have to add this to the load-path:
-(setq load-path (nconc load-path (list (concat "/usr/share/"
-                                               (symbol-name flavor)
-                                               "/site-lisp/gnuplot-mode"))))
+
+(debian-pkg-add-load-path-item
+ (concat "/usr/share/"
+	 (symbol-name debian-emacs-flavor)
+	 "/site-lisp/gnuplot-mode"))
+
 ;; these lines enable the use of gnuplot mode
   (autoload 'gnuplot-mode "gnuplot" "gnuplot major mode" t)
   (autoload 'gnuplot-make-buffer "gnuplot" "open a buffer in gnuplot mode" t)
 
 ;; this line automatically causes all files with the .gp extension to
 ;; be loaded into gnuplot mode
-  (setq auto-mode-alist (append '(("\\.gp$" . gnuplot-mode)) auto-mode-alist))
+  (setq auto-mode-alist (append '(("\\.gp\\'" . gnuplot-mode)) auto-mode-alist))
 
 ;; This line binds the function-9 key so that it opens a buffer into
-;; gnuplot mode 
+;; gnuplot mode
 ;;  (global-set-key [(f9)] 'gnuplot-make-buffer)
 
diff -u gnuplot-mode-0.6.0/debian/copyright gnuplot-mode-0.6.0/debian/copyright
--- gnuplot-mode-0.6.0/debian/copyright
+++ gnuplot-mode-0.6.0/debian/copyright
@@ -8,5 +8,6 @@
 
-Copyright: GPL 
+Copyright: GPLv2 or later
+
 (In Debian system, You can find the GNU General Public licences in
-/usr/share/common-licenses/GPL) 
+/usr/share/common-licenses/GPL)
 
only in patch2:
unchanged:
--- gnuplot-mode-0.6.0.orig/debian/compat
+++ gnuplot-mode-0.6.0/debian/compat
@@ -0,0 +1 @@
+4
only in patch2:
unchanged:
--- gnuplot-mode-0.6.0.orig/debian/patches/850_gnuplot.el_fix-obsolete-backquotes.dpatch
+++ gnuplot-mode-0.6.0/debian/patches/850_gnuplot.el_fix-obsolete-backquotes.dpatch
@@ -0,0 +1,50 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 850_gnuplot.el_fix-obsolete-backquotes.dpatch by Agustin Martin Domingo <[EMAIL PROTECTED]>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No longer use obsolete old-style backquotes
+
+Fixes this warning:
+
+In toplevel form:
+gnuplot.el:331:1:Warning: !! The file uses old-style backquotes !!
+This functionality has been obsolete for more than 10 years already
+and will be removed soon.  See (elisp)Backquote in the manual.
+
+From the emacs-lisp manual:
+
+In old Emacs versions, before version 19.29, ``' used a different
+syntax which required an extra level of parentheses around the entire
+backquote construct.  Likewise, each `,' or `,@' substitution required
+an extra level of parentheses surrounding both the `,' or `,@' and the
+following expression.  The old syntax required whitespace between the
+``', `,' or `,@' and the following expression.
+
[EMAIL PROTECTED]@
+diff -urNad gnuplot-mode-0.6.0~/gnuplot.el gnuplot-mode-0.6.0/gnuplot.el
+--- gnuplot-mode-0.6.0~/gnuplot.el	2007-11-19 14:18:21.000000000 +0100
++++ gnuplot-mode-0.6.0/gnuplot.el	2007-11-19 14:19:42.000000000 +0100
+@@ -342,16 +342,16 @@
+     (if (fboundp 'defface)
+         nil
+       (defmacro defface (var values doc &rest args)
+-        (` (progn
+-             (defvar (, var) (quote (, var)))
+-             ;; To make colors for your faces you need to set your .Xdefaults
+-             ;; or set them up ahead of time in your .emacs file.
+-             (make-face (, var))
+-             ))))
++        `(progn
++	   (defvar ,var (quote ,var))
++	   ;; To make colors for your faces you need to set your .Xdefaults
++	   ;; or set them up ahead of time in your .emacs file.
++	   (make-face , var)
++	   )))
+     (if (fboundp 'defcustom)
+         nil
+       (defmacro defcustom (var value doc &rest args)
+-        (` (defvar (, var) (, value) (, doc)))))))
++        `(defvar ,var ,value ,doc)))))
+ 
+ ;; (eval-and-compile
+ ;;   (condition-case ()
only in patch2:
unchanged:
--- gnuplot-mode-0.6.0.orig/debian/patches/500_gnuplot.el_make-variable-buffer-local.dpatch
+++ gnuplot-mode-0.6.0/debian/patches/500_gnuplot.el_make-variable-buffer-local.dpatch
@@ -0,0 +1,28 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 500_gnuplot.el_make-variable-buffer-local.dpatch by Agustin Martin Domingo <[EMAIL PROTECTED]>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fixing a make-variable-buffer-local into a function
+
+font-lock-defaults is already buffer-local when set in any fashion.
+
[EMAIL PROTECTED]@
+diff -urNad gnuplot-mode-0.6.0~/gnuplot.el gnuplot-mode-0.6.0/gnuplot.el
+--- gnuplot-mode-0.6.0~/gnuplot.el	2002-12-13 22:40:51.000000000 +0100
++++ gnuplot-mode-0.6.0/gnuplot.el	2007-11-16 16:25:41.000000000 +0100
+@@ -1837,7 +1837,6 @@
+   ;;(if (not (fboundp 'hilit-set-mode-patterns))
+   (if (featurep 'font-lock)
+       (progn
+-	(make-variable-buffer-local 'font-lock-defaults)
+ 	(setq font-lock-defaults '(gnuplot-font-lock-keywords t t))
+ 	(if gnuplot-xemacs-p (turn-on-font-lock))))
+   ;;(if (featurep 'kw-compl)
+@@ -2515,7 +2514,6 @@
+   (if gnuplot-xemacs-p			; deal with font-lock
+       (if (fboundp 'turn-on-font-lock) (turn-on-font-lock))
+     (progn
+-      (make-variable-buffer-local 'font-lock-defaults)
+       (setq font-lock-defaults '(gnuplot-font-lock-keywords t t))))
+ ;;   (if (and gnuplot-xemacs-p gnuplot-toolbar-display-flag)
+ ;;       (condition-case ()		; deal with the toolbar
only in patch2:
unchanged:
--- gnuplot-mode-0.6.0.orig/debian/patches/00list
+++ gnuplot-mode-0.6.0/debian/patches/00list
@@ -0,0 +1,2 @@
+500_gnuplot.el_make-variable-buffer-local
+850_gnuplot.el_fix-obsolete-backquotes

Reply via email to