(save-excursion
(buffer-substring
- (progn (forward-word 1) ; skip over node command
+ (progn (forward-word-strictly 1) ; skip over node command
(skip-chars-forward " \t") ; and over spaces
(point))
(if (search-forward "," (line-end-position) t) ; bound search
(goto-char (match-beginning 7)) ; match section name
(buffer-substring
- (progn (forward-word 1) ; skip over section type
+ (progn (forward-word-strictly 1) ; skip over section type
(skip-chars-forward " \t") ; and over spaces
(point))
(progn (end-of-line) (point))))
(setq title
(buffer-substring
;; skip over section type
- (progn (forward-word 1)
+ (progn (forward-word-strictly 1)
;; and over spaces
(skip-chars-forward " \t")
(point))
t)
(progn
(beginning-of-line)
- (forward-word 1) ; skip over section type
+ (forward-word-strictly 1) ; skip over section type
(skip-chars-forward " \t") ; and over spaces
(buffer-substring
(point)
(setq sec-name (buffer-substring-no-properties
(progn (beginning-of-line) ; copy its name
(1+ (point)))
- (progn (forward-word 1)
+ (progn (forward-word-strictly 1)
(point))))))
(cond
((or sec-pos top-pos)
(save-excursion
(let ((initial (texinfo-copy-next-section-title)))
;; This is not clean. Use `interactive' to read the arg.
- (forward-word 1) ; skip over node command
+ (forward-word-strictly 1) ; skip over node command
(skip-chars-forward " \t") ; and over spaces
(if (not (looking-at "[^,\t\n ]+")) ; regexp based on what Info looks for
; alternatively, use "[a-zA-Z]+"
(if title-p
(progn
(beginning-of-line)
- (forward-word 1)
+ (forward-word-strictly 1)
(skip-chars-forward " \t")
(setq title (buffer-substring
(point)
(line-beginning-position -1))
t)
;; @node is present, and point at beginning of that line
- (forward-word 1) ; Leave point just after @node.
+ (forward-word-strictly 1) ; Leave point just after @node.
;; Else @node missing; insert one.
(beginning-of-line) ; Beginning of `@section' line.
(insert "@node\n")
(if (not (looking-at "[^,\t\n ]+"))
(progn
(beginning-of-line)
- (forward-word 1)
+ (forward-word-strictly 1)
(insert " " title)
(message "Inserted title %s ... " title)))))
;; Go forward beyond current section title.
;; copy title
(let ((title
(buffer-substring
- (progn (forward-word 1) ; skip over section type
+ (progn (forward-word-strictly 1) ; skip over section type
(skip-chars-forward " \t") ; and over spaces
(point))
(progn (end-of-line) (point)))))