[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/textmodes/texinfo.el
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/textmodes/texinfo.el |
Date: |
Fri, 04 Apr 2003 01:23:10 -0500 |
Index: emacs/lisp/textmodes/texinfo.el
diff -c emacs/lisp/textmodes/texinfo.el:1.93
emacs/lisp/textmodes/texinfo.el:1.94
*** emacs/lisp/textmodes/texinfo.el:1.93 Tue Feb 4 08:30:45 2003
--- emacs/lisp/textmodes/texinfo.el Fri Mar 14 17:29:13 2003
***************
*** 28,33 ****
--- 28,34 ----
;;; Todo:
;; - facemenu support.
+ ;; - command completion.
;;; Commentary:
***************
*** 265,286 ****
(defvar texinfo-section-list
'(("top" 1)
- ("majorheading" 2)
("chapter" 2)
- ("unnumbered" 2)
- ("appendix" 2)
- ("chapheading" 2)
("section" 3)
- ("unnumberedsec" 3)
- ("appendixsec" 3)
- ("heading" 3)
("subsection" 4)
- ("unnumberedsubsec" 4)
- ("appendixsubsec" 4)
- ("subheading" 4)
("subsubsection" 5)
("unnumberedsubsubsec" 5)
("appendixsubsubsec" 5)
("subsubheading" 5))
"Alist of sectioning commands and their relative level.")
--- 266,287 ----
(defvar texinfo-section-list
'(("top" 1)
("chapter" 2)
("section" 3)
("subsection" 4)
("subsubsection" 5)
+ ("unnumbered" 2)
+ ("unnumberedsec" 3)
+ ("unnumberedsubsec" 4)
("unnumberedsubsubsec" 5)
+ ("appendix" 2)
+ ("appendixsec" 3)
+ ("appendixsubsec" 4)
("appendixsubsubsec" 5)
+ ("majorheading" 2)
+ ("chapheading" 2)
+ ("heading" 3)
+ ("subheading" 4)
("subsubheading" 5))
"Alist of sectioning commands and their relative level.")
***************
*** 384,402 ****
(concat (regexp-quote (buffer-substring start end)) "\\>"))
(text-clone-create start end 'spread "\\w*")))))))
- (defun texinfo-outline-level ()
- ;; Calculate level of current texinfo outline heading.
- (save-excursion
- (if (bobp)
- 0
- (forward-char 1)
- (let* ((word (buffer-substring-no-properties
- (point) (progn (forward-word 1) (point))))
- (entry (assoc word texinfo-section-list)))
- (if entry
- (nth 1 entry)
- 5)))))
-
;;; Keybindings
(defvar texinfo-mode-map nil)
--- 385,390 ----
***************
*** 613,623 ****
(font-lock-syntactic-keywords
. texinfo-font-lock-syntactic-keywords)))
(set (make-local-variable 'parse-sexp-lookup-properties) t)
! (make-local-variable 'outline-regexp)
! (setq outline-regexp
! (concat "@" (regexp-opt (mapcar 'car texinfo-section-list) t) "\\>"))
! (make-local-variable 'outline-level)
! (setq outline-level 'texinfo-outline-level)
(make-local-variable 'tex-start-of-header)
(setq tex-start-of-header "%\\*\\*start")
(make-local-variable 'tex-end-of-header)
--- 601,617 ----
(font-lock-syntactic-keywords
. texinfo-font-lock-syntactic-keywords)))
(set (make-local-variable 'parse-sexp-lookup-properties) t)
!
! ;; Outline settings.
! (set (make-local-variable 'outline-heading-alist)
! ;; We should merge outline-heading-alist and texinfo-section-list
! ;; but in the mean time, let's just generate one from the other.
! (mapcar (lambda (x) (cons (concat "@" (car x)) (cadr x)))
! texinfo-section-list))
! (set (make-local-variable 'outline-regexp)
! (concat (regexp-opt (mapcar 'car outline-heading-alist) t)
! "\\>"))
!
(make-local-variable 'tex-start-of-header)
(setq tex-start-of-header "%\\*\\*start")
(make-local-variable 'tex-end-of-header)
***************
*** 646,652 ****
Puts point on a blank line between them."
(setq texinfo-block-default
(completing-read (format "Block name [%s]: " texinfo-block-default)
! (mapcar 'list texinfo-environments)
nil nil nil nil texinfo-block-default))
\n "@" str \n _ \n "@end " str \n)
--- 640,646 ----
Puts point on a blank line between them."
(setq texinfo-block-default
(completing-read (format "Block name [%s]: " texinfo-block-default)
! texinfo-environments
nil nil nil nil texinfo-block-default))
\n "@" str \n _ \n "@end " str \n)
***************
*** 672,677 ****
--- 666,673 ----
(and (re-search-backward (concat "@\\(end\\s +\\)?" env) bound t)
(not (match-end 1)))))
+ (defvar texinfo-enable-quote-macros '("@\\(code\\|samp\\|kbd\\)\\>"))
+ (defvar texinfo-enable-quote-envs '("example\\>" "lisp\\>"))
(defun texinfo-insert-quote (&optional arg)
"Insert the appropriate quote mark for TeXinfo.
Usually inserts the value of `texinfo-open-quote' (normally ``) or
***************
*** 688,696 ****
(looking-at texinfo-close-quote))
(delete-char (length texinfo-open-quote))
t))
! (texinfo-inside-macro-p "@\\(code\\|samp\\|kbd\\)\\>" top)
! (texinfo-inside-env-p "example\\>" top)
! (texinfo-inside-env-p "lisp\\>" top))
(self-insert-command (prefix-numeric-value arg))
(insert
(if (memq (char-syntax (preceding-char)) '(?\( ?> ?\ ))
--- 684,694 ----
(looking-at texinfo-close-quote))
(delete-char (length texinfo-open-quote))
t))
! (texinfo-inside-macro-p texinfo-enable-quote-macros top)
! (let ((in-env nil))
! (dolist (env texinfo-enable-quote-envs in-env)
! (if (texinfo-inside-env-p env top)
! (setq in-env t)))))
(self-insert-command (prefix-numeric-value arg))
(insert
(if (memq (char-syntax (preceding-char)) '(?\( ?> ?\ ))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/textmodes/texinfo.el,
Miles Bader <=