comparison lisp/woman.el @ 111429:249a1455856a

Use line-end-position rather than end-of-line, etc. * textmodes/texnfo-upd.el (texinfo-start-menu-description) (texinfo-update-menu-region-beginning, texinfo-menu-first-node) (texinfo-delete-existing-pointers, texinfo-find-pointer) (texinfo-clean-up-node-line, texinfo-insert-node-lines) (texinfo-multiple-files-update): * textmodes/table.el (table--probe-cell-left-up) (table--probe-cell-right-bottom): * textmodes/picture.el (picture-tab-search): * textmodes/page-ext.el (pages-copy-header-and-position) (pages-directory-for-addresses): * progmodes/vera-mode.el (vera-get-offset): * progmodes/simula.el (simula-calculate-indent): * progmodes/python.el (python-pdbtrack-overlay-arrow): * progmodes/prolog.el (end-of-prolog-clause): * progmodes/perl-mode.el (perl-calculate-indent, perl-indent-exp): * progmodes/icon.el (indent-icon-exp): * progmodes/etags.el (tag-re-match-p): * progmodes/ebrowse.el (ebrowse-show-file-name-at-point): * progmodes/ebnf2ps.el (ebnf-begin-file): * progmodes/dcl-mode.el (dcl-back-to-indentation-1) (dcl-save-local-variable): * play/life.el (life-setup): * play/gametree.el (gametree-looking-at-ply): * nxml/nxml-maint.el (nxml-insert-target-repertoire-glyph-set): * mail/sendmail.el (mail-mode-auto-fill): * emacs-lisp/lisp-mode.el (calculate-lisp-indent): * emacs-lisp/edebug.el (edebug-overlay-arrow): * emacs-lisp/checkdoc.el (checkdoc-this-string-valid): * woman.el (woman-parse-numeric-value, woman2-TH, woman2-SH) (woman-tab-to-tab-stop, WoMan-warn-ignored): * type-break.el (type-break-file-keystroke-count): * term.el (term-replace-by-expanded-history-before-point) (term-skip-prompt, term-extract-string): * speedbar.el (speedbar-edit-line, speedbar-expand-line) (speedbar-contract-line, speedbar-toggle-line-expansion) (speedbar-parse-c-or-c++tag, speedbar-parse-tex-string) (speedbar-buffer-revert-buffer, speedbar-highlight-one-tag-line): * sort.el (sort-skip-fields): * skeleton.el (skeleton-internal-list): * simple.el (line-move-finish, line-move-to-column): * shell.el (shell-forward-command): * misc.el (copy-from-above-command): * makesum.el (double-column): * ebuff-menu.el (electric-buffer-update-highlight): * dired.el (dired-move-to-end-of-filename): * dframe.el (dframe-popup-kludge): * bookmark.el (bookmark-kill-line, bookmark-bmenu-show-filenames): * arc-mode.el (archive-get-lineno): Use line-end-position and line-beginning-position. * net/ange-ftp.el, progmodes/hideif.el, reposition.el: Same, but only in comments.
author Glenn Morris <rgm@gnu.org>
date Sat, 06 Nov 2010 13:23:42 -0700
parents 672ffe880560
children 417b1e4d63cd
comparison
equal deleted inserted replaced
111428:043aac1cda3c 111429:249a1455856a
3541 ; (if (looking-at "[ \t\nRC\)\"]") ; R, C are tab types 3541 ; (if (looking-at "[ \t\nRC\)\"]") ; R, C are tab types
3542 ; () 3542 ; ()
3543 ; (WoMan-warn "Unimplemented numerical operator `%c' in %s" 3543 ; (WoMan-warn "Unimplemented numerical operator `%c' in %s"
3544 ; (following-char) 3544 ; (following-char)
3545 ; (buffer-substring 3545 ; (buffer-substring
3546 ; (save-excursion (beginning-of-line) (point)) 3546 ; (line-beginning-position)
3547 ; (save-excursion (end-of-line) (point)))) 3547 ; (line-end-position)))
3548 ; (skip-syntax-forward "^ ")) 3548 ; (skip-syntax-forward "^ "))
3549 value 3549 value
3550 )) 3550 ))
3551 3551
3552 (defun woman-parse-numeric-value () 3552 (defun woman-parse-numeric-value ()
3611 ;; ERROR -- should handle this better! 3611 ;; ERROR -- should handle this better!
3612 (progn 3612 (progn
3613 (WoMan-warn "Numeric/register argument error: %s" 3613 (WoMan-warn "Numeric/register argument error: %s"
3614 (buffer-substring 3614 (buffer-substring
3615 (point) 3615 (point)
3616 (save-excursion (end-of-line) (point)))) 3616 (line-end-position)))
3617 (skip-syntax-forward "^ ") 3617 (skip-syntax-forward "^ ")
3618 0) 3618 0)
3619 (goto-char (match-end 0)) 3619 (goto-char (match-end 0))
3620 ;; Check for scale factor: 3620 ;; Check for scale factor:
3621 (if 3621 (if
3761 ;; Delete repeated arguments: 3761 ;; Delete repeated arguments:
3762 (if (string-equal (buffer-substring here (point)) 3762 (if (string-equal (buffer-substring here (point))
3763 (buffer-substring start here)) 3763 (buffer-substring start here))
3764 (delete-region here (point))))) 3764 (delete-region here (point)))))
3765 ;; Embolden heading (point is at end of heading): 3765 ;; Embolden heading (point is at end of heading):
3766 (woman-set-face 3766 (woman-set-face (line-beginning-position) (point) 'woman-bold)
3767 (save-excursion (beginning-of-line) (point)) (point) 'woman-bold)
3768 (forward-line) 3767 (forward-line)
3769 (delete-blank-lines) 3768 (delete-blank-lines)
3770 (setq woman-left-margin woman-default-indent) 3769 (setq woman-left-margin woman-default-indent)
3771 (setq woman-prevailing-indent woman-default-indent) 3770 (setq woman-prevailing-indent woman-default-indent)
3772 (woman2-format-paragraphs to woman-left-margin)) 3771 (woman2-format-paragraphs to woman-left-margin))
3781 (woman2-process-escapes-to-eol) 3780 (woman2-process-escapes-to-eol)
3782 (woman-leave-blank-lines woman-interparagraph-distance) 3781 (woman-leave-blank-lines woman-interparagraph-distance)
3783 (setq woman-leave-blank-lines nil) 3782 (setq woman-leave-blank-lines nil)
3784 ;; Optionally embolden heading (point is at beginning of heading): 3783 ;; Optionally embolden heading (point is at beginning of heading):
3785 (if woman-bold-headings 3784 (if woman-bold-headings
3786 (woman-set-face 3785 (woman-set-face (point) (line-end-position) 'woman-bold))
3787 (point) (save-excursion (end-of-line) (point)) 'woman-bold))
3788 (forward-line) 3786 (forward-line)
3789 (setq woman-left-margin woman-default-indent 3787 (setq woman-left-margin woman-default-indent
3790 woman-nofill nil) ; fill output lines 3788 woman-nofill nil) ; fill output lines
3791 (setq woman-prevailing-indent woman-default-indent) 3789 (setq woman-prevailing-indent woman-default-indent)
3792 (woman2-format-paragraphs to woman-left-margin)) 3790 (woman2-format-paragraphs to woman-left-margin))
4374 (let* ((tab (car tabs)) 4372 (let* ((tab (car tabs))
4375 (type (and (consp tab) (cdr tab))) 4373 (type (and (consp tab) (cdr tab)))
4376 eol n) 4374 eol n)
4377 (if type 4375 (if type
4378 (setq tab (woman-get-tab-stop tab) 4376 (setq tab (woman-get-tab-stop tab)
4379 eol (save-excursion (end-of-line) (point)) 4377 eol (line-end-position)
4380 n (save-excursion 4378 n (save-excursion
4381 (search-forward "\t" eol t)) 4379 (search-forward "\t" eol t))
4382 n (- (if n (1- n) eol) (point)) 4380 n (- (if n (1- n) eol) (point))
4383 tab (- tab (if (eq type ?C) (/ n 2) n))) ) 4381 tab (- tab (if (eq type ?C) (/ n 2) n))) )
4384 (setq n (- tab (current-column))) 4382 (setq n (- tab (current-column)))
4505 (defun WoMan-warn-ignored (request ignored) 4503 (defun WoMan-warn-ignored (request ignored)
4506 "Log a warning message about ignored directive REQUEST. 4504 "Log a warning message about ignored directive REQUEST.
4507 IGNORED is a string appended to the log message." 4505 IGNORED is a string appended to the log message."
4508 (let ((tail 4506 (let ((tail
4509 (buffer-substring (point) 4507 (buffer-substring (point)
4510 (save-excursion (end-of-line) (point))))) 4508 (line-end-position))))
4511 (if (and (> (length tail) 0) 4509 (if (and (> (length tail) 0)
4512 (/= (string-to-char tail) ?\ )) 4510 (/= (string-to-char tail) ?\ ))
4513 (setq tail (concat " " tail))) 4511 (setq tail (concat " " tail)))
4514 (WoMan-log-1 4512 (WoMan-log-1
4515 (concat "** " request tail " request " ignored)))) 4513 (concat "** " request tail " request " ignored))))