comparison lisp/progmodes/ruby-mode.el @ 111433:05dc9dca8729

Replace end-of-line, save-excursion etc with point-at-eol, point-at-bol. * lisp/mh-e/mh-seq.el (mh-read-msg-list): Use point-at-eol. * lisp/gnus/gnus-bookmark.el (gnus-bookmark-bmenu-show-infos) (gnus-bookmark-kill-line): Use point-at-eol. * lisp/cedet/ede/proj-elisp.el (ede-proj-flush-autoconf): Use point-at-bol. * lisp/emacs-lisp/chart.el (chart-zap-chars): * lisp/play/decipher.el (decipher-set-map): * lisp/progmodes/ada-mode.el (ada-get-current-indent) (ada-search-ignore-string-comment, ada-tab-hard, ada-untab-hard): * lisp/progmodes/ada-prj.el (ada-prj-load-from-file, ada-prj-display-help): * lisp/progmodes/ada-xref.el (ada-initialize-runtime-library) (ada-get-all-references): * lisp/progmodes/cperl-mode.el (cperl-electric-paren) (cperl-electric-rparen, cperl-electric-keyword, cperl-electric-else) (cperl-linefeed, cperl-sniff-for-indent, cperl-to-comment-or-eol) (cperl-find-pods-heres, cperl-indent-exp, cperl-fix-line-spacing) (cperl-word-at-point-hard): * lisp/progmodes/idlw-shell.el (idlwave-shell-move-or-history) (idlwave-shell-filename-string, idlwave-shell-batch-command) (idlwave-shell-display-line): * lisp/progmodes/idlwave.el (idlwave-show-begin, idlwave-fill-paragraph) (idlwave-calc-hanging-indent, idlwave-auto-fill, idlwave-template): * lisp/progmodes/js.el (js--re-search-forward-inner) (js--re-search-backward-inner): * lisp/progmodes/vhdl-mode.el (vhdl-align-region-1, vhdl-align-region-2) (vhdl-fix-clause, vhdl-compose-configuration-architecture): * lisp/progmodes/ruby-mode.el (ruby-parse-partial, eval-when-compile): * lisp/textmodes/flyspell.el (flyspell-process-localwords): * lisp/textmodes/ispell.el (ispell-buffer-local-parsing) (ispell-buffer-local-dict, ispell-buffer-local-words): Use point-at-bol and point-at-eol.
author Glenn Morris <rgm@gnu.org>
date Sat, 06 Nov 2010 18:36:33 -0700
parents cb908fcc9f00
children 417b1e4d63cd
comparison
equal deleted inserted replaced
111432:8de1e4554e5e 111433:05dc9dca8729
614 ((and (ruby-expr-beg 'heredoc) 614 ((and (ruby-expr-beg 'heredoc)
615 (looking-at "<<\\(-\\)?\\(\\([\"'`]\\)\\([^\n]+?\\)\\3\\|\\(?:\\sw\\|\\s_\\)+\\)")) 615 (looking-at "<<\\(-\\)?\\(\\([\"'`]\\)\\([^\n]+?\\)\\3\\|\\(?:\\sw\\|\\s_\\)+\\)"))
616 (setq re (regexp-quote (or (match-string 4) (match-string 2)))) 616 (setq re (regexp-quote (or (match-string 4) (match-string 2))))
617 (if (match-beginning 1) (setq re (concat "\\s *" re))) 617 (if (match-beginning 1) (setq re (concat "\\s *" re)))
618 (let* ((id-end (goto-char (match-end 0))) 618 (let* ((id-end (goto-char (match-end 0)))
619 (line-end-position (save-excursion (end-of-line) (point))) 619 (line-end-position (point-at-eol))
620 (state (list in-string nest depth pcol indent))) 620 (state (list in-string nest depth pcol indent)))
621 ;; parse the rest of the line 621 ;; parse the rest of the line
622 (while (and (> line-end-position (point)) 622 (while (and (> line-end-position (point))
623 (setq state (apply 'ruby-parse-partial 623 (setq state (apply 'ruby-parse-partial
624 line-end-position state)))) 624 line-end-position state))))
1254 are terminated, or nil if they aren't terminated before the 1254 are terminated, or nil if they aren't terminated before the
1255 buffer position `limit' or the end of the buffer." 1255 buffer position `limit' or the end of the buffer."
1256 (save-excursion 1256 (save-excursion
1257 (beginning-of-line) 1257 (beginning-of-line)
1258 (catch 'done 1258 (catch 'done
1259 (let ((eol (save-excursion (end-of-line) (point))) 1259 (let ((eol (point-at-eol))
1260 (case-fold-search nil) 1260 (case-fold-search nil)
1261 ;; Fake match data such that (match-end 0) is at eol 1261 ;; Fake match data such that (match-end 0) is at eol
1262 (end-match-data (progn (looking-at ".*$") (match-data))) 1262 (end-match-data (progn (looking-at ".*$") (match-data)))
1263 beg-match-data end-re) 1263 beg-match-data end-re)
1264 (while (re-search-forward ruby-here-doc-beg-re eol t) 1264 (while (re-search-forward ruby-here-doc-beg-re eol t)