emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bootstrap fails due to flyspell.el change.


From: Lute Kamstra
Subject: Re: Bootstrap fails due to flyspell.el change.
Date: Tue, 07 Jun 2005 12:54:05 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Lute Kamstra <address@hidden> writes:

> Since this change:
>
> 2005-06-06  Stefan Monnier  <address@hidden>
>
>       * textmodes/flyspell.el
>       (flyspell-mode-map): Don't overwrite at each load.  Remove code
>       redundant with the subsequent add-minor-mode.  Merge Emacs and
>       XEmacs code.
>
> (more specifically: since the removal of the autoload cookie of
> flyspell-mode-map), bootstrapping fails when loaddefs.el is loaded:
>
>   Loading faces (source)...
>   Lists of integers (garbage collection statistics) are normal output
>   while building Emacs; they do not indicate a problem.
>   ((89820 . 30443) (5309 . 52) (559 . 111) 341871 34737 (14 . 1) (18 . 0) 
> (6755 . 490))
>   Loading loaddefs.el (source)...
>   Symbol's value as variable is void: flyspell-mode-map
>   make[1]: *** [bootstrap-emacs] Error 255
>   make[1]: Leaving directory `/soft/careful/emacs/src'
>   make: *** [bootstrap-build] Error 2
>
> To me, the obvious solutions is to put back the autoload cookie.

On second thought: it's probably better to solve the problem by using
define-minor-mode to implement flyspell-mode.  Does anyone see any
problems with the patch below?

Lute.


Index: lisp/textmodes/flyspell.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/textmodes/flyspell.el,v
retrieving revision 1.65
diff -c -r1.65 flyspell.el
*** lisp/textmodes/flyspell.el  6 Jun 2005 21:06:19 -0000       1.65
--- lisp/textmodes/flyspell.el  7 Jun 2005 10:39:19 -0000
***************
*** 468,474 ****
  ;*    flyspell-mode ...                                                */
  ;*---------------------------------------------------------------------*/
  ;;;###autoload
! (defun flyspell-mode (&optional arg)
    "Minor mode performing on-the-fly spelling checking.
  This spawns a single Ispell process and checks each word.
  The default flyspell behavior is to highlight incorrect words.
--- 468,474 ----
  ;*    flyspell-mode ...                                                */
  ;*---------------------------------------------------------------------*/
  ;;;###autoload
! (define-minor-mode flyspell-mode
    "Minor mode performing on-the-fly spelling checking.
  This spawns a single Ispell process and checks each word.
  The default flyspell behavior is to highlight incorrect words.
***************
*** 496,523 ****
  
  \\[flyspell-region] checks all words inside a region.
  \\[flyspell-buffer] checks the whole buffer."
!   (interactive "P")
!   (let ((old-flyspell-mode flyspell-mode))
!     ;; Mark the mode as on or off.
!     (setq flyspell-mode (not (or (and (null arg) flyspell-mode)
!                                (<= (prefix-numeric-value arg) 0))))
!     ;; Do the real work.
!     (unless (eq flyspell-mode old-flyspell-mode)
!       (if flyspell-mode
!         (flyspell-mode-on)
!       (flyspell-mode-off))
!       ;; Force modeline redisplay.
!       (set-buffer-modified-p (buffer-modified-p)))))
! 
! ;*---------------------------------------------------------------------*/
! ;*    Autoloading                                                      */
! ;*---------------------------------------------------------------------*/
! ;;;###autoload
! (add-minor-mode 'flyspell-mode
!               'flyspell-mode-line-string
!               flyspell-mode-map
!               nil
!               'flyspell-mode)
  
  ;*---------------------------------------------------------------------*/
  ;*    flyspell-buffers ...                                             */
--- 496,507 ----
  
  \\[flyspell-region] checks all words inside a region.
  \\[flyspell-buffer] checks the whole buffer."
!   :lighter flyspell-mode-line-string
!   :keymap flyspell-mode-map
!   :group 'flyspell
!   (if flyspell-mode
!       (flyspell-mode-on)
!     (flyspell-mode-off)))
  
  ;*---------------------------------------------------------------------*/
  ;*    flyspell-buffers ...                                             */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]