comparison lisp/textmodes/texinfo.el @ 49599:5ade352e8d1c

Trailing whitespace deleted.
author Juanma Barranquero <lekktu@gmail.com>
date Tue, 04 Feb 2003 13:30:45 +0000
parents c9585243ef9f
children 167c56f6d789 d7ddb3e565de
comparison
equal deleted inserted replaced
49598:0d8b17d428b5 49599:5ade352e8d1c
315 ("^\\(@\\)ignore\\>" (1 "< b")) 315 ("^\\(@\\)ignore\\>" (1 "< b"))
316 ("^@end ignore\\(\n\\)" (1 "> b"))) 316 ("^@end ignore\\(\n\\)" (1 "> b")))
317 "Syntactic keywords to catch comment delimiters in `texinfo-mode'.") 317 "Syntactic keywords to catch comment delimiters in `texinfo-mode'.")
318 318
319 (defconst texinfo-environments 319 (defconst texinfo-environments
320 '("cartouche" "copying" "defcv" "deffn" "defivar" "defmac" 320 '("cartouche" "copying" "defcv" "deffn" "defivar" "defmac"
321 "defmethod" "defop" "defopt" "defspec" "deftp" "deftypefn" 321 "defmethod" "defop" "defopt" "defspec" "deftp" "deftypefn"
322 "deftypefun" "deftypevar" "deftypevr" "defun" "defvar" 322 "deftypefun" "deftypevar" "deftypevr" "defun" "defvar"
323 "defvr" "description" "detailmenu" "direntry" "display" 323 "defvr" "description" "detailmenu" "direntry" "display"
324 "documentdescription" "enumerate" "example" "flushleft" 324 "documentdescription" "enumerate" "example" "flushleft"
325 "flushright" "format" "ftable" "group" "ifclear" "ifset" 325 "flushright" "format" "ftable" "group" "ifclear" "ifset"
632 (let ((prevent-filling "^@\\(def\\|multitable\\)")) 632 (let ((prevent-filling "^@\\(def\\|multitable\\)"))
633 (set (make-local-variable 'auto-fill-inhibit-regexp) 633 (set (make-local-variable 'auto-fill-inhibit-regexp)
634 (if (null auto-fill-inhibit-regexp) 634 (if (null auto-fill-inhibit-regexp)
635 prevent-filling 635 prevent-filling
636 (concat auto-fill-inhibit-regexp "\\|" prevent-filling))))) 636 (concat auto-fill-inhibit-regexp "\\|" prevent-filling)))))
637 637
638 638
639 639
640 ;;; Insert string commands 640 ;;; Insert string commands
641 641
642 (defvar texinfo-block-default "example") 642 (defvar texinfo-block-default "example")
694 (self-insert-command (prefix-numeric-value arg)) 694 (self-insert-command (prefix-numeric-value arg))
695 (insert 695 (insert
696 (if (memq (char-syntax (preceding-char)) '(?\( ?> ?\ )) 696 (if (memq (char-syntax (preceding-char)) '(?\( ?> ?\ ))
697 texinfo-open-quote 697 texinfo-open-quote
698 texinfo-close-quote))))) 698 texinfo-close-quote)))))
699 699
700 ;; The following texinfo-insert-@end command not only inserts a SPC 700 ;; The following texinfo-insert-@end command not only inserts a SPC
701 ;; after the @end, but tries to find out what belongs there. It is 701 ;; after the @end, but tries to find out what belongs there. It is
702 ;; not very smart: it does not understand nested lists. 702 ;; not very smart: it does not understand nested lists.
703 703
704 (defun texinfo-last-unended-begin () 704 (defun texinfo-last-unended-begin ()
875 with @-sign commands for @chapter, @section, and the like, and list 875 with @-sign commands for @chapter, @section, and the like, and list
876 @node lines. 876 @node lines.
877 877
878 Lines with structuring commands beginning in them are displayed in 878 Lines with structuring commands beginning in them are displayed in
879 another buffer named `*Occur*'. In that buffer, you can move point to 879 another buffer named `*Occur*'. In that buffer, you can move point to
880 one of those lines and then use 880 one of those lines and then use
881 \\<occur-mode-map>\\[occur-mode-goto-occurrence], 881 \\<occur-mode-map>\\[occur-mode-goto-occurrence],
882 to jump to the corresponding spot in the Texinfo source file." 882 to jump to the corresponding spot in the Texinfo source file."
883 883
884 (interactive "P") 884 (interactive "P")
885 ;; First, remember current location 885 ;; First, remember current location
886 (let ((source-buffer (current-buffer)) 886 (let ((source-buffer (current-buffer))
887 current-location) 887 current-location)
888 (save-excursion 888 (save-excursion
889 (end-of-line) ; so as to find section on current line 889 (end-of-line) ; so as to find section on current line
890 (if (re-search-backward 890 (if (re-search-backward
891 ;; do not require `texinfo-section-types-regexp' in texnfo-upd.el 891 ;; do not require `texinfo-section-types-regexp' in texnfo-upd.el
892 "^@\\(chapter \\|sect\\|subs\\|subh\\|unnum\\|major\\|chapheading \\|heading \\|appendix\\)" 892 "^@\\(chapter \\|sect\\|subs\\|subh\\|unnum\\|major\\|chapheading \\|heading \\|appendix\\)"
893 nil t) 893 nil t)
894 (setq current-location 894 (setq current-location
895 (progn 895 (progn
916 (setq level 916 (setq level
917 (or (cadr (assoc (match-string 1) texinfo-section-list)) 2)) 917 (or (cadr (assoc (match-string 1) texinfo-section-list)) 2))
918 (indent-to-column (+ (current-column) (* 4 (- level 2)))) 918 (indent-to-column (+ (current-column) (* 4 (- level 2))))
919 (beginning-of-line)))) 919 (beginning-of-line))))
920 ;; Third, go to line corresponding to location in source file 920 ;; Third, go to line corresponding to location in source file
921 ;; potential bug: two exactly similar `current-location' lines ... 921 ;; potential bug: two exactly similar `current-location' lines ...
922 (goto-char (point-min)) 922 (goto-char (point-min))
923 (re-search-forward current-location nil t) 923 (re-search-forward current-location nil t)
924 (beginning-of-line) 924 (beginning-of-line)
925 )) 925 ))
926 926