(dolist (key replacements)
(define-key keymap key binding))))))
+ (eval-after-load "org"
+ '(progn
+ (push '("strayman"
+ "\\documentclass{strayman}
+ \\usepackage[utf8]{inputenc}
+ \\usepackage[palatino, helvetica, courier, maths=cmr]{mdwfonts}
+ \\usepackage[T1]{fontenc}
+ \\usepackage{graphicx, tikz, mdwtab, mdwmath, crypto, longtable}"
+ ("\\section{%s}" . "\\section*{%s}")
+ ("\\subsection{%s}" . "\\subsection*{%s}")
+ ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
+ ("\\paragraph{%s}" . "\\paragraph*{%s}")
+ ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
+ org-export-latex-classes)))
+
;;;--------------------------------------------------------------------------
;;; Mail and news hacking.
(setq show-trailing-whitespace t)
(and (fboundp 'gtags-mode)
(gtags-mode))
+ (hs-minor-mode t)
(outline-minor-mode t)
(mdw-set-font))
(statement-case-intro . +)))
t))
+(defvar mdw-c-comment-fill-prefix
+ `((,(concat "\\([ \t]*/?\\)"
+ "\\(\*\\|//]\\)"
+ "\\([ \t]*\\)"
+ "\\([A-Za-z]+:[ \t]*\\)?"
+ mdw-hanging-indents)
+ (pad . 1) (match . 2) (pad . 3) (pad . 4) (pad . 5)))
+ "Fill prefix matching C comments (both kinds).")
+
(defun mdw-fontify-c-and-c++ ()
;; Fiddle with some syntax codes.
(setq c-hanging-comment-ender-p nil)
(setq c-backslash-column 72)
(setq c-label-minimum-indentation 0)
- (setq mdw-fill-prefix
- `((,(concat "\\([ \t]*/?\\)"
- "\\([\*/][ \t]*\\)"
- "\\([A-Za-z]+:[ \t]*\\)?"
- mdw-hanging-indents)
- (pad . 1) (match . 2) (pad . 3) (pad . 4))))
+ (setq mdw-fill-prefix mdw-c-comment-fill-prefix)
;; Now define things to be fontified.
(make-local-variable 'font-lock-keywords)
(setq c-backslash-column 72)
(setq comment-start "/* ")
(setq comment-end " */")
- (setq mdw-fill-prefix
- `((,(concat "\\([ \t]*/?\\)"
- "\\([\*/][ \t]*\\)"
- "\\([A-Za-z]+:[ \t]*\\)?"
- mdw-hanging-indents)
- (pad . 1) (match . 2) (pad . 3) (pad . 4))))
+ (setq mdw-fill-prefix mdw-c-comment-fill-prefix)
;; Now define things to be fontified.
(make-local-variable 'font-lock-keywords)
(mdw-java-style)
(setq c-hanging-comment-ender-p nil)
(setq c-backslash-column 72)
- (setq comment-start "/* ")
- (setq comment-end " */")
- (setq mdw-fill-prefix
- `((,(concat "\\([ \t]*/?\\)"
- "\\([\*/][ \t]*\\)"
- "\\([A-Za-z]+:[ \t]*\\)?"
- mdw-hanging-indents)
- (pad . 1) (match . 2) (pad . 3) (pad . 4))))
+ (setq mdw-fill-prefix mdw-c-comment-fill-prefix)
;; Now define things to be fontified.
(make-local-variable 'font-lock-keywords)
(mdw-csharp-style)
(setq c-hanging-comment-ender-p nil)
(setq c-backslash-column 72)
- (setq comment-start "/* ")
- (setq comment-end " */")
- (setq mdw-fill-prefix
- `((,(concat "\\([ \t]*/?\\)"
- "\\([\*/][ \t]*\\)"
- "\\([A-Za-z]+:[ \t]*\\)?"
- mdw-hanging-indents)
- (pad . 1) (match . 2) (pad . 3) (pad . 4))))
+ (setq mdw-fill-prefix mdw-c-comment-fill-prefix)
;; Now define things to be fontified.
(make-local-variable 'font-lock-keywords)
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
'(0 mdw-punct-face))))))
- (defun csharp-mode ()
- (interactive)
- (java-mode)
- (setq major-mode 'csharp-mode)
- (setq mode-name "C#")
- (mdw-fontify-csharp)
- (run-hooks 'csharp-mode-hook))
+ (define-derived-mode csharp-mode java-mode "C#"
+ "Major mode for editing C# code.")
;;;--------------------------------------------------------------------------
;;; Awk programming configuration.
(auto-fill-mode 1))
;;;--------------------------------------------------------------------------
-;;; Outline mode.
+;;; Outline and hide/show modes.
(defun mdw-outline-collapse-all ()
"Completely collapse everything in the entire buffer."
(hide-subtree)
(forward-line))))
+(setq hs-hide-comments-when-hiding-all nil)
+
;;;--------------------------------------------------------------------------
;;; Shell mode.