733 lines
22 KiB
EmacsLisp
733 lines
22 KiB
EmacsLisp
|
;; This file contains an example of the functions that are defined by
|
|||
|
;; `mumamo-fetch-major-mode-setup'. The file was written using utf-8.
|
|||
|
|
|||
|
;; The functions are given names like mumamo-eval-in-MODE. The code
|
|||
|
;; that was evaled to define the function is saved in the property
|
|||
|
;; `mumamo-defun' on the function symbol. This code was used to insert
|
|||
|
;; the function code below:
|
|||
|
(insert (pp-to-string (get 'mumamo-eval-in-html-mode 'mumamo-defun)))
|
|||
|
|
|||
|
;; I have inserted comments by hand below:
|
|||
|
(defun mumamo-eval-in-html-mode (body)
|
|||
|
;; The parameter BODY is evaled at the end of the let form
|
|||
|
;; below. The let bound variables are from two sources:
|
|||
|
;;
|
|||
|
;; 1) Buffer local variables (minus some that do not fit/disturbs,
|
|||
|
;; see `mumamo-get-relevant-buffer-local-vars'.
|
|||
|
;;
|
|||
|
;; 2) From the list in `mumamo-fetch-major-mode-setup'. This list
|
|||
|
;; contains variables that are often set buffer locally for
|
|||
|
;; fontification indentation etc. Unfortunately not all of these
|
|||
|
;; are automatic buffer locals.
|
|||
|
(let
|
|||
|
;; These variables are from the list in
|
|||
|
;; `mumamo-fetch-major-mode-setup':
|
|||
|
((sgml-xml-mode nil)
|
|||
|
(indent-line-function 'sgml-indent-line)
|
|||
|
(indent-region-function nil)
|
|||
|
(normal-auto-fill-function 'do-auto-fill)
|
|||
|
(comment-start "<!-- ")
|
|||
|
(comment-end " -->")
|
|||
|
(comment-start-skip "<!--[ ]*")
|
|||
|
(comment-end-skip "[ ]*--[ \n]*>")
|
|||
|
(comment-multi-line nil)
|
|||
|
(comment-line-break-function 'sgml-comment-indent-new-line)
|
|||
|
(paragraph-start "[ ]*$\\|[ ]*</?\\([_:[:alpha:]][-_.:[:alnum:]]*\\(?:[^\"'/><]\\|\"[^\"]*\"\\|'[^']*'\\)*\\)?>")
|
|||
|
(paragraph-separate "[ ]*$\\|[ ]*</?\\([_:[:alpha:]][-_.:[:alnum:]]*\\(?:[^\"'/><]\\|\"[^\"]*\"\\|'[^']*'\\)*\\)?>$")
|
|||
|
(paragraph-ignore-fill-prefix nil)
|
|||
|
(adaptive-fill-mode t)
|
|||
|
(adaptive-fill-regexp "[ ]*")
|
|||
|
(font-lock-multiline nil)
|
|||
|
(font-lock-extend-after-change-region-function nil)
|
|||
|
(font-lock-extend-region-functions
|
|||
|
'(font-lock-extend-region-wholelines font-lock-extend-region-multiline))
|
|||
|
(font-lock-comment-start-skip nil)
|
|||
|
(font-lock-comment-end-skip nil)
|
|||
|
(font-lock-set-defaults)
|
|||
|
(font-lock-defaults
|
|||
|
'((sgml-font-lock-keywords sgml-font-lock-keywords-1 sgml-font-lock-keywords-2)
|
|||
|
nil t nil nil
|
|||
|
(font-lock-syntactic-keywords . sgml-font-lock-syntactic-keywords)))
|
|||
|
(font-lock-beginning-of-syntax-function nil)
|
|||
|
(font-lock-syntactic-face-function
|
|||
|
'#[(state)
|
|||
|
"\3038\203 |