Help not to edit a generated buffer.
authorWerner Koch <wk@gnupg.org>
Mon, 15 Mar 2010 12:27:29 +0000 (12:27 +0000)
committerWerner Koch <wk@gnupg.org>
Mon, 15 Mar 2010 12:27:29 +0000 (12:27 +0000)
ChangeLog
THANKS
configure.ac
src/ChangeLog
src/gcrypt.h.in

index f40a615..d774a4c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-03-15  Werner Koch  <wk@g10code.com>
+
+       * configure.ac (emacs_local_vars_begin)
+       (emacs_local_vars_read_only, emacs_local_vars_end): New.
+
 2010-01-21  Werner Koch  <wk@g10code.com>
 
        * compat/Makefile.am: New.
diff --git a/THANKS b/THANKS
index 861ac55..10d5384 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -7,6 +7,7 @@ Allan Clark                allanc@sco.com
 Anand Kumria              wildfire@progsoc.uts.edu.au
 Andreas Metzler            ametzler at downhill.at.eu.org
 Ariel T Glenn             ariel@columbia.edu
+Aurelien Jarno             aurel32 at debian.org
 Ben Hutchings              ben decadent org uk
 Bodo Moeller              Bodo_Moeller@public.uni-hamburg.de
 Brenno de Winter          brenno@dewinter.com
index 0022c29..da41225 100644 (file)
@@ -31,8 +31,11 @@ m4_define([my_issvn], [yes])
 
 m4_define([svn_revision], m4_esyscmd([printf "%d" $(svn info 2>/dev/null \
           | sed -n '/^Revision:/ s/[^0-9]//gp'|head -1)]))
+m4_define([git_revision], m4_esyscmd([git branch -v 2>/dev/null \
+          | awk '/^\* / {printf "%s",$3}']))
 AC_INIT([libgcrypt], 
-        [my_version[]m4_if(my_issvn,[yes],[-svn[]svn_revision])],
+        [my_version[]m4_if(my_issvn,[yes],
+        [m4_if(git_revision,[],[-svn[]svn_revision],[-git[]git_revision])])],
         [bug-libgcrypt@gnupg.org])
 # LT Version numbers, remember to change them just *before* a release.
 #   (Interfaces removed:    CURRENT++, AGE=0, REVISION=0)
@@ -1140,6 +1143,11 @@ AC_DEFINE_UNQUOTED(BUILD_REVISION, "$BUILD_REVISION",
                    [Subversion revision used to build this package])
 
 
+# Substitutions to set generated files in a Emacs buffer to read-only.
+AC_SUBST(emacs_local_vars_begin, ['Local Variables:'])
+AC_SUBST(emacs_local_vars_read_only, ['buffer-read-only: t'])
+AC_SUBST(emacs_local_vars_end, ['End:'])
+
 
 # And create the files.
 AC_CONFIG_FILES([
index fe541dd..ff5cc54 100644 (file)
@@ -1,3 +1,8 @@
+2010-03-15  Werner Koch  <wk@g10code.com>
+
+       * gcrypt.h.in: Add autoconf template to set generated file to
+       read-only in an Emacs buffer.
+
 2010-01-21  Werner Koch  <wk@g10code.com>
 
        * Makefile.am (arch_gpg_error_cflags, arch_gpg_error_libs): New.
index f8c75b6..e5bd704 100644 (file)
@@ -1831,3 +1831,8 @@ int gcry_is_secure (const void *a) _GCRY_GCC_ATTR_PURE;
 }
 #endif
 #endif /* _GCRYPT_H */
+/*
+@emacs_local_vars_begin@
+@emacs_local_vars_read_only@
+@emacs_local_vars_end@
+*/