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

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

dynamic-completion-mode and emacs-intro example ;-(


From: Alexander Mikhailian
Subject: dynamic-completion-mode and emacs-intro example ;-(
Date: Sun, 27 May 2001 19:58:14 +0200

This bug report will be sent to the Free Software Foundation,
 not to your local site managers!!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

In GNU Emacs 20.7.2 (i386-debian-linux-gnu, X toolkit)
 of Tue Jun 20 2000 on raven
configured using `configure  i386-debian-linux-gnu --prefix=/usr 
--sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib 
--infodir=/usr/share/info --with-pop=yes --with-x=yes --with-x-toolkit=yes'

If (dynamic-completion-mode) is enabled, defining and 
executing (count-words-region) function described in the 
emacs-lisp-intro manual breaks this function:

     ;;; Final version: `while'
     (defun count-words-region (beginning end)
       "Print number of words in the region."
       (interactive "r")
       (message "Counting words in region ... ")
     
     ;;; 1. Set up appropriate conditions.
       (save-excursion
         (let ((count 0))
           (goto-char beginning)
     
     ;;; 2. Run the while loop.
           (while (and (< (point) end)
                       (re-search-forward "\\w+\\W*" end t))
             (setq count (1+ count)))
     
     ;;; 3. Send a message to the user.
           (cond ((zerop count)
                  (message
                   "The region does NOT have any words."))
                 ((= 1 count)
                  (message
                   "The region has 1 word."))
                 (t
                  (message
                   "The region has %d words." count))))))


At first sight, it is re-search-forward that gets
broken after the startup of (dynamic-completion-mode)


Recent input:
right right right right right right right C-x C-e C-x 
b return up up up up S-down S-down S-down S-down S-down 
S-down S-down S-down x C-_ C-_ S-up S-up S-up S-up 
S-up S-up M-x up return up up up up up end C-x C-e 
down down down down down S-down S-down S-down S-down 
S-down M-x up return C-x C-s C-x k return C-x C-f up 
up return C-end up up up up up up up up up up up up 
down end C-x C-e down down down down down S-down S-down 
S-down S-down S-down M-x up return menu-bar help-menu 
report-emacs-bug

Recent messages:
The region has 5 words.
(No changes need to be saved)
Fontifying count-words-region.el...
Fontifying count-words-region.el... (regexps............)
count-words-region
Mark set
Counting words in region ... 
The region does NOT have any words.
Loading emacsbug...
Loading emacsbug...done



reply via email to

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