Package: dictionary-el
Version: 1.8.7-1
Severity: normal
Tags: patch

Steps to reproduce:

   apt-get install dictionary-el
   apt-get install --reinstall emacs21

BLAM.

To get your Emacs back, remove dictionary-el, install emacs21, and then
install dictionary-el again (if you want it).

You might ask, why would anyone want to reinstall their Emacs?  Well, I don't
know, but the problem also occurs when attempting to install a new
Emacs flavor, such as Jerome Marant's excellent emacs-snapshot.

Anyway, the problem is in /etc/emacs/site-start.d/50dictionary-el.el:

   (setq load-path (cons (concat "/usr/share/"
                                 (symbol-name flavor)
                                 "/site-lisp/dictionary-el") load-path))

   (load "dictionary-init")

That is, it adds a flavor-specific directory to `load-path' and then assumes
that it will be able to load something.  This works when the package files
have been byte-compiled for whatever flavor is starting, but when Emacs is
being installed fresh, there are no files in /usr/share/$flavor/site-lisp/.
This creates a chicken-and-egg situation where Emacs needs the
dictionary-init.elc file to byte-compile the dictionary-init.el file.

To fix this, I suggest avoiding loading things from the package startup file.
Here, I've simply replaced (load "dictionary-init") with the contents of
dictionary-init.el, which just contained a bunch of autoloads anyway.
This seems to be what most packages do.  (Except a few that also suffer from
this problem; I'll get to those if this patch is accepted.)

By the way, is there any reason to keep the deb/ directory around, when there
is a debian/ directory which is better in all respects?  If we removed deb/,
we could nuke dictionary-init.el completely.

--- dictionary-el-1.8.7/debian/emacsen-startup~ 2005-05-09 11:17:40.259989288 
+0200
+++ dictionary-el-1.8.7/debian/emacsen-startup  2005-05-09 14:48:10.608884400 
+0200
@@ -14,4 +14,21 @@
 (setq load-path (cons (concat "/usr/share/"
                               (symbol-name flavor)
                              "/site-lisp/dictionary-el") load-path))
-(load "dictionary-init")
+
+(autoload 'dictionary-search "dictionary"
+  "Ask for a word and search it in all dictionaries" t)
+(autoload 'dictionary-match-words "dictionary"
+  "Ask for a word and search all matching words in the dictionaries" t)
+(autoload 'dictionary-lookup-definition "dictionary"
+  "Unconditionally lookup the word at point." t)
+(autoload 'dictionary "dictionary"
+  "Create a new dictionary buffer" t)
+(autoload 'dictionary-mouse-popup-matching-words "dictionary"
+  "Display entries matching the word at the cursor" t)
+(autoload 'dictionary-popup-matching-words "dictionary"
+  "Display entries matching the word at the point" t)
+(autoload 'dictionary-tooltip-mode "dictionary"
+  "Display tooltips for the current word" t)
+(unless (boundp 'running-xemacs)
+  (autoload 'global-dictionary-tooltip-mode "dictionary"
+    "Enable/disable dictionary-tooltip-mode for all buffers" t))


-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.7-drlion-8
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages dictionary-el depends on:
ii  emacs-snapshot [emacsen 20050425220908-1 The GNU Emacs editor
ii  emacs21 [emacsen]       21.4a-1          The GNU Emacs editor

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to