WikipediaMode

wikipedia-mode.el is a simple MajorMode for editing Wikipedia articles (http://en.wikipedia.org/). It provides syntax highlighting for Wikipedia’s wiki markup.

wikipedia-mode is not maintained any more. Try mediawiki.el at: https://launchpad.net/mediawiki-el

See general text editor support for wikipedia and this wikipedia page about Wikipedia-mode

You should also download LongLines to get Emacs to handle soft word wrapping, which is the standard for Wikipedia, unless you use Emacs 23 in which case it’s already included.

See also: WikipediaAlternative, TexMathPreview


CategoryModes CategoryHypermedia


I don’t comment on this forum often, so please forgive if I am not abiding by decorum… and also, inform me if I am not.

I updated the code in this mode to make longlines an option. I use truncate-long-lines in simple in all my modes, and am used to it, and prefer to use that.

Below are my edits:

(defgroup wikipedia nil
  "A mode to wikipedia-draft information."
  :group 'data)

(defcustom wikipedia-use-longlines t
  "If non-nil, remove multiple SQL*Plus prompts after starting."
  :type 'boolean
  :group 'wikipedia)

(defun wikipedia-turn-on-longlines ()	;Version:1.58
  "Turn on longlines-mode if it is defined."
  (if (and (functionp 'longlines-mode) wikipedia-use-longlines)
      (longlines-mode 1)))
(add-hook 'wikipedia-mode-hook 'wikipedia-turn-on-longlines)
(set (make-local-variable 'auto-fill-inhibit-regexp) "^[ *#:|;]")

StewartBryson


Here is a patch for wikipedia-mode that will make it prefer visual-line-mode over the deprecated longlines-mode in Emacs 23. – UlrichMüller

--- wikipedia-mode.el~
+++ wikipedia-mode.el
@@ -945,9 +945,11 @@
  ;;{{{ longlines-mode
 
 (defun wikipedia-turn-on-longlines ()	;Version:1.58
-  "Turn on longlines-mode if it is defined."
-  (if (functionp 'longlines-mode)
-      (longlines-mode 1)))
+  "Turn on visual-line-mode or longlines-mode if it is defined."
+  (cond ((functionp 'visual-line-mode)
+	 (visual-line-mode 1))
+	((functionp 'longlines-mode)
+	 (longlines-mode 1))))
 (add-hook 'wikipedia-mode-hook 'wikipedia-turn-on-longlines)
 (set (make-local-variable 'auto-fill-inhibit-regexp) "^[ *#:|;]")