Package: dpkg-dev-el Version: 26.9-1 Severity: normal File: /etc/emacs/site-start.d/50dpkg-dev-el.el
The `debian-changelog-coding-system' function I submitted for choosing utf-8 on a debian-native package changelog.gz gets an error in the upcoming emacs 22. Eg. with the emacs-snapshot, (find-file "/usr/share/doc/menu/changelog.gz") => Wrong type argument: stringp, ("/usr/share/doc/menu/changelog" . #<buffer changelog.gz<2>>) Apparently the filename arg is now a pair. I get some joy from the following, to cope with either string or pair. (defun debian-changelog-coding-system (args) "Return the coding system for a /usr/share/doc/[package]/changelog file. If [package] is a debian native (no separate changelog.Debian) then answer `utf-8', otherwise remove ourselves from `file-coding-system-alist' and see what other rules say." (let ((filename (if (consp (cadr args)) (car (cadr args)) ;; ("filename" . buffer) in emacs 22 (cadr args))) ;; "filename" in emacs 21 (dirname (file-name-directory filename))) (if (file-exists-p (concat dirname "changelog.Debian.gz")) (let ((file-coding-system-alist (remove '("/usr/share/doc/[^/]+/changelog\\'" . debian-changelog-coding-system) file-coding-system-alist))) (apply 'find-operation-coding-system args)) 'utf-8))) -- System Information: Debian Release: 4.0 APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i586) Shell: /bin/sh linked to /bin/dash Kernel: Linux 2.6.15-1-486 Locale: LANG=en_AU, LC_CTYPE=en_AU (charmap=ISO-8859-1) Versions of packages dpkg-dev-el depends on: ii debian-el 26.9-1 Emacs helpers specific to Debian u ii emacs-snapshot [emacsen] 1:20070302-1 The GNU Emacs editor (development ii emacs21 [emacsen] 21.4a+1-3 The GNU Emacs editor ii xemacs21-mule [emacsen] 21.4.19-2 highly customizable text editor -- Versions of packages dpkg-dev-el recommends: ii wget 1.10.2-2 retrieves files from the web -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]