savehist.el coding system (patch) [was: [XEmacs] Install Wizard]

Stephen J. Turnbull stephen at xemacs.org
Fri Apr 7 11:57:59 EDT 2006


>>>>> "vin" == Vin Shelton <acs at alumni.princeton.edu> writes:

    vin> Patches are certainly welcome to address this problem.

Untested, posted for discussion.  This has the advantage of picking up
UTF-8 if Mule-UCS is already loaded, which is normally done in
init.el.  We could try a `require' to make sure.

Index: savehist.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/edit-utils/savehist.el,v
retrieving revision 1.4
diff -u -r1.4 savehist.el
--- savehist.el	14 Nov 2005 07:05:54 -0000	1.4
+++ savehist.el	7 Apr 2006 15:54:27 -0000
@@ -135,12 +135,17 @@
 
 ;; This should be capable of representing characters used by Emacs.
 ;; We prefer UTF-8 over ISO 2022 because it is well-known outside
-;; Mule.  XEmacs prir to 21.5 had UTF-8 provided by an external
+;; Mule.  XEmacs prior to 21.5 had UTF-8 provided by an external
 ;; package which may not be loaded, which is why we check for version.
-(defvar savehist-coding-system (if (and (featurep 'xemacs)
-					(<= emacs-major-version 21)
-					(< emacs-minor-version 5))
-				   'iso-2022-8 'utf-8)
+(defvar savehist-coding-system (if (featurep 'xemacs)
+				   (if (featurep 'mule)
+				       (or (find-coding-system 'utf-8)
+					   (find-coding-system 'iso-2022-8)
+					   ;; #### eh?!  should error?
+					   (find-coding-system 'binary))
+				     'binary)
+				 ;; assume Emacs 20, at least
+				 'utf-8))
   "The coding system savehist uses for saving the minibuffer history.
 Changing this value while Emacs is running is supported, but considered
 unwise, unless you know what you are doing.")




-- 
School of Systems and Information Engineering http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba                    Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
               Ask not how you can "do" free software business;
              ask what your business can "do for" free software.




More information about the XEmacs-Beta mailing list