comparison lisp/tar-mode.el @ 104823:68150c643e2e

Use default-value rather than default-enable-multibyte-characters.
author Glenn Morris <rgm@gnu.org>
date Thu, 03 Sep 2009 06:54:57 +0000
parents f50defb23b3e
children 8177db6744a6
comparison
equal deleted inserted replaced
104822:a41e72b7e5fc 104823:68150c643e2e
1 ;;; tar-mode.el --- simple editing of tar files from GNU emacs 1 ;;; tar-mode.el --- simple editing of tar files from GNU emacs
2 2
3 ;; Copyright (C) 1990, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 3 ;; Copyright (C) 1990, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4 ;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 4 ;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
5 ;; Free Software Foundation, Inc.
5 6
6 ;; Author: Jamie Zawinski <jwz@lucid.com> 7 ;; Author: Jamie Zawinski <jwz@lucid.com>
7 ;; Maintainer: FSF 8 ;; Maintainer: FSF
8 ;; Created: 04 Apr 1990 9 ;; Created: 04 Apr 1990
9 ;; Keywords: unix 10 ;; Keywords: unix
265 (string-match nulsexp string tar-prefix-offset) 266 (string-match nulsexp string tar-prefix-offset)
266 (> (match-end 0) (1+ tar-prefix-offset))) 267 (> (match-end 0) (1+ tar-prefix-offset)))
267 (setq name (concat (substring string tar-prefix-offset 268 (setq name (concat (substring string tar-prefix-offset
268 (1- (match-end 0))) 269 (1- (match-end 0)))
269 "/" name))) 270 "/" name)))
270 (if default-enable-multibyte-characters 271 (if (default-value 'enable-multibyte-characters)
271 (setq name 272 (setq name
272 (decode-coding-string name coding) 273 (decode-coding-string name coding)
273 linkname 274 linkname
274 (decode-coding-string linkname coding))) 275 (decode-coding-string linkname coding)))
275 (if (and (null link-p) (string-match "/\\'" name)) 276 (if (and (null link-p) (string-match "/\\'" name))
817 'insert-file-contents 818 'insert-file-contents
818 (cons name (current-buffer)) t))))) 819 (cons name (current-buffer)) t)))))
819 (if (or (not coding) 820 (if (or (not coding)
820 (eq (coding-system-type coding) 'undecided)) 821 (eq (coding-system-type coding) 'undecided))
821 (setq coding (detect-coding-region start end t))) 822 (setq coding (detect-coding-region start end t)))
822 (if (and default-enable-multibyte-characters 823 (if (and (default-value 'enable-multibyte-characters)
823 (coding-system-get coding :for-unibyte)) 824 (coding-system-get coding :for-unibyte))
824 (with-current-buffer buffer 825 (with-current-buffer buffer
825 (set-buffer-multibyte nil))) 826 (set-buffer-multibyte nil)))
826 (widen) 827 (widen)
827 (decode-coding-region start end coding buffer))) 828 (decode-coding-region start end coding buffer)))