emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: autoload and auto-compression-mode


From: Luc Teirlinck
Subject: Re: autoload and auto-compression-mode
Date: Sun, 15 Jan 2006 20:15:29 -0600 (CST)

I think that the following triple of patches should solve your problem
by removing ".gz" from load-suffixes.  Loading will find foo.gz only
if it would find foo and nosuffix is nil.  I can install and make the
necessary accompanying doc changes, if desired.

Sincerely,

Luc.

===File ~/subr-diff=========================================
*** subr.el     30 Dec 2005 08:35:47 -0600      1.493
--- subr.el     15 Jan 2006 19:21:23 -0600      
***************
*** 1328,1334 ****
                     t))
    (let ((file (locate-file library
                           (or path load-path)
!                          (append (unless nosuffix load-suffixes) '("")))))
      (if interactive-call
        (if file
            (message "Library is file %s" (abbreviate-file-name file))
--- 1328,1337 ----
                     t))
    (let ((file (locate-file library
                           (or path load-path)
!                          (append (unless nosuffix load-suffixes)
!                                  '("")
!                                  (unless nosuffix
!                                    jka-compr-load-suffixes)))))
      (if interactive-call
        (if file
            (message "Library is file %s" (abbreviate-file-name file))
============================================================

===File ~/jka-cmpr-hook-diff================================
*** jka-cmpr-hook.el    15 Nov 2005 21:55:16 -0600      1.8
--- jka-cmpr-hook.el    15 Jan 2006 19:26:13 -0600      
***************
*** 140,145 ****
--- 140,146 ----
    :type '(repeat (cons string symbol))
    :group 'jka-compr)
  
+ ;;;###autoload
  (defcustom jka-compr-load-suffixes '(".gz")
    "List of suffixes to try when loading files."
    :type '(repeat string)
***************
*** 217,229 ****
  
    ;; Make sure that (load "foo") will find /bla/foo.el.gz.
    (setq load-suffixes
!       (apply 'append
!              (append (mapcar (lambda (suffix)
!                                (cons suffix
!                                      (mapcar (lambda (ext) (concat suffix 
ext))
!                                              jka-compr-load-suffixes)))
!                              load-suffixes)
!                        (list jka-compr-load-suffixes)))))
  
  
  (defun jka-compr-installed-p ()
--- 218,229 ----
  
    ;; Make sure that (load "foo") will find /bla/foo.el.gz.
    (setq load-suffixes
!       (apply 'append (mapcar (lambda (suffix)
!                                (cons suffix
!                                      (mapcar (lambda (ext)
!                                                (concat suffix ext))
!                                              jka-compr-load-suffixes)))
!                              load-suffixes))))
  
  
  (defun jka-compr-installed-p ()
============================================================

===File ~/ldefs-boot-diff===================================
Index: ldefs-boot.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/ldefs-boot.el,v
retrieving revision 1.12
diff -c -r1.12 ldefs-boot.el
*** ldefs-boot.el       6 Jan 2006 12:05:46 -0000       1.12
--- ldefs-boot.el       16 Jan 2006 02:06:53 -0000
***************
*** 15555,15560 ****
--- 15555,15571 ----
  
  ;;;***
  
+ ;;;### (autoloads (jka-compr-load-suffixes) "jka-cmpr-hook" "jka-cmpr-hook.el"
+ ;;;;;;  (17354 63029))
+ ;;; Generated autoloads from jka-cmpr-hook.el
+ 
+ (defvar jka-compr-load-suffixes (quote (".gz")) "\
+ List of suffixes to try when loading files.")
+ 
+ (custom-autoload (quote jka-compr-load-suffixes) "jka-cmpr-hook")
+ 
+ ;;;***
+ 
  ;;;### (autoloads (jka-compr-uninstall jka-compr-handler) "jka-compr"
  ;;;;;;  "jka-compr.el" (17148 24997))
  ;;; Generated autoloads from jka-compr.el
============================================================




reply via email to

[Prev in Thread] Current Thread [Next in Thread]