Bug#669319: bhl: visiting .bhl after --remove
Package: bhl
Version: 1.7.3-2
Severity: normal
File: /etc/emacs/site-start.d/50bhl.el
After
dpkg --remove bhl
visiting a .bhl file
emacs23 -q /tmp/foo.bhl
gives an error
File mode specification error: (file-error "Cannot open load file" "bhl")
where I hoped it would just give fundamental-mode or whatever.
dpkg --remove leaves behind conf files like 50bhl.el. Generally the
lisp startup should check for the package contents before making an
auto-mode-alist setup. Eg.
(if (not (file-exists-p "/usr/share/emacs/site-lisp/bhl.el"))
(message "bhl removed but not purged, skipping setup")
(autoload ...)
(add-to-list '...))
Incidentally, the auto-load-alist regexp usually should be
"\\.bhl\\'"
rather than "\\.bhl$" since $ matches a newline whereas \\' is end of
string -- in the highly unlikely event a non-bhl file has ".bhl\n" in
its name :-).
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (990, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.32-5-486
Locale: LANG=en_AU, LC_CTYPE=en_AU (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/dash
Versions of packages bhl depends on:
ii dpkg 1.15.8.8
ii emacs21 [emacsen] 21.4a+1-5.7
ii emacs22-gtk [emacsen] 22.3+1-1.2
ii emacs23 [emacsen] 23.3+1-1
ii install-info 4.13a.dfsg.1-8
ii xemacs21-mule [emacsen] 21.4.22-3.2
bhl recommends no packages.
bhl suggests no packages.
-- no debconf information
Reply to: