Package: dpkg-dev-el
Version: 24.9-2
Severity: wishlist
Tags: patch

Below is a patch to debian-changelog-mode.el that adds a hook for automatic
inclusion of extra material in the changelog entries when creating a new
version.  The hook is called debian-changelog-add-version-hook and contains
at the startup a new function called
debian-changelog-add-new-upstream-release, which includes the usual "New
upstream release" entry.  This has been removed from
debian-changelog-add-version.

For instance, I am using this hook privately like this:

(add-hook 
  'debian-changelog-add-version-hook
  (lambda () 
    (save-excursion       
      (forward-line -1)     
      (beginning-of-line)
      (insert "\n   NOT YET RELEASED!\n\n   +++ Changes by \n"))))

Please consider making this change or implementing something similar.

Thanks,

-- 
Rafael

--- debian-changelog-mode.el-orig       2005-02-24 11:25:34.000000000 +0100
+++ debian-changelog-mode.el    2005-02-24 11:19:58.000000000 +0100
@@ -358,6 +358,13 @@
   :type 'hook
   :options '(turn-on-auto-fill flyspell-mode))
 
+(defcustom debian-changelog-add-version-hook nil
+  (list 'debian-changelog-add-new-upstream-release)
+  "Hooks run just before inserting the signature separator \"--\" in a 
+new version in debian/changelog."
+  :group 'debian-changelog
+  :type 'hook)
+
 (defvar debian-changelog-local-variables-maybe-remove-done nil
   "Internal flag so we prompt only once.")
 
@@ -828,6 +835,13 @@
 ;;
 
 (defvar debian-changelog-new-upstream-release-p nil)
+
+(defun debian-changelog-add-new-upstream-release ()
+  "Normal hook for adding \"new upstream release\" entry to changelog."
+    (when debian-changelog-new-upstream-release-p
+      (insert "New upstream release")
+      (setq debian-changelog-new-upstream-release-p nil)))
+
 (defun debian-changelog-add-version ()
   "Add a new version section to a debian-style changelog file.
 If file is empty, create initial entry."
@@ -844,9 +858,7 @@
     (if (debian-changelog-experimental-p)
         (insert pkg-name " (" version ") experimental; urgency=low\n\n  * ")
       (insert pkg-name " (" version ") unstable; urgency=low\n\n  * "))
-    (when debian-changelog-new-upstream-release-p
-      (insert "New upstream release")
-      (setq debian-changelog-new-upstream-release-p nil))
+    (run-hooks 'debian-changelog-add-version-hook)
     (save-excursion (insert "\n\n --\n\n"))))
 
 (defun debian-changelog-experimental-p ()


-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.8-1-686
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages dpkg-dev-el depends on:
ii  debian-el                     24.9-2     Emacs helpers specific to Debian u
ii  emacs21 [emacsen]             21.3+1-8   The GNU Emacs editor
ii  xemacs21-mule [emacsen]       21.4.16-1  Editor and kitchen sink -- Mule bi
ii  xemacs21-nomule [emacsen]     21.4.16-1  Editor and kitchen sink -- Non-mul

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to