Package: emacs-goodies-el Version: 26.9-1 Severity: normal Tags: patch Hi!
Emacs v22 (emacs-snapshot) ships in a conf-mode, which provides a conf-xdefaults-mode for xrdb files. xrdb is some more features than the other package (like electricity), but still clobbering bindings without `emacs-goodies-el-defaults' set in these newer emacsen is a violation of policy. This thus introduces a new customizable option for clobbering the auto-mode-alist defaulting to either t or `emacs-goodies-el-defaults' depending on the emacs used.
--- emacs-goodies-el-orig.el 2006-11-26 21:34:35.537865296 +0530 +++ emacs-goodies-el.el 2006-11-26 21:34:17.668581840 +0530 @@ -6,6 +6,8 @@ ;;; History: ;; +;; 2006-11-26 - Ramkumar R. +;; - Obey `emacs-goodies-el-defaults' for xrdb-mode. ;; 2003-06-14 - Peter Galbraith ;; - Delete autoloads that can be generated automatically. ;; 2003-05-14 - Peter Galbraith @@ -23,7 +25,7 @@ (defcustom emacs-goodies-el-defaults nil "Whether default settings are chosen conservatively or aggressively. non-nil means aggressive. -Setting to aggresisve will enable feature that superceed Emacs defaults." +Setting to aggressive will enable features that supercede Emacs defaults." :type '(radio (const :tag "conservative" nil) (const :tag "aggressive" t)) :link '(custom-manual "(emacs-goodies-el)Top") @@ -166,7 +168,7 @@ (t (if home-end-end-enable (global-set-key [end] home-end-end-enable)) - (if home-end-home-enable + (if home-end-home-enable (global-set-key [home] home-end-home-enable))))) :load 'home-end :group 'emacs-goodies-el) @@ -273,12 +275,43 @@ t) ;; xrdb-mode.el -(add-to-list 'auto-mode-alist '("\\.Xdefaults$" . xrdb-mode)) -(add-to-list 'auto-mode-alist '("\\.Xenvironment$". xrdb-mode)) -(add-to-list 'auto-mode-alist '("\\.Xresources$". xrdb-mode)) -(add-to-list 'auto-mode-alist '("\\.ad$". xrdb-mode)) -(add-to-list 'auto-mode-alist '("/app-defaults/". xrdb-mode)) -(add-to-list 'auto-mode-alist '("/Xresources/". xrdb-mode)) + +(defun xrdb-mode-setup-auto-mode-alist () + (add-to-list 'auto-mode-alist '("\\.Xdefaults$" . xrdb-mode)) + (add-to-list 'auto-mode-alist '("\\.Xenvironment$". xrdb-mode)) + (add-to-list 'auto-mode-alist '("\\.Xresources$". xrdb-mode)) + (add-to-list 'auto-mode-alist '("\\.ad$". xrdb-mode)) + (add-to-list 'auto-mode-alist '("/app-defaults/". xrdb-mode)) + (add-to-list 'auto-mode-alist '("/Xresources/". xrdb-mode))) + +(defcustom xrdb-mode-setup-auto-mode-alist + (or + ;; Check if conf-xdefaults-mode is present + (not (fboundp 'conf-xdefaults-mode)) + ;; Check if default setup provides bindings for conf-xdefaults-mode + (< emacs-major-version 22) + (featurep 'xemacs) + ;; Check if the user wants settings to be clobbered + emacs-goodies-el-defaults) + "Whether to setup mode-alists for xrdb mode. + +Newer versions of Emacs have a conf-xdefaults-mode which provides +this functionality. `xrdb' still has some features (like +electricity) which are absent in that mode. Setting this to +non-nil clobbers the default bindings in such cases. + +This variable defaults to t for older emacsen and the value +`emacs-goodies-el-defaults' for newer ones. + +Customizing this variable might require restarting emacs for the +effects to take effect." + :type 'boolean + :set (lambda (symbol value) + (set-default symbol value) + (when value + (xrdb-mode-setup-auto-mode-alist))) + :group 'emacs-goodies-el + :group 'xrdb) ;; wdired.el (defcustom wdired-enable emacs-goodies-el-defaults
Regards, Ramkumar. -- System Information: Debian Release: 4.0 APT prefers testing APT policy: (101, 'testing') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/dash Kernel: Linux 2.6.16-beyond2 Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Versions of packages emacs-goodies-el depends on: ii bash 3.1-5 The GNU Bourne Again SHell ii emacs-snapshot-gtk [emacsen 1:20061015-1 The GNU Emacs editor (with GTK+ 2. Versions of packages emacs-goodies-el recommends: ii dict 1.10.2-3 Dictionary Client ii perl-doc 5.8.8-6.1 Perl documentation ii wget 1.10.2-2 retrieves files from the web -- no debconf information -- One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs. -- Robert Firth