Mercurial > emacs
comparison lisp/info.el @ 111445:56b71cddc9c5
Replace still more end-of-line etc with line-end-position, etc.
* lisp/gnus/nnbabyl.el (nnbabyl-request-move-article, nnbabyl-delete-mail)
(nnbabyl-check-mbox): Use point-at-bol.
* lisp/cedet/semantic/lex.el (semantic-lex-ignore-comments, semantic-flex):
* lisp/cedet/semantic/grammar.el (semantic-grammar-epilogue):
* lisp/cedet/ede/speedbar.el (ede-find-nearest-file-line):
* lisp/cedet/ede/pmake.el (ede-proj-makefile-insert-dist-rules):
* lisp/cedet/ede/autoconf-edit.el (autoconf-delete-parameter):
Use point-at-bol and point-at-eol.
* lisp/vc/emerge.el (emerge-line-number-in-buf):
* lisp/textmodes/ispell.el (ispell-region):
* lisp/textmodes/fill.el (current-fill-column):
* lisp/progmodes/xscheme.el (xscheme-send-current-line):
* lisp/progmodes/vhdl-mode.el (vhdl-current-line, vhdl-line-copy):
* lisp/progmodes/tcl.el (tcl-hairy-scan-for-comment):
* lisp/progmodes/sh-script.el (sh-handle-prev-do):
* lisp/progmodes/meta-mode.el (meta-indent-line):
* lisp/progmodes/idlwave.el (idlwave-goto-comment, idlwave-fill-paragraph)
(idlwave-in-quote):
* lisp/progmodes/idlw-shell.el (idlwave-shell-current-frame)
(idlwave-shell-update-bp-overlays, idlwave-shell-sources-filter):
* lisp/progmodes/fortran.el (fortran-looking-at-if-then):
* lisp/progmodes/etags.el (find-tag-in-order, etags-snarf-tag):
* lisp/progmodes/cperl-mode.el (cperl-sniff-for-indent)
(cperl-find-pods-heres):
* lisp/progmodes/ada-mode.el (ada-get-current-indent, ada-narrow-to-defun):
* lisp/net/quickurl.el (quickurl-list-insert):
* lisp/net/ldap.el (ldap-search-internal):
* lisp/net/eudc.el (eudc-expand-inline):
* lisp/mail/sendmail.el (sendmail-send-it):
* lisp/mail/mspools.el (mspools-visit-spool, mspools-get-spool-name):
* lisp/emulation/viper-cmd.el (viper-paren-match, viper-backward-indent)
(viper-brac-function):
* lisp/calc/calc-yank.el (calc-do-grab-region):
* lisp/calc/calc-keypd.el (calc-keypad-press):
* lisp/term.el (term-move-columns, term-insert-spaces):
* lisp/speedbar.el (speedbar-highlight-one-tag-line):
* lisp/simple.el (current-word):
* lisp/mouse-drag.el (mouse-drag-should-do-col-scrolling):
* lisp/info.el (Info-find-node-in-buffer-1, Info-follow-reference)
(Info-scroll-down):
* lisp/hippie-exp.el (he-line-beg):
* lisp/epa.el (epa--marked-keys):
* lisp/dired-aux.el (dired-kill-line, dired-do-kill-lines)
(dired-update-file-line, dired-add-entry, dired-remove-entry)
(dired-relist-entry):
* lisp/buff-menu.el (Buffer-menu-buffer):
* lisp/array.el (current-line):
* lisp/allout.el (allout-resolve-xref)
(allout-latex-verbatim-quote-curr-line):
Replace yet more uses of end-of-line etc with line-end-position.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Mon, 08 Nov 2010 21:33:07 -0800 |
parents | fca66d4226a6 |
children | 8fd0d7bcdf7d |
comparison
equal
deleted
inserted
replaced
111444:60f509c70b61 | 111445:56b71cddc9c5 |
---|---|
886 CASE-FOLD t means search for a case-insensitive match. | 886 CASE-FOLD t means search for a case-insensitive match. |
887 Value is the position at which a match was found, or nil if not found." | 887 Value is the position at which a match was found, or nil if not found." |
888 (let ((case-fold-search case-fold) | 888 (let ((case-fold-search case-fold) |
889 found) | 889 found) |
890 (save-excursion | 890 (save-excursion |
891 (when (Info-node-at-bob-matching regexp) | 891 (if (Info-node-at-bob-matching regexp) |
892 (setq found (point))) | 892 (setq found (point)) |
893 (while (and (not found) | 893 (while (and (not found) |
894 (search-forward "\n\^_" nil t)) | 894 (search-forward "\n\^_" nil t)) |
895 (forward-line 1) | 895 (forward-line 1) |
896 (let ((beg (point))) | 896 (let ((beg (point))) |
897 (forward-line 1) | 897 (forward-line 1) |
898 (when (re-search-backward regexp beg t) | 898 (if (re-search-backward regexp beg t) |
899 (beginning-of-line) | 899 (setq found (line-beginning-position))))))) |
900 (setq found (point))))) | 900 found)) |
901 found))) | |
902 | 901 |
903 (defun Info-find-node-in-buffer (regexp) | 902 (defun Info-find-node-in-buffer (regexp) |
904 "Find a node or anchor in the current buffer. | 903 "Find a node or anchor in the current buffer. |
905 REGEXP is a regular expression matching nodes or references. Its first | 904 REGEXP is a regular expression matching nodes or references. Its first |
906 group should match `Node:' or `Ref:'. | 905 group should match `Node:' or `Ref:'. |
2321 (let ((completion-ignore-case t) | 2320 (let ((completion-ignore-case t) |
2322 (case-fold-search t) | 2321 (case-fold-search t) |
2323 completions default alt-default (start-point (point)) str i bol eol) | 2322 completions default alt-default (start-point (point)) str i bol eol) |
2324 (save-excursion | 2323 (save-excursion |
2325 ;; Store end and beginning of line. | 2324 ;; Store end and beginning of line. |
2326 (end-of-line) | 2325 (setq eol (line-end-position) |
2327 (setq eol (point)) | 2326 bol (line-beginning-position)) |
2328 (beginning-of-line) | |
2329 (setq bol (point)) | |
2330 | |
2331 (goto-char (point-min)) | 2327 (goto-char (point-min)) |
2332 (while (re-search-forward "\\*note[ \n\t]+\\([^:]*\\):" nil t) | 2328 (while (re-search-forward "\\*note[ \n\t]+\\([^:]*\\):" nil t) |
2333 (setq str (match-string-no-properties 1)) | 2329 (setq str (match-string-no-properties 1)) |
2334 ;; See if this one should be the default. | 2330 ;; See if this one should be the default. |
2335 (and (null default) | 2331 (and (null default) |
2841 (let* ((case-fold-search t) | 2837 (let* ((case-fold-search t) |
2842 (current-point (point)) | 2838 (current-point (point)) |
2843 (virtual-end | 2839 (virtual-end |
2844 (and Info-scroll-prefer-subnodes | 2840 (and Info-scroll-prefer-subnodes |
2845 (save-excursion | 2841 (save-excursion |
2846 (beginning-of-line) | 2842 (setq current-point (line-beginning-position)) |
2847 (setq current-point (point)) | |
2848 (goto-char (point-min)) | 2843 (goto-char (point-min)) |
2849 (search-forward "\n* Menu:" | 2844 (search-forward "\n* Menu:" current-point t))))) |
2850 current-point | |
2851 t))))) | |
2852 (if (or virtual-end | 2845 (if (or virtual-end |
2853 (pos-visible-in-window-p (point-min) nil t)) | 2846 (pos-visible-in-window-p (point-min) nil t)) |
2854 (Info-last-preorder) | 2847 (Info-last-preorder) |
2855 (scroll-down)))) | 2848 (scroll-down)))) |
2856 | 2849 |