On Wed, Oct 19, 2005 at 09:39:29PM +0200, Agustin Martin wrote:
> On Wed, Oct 19, 2005 at 01:23:28PM -0400, Peter S Galbraith wrote:
> > Package: dictionaries-common
> > Version: 0.24.10
> > Severity: normal
> > File: /etc/emacs/site-start.d/50dictionaries-common.el
... 
> > It would be preferable that Emacs user configuration preferences not
> > be done in a system file (which users don't have the privileges to edit)
> > but rather through the use of an Emacs customization variable
> > (defcustom). 
> > 
> > I realize that this isn't an Emacs package and you may not have the
> > skills to implement this.  Let me know if a patch is required.
> 
> Thanks for the report and the offer,
> 
> The problem here is that the default behavior should be to refresh emacs
> spellcheck pop-up menu on calling the above code, so it shows the really
> available dictionaries, and the optional one not to do that, at least in X
> environments. If I am not wrong, ~/.emacs is loaded last, so I do not think
> that can be done straighforward from ~/.emacs at the stage it is loaded.
> 
> Thinking again about this, some sort of final hook might be useful, provided
> it is available for both emacs and xemacs. Do you think that after-init-hook
> would be appropriate for this?

I hope something like the code below (in debian-ispell.el) should help with
this (only minimally tested)

----------------------------- snip ------------------------------------

;;; ----------------------------------------------------------------------
;;;  Handle ispell.el load at startup
;;; ----------------------------------------------------------------------

(defcustom debian-ispell-load-on-startup-nox nil
  "*Load ispell on startup for console mode sessions"
  :type 'boolean
  :group 'ispell)

(defcustom debian-ispell-load-on-startup-x t
  "*Load ispell on startup for X sessions"
  :type 'boolean
  :group 'ispell)

(defun debian-ispell-load-on-startup ()
  (if (or (and (or (eq window-system 'x)
                   (eq window-system 'gtk))
               debian-ispell-load-on-startup-x)
          (and (not window-system)
               debian-ispell-load-on-startup-nox))
      (progn
        (setq ispell-menu-xemacs nil)
        (ispell-change-dictionary nil)))
  )

(add-hook 'after-init-hook 'debian-ispell-load-on-startup)

----------------------------- snip ------------------------------------

and make it really an user option, allowing us to remove the problematic
code from the startup file (Yes, I also do not like that file to be user
editable).

Suggestions are welcome,

Cheers

-- 
Agustin


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

Reply via email to