aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier2005-11-11 04:23:02 +0000
committerStefan Monnier2005-11-11 04:23:02 +0000
commitbe93a2c4484181639c468e79f015739129eaa90b (patch)
tree683c950eaabffd7419c745e77f41e3ad89e26382 /lisp
parentf6cb7e0afb7e93455b207c12ec05f8239aea6773 (diff)
downloademacs-be93a2c4484181639c468e79f015739129eaa90b.tar.gz
emacs-be93a2c4484181639c468e79f015739129eaa90b.zip
(jka-compr-install): Use push and dolist.
Add jka-compr-load-suffixes to load-suffixes.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog49
-rw-r--r--lisp/jka-cmpr-hook.el74
2 files changed, 79 insertions, 44 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4334eaf7cc6..ff9446de599 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,20 @@
12005-11-10 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * jka-cmpr-hook.el (jka-compr-install): Use push and dolist.
4 Add jka-compr-load-suffixes to load-suffixes.
5
6 * jka-compr.el: Require 'jka-cmpr-hook.
7 (jka-compr-info-compress-message, jka-compr-info-compress-program)
8 (jka-compr-info-compress-args, jka-compr-info-uncompress-message)
9 (jka-compr-info-uncompress-program, jka-compr-info-uncompress-args)
10 (jka-compr-info-can-append, jka-compr-info-strip-extension)
11 (jka-compr-info-file-magic-bytes, jka-compr-get-compression-info)
12 (jka-compr-info-regexp): Remove. Provided by jka-cmpr-hook.
13 (jka-compr-uninstall): Remove entries from
14 jka-compr-added-to-file-coding-system-alist after they are used.
15 (jka-compr-error): Remove unused var `curbuf'.
16 (jka-compr-file-local-copy): Remove unused var `notfound'.
17
12005-11-10 Romain Francoise <romain@orebokech.com> 182005-11-10 Romain Francoise <romain@orebokech.com>
2 19
3 * apropos.el (apropos-calc-scores): Use `apropos-pattern'. 20 * apropos.el (apropos-calc-scores): Use `apropos-pattern'.
@@ -7,6 +24,26 @@
7 * progmodes/gud.el (gud-menu-map): Move parentheses. 24 * progmodes/gud.el (gud-menu-map): Move parentheses.
8 (gdb): New command gud-pv. 25 (gdb): New command gud-pv.
9 26
272005-11-10 Stefan Monnier <monnier@iro.umontreal.ca>
28
29 * tar-mode.el: Remove spurious or unnecessary leading stars
30 in docstrings.
31 (tar-header-block-tokenize): Also obey default-file-name-coding-system.
32 (tar-parse-octal-integer-safe): Use mapc.
33 (tar-header-block-summarize): Remove unused var `ck'.
34 (tar-summarize-buffer): Don't clear the modified-p bit if it wasn't
35 cleared before. Obey default-enable-multibyte-characters.
36 Use mapconcat. Simplify setting of tar-header-offset.
37 (tar-mode-map): Move initialization inside delcaration.
38 (tar-flag-deleted): Use `abs'.
39 (tar-expunge-internal): Remove unused var `line'.
40 (tar-expunge-internal): Don't hardcode point-min==1.
41 (tar-expunge): Widen while doing set-buffer-multibyte.
42 (tar-rename-entry): Use file-name-coding-system.
43 (tar-alter-one-field): Don't hardcode point-min==1.
44 (tar-subfile-save-buffer): string-as-unibyte works on unibyte strings.
45 (tar-pad-to-blocksize): Don't hardcode point-min==1. Clarify the code.
46
102005-11-10 Masatake YAMATO <jet@gyve.org> 472005-11-10 Masatake YAMATO <jet@gyve.org>
11 48
12 * add-log.el (add-log-current-defun): Handle class::method 49 * add-log.el (add-log-current-defun): Handle class::method
@@ -23,10 +60,18 @@
23 string to `Man-arguments' if it is nil. 60 string to `Man-arguments' if it is nil.
24 Suggested by Reiner Steib <Reiner.Steib@gmx.de>. 61 Suggested by Reiner Steib <Reiner.Steib@gmx.de>.
25 62
632005-11-09 Stefan Monnier <monnier@iro.umontreal.ca>
64
65 * Makefile.in (mh-loaddefs.el, loaddefs.el): Better follow the
66 commenting conventions.
67
68 * cus-dep.el (custom-make-dependencies): Simplify.
69 Better follow the commenting conventions.
70
262005-11-09 Richard M. Stallman <rms@gnu.org> 712005-11-09 Richard M. Stallman <rms@gnu.org>
27 72
28 * apropos.el (apropos-pattern): Renamed from apropos-regexp. 73 * apropos.el (apropos-pattern): Rename from apropos-regexp.
29 (apropos-orig-pattern): Renamed from apropos-orig-regexp. 74 (apropos-orig-pattern): Rename from apropos-orig-regexp.
30 All uses changed. 75 All uses changed.
31 (apropos-rewrite-regexp): Doc fix. 76 (apropos-rewrite-regexp): Doc fix.
32 (apropos-variable, apropos-command, apropos, apropos-value): 77 (apropos-variable, apropos-command, apropos, apropos-value):
diff --git a/lisp/jka-cmpr-hook.el b/lisp/jka-cmpr-hook.el
index fb0a62d602d..65f624c110b 100644
--- a/lisp/jka-cmpr-hook.el
+++ b/lisp/jka-cmpr-hook.el
@@ -40,8 +40,8 @@
40 "jka-compr customization." 40 "jka-compr customization."
41 :group 'compression) 41 :group 'compression)
42 42
43;;; I have this defined so that .Z files are assumed to be in unix 43;; I have this defined so that .Z files are assumed to be in unix
44;;; compress format; and .gz files, in gzip format, and .bz2 files in bzip fmt. 44;; compress format; and .gz files, in gzip format, and .bz2 files in bzip fmt.
45(defcustom jka-compr-compression-info-list 45(defcustom jka-compr-compression-info-list
46 ;;[regexp 46 ;;[regexp
47 ;; compr-message compr-prog compr-args 47 ;; compr-message compr-prog compr-args
@@ -158,7 +158,7 @@ invoked."
158 jka-compr-compression-info-list 158 jka-compr-compression-info-list
159 "\\|")) 159 "\\|"))
160 160
161;;; Functions for accessing the return value of jka-compr-get-compression-info 161;; Functions for accessing the return value of jka-compr-get-compression-info
162(defun jka-compr-info-regexp (info) (aref info 0)) 162(defun jka-compr-info-regexp (info) (aref info 0))
163(defun jka-compr-info-compress-message (info) (aref info 1)) 163(defun jka-compr-info-compress-message (info) (aref info 1))
164(defun jka-compr-info-compress-program (info) (aref info 2)) 164(defun jka-compr-info-compress-program (info) (aref info 2))
@@ -192,48 +192,38 @@ and `inhibit-first-line-modes-suffixes'."
192 (setq jka-compr-file-name-handler-entry 192 (setq jka-compr-file-name-handler-entry
193 (cons (jka-compr-build-file-regexp) 'jka-compr-handler)) 193 (cons (jka-compr-build-file-regexp) 'jka-compr-handler))
194 194
195 (setq file-name-handler-alist (cons jka-compr-file-name-handler-entry 195 (push jka-compr-file-name-handler-entry file-name-handler-alist)
196 file-name-handler-alist)) 196
197 197 (dolist (x jka-compr-compression-info-list)
198 (setq jka-compr-added-to-file-coding-system-alist nil) 198 ;; Don't do multibyte encoding on the compressed files.
199 199 (let ((elt (cons (jka-compr-info-regexp x)
200 (mapcar 200 '(no-conversion . no-conversion))))
201 (function (lambda (x) 201 (push elt file-coding-system-alist)
202 ;; Don't do multibyte encoding on the compressed files. 202 (push elt jka-compr-added-to-file-coding-system-alist))
203 (let ((elt (cons (jka-compr-info-regexp x) 203
204 '(no-conversion . no-conversion)))) 204 (and (jka-compr-info-strip-extension x)
205 (setq file-coding-system-alist 205 ;; Make entries in auto-mode-alist so that modes
206 (cons elt file-coding-system-alist)) 206 ;; are chosen right according to the file names
207 (setq jka-compr-added-to-file-coding-system-alist 207 ;; sans `.gz'.
208 (cons elt jka-compr-added-to-file-coding-system-alist))) 208 (push (list (jka-compr-info-regexp x) nil 'jka-compr) auto-mode-alist)
209 209 ;; Also add these regexps to
210 (and (jka-compr-info-strip-extension x) 210 ;; inhibit-first-line-modes-suffixes, so that a
211 ;; Make entries in auto-mode-alist so that modes 211 ;; -*- line in the first file of a compressed tar
212 ;; are chosen right according to the file names 212 ;; file doesn't override tar-mode.
213 ;; sans `.gz'. 213 (push (jka-compr-info-regexp x)
214 (setq auto-mode-alist 214 inhibit-first-line-modes-suffixes)))
215 (cons (list (jka-compr-info-regexp x)
216 nil 'jka-compr)
217 auto-mode-alist))
218 ;; Also add these regexps to
219 ;; inhibit-first-line-modes-suffixes, so that a
220 ;; -*- line in the first file of a compressed tar
221 ;; file doesn't override tar-mode.
222 (setq inhibit-first-line-modes-suffixes
223 (cons (jka-compr-info-regexp x)
224 inhibit-first-line-modes-suffixes)))))
225 jka-compr-compression-info-list)
226 (setq auto-mode-alist 215 (setq auto-mode-alist
227 (append auto-mode-alist jka-compr-mode-alist-additions)) 216 (append auto-mode-alist jka-compr-mode-alist-additions))
228 217
229 ;; Make sure that (load "foo") will find /bla/foo.el.gz. 218 ;; Make sure that (load "foo") will find /bla/foo.el.gz.
230 (setq load-suffixes 219 (setq load-suffixes
231 (apply 'append 220 (apply 'append
232 (mapcar (lambda (suffix) 221 (append (mapcar (lambda (suffix)
233 (cons suffix 222 (cons suffix
234 (mapcar (lambda (ext) (concat suffix ext)) 223 (mapcar (lambda (ext) (concat suffix ext))
235 jka-compr-load-suffixes))) 224 jka-compr-load-suffixes)))
236 load-suffixes)))) 225 load-suffixes)
226 (list jka-compr-load-suffixes)))))
237 227
238 228
239(defun jka-compr-installed-p () 229(defun jka-compr-installed-p ()
@@ -277,15 +267,15 @@ Returns the new status of auto compression (non-nil means on)."
277(put 'with-auto-compression-mode 'lisp-indent-function 0) 267(put 'with-auto-compression-mode 'lisp-indent-function 0)
278 268
279 269
280;;; This is what we need to know about jka-compr-handler 270;; This is what we need to know about jka-compr-handler
281;;; in order to decide when to call it. 271;; in order to decide when to call it.
282 272
283(put 'jka-compr-handler 'safe-magic t) 273(put 'jka-compr-handler 'safe-magic t)
284(put 'jka-compr-handler 'operations '(byte-compiler-base-file-name 274(put 'jka-compr-handler 'operations '(byte-compiler-base-file-name
285 write-region insert-file-contents 275 write-region insert-file-contents
286 file-local-copy load)) 276 file-local-copy load))
287 277
288;;; Turn on the mode. 278;; Turn on the mode.
289(auto-compression-mode 1) 279(auto-compression-mode 1)
290 280
291(provide 'jka-cmpr-hook) 281(provide 'jka-cmpr-hook)