--- Begin Message ---
Package: emacs-goodies-el
Version: 26.13-1
Severity: wishlist
Hi,
please find attached a diff for markdown-mode inclusion.
The debian/changelog diff is just there to give you the number of the
ITP to be closed. I don't know how you handle emacs-goodies-loaddefs.el
diff, but you might only commit the following part:
,---
| +(autoload (quote markdown-mode) "markdown-mode" "\
| +Major mode for editing Markdown files." t nil)
| +
`---
Please also note that you have a patch modifying debian/changelog, which
surprized me a bit when diffing the whole source tree:
,---
| $ grep -rl ^diff.*debian/changelog debian/patches/
| debian/patches/51_todoo_bug267637.dpatch
`---
It looks like this mode is fully functional with at least both emacs21
and emacs22.
Cheers,
--
Cyril Brulebois
diff -urN emacs-goodies-el.cvs~/emacs-goodies-el/debian/changelog emacs-goodies-el.cvs/emacs-goodies-el/debian/changelog
--- emacs-goodies-el.cvs~/emacs-goodies-el/debian/changelog 2007-07-26 03:53:50.000000000 +0200
+++ emacs-goodies-el.cvs/emacs-goodies-el/debian/changelog 2007-08-02 09:23:26.000000000 +0200
@@ -1,3 +1,13 @@
+emacs-goodies-el (26.14-1) unstable; urgency=low
+
+ [ Cyril Brulebois ]
+ * emacs-goodies-el:
+ New file:
+ - markdown-mode.el: major mode for editing Markdown files
+ (Closes: #435485).
+
+ -- Cyril Brulebois <[EMAIL PROTECTED]> Thu, 02 Aug 2007 07:09:11 +0200
+
emacs-goodies-el (26.13-1) unstable; urgency=low
* Bug fix: "gnus-bonus-el does not know about emacs22", thanks to
diff -urN emacs-goodies-el.cvs~/emacs-goodies-el/debian/control emacs-goodies-el.cvs/emacs-goodies-el/debian/control
--- emacs-goodies-el.cvs~/emacs-goodies-el/debian/control 2007-07-25 19:43:41.000000000 +0200
+++ emacs-goodies-el.cvs/emacs-goodies-el/debian/control 2007-08-02 09:10:39.000000000 +0200
@@ -59,6 +59,7 @@
lcomp - list-completion hacks;
maplev - major mode for Maple;
map-lines - map a command over lines matching a regexp;
+ markdown-mode - major mode for editing Markdown files;
marker-visit - navigate through a buffer's marks in order;
matlab - major mode for MatLab dot-m files;
minibuf-electric - electric minibuffer behavior from XEmacs;
diff -urN emacs-goodies-el.cvs~/emacs-goodies-el/debian/emacs-goodies-el.copyright emacs-goodies-el.cvs/emacs-goodies-el/debian/emacs-goodies-el.copyright
--- emacs-goodies-el.cvs~/emacs-goodies-el/debian/emacs-goodies-el.copyright 2005-10-26 04:16:59.000000000 +0200
+++ emacs-goodies-el.cvs/emacs-goodies-el/debian/emacs-goodies-el.copyright 2007-08-02 09:10:39.000000000 +0200
@@ -710,6 +710,22 @@
`----
+Author/copyright info for markdown-mode.el:
+,----
+| ;; Author: Jason Blevins <[EMAIL PROTECTED]>
+| ;; Created: May 24, 2007
+| ;; $Id: markdown-mode.el,v 1.4 2007/06/29 19:00:40 jrblevin Exp $
+| ;; Keywords: Markdown major mode
+| ;;
+| ;; Copyright (C) 2007 Jason Blevins
+| ;;
+| ;; This program is free software; you can redistribute it and/or modify
+| ;; it under the terms of the GNU General Public License as published by
+| ;; the Free Software Foundation; either version 2, or (at your option)
+| ;; any later version.
+`----
+
+
Author/copyright info for marker-visit.el:
,----
| ;;; marker-visit.el --- navigate through a buffer's marks in order
diff -urN emacs-goodies-el.cvs~/emacs-goodies-el/debian/emacs-goodies-el.install emacs-goodies-el.cvs/emacs-goodies-el/debian/emacs-goodies-el.install
--- emacs-goodies-el.cvs~/emacs-goodies-el/debian/emacs-goodies-el.install 2005-10-26 04:16:59.000000000 +0200
+++ emacs-goodies-el.cvs/emacs-goodies-el/debian/emacs-goodies-el.install 2007-08-02 09:10:39.000000000 +0200
@@ -46,8 +46,9 @@
elisp/emacs-goodies-el/lcomp.el /usr/share/emacs/site-lisp/emacs-goodies-el/
elisp/emacs-goodies-el/maplev.el /usr/share/emacs/site-lisp/emacs-goodies-el/
elisp/emacs-goodies-el/map-lines.el /usr/share/emacs/site-lisp/emacs-goodies-el/
-elisp/emacs-goodies-el/matlab.el /usr/share/emacs/site-lisp/emacs-goodies-el/
+elisp/emacs-goodies-el/markdown-mode.el /usr/share/emacs/site-lisp/emacs-goodies-el/
elisp/emacs-goodies-el/marker-visit.el /usr/share/emacs/site-lisp/emacs-goodies-el/
+elisp/emacs-goodies-el/matlab.el /usr/share/emacs/site-lisp/emacs-goodies-el/
elisp/emacs-goodies-el/minibuf-electric.el /usr/share/emacs/site-lisp/emacs-goodies-el/
elisp/emacs-goodies-el/minibuffer-complete-cycle.el /usr/share/emacs/site-lisp/emacs-goodies-el/
elisp/emacs-goodies-el/mutt-alias.el /usr/share/emacs/site-lisp/emacs-goodies-el/
diff -urN emacs-goodies-el.cvs~/emacs-goodies-el/debian/patches/00list emacs-goodies-el.cvs/emacs-goodies-el/debian/patches/00list
--- emacs-goodies-el.cvs~/emacs-goodies-el/debian/patches/00list 2007-07-26 03:29:41.000000000 +0200
+++ emacs-goodies-el.cvs/emacs-goodies-el/debian/patches/00list 2007-08-02 09:10:39.000000000 +0200
@@ -41,3 +41,4 @@
52_todoo_bug414781
50_setnu
50_projects
+50_markdown_autoload
diff -urN emacs-goodies-el.cvs~/emacs-goodies-el/debian/patches/50_markdown_autoload.dpatch emacs-goodies-el.cvs/emacs-goodies-el/debian/patches/50_markdown_autoload.dpatch
--- emacs-goodies-el.cvs~/emacs-goodies-el/debian/patches/50_markdown_autoload.dpatch 1970-01-01 01:00:00.000000000 +0100
+++ emacs-goodies-el.cvs/emacs-goodies-el/debian/patches/50_markdown_autoload.dpatch 2007-08-02 09:20:55.000000000 +0200
@@ -0,0 +1,18 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 50_markdown_autoload.dpatch by Cyril Brulebois <[EMAIL PROTECTED]>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Add autoload.
+
[EMAIL PROTECTED]@
+
+--- emacs-goodies-el/elisp/emacs-goodies-el/markdown-mode.el~ 2007-07-24 17:46:26.000000000 +0200
++++ emacs-goodies-el/elisp/emacs-goodies-el/markdown-mode.el 2007-08-02 09:19:37.000000000 +0200
+@@ -361,6 +361,7 @@
+
+ ;; Mode definition ===========================================================
+
++;;;###autoload
+ (define-derived-mode markdown-mode fundamental-mode "Markdown"
+ "Major mode for editing Markdown files."
+ ;; Font lock.
diff -urN emacs-goodies-el.cvs~/emacs-goodies-el/debian/README.Debian emacs-goodies-el.cvs/emacs-goodies-el/debian/README.Debian
--- emacs-goodies-el.cvs~/emacs-goodies-el/debian/README.Debian 2005-10-26 04:16:59.000000000 +0200
+++ emacs-goodies-el.cvs/emacs-goodies-el/debian/README.Debian 2007-08-02 09:10:39.000000000 +0200
@@ -185,6 +185,9 @@
map-lines.el provides M-x map-lines, a command to iterate a given
command over lines matching a regexp.
+markdown-mode.el provides support for editing Markdown files. It
+provides syntax highlighting and basic element insertion commands.
+
marker-visit.el provides a simple way to navigate among marks in a buffer.
All the marks you've left while editing a buffer serve as bread crumb
trails of areas in the buffer you've edited. It is convenient to navigate
@@ -323,4 +326,4 @@
resource database files. To use it, simple open a file named
.Xdefaults, .Xenvironment, .Xresources or *.ad.
- -- Peter S Galbraith <[EMAIL PROTECTED]>, Tue Oct 25 21:22:07 2005
+ -- Cyril Brulebois <[EMAIL PROTECTED]>, Thu, 2 Aug 2007 06:56:40 +0200
diff -urN emacs-goodies-el.cvs~/emacs-goodies-el/elisp/emacs-goodies-el/emacs-goodies-custom.el emacs-goodies-el.cvs/emacs-goodies-el/elisp/emacs-goodies-el/emacs-goodies-custom.el
--- emacs-goodies-el.cvs~/emacs-goodies-el/elisp/emacs-goodies-el/emacs-goodies-custom.el 2005-10-26 04:16:59.000000000 +0200
+++ emacs-goodies-el.cvs/emacs-goodies-el/elisp/emacs-goodies-el/emacs-goodies-custom.el 2007-08-02 09:10:39.000000000 +0200
@@ -313,6 +313,15 @@
:load 'matlab
:group 'emacs-goodies-el)
+;; markdown
+(defgroup markdown nil
+ "Markdown mode."
+ :prefix "markdown-"
+ :group 'languages
+ :link '(custom-manual "(emacs-goodies-el)markdown")
+ :load 'markdown
+ :group 'emacs-goodies-el)
+
;; minibuffer-complete-cycle
(defgroup minibuffer-complete-cycle nil
"Cycle through the *Completions* buffer."
diff -urN emacs-goodies-el.cvs~/emacs-goodies-el/elisp/emacs-goodies-el/emacs-goodies-el.texi emacs-goodies-el.cvs/emacs-goodies-el/elisp/emacs-goodies-el/emacs-goodies-el.texi
--- emacs-goodies-el.cvs~/emacs-goodies-el/elisp/emacs-goodies-el/emacs-goodies-el.texi 2007-07-26 03:24:00.000000000 +0200
+++ emacs-goodies-el.cvs/emacs-goodies-el/elisp/emacs-goodies-el/emacs-goodies-el.texi 2007-08-02 09:11:33.000000000 +0200
@@ -107,6 +107,7 @@
* lcomp:: list-completion hacks
* maplev:: Maple major mode
* map-lines:: Map a command over many lines
+* markdown-mode:: Major mode for editing Markdown files
* marker-visit:: Navigate through a buffer's marks in order
* matlab:: Major mode for MATLAB dot-m files
* minibuf-electric:: Electric minibuffer behavior from XEmacs
@@ -2697,7 +2698,7 @@
This mode has full documentation in it's own Info manual.
See @inforef{top, MapleV mode info node, maplev}.
[EMAIL PROTECTED] map-lines, marker-visit, maplev, Top
[EMAIL PROTECTED] map-lines, markdown-mode, maplev, Top
@chapter map-lines - Map a command over many lines
@noindent Author: Andreas Fuchs <asf@@void.at>
@@ -2714,7 +2715,30 @@
Invoke it with @command{M-x map-lines}.
[EMAIL PROTECTED] marker-visit, matlab, map-lines, Top
[EMAIL PROTECTED] markdown-mode, marker-visit, map-lines, Top
[EMAIL PROTECTED] markdown-mode - Major mode for editing Markdown files
+
[EMAIL PROTECTED] Author: Jason Blevins <jrblevin@@sdf.lonestar.org>
+
+This major mode provides syntax highlighting and basic element insertion
+commands for Markdown files.
+
+No extension gets associated with this mode by default since there is no
+official extension: .mdml, .text, .md, .mdt, etc.
+
+To use this mode, either invoke it each time with:
+
[EMAIL PROTECTED]
+ M-X markdown-mode
[EMAIL PROTECTED] example
+
+or insert the following snippet of code in your @file{.emacs} file.
+
[EMAIL PROTECTED]
+ (add-to-list 'auto-mode-alist '("\\.mdwn$" . markdown-mode))
[EMAIL PROTECTED] example
+
[EMAIL PROTECTED] marker-visit, matlab, markdown-mode, Top
@chapter marker-visit - navigate through a buffer's marks in order
@noindent Benjamin Rutt <brutt@@bloomington.in.us>
diff -urN emacs-goodies-el.cvs~/emacs-goodies-el/elisp/emacs-goodies-el/emacs-goodies-loaddefs.el emacs-goodies-el.cvs/emacs-goodies-el/elisp/emacs-goodies-el/emacs-goodies-loaddefs.el
--- emacs-goodies-el.cvs~/emacs-goodies-el/elisp/emacs-goodies-el/emacs-goodies-loaddefs.el 2005-10-26 04:16:59.000000000 +0200
+++ emacs-goodies-el.cvs/emacs-goodies-el/elisp/emacs-goodies-el/emacs-goodies-loaddefs.el 2007-08-02 09:22:21.000000000 +0200
@@ -2,7 +2,7 @@
;;
;;; Code:
-;;;### (autoloads (all) "all" "all.el" (16259 18879))
+;;;### (autoloads (all) "all" "all.el" (18097 33628))
;;; Generated autoloads from all.el
(autoload (quote all) "all" "\
@@ -20,8 +20,8 @@
;;;***
-;;;### (autoloads (apache-mode) "apache-mode" "apache-mode.el" (17102
-;;;;;; 30750))
+;;;### (autoloads (apache-mode) "apache-mode" "apache-mode.el" (18097
+;;;;;; 33628))
;;; Generated autoloads from apache-mode.el
(autoload (quote apache-mode) "apache-mode" "\
@@ -35,7 +35,7 @@
;;;***
;;;### (autoloads (ascii-off ascii-on ascii-display ascii-customize)
-;;;;;; "ascii" "ascii.el" (16313 9500))
+;;;;;; "ascii" "ascii.el" (18097 33628))
;;; Generated autoloads from ascii.el
(autoload (quote ascii-customize) "ascii" "\
@@ -58,7 +58,7 @@
;;;***
;;;### (autoloads (bar-cursor-change bar-cursor-mode) "bar-cursor"
-;;;;;; "bar-cursor.el" (17246 57581))
+;;;;;; "bar-cursor.el" (18097 34331))
;;; Generated autoloads from bar-cursor.el
(autoload (quote bar-cursor-mode) "bar-cursor" "\
@@ -80,7 +80,7 @@
;;;;;; boxquote-describe-variable boxquote-describe-function boxquote-boxquote
;;;;;; boxquote-paragraph boxquote-defun boxquote-yank boxquote-kill-ring-save
;;;;;; boxquote-insert-file boxquote-buffer boxquote-region boxquote-title)
-;;;;;; "boxquote" "boxquote.el" (17245 26633))
+;;;;;; "boxquote" "boxquote.el" (18097 33628))
;;; Generated autoloads from boxquote.el
(autoload (quote boxquote-title) "boxquote" "\
@@ -166,7 +166,7 @@
;;;### (autoloads (browse-huge-tar-copy-file-at-point browse-huge-tar-view-file-at-point
;;;;;; browse-huge-tar-file) "browse-huge-tar" "browse-huge-tar.el"
-;;;;;; (16313 9500))
+;;;;;; (18097 33628))
;;; Generated autoloads from browse-huge-tar.el
(autoload (quote browse-huge-tar-file) "browse-huge-tar" "\
@@ -182,7 +182,7 @@
;;;***
;;;### (autoloads (browse-kill-ring browse-kill-ring-default-keybindings)
-;;;;;; "browse-kill-ring" "browse-kill-ring.el" (17246 57581))
+;;;;;; "browse-kill-ring" "browse-kill-ring.el" (18097 34332))
;;; Generated autoloads from browse-kill-ring.el
(autoload (quote browse-kill-ring-default-keybindings) "browse-kill-ring" "\
@@ -196,8 +196,8 @@
;;;***
-;;;### (autoloads (cfengine-mode) "cfengine" "cfengine.el" (17213
-;;;;;; 19161))
+;;;### (autoloads (cfengine-mode) "cfengine" "cfengine.el" (18097
+;;;;;; 33628))
;;; Generated autoloads from cfengine.el
(autoload (quote cfengine-mode) "cfengine" "\
@@ -218,7 +218,7 @@
;;;***
;;;### (autoloads (color-theme-select) "color-theme" "color-theme.el"
-;;;;;; (17246 57581))
+;;;;;; (18097 34332))
;;; Generated autoloads from color-theme.el
(autoload (quote color-theme-select) "color-theme" "\
@@ -232,7 +232,7 @@
;;;### (autoloads (ctypes-read-file ctypes-auto-parse-mode ctypes-file
;;;;;; ctypes-dir ctypes-tags ctypes-all-buffers ctypes-buffer ctypes-define-type-in-mode
-;;;;;; ctypes-define-type) "ctypes" "ctypes.el" (17246 57581))
+;;;;;; ctypes-define-type) "ctypes" "ctypes.el" (18097 34332))
;;; Generated autoloads from ctypes.el
(autoload (quote ctypes-define-type) "ctypes" "\
@@ -326,7 +326,7 @@
;;;### (autoloads (CUA-keypad-mode CUA-mode-on CUA-mode CUA-mode-bindings
;;;;;; CUA-movement-key CUA-exchange-point-and-mark CUA-mode) "cua"
-;;;;;; "cua.el" (17212 38105))
+;;;;;; "cua.el" (18097 33628))
;;; Generated autoloads from cua.el
(defvar CUA-mode nil "\
@@ -395,8 +395,8 @@
;;;***
-;;;### (autoloads (cwebm-mode webm-mode) "cwebm" "cwebm.el" (17221
-;;;;;; 28087))
+;;;### (autoloads (cwebm-mode webm-mode) "cwebm" "cwebm.el" (18097
+;;;;;; 33628))
;;; Generated autoloads from cwebm.el
(autoload (quote webm-mode) "cwebm" "\
@@ -411,8 +411,8 @@
;;;***
-;;;### (autoloads (dedicated-mode) "dedicated" "dedicated.el" (17246
-;;;;;; 57581))
+;;;### (autoloads (dedicated-mode) "dedicated" "dedicated.el" (18097
+;;;;;; 34332))
;;; Generated autoloads from dedicated.el
(autoload (quote dedicated-mode) "dedicated" "\
@@ -421,7 +421,7 @@
;;;***
-;;;### (autoloads (df) "df" "df.el" (16259 18879))
+;;;### (autoloads (df) "df" "df.el" (18097 34332))
;;; Generated autoloads from df.el
(autoload (quote df) "df" "\
@@ -431,7 +431,7 @@
;;;***
;;;### (autoloads (diminished-modes diminish-undo diminish) "diminish"
-;;;;;; "diminish.el" (17246 57581))
+;;;;;; "diminish.el" (18097 34331))
;;; Generated autoloads from diminish.el
(autoload (quote diminish) "diminish" "\
@@ -476,7 +476,7 @@
;;;***
-;;;### (autoloads (edit-env) "edit-env" "edit-env.el" (17246 57581))
+;;;### (autoloads (edit-env) "edit-env" "edit-env.el" (18097 34333))
;;; Generated autoloads from edit-env.el
(autoload (quote edit-env) "edit-env" "\
@@ -486,7 +486,7 @@
;;;### (autoloads (egocentric-update-regexp-list egocentric-mode-off
;;;;;; egocentric-mode-on egocentric-mode) "egocentric" "egocentric.el"
-;;;;;; (16259 18879))
+;;;;;; (18097 33628))
;;; Generated autoloads from egocentric.el
(autoload (quote egocentric-mode) "egocentric" "\
@@ -504,8 +504,8 @@
;;;***
-;;;### (autoloads (ff-paths-install) "ff-paths" "ff-paths.el" (17194
-;;;;;; 6223))
+;;;### (autoloads (ff-paths-install) "ff-paths" "ff-paths.el" (18097
+;;;;;; 33628))
;;; Generated autoloads from ff-paths.el
(autoload (quote ff-paths-install) "ff-paths" "\
@@ -513,7 +513,7 @@
;;;***
-;;;### (autoloads (floatbg-mode) "floatbg" "floatbg.el" (16259 18880))
+;;;### (autoloads (floatbg-mode) "floatbg" "floatbg.el" (18097 33628))
;;; Generated autoloads from floatbg.el
(autoload (quote floatbg-mode) "floatbg" "\
@@ -525,8 +525,8 @@
;;;;;; folding-mode-add-find-file-hook folding-keep-hooked folding-install-hooks
;;;;;; folding-uninstall-hooks folding-mode-hook-no-regexp folding-mode-string
;;;;;; folding-inside-mode-name folding-default-mouse-keys-function
-;;;;;; folding-default-keys-function) "folding" "folding.el" (16806
-;;;;;; 38694))
+;;;;;; folding-default-keys-function) "folding" "folding.el" (18097
+;;;;;; 33628))
;;; Generated autoloads from folding.el
(defvar folding-mode nil "\
@@ -536,18 +536,18 @@
*Function or list of functions used to define keys for Folding mode.
Possible values are:
folding-bind-default-key
- The standard keymap.
+ The standard keymap.
`folding-bind-backward-compatible-keys'
- Keys used by older versions of Folding mode. This function
- does not conform to Emacs 19.29 style conversions concerning
- key bindings. The prefix key is C - c
+ Keys used by older versions of Folding mode. This function
+ does not conform to Emacs 19.29 style conversions concerning
+ key bindings. The prefix key is C - c
`folding-bind-outline-compatible-keys'
- Define keys compatible with Outline mode.
+ Define keys compatible with Outline mode.
`folding-bind-foldout-compatible-keys'
- Define some extra keys compatible with Foldout.
+ Define some extra keys compatible with Foldout.
All except `folding-bind-backward-compatible-keys' used the value of
the variable `folding-mode-prefix-key' as prefix the key.
@@ -738,7 +738,7 @@
;;;***
;;;### (autoloads (framepop-display-buffer framepop-enable framepop-disable)
-;;;;;; "framepop" "framepop.el" (16269 22307))
+;;;;;; "framepop" "framepop.el" (18097 33628))
;;; Generated autoloads from framepop.el
(autoload (quote framepop-disable) "framepop" "\
@@ -763,7 +763,7 @@
;;;***
;;;### (autoloads (highlight-beyond-fill-column) "highlight-beyond-fill-column"
-;;;;;; "highlight-beyond-fill-column.el" (17246 57581))
+;;;;;; "highlight-beyond-fill-column.el" (18097 34331))
;;; Generated autoloads from highlight-beyond-fill-column.el
(autoload (quote highlight-beyond-fill-column) "highlight-beyond-fill-column" "\
@@ -772,7 +772,7 @@
;;;***
;;;### (autoloads (highlight-current-line-minor-mode) "highlight-current-line"
-;;;;;; "highlight-current-line.el" (16259 18881))
+;;;;;; "highlight-current-line.el" (18097 33628))
;;; Generated autoloads from highlight-current-line.el
(autoload (quote highlight-current-line-minor-mode) "highlight-current-line" "\
@@ -784,7 +784,7 @@
;;;***
;;;### (autoloads (home-end-end home-end-home) "home-end" "home-end.el"
-;;;;;; (17246 57581))
+;;;;;; (18097 34330))
;;; Generated autoloads from home-end.el
(autoload (quote home-end-home) "home-end" "\
@@ -800,8 +800,8 @@
;;;***
;;;### (autoloads (htmlize-many-files-dired htmlize-many-files htmlize-file
-;;;;;; htmlize-region htmlize-buffer) "htmlize" "htmlize.el" (16285
-;;;;;; 9287))
+;;;;;; htmlize-region htmlize-buffer) "htmlize" "htmlize.el" (18097
+;;;;;; 33628))
;;; Generated autoloads from htmlize.el
(autoload (quote htmlize-buffer) "htmlize" "\
@@ -856,7 +856,7 @@
;;;***
-;;;### (autoloads (ibuffer) "ibuffer" "ibuffer.el" (16259 18881))
+;;;### (autoloads (ibuffer) "ibuffer" "ibuffer.el" (18097 33628))
;;; Generated autoloads from ibuffer.el
(defsubst ibuffer-and-update (&optional other-window-p) "\
@@ -885,7 +885,7 @@
;;;;;; ido-find-file ido-find-file-in-dir ido-switch-buffer-other-frame
;;;;;; ido-insert-buffer ido-kill-buffer ido-display-buffer ido-switch-buffer-other-window
;;;;;; ido-switch-buffer ido-read-buffer ido-mode ido-enabled) "ido"
-;;;;;; "ido.el" (17213 20908))
+;;;;;; "ido.el" (18097 33628))
;;; Generated autoloads from ido.el
(defvar ido-enabled nil "\
@@ -1087,7 +1087,7 @@
;;;***
;;;### (autoloads (joc-toggle-buffer) "joc-toggle-buffer" "joc-toggle-buffer.el"
-;;;;;; (17246 57581))
+;;;;;; (18097 34334))
;;; Generated autoloads from joc-toggle-buffer.el
(autoload (quote joc-toggle-buffer) "joc-toggle-buffer" "\
@@ -1097,7 +1097,7 @@
;;;### (autoloads (joc-toggle-case-by-region joc-toggle-case-by-word-backwards
;;;;;; joc-toggle-case-by-word joc-toggle-case-backwards joc-toggle-case)
-;;;;;; "joc-toggle-case" "joc-toggle-case.el" (17246 57581))
+;;;;;; "joc-toggle-case" "joc-toggle-case.el" (18097 34334))
;;; Generated autoloads from joc-toggle-case.el
(autoload (quote joc-toggle-case) "joc-toggle-case" "\
@@ -1134,7 +1134,7 @@
;;;***
-;;;### (autoloads (keydef) "keydef" "keydef.el" (16259 18882))
+;;;### (autoloads (keydef) "keydef" "keydef.el" (18097 33628))
;;; Generated autoloads from keydef.el
(autoload (quote keydef) "keydef" "\
@@ -1161,8 +1161,8 @@
;;;***
-;;;### (autoloads (lcomp-activate-advices) "lcomp" "lcomp.el" (17246
-;;;;;; 57581))
+;;;### (autoloads (lcomp-activate-advices) "lcomp" "lcomp.el" (18097
+;;;;;; 34334))
;;; Generated autoloads from lcomp.el
(autoload (quote lcomp-activate-advices) "lcomp" "\
@@ -1170,9 +1170,18 @@
;;;***
+;;;### (autoloads (markdown-mode) "markdown-mode" "markdown-mode.el"
+;;;;;; (18097 34336))
+;;; Generated autoloads from markdown-mode.el
+
+(autoload (quote markdown-mode) "markdown-mode" "\
+Major mode for editing Markdown files." t nil)
+
+;;;***
+
;;;### (autoloads (marker-visit-truncate-mark-ring marker-visit-next
-;;;;;; marker-visit-prev) "marker-visit" "marker-visit.el" (17246
-;;;;;; 57581))
+;;;;;; marker-visit-prev) "marker-visit" "marker-visit.el" (18097
+;;;;;; 34334))
;;; Generated autoloads from marker-visit.el
(autoload (quote marker-visit-prev) "marker-visit" "\
@@ -1187,7 +1196,7 @@
;;;***
;;;### (autoloads (matlab-shell matlab-mode) "matlab" "matlab.el"
-;;;;;; (17238 24754))
+;;;;;; (18097 33628))
;;; Generated autoloads from matlab.el
(autoload (quote matlab-mode) "matlab" "\
@@ -1252,8 +1261,8 @@
;;;***
-;;;### (autoloads (muttrc-mode) "muttrc-mode" "muttrc-mode.el" (17246
-;;;;;; 57581))
+;;;### (autoloads (muttrc-mode) "muttrc-mode" "muttrc-mode.el" (18097
+;;;;;; 34331))
;;; Generated autoloads from muttrc-mode.el
(autoload (quote muttrc-mode) "muttrc-mode" "\
@@ -1265,8 +1274,9 @@
;;;***
-;;;### (autoloads (newsticker-show-news newsticker-start) "newsticker"
-;;;;;; "newsticker.el" (17246 57581))
+;;;### (autoloads (newsticker-ticker-running-p newsticker-running-p
+;;;;;; newsticker-show-news newsticker-start-ticker newsticker-start)
+;;;;;; "newsticker" "newsticker.el" (18097 34334))
;;; Generated autoloads from newsticker.el
(autoload (quote newsticker-start) "newsticker" "\
@@ -1276,13 +1286,29 @@
DO-NOT-COMPLAIN-IF-RUNNING is not nil.
Run `newsticker-start-hook' if newsticker was not running already." t nil)
+(autoload (quote newsticker-start-ticker) "newsticker" "\
+Start newsticker's ticker (but not the news retrieval).
+Start display timer for the actual ticker if wanted and not
+running already." t nil)
+
(autoload (quote newsticker-show-news) "newsticker" "\
Switch to newsticker buffer. You may want to bind this to a key." t nil)
+(autoload (quote newsticker-running-p) "newsticker" "\
+Check whether newsticker is running.
+Return t if newsticker is running, nil otherwise. Newsticker is
+considered to be running if the newsticker timer list is not empty." nil nil)
+
+(autoload (quote newsticker-ticker-running-p) "newsticker" "\
+Check whether newsticker's actual ticker is running.
+Return t if ticker is running, nil otherwise. Newsticker is
+considered to be running if the newsticker timer list is not
+empty." nil nil)
+
;;;***
;;;### (autoloads (nuke-trailing-whitespace) "nuke-trailing-whitespace"
-;;;;;; "nuke-trailing-whitespace.el" (17246 57581))
+;;;;;; "nuke-trailing-whitespace.el" (18097 34331))
;;; Generated autoloads from nuke-trailing-whitespace.el
(autoload (quote nuke-trailing-whitespace) "nuke-trailing-whitespace" "\
@@ -1297,8 +1323,8 @@
;;;***
-;;;### (autoloads (obfuscate-url) "obfusurl" "obfusurl.el" (16259
-;;;;;; 18882))
+;;;### (autoloads (obfuscate-url) "obfusurl" "obfusurl.el" (18097
+;;;;;; 33628))
;;; Generated autoloads from obfusurl.el
(autoload (quote obfuscate-url) "obfusurl" "\
@@ -1311,7 +1337,7 @@
;;;***
;;;### (autoloads (pack-windows) "pack-windows" "pack-windows.el"
-;;;;;; (16313 9500))
+;;;;;; (18097 33628))
;;; Generated autoloads from pack-windows.el
(autoload (quote pack-windows) "pack-windows" "\
@@ -1335,7 +1361,7 @@
;;;***
;;;### (autoloads (perldoc-perl-hook perldoc-at-point perldoc) "perldoc"
-;;;;;; "perldoc.el" (17246 57581))
+;;;;;; "perldoc.el" (18097 34335))
;;; Generated autoloads from perldoc.el
(autoload (quote perldoc) "perldoc" "\
@@ -1351,7 +1377,7 @@
;;;***
-;;;### (autoloads (project-add) "projects" "projects.el" (17246 57581))
+;;;### (autoloads (project-add) "projects" "projects.el" (18097 34336))
;;; Generated autoloads from projects.el
(autoload (quote project-add) "projects" "\
@@ -1360,7 +1386,7 @@
;;;***
;;;### (autoloads (protect-process-buffer-from-kill-mode protect-buffer-from-kill-mode)
-;;;;;; "protbuf" "protbuf.el" (17246 57581))
+;;;;;; "protbuf" "protbuf.el" (18097 34335))
;;; Generated autoloads from protbuf.el
(defvar protect-buffer-from-kill-mode nil "\
@@ -1395,7 +1421,7 @@
;;;***
;;;### (autoloads (protocols-clear-cache protocols-lookup) "protocols"
-;;;;;; "protocols.el" (16259 18882))
+;;;;;; "protocols.el" (18097 33628))
;;; Generated autoloads from protocols.el
(autoload (quote protocols-lookup) "protocols" "\
@@ -1407,7 +1433,7 @@
;;;***
;;;### (autoloads (rfcview-mode rfcview-customize) "rfcview" "rfcview.el"
-;;;;;; (16313 9500))
+;;;;;; (18097 33628))
;;; Generated autoloads from rfcview.el
(autoload (quote rfcview-customize) "rfcview" nil t nil)
@@ -1423,7 +1449,7 @@
;;;***
;;;### (autoloads (services-clear-cache services-lookup) "services"
-;;;;;; "services.el" (16259 18882))
+;;;;;; "services.el" (18097 33628))
;;; Generated autoloads from services.el
(autoload (quote services-lookup) "services" "\
@@ -1435,7 +1461,7 @@
;;;***
;;;### (autoloads (turn-on-setnu-mode setnu-mode) "setnu" "setnu.el"
-;;;;;; (17246 57581))
+;;;;;; (18097 34335))
;;; Generated autoloads from setnu.el
(autoload (quote setnu-mode) "setnu" "\
@@ -1454,7 +1480,7 @@
;;;***
;;;### (autoloads (shell-command-completion-mode) "shell-command"
-;;;;;; "shell-command.el" (17221 28092))
+;;;;;; "shell-command.el" (18097 33628))
;;; Generated autoloads from shell-command.el
(autoload (quote shell-command-completion-mode) "shell-command" "\
@@ -1465,7 +1491,7 @@
;;;***
;;;### (autoloads (sm-add-all-headers sm-add-random-header) "silly-mail"
-;;;;;; "silly-mail.el" (17246 57581))
+;;;;;; "silly-mail.el" (18097 34334))
;;; Generated autoloads from silly-mail.el
(autoload (quote sm-add-random-header) "silly-mail" "\
@@ -1479,8 +1505,8 @@
;;;***
-;;;### (autoloads (slang-mode) "slang-mode" "slang-mode.el" (17211
-;;;;;; 12498))
+;;;### (autoloads (slang-mode) "slang-mode" "slang-mode.el" (18097
+;;;;;; 34335))
;;; Generated autoloads from slang-mode.el
(autoload (quote slang-mode) "slang-mode" "\
@@ -1491,8 +1517,8 @@
;;;***
-;;;### (autoloads (sys-apropos) "sys-apropos" "sys-apropos.el" (16259
-;;;;;; 18883))
+;;;### (autoloads (sys-apropos) "sys-apropos" "sys-apropos.el" (18097
+;;;;;; 33628))
;;; Generated autoloads from sys-apropos.el
(autoload (quote sys-apropos) "sys-apropos" "\
@@ -1502,8 +1528,8 @@
;;;### (autoloads (tabbar-local-mode tabbar-mode tabbar-forward-tab
;;;;;; tabbar-backward-tab tabbar-forward-group tabbar-backward-group
-;;;;;; tabbar-forward tabbar-backward) "tabbar" "tabbar.el" (17212
-;;;;;; 38105))
+;;;;;; tabbar-forward tabbar-backward) "tabbar" "tabbar.el" (18097
+;;;;;; 33628))
;;; Generated autoloads from tabbar.el
(autoload (quote tabbar-backward) "tabbar" "\
@@ -1564,7 +1590,7 @@
;;;;;; table-recognize table-insert-row-column table-insert-column
;;;;;; table-insert-row table-insert table-point-left-cell-hook
;;;;;; table-point-entered-cell-hook table-load-hook table-cell-map-hook)
-;;;;;; "table" "table.el" (17246 57581))
+;;;;;; "table" "table.el" (18097 34335))
;;; Generated autoloads from table.el
(defvar table-cell-map-hook nil "\
@@ -2084,8 +2110,8 @@
;;;***
-;;;### (autoloads (tail-command tail-file) "tail" "tail.el" (16269
-;;;;;; 21296))
+;;;### (autoloads (tail-command tail-file) "tail" "tail.el" (18097
+;;;;;; 33628))
;;; Generated autoloads from tail.el
(autoload (quote tail-file) "tail" "\
@@ -2099,7 +2125,7 @@
;;;***
-;;;### (autoloads (trivial-cite) "tc" "tc.el" (16295 49414))
+;;;### (autoloads (trivial-cite) "tc" "tc.el" (18097 33628))
;;; Generated autoloads from tc.el
(autoload (quote trivial-cite) "tc" "\
@@ -2118,7 +2144,7 @@
;;;***
;;;### (autoloads (thinks-maybe-region thinks-yank thinks-region
-;;;;;; thinks) "thinks" "thinks.el" (16259 18884))
+;;;;;; thinks) "thinks" "thinks.el" (18097 33628))
;;; Generated autoloads from thinks.el
(autoload (quote thinks) "thinks" "\
@@ -2145,7 +2171,7 @@
;;;***
-;;;### (autoloads (tlc-mode) "tlc" "tlc.el" (17221 29124))
+;;;### (autoloads (tlc-mode) "tlc" "tlc.el" (18097 33628))
;;; Generated autoloads from tlc.el
(autoload (quote tlc-mode) "tlc" "\
@@ -2154,7 +2180,7 @@
;;;***
-;;;### (autoloads (tld) "tld" "tld.el" (17199 13164))
+;;;### (autoloads (tld) "tld" "tld.el" (18097 33628))
;;; Generated autoloads from tld.el
(autoload (quote tld) "tld" "\
@@ -2163,7 +2189,7 @@
;;;***
;;;### (autoloads (twiddle-compile twiddle-start) "twiddle" "twiddle.el"
-;;;;;; (16259 18885))
+;;;;;; (18097 33628))
;;; Generated autoloads from twiddle.el
(autoload (quote twiddle-start) "twiddle" "\
@@ -2179,7 +2205,7 @@
;;;***
-;;;### (autoloads (underhat-region) "under" "under.el" (16269 21249))
+;;;### (autoloads (underhat-region) "under" "under.el" (18097 33628))
;;; Generated autoloads from under.el
(autoload (quote underhat-region) "under" "\
@@ -2188,7 +2214,7 @@
;;;***
;;;### (autoloads (wdired-change-to-wdired-mode) "wdired" "wdired.el"
-;;;;;; (16259 18885))
+;;;;;; (18097 33628))
;;; Generated autoloads from wdired.el
(autoload (quote wdired-change-to-wdired-mode) "wdired" "\
@@ -2200,7 +2226,7 @@
;;;***
-;;;### (autoloads (xrdb-mode) "xrdb-mode" "xrdb-mode.el" (16259 18885))
+;;;### (autoloads (xrdb-mode) "xrdb-mode" "xrdb-mode.el" (18097 33628))
;;; Generated autoloads from xrdb-mode.el
(autoload (quote xrdb-mode) "xrdb-mode" "\
diff -urN emacs-goodies-el.cvs~/emacs-goodies-el/elisp/emacs-goodies-el/markdown-mode.el emacs-goodies-el.cvs/emacs-goodies-el/elisp/emacs-goodies-el/markdown-mode.el
--- emacs-goodies-el.cvs~/emacs-goodies-el/elisp/emacs-goodies-el/markdown-mode.el 1970-01-01 01:00:00.000000000 +0100
+++ emacs-goodies-el.cvs/emacs-goodies-el/elisp/emacs-goodies-el/markdown-mode.el 2007-08-02 09:22:24.000000000 +0200
@@ -0,0 +1,410 @@
+;;; markdown-mode.el --- Major mode to edit Markdown files in Emacs
+;;
+;; Author: Jason Blevins <[EMAIL PROTECTED]>
+;; Created: May 24, 2007
+;; $Id: markdown-mode.el,v 1.4 2007/06/29 19:00:40 jrblevin Exp $
+;; Keywords: Markdown major mode
+;;
+;; Copyright (C) 2007 Jason Blevins
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program; if not, write to the Free Software
+;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+;;
+;; Supported Emacsen:
+;; ==================
+;; This mode has only been tested on Emacs 22.0. Please let me know
+;; if there are problems on other versions.
+;;
+;; Installation:
+;; =============
+;; Add the following lines to your .emacs file to associate
+;; markdown-mode with .mdml files. There doesn't seem to be
+;; a consensus on an official file extension so you can change
+;; this to .text, .md, .mdt, or whatever you call your markdown
+;; files.
+;;
+;; (autoload 'markdown-mode "markdown-mode.el"
+;; "Major mode for editing Markdown files" t)
+;; (setq auto-mode-alist
+;; (cons '("\\.mdml$" . markdown-mode) auto-mode-alist))
+;;
+;; Make sure to place this file somewhere in the load-path.
+;;
+;; Description:
+;; ============
+;; This mode provides basic syntax highlighting, element insertion
+;; commands, and preview commands for Markdown files. The latest version
+;; should always be available from
+;; http://jrblevin.freeshell.org/software/markdown-mode.
+;;
+;; TODO:
+;; =====
+;; * Recognize inline HTML.
+;; * Bold at the beginning of a line is mistaken to be a list item.
+;; * itex font lock support:
+;; + Equation references: (eq:reference) or \eqref{reference}.
+;; + Separate font locking for \label{} elements in side \[ \] equations.
+;; * Treat * or _ surrounded by spaces as literals.
+;; * When inserting links (maybe other elements), the selected text remains
+;; in the paste buffer.
+
+(defconst markdown-mode-version "$Revision: 1.4 $")
+
+;; A hook for users to run their own code when the mode is loaded.
+(defvar markdown-mode-hook nil)
+
+
+;;; Customizable variables ====================================================
+
+(defgroup markdown nil
+ "Markdown mode."
+ :prefix "markdown-"
+ :group 'languages)
+
+(defcustom markdown-command "markdown"
+ "Command to run markdown."
+ :group 'markdown
+ :type 'string)
+
+(defcustom markdown-hr-length 5
+ "Length of horizonal rules."
+ :group 'markdown
+ :type 'integer)
+
+(defcustom markdown-bold-underscore nil
+ "Use two underscores for bold instead of two asterisks."
+ :group 'markdown
+ :type 'boolean)
+
+(defcustom markdown-italic-underscore nil
+ "Use underscores for italic instead of asterisks."
+ :group 'markdown
+ :type 'boolean)
+
+
+;;; Regular expressions =======================================================
+
+;; Links
+(defconst regex-link-inline "\\(!?\\[.+?\\]\\)\\((.*)\\)"
+ "Regular expression for a [text](file) or an image link ")
+(defconst regex-link-reference "\\(!?\\[.+?\\]\\)[ ]?\\(\\[.*?\\]\\)"
+ "Regular expression for a reference link [text][id]")
+(defconst regex-reference-definition
+ "^\\s*\\(\\[.+?\\]\\):\\s*\\([^\\s\n]+\\).*$"
+ "Regular expression for a link definition [id]: ...")
+
+
+;;; Font lock =================================================================
+
+(defconst markdown-mode-font-lock-keywords
+ (list
+ ;; Latex/itex
+; (cons "\\\\\\[[^$]+\\\\\\]" 'font-lock-string-face)
+; (cons "\\$\\$[^$]+\\$\\$" 'font-lock-string-face)
+; (cons "\\$[^$]+\\$" 'font-lock-string-face)
+ ;; Headers and (Horizontal Rules)
+ (cons ".*\n?===*" 'font-lock-function-name-face) ; === headers
+ (cons ".*\n?---*" 'font-lock-function-name-face) ; --- headers
+ (cons "^#+ .*$" 'font-lock-function-name-face) ; ### Headers
+ (cons "^\\*[\\*\\s]*$" 'font-lock-function-name-face) ; * * * style HRs
+ (cons "^-[-\\s]*$" 'font-lock-function-name-face) ; - - - style HRs
+ ;; Blockquotes
+ (cons "^>.*$" 'font-lock-comment-face) ; > blockquote
+ ;; Bold
+ (cons "[^\\]?\\*\\*.+?\\*\\*" 'font-lock-type-face) ; **bold**
+ (cons "[^\\]?__.+?__" 'font-lock-type-face) ; __bold__
+ ;; Italic
+ (cons "[^\\]?\\*.+?\\*" 'font-lock-variable-name-face) ; *italic*
+ (cons "[^\\]?_.+?_" 'font-lock-variable-name-face) ; _italic_
+ ;; Lists
+ (cons "^[0-9]+\\." 'font-lock-variable-name-face) ; Numbered list
+ (cons "^\\*" 'font-lock-variable-name-face) ; Level 1 (no indent)
+ (cons "^\\+" 'font-lock-variable-name-face) ; Level 1 (no indent)
+ (cons "^\\-" 'font-lock-variable-name-face) ; Level 1 (no indent)
+ (cons "^ [ ]*\\*" 'font-lock-variable-name-face) ; Level 2 (two or more)
+ (cons "^ [ ]*\\+" 'font-lock-variable-name-face) ; Level 2 (two or more)
+ (cons "^ [ ]*\\-" 'font-lock-variable-name-face) ; Level 2 (two or more)
+ ;; Links
+ (cons regex-link-inline '(1 'font-lock-string-face t))
+ (cons regex-link-inline '(2 'font-lock-constant-face t))
+ (cons regex-link-reference '(1 'font-lock-string-face t))
+ (cons regex-link-reference '(2 'font-lock-comment-face t))
+ (cons regex-reference-definition '(1 'font-lock-comment-face t))
+ (cons regex-reference-definition '(2 'font-lock-constant-face t))
+ ;; Wiki links
+; (cons "\\[\\[\\w+\\]\\]" 'font-lock-string-face) ; Standard wiki link
+ (cons "\\[\\[.+\\]\\]" 'font-lock-string-face)
+ ;; Code
+ (cons "``.+?``" 'font-lock-constant-face) ; ``inline code``
+ (cons "`.+?`" 'font-lock-constant-face) ; `inline code`
+ (cons "^ .*$" 'font-lock-constant-face) ; code block
+ )
+ "Syntax highlighting for Markdown files.")
+
+
+;;; Element Insertion ==========================================================
+
+(defun wrap-or-insert (s1 s2)
+ "Insert the strings s1 and s2 around the current region or just insert them
+if there is no region selected."
+ (if (and transient-mark-mode mark-active)
+ (let ((a (region-beginning)) (b (region-end)))
+ (kill-region a b)
+ (insert s1)
+ (yank)
+ (insert s2))
+ (insert s1 s2)))
+
+(defun markdown-insert-hr ()
+ "Insert a horizonal rule."
+ (interactive)
+ (let (hr)
+ (dotimes (count (- markdown-hr-length 1) hr) ; Count to n - 1
+ (setq hr (concat "* " hr))) ; Build HR string
+ (setq hr (concat hr "*\n")) ; Add the n-th *
+ (insert hr)))
+
+(defun markdown-insert-bold ()
+ "Make the active region bold or insert an empty bold word."
+ (interactive)
+ (if markdown-bold-underscore
+ (wrap-or-insert "__" "__")
+ (wrap-or-insert "**" "**"))
+ (backward-char 2))
+
+(defun markdown-insert-italic ()
+ "Make the active region italic or insert an empty italic word."
+ (interactive)
+ (if markdown-italic-underscore
+ (wrap-or-insert "_" "_")
+ (wrap-or-insert "*" "*"))
+ (backward-char 1))
+
+(defun markdown-insert-code ()
+ "Format the active region as inline code or insert an empty inline code
+fragment."
+ (interactive)
+ (wrap-or-insert "`" "`")
+ (backward-char 1))
+
+(defun markdown-insert-link ()
+ "Creates an empty link of the form [](). If there is an active region,
+this text will be used for the link text."
+ (interactive)
+ (wrap-or-insert "[" "]")
+ (insert "()")
+ (backward-char 1))
+
+(defun markdown-insert-image ()
+ "Creates an empty image of the form ![](). If there is an active region,
+this text will be used for the alternate text for the image."
+ (interactive)
+ (wrap-or-insert "![" "]")
+ (insert "()")
+ (backward-char 1))
+
+(defun markdown-insert-header-1 ()
+ "Creates a level 1 header"
+ (interactive)
+ (markdown-insert-header 1))
+
+(defun markdown-insert-header-2 ()
+ "Creates a level 2 header"
+ (interactive)
+ (markdown-insert-header 2))
+
+(defun markdown-insert-header-3 ()
+ "Creates a level 3 header"
+ (interactive)
+ (markdown-insert-header 3))
+
+(defun markdown-insert-header-4 ()
+ "Creates a level 4 header"
+ (interactive)
+ (markdown-insert-header 4))
+
+(defun markdown-insert-header-5 ()
+ "Creates a level 5 header"
+ (interactive)
+ (markdown-insert-header 5))
+
+(defun markdown-insert-header (n)
+ "Creates a level n header. If there is an active region, it is used as the
+header text."
+ (interactive "p")
+ (unless n ; Test to see if n is defined
+ (setq n 1)) ; Default to level 1 header
+ (let (hdr)
+ (dotimes (count n hdr)
+ (setq hdr (concat "#" hdr))) ; Build a ### header string
+ (setq hdrl (concat hdr " "))
+ (setq hdrr (concat " " hdr))
+ (wrap-or-insert hdrl hdrr))
+ (backward-char (+ 1 n)))
+
+(defun markdown-insert-title ()
+ "Use the active region to create an \"equals\" style title or insert
+a blank title and move the cursor to the required position in order to
+insert a title."
+ (interactive)
+ (if (and transient-mark-mode mark-active)
+ (let ((a (region-beginning))
+ (b (region-end))
+ (len 0)
+ (hdr))
+ (setq len (- b a))
+ (dotimes (count len hdr)
+ (setq hdr (concat "=" hdr))) ; Build a === title underline
+ (end-of-line)
+ (insert "\n" hdr "\n"))
+ (insert "\n==========\n")
+ (backward-char 12)))
+
+(defun markdown-insert-section ()
+ "Use the active region to create a dashed style section or insert
+a blank section and move the cursor to the required position in order to
+insert a section."
+ (interactive)
+ (if (and transient-mark-mode mark-active)
+ (let ((a (region-beginning))
+ (b (region-end))
+ (len 0)
+ (hdr))
+ (setq len (- b a))
+ (dotimes (count len hdr)
+ (setq hdr (concat "-" hdr))) ; Build a --- section underline
+ (end-of-line)
+ (insert "\n" hdr "\n"))
+ (insert "\n----------\n")
+ (backward-char 12)))
+
+(defun markdown-insert-blockquote ()
+ "Start a blank blockquote section unless there is an active region, in
+which case it is turned into a blockquote region."
+ (interactive)
+ (if (and (boundp 'transient-mark-mode) transient-mark-mode mark-active)
+ (blockquote-region)
+ (insert "> ")))
+
+
+;;; Keymap ====================================================================
+
+(defvar markdown-mode-map
+ (let ((markdown-mode-map (make-keymap)))
+ ;; Element insertion
+ (define-key markdown-mode-map "\C-c\C-al" 'markdown-insert-link)
+ (define-key markdown-mode-map "\C-c\C-ii" 'markdown-insert-image)
+ (define-key markdown-mode-map "\C-c\C-t1" 'markdown-insert-header-1)
+ (define-key markdown-mode-map "\C-c\C-t2" 'markdown-insert-header-2)
+ (define-key markdown-mode-map "\C-c\C-t3" 'markdown-insert-header-3)
+ (define-key markdown-mode-map "\C-c\C-t4" 'markdown-insert-header-4)
+ (define-key markdown-mode-map "\C-c\C-t5" 'markdown-insert-header-5)
+ (define-key markdown-mode-map "\C-c\C-pb" 'markdown-insert-bold)
+ (define-key markdown-mode-map "\C-c\C-ss" 'markdown-insert-bold)
+ (define-key markdown-mode-map "\C-c\C-pi" 'markdown-insert-italic)
+ (define-key markdown-mode-map "\C-c\C-se" 'markdown-insert-italic)
+ (define-key markdown-mode-map "\C-c\C-pf" 'markdown-insert-code)
+ (define-key markdown-mode-map "\C-c\C-sc" 'markdown-insert-code)
+ (define-key markdown-mode-map "\C-c\C-sb" 'markdown-insert-blockquote)
+ (define-key markdown-mode-map "\C-c-" 'markdown-insert-hr)
+ (define-key markdown-mode-map "\C-c\C-tt" 'markdown-insert-title)
+ (define-key markdown-mode-map "\C-c\C-ts" 'markdown-insert-section)
+ ;; Markdown functions
+ (define-key markdown-mode-map "\C-c\C-cm" 'markdown)
+ (define-key markdown-mode-map "\C-c\C-cp" 'markdown-preview)
+ markdown-mode-map)
+ "Keymap for Markdown major mode")
+
+
+;;; Markdown ==================================================================
+
+(defun markdown ()
+ "Run markdown on the current buffer and preview the output in another buffer."
+ (interactive)
+ (if (and (boundp 'transient-mark-mode) transient-mark-mode mark-active)
+ (shell-command-on-region region-beginning region-end markdown-command
+ "*markdown-output*" nil)
+ (shell-command-on-region (point-min) (point-max) markdown-command
+ "*markdown-output*" nil)))
+
+(defun markdown-preview ()
+ "Run markdown on the current buffer and preview the output in a browser."
+ (interactive)
+ (markdown)
+ (browse-url-of-buffer "*markdown-output*"))
+
+
+;;; Utilities =================================================================
+
+(defun markdown-show-version ()
+ "Show the version number in the minibuffer."
+ (interactive)
+ (message "markdown-mode, version %s" markdown-mode-version))
+
+(defun blockquote-region ()
+ "Blockquote an entire region."
+ (interactive)
+ (if (and (boundp 'transient-mark-mode) transient-mark-mode mark-active)
+ (replace-regexp "^" "> ")))
+
+
+;; Mode definition ===========================================================
+
+(define-derived-mode markdown-mode fundamental-mode "Markdown"
+ "Major mode for editing Markdown files."
+ ;; Font lock.
+ (set (make-local-variable 'font-lock-defaults)
+ '(markdown-mode-font-lock-keywords))
+ (set (make-local-variable 'font-lock-multiline) t))
+
+;(add-to-list 'auto-mode-alist '("\\.mdml$" . markdown-mode))
+
+(provide 'markdown-mode)
+
+;;; Change log
+;;
+;; 2007-06-29 Jason Blevins <[EMAIL PROTECTED]>
+;; * Changed \s to \\s in regexps to fix the Emacs 21 "Invalid escape
+;; character syntax." error. Thanks to Edward O'Connor for the fix.
+;; * Revision 1.4.
+;;
+;; 2007-06-05 Jason Blevins <[EMAIL PROTECTED]>
+;; * Revision 1.3.
+;;
+;; 2007-05-29 Jason Blevins <[EMAIL PROTECTED]>
+;; * Added support for equals and dash style headings.
+;; * Added markdown-show-version.
+;; * Ability to preview markdown output in a buffer (markdown) or
+;; in a browser (markdown-preview). Markdown command is customizable.
+;; * Made HR length customizable through markdown-hr-length.
+;; * Made bold and italic style customizable through markdown-bold-underscore
+;; and markdown-italic-underscore.
+;; * Made keybindings more like those of html-helper-mode.
+;; * Added image insertion (markdown-insert-image).
+;; * Font lock for code fragments with double backticks.
+;; * Added blockquote-region function and insert-blockquote keybinding.
+;; * Don't highlight escaped literals such as \* or \_.
+;; * Added header insertion commands for H1-H5 (markdown-insert-header-n).
+;;
+;; 2007-05-25 Jason Blevins <[EMAIL PROTECTED]>
+;; * Added element insertion commands and keys for links, horizontal rules,
+;; headers, inline code, and bold and italic text.
+;; * Revision 1.2.
+;;
+;; 2007-05-24 Jason Blevins <[EMAIL PROTECTED]>
+;; * Initial revision.
+;; * Basic syntax highlighting support.
+;; * Revision 1.1.
+
+;;; markdown-mode.el ends here
--- End Message ---