Package: php-elisp Version: 1.5.0-1 Severity: normal Suppose I install and then remove php-elisp. This file remains:
/etc/emacs/site-start.d/50php-elisp.el because it is a conffile. Fine. But then I start Emacs and open a .php file and get the error: File mode specification error: (file-error "Cannot open load file" "php-elisp/php-mode") This is because the code: (setq auto-mode-alist (cons '("\\.php[34]?\\'\\|\\.phtml\\." . php-mode) auto-mode-alist)) (autoload 'php-mode "php-elisp/php-mode" "mode for editing php files" t) in 50php-elisp.el is run unconditionally. I recommend code that detects (1) whether the package has been removed but not purged and (2) whether the package has been correctly byte-compiled. A better /etc/emacs/site-start.d/50php-elisp.el file is attached which you can use as debian/emacsen-startup Thanks, Peter -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.32-3-686 (SMP w/2 CPU cores) Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages php-elisp depends on: ii emacs22 [emacsen] 22.3+1-1.2 The GNU Emacs editor ii emacs23 [emacsen] 23.1+1-6 The GNU Emacs editor (with GTK+ us ii xemacs21-mule [emacsen] 21.4.22-2 highly customizable text editor -- Versions of packages php-elisp recommends: ii speedbar 1:1.0pre4-3 Everything browser, or Dired on st Versions of packages php-elisp suggests: pn php5 <none> (no description available) pn php5-cli <none> (no description available) -- Configuration Files: /etc/emacs/site-start.d/50php-elisp.el changed: ;; -*-emacs-lisp-*- ;; ;; Emacs startup file for the Debian GNU/Linux php-elisp package ;; ;; Originally contributed by Nils Naumann <naum...@unileoben.ac.at> ;; Modified by Dirk Eddelbuettel <e...@debian.org> ;; Adapted for dh-make by Jim Van Zandt <j...@vanzandt.mv.com> ;; Peter S Galbraith <p...@debian.org> 2010-06-05 ;; Check if package is installed and correctly byte-compiled. ;; The php-elisp package follows the Debian/GNU Linux 'emacsen' policy and ;; byte-compiles its elisp files for each 'emacs flavor' (emacs19, ;; xemacs19, emacs20, xemacs20...). The compiled code is then ;; installed in a subdirectory of the respective site-lisp directory. (cond ((not (file-exists-p "/usr/share/emacs/site-lisp/php-elisp/php-mode.el")) (message "Package php-elisp removed but not purged. Skipping setup.")) ((not (file-exists-p (concat "/usr/share/" (symbol-name debian-emacs-flavor) "/site-lisp/php-elisp/php-mode.elc"))) (message "Package php-elisp is not fully installed. Skipping setup.")) (t (setq auto-mode-alist (cons '("\\.php[34]?\\'\\|\\.phtml\\." . php-mode) auto-mode-alist)) (autoload 'php-mode "php-elisp/php-mode" "mode for editing php files" t))) -- no debconf information
;; -*-emacs-lisp-*- ;; ;; Emacs startup file for the Debian GNU/Linux php-elisp package ;; ;; Originally contributed by Nils Naumann <naum...@unileoben.ac.at> ;; Modified by Dirk Eddelbuettel <e...@debian.org> ;; Adapted for dh-make by Jim Van Zandt <j...@vanzandt.mv.com> ;; Peter S Galbraith <p...@debian.org> 2010-06-05 ;; Check if package is installed and correctly byte-compiled. ;; The php-elisp package follows the Debian/GNU Linux 'emacsen' policy and ;; byte-compiles its elisp files for each 'emacs flavor' (emacs19, ;; xemacs19, emacs20, xemacs20...). The compiled code is then ;; installed in a subdirectory of the respective site-lisp directory. (cond ((not (file-exists-p "/usr/share/emacs/site-lisp/php-elisp/php-mode.el")) (message "Package php-elisp removed but not purged. Skipping setup.")) ((not (file-exists-p (concat "/usr/share/" (symbol-name debian-emacs-flavor) "/site-lisp/php-elisp/php-mode.elc"))) (message "Package php-elisp is not fully installed. Skipping setup.")) (t (setq auto-mode-alist (cons '("\\.php[34]?\\'\\|\\.phtml\\." . php-mode) auto-mode-alist)) (autoload 'php-mode "php-elisp/php-mode" "mode for editing php files" t)))