Subject: Re: wikipedia-mode hard to fix linebreaks

From: Uwe Brauer <[email-masked]>
Date: Mon, 10 May 2010 12:41:31 +0200

>>>>> On Mon, 10 May 2010 18:06:43 +0800, [email-masked] wrote:

   > Sorry Uwe, I have now fixed my problem. I did it by putting this in
   > ~/.emacs-w3m.el :
well I am glad but I still don't understand: wikipedia-mode
is a mayor mode, (all files with extension .wiki have this
mode turned on.)

but it seems you edited a file in
w3m-form-input-textarea-mode-hook! Of course in the mode,
auto-fill might be turned on.

BTW longlines mode is for *displaying* longlines it has
nothing to do with linebreaks!

Well another solution would be to modify the auto-list.

(add-to-list  'auto-mode-alist
     (cons '("\\.wiki\\'" . wikipedia-mode) auto-mode-alist))

and substitute .wiki by the extension you like.

Uwe 

   > (autoload 'wikipedia-mode "wikipedia-mode.el")
   > (add-hook
   >  'w3m-form-input-textarea-mode-hook
   >  (lambda nil
   >    (turn-off-auto-fill)
   >    (wikipedia-mode)
   >    (longlines-mode 0) ;;The Key, DISCOVERED QUITE ON MY OWN
   >    (define-key wikipedia-mode-map "\C-c\C-c" 'w3m-form-input-textarea-set)
   >    (define-key wikipedia-mode-map "\M-u" 'upcase-word)
   >    ))